Modular Reduction of Systems of Polynomial Equations and Algebraic Dynamical Systems