Solution (source code)

= Solution

A <symplectic vector field> satisfies $\mathcal L_X\omega=0$, so its local flow consists of <symplectomorphisms>. By <Cartan's magic formula> and $d\omega=0$, this is equivalent to the <differential one-form> $\iota_X\omega$ being closed. In the convention fixed above, a <Hamiltonian vector field> satisfies $\iota_X\omega=dH$ for a globally defined smooth function $H$. It is therefore a <symplectic vector field>, but the converse requires this closed one-form to be exact.

On the <torus> with $\omega=dx\wedge dy$,
$$
\iota_{\partial_x}\omega=dy,\qquad d(dy)=0.
$$
Thus $\partial_x$ is a <symplectic vector field>. The closed <differential one-form> $dy$ is not exact on the <torus>: its integral on the loop $\gamma(s)=[(0,s)]$, $0\leq s\leq1$, equals one, while the integral of an exact one-form around any closed loop is zero. \b[The vector field is symplectic but not Hamiltonian.] The local candidate $H=y$ does not descend to a single-valued function on $\mathbb R^2/\mathbb Z^2$.