How does the constancy of a distribution function over an energy surface directly follow from the ergodic hypothesis? In the book of Intro. statistical physics by Huang, at page 65 it is given that

Ergodic Hypothesis:
Given a sufficiently long time, the representative point of an isolated system will come arbitrarily close to any given point on the energy surface. [...]


Statistical ensemble is an infinite collection of identical copies of the system, characterized by a distribution function $\rho(p, r, t)$ in $\Gamma$ -space:
$\rho(p, r, r) \mathrm{d} p \mathrm{~d} r=$ Number of systems in $\mathrm{d} p \mathrm{~d} r$ at time $r$
where
$$
\begin{array}{l}
(p, r)=\left(p_{1}, \ldots, p_{N}: r_{1}, \ldots, r_{N}\right) \\
d p d r=d^{3 N} p d^{3 N} r
\end{array}
$$

and page 66,

For an isolated system, $\rho$ is constant over an energy surface, according to the ergodic hypothesis. This condition is knotvn as the assunptlon of equal a priori probability, and defines the microcanonical ensemble:
$$
\rho(H(p, r))=\left\{\begin{array}{ll}
s 1 & \text { if } E<H(p, r)<E+\Delta, \\
0 & \text { othervise }
\end{array}\right.
$$

However, I don't understand how the fact that $\rho$ is constant over an energy surface directly follows from the ergodic hypothesis.
 A: It may be easier to work with an alternative definition of ergodicity. We say that a time evolution is ergodic if and only if the only sets invariant under the dynamics have zero or full measure. It is nontrivial to lay out the details for a rigorous mathematical proof of their equivalence, but it certainly seems plausible at an intuitive level.
Let us denote the surface of constant energy $h$ by $\Gamma^{h}$. Note that we can define an equivalence relation on $\Gamma^{h}$ where $x\sim y$ if trajectories passing by $x$ and $y$ have equal long term distributions on the phase space. Such relation partitions $\Gamma^{h}$ into sets invariant under the dynamics, or 'ergodic components'. Huang's definition implies that one such ergodic component has full measure so any other must have measure zero. Conversely, if we have a single ergodic component with full measure any trajectory in it passes arbitrarily close to every other point eventually.
From this definition, that $\rho$ is constant follows from considering sets of the form:
$$\Gamma^h_s=\{(p,q)\in \Gamma^h \  | \ \rho(p,q)\geq s\}$$
These are invariant essentially by Liouville's theorem combined with the fact that $\rho$ has no explicit time dependence (at equilibrium). Therefore, the measure of  $\Gamma_s^h$ will jump from zero to full for some $s^*$ as we let $s\downarrow 0$. In other words, $\rho=s^*$ almost surely.
