Proof (rational map between curves is a morphism)

Let $ϕ: C \dashrightarrow \mathbb{P}^n$ be a rational map. We need to show all $P\in C$ is regular for $ϕ$.

WLOG suppose $ϕ(C)\not\subseteq \set{x_0 = 0}$. Then any representation $$ \begin{align*} ϕ = (G_0 : \ldots : G_n) \end{align*} $$ has $G_0 \not\in I(C)$.

Define $g_j := G_j/G_0\in k(C)$. If $g_j\in O_{C,P}$ for all $j$, then $ϕ$ is regular at $P$ with the representation $$ \begin{align*} (1 : g_1 : \ldots : g_n). \end{align*} $$ Otherwise, let $j$ be such that $ν_P(g_j)$ is minimal and let $t = -ν_P(g_j) > 0$. Taking any local parameter $π_P$, the representation $$ \begin{align*} (π_P^t : g_1 π_P^t : \ldots : g_n π_P^t) \end{align*} $$ has all components in $O_{C,P}$ and $g_j π_P^t\not\in \mathfrak{m}_P$, so $ϕ$ is regular at $P$.

If $ϕ: C \dashrightarrow D$ is a birational map between curves, then there are morphisms $ψ: C\to D$ extending $ϕ$ and $\bar ψ: D\to C$ extending $ϕ\inv$. Then $ψ\circ \bar ψ: D\to D$ and $\bar ψ \circ ψ: C\to C$ are identity on an open dense set. Therefore it suffices to show if a continuous function $f: X\to X$ is identity on a dense set, then $f = \id_X$. $f\times \id : X \to X\times X$ given by $x\mapsto (x, f(x))$ is continuous, and by separatedness, $Δ_X\subseteq X\times X$ is closed. Therefore $\sb{x\in X}{f(x) = x} = (f\times \id)\inv(Δ_X)$ is closed and contains a dense set, so equals $X$.