This applies to any local symmetry derivation Q satisfying QS ≈ 0, and also to more general local functional differentiable actions, including ones where the Lagrangian depends on higher derivatives of the fields. Let ε be any arbitrary smooth function of the spacetime (or time) manifold such that the closure of its support is disjoint from the boundary. ε is a test function. Then, because of the variational principle (which does not apply to the boundary, by the way), the derivation distribution q generated by q [ ε ][Φ(x)] = ε (x) Q [Φ(x)] satisfies q [ ε ][ S ] ≈ 0 for every ε, or more compactly, q (x)[ S ] ≈ 0 for all x not on the boundary (but remember that q (x) is a shorthand for a derivation distribution, not a derivation parametrized by x in general). This is the generalization of Noether's theorem.