Meromorphic Functions and Holomorphic Functions on the Riemann sphere I have been reading Rick Miranda's Book on Algebraic Curves and Riemann Surfaces, and he states that if we have a meromorphic function $f$ on a Riemann surface $X$ we can construct a holomorphic function $F$ to the Riemann sphere, intuitively this seems alright we just send the poles to $\infty$, but i cant seem to prove this in a very rigorous way,and they way he states it seems like he implies that is trivial, so any tips or help is appreciated. Thanks in advance. 
 A: Let $F$ be a meormorphic function on $X$. The there exists discrete set $P$ of poles such that we have an actual function $F\colon X\setminus P \rightarrow \mathbb{C}$. Now take $Z$ the discrete set of zeros of $F$. We also have a function  $\dfrac{1}{F}\colon X\setminus Z \rightarrow \mathbb{C}$. Note that $ (X\setminus Z) \cup (X\setminus P) = X$.
Recall that the Riemann Sphere is constructed by glueing two copies of $\mathbb{C}$ with coordinates $z$ and $w$, respectively, by making the identification $z= \dfrac{1}{w}$. Hence we can glue these two maps we have defined in an obvious manner.
Another way to realize this map is by considering the projective line $\mathbb{P}^1$. Around each point of $X$ we have a representation $F=\dfrac{f}{g}$ where $f$ and $g$ are holomorphic. Then we set a map $X\ni x \mapsto (f(x):g(x)) \in \mathbb{P}^1$. To prove that it is well defined we only need to show that it does not depend on the representation and it is indeed the case. If $F = \dfrac{f_1}{g_1}$ is other representation then $f_1g = f_1g_1$ which ensures that $(f:g) = (f_1:g_1)$.
