main theorem of invariant theory