I'm trying to learn the basics of KAM theory and I wanted to first get to grips with Liouville integrability for Hamiltonian systems but I'm getting rather confused by the notation which seems to be universally assumed.
Suppose we have a time independent Hamiltonian system in a $2n$ dimensional phase space, we can express the system in terms of generalised coordinates and momenta ${\bf{x}} = ({\bf{p}}, {\bf{q}})$, then the equations read
$$\dot{{\bf{x}}} = J\nabla H= \{{\bf{x}}, H \}$$
With $J$ the $2n \times 2n$ symplectic matrix $\left( \begin{array} { c c } { 0 } & { I_n } \\ { -I_n } & { 0 } \end{array} \right)$ and Poisson bracket $\{F,H\} := \nabla F^T J \nabla H$
The system is integrable in the Liouville sense if there exists $n-1$ additional ($H$ taken as the first one) constants of motion, functions $f_i({\bf{p}}, {\bf{q}})$ such that for all $i,j = 1,\ldots n$ we have $\{f_i,f_j\} = 0$ and the gradients $\nabla f_i$ are linearly independent almost everywhere. If this is satisfied we can define so called action-angle variables $(I,\theta)$ such that under this coordinate system the Hamiltonian is a function of $I$ alone, so the equations become
$$\displaystyle \dot{\theta}_i = \frac{\partial H}{\partial I_i} = \Omega_i(I) \hspace{10mm} \dot{I_i} = \frac{\partial H}{\partial \theta_i} = 0 $$
My confusion begins here, the formula given by pretty much every source I find is just stated as:
$$I_i = \frac{1}{2\pi}\oint p_idq_i \hspace{10mm}\theta_i = \frac{\partial}{\partial I_i} \int p_i dq_i $$
What does this mean and can anyone provide a concrete example of doing this line integral? When I see a line integral it is usually in the form $\displaystyle \oint_\Gamma {\bf{F}} \cdot d{\bf{r}}$, where ${\bf{F}} = {\bf{F}}({\bf{x}})$ is a vector field and we integrate along a curve $\Gamma$ which we can parametrise. I don't think this is a scalar line integral either since this worked example on page 12 claims to use Stoke's theorem.
This post on physics stack exchange was somewhat helpful for understanding $p_i$ is really meant by the equation obtained by rearranging on a level set of $H$, but I am not sure really whats going on with the path being integrated along, or what you do for the angle variable, since $p$ is just a coordinate and can only be identified as a function of $q$ through $H$, how do you differentitate with respect to $I_i$?.
Furthermore, at what point do we use all the Poisson-commuting constants of motion that we had to have to establish integrability in the first place, they do not seem to appear in this formula?