Write down the Hamiltonian function and Hamilton's canonical equations for a simple pendulum.