Let ( M , L ) be a mechanical system with the configuration space M and the smooth Lagrangian L . Select a standard coordinate system ( q , q ˙ ˙ ) on M . The quantities p i ( q , q ˙ ˙ , t ) = def ∂ ∂ L / ∂ ∂ q ˙ ˙ i are called momenta. (Also generalized momenta, conjugate momenta, and canonical momenta). For a time instant t , the Legendre transformation of L is defined as the map ( q , q ˙ ˙ ) → → ( p , q ) which is assumed to have a smooth inverse ( p , q ) → → ( q , q ˙ ˙ ) . For a system with n degrees of freedom, the Lagrangian mechanics defines the energy function E L ( q , q ˙ ˙ , t ) = def ∑ ∑ i = 1 n q ˙ ˙ i ∂ ∂ L ∂ ∂ q ˙ ˙ i − − L .