  We extend the second Noether theorem to optimal control problems which are
invariant under symmetries depending upon k arbitrary functions of the
independent variable and their derivatives up to some order m. As far as we
consider a semi-invariance notion, and the transformation group may also depend
on the control variables, the result is new even in the classical context of
the calculus of variations.
