# proof on regular functions on complete connected varieties is constant

The complete reference is Cor 7.24 of this notes: https://www.mathematik.uni-kl.de/~gathmann/de/alggeom.php

We want to prove the statement "Let $$X$$ be a connected complete variety, then $$\mathcal{O}_X(X)=k$$."
The proof goes like this: A global regular function $$\varphi\in\mathcal{O}_X(X)$$ gives a morphism $$\varphi:X\to\mathbb{A}^1$$. Then we extend the target to $$\mathbb{P}^1=\mathbb{A}^1\cup\{\infty\}$$ and the image $$\varphi(X)$$ of the new map does not contain the point at infinity. But (by the corollary I will write down below), since $$X,\mathbb{P}^1$$ are varieties and $$X$$ is complete, we have $$\varphi(X)$$ must be a complete closed subvariety of $$\mathbb{P}^1$$, which is a set of finite points. Then as the image of a connected space, $$\varphi(X)$$ must be connected, and hence must be a single point.
My question is, why does the author extend the target to $$\mathbb{P}^1$$? If we do not do that and stick to $$\mathbb{A}^1$$, then we still have the same result since, $$\mathbb{A}^1$$ is an affine variety hence also a variety so that we are able to use the corollary below.
Corollary. Let $$f:X\to Y$$ be a morphism between varieties, if $$X$$ is complete then $$f(X)$$ is a complete closed subvariety of $$Y$$.
Also, I am not so sure how do we conclude that, the proper closed subsets of $$\mathbb{P}^1$$ are finite sets. Because in this case, when we are discussing $$V_p(I)$$, we have $$I\subseteq k[x_0,x_1]$$. Then we cannot proceed in the same way as we did to $$\mathbb{A}^1$$. Any help is appreciated! Thanks in advance.

• We must use $Y=\mathbb{P}^1$ to ensure that the image of $f:X \to Y$ is not all of $Y$. To see that proper closed subsets of $\mathbb{P}^1$ are finite point sets just cover $\mathbb{P}^1$ with two affine $U_i \cong \mathbb{A}^1$. Mar 21, 2023 at 13:34
• @JürgenBöhm the corollary cited above is enough to show that the image of $f$ is not all of $\Bbb A^1$, as $\Bbb A^1$ is not complete. Mar 21, 2023 at 16:00
• @KReiser You are right, I overlooked the word "complete" in the statement of the corollary. Mar 21, 2023 at 17:12