Since is a conserved quantity, the Hamiltonian energy balance gives . Since is a conserved quantity, . Take an explicit partial derivative with respect to time, holding the phase space coordinates fixed:
The last Poisson bracket vanishes because . Thus
This is the time derivative of a conserved quantity for an autonomous Hamiltonian. The conservation hypotheses are understood to hold for every trajectory, as identities on phase space.