Some elements of the function field of the Fermat curve For $n>0$, consider the Fermat curve:
$$C(n): \{X^n+Y^n=Z^n\}\subset\mathbb P^2(\mathbb C)$$
the function field of $\mathbb C(n)$ can be explicitly described in the following way. It is the set of all fractions $\frac{f}{g}$ satisfying the following conditions:


*

*$f,g\in\mathbb C[X,Y,Z]$ are homogeneous polynomials of the same degree.

*The polynomial $X^n+Y^n-Z^n$ doesn't divide $g$.

*Two elements $\frac{f_1}{g_1}$ and $\frac{f_2}{g_2}$ are equivalent if $\frac{f_1g_2-f_2g_1}{g_1g_2}$ is the zero function on the open set $D(g_1g_2)$. 


Let's denote with $K$ the function field of $C(n)$, then $\phi\in K$ defines a morphism $\Phi\colon C(n)\to\mathbb P^1$ in the following way:
where $\phi$ is well defined and away from the $n$ points at infinity of $C(n)$, we have:
$$\Phi(\alpha:\beta:1):=(\phi(\alpha:\beta:1):1)$$
the other points are sent to $\infty$.

During a lecture my professor said, without any explanation, that:

If $\phi=\frac{f}{g}\in\mathbb Q(x)\cap K$, then: 
  $$ \phi(\alpha:\beta:1)=\sum_{j=0}^{n-1}\frac{f_j(\alpha)}{g_j(\alpha)}\beta^j$$
  for $f_j,g_j\in \mathbb Z[x]$ and with $g_j\neq 0$. Note that the $n$ in the summation is the same $n$ of $C(n)$.

Could you please explain how to get the above description for the elements of the function field with rational coefficients?
edit: See the comments for a better interpretation of the map $\Phi$.
Many thanks in advance.

Let's say you want to write 
$$ (*) \qquad \frac{f(\alpha,\beta,1)}{g(\alpha,\beta,1)} = \sum_{j=0}^{n-1}\frac{p_j(\alpha)}{q_j(\alpha)}\beta^j,$$ 
for all points $(\alpha:\beta:1)\in C(n)$. Clearing denominators, we can suppose that $f$ and $g$ have integer coefficients. Since $\beta^n = 1-\alpha^n$, we can write
$$ f(\alpha,\beta,1) = \sum_{i= 0}^{n-1} f_i(\alpha)\beta^i$$
and
$$\beta^j g(\alpha,\beta,1) = \sum_{i= 0}^{n-1} g_{ij}(\alpha)\beta^i,\quad \forall j = 1,\ldots,n-1$$ with $f_i,g_{ij}\in \Bbb Z[x]$ for $i,j=1,\ldots,n-1$. We can rewrite equation $(*)$ as
$$\sum_{i= 0}^{n-1} f_i(\alpha)\beta^i = \sum_{i = 0}^{n-1} \bigg( \sum_{j=0}^{n-1}g_{ij}(\alpha) \frac{p_j(\alpha)}{q_j(\alpha)} \bigg) \beta^i.$$
Regarding both sides as polynomials in $\beta$, the equation is satisfied iff the coefficients are equal. Thus, we need to find $p_j$, $q_j$ such that
$$f_i(\alpha) = \sum_{j=0}^{n-1}g_{ij}(\alpha) \frac{p_j(\alpha)}{q_j(\alpha)} ,\quad \forall i = 1,\ldots,n-1.$$
You can see this as a linear system $Ax = b$ with matrix $A = \big(g_{ij}(\alpha)\big)$. The $j$th coordinate of the vector $x$ is $p_j(\alpha)/q_j(\alpha)$ and the $i$th coordinate of $b$ is $f_i(\alpha)$. If you now express $A^{-1}$ in terms of its adjugate matrix (see Wikipedia), you get a unique expression for $p_j$ and $q_j$ (with integer coefficients).  
