Finding holomorphic map on Riemann surface from a map between two Riemann surfaces I have a non-constant degree two map between Riemann surfaces $R$ and $S$, $f: R \to S$. I'm trying to find a holomorphic homeomorphism $\tau: R \to R$ such that $f(\tau) = f$ and $\tau^2$ is the identity. 
I think I can define the correct map but I'm struggling to show it is a homeomorphism and holomorphic. Here is what I have so far:


*

*$f$ is degree 2 so from the degree formula this means that any point $s \in S$ can have at most 2 pre-images.

*I think we should say given $r \in R$, $\tau$ should send $r$ to it's pre-image friend $r'$ (where $f(r) = f(r')$) and if $r$ is a ramification point then $\tau$ should do nothing. This would certainly satisfy the properties required of $\tau$ and it's defined on the whole of $R$.

*To show this $\tau$ is holomorphic I understand we need to show it is holomorphic as a map in local coordinates. So we pick a neighbourhood $U$ small enough of $r$ so that $f$ can be written in local form in $U$. I was thinking of somehow using $f$ to help us define a local coordinate in which $\tau$ is holomorphic and homeomorphic but I'm struggling to get anywhere with this.


Thanks for any help
 A: By construction, $\tau$ is its own inverse, so when we've shown that $\tau$ is holomorphic, it follows that $\tau$ is a homeomorphism.
Consider a point $r\in R$ such that $f^{-1}(f(r)) = \{ r, r'\}$ has two elements. Using charts around $r,r'$ and $f(r)$, we find that there are open neighbourhoods $U,V$ of $r$ and $f(r)$ respectively, such that $f\lvert_U \colon U \to V$ is biholomorphic, and there are neighbourhoods $U', V'$ of $r'$ resp. $f(r') = f(r)$ such that $f\lvert_{U'}\colon U' \to V'$ is biholomorphic. By restricting the neighbourhoods, we can assume that $V' = V$. Then on $U$ we have
$$\tau\lvert_U = (f\lvert_{U'})^{-1}\circ (f\lvert_U),$$
which shows that $\tau$ is holomorphic on $U$ (and a local biholomorphism).
It remains to consider ramification points. If $r$ is a ramification point, there are local charts around $r$ and $f(r)$ in which $f$ corresponds to $z \mapsto z^2$. It follows that on such a chart around $r$, $\tau$ corresponds to $z \mapsto -z$, which again is holomorphic.
