While reading about hyperelliptic Riemann surfaces from Farkas and Kra, I came across this line:
Let $M$ be a hyperelliptic Riemann surface of genus $\geq 2 $. Choose a function $z$ of degree 2 on $M$ ... Let the polar divisor of $z$ be $P_1 Q_1$.
After this they've stated that $\{1,z\}$ forms a basis for $L[P_1^{-1} Q_1^{-1}]$ (the space of meromorphic functions which are multiples of $P_1^{-1} Q_1^{-1}$).
I don't understand why this must be true. Can't there be meromorphic functions with poles at $P_1$ and $Q_1$ but zeroes at places other than the zeroes of $z$? Also , the Riemann-Roch theorem says that
$$\dim(L[P_1^{-1} Q_1^{-1}])=2-g+1+i[P_1Q_1].$$ So, there is no guarantee that the space in question will have dimension $2$ .
Can someone please help clear my doubts? Thanks in advance.