Legendre transformation
The Hamiltonian, as the Legendre transformation of the Lagrangian, is therefore: