Abstract
Using the theory of plugs and the self-insertion construction due to the second author, we prove that a foliation of any codimension of any manifold can be modified in a real analytic or piecewise-linear fashion so that all minimal sets have codimension $1$. In particular, the $3$-sphere $S^3$ has a real analytic dynamical system such that all limit sets are $2$-dimensional. We also prove that a $1$-dimensional foliation of a manifold of dimension at least $3$ can be modified in a piecewise-linear fashion so that there are no closed leaves but all minimal sets are $1$-dimensional. These theorems provide new counterexamples to the Seifert conjecture, which asserts that every dynamical system on $S^3$ with no singular points has a periodic trajectory.