Statistical mechanics and the theory of dynamical systems