The Hamiltonian for particle on a ring is claimed to be (Eq. 9.1 of Altland2010a Condensed Matter Field Theory, pp. 498): \begin{equation} H = \frac{1}{2}(-i\partial_\phi -A)^2 = \frac{1}{2}(p-A)^2.\tag{9.1} \end{equation}
The book claims that \begin{equation} L = \frac{1}{2}\dot{\phi}^2 - iA \dot{\phi}\tag{9.4} \end{equation} I am quite confused, especially about the appearance of $\dot{\phi}$. Can any explain a bit?
What I tried:
Since the inverse of a Legendre transformation is Legendre transformation itself, \begin{align} \text{Denote }x &\equiv \frac{\partial H}{\partial p} = p-A,\text{ so,} \\ p &= x + A,\quad H = \frac{1}{2}x^2 ,\text{ so,}\\ L = x p - H &= x(x+A) - \frac{1}{2}x^2 = \frac{1}{2}x^2 + x A \end{align} So my calculation found that the Lagrangian of above Hamiltonian is: \begin{equation} L = \frac{1}{2}x^2 + x A \end{equation} where \begin{equation} x = \frac{\partial H}{\partial p} \end{equation}