Is there a Hamiltonian $H:\mathbb{R}^{2n} \to \mathbb{R}$ with the following property:


For two regular values $a<b$ for which $[a,b]$ consists of regular values, the dynamics of $X\_H$ on $H^{-1}(a)$ is not topological equivalent to the dynamic of $X\_H$ on $H^{-1}(b)$?


Here $X\_H$ is the hamiltonian vector field associated to the Hamiltonian $H$.


The motivation for this question is the following post. The answer to the following post would be negative if the answer to the above question is negative:


[An algebraic Hamiltonian vector field with a finite number of periodic orbits (2)](https://mathoverflow.net/questions/210996/an-algebraic-hamiltonian-vector-field-with-a-finite-number-of-periodic-orbits-2)



Dynamical analogue of Morse theory
This is again with the caveat that I have not done the calculations. Let $a>1$ be an irrational number. Let $H:\mathbb{R}^4\rightarrow \mathbb R$ be a function such that


$
H(x,y,z,w)=(x^2+y^2+z^2+w^2)
$


when $x^2+y^2+z^2+w^2=1$ and


$
H(x,y,z,w)=x^2+y^2+z^2+aw^2
$


when $x^2+y^2+z^2+aw^2=2$. You can convince yourself that it is possible to find such a function without critical points in the region


$$
1\leq x^2+y^2+z^2+w^2\qquad \text{and}\qquad x^2+y^2+z^2+aw^2\leq 2
$$


(i.e. by interpolating the values in the region in between radially)


At the level set $H^{-1}(1)$ all orbits are closed because these are two uncoupled harmonic oscillators with the same period. At the level $H^{-1}(2)$ the motion is also described by two harmonic oscillators, but now with periods that are irrational with respect to each other. The only periodic orbits are those where one of the oscillators is not in motion. So there are two of them.


