Solution (source code)

= Solution

A <Lie point symmetry> is a local one-parameter family of <diffeomorphisms> of $(t,\mathbf x)$ that takes solution graphs of the <differential equation> to solution graphs wherever the transformed graph remains a graph over time. Its infinitesimal generator is $Y=\tau(t,\mathbf x)\partial_t+\sum_i\eta_i(t,\mathbf x)\partial_{x_i}$. Its <first prolongation> is
$$
\operatorname{pr}^{(1)}Y=Y+\sum_i\bigl(D_t\eta_i-\dot x_iD_t\tau\bigr)\partial_{\dot x_i},
\qquad D_t=\partial_t+\sum_i\dot x_i\partial_{x_i}.
$$
For a regular first-order equation the infinitesimal criterion is $\operatorname{pr}^{(1)}Y(\Delta)=0$ on $\Delta=0$; it says that the prolonged <vector field> is tangent to the equation submanifold.

With the constant nondegenerate canonical <matrix> $J$, define the <Poisson bracket> by $\{f,g\}=(\nabla f)^TJ\nabla g$ and the <Hamiltonian vector field> by $V_f=J\nabla f$. Our convention gives $V_f[h]=\{h,f\}$. Applying the <Jacobi identity> to a test <function> $h$,
$$
[V_f,V_g]h=\{\{h,g\},f\}-\{\{h,f\},g\}
=-\{h,\{f,g\}\},
$$
so
$$
\boxed{[V_f,V_g]=-V_{\{f,g\}}}.
$$
A <first integral> $F$ obeys $dF/dt=\{F,H\}=0$. Consequently $[V_F,V_H]=0$, and the local flows commute. The time-independent transformation generated by $V_F$, with $t$ unchanged, therefore maps <integral curves of a vector field> for $V_H$ to <integral curves of a vector field>: it is a <Lie point symmetry>.

Conversely, such a time-independent symmetry gives $[V_F,V_H]=0$, hence $V_{\{F,H\}}=0$. Nondegeneracy of $J$ makes $\{F,H\}$ constant on each connected component. At a <fixed point> $\mathbf x_0$, $J\nabla H(\mathbf x_0)=0$ implies $\nabla H(\mathbf x_0)=0$, so that constant is zero on its component. Thus \b[the converse holds on a connected phase space containing a <fixed point>], or on each component that contains one.

The printed global converse needs this connectedness convention: a <fixed point> on one component does not control the constants on other components. For example take one component with $H=(q^2+p^2)/2$, $F=0$, and another with $H=p$, $F=q$. The <Hamiltonian vector fields> commute everywhere and there is a <fixed point> on the first component, but $F$ is not a <first integral> on the second. Even on a connected space the fixed-point condition matters: $H=p$, $F=q$ commute but $\dot F=1$.