What is the relationship between these two definitions of generating functions? I'm doing my bachelor's thesis on Integrable Hamiltonian Systems, and one important part of the thesis will be proving the Liouville theorem. For this theorem I'm using the book by Arnold "Mathematical Methods of Classical Mechanics", but up to this point I've used the book by Ana Cannas "Lectures on symplectic geometry". The problem is: in the book by Ana Cannas, the equations that describe the symplectomorphism $\varphi: T^*X:=M=(x,p)\rightarrow T^*Y:=N=(y,q)$ that a generating function $f$ generates are the following (lecture 4).
\begin{align*}
    p_i= &\frac{\partial f}{\partial x_i}(x,y) \\
    q_i=-&\frac{\partial f}{\partial y_i}(x,y)  
\end{align*}
We have to solve this system of equations for the coordinates $y_i$ and $q_i$.
But according to Arnold's book (page 284, section 50 C), the equations that describe the symplectomorphism would be (using the aforementioned notation, not the one that Arnold uses)
\begin{align*}
  x_i=&\frac{\partial f}{\partial p_i} \\
  q_i=&\frac{\partial f}{\partial y_i}
\end{align*}
In the book by Ana Cannas, the generating function is defined as a function $f \in C^\infty(X\times Y)$ and that generates a closed form $df$, whose image is a lagrangian submanifold of $T^*(X\times Y)$ then we make the 'twist' of the submanifold, which must be a graph of a symplectomorphism... . If anyone can help me to understand how this relates to the view that Arnold has on generating functions it would be of great help, since I need this to understand the construction of action-angle variables.
Thanks in advance for the answers.
 A: It's a matter of what variables you use to locally parametrise the Lagrangian surface in $T^*(X\times Y)$. The general idea is this: suppose you have a symplectomorphism $\psi:T^*X\to T^*Y$, meaning $\psi^*\omega_Y = \omega_X$. One can interpret this condition geometrically by considering $T^*(X\times Y)$ with the symplectic form $\omega := \omega_X-\omega_Y$. Then the symplectic condition can be written
$$
(\mathrm{id}_{T^*X}\times\psi)^*\omega = 0,
$$
or alternatively, that the image of $\mathrm{id}_{T^*X}\times \psi:T^*X\to T^*(X\times Y)$ forms a Lagrangian surface. Let's call this surface $L$, and let $i_L:L\to T^*(X\times Y)$ denote the inclusion map. So
$$
i_L^*\omega =0,
$$
i.e. $\omega = \omega_X-\omega_Y$ restricted to $L$ vanishes.
Now $\omega_X = -d\Theta_X$, where $\Theta_X$ is the canonical 1-form in $T^*X$ (given in coordinates by $\sum_ip_idx^i$), and similarly for $\omega_Y$. Then using the fact that pullbacks commute with $d$, we have that
$$
d(i_L^*(\Theta_X-\Theta_Y)) = 0.
$$
If we just consider this equation in a simply connected subset of $L$ (where closed forms are exact), it implies that
$$
i_L^*(\Theta_X-\Theta_Y) = df \qquad (\ast)
$$
for some function $f:L\to \mathbb{R}$ (actually, the domain is in general a subset of $L$, i.e. $f$ is only locally defined).
As we originally defined it, $L$ is a graph of $\psi:T^*X\to T^*Y$, and so can be parametrised by the coordinates $(x,p)$ of $T^*X$. But it may be possible to locally parametrise it by other pairs of coordinates, depending on how it lies within $T^*(X\times Y)$. Suppose we can parametrise it locally by coordinates $(x,y)$. Then $(\ast)$ becomes
$$
\sum_i(p_idx^i-q_idy^i) = df = \sum_i\left(\frac{\partial f}{\partial x^i}dx^i + \frac{\partial f}{\partial y^i}dy^i\right),
$$
implying the symplectomorphism $\psi$ is determined by
$$
p_i = \frac{\partial f}{\partial x^i}, \quad q_i = -\frac{\partial f}{\partial y^i}.
$$
This gives the coordinates $p_i, q_i$ as functions of $x^i, y^i$. These are Ana Cannas' equations.
Suppose instead we locally parametrise $L$ by coordinates $(p,y)$. Then $(\ast)$ gives
$$
\sum_i(-x^idp_i-q_idy^i) = d(f-\sum_i x^ip_i). 
$$
If we define $g := -f+\sum_ix^ip_i$, then this equation will give
$$
x^i = \frac{\partial g}{\partial p_i}, \qquad q_i = \frac{\partial g}{\partial y^i}.
$$
This gives the coordinates $x^i, q_i$ as functions of $p_i, y^i$. These are Arnold's equations.
