Symmetries, Lie-group and Lie-algebra methods Hamiltonian and Lagrangian mechanics mathematics