Symmetry, Stability, Geometric Phases, and MechanicalIntegrators