We introduce the notion of a flat extension of a connection $\theta$ on a principal bundle. Roughly speaking, $\theta$ admits a flat extension if it arises as the pull-back of a component of a Maurer-Cartan form. For trivial bundles over closed oriented $3$-manifolds, we relate the existence of certain flat extensions to the vanishing of the Chern-Simons invariant associated with $\theta$. As an application, we recover the obstruction of Chern-Simons for the existence of a conformal immersion of a Riemannian $3$-manifold into Euclidean $4$-space. In addition, we obtain corresponding statements for a Lorentzian $3$-manifold, as well as a global obstruction for the existence of an equiaffine immersion into $\mathbb{ R}^4$ of a $3$-manifold that is equipped with a torsion-free connection preserving a volume form.
Categories: math.DG math-ph math.GT math.MP