I'm studying about Riemann Roch theorem for curves and its consequences (in algebaic gemoetry).
In Hartshorne I've found an exercise equivalent to this assert:
Let $D$ be an effective divisor of a curve $X$ of genus $g$, prove that $h^0(D) \leq deg \,D$.
Is easy to prove it in the case of special divisors, but how to prove the assert if $deg \, D \leq 2g-2$?
Thank you for help!
Let $X$ be a smooth projective surface and $D$ an effective divisor on $X$. Then $h^0(D)-1 \leq \mathrm{deg}(D)$.
Let $g$ be the genus of $X$. Since $D$ is effective, $h^0(K_X-D)\leq h^0(K_X) = g$. From this and Riemann-Roch we directly get the claimed inequality $$h^0(D) - 1 = \mathrm{deg}(D)-g+h^0(K_X-D)\leq \mathrm{deg}(D).\quad (*)$$
Addendum, in reaction to Georges Elencwajg's comments:
In fact, it suffices to prove that in $(*)$, equality holds if and only if $D = 0$ or $g = 0$. Apparently, equality in $(*)$ is equivalent to $h^0(K_X-D) = g$. If $g = 0$ or $D = 0$, then this equality is easy to see. The other way around suppose $g>0$ and $D>0$. Then $h^0(\mathcal{O}_X(K_X)\otimes\mathcal{O}_D)> 0$. Thus, from the long exact sequence associated with the exact sequence $$0\to\mathcal{O}_X(K_X-D)\to\mathcal{O}_X(K_X)\to\mathcal{O}_X(K_X)\otimes\mathcal{O}_D\to 0$$ we get $h^0(K_X-D) < h^0(K_X) = g$.
(This now makes a complete solution to Hartshorne's exercise IV 1.5.)