Solution (source code)

= Solution

A <constant of motion> has zero <total derivative> on every solution, and may explicitly depend on time. For an infinitesimal transformation $\delta q_i=\epsilon\xi_i$ with $\delta L=\epsilon dF/dt$, the on-shell <first variation> is $\delta L=\epsilon d(\sum_i p_i\xi_i)/dt$. Therefore $\boxed{I=\sum_i p_i\xi_i-F}$ is conserved. Including a time shift $\delta t=\epsilon\tau$ gives the corresponding $I=\sum_i p_i\xi_i-H\tau-F$. This proves <Noether's theorem> in its usual point-transformation form. A <symmetry> of the action up to a <boundary term> is sufficient; exact invariance of the displayed <Lagrangian> is stronger than necessary. Discrete transformations by themselves do not give this continuous-charge construction.