I am using Rick Miranda's book "Algebraic curves and Riemann Surfaces" to try and check some things about hyperelliptic curves. I have completed almost all of one of the exercises, but there is one part of my proof I am not sure of. The question (question R) 2), page 245), is as follows:
Let $X$ be an algebraic curve of genus $g\geq 2$. Show that $2\notin G_P(|K|)$ if and only if $X$ is hyperelliptic and $P$ is a ramification point.
In this case, $2\notin G_P(|K|)$ simply means that there does not exist a meromorphic function with a pole order exactly 2 at $P$ and no other poles (I think this is the right definition to be using). Technically, $G_P(|K|)$ is the set of gap numbers.
I have shown the if part fine. The other direction I think is true because there will be two points in the preimage of the projection to $\mathbb P^1$ if $P$ is not ramified. Hence, I want to say that if there is a pole at $P$, there will be a pole at the other point in the preimage. But this can't in general be true, because by Riemann-Roch applied to the divisor $nP$ for sufficiently large $n$, we get a function with a pole only at $P$. So can anyone help point out where I am going wrong?