Divisor on curve of genus 2

Let $C$ be a smooth, projective curve of genus 2. I want to show that there exists a non-constant rational function $f \in k(C)$ having divisor of the form $$(f) = P_1 + P_2 - P_3 - P_4$$for points $P_1,P_2,P_3,P_4$. I am given the hint to consider two rational functions $f_1, f_2 \in L(K)$ (the Riemann-Roch space) where $K$ is a canonical divisor on the curve. I know that $\dim L(K) = 2$, so these non-constant $f_1,f_2$ exist. Moreover, I can derive that $\deg(K)=2$. How do I use the latter to solve this? I thought about taking $K = P_3 + P_4$ as that would give me $f_1$ and $f_2$ both with simple poles at $P_3$ and $P_4$. Does this mean that I can take $f = \frac{f_1}{f_2}$ since it doesn't say that the $P_i$ should be different?

• Of course the points $P_i$ should be different: else you could take $div(1)=0=P+P-P-P$ ! – Georges Elencwajg Jan 25 '16 at 22:45
• Is it there exist points P or for all P's there is a function ? – Rene Schipperus Jan 25 '16 at 22:49
• Rene, it is "there exist points P". Georges, you are absolutely right. Unfortunately that only shows how bad my understanding of these concepts is. Any hint on how I should approach this problem? – user307988 Jan 25 '16 at 22:52

Take two linearly independent rational differential forms $\omega_1, \omega_2\in L(K)=\Omega^1(C)$ with divisors $\operatorname {div} (\omega_1)=P_1+P'_1$ and $\operatorname {div} (\omega_2)=P_2+P'_2$ .
The rational function $f=\frac {\omega_1}{\omega_2}\in \operatorname {Rat}(C)$ then has a divisor of the required form $$\operatorname {div}(f)=P_1+P'_1-P_2-P'_2$$
• What confuses me still is why we can take $div(\omega_1) = P_1 + P_1'$. Is it because a differential on $C$ has the form $g \omega$ for some $g$ and $K = div(\omega)$ so that $\deg(div(\omega_1)) = \deg(div(g \omega)) = \deg(div(g)) + \deg(div(\omega)) = 2$ implies that two such points exist? – user307988 Jan 25 '16 at 23:06
• Because $l(K)=2$ one of the points of the canonical series can be chosen arbitrary. – Rene Schipperus Jan 25 '16 at 23:09
• Dear @Rene: with my construction it might indeed happen that $P_i=P'_i$ but I'm sure that $P_1\neq P_2$ because else $P'_1\sim P'_2$, which is impossible for a curve of positive genus. But I can also arrange that all four points $P_1,P_2,P'_1,P'_2$ are different by regarding $f$ as a map $F:C\to \mathbb P^1$ and taking the divisor $D=F^*(p)-F^*(p')$ , where $p\neq p'\in \mathbb P^1$ are two non-branch points for $F$. If $g$ is a rational function on $\mathbb P^1$ with a zero at $p$ and a pole at $p'$ then for the the lift of $g$ to $C$ we have $\operatorname {div}(F^*g)=D=P_1+P_2-P'_1-P'_2$ – Georges Elencwajg Jan 25 '16 at 23:21