G-invariant polynomial extensions of Lie algebras in quantum many-body physics