Using Riemann Roch to prove dimension of $H^0(X, \mathcal{O}_D)$. I refer to this question $\dim H^0(X, \mathcal{O}_D) \leq 1 + \deg D$ when $-1 \leq \deg D \leq g - 1$. An answer using an alternative approach is given. However I would like to know if it is possible or easier to prove this statement using Riemann Roch instead. By RR and Serre's duality, we have
$$\dim H^0(X, \mathcal{O}_D) = 1 - g + \operatorname{deg}(D) + \dim H^0(X,\Omega_{-D})$$
Hence it suffices to prove that for  $\operatorname{deg}(D) \le g+1$, one has $ \dim H^0(X,\Omega_{-D}) \le 1+ \operatorname{deg}(D) \le g$. Is this statement true? And if yes how can I go about proving this?
 A: First you must observe that $H^0(X,O_D)$ is identified by $L(D)$ where $L(D)$ is the space of meromorphic functions $f$ such that 
$div(f)\geq -D$.
Let $s_0$ a meromorphic section of $D$ such that $(s_0)=D$, then for each olomorphic section $s\in H^0(X,O_D)$ we have that 
$f_s:=\frac{s}{s_0}$ is a well defined merimorphic function and
$div(f_s)=(s)-(s_0)=(s)-D\geq -D$ 
because $s$ is olomorphic. So $f_s\in L(D)$ and you get the following identification 
$\otimes (s_0): L(D)\to H^0(X,O_X)$ 
So your question can be formulated in this way:
Is it true that $dim(L(D)\leq 1+deg(D)$ ?
If you know the following result 


*

*If $deg(D)=0$ then $D\sim 0$ and $dim(L(D))\leq 1$

*$dim(L(D))\leq dim(L(D-p))+1$
it is simple prove your thesis. Suppose that $D$ is effective. We want prove the statement for induction on $deg(D)$. If $deg(D)=0$ then by point 1. You have that $dim(L(D)\leq 1$;
Suppose that the thesis is true for each effective divisor of degree $n-1$ and let $D$ a divisor of degree $n$. Then $D-p$ is an effective divisor of degree $n-1$ and we have $deg(L(D-p))\leq (n-1)+1=n$ but by point 2. we have that $dim(L(D))\leq dim(L(D-p))+1\leq n+1$ so 
$dim(L(D))\leq deg(D)+1$. In general your result is not true if $D$ is not an effective divisor, infact in that case you can write $D=P-N$ with $P,N\geq 0$ and you can use an analogous proof by induction on $deg(P)$ to have that 
$dim(L(D))\leq deg(P)+1$ 
You can observe that you don’t need to use Riemann-Roch theorem. 
