Consider a dynamical system given by the system of ODE.
$$\frac{d x_i}{d t} = F_i(\mathbf{x}).$$
It seems to be a well-known fact that this system is ergodic if and only if the kernel of the Koopman operator $A_k,$ where
$$A_k(u) = \sum F_i \frac{\partial u}{\partial x_i}$$
consists of constants only
Lasota, Andrzej; Mackey, Michael C., Chaos, fractals, and noise: Stochastic aspects of dynamics., Applied Mathematical Sciences. 97. New York, NY: Springer-Verlag. xiv, 472 p. (1994). ZBL0784.58005., Chapter 7.
Now, the PDE above can be solved using the method of characteristics, and the characteristic curves are (surprise) just the trajectories of the system we started with. The condition is simply that $u$ be constant along the trajectories.
So is it true that a system is ergodic if (and only if) a function constant along trajectories is globally constant?