Preserving one Hamiltonian flow does not imply canonicality (source code)

= Preserving one Hamiltonian flow does not imply canonicality

A <canonical transformation> preserves the <symplectic form>, equivalently the canonical <Poisson brackets>, and therefore the Hamiltonian form of every Hamiltonian system. Preservation of just one selected flow is weaker. For $H=(q_1^2+p_1^2)/2$ on two coordinate pairs, $Q_1=q_1$, $P_1=p_1$, $Q_2=2q_2$, $P_2=p_2$ preserves both that physical Hamiltonian and its equations, but $\{Q_2,P_2\}=2$. Thus it is not canonical. Universally preserving Hamiltonian form instead forces $DF\,J(DF)^T=J$ by applying the <chain rule> to arbitrary Hamiltonian gradients.