Can the fundamental group detect all ways to not have a section?

Every functor $F$ preserves sections (or equivalently, preserves split monomorphisms, or equivalently, preserves split epimorphisms), and so every functor $F$ whatsoever is an obstruction to a map having a section: this means $\pi_1$ but also the higher $\pi_n$ and the homologies $H_n$ and the cohomology ring, but also even non-homotopy invariants. It's easy for the $\pi_1$ obstruction to vanish by taking all the spaces involved to be simply connected and then other obstructions can be used, as with Ted Shifrin's example.

Abstractly, the "maximal" functor $F$ obstructing the existence of a section, for an arbitrary category $C$, is the Yoneda embedding $Y : C \to [C^{op}, \text{Set}]$, and in fact you can show:

Exercise: A map $f : x \to y$ has a section iff the induced map $Y(f) : Y(x) \to Y(y)$ under the Yoneda embedding is an epimorphism (meaning that it is pointwise surjective as a map of presheaves).

I wrote a blog post Topological Diophantine equations in which I explored the analogy between finding sections of a map of topological spaces and finding solutions to systems of polynomial Diophantine equations (the point being that finding an integer solution to a system of integer polynomials $\{ f_i \}$ is equivalent to finding a section of the structure map $\text{Spec } \mathbb{Z}[\{x_i\}]/(\{f_i\}) \to \text{Spec } \mathbb{Z}$). In that post I give the example of the map

$$f : [0, 1] \sqcup [1, 2] \to [0, 2]$$

(the obvious inclusions all around), which admits no section but is such that the induced map on homotopy types does (so no homotopy invariant detects this). There is a point-set obstruction: there is no section of $f$ on any open neighborhood of $1 \in [0, 2]$, and so the stalk of the sheaf of sections vanishes there. This is loosely analogous to a Diophantine equation not having a solution over $\mathbb{Q}_p$ despite having one over $\mathbb{F}_p$; $\text{Spec } \mathbb{Q}_p$ is the "open punctured infinitesimal neighborhood" of $\text{Spec } \mathbb{F}_p$ sitting inside $\text{Spec } \mathbb{Z}$.

To prevent point-set funny business you want to restrict your attention to a suitable class of fibrations (e.g. to fiber bundles - the classic example $\mathbb{R} \to S^1$ is a covering map, so a fiber bundle with discrete fiber), which if chosen correctly should have the property that they admit sections iff they admit a section up to homotopy (equivalently, iff the induced map on homotopy types admits a section). As a special case, this is true for covering maps, and in fact $\pi_1$ detects all obstructions to the existence of a section for covering maps, although in a sort of degenerate way: a path-connected cover of a path-connected space has a section iff it's the trivial cover $X \to X$ iff the induced map on $\pi_1$ is an isomorphism.

Many important questions can be phrased as the question of whether a fiber bundle admits a section, for example the question of whether a smooth manifold admits $k$ linearly independent nowhere vanishing vector fields (the answer is famously known exactly for spheres), or the question of whether a smooth manifold admits an almost complex structure.


Do your same construction with $D^2\to S^2$ (identifying the boundary circle to a point). $\pi_1$ is too feeble to work here, but $\pi_2$ or $H_2$ will do.