# $\dim H^0(X, \mathcal{O}_D) \leq 1 + \deg D$ when $-1 \leq \deg D \leq g - 1$

$X$ is a compact Riemann surface of genus $g$. I'm starting to wonder whether this statement (in my title) is true at all or whether it's a typo...it seems impossible to prove using just the Riemann-Roch theorem, unless I'm not seeing something simple. Do I need to use more than just Riemann-Roch? I can only do the case $\deg(D) = -1$ right now.

I'll just explain my notation here, I'm using Otto Forster's notation from his book Lectures on Riemann Surfaces. $D$ is a divisor on $X$. $H^0(X, \mathcal{O}_D)$ is obviously the 0-th cohomology group of X with respect to the sheaf $\mathcal{O}_D$ where $\mathcal{O}_D (U) = \{ f \in \mathcal{M}(U)| \mathrm{ord}_x(f) \geq -D(x) \, \forall x\in U \}$ and $\mathcal{M}$ is the sheaf of meromorphic functions.

The version of Riemann-Roch with which I'm familiar is: for a compact Riemann surface $X$ of genus $g$ and a divisor $D$ on it, $\dim H^0(X, \mathcal{O}_D) - \dim H^1(X, \mathcal{O}_D) = 1 - g + \deg D$.

I also tried using the consequence of the Serre Duality which asserts that $\dim H^1(\mathcal{O}_D) = \dim H^0(X, \Omega_{-D})$ where $\Omega_{-D}$ is the sheaf of meromorphic 1-forms that are multiples of $-D$. But I just cannot get the above inequality!

Could I please get a hint?

You don't need Riemann-Roch. Let $D$ be a divisor with $\dim H^0(X,D) \neq 0$. Then, there is a non-identically zero section $s \in H^0(X,D)$, say $s(p) \neq 0$. Evaluation at $p$ gives an exact sequence $$0 \to H^0(X, D- p) \to H^0(X,D) \to k \to 0$$ and you are done by induction since you know that there are no sections for a divisor with negative degree.