Dynamical systems and the theory of $C^*$-algebras Ergodic theory mathematics