These are from the book Basic Algebraic geometry by Shafarevich
Definition of regular function on a quasi projective variety is as follows :
Let $X\subset \mathbb{P}^n $ be a quasi projective variety. Let $x\in X$ and $\psi=P/Q$ where $P,Q$ are homogeneous polynomials of same degree such that $Q(x)\neq 0$.
I got the idea behind this. In case of closed subsets of $\mathbb{A}^n$ we define regular function to be a polynomial. But in case of projective space, polynomial does not define a function, so, we took fraction as mentioned above. This is fine, we have a map from $X$ to $k$.
Then he defines a regular map from $X$ to $\mathbb{A}^m$ as a $m$ tuple of regular functions. This is also fine.
Then he defines a regular map from a quasi projective space $X$ to a quasi projective space $Y\subset \mathbb{P}^m$. The map $f: X\rightarrow Y$ is regular if for every $x\in X$ and an affine piece $\mathbb{A}_i^m$ containing $f(x)$ there exists a neighbourhood $U$ containing $x$ such that $f(U)\subset \mathbb{A}_i^m$ and the map $f: U\rightarrow \mathbb{A}_i^m$ is regular.
I did not understand one thing here. What neighbourhood is he referring here? Is he referring to affine neighbourhood? In some books they mentioned that it is affine.
Then he goes on and says that there is a second form of the definition of a regular map : A regular map $f: X\rightarrow \mathbb{P}^m$ of an irreducible quasiprojective variety $X$ tp projective space$\mathbb{P}$ is given by an $m+1$ tuple of forms $(F_0:F_1:\cdots:F_m)$ of the same degree in the homogeneous coordinates of $\mathbb{P}^m$. We require that for every $x\in X$ there is an expression fr $f$ as above such that $F_i(x)\neq 0$ for some $i$.
This definition is more natural than the previous one,. As in affine case, we expect the map top be given by polynomials. But polynomials foes not define a function from projective space to the field $k$. That is why to get a value in field k$ we considered the ratio of two homogeneous polynomials.
But when the codomain is another projective space, it is not necessary to consider quotients of homogeneous polynomials. We expect the inclusion map $[x_0:x_1]\mapsto[x_0:x_1:1]$to be regular and that is clear for the second definition.
I could not understand the necessity of quasi projective variety being irreducible.
I could not see how the second definition is deduced from the first one. Please give some idea about the first definition.