INVARIANT VARIATIONAL PROBLEMS AND COHOMOLOGY