Symmetry in mechanics