Let $Y$ be the Riemann surface defined by the equation $y^d=h(x)$ and $\pi: Y \to \mathbb{C}_\infty$ be the projection map sending $(x,y)$ to $x$. Let $\sigma: Y \to Y$ be the automorphism defined by $(x,y) \mapsto (x,\zeta y)$, where $\zeta$ is a primitive $d^{th}$ rooth of the unity. Let $\mathcal{M}_i$ be the space of those meromorphic functions $f$ on $Y$ such that $f \circ \sigma=\zeta^i f$.
It is easy to prove that the maps $x$ and $y$ (respectively the projections onto the two coordinates) belong to $\mathcal{M}_0$ and $\mathcal{M}_1$. Furthermore, every function $f \in \mathcal{M}_0$ is of the form $r \circ \pi$, where $r$ is a meromorphic function on the Riemann sphere. In fact, we may define $r(x_0):=f(x_0,y_1(x_0))$, where $(x_0,y_1(x_0))$ is one point of the preimage of $\pi^{-1}(x_0)$. Clearly, the invariance of $f$ with respect to the composition with $\sigma$ ensures that the map $r$ is well defined.
Now, how can I prove that every function $f \in \mathcal{M}_i$ is of the form $y^i r \circ \pi$, for some $r$ meromorphic on the Riemann sphere? I tried to define $r$ as before, but the map is not well defined since a change of preimage involves a change in the function $f$.
Finally, how can I deduce that every meromorphic function $f$ on $Y$ is given in a unique way as the sum $\sum\limits_{i=0}^{d-1} f_i$, where $f_i \in \mathcal{M}_i$ for any $i=0,\dots,d-1$?