Meromorphic functions on a Riemann surface Let $X$ be a non-hyperelliptic Riemann surface of genus $g = 4$. 
Let $p,q,r$ be three points on $X$, not necessarily distinct. Is there any obstruction to the existence of a meromorphic function $f: X\to \mathbb{C}$, such that $f$ has simple poles at exactly $p,q,r$, and no other poles?
In other words, if $D = p + q + r$ is a divisor, what is the dimension of $L(D)$? (I believe this is standard terminology, but $L(D)$ is the space of meromorphic functions on $X$ which have poles bounded by the divisor $D$)
The dimension of $L(D)$ can only be 1 or 2 (by the non-hyperellipticity hypotesis). I was wondering if, in general, a function like the one described above does exist (and then $L(D)$ has always dimension 2) or not.
 A: Let $K$ denote an effective divisor linearly equivalent to the canonical divisor. By Riemann-Roch we have $\ell(D) = \ell(K - D)$ (where $\ell(D) = \dim \mathcal{L}(D)$). The elements of $\ell(K - D)$ are the functions $f$ such that $\text{div}(f) + K - D \ge 0$. Now, since $X$ is non-hyperelliptic, the canonical map $\phi_K : X \to \mathbb{P}^3$ is an embedding, and we can choose coordinates $(X_0 : X_1 : X_2 : X_3)$ such that the hyperplane $X_0 = 0$ at infinity has hyperplane divisor $K$. 
It follows that if $a_0 X_0 + ... + a_3 X_3 = 0$ is a hyperplane containing $p, q, r$, then $f = \frac{a_0 X_0 + ... + a_3 X_3}{X_0} \in \mathcal{L}(K - D)$. But three points generically determine a hyperplane in $\mathbb{P}^3$, so we ought to have $\ell(K - D) = 1$ in general (hence $\ell(D) = 1$ in general). If $p, q, r$ are distinct then $\ell(K - D) = 1$ if and only if the points $p, q, r$ are not collinear. If two of the points are identical, say $p = q$, then $\ell(K - D) = 1$ if and only if the tangent line to $p$ does not intersect $r$. If all three points are identical, then I think $\ell(K - D) = 1$ if and only if $p$ is not a point of inflection. 
