Possible values of $l(np)$ for $p\in X$, where $X$ is a compact Riemann surface of genus 2 Here $l(D)$ denotes the dimension of the complex vector space
$$\mathcal{L}(D)=\{f\colon X \to \mathbb{P}^1\mathbb{C} \hspace{5pt} \mathrm{meromorphic} \hspace{5pt} \mathrm{s.t.} \hspace{5pt} (f)+D \geq 0\}$$
I hope the notation is clear (I guess it is standard).
I have encountered an exercise which asks me the following: find all possible values of $l(np)$ for $n\in \mathbb{N}, \, p\in X$, where $X$ is a compact Riemann surface with genus $g=2$.
The Riemann-Roch theorem states that if $D$ is a divisor and $K$ is a canonical divisor, then
$$l(D)-l(K-D)=\mathrm{deg}\,D-g+1$$
What I did: if $n=0$ then obviously $l(0)=1$, because $f$ is holomorphic on $X$, so it is constant.
Now, we know that $\mathrm{deg}\,K=2g-2=2$, so if $n\geq 3$ we have $l(K-np)=0$, therefore
$$l(np)=\mathrm{deg}\,(np)-2+1=n-1$$
This was the easy part. What about $n=1,\,2$?
Thanks in advance for your help.
 A: Since any meromorphic function with a pole of order at most $n$ at $P$ also has a pole of order at most $n+1$ at $P$, we have $l(nP)\leq l((n+1)P)$. So our sequence $\{l(nP)\}$ could conceivably take any of the three following forms: $$1,2,2,2,3,4,\cdots$$ $$1,1,2,2,3,4,\cdots$$ $$ 1,1,1,2,3,4,\cdots$$
We'll show that the first is impossible while both the second and third occur (though the second is rarer than the third).
As Mindlack mentions in the comments, $l(P)=2$ would imply that $X$ admits a nonconstant meromorphic map to $\Bbb P^1$ of degree 1, which is an isomorphism. But $X$ has positive genus, so this cannot be the case and the first sequence is impossible. In fact, this statement generalizes: for an effective divisor $D$, $l(D)\leq \deg D +1$ with equality iff $D=0$ or $g=0$.
Let's suppose $P$ has been chosen so that the second sequence occurs. Then $l(2P)-l(K-2P)=2+1-2=1$, and so we see that $l(K-2P)=1$. But this means that $K-2P\sim0$, since it's a degree-zero divisor with a section. What this means is that $P$ is a ramification point of the unique double-covering $X\to\Bbb P^1$ defined by the canonical divisor. ($\deg K=2$, $l(K)=2$, so $K$ gives a degree-two map to $\Bbb P^1$, and any other double-covering is the same map up to an automorphism of the target: the pullback of the hyperplane divisor along the double-cover gives an effective divisor $D$ with $\deg D=2$ and $l(D)=2$, which by the same logic must be equivalent to the canonical divisor.) By Riemann-Hurwitz, there are $6$ such ramification points.
I claim that if $P$ is any point other than the six ramification points above, then $l(2P)=1$ and we have the third type of sequence. To see this, let $Q$ be the other point in the fiber of the double-covering containing $P$. We know $l(P+Q)=2$ because $P+Q$ is the preimage of some point on $\Bbb P^1$ under the double covering and neither $P$ nor $Q$ are ramification points. On the other hand, if $l(2P)=2$, then the quotient of a non-constant function with a double pole at $P$ and a non-constant function with a single pole each at $P$ and $Q$ is a meromorphic function on $X$ with a single pole at $P$ and a single zero at $Q$, which gives an isomorphism $X\to\Bbb P^1$, contradiction.
