  We study algebraic dynamical systems (and, more generally,
$\sigma$-varieties) $\Phi:{\mathbb A}^n_{\mathbb C} \to {\mathbb A}^n_{\mathbb
C}$ given by coordinatewise univariate polynomials by refining a theorem of
Ritt. More precisely, we find a nearly canonical way to write a polynomial as a
composition of "clusters". Our main result is an explicit description of the
(weakly) skew-invariant varieties. As a special case, we show that if $f(x) \in
{\mathbb C}[x]$ is a polynomial of degree at least two which is not conjugate
to a monomial, Chebyshev polynomial or a negative Chebyshev polynomial, and $X
\subseteq {\mathbb A}^2_{\mathbb C}$ is an irreducible curve which is invariant
under the action of $(x,y) \mapsto (f(x),f(y))$ and projects dominantly in both
directions, then $X$ must be the graph of a polynomial which commutes with $f$
under composition. As consequences, we deduce a variant of a conjecture of
Zhang on the existence of rational points with Zariski dense forward orbits and
a strong form of the dynamical Manin-Mumford conjecture for liftings of the
Frobenius.
  We also show that in models of ACFA$_0$, a disintegrated set defined by
$\sigma(x) = f(x)$ for a polynomial $f$ has Morley rank one and is usually
strongly minimal, that model theoretic algebraic closure is a locally finite
closure operator on the nonalgebraic points of this set unless the
skew-conjugacy class of $f$ is defined over a fixed field of a power of
$\sigma$, and that nonorthogonality between two such sets is definable in
families if the skew-conjugacy class of $f$ is defined over a fixed field of a
power of $\sigma$.
