Vector fields on spheres and Euler classes
Motivated by the hairy ball theorem, we develop the theory of sphere bundles in homotopy type theory. We begin with a definition of the Euler class of an oriented sphere bundle by making use of a non-standard but convenient model of $\operatorname{K}(\mathbb{Z},n)$ as the type of types with a $\operatorname{K}(\mathbb{Z},n-1)$-orientation. We then give a new approach to proving the Thom isomorphism for oriented sphere bundles that proceeds without a Thom class, deducing its existence as a consequence. The heart of the paper is a construction of "orthogonal complements" to points inside certain join powers thought of as affine spaces. This abstract construction specializes to giving the tangent sphere bundles of spheres, real projective spaces, and complex projective spaces. We then prove the hairy ball theorem, saying that the tangent sphere bundle of an even-dimensional sphere has no section, and also construct sections for odd-dimensional spheres. We end with a computation of the Euler classes of these tangent bundles, reproducing the well-known classical result and giving another proof of the hairy ball theorem.