Hartshorne Exercise V.1.1.
Let $X$ be a curve, and let $P\in X$ be a point. Then there exists a nonconstant rational function $f\in \Bbb{K}(X)$, which is regular everywhere except at $P$.
Riemann Roch gives for any $n\ge \op{max}\{2g,1\}$ ,
$$ h^0(nP)=n-g+1\ge 2,$$
so choosing $n$ sufficiently large, we can find a non-constant rational function $f\in\Bbb{K}(X)-\op{span}_k\{1\}$ which is regular away from $P$. Since $f$ is non-constant, it must vanish somewhere, but this forces a pole of at least order 1 (and at most $n$) to occur at $P$ since $\deg f =0$, which means exactly that $f\notin \OO{X,P}$.
Leave a Reply