%% Differential Topology in Higher Categories: Mapping objects, derived intersections, spaces of choices, and cobordism
%% Higher Categorical Semantics. Byline: Anonymous.
%% Single-file LaTeX source (UTF-8), version 1.0, 16 November 2026.
%% Build: pdflatex (three passes). Packages: mathpazo, amsmath, amsthm, tikz, tikz-cd, cleveref, hyperref, longtable.
%% Companion script: verify-differential-topology.py (71 computational checks, Python standard library only).
%% Drafted and typeset with AI assistance (Anthropic's Claude) under the direction of the submitting author.
\documentclass[11pt,openany]{book}
%% ---- begin preamble.tex ----
% ---------- fonts and page ----------
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[sc,osf]{mathpazo}
\linespread{1.05}
\usepackage[scaled=0.9]{helvet}
\usepackage[paperwidth=7in,paperheight=10in,inner=0.95in,outer=0.85in,top=0.95in,bottom=1.0in,headsep=14pt]{geometry}
\usepackage{amsmath,amssymb,amsthm,mathtools,stmaryrd}
\usepackage{microtype}
\usepackage{xcolor}
\definecolor{accent}{HTML}{7A1F2B}
\definecolor{ink2}{HTML}{4A5560}
\definecolor{fwd}{HTML}{1F4E79}
\definecolor{bwd}{HTML}{A8432C}
\usepackage{tikz,tikz-cd}
\usetikzlibrary{arrows.meta,positioning,calc,decorations.markings,shapes.geometric,backgrounds,fit}
\usepackage{booktabs,array,tabularx,longtable}
\usepackage{enumitem}
\setlist{itemsep=2pt,topsep=4pt}
\usepackage{titlesec}
\usepackage{fancyhdr}
\usepackage[font=small,labelfont={bf,sf},margin=1.5em]{caption}
\usepackage[colorlinks=true,linkcolor=accent,citecolor=accent,urlcolor=accent,
  pdftitle={Differential Topology in Higher Categories},
  pdfsubject={Differential topology in higher categorical semantics},
  pdfkeywords={differential topology, transversality, derived manifolds, smooth sets, cobordism, Morse theory, isotopy, mapping spaces}]{hyperref}
\usepackage[nameinlink,capitalise,noabbrev]{cleveref}

% ---------- headings ----------
\titleformat{\chapter}[display]{\normalfont\Large\scshape\color{accent}}{\chaptertitlename\ \thechapter}{4pt}{\normalfont\huge\bfseries\color{black}}
\titlespacing*{\chapter}{0pt}{10pt}{26pt}
\titleformat{\section}{\normalfont\large\bfseries}{\thesection}{0.7em}{}
\titleformat{\subsection}{\normalfont\normalsize\bfseries\itshape}{\thesubsection}{0.7em}{}
\titleformat{\part}[display]{\normalfont\centering\Large\scshape\color{accent}}{\partname\ \thepart}{12pt}{\normalfont\Huge\bfseries\color{black}}
\pagestyle{fancy}\fancyhf{}
\fancyhead[LE]{\small\thepage\quad\textsc{\nouppercase{\leftmark}}}
\fancyhead[RO]{\small\textsc{\nouppercase{\rightmark}}\quad\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\chaptermark}[1]{\markboth{#1}{#1}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ \ #1}}
\fancypagestyle{plain}{\fancyhf{}\fancyfoot[C]{\small\thepage}}
\setlength{\headheight}{14pt}
\setcounter{tocdepth}{1}
\setcounter{secnumdepth}{2}
\raggedbottom
\emergencystretch=2em
\tolerance=1200
\hbadness=2000

% ---------- theorem environments ----------
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[chapter]
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{principle}[theorem]{Principle}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{construction}[theorem]{Construction}
\newtheorem{problem}[theorem]{Open Problem}
\newtheorem{exercise}{Exercise}[chapter]
\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
\crefname{principle}{Principle}{Principles}
\crefname{construction}{Construction}{Constructions}
\crefname{conjecture}{Conjecture}{Conjectures}
\crefname{exercise}{Exercise}{Exercises}
\crefname{problem}{Open Problem}{Open Problems}

% ---------- status tags ----------
\newcommand{\stag}[2]{{\footnotesize\sffamily\upshape\color{#1}[#2]}\enspace\ignorespaces}
\newcommand{\Scl}[1][]{\stag{ink2}{classical\if\relax\detokenize{#1}\relax\else; #1\fi}}
\newcommand{\Sli}[1][]{\stag{fwd}{literature\if\relax\detokenize{#1}\relax\else; #1\fi}}
\newcommand{\Srf}[1][]{\stag{accent}{reformulation\if\relax\detokenize{#1}\relax\else; cf.\ #1\fi}}
\newcommand{\Sob}{\stag{accent}{observation}}
\newcommand{\Spg}{\stag{bwd}{programme}}

% ---------- notation ----------
\newcommand{\cat}[1]{\mathsf{#1}}
\newcommand{\Set}{\cat{Set}}
\newcommand{\FinSet}{\cat{FinSet}}
\newcommand{\Meas}{\cat{Meas}}
\newcommand{\Stoch}{\cat{Stoch}}
\newcommand{\FinStoch}{\cat{FinStoch}}
\newcommand{\BorelStoch}{\cat{BorelStoch}}
\newcommand{\FinProb}{\cat{FinProb}}
\newcommand{\FinStat}{\cat{FinStat}}
\newcommand{\Krn}{\cat{Krn}}
\newcommand{\Hilb}{\cat{Hilb}}
\newcommand{\Ban}{\cat{Ban}}
\newcommand{\Src}{\cat{Src}}
\newcommand{\Chan}{\cat{Chan}}
\newcommand{\Dyn}{\cat{Dyn}}
\newcommand{\Cat}{\cat{Cat}}
\newcommand{\CC}{\mathcal{C}}
\newcommand{\FF}{\mathcal{F}}
\newcommand{\GG}{\mathcal{G}}
\newcommand{\II}{\mathcal{I}}
\newcommand{\Sinf}{\mathcal{S}}
\newcommand{\Qlaw}{\mathcal{Q}}
\newcommand{\Fun}{\mathcal{F}}
\newcommand{\Dist}{\Delta}
\newcommand{\Giry}{\mathcal{G}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Rbar}{\overline{\mathbb{R}}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Fp}{\mathbb{F}_p}
\newcommand{\E}{\mathbb{E}}
\newcommand{\Prob}{\mathbb{P}}
\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator*{\colim}{colim}
\DeclareMathOperator{\Hom}{Hom}
\DeclareMathOperator{\Ext}{Ext}
\DeclareMathOperator{\Fix}{Fix}
\DeclareMathOperator{\supp}{supp}
\DeclareMathOperator{\TV}{TV}
\DeclareMathOperator{\rk}{rk}
\newcommand{\id}{\mathrm{id}}
\newcommand{\op}{\mathrm{op}}
\newcommand{\adj}{\dashv}
\newcommand{\iso}{\cong}
\newcommand{\st}{\mid}
\newcommand{\cpy}{\mathrm{copy}}
\newcommand{\del}{\mathrm{del}}
\newcommand{\KL}[2]{D(#1\,\|\,#2)}
\newcommand{\hb}{h}
\newcommand{\AZ}{A^{\Z}}
\newcommand{\BZ}{B^{\Z}}
\newcommand{\term}[1]{\textbf{\itshape #1}}

% ---------- notation: differential topology ----------
\newcommand{\Mfd}{\cat{Mfd}}
\newcommand{\Cart}{\cat{Cart}}
\newcommand{\SmSet}{\cat{SmSet}}
\newcommand{\Dflg}{\cat{Dflg}}
\newcommand{\CinfRing}{C^\infty\cat{Ring}}
\newcommand{\DMfd}{\cat{DMfd}}
\newcommand{\Spc}{\mathcal{S}}
\newcommand{\Sp}{\cat{Sp}}
\newcommand{\Cob}{\cat{Cob}}
\newcommand{\Bord}{\cat{Bord}}
\newcommand{\Vect}{\cat{Vect}}
\newcommand{\Top}{\cat{Top}}
\newcommand{\Para}{\cat{Para}}
\DeclareMathOperator{\Diff}{Diff}
\DeclareMathOperator{\Emb}{Emb}
\DeclareMathOperator{\Imm}{Imm}
\DeclareMathOperator{\Map}{Map}
\DeclareMathOperator{\Sing}{Sing}
\DeclareMathOperator{\Fr}{Fr}
\DeclareMathOperator{\Th}{Th}
\DeclareMathOperator{\Gr}{Gr}
\DeclareMathOperator{\GL}{GL}
\DeclareMathOperator{\ind}{ind}
\DeclareMathOperator{\codim}{codim}
\DeclareMathOperator{\vdim}{vdim}
\DeclareMathOperator{\tr}{tr}
\DeclareMathOperator{\grad}{grad}
\DeclareMathOperator{\Tub}{Tub}
\DeclareMathOperator{\Conf}{Conf}
\DeclareMathOperator{\diag}{diag}
\DeclareMathOperator{\relu}{ReLU}
\newcommand{\Or}{\mathrm{O}}
\newcommand{\SO}{\mathrm{SO}}
\newcommand{\RP}{\mathbb{RP}}
\newcommand{\CP}{\mathbb{CP}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\trans}{\pitchfork}
\newcommand{\pt}{\mathrm{pt}}
\newcommand{\loss}{\mathcal{L}}

% ---------- tikz styles ----------
\tikzset{
  ogbox/.style={draw, thick, rounded corners=2pt, minimum width=1.25cm, minimum height=1.05cm, fill=black!4},
  fw/.style={-{Stealth[length=5pt]}, thick, fwd},
  bw/.style={-{Stealth[length=5pt]}, thick, bwd, densely dashed},
  dec/.style={circle, fill, inner sep=1.7pt},
  nat/.style={circle, draw, thick, fill=white, inner sep=1.7pt},
  leaf/.style={inner sep=2pt, font=\small},
  lab/.style={font=\small, inner sep=1.5pt},
  infoset/.style={densely dashed, thick, accent},
  st/.style={circle, draw, thick, fill=white, inner sep=1.6pt},
  ty/.style={rectangle, draw, thick, fill=black!8, inner sep=2.6pt},
}
\newcommand{\sol}[1]{\par\medskip\noindent\textbf{#1.}\enspace\ignorespaces}
\newcommand{\bookauthor}{Anonymous}
%% ---- end preamble.tex ----
\begin{document}
\frontmatter
%% ---- begin front.tex ----
\begin{titlepage}
\thispagestyle{empty}
\vspace*{1.1in}
\noindent{\Large\scshape\color{accent} Higher Categorical Semantics}\par
\vspace{0.9in}
\noindent{\fontsize{30}{38}\selectfont\bfseries\raggedright Differential Topology\\ in Higher Categories\par}
\vspace{0.35in}
\noindent{\Large\itshape Mapping objects, derived intersections,\\[2pt] spaces of choices, and cobordism}\par
\vfill
\noindent\begin{tikzpicture}[x=1cm,y=1cm]
  \draw[thick,fwd] (-0.2,0) .. controls (1.2,1.5) and (2.4,-1.5) .. (3.8,0.2);
  \draw[thick,bwd] (-0.2,0.25) -- (3.8,-0.1);
  \node[dec] at (0.07,0.23) {};
  \node[dec] at (1.83,0.07) {};
  \node[dec] at (3.63,-0.08) {};
  \node[lab] at (4.6,0.05) {$=$};
  \node[lab] (P) at (5.6,0.7) {$M\times_N P$};
  \node[lab] (M) at (5.6,-0.7) {$M$};
  \node[lab] (Q) at (7.8,0.7) {$P$};
  \node[lab] (N) at (7.8,-0.7) {$N$};
  \draw[fw,black] (P) -- (M);
  \draw[fw,black] (P) -- (Q);
  \draw[fw,black] (M) -- (N);
  \draw[fw,black] (Q) -- (N);
  \draw[thick] (6.0,0.25) -- (6.25,0.25) -- (6.25,0.45);
\end{tikzpicture}\par
\vspace{0.5in}
\noindent{\large \bookauthor}\par
\vspace{4pt}
\noindent{\small 2026}
\end{titlepage}

\thispagestyle{empty}
\vspace*{\fill}
{\small
\noindent\textbf{About this text.}
This monograph is a higher-categorical treatment of the territory mapped by Morris~W.~Hirsch's
\emph{Differential Topology} (Graduate Texts in Mathematics~33, Springer, 1976): manifolds and maps, function
spaces, transversality, vector bundles and tubular neighbourhoods, degrees and intersection numbers, Morse
theory, cobordism, isotopy, and the classification of surfaces. It is an independent work. It reproduces none
of that book's text or proofs verbatim; it is not affiliated with or endorsed by its publisher.
\Cref{app:concordance} gives a concordance so that the two can be read side by side.

\medskip
\noindent\textbf{Status of results.}
Every numbered statement carries a tag: \textsf{classical} (standard differential topology, attributed),
\textsf{literature} (established in the categorical, homotopical or derived-geometric literature, attributed),
\textsf{reformulation} (a known result restated in a different language, with the restatement proved or
sketched here), \textsf{observation} (an elementary remark we have not found stated in this form), or
\textsf{programme} (a conjecture or a direction, not a result). No cited theorem is claimed as new.

\medskip
\noindent\textbf{Authorship and assistance.}
The text was drafted and typeset with a large language model (Anthropic's Claude) under the direction of
the submitting author, who is responsible for it. Generative AI assisted with drafting, literature recall,
mathematical consistency checks, computation, and typesetting. The numerical examples and a number of finite
structural claims are recomputed by the accompanying script \texttt{verify-differential-topology.py} (\cref{app:computations}).
Proofs and bibliographic details have not been independently refereed; corrections are welcome.

\medskip
\noindent Open access. Rights remain with the author.
}
\clearpage

\tableofcontents

\chapter{Preface}

Hirsch's \emph{Differential Topology} \cite{Hir76} is a book about what can be done to a smooth map by moving it a
little. Its method is uniform across nine chapters. One topologizes the set $C^r(M,N)$ of maps; one shows
that the maps with a desirable property (immersions, embeddings, maps transverse to a submanifold, Morse
functions) form an open and dense, or at least residual, subset; one defines an invariant using a map in
that subset; and one shows that the invariant does not depend on which map was used, because any two such
maps are joined by a path that is itself generic one dimension up. Degree, intersection number, Euler
characteristic, the cobordism class of a preimage, and the diffeomorphism type of a surface are all obtained
in this way.

Each step of that method has a counterpart in the language of higher categories, and the counterparts are
by now theorems in the literature and no longer analogies. The set of maps is the object of global points of
a mapping object in a topos of smooth sets, whose homotopy type is its \emph{shape}; the classification
theorems of the subject (for vector bundles, for immersions, for manifolds up to cobordism) compute such
shapes. Transversality is the condition under which a fibre product of manifolds exists and is correct; the
category of manifolds has a universal completion in which every fibre product is correct, the
$\infty$-category of derived manifolds, and the genericity theorems say that every object of the completion
can be deformed back into the original category. Independence of choices is the statement that a space of
choices (of tubular neighbourhoods, collars, metrics, embeddings in $\R^\infty$) is contractible, which is
what makes a construction functorial. Invariants are traces. Decompositions by Morse functions are
presentations by generators and relations of cobordism categories.

This book follows Hirsch's order and states each of his main theorems in that language, with attribution. It
is not a replacement for his book, and it does not reprove his analytic theorems. The inverse function
theorem, partitions of unity, the Morse--Sard theorem, and the existence and uniqueness of solutions of
ordinary differential equations are used as stated. What changes is the form of the conclusions, and the last
chapter says plainly how much that change is worth. In brief: of the three volumes in this series so far,
this is the one in which the higher-categorical statements carry the most real content, because the
subject is where a good part of higher category theory came from; and it is also the one in which the
gap between a formal statement and its proof is widest, because the proofs are analysis.

A companion volume, \emph{Parametrized Neural Networks and Their Representations in Differential Topology},
applies the results of this book to smooth families of maps given by neural network architectures. It was
written to be read after this one and cites it by chapter.

\chapter{Introduction}

\section*{What is assumed}

The reader should know the definition of a smooth manifold and of a smooth map, the inverse function
theorem, and the language of categories, functors, limits and adjunctions. Sheaves on a site, simplicial
sets, and the idea of an $\infty$-category as a category with spaces of morphisms are used from
\cref{ch:manifolds} on; \cref{app:toolkit} collects the definitions and fixes the notation. Spectra appear in
\cref{ch:tubular,ch:degree,ch:cobordism} and are recalled where they enter. No result from stable homotopy
theory beyond the statement of the Pontryagin--Thom theorem is needed to follow the text.

\section*{How the book is organized}

The four parts follow the logical order of the source. Part~I builds the ambient categories and treats the
two genericity mechanisms, function spaces and transversality. Part~II treats bundles and the invariants
that come from them. Part~III treats the three ways of taking a manifold apart or putting manifolds in
families: Morse functions, cobordisms, isotopies; and ends with surfaces, where all three can be carried out
completely. Part~IV is an assessment. \Cref{fig:plan} shows the dependencies.

\begin{figure}[ht]
\centering
\begin{tikzpicture}[x=1cm,y=1cm,every node/.style={font=\small}]
  \node[ogbox] (c1) at (0,0) {1};
  \node[ogbox] (c2) at (2.3,0.9) {2};
  \node[ogbox] (c3) at (2.3,-0.9) {3};
  \node[ogbox] (c4) at (4.6,0) {4};
  \node[ogbox] (c5) at (6.9,0.9) {5};
  \node[ogbox] (c6) at (9.2,0.9) {6};
  \node[ogbox] (c7) at (11.5,0.9) {7};
  \node[ogbox] (c8) at (6.9,-0.9) {8};
  \node[ogbox] (c9) at (9.2,-0.9) {9};
  \node[ogbox] (c10) at (11.5,-0.9) {10};
  \node[ogbox] (c11) at (11.5,-2.7) {11};
  \draw[fw] (c1) -- (c2); \draw[fw] (c1) -- (c3);
  \draw[fw] (c2) -- (c4); \draw[fw] (c3) -- (c4);
  \draw[fw] (c4) -- (c5); \draw[fw] (c5) -- (c6); \draw[fw] (c6) -- (c7);
  \draw[fw] (c4) -- (c8); \draw[fw] (c8) -- (c9); \draw[fw] (c6) -- (c9);
  \draw[fw] (c6) -- (c10); \draw[fw] (c9) -- (c11); \draw[fw] (c10) -- (c11);
  \draw[fw] (c8) |- (c11);
\end{tikzpicture}
\caption{Dependencies among the chapters. Chapters 1--4 build the categories and the genericity theorems;
5--7 treat bundles, choices and numerical invariants; 8--11 treat Morse functions, cobordism, isotopy and
surfaces.}\label{fig:plan}
\end{figure}

\section*{A dictionary}

The table lists, for each of the recurring notions of the source, the categorical object that this book
uses in its place, and the chapter in which the translation is made.

\begin{center}\small
\begin{tabular}{@{}p{0.36\textwidth}p{0.47\textwidth}l@{}}
\toprule
In the classical text & Here & Ch.\\
\midrule
the set $C^\infty(M,N)$ with a topology & the mapping object $[M,N]$ in smooth sets and its shape & \ref{ch:function}\\
the chain rule & functoriality of $T$ and of Weil functors & \ref{ch:tangent}\\
a map transverse to a submanifold & a fibre product that the embedding into derived manifolds preserves & \ref{ch:transversality}\\
``by a small perturbation we may assume'' & every derived manifold is cobordant to a manifold & \ref{ch:transversality}, \ref{ch:cobordism}\\
isomorphism classes of vector bundles & homotopy classes of maps to a classifying space; concordance & \ref{ch:bundles}\\
``unique up to isotopy'' & a contractible space of choices & \ref{ch:tubular}\\
Euler characteristic, Lefschetz number & trace of an endomorphism of a dualizable object & \ref{ch:degree}\\
passing a critical point & a homotopy pushout along a sphere & \ref{ch:morse}\\
cobordism group & $\pi_0$ of a cobordism category; a homotopy group of a Thom spectrum & \ref{ch:cobordism}\\
isotopy extension & a restriction map between embedding spaces is a fibration & \ref{ch:isotopy}\\
classification of surfaces & generators and relations for the two-dimensional cobordism category & \ref{ch:surfaces}\\
\bottomrule
\end{tabular}
\end{center}

\section*{Conventions}

Manifolds are smooth ($C^\infty$), Hausdorff, second countable, and finite-dimensional; different components
may have different dimensions unless a dimension is named. A \emph{closed} manifold is compact without
boundary. Hirsch works with $C^r$ maps for $1\le r\le\omega$ and proves that nothing is lost by passing to
$C^\infty$ (\cref{thm:smoothing}); we use the finite-differentiability classes only where a theorem needs
them. ``Space'' means $\infty$-groupoid, that is, a homotopy type; the $\infty$-category of spaces is written
$\Spc$. Citations of the form ``Hirsch 3.2.7'' mean Chapter~3, Section~2, item~7 of the source.

\section*{How to read the tags}

A statement tagged \textsf{classical} or \textsf{literature} is someone else's theorem, with a reference; a
proof is given only when it is short or when its form matters for what follows. A statement tagged
\textsf{reformulation} is a restatement, and the text says what it restates. Statements tagged
\textsf{observation} are elementary; we have not found them written down in the form given and make no claim
of depth. Statements tagged \textsf{programme} are not results.
%% ---- end front.tex ----
\mainmatter
\part{Spaces of Smooth Things}
%% ---- begin ch/01-manifolds.tex ----
\chapter{Manifolds and Smooth Maps}\label{ch:manifolds}

Hirsch's first chapter defines manifolds, maps, tangent bundles, embeddings and manifolds with boundary, and
proves two theorems that the rest of his book uses constantly: the preimage of a regular value is a
submanifold, and a compact manifold embeds in a Euclidean space. This chapter records the category those
definitions produce, says exactly what is wrong with it as a category, and introduces the four enlargements
that repair it. Each enlargement repairs a different defect, and it is worth seeing at the outset which
is which.

\section{The category of manifolds}

\begin{definition}\label{def:mfd}
$\Mfd$ is the category whose objects are smooth manifolds (Hausdorff, second countable, finite-dimensional,
without boundary) and whose morphisms are smooth maps. $\Cart\subset\Mfd$ is the full subcategory on the
objects $\R^n$, $n\ge0$, and $\cat{Open}\subset\Mfd$ the full subcategory on open subsets of the $\R^n$.
\end{definition}

The source works throughout with a differentiability class $1\le r\le\omega$. The following theorem is
the reason one may fix $r=\infty$.

\begin{theorem}[Smoothing of differential structures]\label{thm:smoothing}
\Scl[Whitney; Hirsch 2.2.9, 2.2.10]
Let $1\le r<\infty$. Every $C^r$ manifold is $C^r$ diffeomorphic to a $C^\infty$ manifold, and two $C^\infty$
manifolds that are $C^r$ diffeomorphic are $C^\infty$ diffeomorphic.
\end{theorem}

So the groupoids of $C^r$ manifolds and $C^r$ diffeomorphisms have the same sets of isomorphism classes for
all $r\ge1$. For $r=0$ the statement fails in both directions: there are topological manifolds with no smooth
structure and topological manifolds with several (Kervaire, Milnor). The theorem is proved by approximation
in the strong topology (\cref{ch:function}), and it is the first instance of the method described in the
Preface.

\section{What the category lacks}

$\Mfd$ has finite products and countable coproducts, and little else. Three
fibre products show the possibilities. In each, the cospan is $\R^k\xrightarrow{f}\R\xleftarrow{0}\pt$, so
the fibre product, if it exists, is ``the zero set of $f$''.

\begin{example}[Three zero sets]\label{ex:three}
(a) $f(x,y)=x^2+y^2-1$. The value $0$ is regular, the zero set is the circle, and the circle is the fibre
product in $\Mfd$.

(b) $f(x)=x^2$. A cone over the cospan is a manifold $S$ with a smooth $u\colon S\to\R$ such that $u^2=0$;
then $u=0$. So the fibre product exists in $\Mfd$ and is a point. It is the wrong answer: the tangent functor
does not preserve it (the fibre product of the tangent maps is $\{(x,v):x^2=0,\ 2xv=0\}$, a line), and it
is unstable, since the zero set of $x^2-\varepsilon$ is two points or none.

(c) $f(x,y)=xy$. The fibre product does not exist in $\Mfd$ (\cref{prop:cross}).
\end{example}

\begin{proposition}\label{prop:cross}\Scl
No manifold represents the functor $S\mapsto\{u\in C^\infty(S,\R^2): u_1u_2=0\}$ on $\Mfd$.
\end{proposition}

\begin{proof}
Suppose $P$ does, with universal map $j\colon P\to\R^2$. Evaluating on $S=\pt$ shows that $j$ is a bijection
onto the cross $X=\{xy=0\}$. Let $p_0=j^{-1}(0)$ and let $d$ be the dimension of $P$ at $p_0$. The two axes
are smooth curves in $X$ through $0$, so they lift to smooth injective curves $a,b\colon\R\to P$ through $p_0$
with $a(\R)\cap b(\R)=\{p_0\}$; hence $d\ge1$. If $d=1$, an injective continuous map between $1$-manifolds is
open, so $a(\R)$ and $b(\R)$ are both neighbourhoods of $p_0$ and meet in more than a point. If $d\ge2$, then
$j$ has rank at most $1$ everywhere, since $X$ has empty interior, and by the constant rank theorem $j$ fails
to be injective on an open dense set where its rank is locally constant.
\end{proof}

There are also no mapping objects: outside degenerate cases there is no manifold $N^M$ with
$\Mfd(S\times M,N)\cong\Mfd(S,N^M)$. And quotients by even very good equivalence relations leave the category.

\section{Smooth sets and diffeological spaces}

The first repair is to keep the test objects and enlarge the class of things tested.

\begin{definition}\label{def:smset}
A family $\{U_i\to U\}$ in $\Cart$ is a covering if it is an open cover all of whose finite non-empty
intersections are diffeomorphic to Euclidean spaces. A \term{smooth set} is a sheaf of sets on $\Cart$ for
this coverage; $\SmSet=\cat{Sh}(\Cart)$. For a smooth set $X$, the elements of $X(\R^n)$ are its \term{plots}
of dimension~$n$. A smooth set is \term{concrete}, or a \term{diffeological space}, if each plot is determined
by the function $\R^n\to X(\pt)$ it induces on points; $\Dflg\subset\SmSet$ is the full subcategory of these.
\end{definition}

\begin{theorem}\label{thm:embed}\Scl[Souriau, Iglesias-Zemmour \cite{IZ13}; Baez--Hoffnung \cite{BH11}]
\begin{enumerate}[label=(\roman*)]
\item The functor $\Mfd\to\SmSet$, $M\mapsto C^\infty(-,M)$, is fully faithful and takes values in $\Dflg$.
\item It preserves every limit that exists in $\Mfd$, and it sends an open cover of a manifold to a colimit
diagram.
\item $\SmSet$ is a Grothendieck topos and $\Dflg$ a quasitopos. Both are complete, cocomplete and locally
cartesian closed. The mapping object has plots
$[X,Y](\R^n)=\Hom(\R^n\times X,Y)$.
\end{enumerate}
\end{theorem}

\begin{proof}[Proof of (i)]
A natural transformation $\alpha\colon C^\infty(-,M)\to C^\infty(-,N)$ gives a function $f=\alpha_{\pt}\colon
M\to N$, and naturality with respect to the inclusions of points shows that $\alpha$ is composition with $f$.
For every chart $\varphi\colon\R^m\to M$ the composite $f\varphi=\alpha(\varphi)$ is smooth, so $f$ is smooth.
\end{proof}

By (ii), smooth sets inherit the fibre products of \cref{ex:three}(a) and (b) unchanged, and in case (c) they
supply one: the cross, with the plots being the smooth maps into $\R^2$ that land in it. By (iii) they supply
the mapping object, and its plots are exactly what the source calls a smooth family of maps. \Cref{ch:function}
is about this object. What smooth sets do not repair is (b). A sheaf on $\Cart$ is tested only by reduced
objects, and the equation $u^2=0$ has the same solutions as $u=0$ in every $C^\infty(\R^n)$.

\section{Function algebras}

The second repair goes the other way and enlarges the class of test objects, by admitting algebras of
functions that are not algebras of functions on a manifold.

\begin{definition}\label{def:cinf}
A \term{$C^\infty$-ring} is a functor $A\colon\Cart\to\Set$ that preserves finite products. Its underlying set
is $A(\R)$; each smooth $h\colon\R^n\to\R$ gives an $n$-ary operation $A(h)\colon A(\R)^n\to A(\R)$. The
category of these is written $\CinfRing$. For a manifold $M$, the $C^\infty$-ring $C^\infty(M)$ is
$\R^n\mapsto C^\infty(M,\R^n)$.
\end{definition}

Taking $h$ to be addition and multiplication shows that a $C^\infty$-ring has an underlying commutative
$\R$-algebra. The free $C^\infty$-ring on $n$ generators is $C^\infty(\R^n)$, and quotients by ideals of the
underlying algebra are again $C^\infty$-rings.

\begin{theorem}\label{thm:MR}\Sli[Moerdijk--Reyes \cite{MR91}, Ch.~I, Thm.~2.8]
The functor $\Mfd\to\CinfRing^{\op}$, $M\mapsto C^\infty(M)$, is fully faithful, and it sends transverse fibre
products (\cref{thm:transpull}) to pushouts: if $f\colon M\to N$ and $g\colon P\to N$ are transverse then
$C^\infty(M\times_NP)\cong C^\infty(M)\otimes^\infty_{C^\infty(N)}C^\infty(P)$, the pushout in $\CinfRing$.
\end{theorem}

In \cref{ex:three}(b) the pushout is $C^\infty(\R)/(x^2)$. By Hadamard's lemma every smooth function is
$g(x)=g(0)+g'(0)x+x^2h(x)$, so this ring is $\R[\varepsilon]/(\varepsilon^2)$, the dual numbers. Its
``spectrum'' has one point and a one-dimensional tangent space, which is what the tangent functor predicted.
The ring has dimension $2$, as does $C^\infty(\R)/(x^2-\varepsilon)\cong\R\times\R$ for $\varepsilon>0$. So
$C^\infty$-rings repair (b) on one side. For $\varepsilon<0$ the function $x^2-\varepsilon$ is invertible and
the quotient is the zero ring; no algebra of real functions will make the length constant. What is constant
for all $\varepsilon$ is the count with signs, $(+1)+(-1)=0$, and that is a statement about cobordism
(\cref{ch:transversality,ch:cobordism}).

The third and fourth repairs are homotopical. The third, the $\infty$-topos of smooth $\infty$-groupoids,
is needed as soon as the objects being parametrized have automorphisms, as vector bundles and manifolds
themselves do; it is introduced next. The fourth, derived manifolds, replaces the pushout of
\cref{thm:MR} by a homotopy pushout, and is the subject of \cref{ch:transversality}. \Cref{tab:four} shows
which fibre product is seen where; the fourth row is the simplest case in which the derived answer differs
from all the others.

\begin{table}[ht]\centering\small
\begin{tabular}{@{}lllll@{}}
\toprule
zero set of & in $\Mfd$ & in $\SmSet$ & in $\CinfRing^{\op}$ & in $\DMfd$\\
\midrule
$x^2+y^2-1$ & circle & circle & circle & circle\\
$x^2$ & point & point & $\R[\varepsilon]/(\varepsilon^2)$ & $\R[\varepsilon]/(\varepsilon^2)$\\
$xy$ & none & cross & $C^\infty(\R^2)/(xy)$ & $C^\infty(\R^2)/(xy)$\\
$0\colon\pt\to\R$ & point & point & point & point of dimension $-1$\\
\bottomrule
\end{tabular}
\caption{Four fibre products $\R^k\times_{\R}\pt$ in four categories.}\label{tab:four}
\end{table}

\section{Smooth \texorpdfstring{$\infty$}{infinity}-groupoids and shape}

\begin{definition}\label{def:shape}
$\mathbf{H}=\cat{Sh}_\infty(\Cart)$ is the $\infty$-topos of sheaves of spaces on $\Cart$; its objects are
\term{smooth $\infty$-groupoids}, or smooth stacks. The constant-sheaf functor $\Spc\to\mathbf{H}$ has a left
adjoint $\Pi\colon\mathbf{H}\to\Spc$, the \term{shape}. Two points of $X(\pt)$ are \term{concordant} if they
are the restrictions to $0$ and $1$ of a point of $X(\R)$.
\end{definition}

Smooth sets are the $0$-truncated objects of $\mathbf{H}$. The left adjoint exists because the objects of the
site are contractible; there is a formula for it.

\begin{theorem}\label{thm:shape}\Sli[see \cite{BEBP24}, \cite{Sch13}]
For $X\in\mathbf{H}$, the shape is the geometric realization of the simplicial space obtained by evaluating
on the extended simplices $\Delta^k_e=\{t\in\R^{k+1}:\sum t_i=1\}\cong\R^k$:
\[\Pi X\ \simeq\ \colim_{[k]\in\Delta^{\op}}X(\Delta^k_e).\]
For a manifold $M$, $\Pi M$ is the homotopy type of the underlying space of $M$, and $\pi_0\Pi X$ is the set of
concordance classes of points of $X$ whenever $X$ is a smooth set.
\end{theorem}

For a manifold, the simplicial set $k\mapsto C^\infty(\Delta^k_e,M)$ is the smooth singular complex, and the
statement that it has the homotopy type of $M$ is the smooth approximation theorem (Hirsch 2.2.6) in its
relative form. The functor $\Pi$ is the device by which this book passes from smooth objects to homotopy
types. Nearly every classification theorem in later chapters has the form: for a certain smooth
$\infty$-groupoid $X$ of geometric structures, $\Pi X$ is such-and-such a space.

\section{Regular values and the fibre products that exist}

\begin{definition}\label{def:transverse}
Smooth maps $f\colon M\to N$ and $g\colon P\to N$ are \term{transverse}, written $f\trans g$, if
$df_x(T_xM)+dg_y(T_yP)=T_zN$ whenever $f(x)=g(y)=z$. If $g$ is the inclusion of a submanifold $A$ one writes
$f\trans A$. A point $z\in N$ is a \term{regular value} of $f$ if $f\trans\{z\}$.
\end{definition}

\begin{theorem}[Transverse fibre products]\label{thm:transpull}\Scl[Hirsch 1.3.2, 1.3.3]
If $f\trans g$ then $M\times_NP=\{(x,y):f(x)=g(y)\}$ is a submanifold of $M\times P$ of dimension
$\dim M+\dim P-\dim N$. It is the fibre product in $\Mfd$, and its tangent bundle is
$TM\times_{TN}TP$.
\end{theorem}

\begin{proof}
By \cref{exer:diag}, $f\trans g$ if and only if $f\times g\trans\Delta_N$, so it suffices to treat the
preimage $W=h^{-1}(A)$ of a submanifold $A\subset N$ of codimension $k$ under a map $h\trans A$. Locally $A$ is
the zero set of a submersion $\phi\colon V\to\R^k$, and transversality says that $\phi h$ is a submersion at
the points of $W$. The implicit function theorem then gives charts in which $W$ is a coordinate subspace of
codimension $k$ and $T_xW=\ker d(\phi h)_x=dh_x^{-1}(T_{h(x)}A)$. A smooth map into $M\times P$ with image in an
embedded submanifold is smooth into the submanifold, which gives the universal property.
\end{proof}

The theorem identifies a class of cospans whose limits exist, are preserved by $T$, and by \cref{thm:MR} are
preserved by passage to function algebras. \Cref{ch:transversality} shows that this class is large (every
cospan is arbitrarily close to one in it) and that it determines a universal completion.

\begin{example}\label{ex:On}
Let $f\colon\R^{n\times n}\to\cat{Sym}_n$, $f(A)=A^{\mathsf T}A$. At $A\in\Or(n)$ the differential
$H\mapsto A^{\mathsf T}H+H^{\mathsf T}A$ is onto: $H=\tfrac12AS$ maps to $S$. So $\Or(n)=f^{-1}(I)$ is a
manifold of dimension $n^2-\tfrac12n(n+1)=\tfrac12n(n-1)$. The script checks the rank numerically for
$n\le4$.
\end{example}

\section{Embeddings and idempotents}

\begin{theorem}[Whitney]\label{thm:whitney}\Scl[Hirsch 1.3.5, 2.2.14]
Every manifold of dimension $n$ admits an embedding into $\R^{2n+1}$ with closed image.
\end{theorem}

Combined with the tubular neighbourhood theorem (\cref{thm:tubular}), this says that every manifold is a
smooth retract of an open subset of a Euclidean space. The converse also holds, and together they give a
description of $\Mfd$ in which charts and atlases do not appear.

\begin{theorem}\label{thm:karoubi}\Scl[attributed to Lawvere]
$\Mfd$ is the idempotent completion of $\cat{Open}$: every idempotent in $\Mfd$ splits, and every manifold is
a retract of an object of $\cat{Open}$.
\end{theorem}

\begin{proof}
The second statement was just explained. For the first, let $e\colon M\to M$ be smooth with $e^2=e$; we show
that $e(M)=\Fix(e)$ is a submanifold (\cref{exer:idem} asks for the details). At a fixed point $x$ the
differential $de_x$ is an idempotent matrix, so its rank equals its trace, which is continuous and
integer-valued along $\Fix(e)$; let it be $k$ near $x$. Rank is lower semicontinuous, so $\rk de_y\ge k$ for
$y$ near $x$, and $de_{e(y)}de_y=de_y$ gives $\rk de_y\le\rk de_{e(y)}=k$. So $e$ has constant rank $k$ near
$x$, and its image near $x$ is a $k$-dimensional submanifold.
\end{proof}

The theorem explains two features of what follows. A product-preserving functor on $\Cart$, such as a
$C^\infty$-ring, has a canonical value on every manifold, because the manifold is a retract of an open subset
of some $\R^q$. And the universal completion of \cref{thm:CS} has to be required to be idempotent complete.

\section{Boundaries}

Hirsch allows manifolds with boundary from the start, since cobordisms need them. A manifold with boundary is
modelled on the half-space $\R^n_+=\{x_n\ge0\}$; its boundary $\partial M$ is a manifold of dimension $n-1$.
The category $\Mfd^\partial$ is less well behaved than $\Mfd$: the product of two objects has corners, and
$\partial$ is not a functor on all smooth maps. The notion that makes the regular value theorem work is the
following.

\begin{definition}\label{def:neat}
A submanifold $A\subset M$ of a manifold with boundary is \term{neat} if $\partial A=A\cap\partial M$ and $A$
is not tangent to $\partial M$ at any point of $\partial A$.
\end{definition}

\begin{theorem}\label{thm:neat}\Scl[Hirsch 1.4.2]
Let $f\colon M\to N$ be smooth, with $\partial N=\emptyset$, and let $z$ be a regular value of both $f$ and
$f|_{\partial M}$. Then $f^{-1}(z)$ is a neat submanifold of $M$ with boundary
$(f|_{\partial M})^{-1}(z)$.
\end{theorem}

In smooth sets the half-line is the subobject $[0,\infty)\subset\R$, and a function on it is smooth in the
sheaf sense exactly when it is the restriction of a smooth function on $\R$ \cite[\S24]{KM97}. So
manifolds with boundary embed fully faithfully in $\Dflg$ as well. The boundary is recovered from
the object, as the set of points at which it is not locally Euclidean, although not functorially.

\section*{Notes}

Diffeological spaces are due to Souriau; the standard reference is \cite{IZ13}, and the identification with
concrete sheaves is in \cite{BH11}. $C^\infty$-rings come from Lawvere's programme for synthetic differential
geometry; see \cite{MR91}, \cite{Koc06} and \cite{Joy19}. The $\infty$-topos $\mathbf{H}$ and its shape are
developed in \cite{Sch13}; the formula of \cref{thm:shape} is proved in \cite{BEBP24} and in work of
Pavlov and of Bunk. Manifolds with corners as a category are treated by Melrose and by Joyce.

\section*{Exercises}

\begin{exercise}\label{exer:xsq}
Verify the second row of \cref{tab:four}: the fibre product of $x\mapsto x^2$ and $0\colon\pt\to\R$ is a
point in $\Mfd$ and in $\SmSet$, and is corepresented by $\R[\varepsilon]/(\varepsilon^2)$ in $\CinfRing$.
Show that a map of $C^\infty$-rings $C^\infty(M)\to\R[\varepsilon]/(\varepsilon^2)$ is a tangent vector to
$M$.
\end{exercise}

\begin{exercise}\label{exer:idem}
Complete the proof of \cref{thm:karoubi}: if $e\colon M\to M$ is a smooth idempotent then $\Fix(e)$ is a
closed submanifold of $M$ and $e\colon M\to\Fix(e)$ is smooth. Give an example in which $\Fix(e)$ has
components of different dimensions.
\end{exercise}

\begin{exercise}\label{exer:On}
Carry out \cref{ex:On} in detail, and show that $T_I\Or(n)$ is the space of skew-symmetric matrices.
\end{exercise}

\begin{exercise}\label{exer:exp}
Let $M,N$ be manifolds. Show that the smooth set $[M,N]$ is concrete, that its points are the smooth maps
$M\to N$, and that $\Hom(S,[M,N])\cong\Hom(S\times M,N)$ for every smooth set $S$.
\end{exercise}

\begin{exercise}\label{exer:diag}
Show that $f\colon M\to N$ and $g\colon P\to N$ are transverse if and only if
$f\times g\colon M\times P\to N\times N$ is transverse to the diagonal $\Delta_N$.
\end{exercise}
%% ---- end ch/01-manifolds.tex ----
%% ---- begin ch/02-tangent.tex ----
\chapter{The Tangent Functor and Jets}\label{ch:tangent}

The source introduces the tangent bundle in a few pages and the bundle of jets in a few more, and uses both
as tools. Here they are treated as structure on the category. The chain rule is the statement that $T$ is a
functor; the symmetry of second derivatives is the statement that a certain algebra is commutative; the
higher chain rule is the statement that jets compose. All product-preserving functors of this kind are
classified by finite-dimensional algebras, and the axioms those functors satisfy can be isolated and
imposed on other categories.

\section{The tangent functor}

On $\Cart$ put $T(\R^n)=\R^n\times\R^n$ and $Tf(x,v)=(f(x),Df_x v)$. The chain rule
$D(g f)_x=Dg_{f(x)}Df_x$ is the statement $T(gf)=Tg\,Tf$.

\begin{proposition}\label{prop:T}\Scl
$T$ extends uniquely to a functor $T\colon\Mfd\to\Mfd$ with a natural transformation $p\colon T\Rightarrow\id$
such that $T$ sends open embeddings to open embeddings and $T(U)=p_M^{-1}(U)$ for $U\subset M$ open. It
preserves finite products and transverse fibre products, and each $p_M\colon TM\to M$ is a vector bundle.
\end{proposition}

\begin{proof}
A manifold is the colimit in $\Mfd$ of the \v{C}ech diagram of an atlas, and the diagram consists of open
embeddings between open subsets of $\R^n$, on which $T$ is defined by the formula. The colimit of the
image diagram exists and is $TM$. Products are preserved by the formula; transverse fibre products by
\cref{thm:transpull}.
\end{proof}

\section{Weil algebras}

\begin{definition}\label{def:weil}
A \term{Weil algebra} is a finite-dimensional commutative $\R$-algebra $A=\R\oplus\mathfrak n$ with
$\mathfrak n$ a nilpotent ideal. It is a $C^\infty$-ring in a unique way: for smooth $h$ and $a=a_0+n$ one
puts $h(a)=\sum_\alpha D^\alpha h(a_0)\,n^\alpha/\alpha!$, a finite sum. The \term{Weil functor} of $A$ is
\[T_AM=\CinfRing\bigl(C^\infty(M),A\bigr),\]
the set of $A$-points of $M$, with the manifold structure for which $T_A(\R^n)=A^n$.
\end{definition}

For $A=\R$ this is the identity functor (the $\R$-points of $M$ are its points). For the dual numbers
$W=\R[\varepsilon]/(\varepsilon^2)$ it is $T$, by \cref{exer:xsq}. In coordinates a map $f$ acts on
$A$-points by Taylor expansion in the nilpotent directions:
$f(x+v\varepsilon)=f(x)+Df_x(v)\,\varepsilon$.

\begin{theorem}[Classification of product-preserving bundle functors]\label{thm:weil}
\Sli[Eck, Kainz--Michor, Luciano; \cite{KMS93}, \S\S35--36]
\begin{enumerate}[label=(\roman*)]
\item For every Weil algebra $A$, $T_A$ is a functor $\Mfd\to\Mfd$ that preserves finite products, with a
natural fibre bundle projection $T_A\Rightarrow\id$.
\item Every product-preserving bundle functor on $\Mfd$ is naturally isomorphic to $T_A$ for a Weil algebra
$A$, unique up to isomorphism.
\item Natural transformations $T_A\Rightarrow T_B$ correspond bijectively to algebra homomorphisms $A\to B$.
\item $T_A\circ T_B\cong T_{A\otimes B}$, and $T_A\times_{\id}T_B\cong T_{A\times_{\R}B}$.
\end{enumerate}
\end{theorem}

By (iii) and (iv), every natural operation on iterated tangent bundles is a homomorphism of small
algebras. \Cref{tab:weil} lists the ones that matter.

\begin{table}[ht]\centering\small
\begin{tabular}{@{}lll@{}}
\toprule
natural transformation & algebra homomorphism & in coordinates\\
\midrule
projection $p\colon T\Rightarrow\id$ & $W\to\R$, $\varepsilon\mapsto0$ & $(x,v)\mapsto x$\\
zero section $0\colon\id\Rightarrow T$ & $\R\to W$ & $x\mapsto(x,0)$\\
addition $+\colon T\times_{\id}T\Rightarrow T$ & $W\times_\R W\to W$, $\varepsilon_1,\varepsilon_2\mapsto\varepsilon$ & $(x,v_1,v_2)\mapsto(x,v_1+v_2)$\\
vertical lift $\ell\colon T\Rightarrow TT$ & $W\to W\otimes W$, $\varepsilon\mapsto\varepsilon\eta$ & $(x,v)\mapsto(x,0,0,v)$\\
flip $c\colon TT\Rightarrow TT$ & $W\otimes W\to W\otimes W$, $\varepsilon\leftrightarrow\eta$ & $(x,v,w,a)\mapsto(x,w,v,a)$\\
\bottomrule
\end{tabular}
\caption{The structure maps of the tangent functor as homomorphisms of Weil algebras. Here
$W=\R[\varepsilon]/(\varepsilon^2)$, $W\otimes W=\R[\varepsilon,\eta]/(\varepsilon^2,\eta^2)$ and
$W\times_\R W=\R[\varepsilon_1,\varepsilon_2]/(\varepsilon_i\varepsilon_j)$.}\label{tab:weil}
\end{table}

\begin{proposition}[Symmetry of second derivatives]\label{prop:flip}\Srf[\cite{Koc06}, \cite{KMS93}]
The naturality of the flip $c$ with respect to a map $f$ is the equality $D^2f_x(v,w)=D^2f_x(w,v)$. It holds
because $W\otimes W$ is commutative.
\end{proposition}

\begin{proof}
Expanding in $W\otimes W$,
\[f(x+v\varepsilon+w\eta+a\varepsilon\eta)=f(x)+Df_x(v)\varepsilon+Df_x(w)\eta+
\bigl(Df_x(a)+D^2f_x(v,w)\bigr)\varepsilon\eta ,\]
which is the formula for $TTf$. Exchanging $\varepsilon$ and $\eta$ exchanges $v$ and $w$ on the left;
on the right it leaves the coefficient of $\varepsilon\eta=\eta\varepsilon$ in place. So $TTf\circ c=c\circ
TTf$ if and only if $D^2f_x(v,w)=D^2f_x(w,v)$, and the exchange is an algebra automorphism, hence natural by
\cref{thm:weil}(iii).
\end{proof}

The script evaluates polynomials in $\R[\varepsilon,\eta]/(\varepsilon^2,\eta^2)$ and confirms the expansion
and its symmetry, and checks the chain rule in $W$ against finite differences.

\section{Tangent categories}

The five maps of \cref{tab:weil} and the equations among them can be abstracted.

\begin{definition}\label{def:tancat}
A \term{tangent category} is a category $\mathcal X$ with an endofunctor $T$ and natural transformations
$p,0,+,\ell,c$ as in \cref{tab:weil}, such that the fibre powers of each $p_M$ exist and are preserved by
$T$; $(p,0,+)$ makes each $TM$ a commutative monoid over $M$; $\ell$ and $c$ are additive, $c^2=\id$,
$c\,\ell=\ell$, and the usual coherence equations hold; and the vertical lift is universal, in the sense
that
$TM\times_MTM\to TTM$, $(a,b)\mapsto T(+)\bigl(\ell(a),0(b)\bigr)$, is the equalizer of $T(p)$ and
$0\,p\,p$ \cite[Def.~2.3]{CC14}.
\end{definition}

The definition is Rosick\'y's \cite{Ros84}, revived and developed by Cockett and Cruttwell. The last axiom
says that a second-order tangent vector that is vertical is the same thing as a pair of first-order ones. It
is what makes it possible to define the Lie bracket of vector fields, connections, and solutions of
differential equations in any tangent category.

\begin{theorem}\label{thm:leung}\Sli[Leung \cite{Leu17}]
Let $\cat{Weil}_1$ be the monoidal category of Weil algebras generated from $W$ by $\otimes$ and
$\times_\R$. A tangent structure on $\mathcal X$ is the same thing as a strong monoidal functor
$\cat{Weil}_1\to\cat{End}(\mathcal X)$ that preserves the pullbacks expressing $\times_\R$ and the
universality of $\ell$.
\end{theorem}

So \cref{tab:weil} is the definition, read backwards. Examples of tangent categories include $\Mfd$;
$\CinfRing^{\op}$ and the category of affine schemes, with $T$ corepresented by $A\mapsto A[\varepsilon]$ and
Kähler differentials; every model of synthetic differential geometry; and cartesian differential categories,
which axiomatize $\Cart$ itself \cite{CC14}. The definition has an $\infty$-categorical form, in which the
Goodwillie calculus of functors is an example: the tangent bundle of an $\infty$-category is its fibrewise
stabilization \cite{BBC21}.

\section{Infinitesimals as objects}

In $\CinfRing^{\op}$ the algebra $W$ is an object, $D=\operatorname{Spec}W$, and
$T_AM$ is the set of maps $\operatorname{Spec}A\to M$. One would like $TM$ to be the mapping object $M^D$.

\begin{theorem}\label{thm:sdg}\Sli[Dubuc \cite{Dub79}; Kock \cite{Koc06}; Moerdijk--Reyes \cite{MR91}]
Let $\mathcal Z$ be the Cahiers topos, the topos of sheaves on the category of objects
$\R^n\times\operatorname{Spec}A$ with $A$ a Weil algebra. Then $\Mfd\to\mathcal Z$ is fully faithful and
preserves transverse fibre products; $\R^D\cong\R\times\R$ (the Kock--Lawvere axiom); and
$(T_AM)\cong M^{\operatorname{Spec}A}$ for every manifold $M$ and Weil algebra $A$.
\end{theorem}

In $\mathcal Z$ the tangent functor is an exponential, so it preserves all limits. The functor $(-)^D$ also
has a right adjoint there, which is a statement about how small $D$ is. None of this is available in
$\SmSet$. The restriction of $D$ to $\Cart$ is the terminal object, because a nilpotent element of
$C^\infty(\R^n)$ is zero; a sheaf on $\Cart$ cannot tell $D$ from a point. This is the same defect as in
\cref{ex:three}(b), and it is the reason that tangent functors on diffeological spaces are a subject with
several inequivalent answers.

\section{Jets}

\begin{definition}\label{def:jets}
Two maps $f,g\colon M\to N$ have the same \term{$r$-jet} at $x$ if $f(x)=g(x)$ and their partial derivatives
up to order $r$ agree at $x$ in some, hence any, charts. $J^r(M,N)$ is the set of $r$-jets of maps $M\to N$ at
all points of $M$; it is a manifold and a fibre bundle over $M\times N$ by source and target. A map $f$ has an
\term{$r$-jet prolongation} $j^rf\colon M\to J^r(M,N)$, a section of the source projection.
\end{definition}

The fibre of $J^r(\R^m,\R^n)$ over $(0,0)$ is the space of polynomial maps $\R^m\to\R^n$ of degree at most $r$
without constant term, of dimension $n\bigl(\binom{m+r}{r}-1\bigr)$. For $r=1$,
$J^1(M,N)=\Hom(TM,TN)$ as a bundle over $M\times N$.

\begin{proposition}[Jets compose]\label{prop:jets}\Scl
For each $r$ there is a category $\mathcal J^r$ whose objects are pairs $(M,x)$ and whose morphisms
$(M,x)\to(N,y)$ are the $r$-jets at $x$ with target $y$. Taking the $r$-jet is a functor from germs of
smooth maps to $\mathcal J^r$, and truncation gives functors $\mathcal J^r\to\mathcal J^{r-1}$. In
coordinates, composition in $\mathcal J^r$ is composition of polynomials followed by truncation at degree $r$.
The automorphism group $G^r_m$ of $(\R^m,0)$ in $\mathcal J^r$ is a Lie group, $G^1_m=\GL_m(\R)$, and the
kernel of $G^r_m\to G^1_m$ is contractible.
\end{proposition}

\begin{proof}
Functoriality is the higher chain rule: the derivatives of order at most $r$ of $g f$ at $x$ are
polynomials in those of $f$ at $x$ and of $g$ at $f(x)$ (Faà di Bruno), so the $r$-jet of $gf$ depends only
on the $r$-jets, and associativity is inherited from composition of maps. The kernel consists of polynomial
maps $x+(\text{terms of degree }2,\dots,r)$ under truncated composition; scaling the higher terms to zero
contracts it.
\end{proof}

For one variable and $r=2$ the composition rule is
$(a_1,a_2)\circ(b_1,b_2)=(a_1b_1,\;a_1b_2+a_2b_1^2)$ for jets $a_1t+\tfrac12a_2t^2$, which is
$(gf)''=g'f''+g''(f')^2$. The script checks associativity of this and of the three-variable analogue. The last
sentence of the proposition has a consequence that is used without comment throughout the subject: a
structure defined by higher jets carries the same homotopical information as one defined by first jets, so
the characteristic classes of a manifold are those of its tangent bundle.

Jets fit the framework of the previous sections: the functor $N\mapsto J^r_0(\R^m,N)$ of $r$-jets at the origin
is the Weil functor of the algebra $\R[x_1,\dots,x_m]/\mathfrak m^{r+1}$.

\section{Two derivatives of a composite}

The tangent functor is covariant and pushes vectors forward. Its transpose pulls covectors back, and
since $T^*$ is not a functor on $\Mfd$ the transpose needs a different kind of category to live in.

\begin{definition}\label{def:lens}
$\cat{Lens}$ is the category whose objects are pairs $(X,X')$ of Euclidean spaces and whose morphisms
$(X,X')\to(Y,Y')$ are pairs $(f,f^\sharp)$ of smooth maps $f\colon X\to Y$ and
$f^\sharp\colon X\times Y'\to X'$, composed by
\[(g,g^\sharp)\circ(f,f^\sharp)=\bigl(gf,\ (x,z')\mapsto f^\sharp(x,g^\sharp(f(x),z'))\bigr).\]
The \term{reverse derivative} of $f\colon\R^m\to\R^n$ is
$R[f]\colon\R^m\times\R^n\to\R^m$, $R[f](x,w)=(Df_x)^{\mathsf T}w$.
\end{definition}

\begin{proposition}[Reverse chain rule]\label{prop:reverse}
\Sli[Fong--Spivak--Tuy\'eras \cite{FST19}; Cockett et al.\ \cite{CCG20}]
$f\mapsto(f,R[f])$ is a product-preserving functor $\Cart\to\cat{Lens}$.
\end{proposition}

\begin{proof}
$R[gf](x,w)=(Dg_{f(x)}Df_x)^{\mathsf T}w=(Df_x)^{\mathsf T}(Dg_{f(x)})^{\mathsf T}w=R[f](x,R[g](f(x),w))$,
which is the composition law of $\cat{Lens}$.
\end{proof}

On manifolds the same structure is the correspondence $T^*M\leftarrow f^*T^*N\to T^*N$. The forward functor
computes a directional derivative of a composite at the cost of one evaluation; the reverse functor computes
the gradient of a scalar-valued composite at the cost of one evaluation and one backward pass. In the
companion volume the reverse functor is the backpropagation algorithm, and \cref{prop:reverse} is the reason
it is compositional.

\section*{Notes}

Weil introduced his algebras in 1953 as ``points proches''. The classification theorem is due independently
to Eck, to Kainz and Michor, and to Luciano; \cite{KMS93} is the standard account and treats natural
operations systematically. Tangent categories are surveyed in \cite{CC14}. For synthetic differential
geometry see \cite{Koc06} and \cite{MR91}; the Cahiers topos is Dubuc's \cite{Dub79}. Jet bundles as a comonad
on bundles, with differential operators as its coKleisli maps, are a further piece of structure that this
book does not use.

\section*{Exercises}

\begin{exercise}\label{exer:Tprod}
Show that $T(M\times N)\cong TM\times TN$ naturally, and that if $z$ is a regular value of $f\colon M\to N$
then $T\bigl(f^{-1}(z)\bigr)=(Tf)^{-1}(0_z)$, where $0_z$ is the zero vector at $z$.
\end{exercise}

\begin{exercise}\label{exer:weil2}
Let $A=\R[x]/(x^3)$ and $B=W\otimes W$. Show that $T_AM$ is the bundle of $2$-jets at $0$ of curves in $M$, of
fibre dimension $2\dim M$, and that the homomorphism $A\to B$, $x\mapsto\varepsilon+\eta$, induces an
embedding $T_AM\to TTM$ whose image is the fixed set of the flip intersected with $\{T(p)=p_T\}$.
\end{exercise}

\begin{exercise}\label{exer:jet2}
Derive the composition law for $2$-jets of maps $(\R^m,0)\to(\R^n,0)\to(\R^k,0)$ in terms of the linear and
quadratic parts, and verify associativity directly.
\end{exercise}

\begin{exercise}\label{exer:structure}
Verify the last three rows of \cref{tab:weil}: compute the natural transformations induced by the stated
algebra homomorphisms in the coordinates $(x,v,w,a)$ on $TT\R^n$.
\end{exercise}

\begin{exercise}\label{exer:lens}
Show that composition in $\cat{Lens}$ is associative, and that the reverse derivative of a composite of $k$
maps $\R^{n_0}\to\R^{n_1}\to\dots\to\R^{n_k}$ with $n_k=1$ can be evaluated with one forward pass storing
the intermediate values and $k$ transposed Jacobian--vector products.
\end{exercise}
%% ---- end ch/02-tangent.tex ----
%% ---- begin ch/03-function.tex ----
\chapter{Function Spaces}\label{ch:function}

The second chapter of the source puts two topologies on the set $C^r(M,N)$, proves that the important classes
of maps are open in the stronger one, and proves approximation theorems by convolution and partitions of
unity. This is the analytic engine of the book. The mapping object $[M,N]$ of \cref{thm:embed} is a different
kind of structure on the same set, and it is important to be clear about what each is for. The strong
topology is for proving that properties are generic. The mapping object is for parametrizing, and its shape
is the homotopy type of the space of maps. The two are compatible but not interchangeable.

\section{Two topologies}

Fix $0\le r<\infty$. For $f\in C^r(M,N)$, charts $(\varphi,U)$ on $M$ and $(\psi,V)$ on $N$, a compact
$K\subset U$ with $f(K)\subset V$, and $\varepsilon>0$, let $\mathcal N^r(f;\varphi,\psi,K,\varepsilon)$ be the
set of $g\in C^r(M,N)$ with $g(K)\subset V$ and
\[\bigl\|D^k(\psi g\varphi^{-1})(x)-D^k(\psi f\varphi^{-1})(x)\bigr\|<\varepsilon
\qquad\text{for }x\in\varphi(K),\ 0\le k\le r.\]

\begin{definition}\label{def:topologies}
The \term{weak} (or compact-open $C^r$) topology on $C^r(M,N)$ is generated by the sets
$\mathcal N^r(f;\varphi,\psi,K,\varepsilon)$. The \term{strong} (or Whitney) topology has as a base the sets
$\bigcap_i\mathcal N^r(f;\varphi_i,\psi_i,K_i,\varepsilon_i)$ over locally finite families of charts
$(\varphi_i,U_i)$ of $M$, with arbitrary $\varepsilon_i>0$. On $C^\infty(M,N)$ each topology is the union of
the ones induced from $C^r$, $r<\infty$. The spaces are written $C^r_W(M,N)$ and $C^r_S(M,N)$.
\end{definition}

A weak neighbourhood controls a map and its derivatives on a compact set. A strong neighbourhood controls them
everywhere, with a tolerance that may shrink to zero at infinity as fast as one likes. If $M$ is compact the
two agree. If $M$ is not compact the strong topology is not metrizable and not even first countable, but it
is the one in which the theorems below are true.

\begin{theorem}[Open conditions]\label{thm:open}\Scl[Hirsch 2.1.1--2.1.6]
For $r\ge1$ the sets of immersions, submersions, embeddings, closed embeddings and diffeomorphisms are open
in $C^r_S(M,N)$. For $r\ge0$ the set of proper maps is open in $C^r_S(M,N)$.
\end{theorem}

\begin{example}\label{ex:weakfail}
Let $\beta\ge0$ be a bump function on $\R$ supported in $[-1,1]$, with maximum at $0$ and $\max\beta'=1$, and put
$g_n(x)=x-2\beta(x-n)$. Then $g_n$ agrees with the identity on $[-n+1,n-1]$, so $g_n\to\id$ in $C^\infty_W(\R,\R)$;
but $g_n'=1-2\beta'(x-n)$ takes the value $-1$, so no $g_n$ is a diffeomorphism or even an immersion. The
set of diffeomorphisms of $\R$ is not weakly open. In the strong topology $g_n$ does not converge to the
identity: the neighbourhood $\{g:|g(x)-x|<\beta(0)e^{-x^2}\}$ contains none of them. The script confirms both
statements numerically.
\end{example}

\begin{theorem}[Approximation]\label{thm:approx}\Scl[Hirsch 2.2.6]
For $0\le r<s\le\infty$, $C^s(M,N)$ is dense in $C^r_S(M,N)$. If $f$ is already $C^s$ on a neighbourhood of a
closed set $A$, the approximating maps may be taken to agree with $f$ on $A$.
\end{theorem}

Since diffeomorphisms are open (\cref{thm:open}) and smooth maps are dense, a $C^r$ diffeomorphism can be
approximated by a $C^\infty$ one once source and target carry compatible smooth structures; this is the main
step in \cref{thm:smoothing}. The same two theorems give the first comparison of homotopy types.

\begin{corollary}\label{cor:homotopy}\Scl[Hirsch 5.1.5]
Every continuous map between manifolds is homotopic to a smooth map, and two smooth maps that are
continuously homotopic are smoothly homotopic.
\end{corollary}

\section{The mapping object}

By \cref{thm:embed} the smooth set $[M,N]$ has as plots the smooth maps $F\colon\R^n\times M\to N$. A plot is
a family $s\mapsto F_s$ of maps, smooth jointly in the parameter and the variable. Nothing is said about
neighbourhoods. A topology can be recovered from the plots, as for any smooth set.

\begin{definition}\label{def:Dtop}
A set $A$ of points of a smooth set $X$ is \term{$D$-open} if $p^{-1}(A)\subset\R^n$ is open for every plot
$p$ of $X$. A subobject of $X$ is $D$-open if its set of points is and it contains every plot whose points
lie in it.
\end{definition}

\begin{theorem}\label{thm:CSW}\Sli[Christensen--Sinnamon--Wu \cite{CSW14}]
On $C^\infty(M,N)$ the $D$-topology of the mapping object $[M,N]$ is finer than the weak topology and coarser
than the strong topology. If $M$ is compact all three coincide.
\end{theorem}

The first inequality says that a smooth family is continuous into the weak topology, which is easy. The
second says that a $D$-open set is strongly open, which is not. For non-compact $M$ the second is not an
equality: a plot $\R\to[M,N]$ is in particular a path, and paths in the strong topology are very restricted.

\begin{proposition}\label{prop:strongpath}\Scl
Let $M$ be non-compact. If $t\mapsto f_t$ is a continuous path in $C^0_S(M,N)$, there is a compact $K\subset M$
such that $f_t=f_0$ outside $K$ for all $t\in[0,1]$.
\end{proposition}

So the path components of $C^\infty_S(M,N)$ are far smaller than homotopy classes
(\cref{exer:strongpath}), and the strong topology does not compute the homotopy type of anything one wants.
It is a device for stating that a set of maps is large.

\section{The homotopy type of a space of maps}

The homotopy type attached to the mapping object is its shape (\cref{def:shape}). By \cref{thm:shape} it is
the realization of the simplicial set $k\mapsto C^\infty(\Delta^k_e\times M,N)$, whose vertices are smooth
maps, whose edges are smooth homotopies, and so on.

\begin{theorem}[Shape of mapping objects]\label{thm:oka}\Sli[Berwick-Evans--Boavida de Brito--Pavlov
\cite{BEBP24}, Thm.~1.1]
For a manifold $M$ and any $F\in\mathbf{H}$ the natural map
\[\Pi[M,F]\ \longrightarrow\ \Map(\Pi M,\Pi F)\]
is an equivalence of spaces. In particular $\Pi[M,N]\simeq\Map(M,N)$, the space of continuous maps, for
manifolds $M$ and $N$.
\end{theorem}

For $F=N$ a manifold and $M$ compact this is classical, and it is a parametrized form of
\cref{cor:homotopy}. In general it is a recent theorem, and it will be used in \cref{ch:bundles} with $F$ a
stack of bundles. On $\pi_0$ it says that concordance classes of sections of $F$ over $M$ are homotopy
classes of maps from $M$ to the space $\Pi F$. The hypothesis that $M$ is a manifold cannot be dropped;
what is used is that $M$ has partitions of unity and is locally contractible, which is where the analysis
of this chapter enters.

\begin{remark}\label{rem:sing}
Concordance is an equivalence relation on the points of any smooth set, but transitivity is not
automatic: two plots $\R\to X$ that agree at a point need not glue to a plot. One reparametrizes so that
each is constant near the ends (\cref{exer:sitting}). The same device makes the smooth singular complex a
Kan complex.
\end{remark}

\section{Subobjects cut out by open conditions}

\begin{definition}\label{def:emb}
$\Imm(M,N)$, $\Emb(M,N)$ and $\Diff(M)$ are the subobjects of $[M,N]$ (of $[M,M]$) whose plots are the
families $F\colon\R^n\times M\to N$ such that every $F_s$ is an immersion, an embedding, a diffeomorphism.
\end{definition}

For non-compact $M$ this definition of $\Emb$ is the weakest reasonable one, and there are others (requiring
$(s,x)\mapsto(s,F_s(x))$ to be an embedding, or requiring compact support). For compact $M$ they agree.

\begin{proposition}\label{prop:Dopen}\Srf[Hirsch 2.1.1--2.1.6]
If $M$ is compact, $\Imm(M,N)$, $\Emb(M,N)$ and $\Diff(M)$ are $D$-open subobjects of the mapping object.
That is: in a smooth family of maps from a compact manifold, the set of parameters at which the map is an
immersion (an embedding, a diffeomorphism) is open.
\end{proposition}

\begin{proof}
A plot $F$ induces a continuous map $\R^n\to C^\infty_W(M,N)$, since $F$ and its derivatives in the $M$
directions are uniformly continuous on compact subsets of $\R^n\times M$. For compact $M$ the weak and strong
topologies agree, and the three sets are open by \cref{thm:open}.
\end{proof}

The reformulation is modest, but it is the form in which the companion volume uses \cref{thm:open}: the
parameters of a network at which it is an embedding of a compact data manifold form an open set. It is also
the form that generalizes. A $D$-open subobject of a mapping object has the same local structure as the
mapping object, and so inherits whatever infinite-dimensional manifold structure the latter has
\cite{KM97}.

\section{Genericity}

\begin{theorem}[Baire property]\label{thm:baire}\Scl[Hirsch 2.4.4]
Every weakly closed subset of $C^r_S(M,N)$ is a Baire space in the strong topology: a countable
intersection of open dense subsets is dense.
\end{theorem}

A subset is \term{residual} if it contains a countable intersection of open dense sets. The theorems of the
next chapter assert that certain sets are residual, and \cref{thm:baire} is what turns such an assertion
into one about density. The proof realizes $C^r(M,N)$, by the prolongation
$j^r\colon C^r(M,N)\to C^0(M,J^r(M,N))$, as a weakly closed set of sections of the jet bundle; the strong
$C^r$ topology is by definition the one induced from the strong $C^0$ topology on sections, and the Baire
property is proved there by a diagonal argument.

\begin{remark}[What the topos does not see]\label{rem:nobaire}
The $D$-topology is defined from the plots, so openness is a notion internal to smooth sets.
Residuality is not. A residual set need not be $D$-open, and a set meeting every plot in a residual set
of parameters need not be residual. We know of no formulation of the Baire property of
$C^\infty_S(M,N)$ in terms of the sheaf $[M,N]$ alone. What the sheaf does see is the parametric form of
genericity (\cref{thm:parametric}): in a family rich enough to be a submersion onto its target, almost every
member is generic. In applications that statement is usually the one wanted.
\end{remark}

\section{Jets and partial differential relations}

The prolongation is a map of smooth sets $j^r\colon[M,N]\to\Gamma(J^r(M,N))$ into the smooth set of sections
of the jet bundle over $M$. It is a monomorphism, and its image consists of the \term{holonomic} sections. A
condition on maps that is defined by a subset $\mathcal R\subset J^r(M,N)$, such as being an immersion (the
$1$-jet is injective) or a Morse function (the $1$-jet meets the zero locus only where the $2$-jet is
non-degenerate), gives a pullback square
\[\begin{tikzcd}
{[M,N]_{\mathcal R}}\arrow[r]\arrow[d] & \Gamma(\mathcal R)\arrow[d]\\
{[M,N]}\arrow[r,"j^r"] & \Gamma(J^r(M,N))
\end{tikzcd}\]
in which the right-hand side involves no differential equation: $\Gamma(\mathcal R)$ is the object of
\term{formal solutions}. If $\mathcal R$ is open, the left-hand subobject is $D$-open when $M$ is compact, by
the argument of \cref{prop:Dopen}. Whether the top map induces an equivalence of shapes is the question
answered, for immersions, by the Smale--Hirsch theorem (\cref{thm:SH}).

\section*{Notes}

The weak and strong topologies and their properties are developed in Hirsch's Chapter~2 and, for
$C^\infty$ and jets, in Golubitsky--Guillemin and Mather. The convenient setting of \cite{KM97} gives
$C^\infty(M,N)$ the structure of an infinite-dimensional manifold whose smooth curves are the smooth families
with locally compact support in the parameter; \cref{prop:strongpath} is the reason for that restriction.
The comparison of the $D$-topology with the classical ones is \cite{CSW14}. \Cref{thm:oka} is called the
smooth Oka principle by Sati and Schreiber; earlier special cases are due to Madsen and Weiss.

\section*{Exercises}

\begin{exercise}\label{exer:weakopen}
Verify the claims of \cref{ex:weakfail}. Show also that $\Diff(\R)$ is not closed in $C^\infty_W(\R,\R)$.
\end{exercise}

\begin{exercise}\label{exer:strongpath}
Prove \cref{prop:strongpath} for $M=N=\R$. Deduce that the path component of $f$ in $C^0_S(\R,\R)$ is the set
of maps that agree with $f$ outside a compact set.
\end{exercise}

\begin{exercise}\label{exer:Dopen}
Show that a plot of $[M,N]$ is continuous as a map into $C^1_W(M,N)$, and give an example of a smooth family
$F\colon\R\times\R\to\R^2$ of maps for which $\{s:F_s\text{ is an embedding}\}$ is not open.
\end{exercise}

\begin{exercise}\label{exer:sitting}
Let $X$ be a smooth set. Show that concordance is an equivalence relation on $X(\pt)$.
\end{exercise}

\begin{exercise}\label{exer:morseweak}
A function $f\colon\R\to\R$ is Morse if $f''(x)\ne0$ wherever $f'(x)=0$. Show that the set of Morse functions
is dense but not open in $C^\infty_W(\R,\R)$.
\end{exercise}
%% ---- end ch/03-function.tex ----
%% ---- begin ch/04-transversality.tex ----
\chapter{Sard's Theorem and Transversality}\label{ch:transversality}

This is the chapter on which the source turns. Its results say that the transverse cospans of
\cref{thm:transpull} are dense among all cospans, and that the same holds in families. The proofs reduce, by
one piece of linear algebra, to a single analytic theorem. The higher-categorical counterpart is a universal
property: there is a smallest enlargement of $\Mfd$ in which all fibre products exist and the transverse ones
are unchanged, and the genericity theorems say that every object of the enlargement is cobordant to an
object of $\Mfd$.

\section{The Morse--Sard theorem}

\begin{theorem}[Morse--Sard]\label{thm:sard}\Scl[Morse, Sard, Brown; Hirsch 3.1.3]
Let $f\colon M\to N$ be of class $C^r$ with $r>\max\{0,\dim M-\dim N\}$. Then the set of critical values of $f$
has measure zero in $N$, and the set of regular values is residual.
\end{theorem}

The proof is an induction on $\dim M$ by slicing with Fubini's theorem, with the differentiability hypothesis
used to control the image of the set where many derivatives vanish. Nothing in this book adds to it. The
theorem is the source of every statement of the form ``for almost all'' below.

\begin{corollary}\label{cor:noretract}\Scl[Hirsch 3.1.4]
A compact manifold with non-empty boundary admits no smooth retraction onto its boundary.
\end{corollary}

\begin{proof}
Let $\rho\colon M\to\partial M$ be one and $y$ a regular value of $\rho$; it is automatically a regular
value of $\rho|_{\partial M}=\id$. By \cref{thm:neat}, $\rho^{-1}(y)$ is a compact neat $1$-dimensional
submanifold with boundary $\rho^{-1}(y)\cap\partial M=\{y\}$. A compact $1$-manifold has an even number of
boundary points.
\end{proof}

The argument is the prototype for the whole subject: a count that would have to be odd is the boundary of
something, hence even. Brouwer's fixed point theorem follows (\cref{exer:brouwer}).

\section{The transversality theorems}

\begin{theorem}[Transversality]\label{thm:transversality}\Scl[Thom; Hirsch 3.2.1]
Let $A\subset N$ be a submanifold and $1\le r\le\infty$. The set of $f\in C^r(M,N)$ with $f\trans A$ is
residual, hence dense, in $C^r_S(M,N)$; it is open if $A$ is closed.
\end{theorem}

The proof uses a parametric statement, which is the form we shall use most, and the parametric statement
rests on a lemma worth isolating.

\begin{lemma}[Fibrewise transversality]\label{lem:fibre}\Scl
Let $F\colon V\times M\to N$ be smooth with $F\trans A$, let $W=F^{-1}(A)$ and let $\pi\colon W\to V$ be the
projection. Then $F_v=F(v,-)$ is transverse to $A$ if and only if $v$ is a regular value of $\pi$.
\end{lemma}

\begin{proof}
Fix $(v,x)\in W$, $z=F(v,x)$, and let $L\colon T_vV\oplus T_xM\to Q=T_zN/T_zA$ be the differential of $F$
followed by the quotient. By hypothesis $L$ is onto, and $T_{(v,x)}W=\ker L$. Write $L_M$ for the
restriction of $L$ to $T_xM$; then $F_v\trans A$ at $x$ means that $L_M$ is onto, and $d\pi$ is the
projection $\ker L\to T_vV$.

If $L_M$ is onto and $a\in T_vV$, choose $b$ with $L_M(b)=L(a,0)$; then $(a,-b)\in\ker L$ projects to $a$.
Conversely, if the projection is onto and $q=L(a,b)\in Q$, choose $(a,b')\in\ker L$; then
$q=L(a,b)-L(a,b')=L_M(b-b')$.
\end{proof}

\begin{theorem}[Parametric transversality]\label{thm:parametric}\Scl[Hirsch 3.2.7]
Let $F\colon V\times M\to N$ be of class $C^r$ with $r>\max\{0,\dim M+\dim A-\dim N\}$ and $F\trans A$. Then
the set of $v\in V$ with $F_v\trans A$ is residual in $V$, and its complement has measure zero.
\end{theorem}

\begin{proof}
Apply \cref{thm:sard} to $\pi\colon W\to V$, noting $\dim W-\dim V=\dim M+\dim A-\dim N$, and use
\cref{lem:fibre}.
\end{proof}

The lemma has a reading that will recur. The manifold $W$ is the fibre product of the whole family with $A$,
and it is always a manifold. The individual fibre products $F_v^{-1}(A)$ are its fibres over $V$. So a
non-transverse member $F_{v_0}^{-1}(A)$ of the family is a singular fibre of a map between manifolds, and
nearby regular fibres are its replacements. If $F$ is merely a plot of $[M,N]$, with no transversality
assumed, nothing can be said; the hypothesis $F\trans A$ is what makes a family ``rich enough'' in the sense
of \cref{rem:nobaire}. It holds in particular when $F$ is a submersion, for instance $F(v,x)=f(x)+v$ with
$N=V=\R^n$ (\cref{exer:translate}).

\begin{theorem}[Jet transversality]\label{thm:jettrans}\Scl[Thom; Hirsch 3.2.8, 3.2.9]
Let $A\subset J^r(M,N)$ be a submanifold and $r<s\le\infty$. The set of $f\in C^s(M,N)$ with $j^rf\trans A$ is
residual in $C^s_S(M,N)$, and open if $A$ is closed.
\end{theorem}

\section{Dimension counts}

A map transverse to a submanifold of codimension greater than $\dim M$ misses it. So genericity theorems
become existence theorems as soon as one can compute a codimension.

\begin{proposition}\label{prop:rank}\Scl
The $m\times n$ real matrices of rank $\rho$ form a submanifold of $\R^{m\times n}$ of dimension
$\rho(m+n-\rho)$, that is, of codimension $(m-\rho)(n-\rho)$.
\end{proposition}

\begin{corollary}\label{cor:counts}\Scl[Whitney; Hirsch 2.2.12, 2.2.13, 6.1.2]
Let $\dim M=m$, $\dim N=n$, with $M$ compact.
\begin{enumerate}[label=(\alph*)]
\item If $n\ge2m$, immersions are dense in $C^\infty(M,N)$.
\item If $n\ge2m+1$, embeddings are dense in $C^\infty(M,N)$.
\item Morse functions are open and dense in $C^\infty(M,\R)$.
\end{enumerate}
\end{corollary}

\begin{proof}
(a) In $J^1(M,N)$ the jets of rank $\rho<m$ form submanifolds of codimension $(m-\rho)(n-\rho)\ge n-m+1>m$. A
map whose $1$-jet prolongation is transverse to all of them misses them. (b) For an immersion $f$,
injectivity is the statement that $f\times f$ restricted to $M\times M\setminus\Delta$ misses $\Delta_N$, of
codimension $n>2m$; one applies a multijet form of \cref{thm:jettrans}. (c) A function is Morse when $df$,
as a section of $T^*M$, is transverse to the zero section, a closed submanifold of codimension $m$.
\end{proof}

The script checks \cref{prop:rank} by computing the rank of the differential of a local defining map for
several $(m,n,\rho)$, and checks (b) in a small case by sampling linear projections.

\section{Clean and transverse}

Transversality is a sufficient condition for a fibre product in $\Mfd$ to be correct. It is useful to
separate the two things it provides.

\begin{definition}\label{def:clean}
Maps $f\colon M\to N$ and $g\colon P\to N$ intersect \term{cleanly} if $Z=M\times_NP$ is a submanifold of
$M\times P$ and $TZ=TM\times_{TN}TP$. The \term{excess bundle} is the vector bundle
$E=\operatorname{coker}(TM\oplus TP\to TN)$ over $Z$, of rank $e=\dim N-\dim M-\dim P+\dim Z$.
\end{definition}

\begin{proposition}\label{prop:clean}\Scl
If $f$ and $g$ intersect cleanly then $Z$ is the fibre product in $\Mfd$ and $T$ preserves it. They are
transverse if and only if they intersect cleanly with $e=0$. If $M,P\subset N$ are compact submanifolds
meeting cleanly in $Z$, then for every sufficiently small generic perturbation $M'$ of $M$ the transverse
intersection $M'\cap P$ is cobordant to the zero set of a generic section of $E$ over $Z$.
\end{proposition}

So a clean intersection has the right tangent spaces and the wrong dimension, by $e$, and the excess bundle
measures exactly what a perturbation will cut away. A submanifold meets itself cleanly with $E$ its normal
bundle; the diagonal of $M\times M$ meets itself cleanly with $E=TM$. \Cref{ex:three}(b) is not clean. In
each case there is an object that records the correct answer before any perturbation is made.

\section{Derived manifolds}

By \cref{thm:MR} the function algebra of a transverse fibre product is a pushout of $C^\infty$-rings. The
derived fibre product is defined by the homotopy pushout.

\begin{definition}\label{def:scr}
A \term{simplicial $C^\infty$-ring} is a product-preserving functor $\Cart\to\Spc$; these form an
$\infty$-category $s\CinfRing$, with homotopy pushouts written $\otimes^{\mathbb L}$. Each has homotopy groups
$\pi_k$, with $\pi_0$ a $C^\infty$-ring and $\pi_k$ a $\pi_0$-module.
\end{definition}

\begin{theorem}[Universal property of derived manifolds]\label{thm:CS}
\Sli[Carchedi--Steffens \cite{CS19}; Spivak \cite{Spi10}]
There is an $\infty$-category $\DMfd$ that has finite limits and is idempotent complete, with a functor
$i\colon\Mfd\to\DMfd$ that preserves transverse fibre products and the terminal object, and that is universal
with these properties: for every idempotent complete $\infty$-category $\mathcal C$ with finite limits,
composition with $i$ is an equivalence between finite-limit-preserving functors $\DMfd\to\mathcal C$ and
functors $\Mfd\to\mathcal C$ preserving transverse fibre products and the terminal object. Moreover $\DMfd$
is equivalent to the opposite of the $\infty$-category of finitely presented simplicial $C^\infty$-rings, with
$i(M)=C^\infty(M)$, and $i$ is fully faithful.
\end{theorem}

The theorem says that nothing was chosen. Whoever wants all fibre products of manifolds, and wants the
transverse ones to stay as they are, is led to this $\infty$-category and no other. The role of idempotent
completeness was explained after \cref{thm:karoubi}. That the answer is an $\infty$-category and not a
category is forced: the last row of \cref{tab:four} has no $1$-categorical solution.

Locally every derived fibre product of manifolds is a derived zero locus, and those can be written down.

\begin{proposition}[Koszul model]\label{prop:koszul}\Sli[\cite{Spi10}, \cite{CS19}]
Let $E\to M$ be a vector bundle of rank $k$ with a section $s$, and let
$Z(s)=M\times^h_{s,E,0}M$ be the derived zero locus. Its simplicial $C^\infty$-ring corresponds to the
commutative differential graded algebra
\[\bigl(\Gamma(\Lambda^\bullet E^\vee),\ \iota_s\bigr):\qquad
\cdots\to\Gamma(\Lambda^2E^\vee)\xrightarrow{\ \iota_s\ }\Gamma(E^\vee)\xrightarrow{\ \iota_s\ }C^\infty(M),\]
so $\pi_0=C^\infty(M)/(s)$. If $s$ is transverse to the zero section then $\pi_k=0$ for $k>0$ and
$Z(s)=i\bigl(s^{-1}(0)\bigr)$. For maps $f\colon M\to N$ and $g\colon P\to N$, the derived fibre product
$M\times^h_NP$ is the derived zero locus of a section of $(f\times g)^*TN$ over a neighbourhood of
$M\times_NP$ in $M\times P$.
\end{proposition}

The number $\vdim Z(s)=\dim M-k$ is the \term{virtual dimension}; for a derived fibre product it is
$\dim M+\dim P-\dim N$ whether or not the maps are transverse.

\begin{example}\label{ex:derived}
(a) $M=\R$, $E$ trivial of rank $1$, $s=x^2$. The complex is $C^\infty(\R)\xrightarrow{x^2}C^\infty(\R)$, which
is injective, so $\pi_1=0$ and $Z(s)$ is the classical object $\R[\varepsilon]/(\varepsilon^2)$ of virtual
dimension $0$: not a manifold, and not derived either.

(b) $M=\pt$, $E=\R$, $s=0$. The complex is $\R\xrightarrow{0}\R$; $\pi_0=\pi_1=\R$. This is the point of
virtual dimension $-1$ in \cref{tab:four}.

(c) $s=0$ on any $E\to M$: the algebra is $\Gamma(\Lambda^\bullet E^\vee)$ with zero differential, of virtual
dimension $\dim M-k$. It is the derived self-intersection of the zero section, and by the tubular
neighbourhood theorem the derived self-intersection of any submanifold with normal bundle $E$.

(d) The diagonal: $M\times^h_{M\times M}M$ has functions $\Gamma(\Lambda^\bullet T^*M)$, the differential forms
placed in homological degrees, and virtual dimension $0$. Its ``number of points'' will turn out to be the
Euler characteristic (\cref{ch:degree}).
\end{example}

Every object of $\DMfd$ has a tangent complex at each point. For $X=M\times^h_NP$ at $(x,y)$ over $z$ it is
\[\mathbb T_X=\bigl[T_xM\oplus T_yP\xrightarrow{\ df-dg\ }T_zN\bigr]\]
in degrees $0$ and $1$, with $H^0$ the fibre product of tangent spaces and $H^1$ the fibre of the excess
bundle. Its Euler characteristic is the virtual dimension.

\begin{theorem}[Transversality, derived form]\label{thm:derivedtrans}\Srf[\cite{Spi10}, \cite{CS19}]
For smooth maps $f\colon M\to N$ and $g\colon P\to N$, the derived fibre product $M\times^h_NP$ lies in the
essential image of $i\colon\Mfd\to\DMfd$ if and only if $f\trans g$.
\end{theorem}

\begin{proof}
If $f\trans g$, then $i$ preserves the fibre product by \cref{thm:CS}. Conversely, if
$M\times^h_NP\simeq i(Z)$ for a manifold $Z$, its tangent complex is concentrated in degree $0$ at every
point, so $H^1=T_zN/(df\,T_xM+dg\,T_yP)$ vanishes at every point of the fibre product, which is
transversality.
\end{proof}

Compare the situation in $\Mfd$. There a fibre product may fail to exist, or exist and be wrong, or exist
and be right without one's knowing which. In $\DMfd$ it always exists and is always right, and it is a
manifold in exactly the transverse case.

\section{Genericity as a statement about derived manifolds}

\begin{theorem}\label{thm:spivak}\Sli[Spivak \cite{Spi10}]
Compact derived manifolds that are locally derived zero loci have a cobordism theory, and
$i$ induces an isomorphism from the cobordism ring of manifolds to it. In particular a compact
$X=M\times^h_NP$ has a class $[X]$ in the cobordism group $\mathfrak N_d$ of dimension
$d=\dim M+\dim P-\dim N$ (\cref{ch:cobordism}), represented by $M\times_NP'$ for any $g'\trans f$ sufficiently
close to $g$.
\end{theorem}

Surjectivity is the transversality theorem: perturb. Injectivity, and the independence of the perturbation,
is \cref{lem:fibre} applied to a path of perturbations: the fibre product of the path with $A$ is a manifold
with boundary whose two ends are the two candidates. Putting \cref{thm:CS,thm:derivedtrans,thm:spivak}
together gives a statement of the method of the source that makes no mention of perturbation until the
end.

\begin{principle}[Generic position]\label{prin:generic}\Srf[Hirsch, Ch.~3; \cite{Spi10}]
Every finite diagram of manifolds has a limit in $\DMfd$. If the limit is compact it has a well-defined
cobordism class. The class is represented by the honest limit of any sufficiently generic perturbation of
the diagram, and two such representatives are cobordant by the limit of a generic path between the
perturbations.
\end{principle}

\begin{example}\label{ex:xsqagain}
The zero set of $x^2-\varepsilon$ on $\R$, as an oriented $0$-manifold, is $\{+\sqrt\varepsilon\}$ with sign
$+$ and $\{-\sqrt\varepsilon\}$ with sign $-$ for $\varepsilon>0$, and empty for $\varepsilon<0$. Both have
class $0\in\Omega_0=\Z$, and the cobordism between them is the parabola $\{x^2=\varepsilon\}$ in the
$(\varepsilon,x)$-plane, a manifold by \cref{lem:fibre}. The derived zero set at $\varepsilon=0$ is the dual
numbers, with class $0$. Its length as an algebra is $2$, which is the count of complex roots; the
cobordism class and the length are different invariants and only the first is stable under real
perturbation.
\end{example}

An object of negative virtual dimension, such as \cref{ex:derived}(b), has class zero for trivial reasons
and is nevertheless not empty. The cobordism class is the part of a derived manifold that perturbation can
reach, and it is the only part the classical theory uses.

\section*{Notes}

Transversality is Thom's; the parametric form and its use as the organizing principle are the substance of
Hirsch's Chapter~3 and of Abraham's work. Derived manifolds were introduced by Spivak, after Lurie's sketch
in his work on derived algebraic geometry; variants are due to Borisov and Noel and to Joyce, and the
universal property is \cite{CS19}, building on \cite{Mac17}. Clean intersections are Bott's. The excess
bundle and the associated formula are Quillen's in cobordism and Fulton--MacPherson's in algebraic
geometry.

\section*{Exercises}

\begin{exercise}\label{exer:translate}
Let $f\colon M\to\R^n$ be smooth and $A\subset\R^n$ a submanifold. Show that $f+v$ is transverse to $A$ for
almost every $v\in\R^n$. Deduce that almost every translate of a curve in $\R^3$ misses a given curve.
\end{exercise}

\begin{exercise}\label{exer:rank}
Prove \cref{prop:rank}.
\end{exercise}

\begin{exercise}\label{exer:tor}
Compute the homotopy groups of $\R\otimes^{\mathbb L}_{C^\infty(\R)}\R$, where both maps are evaluation at
$0$, and of $C^\infty(\R)\otimes^{\mathbb L}_{C^\infty(\R)}\R$, where the first map is $x\mapsto x^2$. Compare
with \cref{ex:derived}.
\end{exercise}

\begin{exercise}\label{exer:morsegeneric}
Let $U\subset\R^m$ be open and $f\colon U\to\R$ smooth. Show that $f_a(x)=f(x)+\langle a,x\rangle$ is a Morse
function for almost every $a\in\R^m$.
\end{exercise}

\begin{exercise}\label{exer:brouwer}
Deduce from \cref{cor:noretract} that every continuous map $D^n\to D^n$ has a fixed point.
\end{exercise}
%% ---- end ch/04-transversality.tex ----
\part{Bundles and Invariants}
%% ---- begin ch/05-bundles.tex ----
\chapter{Vector Bundles and Classifying Maps}\label{ch:bundles}

The first half of Hirsch's fourth chapter proves that a vector bundle over $B\times I$ is a product in the
$I$ direction, deduces that homotopic maps pull back isomorphic bundles, and classifies bundles over an
$n$-manifold by homotopy classes of maps to a Grassmannian. The three statements are one statement about a
stack: it is concordance-invariant, so its sections are classified by maps to its shape. The same theorem,
applied to other stacks, gives de Rham's theorem and the classification of principal bundles, and in
later chapters the classification of immersions and of manifolds up to cobordism.

\section{The stack of vector bundles}

\begin{definition}\label{def:vect}
For a manifold $M$, $\Vect_k(M)$ is the groupoid of real vector bundles of rank $k$ over $M$ and their
isomorphisms. Pullback makes $M\mapsto\Vect_k(M)$ a functor $\Mfd^{\op}\to\cat{Gpd}$.
\end{definition}

\begin{proposition}\label{prop:stack}\Scl
$\Vect_k$ is a stack: bundles and their isomorphisms glue along open covers. Its restriction to $\Cart$ is
equivalent to $U\mapsto B\,C^\infty(U,\GL_k)$, the groupoid with one object and automorphisms the smooth
maps $U\to\GL_k(\R)$. Hence $\Vect_k\simeq B\GL_k$, the delooping in $\mathbf H$ of the sheaf of groups
represented by $\GL_k(\R)$, and
\[\Vect_k(M)\ \simeq\ \mathbf H(M,B\GL_k).\]
\end{proposition}

\begin{proof}
Descent for bundles is the construction of a bundle from transition functions satisfying the cocycle
condition. Over a Euclidean space every bundle is trivial (by \cref{thm:bundlehomotopy} below, since
$\R^n$ is contractible), which identifies the restriction. An object of $\mathbf H$ is determined by its
restriction to $\Cart$.
\end{proof}

So ``a vector bundle is a map to $B\GL_k$'' is true as stated, in $\mathbf H$, with no homotopy classes
taken; a cocycle $(g_{ij})$ on a cover is the same map written out on the \v{C}ech nerve of the cover. The
object $B\GL_k$ is not a smooth set. Its value on a point is the groupoid of $k$-dimensional vector spaces,
and it is the first place in this book where the $\infty$-topos of \cref{def:shape}, and not just its
$0$-truncated part, is needed.

\section{Homotopy invariance}

\begin{theorem}\label{thm:bundlehomotopy}\Scl[Hirsch 4.1.5, 4.2.4]
Every vector bundle over $M\times I$ is isomorphic to $(\xi|_{M\times0})\times I$. Consequently, if
$f_0,f_1\colon M\to N$ are homotopic and $\xi$ is a bundle over $N$, then $f_0^*\xi\cong f_1^*\xi$.
\end{theorem}

The proof chooses a connection, or in Hirsch's version covers $M\times I$ by product neighbourhoods on which
the bundle is trivial and patches with a partition of unity; either way a bundle over $M\times I$ is
transported along the $I$ direction. In the language of \cref{def:shape}, two bundles over $M$ are concordant
if they are the ends of a bundle over $M\times\R$, and the theorem says that concordant bundles are
isomorphic. The converse is trivial.

\section{Classification}

Let $\Gr_k(\R^s)$ be the Grassmannian of $k$-planes in $\R^s$, a compact manifold of dimension $k(s-k)$, with
tautological bundle $\gamma_k$.

\begin{theorem}[Classification of vector bundles]\label{thm:classify}\Scl[Hirsch 4.3.4]
Let $\xi$ be a vector bundle of rank $k$ over a manifold $M$ of dimension $n$. If $s\ge k+n$ there is a map
$f\colon M\to\Gr_k(\R^s)$ with $f^*\gamma_k\cong\xi$, and if $s>k+n$ it is unique up to homotopy. So for
$s>k+n$,
\[\pi_0\Vect_k(M)\ \cong\ [M,\Gr_k(\R^s)].\]
\end{theorem}

Hirsch proves existence by embedding the bundle in a trivial one, which is a transversality argument, and
uniqueness by the same argument one dimension up. The dimension restrictions are the connectivity of the
inclusion $\Gr_k(\R^s)\to\Gr_k(\R^\infty)=B\Or(k)$.

\begin{theorem}[Concordance classification]\label{thm:concordance}\Sli[\cite{BEBP24}; cf.\ \cref{thm:oka}]
For every $F\in\mathbf H$ and every manifold $M$, the set of concordance classes of sections of $F$ over $M$
is in natural bijection with $[M,\Pi F]$, and more precisely $\Pi[M,F]\simeq\Map(M,\Pi F)$.
\end{theorem}

For $F=B\GL_k$ the shape is the classifying space of the topological group $\GL_k(\R)$, which is
$B\Or(k)$ by Gram--Schmidt (\cref{exer:gram}). Concordance classes are isomorphism classes by
\cref{thm:bundlehomotopy}. So \cref{thm:concordance} gives $\pi_0\Vect_k(M)\cong[M,B\Or(k)]$, which is
\cref{thm:classify} with $s=\infty$; and it gives more, namely the homotopy type
$\Map(M,B\Or(k))$ for the space of all rank-$k$ bundles over $M$, whose fundamental group at $\xi$ is the
group of components of the gauge group of $\xi$.

\Cref{tab:oka} lists other instances. In each row the left-hand side is a geometric structure that can be
pulled back, the right-hand side is a space, and the theorem says that deformation classes of the
structure on $M$ are homotopy classes of maps into the space.

\begin{table}[ht]\centering\small
\begin{tabular}{@{}p{0.34\textwidth}p{0.2\textwidth}p{0.36\textwidth}@{}}
\toprule
$F$ (sections over $M$) & shape $\Pi F$ & classical name\\
\midrule
maps to a manifold $N$ & $N$ & smooth approximation (\cref{cor:homotopy})\\
vector bundles of rank $k$ & $B\Or(k)$ & \cref{thm:classify}\\
principal $G$-bundles, $G$ a Lie group & $BG$ & classification of principal bundles\\
vector bundles with connection & $B\Or(k)$ & connections form a contractible space\\
closed differential $p$-forms & $K(\R,p)$ & de Rham's theorem\\
all differential $p$-forms & $\pt$ & forms are contractible\\
bundles of closed $d$-manifolds & $\coprod_{[W]}B\Diff(W)$ & classification of manifold bundles\\
\bottomrule
\end{tabular}
\caption{Instances of \cref{thm:concordance}. The union in the last row is over diffeomorphism classes of
closed $d$-manifolds.}\label{tab:oka}
\end{table}

The fifth row deserves a comment. Two closed $p$-forms on $M$ are concordant exactly when they are
cohomologous (\cref{exer:forms} for $p=1$), so the theorem says $H^p_{\mathrm{dR}}(M)\cong[M,K(\R,p)]$, which is
de Rham's theorem. The sheaf of closed forms is not homotopy invariant; its concordance classes are.

\section{Bundles as idempotents}

\begin{theorem}\label{thm:swan}\Scl[Swan; Hirsch 4.3.3]
Every vector bundle $\xi$ over a manifold $M$ has a complement: a bundle $\eta$ with $\xi\oplus\eta$ trivial.
The functor of sections is an equivalence from vector bundles over $M$ to finitely generated projective
$C^\infty(M)$-modules, taking $\oplus$ and $\otimes$ to $\oplus$ and $\otimes_{C^\infty(M)}$.
\end{theorem}

So the category of vector bundles over $M$ is the idempotent completion of the category of trivial bundles,
just as $\Mfd$ is the idempotent completion of $\cat{Open}$ (\cref{thm:karoubi}), and for the same reason:
finite dimension bounds the number of charts needed. A complement exhibits $\xi$ as the image of an
idempotent endomorphism $e$ of a trivial bundle $M\times\R^s$, that is, of a smooth map from $M$ to the
manifold of idempotent $s\times s$ matrices of rank $k$. Projecting an idempotent to the orthogonal
projection with the same image identifies that manifold, up to homotopy, with $\Gr_k(\R^s)$. A classifying
map and a complement are the same datum.

\begin{example}\label{ex:taut}
Over the circle $\RP^1=\R/\pi\Z$ the matrix
$e(\theta)=\bigl(\begin{smallmatrix}\cos^2\theta&\cos\theta\sin\theta\\\cos\theta\sin\theta&\sin^2\theta
\end{smallmatrix}\bigr)$ is an idempotent of rank $1$; its image is the tautological line bundle. A unit
vector in the image transported once around the circle returns to its negative, so the bundle is the Möbius
band. Over $S^n$ the idempotent $e(x)=I-xx^{\mathsf T}$ on $\R^{n+1}$ has image $TS^n$ and complement the
trivial normal line. The script checks both.
\end{example}

\section{Orientations and tangential structures}

A bundle is \term{orientable} if its transition functions can be chosen in $\GL_k^+(\R)$; an
\term{orientation} is such a choice up to equivalence. In terms of classifying maps, an orientation is a
lift of $M\to B\Or(k)$ through the double cover $B\SO(k)\to B\Or(k)$, and the obstruction to its existence is
the class $w_1(\xi)\in H^1(M;\Z/2)$ pulled back from the generator of $H^1(B\Or(k);\Z/2)$. A manifold is
orientable if its tangent bundle is.

\begin{definition}\label{def:theta}
A \term{tangential structure} is a map of spaces $\theta\colon B\to B\Or(d)$. A \term{$\theta$-structure} on a
$d$-manifold $M$ is a lift of the classifying map $\tau_M\colon M\to B\Or(d)$ of $TM$ through $\theta$.
\end{definition}

Orientations ($B=B\SO(d)$), framings ($B=\pt$), spin structures, almost complex structures, and maps to a
fixed background space $X$ ($B=B\Or(d)\times X$) are all of this form. Because $\theta$-structures pull back
along open embeddings and are defined by a lifting problem in spaces, the stack of $d$-manifolds with
$\theta$-structure is again an object to which \cref{thm:concordance} applies; this is how the tangential
structures of \cref{ch:cobordism} enter.

\begin{theorem}\label{thm:nonorient}\Scl[Hirsch 4.4.7]
A closed non-orientable $n$-manifold does not embed in a simply connected $(n+1)$-manifold. In particular
$\RP^{2n}$ does not embed in $\R^{2n+1}$.
\end{theorem}

\begin{proof}
Let $M\subset N$ be such an embedding with normal line bundle $\nu$. A loop in $N$ transverse to $M$ meets
it in an even number of points, since the count modulo $2$ is a homotopy invariant
(\cref{thm:intersection}) and the loop is null-homotopic. A loop in $M$ along which $\nu$ is non-trivial
can be pushed off $M$ to a loop meeting $M$ once. So $\nu$ is trivial, and
$TM\oplus\nu\cong TN|_M$ gives $w_1(TM)=w_1(TN|_M)=0$, as $N$ is simply connected.
\end{proof}

\section{The tangent bundle as a map}

The tangent bundle of an $m$-manifold is a point $\tau_M$ of $\Map(M,B\Or(m))$. For a submanifold
$M\subset\R^{m+k}$ the classifying map can be taken to be the Gauss map $x\mapsto T_xM\in\Gr_m(\R^{m+k})$, and
the normal bundle is classified by $x\mapsto(T_xM)^\perp$. The normal bundle depends on the embedding, but
its class in $[M,B\Or]$, where $B\Or=\colim_kB\Or(k)$, does not; this \term{stable normal bundle} $\nu_M$ is
inverse to $\tau_M$ under direct sum, and \cref{ch:tubular} shows that it is well defined as a point of a
contractible space of choices. Characteristic classes of $M$ are the pullbacks along $\tau_M$ or $\nu_M$
of classes in $H^*(B\Or;\Z/2)=\Z/2[w_1,w_2,\dots]$. Every invariant of manifolds used in
\cref{ch:degree,ch:cobordism} is obtained from $\tau_M$, as a consequence of the remark after
\cref{prop:jets}.

\section*{Notes}

Steenrod's book is the classical source for classification by maps to Grassmannians; Hirsch's treatment by
transversality is his own. The stack-theoretic formulation is standard; see \cite{Sch13}. The equivalence
with projective modules is Swan's, after Serre. \Cref{thm:concordance} has a long prehistory: Brown
representability, Gromov's sheaf-theoretic h-principle, and Madsen and Weiss's use of concordance in the
proof of the Mumford conjecture.

\section*{Exercises}

\begin{exercise}\label{exer:mobius}
Show that the tautological line bundle over $\RP^1$ is not trivial, and that its total space is the open
Möbius band.
\end{exercise}

\begin{exercise}\label{exer:swan}
Let $e\colon M\to\R^{s\times s}$ be smooth with $e^2=e$ and constant rank $k$. Show that the image of $e$ is a
vector bundle whose module of sections is $e\,C^\infty(M)^s$, a direct summand of a free module.
\end{exercise}

\begin{exercise}\label{exer:TS}
Show that $TS^n\oplus\R$ is trivial, and conclude that the composite $S^n\to B\Or(n)\to B\Or$ classifying the
stable tangent bundle is null-homotopic.
\end{exercise}

\begin{exercise}\label{exer:forms}
Show that two closed $1$-forms on $M$ are concordant (are the restrictions to $M\times\{0\}$ and
$M\times\{1\}$ of a closed $1$-form on $M\times\R$) if and only if they differ by an exact form.
\end{exercise}

\begin{exercise}\label{exer:lines}
Show that isomorphism classes of line bundles over $M$ correspond to $H^1(M;\Z/2)=\Hom(\pi_1M,\Z/2)$, and
count them for the torus and for the Klein bottle. Which one is the determinant of the tangent bundle?
\end{exercise}
%% ---- end ch/05-bundles.tex ----
%% ---- begin ch/06-tubular.tex ----
\chapter{Tubular Neighbourhoods, Collars, and Spaces of Choices}\label{ch:tubular}

The second half of Hirsch's fourth chapter proves that a submanifold has a tubular neighbourhood, that the
boundary of a manifold has a collar, and that each is unique up to isotopy. The uniqueness statements are
what allow later constructions (connected sums, gluing of cobordisms, the Pontryagin--Thom collapse) to be
called well defined. ``Unique up to isotopy'' says that a space of choices is connected. In every case in
this chapter the space of choices is in fact contractible, and that stronger statement is what makes the
constructions functorial.

\section{Tubular neighbourhoods}

\begin{definition}\label{def:tub}
Let $M\subset N$ be a submanifold, both without boundary. A \term{tubular neighbourhood} of $M$ in $N$ is a
vector bundle $\xi=(p,E,M)$ with an embedding $\varphi\colon E\to N$ onto an open set that restricts to the
identity on the zero section. The \term{normal bundle} is $\nu=\nu(M,N)=TN|_M/TM$.
\end{definition}

The differential of $\varphi$ along the zero section identifies $\xi$ with $\nu$, so one may take $\xi=\nu$.

\begin{theorem}[Tubular neighbourhoods]\label{thm:tubular}\Scl[Hirsch 4.5.2, 4.5.3]
Every submanifold $M\subset N$ has a tubular neighbourhood, and any two are isotopic relative to $M$.
\end{theorem}

The existence proof embeds $N$ in a Euclidean space, uses the normal exponential map
$(x,v)\mapsto x+v$ there, which is a local diffeomorphism along the zero section by the inverse function
theorem, and retracts back to $N$. For the unit circle in the plane the map is
$(\theta,t)\mapsto(1+t)(\cos\theta,\sin\theta)$, with Jacobian determinant $1+t$; it is an embedding for
$t>-1$. In general the radius is limited by the focal points of $M$ (\cref{exer:focal}).

\begin{theorem}\label{thm:tubcontract}\Sli[folklore; see \cite{God07}]
The space $\Tub(M,N)$ of tubular neighbourhoods $\varphi\colon\nu\to N$ whose differential along the zero
section induces the identity of $\nu$ is contractible.
\end{theorem}

\begin{proof}[Idea of proof]
Given two, first shrink one fibrewise until its image lies in the image of the other; this is a canonical
path. Then $\psi=\varphi_0^{-1}\varphi_1$ is an embedding of $\nu$ in itself, fixing the zero section, with
fibre derivative the identity there, and $\psi_t(v)=\psi(tv)/t$ for $0<t\le1$ extends smoothly to $t=0$ by the
identity. Both steps depend continuously on parameters.
\end{proof}

With boundary, the right notion is that of a neat submanifold (\cref{def:neat}), and the theorems hold with
tubular neighbourhoods that restrict to tubular neighbourhoods in the boundary (Hirsch 4.6.3, 4.6.4).

\section{Collars and gluing}

\begin{theorem}[Collars]\label{thm:collar}\Scl[Brown; Hirsch 4.6.1]
For a manifold $M$ with boundary there is an embedding $\partial M\times[0,\infty)\to M$ extending the
identity of $\partial M\times0$. Any two are isotopic, and the space of collars is contractible.
\end{theorem}

\begin{theorem}[Gluing]\label{thm:gluing}\Scl[Hirsch 8.2.1, 8.2.3]
Let $P,Q$ be manifolds with boundary and $f\colon\partial Q\to\partial P$ a diffeomorphism. The space
$P\cup_fQ$ has a smooth structure restricting to the given ones on $P$ and $Q$; any two such structures are
diffeomorphic by a diffeomorphism supported near the seam; and isotopic gluing maps give diffeomorphic
results.
\end{theorem}

The smooth structure is built by choosing collars on both sides and declaring the union of the two collars
to be a product neighbourhood of the seam. So composition of cobordisms is defined only after a choice, and
the choice is from a contractible space. A category whose composition depends on contractible choices is
an $\infty$-category presented in the usual way, and this is the elementary reason that cobordism categories
are $\infty$-categories (\cref{ch:cobordism}). The dependence on the isotopy class of $f$ is real: gluing two
discs along a diffeomorphism of $S^{n-1}$ not isotopic to one that extends over the disc can give an exotic
sphere (\cref{exer:alexander}).

\section{Contractible spaces of choices}

\begin{principle}[Choices]\label{prin:choices}\Srf
Let $p\colon\mathcal E\to\mathcal B$ be a map of spaces whose fibres are contractible. Then $p$ is an
equivalence, and every functor on $\mathcal E$ factors essentially uniquely through $\mathcal B$. A
construction on objects $b$ that requires a choice $c$ from a contractible space $\mathcal E_b$ is
therefore as good as a construction on the objects alone.
\end{principle}

\Cref{tab:choices} lists the cases used in this book. The first four are convex or affine and need no
argument. The fifth and sixth are \cref{thm:tubcontract,thm:collar}. The seventh is Whitney's theorem with
parameters.

\begin{table}[ht]\centering\small
\begin{tabular}{@{}p{0.42\textwidth}p{0.46\textwidth}@{}}
\toprule
choice & what it makes well defined\\
\midrule
inner product on a vector bundle & reduction $B\GL_k\simeq B\Or(k)$; sphere and disc bundles\\
Riemannian metric on $M$ & exponential maps, gradients\\
connection on a bundle & parallel transport, \cref{thm:bundlehomotopy}\\
partition of unity subordinate to a cover & gluing of local constructions\\
tubular neighbourhood of $M\subset N$ & collapse maps, normal data\\
collar of $\partial M$ & gluing, composition of cobordisms\\
embedding $M\to\R^\infty$ & stable normal bundle; a model of $B\Diff(M)$\\
\bottomrule
\end{tabular}
\caption{Contractible spaces of choices.}\label{tab:choices}
\end{table}

\begin{theorem}\label{thm:embcontract}\Scl[Whitney]
For every manifold $M$ the space $\Emb(M,\R^\infty)=\colim_q\Emb(M,\R^q)$ is weakly contractible.
\end{theorem}

It is non-empty by \cref{thm:whitney}. Contractibility is a two-step linear homotopy: move a family of
embeddings into the odd coordinates, then slide it to a fixed embedding placed in the even coordinates
(\cref{exer:shift}). The group $\Diff(M)$ acts freely on $\Emb(M,\R^\infty)$, and the quotient, the space of
submanifolds of $\R^\infty$ diffeomorphic to $M$, is therefore a model for the classifying space
$B\Diff(M)$. A map $B\to B\Diff(M)$ is a family of submanifolds of $\R^\infty$ parametrized by $B$, that is, a
bundle of manifolds with fibre $M$; this is the last row of \cref{tab:oka}.

\section{The collapse map and Thom spaces}

\begin{definition}\label{def:thom}
The \term{Thom space} $\Th(\xi)$ of a vector bundle $\xi$ over a compact base is the one-point
compactification of its total space; equivalently the quotient $D(\xi)/S(\xi)$ of the unit disc bundle by
the unit sphere bundle, for any inner product.
\end{definition}

\begin{proposition}\label{prop:thom}\Scl
$\Th(\xi\times\eta)\cong\Th(\xi)\wedge\Th(\eta)$; $\Th(\xi\oplus\R^j)\cong\Sigma^j\Th(\xi)$; the Thom space of
the trivial bundle $M\times\R^k$ is $\Sigma^kM_+$; and the Thom space of the tautological line bundle over
$\RP^n$ is $\RP^{n+1}$.
\end{proposition}

Let $M\subset\R^{n+k}$ be a closed submanifold of dimension $n$ with a tubular neighbourhood
$\varphi\colon\nu\to U$. The \term{Pontryagin--Thom collapse} is the map
\[c\colon S^{n+k}=\R^{n+k}\cup\{\infty\}\longrightarrow U^+\cong\Th(\nu)\]
that is $\varphi^{-1}$ on $U$ and sends everything else to the point at infinity. More generally an
embedding $M\subset N$ of closed manifolds gives $N_+\to\Th(\nu(M,N))$. By \cref{thm:tubcontract} and
\cref{prin:choices} the collapse is a well-defined point of a mapping space, not merely a homotopy
class. It is a map in the wrong direction, from the ambient manifold to (a twisted suspension of) the
submanifold, and it is the geometric source of all wrong-way maps in cohomology.

The Thom space depends on the embedding only through a suspension. By \cref{thm:embcontract} the
desuspended suspension spectrum
\[M^{-TM}=\Sigma^{-(n+k)}\Sigma^\infty\Th(\nu)\]
is well defined; it is the Thom spectrum of the stable normal bundle $\nu_M=-TM$.

\begin{theorem}[Atiyah duality]\label{thm:atiyah}\Scl[Atiyah \cite{Ati61}; Milnor--Spanier]
For a closed manifold $M$ the suspension spectrum $\Sigma^\infty_+M$ is dualizable in the stable homotopy
category, with dual $M^{-TM}$. The coevaluation $\mathbb S\to\Sigma^\infty_+M\wedge M^{-TM}$ is the collapse
$S^{n+k}\to\Th(\nu)$ followed by the diagonal $\Th(\nu)\to M_+\wedge\Th(\nu)$. The evaluation is the collapse
for the diagonal embedding $M\to M\times M$, whose normal bundle is $TM$.
\end{theorem}

Dualizability and its use are recalled in \cref{app:toolkit}. The theorem is the homotopy-theoretic form of
Poincaré duality, and \cref{ch:degree} uses it to compute Euler characteristics.

\section{The normal bundle without choices}

There is a short exact sequence $0\to TM\to TN|_M\to\nu\to0$, so the normal bundle is the cofibre of the
map of tangent bundles; in the notation of \cref{ch:transversality} it is the degree-$1$ part of the
relative tangent complex of $M\to N$. The tubular neighbourhood theorem says that the germ of $N
$ along $M$ is diffeomorphic to the germ of $\nu$ along its zero section. There is a canonical object behind
the non-canonical diffeomorphism.

\begin{proposition}[Deformation to the normal bundle]\label{prop:deformation}\Scl
There is a manifold $\mathcal D(M,N)$ with a submersion to $\R$ whose fibre over $t\ne0$ is $N$ and whose
fibre over $0$ is $\nu(M,N)$, containing $M\times\R$ as a closed submanifold. It is functorial for maps of
pairs. A tubular neighbourhood is a trivialization of this family near $M\times\R$.
\end{proposition}

For the diagonal $M\subset M\times M$ this is Connes's tangent groupoid, interpolating between the pair
groupoid of $M$ and the tangent bundle. The proposition illustrates a general pattern: where the classical
text makes a choice and proves uniqueness up to isotopy, there is usually a canonical object in a larger
category of which the choices are trivializations.

By \cref{ex:derived}(c) the derived self-intersection $M\times^h_NM$ depends only on the normal bundle: its
functions are $\Gamma(\Lambda^\bullet\nu^\vee)$. Its virtual dimension is $2\dim M-\dim N$, and its cobordism
class is that of the zero set of a generic section of $\nu$ (\cref{prop:clean}).

\section*{Notes}

Hirsch's proofs of uniqueness of tubular neighbourhoods and collars give isotopies depending continuously on
the data, which is most of the way to contractibility; the statements with parameters are spelled out in
\cite{God07} and in the literature on cobordism categories \cite{GMTW09}. The collapse map is Pontryagin's
for framed submanifolds and Thom's in general. For Thom spectra of virtual bundles and their multiplicative
properties see \cite{ABGHR14}. The deformation to the normal cone is due to Fulton and MacPherson in
algebraic geometry; the smooth version is in Connes's and Higson's work on index theory.

\section*{Exercises}

\begin{exercise}\label{exer:gram}
Show that the space of inner products on a finite-dimensional real vector space is convex, and that
$\Or(k)\to\GL_k(\R)$ is a homotopy equivalence. Deduce $B\GL_k(\R)\simeq B\Or(k)$.
\end{exercise}

\begin{exercise}\label{exer:shift}
Prove \cref{thm:embcontract} for $\pi_0$: any two embeddings $M\to\R^\infty$ are isotopic through embeddings.
Explain why the straight-line homotopy between two embeddings in $\R^q$ need not be an isotopy.
\end{exercise}

\begin{exercise}\label{exer:focal}
For a closed plane curve with curvature $\kappa$ and inward unit normal $n$, show that
$(s,t)\mapsto\gamma(s)+t\,n(s)$ has Jacobian determinant $1-t\kappa(s)$. Find the largest $r$ such that the
map is a local diffeomorphism for $|t|<r$ when the curve is the ellipse with semi-axes $a>b$.
\end{exercise}

\begin{exercise}\label{exer:thom}
Prove \cref{prop:thom}.
\end{exercise}

\begin{exercise}\label{exer:alexander}
Let $f$ be a diffeomorphism of $S^{n-1}$ and $\Sigma_f=D^n\cup_fD^n$. Show that $\Sigma_f$ is homeomorphic to
$S^n$, and diffeomorphic to $S^n$ if $f$ extends to a diffeomorphism of $D^n$.
\end{exercise}
%% ---- end ch/06-tubular.tex ----
%% ---- begin ch/07-degree.tex ----
\chapter{Degree, Intersection Numbers, and the Euler Characteristic}\label{ch:degree}

Hirsch's fifth chapter is where the method of the Preface first produces numbers. Each invariant is a signed
count of points in a transverse preimage, and each proof of invariance exhibits two such counts as the two
ends of a compact oriented $1$-manifold. In the terms of \cref{ch:transversality}, each invariant is the
class in $\Omega_0=\Z$ (or $\mathfrak N_0=\Z/2$) of a compact derived manifold of virtual dimension zero. This
chapter records the invariants in that form and then gives the second, independent description of the Euler
characteristic and the Lefschetz number as traces.

\section{Degree}

\begin{definition}\label{def:degree}
Let $M,N$ be closed oriented $n$-manifolds with $N$ connected, $f\colon M\to N$ smooth, and $y$ a regular value.
The \term{degree} is $\deg f=\sum_{x\in f^{-1}(y)}\operatorname{sign}\det df_x$. Without orientations the
\term{mod $2$ degree} is $\#f^{-1}(y)$ modulo $2$.
\end{definition}

\begin{theorem}\label{thm:degree}\Scl[Brouwer; Hirsch 5.1.6, 5.1.8]
\begin{enumerate}[label=(\alph*)]
\item $\deg f$ does not depend on the regular value, and homotopic maps have the same degree.
\item If $M=\partial W$ with $W$ compact oriented and $f$ extends to $W$, then $\deg f=0$.
\item If $W$ is connected and $N=S^n$, the converse of (b) holds: a map $\partial W\to S^n$ of degree zero
extends to $W$.
\end{enumerate}
\end{theorem}

\begin{proof}[Proof of (a) and (b)]
Let $F\colon W\to N$ extend $f$, and let $y$ be a regular value of $F$ and of $f$ (\cref{thm:sard}). By
\cref{thm:neat}, $F^{-1}(y)$ is a compact oriented $1$-manifold with boundary $f^{-1}(y)$, and the boundary
orientation is the sign in the definition. The signed number of boundary points of a compact oriented
$1$-manifold is zero. Homotopy invariance is the case $W=M\times I$. Independence of $y$ follows because any
two points of a connected manifold are exchanged by a diffeomorphism isotopic to the identity
(\cref{ch:isotopy}).
\end{proof}

For example $z\mapsto z^k$ on the circle has degree $k$, and the antipodal map of $S^n$ has degree
$(-1)^{n+1}$ (\cref{exer:degzk}). The script computes the first both by counting preimages and as a
winding-number integral.

\begin{theorem}[Hopf]\label{thm:hopf}\Scl[Hopf; Hirsch 5.1.10]
Let $M$ be a closed connected $n$-manifold. If $M$ is oriented, $\deg\colon[M,S^n]\to\Z$ is a bijection. If
$M$ is not orientable, the mod $2$ degree $[M,S^n]\to\Z/2$ is a bijection.
\end{theorem}

\section{Hopf's theorem as a classification theorem}

There are two ways to see \cref{thm:hopf} as an instance of something general, and they are dual.

The first is geometric. For a closed manifold $M$ let $\mathcal F_k(M)$ be the set of closed submanifolds
$A\subset M$ of codimension $k$ equipped with a framing of the normal bundle $\nu(A,M)$. For any $k$, taking
the preimage of a regular value gives a bijection
\[[M,S^k]\ \cong\ \mathcal F_k(M)\,/\,\text{framed cobordism in }M\times I,\]
with inverse the collapse $M\to\Th(\nu(A,M))\cong\Sigma^kA_+\to S^k$ of \cref{ch:tubular}. This is the
Pontryagin--Thom construction inside $M$ \cite{Pon55}. For $k=n$ a framed submanifold is a finite set of points
with signs, and a framed cobordism cancels pairs of opposite sign; if $M$ is connected and oriented the
classes are counted by the total sign, and if $M$ is non-orientable a point can be carried around an
orientation-reversing loop and return with the opposite sign, so only the parity remains.

The second is homotopical. The map $S^n\to K(\Z,n)$ inducing an isomorphism on $\pi_n$ is $(n+1)$-connected,
so $[M,S^n]\to[M,K(\Z,n)]=H^n(M;\Z)$ is a bijection for $\dim M\le n$; and $H^n(M;\Z)$ is $\Z$ or $\Z/2$
according to orientability. The two readings are identified by Poincaré duality,
$H^n(M;\Z)\cong H_0(M;\Z^{w})$ with twisted coefficients, a class in the latter being a finite set of points
with local orientations.

\section{Intersection numbers}

\begin{theorem}\label{thm:intersection}\Scl[Hirsch 5.2.1]
Let $f\colon M\to N$ be a map of oriented manifolds and $A\subset N$ a closed oriented submanifold, with $M$
compact and $\dim M+\dim A=\dim N$. If $f\trans A$, put $\#(f,A)=\sum_{x\in f^{-1}(A)}\pm1$, the sign comparing
$df_x(T_xM)\oplus T_{f(x)}A$ with $T_{f(x)}N$. Then homotopic maps transverse to $A$ have the same
intersection number. Without orientations the same holds modulo $2$.
\end{theorem}

So $\#(f,A)$ is defined for every $f$, by perturbing. In the language of \cref{ch:transversality} no
perturbation is needed to define it:
\[\#(f,A)=\bigl[M\times^h_NA\bigr]\in\Omega_0=\Z,\]
the cobordism class of the derived fibre product, which is compact of virtual dimension zero
(\cref{thm:spivak}). Degree is the case $A=\{y\}$.

\begin{example}\label{ex:torus}
On the torus $\R^2/\Z^2$ the closed curve of slope class $(a,b)$ and the curve of class $(c,d)$, in general
position, meet in $|ad-bc|$ points all of the same sign, and the intersection number is $ad-bc$. The
script counts the intersection points for several pairs.
\end{example}

\section{The Euler number}

\begin{definition}\label{def:euler}
Let $\xi$ be an oriented vector bundle of rank $n$ over a closed oriented $n$-manifold $M$, with zero section
$Z$. Its \term{Euler number} is $\chi(\xi)=\#(Z,Z)$, the signed number of zeros of a section transverse to
$Z$. The Euler characteristic of $M$ is $\chi(M)=\chi(TM)$.
\end{definition}

\begin{theorem}\label{thm:euler}\Scl[Hopf; Hirsch 5.2.2, 5.2.3, 5.2.5, 5.2.10]
\begin{enumerate}[label=(\alph*)]
\item If $\xi$ has a nowhere-zero section then $\chi(\xi)=0$; if $M$ is connected the converse holds.
\item $\chi(\xi)=0$ if $n$ is odd.
\item $\chi(S^n)=1+(-1)^n$, and $\chi(M\times N)=\chi(M)\chi(N)$.
\item (Poincaré--Hopf) For a vector field on $M$ with isolated zeros, the sum of the indices is $\chi(M)$.
\end{enumerate}
\end{theorem}

The Euler number is the class of the derived self-intersection of the zero section, which by
\cref{ex:derived}(c) is the derived manifold with functions $\Gamma(\Lambda^\bullet\xi^\vee)$. Part (b) is
the observation that $s\mapsto-s$ is an automorphism of this object that multiplies its orientation by
$(-1)^n$. The converse in (a) is an instance of \cref{thm:degree}(c): the zeros of a section can be gathered
into a disc by an isotopy, and the section on the boundary sphere then has degree zero and extends without
zeros.

\section{Traces}

The second description starts from a definition that makes no mention of manifolds
(\cref{app:toolkit}). In a symmetric monoidal category an object $X$ is \term{dualizable} if there are
$X^\vee$, a coevaluation $\eta\colon\mathbf 1\to X\otimes X^\vee$ and an evaluation
$\epsilon\colon X^\vee\otimes X\to\mathbf 1$ satisfying the triangle identities. The \term{trace} of an
endomorphism $f$ of such an $X$ is the composite
\[\tr(f)\colon\ \mathbf 1\xrightarrow{\ \eta\ }X\otimes X^\vee\xrightarrow{\ f\otimes1\ }X\otimes X^\vee
\xrightarrow{\ \text{swap}\ }X^\vee\otimes X\xrightarrow{\ \epsilon\ }\mathbf 1 ,\]
an element of the commutative monoid $\operatorname{End}(\mathbf 1)$, and $\chi(X)=\tr(\id_X)$.

\begin{proposition}\label{prop:trace}\Scl[Dold--Puppe \cite{DP80}]
$\tr(fg)=\tr(gf)$; $\tr(f\otimes g)=\tr(f)\tr(g)$; and symmetric monoidal functors preserve dualizable
objects and traces. In finite-dimensional vector spaces $\tr$ is the trace of a matrix. In graded vector
spaces with the Koszul sign in the symmetry it is the alternating sum of the traces on the graded pieces.
\end{proposition}

\begin{theorem}[Lefschetz--Hopf, after Dold and Puppe]\label{thm:DP}\Scl[\cite{DP80}]
Let $M$ be a closed manifold and $f\colon M\to M$ a map. The trace of $\Sigma^\infty_+f$ in the stable homotopy
category is an integer, an element of $\pi_0\mathbb S=\Z$, and:
\begin{enumerate}[label=(\roman*)]
\item it equals the Lefschetz number $L(f)=\sum_i(-1)^i\tr\bigl(f_*\mid H_i(M;\mathbb Q)\bigr)$;
\item it equals the intersection number of the graph of $f$ with the diagonal in $M\times M$; if the fixed
points of $f$ are non-degenerate, this is $\sum_{f(x)=x}\operatorname{sign}\det(1-df_x)$.
\end{enumerate}
In particular $\chi(M)=\sum_i(-1)^i\dim H_i(M;\mathbb Q)=\#(\Delta,\Delta)=\chi(TM)$.
\end{theorem}

\begin{proof}[Sketch]
(i) Rational homology is a symmetric monoidal functor from finite spectra to graded vector spaces, by the
Künneth theorem; apply \cref{prop:trace}. (ii) By \cref{thm:atiyah} the coevaluation is the collapse onto a
tubular neighbourhood of $M\subset\R^{n+k}$ and the evaluation is the collapse onto a tubular neighbourhood of
the diagonal. The composite defining the trace is a map $S^{n+k}\to S^{n+k}$ whose preimage of the base point
of the last collapse is the set of fixed points of $f$, and the local degree at a non-degenerate fixed point
is the sign of $\det(1-df_x)$.
\end{proof}

So the equality of the two definitions of the Euler characteristic, which the source reaches at the end of
its treatment of Morse theory (Hirsch 6.3.8), is the statement that a trace can be computed either after
applying a monoidal functor or before. The multiplicativity $\chi(M\times N)=\chi(M)\chi(N)$ is
$\tr(f\otimes g)=\tr(f)\tr(g)$. Additivity over pushouts, $\chi(A\cup B)=\chi(A)+\chi(B)-\chi(A\cap B)$, is a
property of traces in stable settings \cite{May01}, and gives the formula
$\chi(M)=\sum(-1)^k\nu_k$ in terms of the numbers of critical points of a Morse function
(\cref{ch:morse}).

\begin{example}\label{ex:lefschetz}
A matrix $A\in\GL_2(\Z)$ acts on the torus. On $H_0,H_1,H_2$ its traces are $1$, $\tr A$, $\det A$, so
$L(A)=1-\tr A+\det A=\det(1-A)$. The fixed points are the solutions of $(A-1)x\in\Z^2$ modulo $\Z^2$;
there are $|\det(A-1)|$ of them and each has index $\operatorname{sign}\det(1-A)$. The script enumerates
them for several $A$.
\end{example}

\section{The diagonal, three ways}

The self-intersection of the diagonal has now appeared in three forms.

\begin{proposition}\label{prop:three}\Srf[Hirsch 5.2, 6.3.8; \cite{DP80}]
For a closed manifold $M$ and $f\colon M\to M$, the following integers are equal:
\begin{enumerate}[label=(\roman*)]
\item the signed number of fixed points of a generic perturbation of $f$;
\item the class in $\Omega_0$ of the derived fixed-point object
$M\times^h_{M\times M}M$, the fibre product of the graph of $f$ and the diagonal;
\item the trace of $\Sigma^\infty_+f$.
\end{enumerate}
For $f=\id$ the object in (ii) has functions the differential forms $\Gamma(\Lambda^\bullet T^*M)$ in
homological degrees, and the integer is $\chi(M)$.
\end{proposition}

Form (i) is the definition in the source; it requires a choice and a proof of independence. Form (ii)
requires no choice but lives in $\DMfd$. Form (iii) requires no manifold: it makes sense for any dualizable
object, and it is the one that generalizes, to parametrized families, to equivariant settings, and to
bicategories, where the Lefschetz number acquires a refinement due to Reidemeister \cite{PS14}.

The derived fixed-point object of the identity is the smooth counterpart of the derived loop space of
algebraic geometry. That its functions are differential forms is the Hochschild--Kostant--Rosenberg
theorem in this setting, and the Euler characteristic is then the ``dimension'' of $M$ in the sense in
which the dimension of a vector space is the trace of its identity map.

\begin{example}[Linking numbers]\label{ex:linking}
For disjoint oriented closed curves $K,L\subset\R^3$ the linking number is the degree of the Gauss map
$K\times L\to S^2$, $(x,y)\mapsto(y-x)/|y-x|$. It equals the intersection number of $L$ with any oriented
surface bounded by $K$, and it is given by Gauss's integral. For the Hopf link it is $\pm1$, and the
script evaluates the integral numerically.
\end{example}

\section*{Notes}

The treatment of degree by regular values and one-dimensional cobordisms is Pontryagin's and is the subject
of Milnor's \emph{Topology from the Differentiable Viewpoint}. The trace in a symmetric monoidal category
and its application to fixed point theory are due to Dold and Puppe; see also \cite{May01} for additivity
and \cite{PS14} for an exposition and the bicategorical refinement. Derived loop spaces and their relation
to differential forms are due to Ben-Zvi and Nadler and to Toën and Vezzosi in the algebraic setting.

\section*{Exercises}

\begin{exercise}\label{exer:degzk}
Show that $z\mapsto z^k$ has degree $k$ on $S^1$ and that the antipodal map of $S^n$ has degree $(-1)^{n+1}$.
Deduce that every vector field on $S^{2m}$ has a zero.
\end{exercise}

\begin{exercise}\label{exer:lefschetz}
Verify \cref{ex:lefschetz}: for $A\in\GL_2(\Z)$ with $\det(A-1)\ne0$, the induced map of the torus has
exactly $|\det(A-1)|$ fixed points, each of index $\operatorname{sign}\det(1-A)$.
\end{exercise}

\begin{exercise}\label{exer:trace}
Prove $\tr(fg)=\tr(gf)$ and $\tr(f\otimes g)=\tr(f)\tr(g)$ from the definition, and show that in graded vector
spaces with the Koszul sign rule the trace of a degree-preserving endomorphism is the alternating sum of the
traces of its components.
\end{exercise}

\begin{exercise}\label{exer:chiSn}
Compute $\chi(S^n)$ from a vector field with two zeros, and again as $\sum(-1)^i\dim H_i$.
\end{exercise}

\begin{exercise}\label{exer:linking}
Let $K$ be the unit circle in the $xy$-plane and $L$ the circle of radius $1$ centred at $(1,0,0)$ in the
$xz$-plane. Compute the linking number as the intersection number of $L$ with the disc bounded by $K$.
\end{exercise}
%% ---- end ch/07-degree.tex ----
\part{Decompositions and Moduli}
%% ---- begin ch/08-morse.tex ----
\chapter{Morse Theory}\label{ch:morse}

A Morse function on a manifold is a generic point of the mapping object $[M,\R]$, and Hirsch's sixth chapter
shows how much of the manifold such a point determines: a decomposition into handles, a cell structure,
inequalities for the Betti numbers, the Euler characteristic. In categorical terms a Morse function presents
the homotopy type of $M$ as an iterated pushout, and presents $M$ itself as a composite of elementary
cobordisms. This chapter states the classical theorems in that form, and then turns to what the source does
not treat: the structure on the set of all Morse functions, which is where the presentations become
canonical.

\section{Morse functions}

\begin{definition}\label{def:morse}
A critical point $p$ of $f\colon M\to\R$ is \term{non-degenerate} if the Hessian of $f$ at $p$ is a
non-degenerate quadratic form; its \term{index} is the number of negative eigenvalues. $f$ is a \term{Morse
function} if all its critical points are non-degenerate. Its \term{type} is $(\nu_0,\dots,\nu_n)$, with
$\nu_k$ the number of critical points of index $k$.
\end{definition}

\begin{theorem}\label{thm:morselemma}\Scl[Morse; Hirsch 6.1.1, 6.1.2]
Near a non-degenerate critical point of index $k$ there are coordinates in which
$f=f(p)-x_1^2-\dots-x_k^2+x_{k+1}^2+\dots+x_n^2$. Morse functions form an open dense subset of
$C^\infty_S(M,\R)$.
\end{theorem}

Density was derived in \cref{cor:counts}(c) from jet transversality: $f$ is Morse when $df$ is transverse
to the zero section of $T^*M$.

\begin{example}\label{ex:torusheight}
On the torus with coordinates $(\theta,\varphi)$ let $f=(R+r\cos\varphi)\cos\theta$, $R>r>0$, the height
function of a torus standing on its edge. The critical points are the four points with
$\theta,\varphi\in\{0,\pi\}$, and the Hessian there is diagonal with entries
$-(R+r\cos\varphi)\cos\theta$ and $-r\cos\varphi\cos\theta$. The indices are $2,1,1,0$ at
$(0,0),(0,\pi),(\pi,\pi),(\pi,0)$, with critical values $R+r,\ R-r,\ -(R-r),\ -(R+r)$. The type is $(1,2,1)$.
\end{example}

\section{Regular intervals}

\begin{theorem}[Regular interval]\label{thm:regint}\Scl[Hirsch 6.2.2]
Let $f\colon M\to[a,b]$ be smooth on a compact manifold with boundary, with no critical points and
$f(\partial M)=\{a,b\}$. Then there is a diffeomorphism $M\cong f^{-1}(a)\times[a,b]$ commuting with the
maps to $[a,b]$.
\end{theorem}

The proof integrates the vector field $\grad f/|\grad f|^2$, along which $f$ increases at unit speed. The
theorem is the one-parameter case of a statement about families.

\begin{theorem}[Ehresmann]\label{thm:ehresmann}\Scl
A proper submersion $p\colon E\to B$ is a locally trivial fibre bundle.
\end{theorem}

In the language of \cref{ch:bundles}: let $\mathcal M_d$ be the stack on $\Cart$ whose sections over $U$ are
the proper submersions over $U$ with $d$-dimensional fibres. Ehresmann's theorem says that $\mathcal M_d$ is
locally constant in the strongest sense: every section over a Euclidean space is a product. Its shape is
$\coprod_{[F]}B\Diff(F)$, and a proper submersion over $B$ is classified by a map from $B$ to this space
(\cref{tab:oka}). Compact smooth manifolds have no local moduli, only monodromy. The regular interval theorem
is the case of a contractible base.

\section{Passing a critical point}

Call a Morse function $f\colon M\to[a,b]$ on a compact manifold \term{admissible} if
$\partial M=f^{-1}(a)\cup f^{-1}(b)$ and $a,b$ are regular values.

\begin{theorem}[Attaching a cell]\label{thm:handle}\Scl[Hirsch 6.3.1--6.3.3]
Let $f\colon M\to[a,b]$ be an admissible Morse function with exactly one critical point, of index $k$. Then
there is a $k$-cell $e^k\subset M\setminus f^{-1}(b)$, attached to $f^{-1}(a)$ along its boundary, such that
$f^{-1}(a)\cup e^k$ is a deformation retract of $M$. Smoothly, $M$ is obtained from
$f^{-1}(a)\times[0,1]$ by attaching a handle $D^k\times D^{n-k}$ along an embedding of
$S^{k-1}\times D^{n-k}$ in $f^{-1}(a)\times\{1\}$.
\end{theorem}

For a proper function $f\colon M\to\R$ bounded below, write $M^c=f^{-1}(-\infty,c]$. The theorem and
\cref{thm:regint} give the following form, which is the one that composes.

\begin{corollary}\label{cor:pushout}\Srf[Hirsch 6.2.2, 6.3.1]
If $[c,c']$ contains no critical value, $M^c\to M^{c'}$ is a homotopy equivalence. If $[c-\varepsilon,
c+\varepsilon]$ contains a single critical value, attained at one critical point of index $k$, there is a
homotopy pushout square of spaces
\[\begin{tikzcd}
S^{k-1}\arrow[r]\arrow[d] & M^{c-\varepsilon}\arrow[d]\\
D^k\arrow[r] & M^{c+\varepsilon}
\end{tikzcd}\]
and hence a cofibre sequence $\Sigma^\infty_+M^{c-\varepsilon}\to\Sigma^\infty_+M^{c+\varepsilon}\to\mathbb
S^k$ of spectra.
\end{corollary}

The local statement behind the theorem is about the quadratic form $q(x,y)=-|x|^2+|y|^2$ on
$\R^k\times\R^{n-k}$: the set $\{q\le-\varepsilon\}$ together with the disc $\{y=0,|x|^2\le\varepsilon\}$
is a deformation retract of $\{q\le\varepsilon\}$, by a deformation that shrinks $y$ and does not move $x$
(\cref{exer:model}).

\begin{theorem}\label{thm:cw}\Scl[Hirsch 6.4.1--6.4.3, 6.2.4]
A compact manifold with a Morse function of type $(\nu_0,\dots,\nu_n)$ has the homotopy type of a finite CW
complex with $\nu_k$ cells of dimension $k$. Every $n$-manifold has the homotopy type of a CW complex of
dimension at most $n$. A closed manifold with a Morse function having exactly two critical points is
homeomorphic to a sphere.
\end{theorem}

So the shape of a compact manifold is a finite space, a compact object of $\Spc$, and its suspension
spectrum is a finite spectrum. Finite spectra are dualizable; this is the abstract half of
\cref{thm:atiyah}, the concrete half being the identification of the dual.

\section{Inequalities}

\begin{theorem}[Morse inequalities]\label{thm:morseineq}\Scl[Morse; Hirsch 6.3.4--6.3.8]
Let $f$ be a Morse function of type $(\nu_k)$ on a closed manifold $M$, and $\beta_k=\dim H_k(M;F)$ for a field
$F$. Then
\[\sum_k\nu_kt^k-\sum_k\beta_kt^k=(1+t)\,Q(t)\]
for a polynomial $Q$ with non-negative integer coefficients. In particular $\nu_k\ge\beta_k$, and
$\chi(M)=\sum(-1)^k\nu_k=\sum(-1)^k\beta_k$; and $\chi(M)=0$ if $\dim M$ is odd.
\end{theorem}

\begin{proof}
By \cref{cor:pushout}, crossing a critical point of index $k$ changes the homology of the sublevel set in one
of two ways: either $\beta_k$ increases by one, or $\beta_{k-1}$ decreases by one. Let $q_{k-1}$ be the
number of critical points of index $k$ of the second kind. Each of them kills a class created earlier by a
critical point of index $k-1$ of the first kind. So $\nu_k=\beta_k+q_k+q_{k-1}$, which is the identity with
$Q=\sum q_kt^k$. Setting $t=-1$ gives the Euler characteristic, and replacing $f$ by $-f$ exchanges $\nu_k$
and $\nu_{n-k}$.
\end{proof}

The equality $\chi(TM)=\sum(-1)^k\nu_k$ also follows from \cref{thm:euler}(d) applied to the gradient, whose
zero at a critical point of index $k$ has index $(-1)^k$. For the torus of \cref{ex:torusheight},
$1+2t+t^2$ is the Poincaré polynomial and $Q=0$. On $\RP^n$ there is a Morse function with one critical
point of each index, which is optimal for $F=\Z/2$ and not for $F=\mathbb Q$ (\cref{exer:rpn}).

\section{The sublevel functor}

The proof just given used more than the statement records. The assignment $c\mapsto M^c$ is a functor from
the ordered set $\R$ to manifolds with boundary and embeddings, and its composite with the shape,
\[S_f\colon(\R,\le)\to\Spc,\qquad c\mapsto\Pi(M^c),\]
is the \term{sublevel functor} of $f$.

\begin{proposition}\label{prop:persist}\Srf[\cref{cor:pushout}; persistence, \cite{ZC05}]
For a Morse function $f$ on a closed manifold, $S_f$ is locally constant on the complement of the critical
values, and at a critical value it changes by a pushout along a sphere for each critical point. The functor
$H_k(S_f;F)\colon(\R,\le)\to\cat{Vect}_F$ is a direct sum of interval modules; the number of infinite
intervals is $\beta_k$, and the number of finite intervals is the coefficient $q_k$ of $Q$ in
\cref{thm:morseineq}.
\end{proposition}

So the polynomial $Q$ counts pairs of critical points that cancel in homology, and the multiset of intervals,
the \term{barcode}, refines the Morse inequalities to a statement about which pairs and at which levels.
The barcode is a continuous function of $f$ in the uniform norm, which the type is not. The script
computes the degree-zero barcode of a function on a circle by a union--find pass and checks that the number
of finite intervals is $\nu_0-1$.

\section{Flow categories}

A Morse function with a generic metric determines more than a filtration.

\begin{theorem}\label{thm:CJS}\Sli[Cohen--Jones--Segal \cite{CJS95}]
Let $f$ be a Morse function on a closed manifold $M$ with a Morse--Smale gradient. There is a topological
category $\mathcal C_f$ whose objects are the critical points and whose morphism space from $p$ to $q$ is the
compactified space of gradient flow lines from $p$ to $q$, a manifold with corners of dimension
$\operatorname{ind}p-\operatorname{ind}q-1$, with composition the inclusion of broken flow lines. Its
classifying space is homeomorphic to $M$.
\end{theorem}

The Morse complex is what remains of $\mathcal C_f$ when one keeps only the zero-dimensional morphism spaces
and counts their points; the higher-dimensional ones carry the attaching maps of the cells. The transversality
condition on the metric is \cref{thm:transversality} applied to the stable and unstable manifolds, and the
corner structure is where manifolds with corners (\cref{ch:manifolds}) become unavoidable.

\section{Families of functions}

The set of Morse functions is open and dense in $[M,\R]$ but it is not a good parameter space: two Morse
functions of different types cannot be joined by a path of Morse functions. Jet transversality in one
parameter says what a generic path looks like.

\begin{theorem}[Cerf]\label{thm:cerf}\Scl[Cerf \cite{Cer70}]
Any two Morse functions on a closed manifold are joined by a path $f_t$ that is Morse except at finitely
many times, at each of which exactly one of the following occurs: two critical points have the same value;
or there is a single degenerate critical point, with local form
$x_1^3-(t-t_0)x_1-x_2^2-\dots-x_{k+1}^2+x_{k+2}^2+\dots+x_n^2$, at which a pair of critical points of indices
$k$ and $k+1$ is born or dies.
\end{theorem}

The count behind the theorem: in the space of $2$-jets, the jets of degenerate critical points have
codimension $n+1$, so a one-parameter family, of total dimension $n+1$, meets them at isolated points. On the
side of handle decompositions the two events are the reordering or sliding of handles and the cancellation
of a pair. So the theorem says that any two handle decompositions of a manifold are related by these moves.
It is a presentation by generators and relations, one categorical level up from \cref{thm:handle}.

The space of functions with only Morse and birth--death singularities is connected by Cerf's theorem,
but it is still not contractible. Igusa found the decoration that makes it so.

\begin{theorem}\label{thm:framed}\Sli[Igusa \cite{Igu87}; Lurie \cite{Lur09}; Eliashberg--Mishachev \cite{EM12}]
The space of framed functions on a compact manifold $M$ (functions with only Morse and birth--death
singularities, with a framing of the negative eigenspace of the Hessian at each critical point) is
contractible.
\end{theorem}

Igusa proved that the space is $(\dim M-1)$-connected; contractibility is due to Lurie and, by geometric
methods, to Eliashberg and Mishachev. By \cref{prin:choices} the theorem says that a framed function is a
choice of the harmless kind, so that the handle decomposition it induces is as good as canonical. That is the
form in which Morse theory enters the proof of the cobordism hypothesis (\cref{ch:cobordism}).

\section*{Notes}

Milnor's \emph{Morse Theory} and \emph{Lectures on the h-Cobordism Theorem} are the classical accounts;
Hirsch's chapter follows the same lines with more attention to the differentiability class. Persistence
modules and their decomposition are in \cite{ZC05} and in work of Crawley-Boevey. The flow category is the
starting point of Floer homotopy theory. Cerf's theorem is the one-parameter beginning of a hierarchy governed by the classification of
singularities of functions;
Igusa's work on higher parameters and the notion of framed function are from the 1980s.

\section*{Exercises}

\begin{exercise}\label{exer:torus}
Verify \cref{ex:torusheight}.
\end{exercise}

\begin{exercise}\label{exer:morsepoly}
Deduce from the polynomial identity of \cref{thm:morseineq} the inequalities
$\nu_k-\nu_{k-1}+\dots\pm\nu_0\ge\beta_k-\beta_{k-1}+\dots\pm\beta_0$ for every $k$. Show that a Morse function
on a closed connected surface of genus $g$ has at least $2g+2$ critical points.
\end{exercise}

\begin{exercise}\label{exer:rpn}
Let $\lambda_0<\dots<\lambda_n$ and $f([x])=\sum\lambda_ix_i^2/\sum x_i^2$ on $\RP^n$. Show that $f$ is a
Morse function with one critical point of each index $0,\dots,n$. Find $Q$ for $F=\Z/2$ and for
$F=\mathbb Q$.
\end{exercise}

\begin{exercise}\label{exer:model}
For $q(x,y)=-|x|^2+|y|^2$ on $\R^k\times\R^{n-k}$ and $\varepsilon>0$, construct a deformation retraction of
$\{q\le\varepsilon\}$ onto $\{q\le-\varepsilon\}\cup\{y=0,\ |x|^2\le\varepsilon\}$.
\end{exercise}

\begin{exercise}\label{exer:birth}
For $f_t(x)=x^3-tx$ on $\R$, find the critical points and their indices for each $t$, and describe the
sublevel functor of $f_t$ restricted to a large interval $[-L,L]$ before and after $t=0$.
\end{exercise}
%% ---- end ch/08-morse.tex ----
%% ---- begin ch/09-cobordism.tex ----
\chapter{Cobordism}\label{ch:cobordism}

In the source, cobordism occupies a short chapter: the groups are defined, the Pontryagin--Thom construction
is carried out, and Thom's theorem identifying cobordism groups with homotopy groups of Thom spaces is proved
in the range the earlier chapters allow. It is the place where the three tools of the book (classifying maps,
tubular neighbourhoods, transversality) are used together. It is also the place from which the
higher-categorical view of manifolds grew. This chapter states the classical results and then the two
modern ones that extend them: the homotopy type of the cobordism category, and the cobordism hypothesis.

\section{Cobordism groups}

\begin{definition}\label{def:cob}
Closed $n$-manifolds $M_0,M_1$ are \term{cobordant} if there is a compact $(n+1)$-manifold $W$ with
$\partial W\cong M_0\sqcup M_1$. The set of classes is $\mathfrak N_n$. For oriented manifolds one requires
$W$ oriented with $\partial W\cong M_1\sqcup-M_0$, and the set of classes is $\Omega_n$.
\end{definition}

\begin{theorem}\label{thm:cobring}\Scl[Thom; Hirsch 7.1.1]
Disjoint union makes $\mathfrak N_n$ and $\Omega_n$ abelian groups, and product makes
$\mathfrak N_*$ and $\Omega_*$ graded rings, commutative in the graded sense. Every element of
$\mathfrak N_*$ has order $2$.
\end{theorem}

Transitivity of the relation uses \cref{thm:gluing}; the inverse of $[M]$ is $[-M]$, with $M\times I$ as the
null-cobordism of $M\sqcup-M$. In low dimensions $\mathfrak N_0=\Z/2$, $\Omega_0=\Z$,
$\mathfrak N_1=\Omega_1=0$, and $\mathfrak N_2=\Z/2$, $\Omega_2=0$ by the classification of surfaces
(\cref{ch:surfaces}).

\section{The Pontryagin--Thom theorem}

Let $M\subset\R^{n+k}$ be a closed $n$-manifold. The collapse of \cref{ch:tubular}, followed by the map of
Thom spaces induced by the classifying map of the normal bundle (\cref{ch:bundles}), is a map
\[S^{n+k}\longrightarrow\Th(\nu)\longrightarrow\Th(\gamma_k),\]
where $\gamma_k$ is the tautological bundle over $\Gr_k(\R^s)$ for $s$ large.

\begin{theorem}[Pontryagin--Thom]\label{thm:PT}\Scl[Pontryagin \cite{Pon55}; Thom \cite{Tho54}; Hirsch 7.2.3]
For $f\colon S^{n+k}\to\Th(\gamma_k)$ transverse to the zero section, $f\mapsto[f^{-1}(\Gr_k(\R^s))]$ defines a
homomorphism $\pi_{n+k}\bigl(\Th(\gamma_k\to\Gr_k(\R^s))\bigr)\to\mathfrak N_n$ that is surjective if $k>n$ and
$s\ge k+n$ and bijective if $k>n+1$ and $s\ge k+n+1$; the construction above is its inverse. Stably,
\[\mathfrak N_n\cong\pi_n(MO),\qquad\Omega_n\cong\pi_n(MSO),\qquad\Omega^{\mathrm{fr}}_n\cong\pi_n(\mathbb S),\]
and in general $\Omega^\theta_n\cong\pi_n(M\theta)$ for a stable tangential structure $\theta\colon B\to B\Or$,
where $M\theta$ is the Thom spectrum of $\theta$.
\end{theorem}

\begin{proof}[Structure of the proof]
Well-definedness: the embedding and the tubular neighbourhood are contractible choices
(\cref{thm:embcontract,thm:tubcontract}), and a cobordism embedded in $\R^{n+k}\times I$ collapses to a
homotopy. Inverse: a map $f\colon S^{n+k}\to\Th(\gamma_k)$ can be made transverse to the zero section
(\cref{thm:transversality}), and $M=f^{-1}(\Gr_k)$ is a closed $n$-manifold with normal bundle pulled back from
$\gamma_k$; a homotopy made transverse gives a cobordism (\cref{lem:fibre}). The dimension restrictions come
from \cref{thm:whitney,thm:classify}.
\end{proof}

The theorem is \cref{prin:generic} for the cospan $S^{n+k}\to\Th(\gamma_k)\leftarrow\Gr_k$: every map to a Thom
space has a derived preimage of the zero section, which has a cobordism class, and the class determines the
map up to homotopy.

\section{Thom's computation}

\begin{theorem}[Thom]\label{thm:thom}\Scl[\cite{Tho54}]
$MO$ is a wedge of suspensions of the Eilenberg--MacLane spectrum $H\Z/2$, and
\[\mathfrak N_*\cong\Z/2\,[x_i:\ i\ge2,\ i\ne2^j-1],\qquad|x_i|=i,\]
with $x_{2i}$ the class of $\RP^{2i}$. A closed manifold is a boundary if and only if all its Stiefel--Whitney
numbers vanish.
\end{theorem}

So $\dim_{\Z/2}\mathfrak N_n$ is the number of partitions of $n$ into parts not of the form $2^j-1$: for
$n=0,\dots,10$ these are $1,0,1,0,2,1,3,1,5,3,8$. For a partition $n=i_1+\dots+i_r$ the
\term{Stiefel--Whitney number} is $\langle w_{i_1}\cdots w_{i_r}(TM),[M]\rangle\in\Z/2$. It vanishes on a
boundary $M=\partial W$ because $TW|_M=TM\oplus\R$, so the class being evaluated is restricted from $W$, and
the fundamental class of a boundary maps to zero in the homology of $W$.

\begin{example}\label{ex:sw}
The total Stiefel--Whitney class of $\RP^n$ is $(1+a)^{n+1}$ with $a$ the generator of $H^1$. For $\RP^2$,
$w=1+a+a^2$, and $w_2[\RP^2]=w_1^2[\RP^2]=1$: not a boundary. For $\RP^3$, $w=(1+a)^4=1$: all numbers vanish
and $\RP^3$ bounds. In dimension $4$ the numbers $(w_1^4,w_1^2w_2,w_2^2,w_1w_3,w_4)$ are $(1,0,0,0,1)$ for
$\RP^4$ and $(0,0,1,0,1)$ for $\RP^2\times\RP^2$. The two manifolds are independent in
$\mathfrak N_4=(\Z/2)^2$; they are $x_4$ and $x_2^2$. The script computes these numbers and the ranks above.
\end{example}

\begin{theorem}\label{thm:oriented}\Scl[Thom; Hirsch 7.2.4]
$\Omega_n$ is finite if $n$ is not divisible by $4$, and $\Omega_{4k}$ has rank equal to the number of
partitions of $k$. Rationally, $\Omega_*\otimes\mathbb Q=\mathbb Q[\CP^2,\CP^4,\dots]$.
\end{theorem}

\section{Thom spectra as colimits}

The spectra $MO$, $MSO$, $M\theta$ were defined by Thom spaces of bundles over Grassmannians. There is a
description in which no bundle appears.

\begin{theorem}\label{thm:ABGHR}\Sli[Ando--Blumberg--Gepner--Hopkins--Rezk \cite{ABGHR14}]
Let $\operatorname{Pic}(\mathbb S)$ be the $\infty$-groupoid of invertible spectra. A stable vector bundle on a
space $X$ determines a map $X\to B\Or\xrightarrow{J}\operatorname{Pic}(\mathbb S)$, sending a point to the
one-point compactification of the fibre, and its Thom spectrum is the colimit of the composite functor
$X\to\operatorname{Pic}(\mathbb S)\subset\Sp$. In particular $MO=\colim(B\Or\to\Sp)$ is the homotopy
quotient of the sphere spectrum by the stable orthogonal group, and it is an $E_\infty$-ring because $J$ is
an infinite loop map. For an $E_\infty$-ring $R$, $E_\infty$-ring maps $MO\to R$ correspond to
null-homotopies of $B\Or\to B\GL_1(R)$ as infinite loop maps.
\end{theorem}

For a trivial bundle the diagram is constant and the colimit is $\Sigma^\infty_+X$, which is
\cref{prop:thom}. The description makes the Thom isomorphism a formal consequence of an orientation, a
trivialization of the diagram after smashing with $R$. And it gives a reading of \cref{thm:PT}: framed
cobordism is the sphere spectrum, and unoriented cobordism is what is left when one divides by all changes
of framing.

\section{Cobordism categories}

The groups $\mathfrak N_n$ remember that a cobordism exists. The cobordism category remembers the
cobordisms.

\begin{definition}\label{def:cobcat}
$\Cob_d$ is the $\infty$-category whose objects are closed $(d-1)$-manifolds and whose space of morphisms
from $M_0$ to $M_1$ is $\coprod_{[W]}B\Diff(W\text{ rel }\partial W)$, the union over diffeomorphism classes
of cobordisms. Composition is gluing (\cref{thm:gluing}). Disjoint union makes it symmetric monoidal. With a
tangential structure $\theta\colon B\to B\Or(d)$ on the cobordisms one writes $\Cob^\theta_d$.
\end{definition}

A concrete model takes objects to be closed submanifolds of $\R^\infty$ and morphisms to be submanifolds of
$[a_0,a_1]\times\R^\infty$ that are products near the ends; by \cref{thm:embcontract} the embeddings add
nothing, and by \cref{thm:collar} neither do the product conditions. The set of components of the
classifying space $B\Cob_d$ is the set of objects modulo the relation generated by morphisms, which is
$\mathfrak N_{d-1}$.

\begin{theorem}[Galatius--Madsen--Tillmann--Weiss]\label{thm:GMTW}\Sli[\cite{GMTW09}]
Let $MTO(d)$ be the Thom spectrum of the virtual bundle $-\gamma_d$ over $B\Or(d)$. Then
\[B\Cob_d\ \simeq\ \Omega^{\infty-1}MTO(d),\]
and likewise $B\Cob^\theta_d\simeq\Omega^{\infty-1}MT\theta(d)$ for every tangential structure $\theta$.
\end{theorem}

On $\pi_0$ this is a form of \cref{thm:PT}. The proof is an application of the concordance classification
(\cref{thm:concordance}): the cobordism category is the shape of a sheaf whose sections over $U$ are
families, parametrized by $U$, of $d$-dimensional submanifolds of $\R\times\R^\infty$ that are proper over
$\R$, and the shape of that sheaf is computed by a parametrized Pontryagin--Thom construction. So the
theorem is the Pontryagin--Thom theorem for the whole category of cobordisms and not only for its set of
components. For oriented surfaces, combined with Harer's stability theorem, it gives the Madsen--Weiss
theorem (\cref{thm:MW}).

\section{Field theories and the cobordism hypothesis}

\begin{definition}\label{def:tft}
A $d$-dimensional \term{topological field theory} with values in a symmetric monoidal $\infty$-category
$\mathcal C$ is a symmetric monoidal functor $Z\colon\Cob_d\to\mathcal C$.
\end{definition}

An invertible theory, one whose values are invertible objects and morphisms, factors through the
groupoid completion of $\Cob_d$, so by \cref{thm:GMTW} invertible theories are classified by maps out of
the spectrum $\Sigma MTO(d)$. For general theories one needs to know $\Cob_d$ itself, by generators and
relations. Morse theory provides them: by \cref{thm:handle} every cobordism is a composite of handle
attachments, and by \cref{thm:cerf,thm:framed} the relations among such composites are known and the
choices involved are contractible. The cleanest statement is obtained after extending the category
downwards, allowing manifolds with corners of all codimensions, to a symmetric monoidal
$(\infty,d)$-category $\Bord_d$.

\begin{theorem}[Cobordism hypothesis]\label{thm:CH}
\Sli[conjectured by Baez--Dolan \cite{BD95}; Lurie \cite{Lur09}; see also \cite{GP21}]
Let $\mathcal C$ be a symmetric monoidal $(\infty,d)$-category. Evaluation at the point is an equivalence
between symmetric monoidal functors $\Bord^{\mathrm{fr}}_d\to\mathcal C$, from the framed bordism category, and
the $\infty$-groupoid of fully dualizable objects of $\mathcal C$.
\end{theorem}

Lurie's paper gives a detailed outline of a proof; the case $d=2$ is worked out by generators and relations
in \cite{SP09}, and a proof in a geometric formulation has been given by Grady and Pavlov. For $d=1$ the
statement is that the oriented one-dimensional cobordism category is the free symmetric monoidal
$\infty$-category on a dualizable object. The value of the theory on the circle is then the trace of the
identity, $\chi(X)$ in the sense of \cref{ch:degree}; for $\mathcal C=\Sp$ and $X=\Sigma^\infty_+M$ it is the
Euler characteristic of $M$. The Euler characteristic of a closed manifold is the partition function, on
the circle, of the one-dimensional field theory it generates.

\section{Derived cobordism}

By \cref{thm:spivak} the cobordism ring of compact derived manifolds is $\mathfrak N_*$ again. The two
enlargements of this chapter are therefore complementary. Passing from the groups to the category
$\Cob_d$ adds information: the homotopy types of diffeomorphism groups. Passing from manifolds to derived
manifolds adds none at the level of cobordism classes, and that is its use: fibre products, fixed-point
sets and zero loci have classes without being put in general position first.

\section*{Notes}

Stong's \emph{Notes on Cobordism Theory} is the standard reference for the classical computations. The
identification of Thom spectra with colimits is from \cite{ABGHR14}. Cobordism categories as topological
categories go back to Segal's definition of conformal field theory and to Tillmann; \cite{GMTW09} determined
their homotopy type. The cobordism hypothesis was formulated in \cite{BD95}; besides \cite{Lur09}, see
Ayala and Francis for an approach through factorization homology.

\section*{Exercises}

\begin{exercise}\label{exer:chimod2}
Let $W$ be a compact odd-dimensional manifold with boundary. Show that $\chi(\partial W)=2\chi(W)$. Deduce
that the Euler characteristic modulo $2$ is a ring homomorphism $\mathfrak N_*\to\Z/2$, and that $\RP^{2m}$ is
not a boundary.
\end{exercise}

\begin{exercise}\label{exer:ranks}
Compute $\dim\mathfrak N_n$ for $n\le10$ from \cref{thm:thom}.
\end{exercise}

\begin{exercise}\label{exer:sw}
Verify the Stiefel--Whitney numbers in \cref{ex:sw}.
\end{exercise}

\begin{exercise}\label{exer:lowdim}
Show that $\mathfrak N_1=0$ and that the Klein bottle is a boundary. Using the classification of surfaces,
conclude that $\mathfrak N_2=\Z/2$, generated by $\RP^2$.
\end{exercise}

\begin{exercise}\label{exer:framed0}
Show directly that the Pontryagin--Thom collapse of a single point of $\R^k$ with the standard framing is a
map $S^k\to S^k$ of degree $1$, and that reversing one framing vector gives degree $-1$. Conclude
$\Omega^{\mathrm{fr}}_0\cong\Z$.
\end{exercise}
%% ---- end ch/09-cobordism.tex ----
%% ---- begin ch/10-isotopy.tex ----
\chapter{Isotopy}\label{ch:isotopy}

Hirsch's eighth chapter is about paths in spaces of embeddings: an isotopy of a compact submanifold extends
to an isotopy of the ambient manifold; embeddings of discs are unique up to isotopy; manifolds glued by
isotopic maps are diffeomorphic. Each statement is about $\pi_0$ or about lifting paths. Each has a form
that concerns the whole homotopy type of a space of embeddings, and those forms are where the subject went
after 1976. This chapter states them and ends with the functor calculus that organizes spaces of
embeddings in high codimension. The companion volume uses this chapter more than any other.

\section{Isotopies and vector fields}

\begin{definition}\label{def:isotopy}
An \term{isotopy} of embeddings of $V$ in $M$ is a plot $I\to\Emb(V,M)$: a smooth map
$F\colon V\times I\to M$ with every $F_t$ an embedding. A \term{diffeotopy} of $M$ is an isotopy
$F\colon M\times I\to M$ of diffeomorphisms with $F_0=\id$. Embeddings are \term{isotopic} if joined by an
isotopy, and \term{ambient isotopic} if one is carried to the other by the end of a diffeotopy.
\end{definition}

So isotopy is concordance of points of the smooth set $\Emb(V,M)$ in the sense of \cref{def:shape}. (The
word concordance is used differently in the classical literature on embeddings, for embeddings of
$V\times I$ in $M\times I$ that need not preserve levels; we avoid that usage.)

\begin{theorem}\label{thm:flow}\Scl[Hirsch 8.1.1]
A time-dependent vector field $G$ on $M$ of bounded velocity, for instance one with compact support,
generates a unique diffeotopy $F$ with $\partial_tF_t(x)=G(F_t(x),t)$. Every diffeotopy with compact support
arises in this way from its velocity field.
\end{theorem}

So paths in $\Diff_c(M)$ starting at the identity are the same thing as paths in the vector space
$\mathfrak X_c(M)$ of compactly supported vector fields, which is the statement that $\Diff_c(M)$ is a Lie
group with that Lie algebra \cite{KM97}. The hypothesis on the velocity cannot be dropped: the field
$x^2\partial_x$ on $\R$ has solutions $x_0/(1-x_0t)$, which leave every compact set in finite time.

\section{Isotopy extension}

\begin{theorem}[Isotopy extension]\label{thm:isoext}\Scl[Thom, Palais, Cerf; Hirsch 8.1.3]
Let $V\subset M$ be a compact submanifold and $F\colon V\times I\to M$ an isotopy with image in
$M\setminus\partial M$. Then $F$ extends to a diffeotopy of $M$ with compact support.
\end{theorem}

The proof extends the velocity field of $F$, which is defined along the track of the isotopy in
$M\times I$, to a compactly supported field on $M\times I$ using a tubular neighbourhood of the track, and
integrates. The extension is a contractible choice. Carrying parameters through the argument gives the
stronger statement.

\begin{theorem}[Restriction is a fibration]\label{thm:palais}\Scl[Palais \cite{Pal60}; Cerf; Lima]
Let $V\subset M$ be a compact submanifold. The restriction map
$\Diff_c(M)\to\Emb(V,M)$ is a locally trivial fibre bundle with fibre the group $\Diff_c(M\text{ rel }V)$ of
diffeomorphisms fixing $V$. More generally, for compact $V\subset V'$ the restriction
$\Emb(V',M)\to\Emb(V,M)$ is a fibration.
\end{theorem}

\Cref{thm:isoext} is the path-lifting property of this map; \cref{thm:palais} says that all homotopies
lift. The consequence is a long exact sequence of homotopy groups. For $V$ a point it reads
\[\cdots\to\pi_1\Diff(M)\to\pi_1(M)\to\pi_0\Diff(M\text{ rel }x)\to\pi_0\Diff(M)\to\pi_0(M),\]
and the middle map sends a loop to the diffeomorphism that pushes the base point around it. For compact
$V$ the quotient of $\Emb(V,M)$ by $\Diff(V)$ is the space of submanifolds of $M$ diffeomorphic to $V$, and the
theorem says that the group $\Diff_c(M)$ acts on it with orbits that are unions of components.

Compactness is essential. Let $F_t\colon\R\to\R^3$ be a long knot whose knotted part sits at distance
$1/(1-t)$ along the line, for $t<1$, and let $F_1$ be the straight line. This is an isotopy in the sense of
\cref{def:isotopy}, smooth because on every compact set it is eventually constant, from a knotted line to an
unknotted one; it cannot be ambient (\cref{exer:noncompact}). In the language of \cref{ch:function}, it is a
plot of the mapping object that is not a path in the strong topology (\cref{prop:strongpath}).

\section{Embeddings of discs}

\begin{theorem}[Discs]\label{thm:discs}\Scl[Cerf, Palais; Hirsch 8.3.1 on $\pi_0$]
For an $n$-manifold $M$, the map $\Emb(D^n,M)\to\Fr(TM)$, $f\mapsto(f(0),df_0)$, to the frame bundle is a
homotopy equivalence. More generally $\Emb(D^k,M)$ is equivalent to the bundle of $k$-frames in $TM$, and
$\Emb(\coprod_jD^n,M)$ to the pullback of $\Fr(TM)^j$ to the configuration space $\Conf_j(M)$.
\end{theorem}

The proof is the Alexander-type shrinking of \cref{thm:tubcontract}: $f_t(x)=f(tx)$ rescaled deforms an
embedding to its linear part (\cref{exer:discRn}). On components this is Hirsch's theorem that two
embeddings of $D^k$ in a connected $M$ are isotopic, provided, when $k=n$ and $M$ is orientable, they induce
the same orientation: the bundle of $k$-frames is connected for $k<n$, and $\Fr(TM)$ has one or two
components according as $M$ is non-orientable or orientable. With \cref{thm:gluing} it makes the connected
sum of connected oriented manifolds well defined.

For $M=\R^n$ the theorem identifies the spaces of embeddings of several discs in one:
\[\Emb\bigl(\textstyle\coprod_j\R^n,\R^n\bigr)\ \simeq\ \Conf_j(\R^n)\times\Or(n)^j .\]
These spaces, with composition of embeddings, form the framed little $n$-discs operad; restricting to
embeddings that are rectilinear, or equivalently equipped with a trivialization of the derivative, gives the
operad $E_n$. Write $\cat{Disc}_n$ for the symmetric monoidal $\infty$-category of finite disjoint unions of
copies of $\R^n$ and their embeddings. Every $n$-manifold $M$ defines a presheaf
$E_M=\Emb(-,M)$ on it, and \cref{thm:discs} says that this presheaf is assembled from the configuration
spaces of $M$ and its tangent bundle.

\section{Diffeomorphisms of spheres}

\begin{theorem}\label{thm:spheres}\Scl[Hirsch 8.3.3; Smale; Hatcher; Cerf; Kervaire--Milnor]
The inclusion $\Or(n+1)\to\Diff(S^n)$ is a homotopy equivalence for $n=1,2,3$. For $n\ge5$ the group
$\pi_0\Diff^+(S^n)$ is isomorphic to the group $\Theta_{n+1}$ of exotic $(n+1)$-spheres, and is in general
not trivial.
\end{theorem}

Hirsch proves the statement on $\pi_0$ for $n=1$: every diffeomorphism of the circle is isotopic to the
identity or to a reflection. The case $n=2$ is Smale's, $n=3$ is Hatcher's, and for $n=4$ the inclusion is
known not to be an equivalence. The contrast with \cref{thm:discs} is instructive. Embeddings of a disc into
a manifold are governed by linear algebra in every dimension; diffeomorphisms of a disc fixing the boundary
are not, and the difference is the subject of pseudoisotopy theory.

\section{Immersions}

For immersions the passage from differential conditions to homotopy theory is complete.

\begin{theorem}[Smale--Hirsch]\label{thm:SH}\Scl[Smale \cite{Sma59}; Hirsch \cite{Hir59}]
Let $\dim V<\dim M$, or $\dim V=\dim M$ with $V$ having no closed component. Then the differential
\[\Imm(V,M)\longrightarrow\operatorname{Mono}(TV,TM)\]
to the space of fibrewise injective bundle maps is a weak homotopy equivalence.
\end{theorem}

In the diagram at the end of \cref{ch:function}, this says that for the open relation
$\mathcal R\subset J^1(V,M)$ of injective $1$-jets the inclusion of holonomic sections into all sections
induces an equivalence of shapes. Gromov's formulation explains why. The presheaf $U\mapsto\Imm(U,M)$ on
the open subsets of $V$ takes unions of open sets along handles to homotopy pullbacks, by a restriction
theorem like \cref{thm:palais} that holds for immersions without any compactness hypothesis on the
complement; so it is a homotopy sheaf, determined by its values on discs; and on a disc
$\Imm(D^m,M)\simeq\Emb(D^m,M)$ is the bundle of $m$-frames by \cref{thm:discs}. A homotopy sheaf with those
values is the sheaf of sections of a bundle, namely $\operatorname{Mono}(TV,TM)$.

\begin{corollary}\label{cor:WG}\Scl[Whitney--Graustein; Smale]
Regular homotopy classes of immersions $S^1\to\R^2$ are classified by the rotation number, an integer. All
immersions $S^2\to\R^3$ are regularly homotopic; in particular the sphere can be turned inside out.
\end{corollary}

\begin{proof}
Up to homotopy $\operatorname{Mono}(TS^1,T\R^2)$ is the free loop space of the circle of unit vectors, whose
components are indexed by degree. For the sphere the relevant group is $\pi_2$ of the space of $2$-frames in
$\R^3$, which is $\pi_2(\SO(3))=0$.
\end{proof}

The rotation numbers of the circle, the figure eight and the limaçon $r=1+2\cos\theta$ are $1$, $0$ and $2$;
the script computes them by accumulating the angle of the tangent.

\section{Embeddings, codimension, and calculus}

Embeddings do not satisfy an h-principle. Whether two embeddings are isotopic depends on the
codimension, and the two extremes are classical.

\begin{theorem}\label{thm:whitneyiso}\Scl[Whitney; Wu; Haefliger]
Let $V$ be a compact $m$-manifold. If $n\ge2m+2$, any two embeddings $V\to\R^n$ are isotopic. If $V$ is
connected, $m\ge2$ and $n=2m+1$, the same holds.
\end{theorem}

\begin{proof}[Proof of the first statement]
Join the embeddings by the straight-line homotopy and regard it as a family
$F\colon V\times I\to\R^n$. By the multijet transversality theorem one may perturb $F$, fixing the ends, so
that the set $\{(x,y,t):x\ne y,\ F_t(x)=F_t(y)\}$, of expected dimension $2m+1-n<0$, is empty, and so that the
set where $dF_t$ drops rank, of expected dimension $(m+1)-(n-m+1)<0$, is empty. Then every $F_t$ is an
embedding.
\end{proof}

This is the argument of \cref{cor:counts} with one more parameter. In codimension $2$ nothing of the kind
holds: $\pi_0\Emb(S^1,\R^3)$ is the set of knot types. Between the extremes there is a systematic theory.

\begin{theorem}[Manifold calculus]\label{thm:weiss}
\Sli[Weiss \cite{Wei99}; Goodwillie--Weiss \cite{GW99}; Goodwillie--Klein \cite{GK15}]
For a presheaf of spaces $F$ on the open subsets of an $m$-manifold $V$ that takes isotopy equivalences to
equivalences, let $T_kF(U)$ be the homotopy limit of $F(W)$ over the open $W\subset U$ diffeomorphic to a
disjoint union of at most $k$ discs. Then $T_kF$ is the universal approximation to $F$ by a presheaf that is
a homotopy sheaf for covers in which every set of at most $k$ points lies in some member. For
$F=\Emb(-,M)$ with $\dim M=n$: $T_1F=\Imm(-,M)$, and the map
$\Emb(V,M)\to T_k\Emb(V,M)$ is $(k(n-m-2)+1-m)$-connected. In particular, if $n-m\ge3$ then
$\Emb(V,M)\simeq\operatorname{holim}_kT_k\Emb(V,M)$.
\end{theorem}

So the Smale--Hirsch theorem is the linear approximation, and in codimension at least three the higher
approximations converge. The limit has a description that does not mention $V$'s open sets.

\begin{theorem}\label{thm:BdBW}\Sli[Boavida de Brito--Weiss \cite{BW13}]
$\operatorname{holim}_kT_k\Emb(V,M)$ is the space of derived maps $E_V\to E_M$ between the presheaves on
discs defined by $V$ and $M$.
\end{theorem}

In codimension at least three, then, the space of embeddings of $V$ in $M$ is determined by the
configuration spaces of the two manifolds, with their tangential data and the maps among them: by how
finitely many points sit in each. In codimension two the tower does not converge to the embedding space,
but its stages are still invariants of knots, related to those of finite type.

\section{Factorization homology}

Presheaves on discs classify embeddings; copresheaves on discs give invariants of manifolds. Let $A$ be an
algebra over the operad of \cref{thm:discs} in a symmetric monoidal $\infty$-category, that is, a symmetric
monoidal functor on $\cat{Disc}_n$. Its \term{factorization homology} over an $n$-manifold $M$ is the
colimit $\int_MA=\colim A(U)$ over the discs $U$ embedded in $M$.

\begin{theorem}\label{thm:AF}\Sli[Ayala--Francis \cite{AF15}; Lurie]
$M\mapsto\int_MA$ is symmetric monoidal and satisfies excision: if $M=M_-\cup_{M_0\times\R}M_+$ is a
decomposition along a collared hypersurface, then
$\int_MA\simeq\int_{M_-}A\otimes_{\int_{M_0\times\R}A}\int_{M_+}A$. These properties characterize it.
\end{theorem}

Excision is where \cref{thm:collar,thm:gluing} enter: a collar of $M_0$ is what makes $\int_{M_0\times\R}A$ an
algebra and the two sides modules over it. For $n=1$ and $M=S^1$ the invariant is Hochschild homology,
which for the algebra of functions on a manifold returns the differential forms of \cref{prop:three}.

\section*{Notes}

The fibration theorem is due independently to Palais and to Cerf, with a short proof by Lima. For the
homotopy types of diffeomorphism groups see Smale, Hatcher, and the survey literature on pseudoisotopy;
the failure in dimension four is due to Watanabe. Gromov's \emph{Partial Differential Relations} and the
book of Eliashberg and Mishachev treat the h-principle. Manifold calculus is surveyed by Munson; the
configuration-space description is \cite{BW13}. Factorization homology is developed in \cite{AF15} and in
Lurie's \emph{Higher Algebra}.

\section*{Exercises}

\begin{exercise}\label{exer:flowex}
Find the diffeotopy of $\R^2$ generated by $G(x,t)=(-x_2,x_1)$, and the velocity field of the diffeotopy
$F_t(x)=e^{t}x$. Show that $x^2\partial_x$ does not generate a diffeotopy of $\R$.
\end{exercise}

\begin{exercise}\label{exer:rotation}
Compute the rotation numbers of the unit circle, the figure eight $(\sin t,\sin t\cos t)$ and the limaçon
$r=1+2\cos\theta$. Which pairs are regularly homotopic?
\end{exercise}

\begin{exercise}\label{exer:discRn}
Show that $\Emb(D^n,\R^n)\to\R^n\times\GL_n(\R)$, $f\mapsto(f(0),df_0)$, is a homotopy equivalence.
\end{exercise}

\begin{exercise}\label{exer:noncompact}
Show that the isotopy of long knots described after \cref{thm:palais} is smooth, and that it is not induced
by a diffeotopy of $\R^3$ if the knot is non-trivial.
\end{exercise}

\begin{exercise}\label{exer:highcodim}
Show from \cref{thm:whitneyiso} that any two embeddings of a circle in $\R^4$ are isotopic, and explain where
the proof fails in $\R^3$.
\end{exercise}
%% ---- end ch/10-isotopy.tex ----
%% ---- begin ch/11-surfaces.tex ----
\chapter{Surfaces}\label{ch:surfaces}

The source ends by classifying compact surfaces, using everything before it: Morse functions to cut a
surface into pieces, isotopy and gluing to recognise the pieces and put them back, the Euler characteristic
and orientability to tell the results apart. It is the one dimension above $1$ in which the programme of the
book can be carried to the end. The higher-categorical statements of the previous three chapters can also be
carried to the end in dimension two, and this chapter does so. The classification theorem turns out to be the
statement about components; the statements about higher homotopy are theorems of Earle and Eells and of
Madsen and Weiss.

\section{The classification}

Let $\Sigma_g$ be the closed orientable surface of genus $g$, the sphere with $g$ handles, and $N_h$ the
sphere with $h\ge1$ crosscaps.

\begin{theorem}[Classification of surfaces]\label{thm:classification}\Scl[Hirsch 9.3.5, 9.3.10, 9.3.11]
Two compact connected surfaces are diffeomorphic if and only if they have the same Euler characteristic,
the same number of boundary components, and are both orientable or both non-orientable. Every closed
connected surface is diffeomorphic to exactly one $\Sigma_g$, with $\chi=2-2g$, or $N_h$, with $\chi=2-h$.
Removing $b$ open discs lowers $\chi$ by $b$.
\end{theorem}

Hirsch's proof takes a Morse function, orders its critical points, and inducts on the number of saddles.
The pieces between consecutive critical levels are recognised by two lemmas: a connected surface carrying a
Morse function with critical points only of index $0$ and $2$ and boundary a level set is a disc or an
annulus (Hirsch 9.2), and a connected surface with a single critical point, a saddle, is a disc with two holes
if it is orientable and a Möbius band with one hole if it is not (Hirsch 9.3.1--9.3.3; \cref{exer:pants}).
The reassembly uses \cref{thm:gluing,thm:discs,thm:spheres}: gluing along circles depends only on the isotopy
class of the gluing map, and a diffeomorphism of the circle is isotopic to the identity or a reflection.

\section{The monoid of surfaces}

Connected sum is well defined on connected surfaces up to diffeomorphism, by \cref{thm:discs} and the fact
that every surface admits a diffeomorphism reversing the orientation of a small disc up to isotopy when it
is non-orientable, and that $\Sigma_g$ admits an orientation-reversing diffeomorphism. Write $T=\Sigma_1$ and
$P=\RP^2$.

\begin{corollary}\label{cor:monoid}\Scl[Hirsch 9.1.7]
Under connected sum, the diffeomorphism classes of closed connected surfaces form the commutative monoid
with unit $S^2$, generators $T$ and $P$, and the single relation $T\#P=P\#P\#P$.
\end{corollary}

A surface is often presented by a word: a polygon with $2n$ sides labelled by $n$ letters, each occurring
twice, with exponents giving the direction of identification. The quotient has one face and $n$ edges, so
$\chi=V-n+1$ with $V$ the number of vertex classes, and it is orientable exactly when every letter occurs
once with each exponent. The script computes $V$ by a union--find pass and identifies $aba^{-1}b^{-1}$ as
the torus, $abab$ as the projective plane, $abab^{-1}$ as the Klein bottle, and so on (\cref{exer:words}).

\section{The classification as a presentation}

Let $2\cat{Cob}$ be the symmetric monoidal category whose objects are finite disjoint unions of circles and
whose morphisms are diffeomorphism classes of compact oriented cobordisms: the homotopy category of
$\Cob^{\mathrm{or}}_2$ of \cref{def:cobcat}. By \cref{thm:handle} every cobordism is a composite of the four
elementary ones given by a single critical point: the disc as a cobordism $\emptyset\to S^1$ (index $0$) and
$S^1\to\emptyset$ (index $2$), and the pair of pants as a cobordism from two circles to one and from one to
two (index $1$).

\begin{theorem}\label{thm:2cob}\Scl[folklore; Abrams \cite{Abr96}; Kock \cite{Koc04}]
$2\cat{Cob}$ is generated as a symmetric monoidal category by
\[\eta\colon\emptyset\to S^1,\qquad\epsilon\colon S^1\to\emptyset,\qquad
\mu\colon S^1\sqcup S^1\to S^1,\qquad\delta\colon S^1\to S^1\sqcup S^1,\]
subject to the relations: $(\mu,\eta)$ is a commutative monoid, $(\delta,\epsilon)$ is a cocommutative
comonoid, and
$(\mu\sqcup\id)(\id\sqcup\delta)=\delta\mu=(\id\sqcup\mu)(\delta\sqcup\id)$.
\end{theorem}

\begin{proof}[Where the classification enters]
Generation is Morse theory. Using the relations, every connected composite of generators from $m$ circles to
$n$ circles can be brought to the normal form $\delta^{n-1}(\mu\delta)^g\mu^{m-1}$, with $g$ the number of
times a $\delta$ is followed by a $\mu$ that rejoins its two outputs. Two cobordisms with the same normal form
are equal in the presented category. Conversely, two connected oriented cobordisms with the same $m$, $n$
and $g$ are diffeomorphic by \cref{thm:classification}, since $g$ is the genus and $m+n$ the number of
boundary components. So the functor from the presented category to $2\cat{Cob}$ is faithful as well as full.
\end{proof}

The classification theorem is thus exactly the completeness of the relations. The same structure is visible
one level up: by \cref{thm:cerf}, two Morse functions on the same cobordism are joined by a path with
isolated births, deaths and crossings, and each such event is one of the relations of the theorem.

\section{Two-dimensional field theories}

A commutative \term{Frobenius algebra} over a field $k$ is a finite-dimensional commutative algebra $A$
with a linear form $\varepsilon\colon A\to k$ such that $(a,b)\mapsto\varepsilon(ab)$ is non-degenerate.

\begin{theorem}\label{thm:frob}\Scl[Dijkgraaf; Abrams \cite{Abr96}; \cite{Koc04}]
The category of symmetric monoidal functors $2\cat{Cob}\to\cat{Vect}_k$ is equivalent to the category of
commutative Frobenius algebras over $k$ and their isomorphisms, by $Z\mapsto Z(S^1)$. The comultiplication
is dual to the multiplication under the pairing, and for the closed surface of genus $g$,
\[Z(\Sigma_g)=\varepsilon(w^g),\qquad w=\mu\delta(1)=\sum_ie_ie_i^\#,\]
where $(e_i)$ is a basis and $(e_i^\#)$ the dual basis for the pairing.
\end{theorem}

\begin{example}\label{ex:frob}
(a) $A=k[x]/(x^2)$ with $\varepsilon(1)=0$, $\varepsilon(x)=1$: the cohomology of the sphere. The dual basis
of $(1,x)$ is $(x,1)$, so $w=2x$ and $Z(S^2)=0$, $Z(T^2)=2$, $Z(\Sigma_g)=0$ for $g\ge2$. The handle element is
the Euler class.

(b) $A=\C[G]$ for a finite abelian group $G$ of order $n$, with $\varepsilon(g)=\delta_{g,e}/n$. The dual
basis of $(g)$ is $(n\,g^{-1})$, so $w=n^2e$ and $Z(\Sigma_g)=\varepsilon(n^{2g}e)=n^{2g-1}$. This is
$\#\Hom(\pi_1\Sigma_g,G)/\#G$, the number of principal $G$-bundles on $\Sigma_g$ counted with weight one over
the order of the automorphism group.

In every case $Z(T^2)=\dim A$: the torus is the trace of the identity of $Z(S^1)$, as in \cref{thm:CH} for
$d=1$. The script checks the Frobenius relation and these values from the structure constants.
\end{example}

\section{Extended theories}

A field theory in the sense above assigns nothing to a point, and circles cannot be cut. Allowing
$1$-manifolds with boundary and surfaces with corners gives a symmetric monoidal bicategory $\Bord_2$.

\begin{theorem}\label{thm:SP}\Sli[Schommer-Pries \cite{SP09}]
The oriented bordism bicategory $\Bord^{\mathrm{or}}_2$ has a finite presentation by generators and relations,
obtained from the classification of the generic singularities of maps from surfaces to the plane and of
one-parameter families of them. Consequently, extended oriented two-dimensional field theories with values
in the bicategory of algebras, bimodules and bimodule maps are classified by separable symmetric Frobenius
algebras.
\end{theorem}

The proof is the method of \cref{thm:2cob} with $\R$ replaced by $\R^2$: a generic map to the plane has folds
and cusps where a Morse function has critical points, and the jet transversality theorem in one and two
parameters supplies the relations. For framed theories the theorem confirms \cref{thm:CH} in dimension two:
the fully dualizable algebras are the separable ones.

\section{Moduli}

By \cref{thm:ehresmann} the stack of bundles of closed connected surfaces has shape
\[\mathcal M_2\ \simeq\ \coprod_{g\ge0}B\Diff(\Sigma_g)\ \sqcup\ \coprod_{h\ge1}B\Diff(N_h),\]
and \cref{thm:classification} is the computation of $\pi_0\mathcal M_2$. The next question is the homotopy
type of each component.

\begin{theorem}\label{thm:EE}\Scl[Smale; Earle--Eells \cite{EE69}; Gramain]
The identity component of $\Diff(\Sigma_g)$ is contractible for $g\ge2$, is homotopy equivalent to the torus
for $g=1$, and to $\SO(3)$ for $g=0$. The identity component of $\Diff(N_h)$ is contractible for $h\ge3$, a
circle for the Klein bottle, and $\SO(3)$ for $\RP^2$.
\end{theorem}

So for $g\ge2$ the component $B\Diff^+(\Sigma_g)$ is the classifying space $B\Gamma_g$ of the mapping class
group $\Gamma_g=\pi_0\Diff^+(\Sigma_g)$: a surface bundle is determined by its monodromy. It is also the
shape of the moduli stack of Riemann surfaces of genus $g$, since the space of complex structures on a
surface is contractible (a choice in the sense of \cref{prin:choices}).

\begin{theorem}[Madsen--Weiss]\label{thm:MW}\Sli[\cite{MW07}; Harer; \cite{GMTW09}]
The cohomology of $B\Gamma_g$ is independent of $g$ in a range of degrees growing linearly with $g$, and the
stable cohomology is that of a component of $\Omega^\infty MTSO(2)$. Rationally,
\[H^*(B\Gamma_\infty;\mathbb Q)\cong\mathbb Q[\kappa_1,\kappa_2,\dots],\qquad|\kappa_i|=2i .\]
\end{theorem}

The second statement is \cref{thm:GMTW} for oriented surfaces together with the stability theorem; the
classes $\kappa_i$ are the characteristic classes of surface bundles defined by Mumford, Morita and Miller,
and the theorem was Mumford's conjecture.

\section{What the classification is the \texorpdfstring{$\pi_0$}{pi-0} of}

\Cref{tab:surfaces} collects the chapter. In each row the first entry is a statement of the source or a
direct consequence, and the second is the statement about a space or a category of which it is the shadow on
components.

\begin{table}[ht]\centering\small
\begin{tabular}{@{}p{0.43\textwidth}p{0.47\textwidth}@{}}
\toprule
classical statement & of which it is $\pi_0$ or the homotopy category\\
\midrule
closed surfaces are $\Sigma_g$, $N_h$ & $\mathcal M_2\simeq\coprod B\Diff$; \cref{thm:EE}\\
$\mathfrak N_2=\Z/2$, $\Omega_2=0$ & $B\Cob_2\simeq\Omega^{\infty-1}MTO(2)$; \cref{thm:GMTW}\\
generators and relations for $2\cat{Cob}$ & presentation of $\Bord_2$; \cref{thm:SP,thm:CH}\\
a diffeomorphism of $S^1$ is isotopic to an isometry & $\Diff(S^1)\simeq\Or(2)$\\
connected sum is well defined & $\Emb(D^2,M)\simeq\Fr(TM)$; \cref{thm:discs}\\
stable range for $H_*(B\Gamma_g)$ & $\Z\times B\Gamma_\infty^+\simeq\Omega^\infty MTSO(2)$; \cref{thm:MW}\\
\bottomrule
\end{tabular}
\caption{Surfaces: classical statements and the homotopy types behind them.}\label{tab:surfaces}
\end{table}

\section*{Notes}

The classification of surfaces is from the nineteenth century (Möbius, Jordan, Dyck); proofs by Morse
theory are in Hirsch and in Gramain's notes. The equivalence between two-dimensional field theories and
Frobenius algebras is folklore from the late 1980s; \cite{Koc04} is a careful account. The unoriented
analogue is due to Turaev and Turner. For mapping class groups see Farb and Margalit; for the Madsen--Weiss
theorem and its descendants, Galatius and Randal-Williams.

\section*{Exercises}

\begin{exercise}\label{exer:words}
Identify the closed surfaces given by the words $aba^{-1}b^{-1}$, $abab$, $abab^{-1}$, $aabb$,
$abca^{-1}b^{-1}c^{-1}$ and $abcabc$.
\end{exercise}

\begin{exercise}\label{exer:TP}
Deduce $T\#P\cong P\#P\#P$ from \cref{thm:classification}, using $\chi(M\#N)=\chi(M)+\chi(N)-2$.
\end{exercise}

\begin{exercise}\label{exer:frob}
Verify \cref{ex:frob}, and show that for a semisimple commutative Frobenius algebra $A=\bigoplus_ik\,e_i$ with
$\varepsilon(e_i)=\theta_i$ one has $Z(\Sigma_g)=\sum_i\theta_i^{1-g}$.
\end{exercise}

\begin{exercise}\label{exer:pants}
Let $W$ be a compact connected surface with a Morse function $f\colon W\to[a,b]$, $\partial W=f^{-1}\{a,b\}$,
having exactly one critical point, of index $1$. Show that $\chi(W)=-1$, and that $W$ is a disc with two
holes if it is orientable and a Möbius band with one hole if it is not.
\end{exercise}

\begin{exercise}\label{exer:torusdim}
Show from the relations of \cref{thm:2cob} that $Z(T^2)=\dim Z(S^1)$ for every two-dimensional field theory
with values in vector spaces.
\end{exercise}
%% ---- end ch/11-surfaces.tex ----
\part{Assessment}
%% ---- begin ch/12-coda.tex ----
\chapter{What the Language Did}\label{ch:coda}

The two earlier volumes of this series ended with an assessment of how much of their higher-categorical
vocabulary was doing work. The same question is asked here, and the answer is different in both directions:
more of the vocabulary is essential, and less of the mathematics is touched by it.

\section{Where the proofs live}

\begin{principle}[Four inputs]\label{prin:inputs}\Sob
The theorems of the source cited in this book are derived there from four analytic facts and the topology of
function spaces: the inverse function theorem; the existence of partitions of unity; the Morse--Sard
theorem; and the existence, uniqueness and smooth dependence of solutions of ordinary differential
equations. The first gives \cref{thm:transpull} and tubular neighbourhoods. The second gives approximation,
collars, and every passage from local to global. The third gives transversality and so every genericity
statement. The fourth gives the regular interval theorem, isotopy extension, and the handle description of a
critical point.
\end{principle}

None of the four is proved, shortened, or explained by anything in this book. The categorical statements
begin where the four inputs end. \Cref{thm:CS} characterizes derived manifolds, but that the transverse
fibre products exist is the inverse function theorem, and that they are dense is Sard's theorem.
\Cref{thm:concordance} classifies concordance classes, but its proof uses partitions of unity in an
essential way. \Cref{thm:palais} says that restriction is a fibration, and the lifting is done by
integrating a vector field. What the language provides is the form of the conclusions, and the form matters
for what can be done next.

\section{The source as a book about components}

\begin{table}[ht]\centering\small
\begin{tabular}{@{}p{0.36\textwidth}p{0.52\textwidth}@{}}
\toprule
theorem of the source & the statement of which it is the shadow on $\pi_0$\\
\midrule
homotopic maps pull back isomorphic bundles; classification (4.2.4, 4.3.4) & $\Pi[M,B\GL_k]\simeq\Map(M,B\Or(k))$ (\cref{thm:concordance})\\
tubular neighbourhoods and collars are unique up to isotopy (4.5.3, 4.6) & the spaces of them are contractible (\cref{thm:tubcontract,thm:collar})\\
Hopf's theorem (5.1.10) & $S^n\to K(\Z,n)$ is $(n+1)$-connected; Pontryagin--Thom in $M$\\
invariance of intersection numbers (5.2.1) & derived fibre products have cobordism classes (\cref{thm:spivak})\\
$\chi$ by vector fields equals $\chi$ by homology (6.3.8) & a trace computed before and after a monoidal functor (\cref{thm:DP})\\
regular interval theorem (6.2.2) & families of compact manifolds are classified by $\coprod B\Diff$ (\cref{thm:ehresmann})\\
Thom's theorem (7.2.3) & $B\Cob_d\simeq\Omega^{\infty-1}MTO(d)$ (\cref{thm:GMTW})\\
isotopy extension (8.1.3) & $\Diff_c(M)\to\Emb(V,M)$ is a fibre bundle (\cref{thm:palais})\\
embeddings of discs are isotopic (8.3.1) & $\Emb(D^n,M)\simeq\Fr(TM)$ (\cref{thm:discs})\\
classification of surfaces (9.3.11) & $\mathcal M_2\simeq\coprod B\Diff$, with \cref{thm:EE,thm:MW}\\
\bottomrule
\end{tabular}
\caption{The main theorems of the source as statements about components.}\label{tab:pi0}
\end{table}

\Cref{tab:pi0} is the summary of the book. Read down the left column and one has Hirsch's table of contents;
read down the right and one has a good part of geometric topology since. In every row the left-hand
statement is what one can prove with one parameter of genericity (a path between two choices) and the
right-hand statement is what one gets by carrying all parameters. The source's method, described in the
Preface, already contains the idea: an invariant is independent of choices because two choices are joined by
a generic path. The higher statement is that the space of choices is contractible because spheres of choices
bound generic discs.

\section{What is higher here}

In the volume on game theory the $\infty$-categorical structure was largely decorative, and in the volume
on information theory it was concentrated in one place (the bar construction behind entropy). Here it is
needed in at least four places where no $1$-categorical substitute exists.

First, derived fibre products. The last row of \cref{tab:four} has no solution in any ordinary category of
ringed spaces, and \cref{thm:CS} characterizes the $\infty$-category that solves it.

Second, moduli. The stack $B\GL_k$ and the stack of manifold bundles are not sheaves of sets, and their shapes
$B\Or(k)$ and $\coprod B\Diff(W)$ are not discrete.

Third, composition of cobordisms, which is associative only up to the contractible choices of
\cref{ch:tubular}; the cobordism category is an $\infty$-category in an unavoidable way, and its homotopy type
is the content of \cref{thm:GMTW}.

Fourth, embedding spaces, whose description in \cref{thm:weiss,thm:BdBW} is by homotopy limits over
categories of discs.

In each case the higher statement was a theorem of someone else. This book contributes arrangement: the
observation that Hirsch's nine chapters are, in order, the $\pi_0$ of these theories, with the dictionary
made explicit and the status of each translation marked.

\section{What the language did not do}

It proved no theorem of differential topology. It did not make the analytic inputs of \cref{prin:inputs}
easier. It did not internalize genericity: the Baire property of the strong topology has no formulation in
terms of the sheaf $[M,N]$ that we know of (\cref{rem:nobaire}), and the density theorems are stated here
exactly as in the source.

It is blind, at the level of generality used here, to the phenomena that distinguish the smooth category
from the topological one. Exotic spheres appear in \cref{thm:spheres} as $\pi_0\Diff(S^n)$ and nowhere else;
nothing in the categorical formalism predicts them. The same formalism applied to topological or
piecewise-linear manifolds gives the same tables with different entries, and the differences among the
entries are the hard part of the subject.

And several of the statements quoted are much harder than the theorems they generalize. One should not
come away thinking that \cref{thm:GMTW} is a reformulation of Thom's theorem. It contains Thom's theorem as
its statement about components, and its proof uses new ideas.

\section{Directions}

\begin{problem}[Internal genericity]\label{prob:baire}\Spg
Find a property of a subobject $A\subset[M,N]$ of the mapping object, stated in terms of plots, that is
implied by residuality in the strong topology, implies the conclusion of the parametric transversality
theorem for every sufficiently rich plot, and is closed under countable intersections.
\end{problem}

\begin{problem}[Synthetic transversality]\label{prob:synthetic}\Spg
In a model of synthetic differential geometry, or in differential cohesive homotopy type theory, the
transverse fibre products are those preserved by passage to tangent complexes (\cref{thm:derivedtrans}).
Give a synthetic proof of \cref{lem:fibre} and isolate the axiom that plays the role of Sard's theorem.
\end{problem}

\begin{problem}[Families]\label{prob:families}\Spg
\Cref{prin:generic} concerns a single diagram. For a family of diagrams parametrized by a manifold $B$, the
limits form a derived manifold over $B$, and the points of $B$ where the fibre is not a manifold form a
closed set of positive codimension in good cases. Describe the stratification of $B$ by the type of the
singular fibre in terms of the tangent complex, in the generality of \cref{thm:CS}.
\end{problem}

The third problem is the one the companion volume takes up in a special case. A neural network architecture
is a smooth family of maps parametrized by its weights; the decision boundaries, level sets and fixed-point
sets of the network are fibres of fibre products over the parameter space; and the questions asked about
them in practice (when is the boundary a manifold, how does its topology change in training, what is the
set of parameters fitting the data) are questions about that stratification. The theorems of this book that
are used there are \cref{thm:transpull,thm:parametric,lem:fibre}, the openness results of
\cref{ch:function}, Morse theory in the form of \cref{cor:pushout,thm:cerf}, and the isotopy theory of
\cref{ch:isotopy}.
%% ---- end ch/12-coda.tex ----
\appendix
%% ---- begin ch/A-toolkit.tex ----
\chapter{Categorical Toolkit}\label{app:toolkit}

This appendix fixes the meaning of the categorical terms used in the text. It is a list of definitions with
references and proves nothing.

\section*{Spaces and \texorpdfstring{$\infty$}{infinity}-categories}

A \emph{space} is an $\infty$-groupoid: a homotopy type, presented for instance by a Kan complex or a CW
complex. Spaces form an $\infty$-category $\Spc$. An \emph{$\infty$-category} has objects and, for each pair
of objects, a space of morphisms, with composition associative up to coherent homotopy; quasi-categories and
complete Segal spaces are equivalent models. An ordinary category is an $\infty$-category whose mapping
spaces are discrete. Limits and colimits in an $\infty$-category are homotopy limits and colimits in any
model; in particular a pushout in $\Spc$ is a homotopy pushout. The \emph{classifying space} $B\mathcal C$ of
an $\infty$-category is the space obtained by inverting all morphisms. A category in which composition is
defined after a choice from a contractible space, such as the cobordism category, presents an
$\infty$-category.

\section*{Sheaves on Euclidean spaces}

$\Cart$ is the category of the spaces $\R^n$ and smooth maps, with the coverage of
\cref{def:smset}. A sheaf of sets on it is a smooth set; a sheaf of spaces (a functor
$\Cart^{\op}\to\Spc$ satisfying descent for covers) is a smooth $\infty$-groupoid. The $\infty$-topos
$\mathbf H$ of these has a chain of adjoint functors
\[\Pi\ \dashv\ \operatorname{Disc}\ \dashv\ \Gamma\ \dashv\ \operatorname{coDisc}\colon\quad
\mathbf H\rightleftarrows\Spc ,\]
where $\Gamma$ is evaluation at the point, $\operatorname{Disc}$ is the constant sheaf, and $\Pi$ is the
shape \cite{Sch13}. For $X\in\mathbf H$ and a manifold $M$, a \emph{section of $X$ over $M$} is a map
$M\to X$ in $\mathbf H$; the mapping object $[M,X]$ has sections over $U$ the sections of $X$ over $U\times
M$. The delooping $BG$ of a sheaf of groups $G$ is the sheaf of groupoids with one object and automorphisms
$G$, sheafified; maps $M\to BG$ are principal $G$-bundles.

\section*{Dualizable objects and traces}

Let $(\mathcal C,\otimes,\mathbf 1)$ be a symmetric monoidal category or $\infty$-category. An object $X$ is
\emph{dualizable} if there are an object $X^\vee$ and maps $\eta\colon\mathbf 1\to X\otimes X^\vee$,
$\epsilon\colon X^\vee\otimes X\to\mathbf 1$ such that the composites
$X\to X\otimes X^\vee\otimes X\to X$ and $X^\vee\to X^\vee\otimes X\otimes X^\vee\to X^\vee$ are identities.
The \emph{trace} of $f\colon X\to X$ is $\epsilon\circ\text{swap}\circ(f\otimes1)\circ\eta\in
\operatorname{End}(\mathbf 1)$, and the \emph{Euler characteristic}, or dimension, of $X$ is
$\tr(\id_X)$ \cite{DP80,PS14}. In vector spaces the dualizable objects are the finite-dimensional ones; in
spectra they are the finite spectra. An object of a symmetric monoidal $(\infty,d)$-category is \emph{fully
dualizable} if it is dualizable and the evaluation and coevaluation maps have adjoints, which have adjoints,
and so on through dimension $d-1$ \cite{Lur09}.

\section*{Spectra and Thom spectra}

The $\infty$-category $\Sp$ of spectra is the stabilization of pointed spaces; it is symmetric monoidal under
the smash product, with unit the sphere spectrum $\mathbb S$, and $\pi_n\mathbb S$ is the $n$-th stable
homotopy group of spheres. There are adjoint functors $\Sigma^\infty_+\colon\Spc\to\Sp$ and
$\Omega^\infty\colon\Sp\to\Spc$, and $\Omega^{\infty-1}E$ means $\Omega^\infty\Sigma E$. The Thom spectrum of a
stable vector bundle $\xi$ over $X$ has $k$-th space the Thom space of the rank-$k$ part of $\xi$ over the
corresponding piece of $X$; equivalently it is the colimit of \cref{thm:ABGHR}. $MO$ is the Thom spectrum of
the universal stable bundle over $B\Or$, and $MTO(d)$ that of the virtual bundle $-\gamma_d$ over $B\Or(d)$.

\section*{\texorpdfstring{$C^\infty$}{C-infinity}-rings}

A $C^\infty$-ring is a product-preserving functor $\Cart\to\Set$ (\cref{def:cinf}); a simplicial
$C^\infty$-ring is a product-preserving functor $\Cart\to\Spc$ (\cref{def:scr}). The free $C^\infty$-ring on
$n$ generators is $C^\infty(\R^n)$. A $C^\infty$-ring is \emph{finitely presented} if it is
$C^\infty(\R^n)/(f_1,\dots,f_k)$; a simplicial one is finitely presented if it is a finite colimit of free
ones, and the opposite of the $\infty$-category of these is $\DMfd$ (\cref{thm:CS}). Hadamard's lemma, that a
smooth function vanishing on $\{x_1=0\}$ is divisible by $x_1$, is what makes quotients of $C^\infty$-rings
by coordinate functions behave as in algebra.

\section*{Notation}

\begin{center}\small
\begin{tabular}{@{}p{0.3\textwidth}p{0.6\textwidth}@{}}
\toprule
$\Mfd$, $\Cart$, $\cat{Open}$ & manifolds; Euclidean spaces; open subsets of Euclidean spaces\\
$\SmSet$, $\Dflg$, $\mathbf H$ & smooth sets; diffeological spaces; smooth $\infty$-groupoids\\
$\CinfRing$, $\DMfd$ & $C^\infty$-rings; derived manifolds\\
$[M,N]$, $\Pi$ & mapping object; shape\\
$\Emb$, $\Imm$, $\Diff$ & embeddings, immersions, diffeomorphisms (as smooth sets or their shapes)\\
$f\trans g$, $M\times^h_NP$ & transverse; derived fibre product\\
$\Th(\xi)$, $M^{-TM}$ & Thom space; Thom spectrum of the stable normal bundle\\
$\mathfrak N_n$, $\Omega_n$, $\Cob_d$, $\Bord_d$ & cobordism groups; cobordism categories\\
$\Sigma_g$, $N_h$ & closed surfaces, orientable of genus $g$ and non-orientable with $h$ crosscaps\\
\bottomrule
\end{tabular}
\end{center}
%% ---- end ch/A-toolkit.tex ----
%% ---- begin ch/B-concordance.tex ----
\chapter{Concordance with Hirsch}\label{app:concordance}

The table lists the sections of M.~W.~Hirsch, \emph{Differential Topology} (Graduate Texts in
Mathematics~33), with the place in this book where their content is treated and the form it takes there.
Section numbers are those of the source; ``2.1'' means Chapter~2, Section~1.

{\small
\begin{longtable}{@{}p{0.29\textwidth}p{0.14\textwidth}p{0.49\textwidth}@{}}
\toprule
Source & Here & Form\\
\midrule
\endhead
1.1--1.2 Differential structures; maps and tangent bundles & \cref{ch:manifolds}, \cref{ch:tangent} & the category $\Mfd$ and its four enlargements; $T$ as a Weil functor\\
1.3 Embeddings and immersions & \S\S1.6--1.7 & transverse fibre products; $\Mfd$ as an idempotent completion\\
1.4 Manifolds with boundary & \S1.8 & neat submanifolds; the half-line as a smooth set\\
2.1 The weak and strong topologies & \S\S3.1, 3.4 & open conditions as $D$-open subobjects of $[M,N]$\\
2.2 Approximations & \S3.1 & density; smoothing of structures (\cref{thm:smoothing})\\
2.3 Approximations on $\partial$-manifolds and pairs & \S1.8 & not treated separately\\
2.4 Jets and the Baire property & \S\S2.5, 3.5, 3.6 & jets compose; genericity is not internal to the topos\\
2.5 Analytic approximations & --- & not treated\\
3.1 The Morse--Sard theorem & \S4.1 & stated; the single analytic source of genericity\\
3.2 Transversality & \S\S4.2--4.6 & fibrewise lemma; derived manifolds; cobordism classes of derived fibre products\\
4.1--4.3 Vector bundles; classification & \cref{ch:bundles} & the stack $B\GL_k$; concordance classification; bundles as idempotents\\
4.4 Oriented vector bundles & \S5.5 & tangential structures\\
4.5 Tubular neighbourhoods & \S6.1 & contractible space of choices\\
4.6 Collars and tubular neighbourhoods of neat submanifolds & \S6.2 & gluing; why cobordism categories are $\infty$-categories\\
4.7 Analytic differential structures & --- & not treated\\
5.1 Degrees of maps & \S\S7.1--7.2 & Hopf's theorem as Pontryagin--Thom in $M$ and as a Postnikov statement\\
5.2 Intersection numbers and the Euler characteristic & \S\S7.3--7.6 & classes of derived intersections; traces; the diagonal\\
5.3 Historical remarks & --- & ---\\
6.1 Morse functions & \S8.1 & generic points of $[M,\R]$\\
6.2 Differential equations and regular level surfaces & \S8.2 & Ehresmann; families have no local moduli\\
6.3 Passing critical levels and attaching cells & \S\S8.3--8.5 & homotopy pushouts; the sublevel functor; barcodes\\
6.4 CW-complexes & \S8.3 & compact manifolds are finite spaces\\
7.1 Cobordism and transversality & \S9.1 & cobordism groups\\
7.2 The Thom homomorphism & \S\S9.2--9.5 & Thom spectra as colimits; the cobordism category\\
8.1 Extending isotopies & \S\S10.1--10.2 & restriction is a fibration\\
8.2 Gluing manifolds together & \S6.2 & contractible choices\\
8.3 Isotopies of disks & \S\S10.3--10.4 & $\Emb(D^n,M)\simeq\Fr(TM)$; the little discs operad\\
9.1 Models of surfaces & \S11.2 & the monoid of surfaces\\
9.2 Characterization of the disk & \S11.1 & used in the classification\\
9.3 The classification of compact surfaces & \S\S11.1--11.7 & presentation of the cobordism category; field theories; moduli\\
\bottomrule
\end{longtable}
}

Topics treated here that are not in the source: Weil algebras and tangent categories (\cref{ch:tangent});
the mapping object and its shape (\cref{ch:function}); derived manifolds (\cref{ch:transversality}); Atiyah
duality and traces (\cref{ch:tubular,ch:degree}); flow categories, Cerf theory and framed functions
(\cref{ch:morse}); the cobordism category and the cobordism hypothesis (\cref{ch:cobordism}); the
Smale--Hirsch theorem, manifold calculus and factorization homology (\cref{ch:isotopy}); field theories and
moduli of surfaces (\cref{ch:surfaces}).
%% ---- end ch/B-concordance.tex ----
%% ---- begin ch/C-computations.tex ----
\chapter{Computations}\label{app:computations}

The script \texttt{verify-differential-topology.py} that accompanies this book uses only the Python standard library and runs in a
few seconds. It performs 71 checks, each printing \texttt{PASS} or \texttt{FAIL}, and exits with status
zero if and only if all pass. The checks recompute the numerical examples in the text and test finite or
numerical instances of structural statements. They are evidence that the examples are stated correctly;
they do not prove the theorems.

{\small
\begin{longtable}{@{}p{0.13\textwidth}p{0.79\textwidth}@{}}
\toprule
Chapter & What is checked\\
\midrule
\endhead
\ref{ch:manifolds} & the differential of $A\mapsto A^{\mathsf T}A$ is onto at orthogonal matrices, $n=2,3,4$
(\cref{ex:On}); signed zero counts of $x^2-\varepsilon$; a smooth idempotent has rank equal to trace along
its fixed set (\cref{thm:karoubi}); the stereographic transition is an involution\\
\ref{ch:tangent} & the chain rule in dual numbers against finite differences, in one and two variables; the
expansion in $\R[\varepsilon,\eta]/(\varepsilon^2,\eta^2)$ and its symmetry (\cref{prop:flip}); the vertical
lift; associativity of composition of $2$-jets in one and several variables (\cref{prop:jets}); the reverse
chain rule and the transpose relation (\cref{prop:reverse})\\
\ref{ch:function} & \cref{ex:weakfail}: $g_n$ equals the identity on $[-n+1,n-1]$, has derivative $-1$
somewhere, and stays outside a strong neighbourhood; a degenerate critical point of $x-\beta(x-n)$
(\cref{exer:morseweak})\\
\ref{ch:transversality} & the dimension $\rho(m+n-\rho)$ of the tangent space to the rank-$\rho$ matrices in
four cases (\cref{prop:rank}); the linear algebra of \cref{lem:fibre} on random instances, including
non-transverse ones; the family $x^2-v$; the Koszul complex of $x^2$ in a polynomial model; the Euler
characteristic of the tangent complex; injectivity of random projections of a circle from $\R^5$ to $\R^3$
(\cref{cor:counts})\\
\ref{ch:bundles} & \cref{ex:taut}: the idempotent of the tautological line and its monodromy; the idempotent
of $TS^2$; the count of line bundles on the torus and Klein bottle (\cref{exer:lines})\\
\ref{ch:tubular} & the Jacobian $1+t$ of the normal exponential map of the circle; the focal radius $b^2/a$
of the ellipse (\cref{exer:focal}); convexity of inner products; the two linear homotopies of the shift
trick and the failure of the naive one (\cref{exer:shift})\\
\ref{ch:degree} & the degree of $z^k$ by preimages and by winding integral; the degree of the antipodal map;
intersection numbers on the torus (\cref{ex:torus}); fixed points and Lefschetz numbers of six toral
automorphisms (\cref{ex:lefschetz}); Poincaré--Hopf indices on $S^2$ and $S^3$; Euler characteristics and
mod $2$ Betti numbers of triangulations of $S^2$, $\RP^2$ and the torus; the Gauss linking integral
(\cref{ex:linking})\\
\ref{ch:morse} & the critical points and indices of \cref{ex:torusheight}; the Morse polynomial; the
birth--death family; the degree-zero barcode of random functions on a circle (\cref{prop:persist});
\cref{exer:rpn}; the deformation of \cref{exer:model}\\
\ref{ch:cobordism} & the ranks of $\mathfrak N_n$ for $n\le10$; the Stiefel--Whitney numbers of
\cref{ex:sw}; the arithmetic of \cref{exer:chimod2}; the degree of the collapse of a framed point
(\cref{exer:framed0})\\
\ref{ch:isotopy} & a time-dependent flow on $\R^2$ is injective with positive Jacobian; the rotation flow;
blow-up of $x^2\partial_x$; the rotation numbers of \cref{cor:WG}; the shrinking of \cref{exer:discRn}\\
\ref{ch:surfaces} & vertex counts, Euler characteristics and orientability for seven polygon words
(\cref{exer:words}); $T\#P$ and $P\#P\#P$; the Frobenius algebras of \cref{ex:frob}: handle elements,
$Z(\Sigma_g)$ for $g\le3$, the Frobenius relation, and $Z(T^2)=\dim A$\\
\bottomrule
\end{longtable}
}

Numerical tolerances are stated in the script. The random seed is fixed, so the output is reproducible.
%% ---- end ch/C-computations.tex ----
%% ---- begin ch/D-solutions.tex ----
\chapter{Solutions to the Exercises}\label{app:solutions}

Solutions to all exercises follow, by chapter. Where a solution relies on a computation, the computation is
also carried out by \texttt{verify-differential-topology.py}.
%% ---- end ch/D-solutions.tex ----
%% ---- begin sol/01.tex ----
\section*{Chapter 1}

\sol{1.1} In $\Mfd$: a cone is $(S,u)$ with $u\colon S\to\R$ smooth and $u^2=0$, so $u=0$ and the cone is the
unique map $S\to\pt$. The same argument applies to every $S=\R^n$, so the sheaf-theoretic fibre product has
exactly one plot of each dimension and is the terminal smooth set. In $\CinfRing$ the pushout of
$C^\infty(\R)\xleftarrow{x\mapsto x^2}C^\infty(\R)\xrightarrow{\mathrm{ev}_0}\R$ is $C^\infty(\R)/(x^2)$, and
Hadamard's lemma $g=g(0)+g'(0)x+x^2h$ shows that $g\mapsto g(0)+g'(0)\varepsilon$ is an isomorphism onto
$\R[\varepsilon]/(\varepsilon^2)$. A $C^\infty$-ring map $\phi\colon C^\infty(M)\to\R[\varepsilon]$ has the
form $\phi(g)=\phi_0(g)+\phi_1(g)\varepsilon$. The component $\phi_0$ is an $\R$-algebra map to $\R$, hence
evaluation at a point $p$ (every character of $C^\infty(M)$ is a point evaluation, $M$ being second
countable). Multiplicativity of $\phi$ gives $\phi_1(gh)=g(p)\phi_1(h)+h(p)\phi_1(g)$, so $\phi_1$ is a
derivation at $p$, a tangent vector. Conversely a tangent vector $v$ at $p$ gives
$g\mapsto g(p)+v(g)\varepsilon$, which respects all smooth operations by the chain rule.

\sol{1.2} The proof in the text shows that each $x\in\Fix(e)$ has a neighbourhood $U$ on which $e$ has
constant rank $k=\tr de_x$. By the constant rank theorem there are charts near $x$ and $e(x)=x$ in which
$e$ is $(u,v)\mapsto(u,0)$ with $u\in\R^k$; shrinking $U$, the set $e(U)$ is a $k$-dimensional embedded
submanifold near $x$, and $\Fix(e)\cap U\subset e(U)$. Conversely $e(U)\cap U'\subset\Fix(e)$ for a smaller
neighbourhood $U'$, because $e(e(y))=e(y)$. So $\Fix(e)$ is an embedded submanifold near $x$; it is closed
as the equalizer of $e$ and $\id$ in a Hausdorff space. Smoothness of $e$ into $\Fix(e)$ follows since the
submanifold is embedded. For the example take $M=\R\sqcup\R^2$ and $e$ the map which is the identity on $\R$
and $(x,y)\mapsto(0,0)$ on $\R^2$; then $\Fix(e)=\R\sqcup\{0\}$. On a connected $M$ the set $\Fix(e)=e(M)$ is
connected, so the dimension is constant.

\sol{1.3} $f(A)=A^{\mathsf T}A$ is polynomial, hence smooth, with values in the vector space $\cat{Sym}_n$ of
dimension $\frac12n(n+1)$. Its differential at $A$ is $df_A(H)=A^{\mathsf T}H+H^{\mathsf T}A$. If
$A^{\mathsf T}A=I$ and $S$ is symmetric, then $H=\frac12AS$ gives
$\frac12A^{\mathsf T}AS+\frac12S^{\mathsf T}A^{\mathsf T}A=S$. So $I$ is a regular value and
$\dim\Or(n)=n^2-\frac12n(n+1)=\frac12n(n-1)$. The tangent space at $I$ is $\ker df_I=\{H:H+H^{\mathsf T}=0\}$.

\sol{1.4} A plot of $[M,N]$ of dimension $n$ is by definition a smooth map $F\colon\R^n\times M\to N$, and the
function it induces on points is $s\mapsto F(s,-)$, which determines $F$; so $[M,N]$ is concrete and its points
are $\Hom(\pt\times M,N)=C^\infty(M,N)$. For the adjunction, when $S=\R^n$ the bijection is the definition.
A general smooth set is a colimit of representables, $S=\colim_i\R^{n_i}$; the functor $-\times M$ preserves
colimits because $\SmSet$ is a topos, so
$\Hom(S\times M,N)=\lim_i\Hom(\R^{n_i}\times M,N)=\lim_i[M,N](\R^{n_i})=\Hom(S,[M,N])$.

\sol{1.5} Let $f(x)=g(y)=z$. The tangent space to $\Delta_N$ at $(z,z)$ is $\{(w,w)\}$. Transversality of
$f\times g$ to $\Delta_N$ at $(x,y)$ says that every $(a,b)\in T_zN\oplus T_zN$ is
$(df_xu+w,\,dg_yv+w)$ for some $u,v,w$. Subtracting, this holds if and only if every $a-b$ is of the form
$df_xu-dg_yv$, that is, if and only if $df_x(T_xM)+dg_y(T_yP)=T_zN$: given such a decomposition of $a-b$, set
$w=a-df_xu$.
%% ---- end sol/01.tex ----
%% ---- begin sol/02.tex ----
\section*{Chapter 2}

\sol{2.1} For open subsets of Euclidean spaces,
$T(U\times V)=U\times V\times\R^m\times\R^n\cong TU\times TV$ by reordering coordinates, and the reordering
commutes with the maps $T(f\times g)$ and $Tf\times Tg$ since $D(f\times g)=Df\oplus Dg$. The isomorphism is
therefore natural and glues over atlases. For the second statement, $Z=f^{-1}(z)$ is a submanifold with
$T_xZ=\ker df_x$ by \cref{thm:transpull}. A vector $(x,v)\in TM$ satisfies $Tf(x,v)=0_z$ exactly when
$f(x)=z$ and $df_xv=0$, that is, when $(x,v)\in TZ$. One checks that $0_z$ is a regular value of $Tf$: in
coordinates $D(Tf)_{(x,v)}(\xi,\nu)=(Df_x\xi,\,D^2f_x(v,\xi)+Df_x\nu)$, which is onto when $Df_x$ is. So the
equality is one of submanifolds.

\sol{2.2} An $A$-point of $\R^n$ is $x+v\,t+\tfrac12a\,t^2$ with $t^3=0$, the $2$-jet at $0$ of the curve
$t\mapsto x+vt+\frac12at^2$; a map $f$ acts by Taylor expansion, which is the composition of $2$-jets, so
$T_AM$ is the bundle of $2$-jets of curves and its fibre has dimension $2n$. The map $x\mapsto
\varepsilon+\eta$ is a homomorphism since $(\varepsilon+\eta)^3=3\varepsilon^2\eta+3\varepsilon\eta^2=0$,
and it is injective: $1,\ \varepsilon+\eta,\ (\varepsilon+\eta)^2=2\varepsilon\eta$ are independent. On
points it sends $x+vt+\frac12at^2$ to $x+v\varepsilon+v\eta+a\varepsilon\eta$, that is, to $(x,v,v,a)$ in
the coordinates of \cref{tab:weil}. The fixed set of the flip is $\{v=w\}$, and $T(p)$ and $p_T$ are the two
projections $(x,v,w,a)\mapsto(x,v)$ and $(x,w)$, so the condition $T(p)=p_T$ is again $v=w$. The image is
exactly $\{(x,v,v,a)\}$, of fibre dimension $2n$, and the map is an embedding.

\sol{2.3} Write $f(x)=Ax+\frac12B(x,x)+\dots$ and $g(y)=Cy+\frac12E(y,y)+\dots$ with $B,E$ symmetric bilinear.
Then $g(f(x))=CAx+\frac12\bigl(C\,B(x,x)+E(Ax,Ax)\bigr)+O(|x|^3)$, so
\[(C,E)\circ(A,B)=\bigl(CA,\ C\circ B+E\circ(A\times A)\bigr).\]
For a third jet $(F,G)$,
$(F,G)\circ\bigl((C,E)\circ(A,B)\bigr)=\bigl(FCA,\ FCB+FE(A\times A)+G(CA\times CA)\bigr)$ and
$\bigl((F,G)\circ(C,E)\bigr)\circ(A,B)=\bigl(FCA,\ FCB+(FE+G(C\times C))(A\times A)\bigr)$, which agree.

\sol{2.4} A point of $TT\R^n=T_{W\otimes W}\R^n$ is $x+v\varepsilon+w\eta+a\varepsilon\eta$. A homomorphism
$\phi\colon A\to B$ acts on $A$-points by applying $\phi$ to the coefficients. Addition: a point of
$T_{W\times_\R W}$ is $x+v_1\varepsilon_1+v_2\varepsilon_2$, and $\varepsilon_i\mapsto\varepsilon$ sends it to
$x+(v_1+v_2)\varepsilon$. Vertical lift: $x+v\varepsilon\mapsto x+v\varepsilon\eta$, which is $(x,0,0,v)$.
Flip: exchanging $\varepsilon$ and $\eta$ sends $(x,v,w,a)$ to $(x,w,v,a)$. Each map is natural because it
is induced by a homomorphism (\cref{thm:weil}(iii)); directly, naturality of $\ell$ is the identity
$f(x+v\varepsilon\eta)=f(x)+Df_x(v)\varepsilon\eta$, since $(\varepsilon\eta)^2=0$.

\sol{2.5} Let $(f,f^\sharp)$, $(g,g^\sharp)$, $(h,h^\sharp)$ be composable. Both bracketings have forward part
$hgf$ and backward part
$(x,u')\mapsto f^\sharp\bigl(x,g^\sharp(f(x),h^\sharp(gf(x),u'))\bigr)$, as one sees by unfolding the
definition twice; so composition is associative. For $F=f_k\cdots f_1$ with scalar output, \cref{prop:reverse}
gives $R[F](x,1)=R[f_1](x_0,R[f_2](x_1,\dots R[f_k](x_{k-1},1)))$ with $x_0=x$ and $x_i=f_i(x_{i-1})$. The
forward pass computes and stores $x_0,\dots,x_{k-1}$; the backward pass applies the transposed Jacobians
$(Df_i)_{x_{i-1}}^{\mathsf T}$ to a single covector, for $i=k,\dots,1$. The result is the gradient of $F$ at
$x$.
%% ---- end sol/02.tex ----
%% ---- begin sol/03.tex ----
\section*{Chapter 3}

\sol{3.1} The support of $\beta(\cdot-n)$ is $[n-1,n+1]$, so $g_n=\id$ on $[-n+1,n-1]$ and every weak
neighbourhood of $\id$, which constrains maps on a compact set only, contains $g_n$ for large $n$. Since
$\beta'$ attains its maximum $1$ at some $x^*$, $g_n'(n+x^*)=-1<0$ while $g_n'=1$ outside the support, so
$g_n$ is not monotone. For the strong topology, $|g_n(n)-n|=2\beta(0)>\beta(0)e^{-n^2}$, so no $g_n$ lies in the stated strong
neighbourhood of the identity. Not closed: $h_n(x)=x/n$ are diffeomorphisms converging weakly to the constant map $0$.

\sol{3.2} Fix $t_0$. We claim there are $\delta>0$ and a compact $K$ with $f_t=f_{t_0}$ off $K$ for
$|t-t_0|<\delta$. If not, for each $n$ there are $t_n$ with $|t_n-t_0|<1/n$ and $x_n\notin[-n,n]$ with
$f_{t_n}(x_n)\ne f_{t_0}(x_n)$; passing to a subsequence, the $x_n$ are distinct and tend to infinity.
Choose a continuous $\varepsilon\colon\R\to(0,\infty)$ with
$\varepsilon(x_n)<|f_{t_n}(x_n)-f_{t_0}(x_n)|$ for all $n$. The strong neighbourhood
$\{g:|g-f_{t_0}|<\varepsilon\}$ contains no $f_{t_n}$, contradicting continuity at $t_0$. Cover $[0,1]$ by
finitely many such intervals and take the union of the compact sets. Conversely, if $g=f$ off a compact
$K$, the straight-line path $f+t(g-f)$ is strongly continuous: it is constant off $K$, and on $K$ uniform
convergence suffices. So the path component of $f$ is as stated.

\sol{3.3} Let $F\colon\R^n\times M\to N$ be smooth and $s_0\in\R^n$. For a compact $K\subset M$ in a chart, $F$
and its first derivative in the $M$-direction are uniformly continuous on $\bar B(s_0,1)\times K$, so
$\sup_{x\in K}\bigl(|F_s(x)-F_{s_0}(x)|+\|D_xF_s(x)-D_xF_{s_0}(x)\|\bigr)\to0$ as $s\to s_0$; this is
convergence in $C^1_W$. For the example let $F_s(x)=(\gamma_s(x),0)$ with $\gamma_s(x)=x-2\beta(x-1/s)$ for
$s>0$ and $\gamma_s(x)=x$ for $s\le0$, with $\beta$ as in \cref{ex:weakfail}. This is smooth in $(s,x)$ because for $|x|<R$ and $0<s<1/(R+1)$ the
bump is not seen. $F_0$ is an embedding and $F_s$ is not injective for small $s>0$
(\cref{ex:weakfail}), so the set of parameters giving embeddings is not open at $s=0$.

\sol{3.4} Reflexivity: the constant plot $\R\to\pt\to X$. Symmetry: compose with $t\mapsto1-t$. Transitivity:
let $p,q\colon\R\to X$ be plots with $p(1)=q(0)$. Choose a smooth non-decreasing $\lambda\colon\R\to\R$ with
$\lambda(t)=0$ for $t\le\frac13$ and $\lambda(t)=1$ for $t\ge\frac23$. Then $p\lambda$ is a plot, constant
equal to $p(1)$ on $(\frac23,\infty)$, and $q\lambda(\cdot-1)$ is a plot, constant equal to $q(0)$ on
$(-\infty,\frac43)$. On the overlap $(\frac23,\frac43)$ of the open sets $(-\infty,\frac43)$ and
$(\frac23,\infty)$, which cover $\R$, the two plots restrict to the same constant plot. By the sheaf
condition (after pulling back along diffeomorphisms of the intervals with $\R$) they glue to a plot
$r\colon\R\to X$ with $r(0)=p(0)$ and $r(2)=q(1)$; reparametrize by $t\mapsto2t$.

\sol{3.5} Dense: given $f$ and a weak neighbourhood, which constrains $f$ on some $[-R,R]$, the functions
$f_a(x)=f(x)+ax$ are Morse for almost every $a$, because $f_a$ is Morse exactly when $-a$ is a regular value
of $f'$, and Sard's theorem applies to $f'$; and $f_a\to f$ on $[-R,R]$ in every $C^r$ norm as $a\to0$. Not
open: $f(x)=x$ is Morse. With $\beta$ as in \cref{ex:weakfail}, let $g_n(x)=x-\beta(x-n)$. At the point
$x^*$ where $\beta'$ attains its maximum $1$ we have $\beta''(x^*)=0$, so
$g_n'(n+x^*)=0$ and $g_n''(n+x^*)=0$: a degenerate critical point. And $g_n\to f$ weakly.
%% ---- end sol/03.tex ----
%% ---- begin sol/04.tex ----
\section*{Chapter 4}

\sol{4.1} Let $F\colon\R^n\times M\to\R^n$, $F(v,x)=f(x)+v$. Its differential in the $v$-direction is the
identity, so $F$ is a submersion and in particular $F\trans A$. By \cref{thm:parametric}, $F_v=f+v$ is
transverse to $A$ for almost every $v$. If $M$ and $A$ are curves in $\R^3$ then
$\dim M+\dim A<3$, and a map of a $1$-manifold transverse to a $1$-dimensional submanifold of $\R^3$ cannot
meet it: at a common point the images of the two tangent spaces would have to span $\R^3$.

\sol{4.2} Let $X_0$ have rank $\rho$. After multiplying on both sides by invertible matrices, which are
diffeomorphisms of $\R^{m\times n}$ preserving rank, we may take $X_0=\bigl(\begin{smallmatrix}I_\rho&0\\0&0
\end{smallmatrix}\bigr)$. Write a nearby matrix in blocks
$X=\bigl(\begin{smallmatrix}P&Q\\R&S\end{smallmatrix}\bigr)$ with $P$ invertible. Row and column operations
give $\rk X=\rho+\rk(S-RP^{-1}Q)$. So near $X_0$ the set of rank-$\rho$ matrices is the zero set of
$\Phi(X)=S-RP^{-1}Q$, a map to $\R^{(m-\rho)\times(n-\rho)}$ whose differential in the $S$-direction is the
identity. It is a submersion, and the zero set is a submanifold of codimension $(m-\rho)(n-\rho)$.

\sol{4.3} Resolve $\R$ as a $C^\infty(\R)$-module by the Koszul complex
$C^\infty(\R)\xrightarrow{x}C^\infty(\R)$; it is exact on the left because $x$ is not a zero divisor, and the
cokernel is $\R$ by Hadamard's lemma. This resolution is also a cofibrant model as a simplicial
$C^\infty$-ring (it is free on one generator in degree $1$ over $C^\infty(\R)$). Tensoring with $\R$ along
evaluation at $0$ gives $\R\xrightarrow{0}\R$: the homotopy groups are $\R$ in degrees $0$ and $1$, as in
\cref{ex:derived}(b). For the second, resolve $\R$ in the same way and tensor with $C^\infty(\R)$ along
$x\mapsto x^2$: the complex is $C^\infty(\R)\xrightarrow{x^2}C^\infty(\R)$. If $x^2g=0$ then $g=0$ away from
$0$ and so everywhere; the map is injective, $\pi_1=0$, and
$\pi_0=C^\infty(\R)/(x^2)=\R[\varepsilon]/(\varepsilon^2)$, as in \cref{ex:derived}(a).

\sol{4.4} The critical points of $f_a$ are the solutions of $\nabla f(x)=-a$, and the Hessian of $f_a$ is
that of $f$, which is the Jacobian of the map $\nabla f\colon U\to\R^m$. So $f_a$ is Morse if and only if $-a$
is a regular value of $\nabla f$. By \cref{thm:sard}, applied to the smooth map $\nabla f$ between manifolds
of the same dimension, almost every $a$ qualifies.

\sol{4.5} Suppose $g\colon D^n\to D^n$ is continuous without fixed points. Then $|g(x)-x|\ge2\delta>0$ by
compactness. By \cref{thm:approx} there is a smooth $h\colon D^n\to\R^n$ with $|h-g|<\delta$; then
$h_1=h/(1+\delta)$ maps $D^n$ to itself, is smooth, and has $|h_1-g|<2\delta$, so $h_1$ has no fixed point.
Let $\rho(x)$ be the point where the ray from $h_1(x)$ through $x$ leaves $D^n$:
$\rho(x)=x+t(x)\,(x-h_1(x))$ with $t(x)\ge0$ the larger root of $|x+t(x-h_1(x))|^2=1$. The discriminant of this
quadratic is positive because $x\ne h_1(x)$ and $|x|\le1$, so $t$ is smooth, and $t=0$ when $|x|=1$. Thus
$\rho$ is a smooth retraction of $D^n$ onto $S^{n-1}$, contradicting \cref{cor:noretract}.
%% ---- end sol/04.tex ----
%% ---- begin sol/05.tex ----
\section*{Chapter 5}

\sol{5.1} The fibre over the line $\ell_\theta$ spanned by $u(\theta)=(\cos\theta,\sin\theta)$ is $\ell_\theta$
itself. A nowhere-zero section would be $s(\theta)=\lambda(\theta)u(\theta)$ with $\lambda$ continuous and
non-zero on $[0,\pi]$, and since $u(\pi)=-u(0)$ while $s(\pi)=s(0)$ we need $\lambda(\pi)=-\lambda(0)$, so
$\lambda$ changes sign; contradiction. The total space is $\{(\theta,t)\}=[0,\pi]\times\R$ with $(0,t)$
glued to $(\pi,-t)$, the open Möbius band.

\sol{5.2} Since $e$ has constant rank, near any point one can choose $k$ columns of $e$ that are independent;
they are smooth sections of the image spanning it, so the image $\xi$ is a subbundle of $M\times\R^s$, with
complement the image of $1-e$. A section of $M\times\R^s$ is an element $v\in C^\infty(M)^s$; it lies in $\xi$
if and only if $ev=v$, so $\Gamma(\xi)=e\,C^\infty(M)^s$, and
$C^\infty(M)^s=e\,C^\infty(M)^s\oplus(1-e)\,C^\infty(M)^s$.

\sol{5.3} $TS^n=\{(x,v):|x|=1,\ \langle x,v\rangle=0\}$ and the normal bundle of $S^n\subset\R^{n+1}$ is
trivialized by the section $x\mapsto x$. So $TS^n\oplus\R\cong TS^n\oplus\nu=T\R^{n+1}|_{S^n}$, which is
trivial. The map $B\Or(n)\to B\Or(n+1)$ classifies $\xi\mapsto\xi\oplus\R$, so the composite
$S^n\to B\Or(n)\to B\Or(n+1)$ classifies a trivial bundle and is null-homotopic by \cref{thm:classify}; hence
so is the composite to $B\Or$.

\sol{5.4} If $\omega_1-\omega_0=dh$, let $\lambda\colon\R\to[0,1]$ be smooth with $\lambda(0)=0$,
$\lambda(1)=1$, and put $\Omega=\omega_0+d(\lambda(t)h)$ on $M\times\R$. It is closed and restricts to
$\omega_0$ and $\omega_1$. Conversely, let $\Omega=\alpha_t+g_t\,dt$ be closed on $M\times\R$, with
$\alpha_t$ a path of $1$-forms on $M$ and $g_t$ of functions. The $dt$-component of $d\Omega=0$ reads
$\partial_t\alpha_t=d_Mg_t$, so $\alpha_1-\alpha_0=d\int_0^1g_t\,dt$.

\sol{5.5} A line bundle has transition functions in $\GL_1(\R)$, homotopy equivalent to $\Z/2$, so
$B\Or(1)=\RP^\infty=K(\Z/2,1)$ and $[M,K(\Z/2,1)]=H^1(M;\Z/2)=\Hom(\pi_1M,\Z/2)$ for connected $M$. For the
torus $\pi_1=\Z^2$ and there are $4$ homomorphisms. For the Klein bottle
$\pi_1=\langle a,b\mid abab^{-1}\rangle$ has abelianization $\Z\oplus\Z/2$, and again
$\Hom(-,\Z/2)=(\Z/2)^2$ has $4$ elements. The determinant of the tangent bundle is trivial for the torus. For
the Klein bottle, presented as the square with $a$ the pair of sides glued by a reflection and $b$ the pair
glued by a translation, the orientation reverses along the loop that crosses the reflected sides, so
$\det T$ is the line bundle with $w_1$ non-zero on that loop and zero on the other.
%% ---- end sol/05.tex ----
%% ---- begin sol/06.tex ----
\section*{Chapter 6}

\sol{6.1} If $g_0,g_1$ are positive definite symmetric bilinear forms then so is $(1-t)g_0+tg_1$, since
$(1-t)g_0(v,v)+tg_1(v,v)>0$ for $v\ne0$. Every $A\in\GL_k(\R)$ has a unique polar decomposition $A=QP$ with $Q$
orthogonal and $P=(A^{\mathsf T}A)^{1/2}$ positive definite symmetric, depending continuously on $A$. The
path $A_t=Q\bigl((1-t)P+tI\bigr)$ stays in $\GL_k$ by convexity, fixes $\Or(k)$, and ends in $\Or(k)$; so
$\Or(k)$ is a deformation retract. A homotopy equivalence of topological groups that is a homomorphism induces
an equivalence of classifying spaces.

\sol{6.2} Let $e_0,e_1\colon M\to\R^q\subset\R^\infty$ be embeddings. Let $S,S'\colon\R^\infty\to\R^\infty$ be the
linear injections placing a vector in the odd, respectively even, coordinates. The linear map
$(1-t)\id+tS$ is injective for $t\in[0,1]$: an element of its kernel would be an eigenvector of $S$ with
eigenvalue $-(1-t)/t\le0$, and $S$ has none (if $Sx=\lambda x$ with $\lambda\ne0,1$ then
$x_2=0$, $x_3=x_2/\lambda=0$, and so on, and $x_1=\lambda x_1$ forces $x_1=0$; and $S$ is injective). An
injective linear map composed with an embedding of a compact manifold is an embedding, so
$(1-t)e_1+tSe_1$ is an isotopy from $e_1$ to $Se_1$; similarly from $e_0$ to $S'e_0$. Finally
$(1-t)Se_1+tS'e_0$ is an embedding for every $t$: for $t<1$ the odd coordinates are $(1-t)e_1$, an injective
immersion, and for $t>0$ the even coordinates are $te_0$. For non-compact $M$ one uses closed embeddings and
the same formulas. The naive homotopy can fail: for $e_1=-e_0$ the path $(1-2t)e_0$ is constant at $t=\frac12$.

\sol{6.3} Parametrize by arc length, with $\gamma'=T$ and $n'=-\kappa T$ (Frenet, with $n$ the inward normal
and $\kappa>0$ for a convex curve traversed counterclockwise). Then $\partial_s=(1-t\kappa)T$ and
$\partial_t=n$, so the determinant is $1-t\kappa(s)$ up to the sign of the frame. The map is a local
diffeomorphism where $t\kappa(s)\ne1$, hence for $|t|<1/\kappa_{\max}$. For the ellipse
$(a\cos u,b\sin u)$ the curvature is $ab/(a^2\sin^2u+b^2\cos^2u)^{3/2}$, with maximum $a/b^2$ at the ends of
the major axis. So $r=b^2/a$. (Global injectivity may fail earlier in general; for the ellipse it does
not on the inward side before $t=b^2/a$, and it never fails on the outward side.)

\sol{6.4} The one-point compactification of a product of locally compact spaces is the smash product of the
compactifications, which gives the first identity; the second and third are the cases $\eta=\R^j$ over a
point, where $\Th=S^j$, and $\xi=0$, where $\Th=M_+$. For the last, $\RP^{n+1}\setminus\{[0:\dots:0:1]\}$ is
the total space of the tautological bundle over $\RP^n$ by $[x:t]\mapsto([x],\ t\,x/|x|^2)$, where
$t\,x/|x|^2$ is a vector in the line $[x]$ that is unchanged by $(x,t)\mapsto(\lambda x,\lambda t)$; this is
a diffeomorphism, and the remaining point is the point at infinity.

\sol{6.5} Extend $f$ radially: $F(rx)=rf(x)$ for $x\in S^{n-1}$, $0\le r\le1$. This is a homeomorphism of
$D^n$ (the Alexander trick), smooth away from the origin. The map $\Sigma_f=D^n\cup_fD^n\to D^n\cup_{\id}D^n=S^n$
that is the identity on the first disc and $F$ on the second is well defined and bijective, continuous, and
hence a homeomorphism. If $f$ extends to a diffeomorphism $G$ of $D^n$, the same construction with $G$ in
place of $F$ is smooth on each disc and compatible with the gluing; it is a diffeomorphism for the smooth
structures of \cref{thm:gluing} after adjusting $G$ near the boundary to respect collars, which is possible by
uniqueness of collars (\cref{thm:collar}).
%% ---- end sol/06.tex ----
%% ---- begin sol/07.tex ----
\section*{Chapter 7}

\sol{7.1} For $k\ne0$ every point of $S^1$ is a regular value of $z\mapsto z^k$, with $|k|$ preimages, at each
of which the derivative $\theta\mapsto k\theta$ has the sign of $k$; so the degree is $k$. (For $k=0$ the map
is constant.) The antipodal map is the restriction of $-1$ on $\R^{n+1}$, a composite of $n+1$ reflections in
coordinate hyperplanes, each of which restricts to a diffeomorphism of $S^n$ of degree $-1$ (one preimage,
orientation reversed). So its degree is $(-1)^{n+1}$. If $v$ is a nowhere-zero vector field on $S^n$,
normalized to unit length, then $H(x,t)=\cos(\pi t)\,x+\sin(\pi t)\,v(x)$ is a homotopy on $S^n$ from the
identity to the antipodal map, so $1=(-1)^{n+1}$ and $n$ is odd.

\sol{7.2} A point $[x]$ is fixed if and only if $(A-1)x\in\Z^2$. The map $A-1$ is an injective endomorphism of
$\Z^2$ with image of index $|\det(A-1)|$, so the solutions $x\in(A-1)^{-1}\Z^2$ form a lattice containing
$\Z^2$ with index $|\det(A-1)|$; modulo $\Z^2$ there are that many. The differential of the torus map at any
point is $A$, so each fixed point is non-degenerate with index $\operatorname{sign}\det(1-A)$. The sum is
$\det(1-A)=1-\tr A+\det A$, which is $L(A)$ since $A$ acts on $H_1=\Z^2$ by $A$ and on $H_2=\Lambda^2H_1$ by
$\det A$.

\sol{7.3} Cyclicity: by the triangle identities, the dual map $g^\vee\colon Y^\vee\to X^\vee$ of
$g\colon X\to Y$ satisfies $(g\otimes1)\eta_X=(1\otimes g^\vee)\eta_Y$ and
$\epsilon_Y(1\otimes g)=\epsilon_X(g^\vee\otimes1)$. For $f\colon Y\to X$ one slides $g$ around the loop:
$\tr(gf)=\epsilon_Y\sigma(gf\otimes1)\eta_Y=\epsilon_Y\sigma(g\otimes1)(f\otimes1)\eta_Y$, and moving $g$
through $\epsilon$ as $g^\vee$ and then through $\eta$ back as $g$ on the other side yields
$\epsilon_X\sigma(fg\otimes1)\eta_X=\tr(fg)$. Multiplicativity: $X\otimes Y$ is dualizable with dual
$Y^\vee\otimes X^\vee$ and structure maps built from those of $X$ and $Y$; the trace diagram for $f\otimes g$
is the tensor product of the two trace diagrams after rearranging by symmetries, and
$\operatorname{End}(\mathbf 1)$ is commutative. For a graded vector space $V=\bigoplus V_i$ the coevaluation
is $1\mapsto\sum e_j\otimes e^j$ over a homogeneous basis, and the symmetry sends $e_j\otimes e^j$ to
$(-1)^{|e_j|\,|e^j|}e^j\otimes e_j=(-1)^{|e_j|}e^j\otimes e_j$, since $|e^j|=-|e_j|$. Evaluating gives
$\tr(f)=\sum_j(-1)^{|e_j|}\langle e^j,fe_j\rangle=\sum_i(-1)^i\tr(f|_{V_i})$.

\sol{7.4} On $S^n\subset\R^{n+1}$ let $v(x)=e_{n+1}-\langle x,e_{n+1}\rangle x$, the projection of the constant
field $e_{n+1}$. It vanishes at the poles $\pm e_{n+1}$. Near the south pole, in the chart
$y\mapsto(y,-\sqrt{1-|y|^2})$, $v$ is $y\mapsto y$ to first order, of index $+1$. Near the north pole it is
$y\mapsto-y$, of index $(-1)^n$. So $\chi(S^n)=1+(-1)^n$. Homologically $H_i(S^n)$ is $\mathbb Q$ for $i=0,n$
and zero otherwise, giving the same.

\sol{7.5} The disc $D=\{x^2+y^2\le1,\ z=0\}$ is bounded by $K$. The circle $L$ is
$\{(1+\cos t,0,\sin t)\}$; it meets the plane $z=0$ at $t=0$, the point $(2,0,0)$ outside $D$, and at
$t=\pi$, the point $(0,0,0)$ inside $D$. So $L$ meets $D$ once, transversally (its tangent there is
$(0,0,-1)$), and the linking number is $\pm1$, the sign depending on the orientations: with $D$ oriented by
the normal $e_3$ and $L$ by increasing $t$, it is $-1$.
%% ---- end sol/07.tex ----
%% ---- begin sol/08.tex ----
\section*{Chapter 8}

\sol{8.1} $f_\theta=-(R+r\cos\varphi)\sin\theta$ and $f_\varphi=-r\sin\varphi\cos\theta$. Since
$R+r\cos\varphi>0$, $f_\theta=0$ forces $\sin\theta=0$; then $\cos\theta=\pm1$ and $f_\varphi=0$ forces
$\sin\varphi=0$. The second derivatives are $f_{\theta\theta}=-(R+r\cos\varphi)\cos\theta$,
$f_{\varphi\varphi}=-r\cos\varphi\cos\theta$, $f_{\theta\varphi}=r\sin\varphi\sin\theta=0$ at the critical
points. At $(0,0)$: $(-(R+r),-r)$, index $2$. At $(0,\pi)$: $(-(R-r),+r)$, index $1$. At $(\pi,\pi)$:
$(R-r,-r)$, index $1$. At $(\pi,0)$: $(R+r,r)$, index $0$. All are non-degenerate because $R>r>0$.

\sol{8.2} Write $M(t)=\sum\nu_kt^k$, $P(t)=\sum\beta_kt^k$, so $M-P=(1+t)Q$. Dividing by $1+t$ as a formal
power series, $Q(t)=(M(t)-P(t))\sum_j(-1)^jt^j$, whose coefficient of $t^k$ is
$\sum_{i\le k}(-1)^{k-i}(\nu_i-\beta_i)$. Non-negativity of the coefficients of $Q$ is exactly the stated
inequality. For a closed connected orientable surface of genus $g$, with $F=\mathbb Q$, $\beta=(1,2g,1)$, so
$\sum\nu_k\ge\sum\beta_k=2g+2$. For a non-orientable surface $N_h$ use $F=\Z/2$: $\beta=(1,h,1)$ and the
bound is $h+2$.

\sol{8.3} In the chart $x_i=1$ with coordinates $(x_j)_{j\ne i}$,
$f=\bigl(\lambda_i+\sum_{j\ne i}\lambda_jx_j^2\bigr)/\bigl(1+\sum_{j\ne i}x_j^2\bigr)
=\lambda_i+\sum_{j\ne i}(\lambda_j-\lambda_i)x_j^2+O(|x|^4)$. So the origin of each chart is a non-degenerate
critical point of index $\#\{j:\lambda_j<\lambda_i\}=i$. There are no others: a critical point of $f$ on
$\RP^n$ lifts to a critical point of the quadratic form on $S^n$, an eigenvector of
$\operatorname{diag}(\lambda_i)$, and the eigenvalues are distinct. So $\nu_k=1$ for $0\le k\le n$. With
$F=\Z/2$, $\beta_k=1$ for all $k$ and $Q=0$. With $F=\mathbb Q$, $\beta_0=1$, $\beta_n=1$ if $n$ is odd, and
the others vanish; for $n$ even $M-P=t+\dots+t^n=(1+t)(t+t^3+\dots+t^{n-1})$ and for $n$ odd
$M-P=t+\dots+t^{n-1}=(1+t)(t+t^3+\dots+t^{n-2})$.

\sol{8.4} Define $\mu(x,y)=\min\bigl(|y|,\sqrt{\max(|x|^2-\varepsilon,0)}\bigr)$, a continuous function, and
let $r_t(x,y)=(x,\ y_t)$ where $y_t=y$ if $y=0$ and otherwise
$y_t=\bigl((1-t)|y|+t\mu(x,y)\bigr)\,y/|y|$. Then $r_t$ is continuous, $r_0=\id$, and $|y_t|\le|y|$, so
$q(r_t(x,y))\le q(x,y)\le\varepsilon$ and the deformation stays in $\{q\le\varepsilon\}$. At $t=1$:
if $|x|^2\le\varepsilon$ then $\mu=0$ and $r_1(x,y)=(x,0)$, a point of the disc; if $|x|^2>\varepsilon$
then $|y_1|^2=\min(|y|^2,|x|^2-\varepsilon)$ and $q(r_1(x,y))\le-\varepsilon$. Points of the target are
fixed for all $t$: on the disc $y=0$, and on $\{q\le-\varepsilon\}$ we have $|y|^2\le|x|^2-\varepsilon$ so
$\mu=|y|$.

\sol{8.5} $f_t'=3x^2-t$ and $f_t''=6x$. For $t<0$ there are no critical points. For $t=0$ there is one, at
$0$, degenerate. For $t>0$ there are two: $x=-\sqrt{t/3}$ with $f''<0$, a local maximum (index $1$) with
value $\frac{2t}{3}\sqrt{t/3}$, and $x=+\sqrt{t/3}$ with $f''>0$, a local minimum (index $0$) with value
$-\frac{2t}{3}\sqrt{t/3}$. On $[-L,L]$ with $L$ large, $f_t$ is increasing near the ends. For $t<0$ the
sublevel sets are intervals $[-L,c']$, all contractible: the functor is constant after the minimum
$f_t(-L)$. For $t>0$ a second component is born at the level of the local minimum and merges with the first
at the level of the local maximum: the degree-zero barcode acquires one finite interval, of length
$\frac{4t}{3}\sqrt{t/3}$, which shrinks to nothing as $t\to0^+$.
%% ---- end sol/08.tex ----
%% ---- begin sol/09.tex ----
\section*{Chapter 9}

\sol{9.1} Let $DW=W\cup_{\partial W}W$ be the double, a closed manifold of odd dimension, so $\chi(DW)=0$
(\cref{thm:morseineq}). By additivity, $\chi(DW)=2\chi(W)-\chi(\partial W)$. Hence $\chi(\partial W)=2\chi(W)$
is even. If $\dim W$ is even, $\partial W$ is closed of odd dimension and $\chi(\partial W)=0$. So $\chi$ mod
$2$ vanishes on boundaries; it is additive under disjoint union and multiplicative under products
(\cref{thm:euler}), hence a ring homomorphism on $\mathfrak N_*$. $\chi(\RP^{2m})=1$, as $\RP^{2m}$ has one
cell in each dimension $0,\dots,2m$.

\sol{9.2} The allowed parts are $2,4,5,6,8,9,10,\dots$ (excluding $1,3,7$). Partitions: $n=0$: the empty one;
$n=1$: none; $n=2$: $2$; $n=3$: none; $n=4$: $4$, $2{+}2$; $n=5$: $5$; $n=6$: $6$, $4{+}2$, $2{+}2{+}2$;
$n=7$: $5{+}2$; $n=8$: $8$, $6{+}2$, $4{+}4$, $4{+}2{+}2$, $2{+}2{+}2{+}2$; $n=9$: $9$, $5{+}4$,
$5{+}2{+}2$; $n=10$: $10$, $8{+}2$, $6{+}4$, $6{+}2{+}2$, $5{+}5$, $4{+}4{+}2$, $4{+}2{+}2{+}2$,
$2{+}2{+}2{+}2{+}2$. The counts are $1,0,1,0,2,1,3,1,5,3,8$.

\sol{9.3} $w(\RP^n)=(1+a)^{n+1}$ with $a^{n+1}=0$, coefficients modulo $2$. $n=2$: $(1+a)^3=1+a+a^2$, so
$w_1=a$, $w_2=a^2$, and $w_1^2=w_2=a^2$ evaluates to $1$. $n=3$: $(1+a)^4=1+a^4=1$. $n=4$:
$(1+a)^5=1+a+a^4$ since $\binom52,\binom53$ are even; so $w_1=a$, $w_2=w_3=0$, $w_4=a^4$, giving
$(w_1^4,w_1^2w_2,w_2^2,w_1w_3,w_4)=(1,0,0,0,1)$. For $\RP^2\times\RP^2$,
$w=(1+a+a^2)(1+b+b^2)$: $w_1=a+b$, $w_2=a^2+ab+b^2$, $w_3=a^2b+ab^2$, $w_4=a^2b^2$, and the numbers are the
coefficients of $a^2b^2$ modulo $2$: $w_1^4=(a+b)^4$ gives $6\equiv0$; $w_1^2w_2$ gives $1+2+1\equiv0$;
$w_2^2$ gives $2+1\equiv1$; $w_1w_3$ gives $2\equiv0$; $w_4$ gives $1$.

\sol{9.4} A closed $1$-manifold is a finite union of circles, each the boundary of a disc. The Klein bottle
is the boundary of the solid Klein bottle, the non-trivial $D^2$-bundle over $S^1$ (the mapping torus of a
reflection of $D^2$). By \cref{thm:classification} a closed connected surface is $\Sigma_g$ or $N_h$.
$\Sigma_g$ bounds a handlebody. $N_h$ is a connected sum of $h$ copies of $\RP^2$, and connected sum is
cobordant to disjoint union (attach a $1$-handle to the product cobordism), so $[N_h]=h[\RP^2]$; this is zero
for $h$ even since every element has order $2$, and equal to $[\RP^2]\ne0$ for $h$ odd by \cref{exer:chimod2}.

\sol{9.5} A tubular neighbourhood of the origin in $\R^k$ with the standard framing is the open unit ball
$B$ with the identification $B\cong\R^k$, $x\mapsto x/(1-|x|^2)$, which is the identity to first order at $0$.
The collapse $S^k=\R^k\cup\infty\to\R^k\cup\infty=S^k$ is this diffeomorphism on $B$ and constant at $\infty$
outside. The origin is a regular value with exactly one preimage, at which the differential is the
identity; so the degree is $1$. Reversing one framing vector composes the identification with a reflection,
and the degree becomes $-1$. A framed $0$-manifold in $\R^k$ is a finite set of points with signs, the
collapse has degree the sum of the signs, and by \cref{thm:hopf} the degree classifies maps $S^k\to S^k$; so
$\Omega^{\mathrm{fr}}_0\cong\pi_k(S^k)\cong\Z$.
%% ---- end sol/09.tex ----
%% ---- begin sol/10.tex ----
\section*{Chapter 10}

\sol{10.1} The equation $\dot x=(-x_2,x_1)$ is linear with solution
$F_t(x)=(x_1\cos t-x_2\sin t,\ x_1\sin t+x_2\cos t)$, rotation by angle $t$. For $F_t(x)=e^tx$,
$\partial_tF_t(x)=e^tx=F_t(x)$, so $G(y,t)=y$. For $\dot x=x^2$, the solution through $x_0>0$ is
$x_0/(1-x_0t)$, which is unbounded as $t\to1/x_0$; so for every $t>0$ the time-$t$ map is undefined at
$x_0\ge1/t$, and there is no diffeotopy.

\sol{10.2} The rotation number is the degree of $t\mapsto\gamma'(t)/|\gamma'(t)|$. Circle: the tangent turns
once; $1$. Figure eight: $\gamma'=(\cos t,\cos2t)$; the curve has the symmetry $t\mapsto t+\pi$,
$\gamma\mapsto(-x,y)$, under which the contributions of the two lobes to the total turning cancel; $0$.
Limaçon: in complex notation $\gamma=(1+2\cos\theta)e^{i\theta}=e^{i\theta}+e^{2i\theta}+1$, so
$\gamma'=ie^{i\theta}(1+2e^{i\theta})$; the factor $e^{i\theta}$ has winding number $1$ and
$1+2e^{i\theta}$ winds once around $0$ since $|2e^{i\theta}|>1$; total $2$. By \cref{cor:WG} no two of the
three are regularly homotopic.

\sol{10.3} A homotopy inverse sends $(p,A)$ to the embedding $x\mapsto p+Ax$. One composite is the identity.
For the other, given an embedding $f$ define, for $0<t\le1$,
$f_t(x)=f(0)+\bigl(f(tx)-f(0)\bigr)/t$, and $f_0(x)=f(0)+df_0(x)$. Each $f_t$ is an embedding (a rescaling of
the restriction of $f$ to a smaller disc), $f_1=f$, and by Taylor's theorem
$f_t(x)=f(0)+df_0(x)+t\,r(x,t)$ with $r$ smooth, so the family is smooth down to $t=0$ and depends
continuously on $f$. It preserves $(f(0),df_0)$ throughout. So the space of embeddings deformation retracts
to the affine ones.

\sol{10.4} Parametrize so that $F_t(x)=(x,0,0)$ unless $|x-1/(1-t)|<1$, where a fixed knotted arc is
inserted, for $t<1$; put $F_1(x)=(x,0,0)$. On the open set $\{(x,t):x<R\}$ we have $F_t(x)=(x,0,0)$ as soon as
$1/(1-t)>R+1$, so $F$ is smooth near every point with $t=1$; it is smooth elsewhere by construction, and each
$F_t$ is an embedding. If a diffeotopy $\Phi_t$ of $\R^3$ satisfied $\Phi_1\circ F_0=F_1$, then $\Phi_1$ would
be a diffeomorphism of $\R^3$ carrying the knotted line to the straight line, hence a homeomorphism of the
complements. The complement of the straight line has fundamental group $\Z$, and the complement of a long
knot has the group of the corresponding closed knot, which is not abelian if the knot is non-trivial.

\sol{10.5} Here $m=1$ and $n=4=2m+2$, so \cref{thm:whitneyiso} applies. In $\R^3$ the dimension count for
double points of a one-parameter family gives $2m+1-n=0$: a generic path of maps $S^1\to\R^3$ has isolated
times at which the curve crosses itself transversally, and these crossings are exactly the events that change
the knot type. They cannot be removed by perturbation because a zero-dimensional transverse intersection is
stable.
%% ---- end sol/10.tex ----
%% ---- begin sol/11.tex ----
\section*{Chapter 11}

\sol{11.1} For a word of length $2n$, $\chi=V-n+1$, and the surface is orientable if and only if each letter
occurs with both exponents. $aba^{-1}b^{-1}$: all four corners are identified, $V=1$, $\chi=0$,
orientable: the torus. $abab$: $V=2$, $\chi=1$, non-orientable: $\RP^2$. $abab^{-1}$: $V=1$, $\chi=0$,
non-orientable: the Klein bottle. $aabb$: $V=1$, $\chi=0$, non-orientable: the Klein bottle again, as
$P\#P$. $abca^{-1}b^{-1}c^{-1}$: $V=2$, $\chi=2-3+1=0$, orientable: the torus. $abcabc$: $V=3$,
$\chi=3-3+1=1$, non-orientable: $\RP^2$. (The vertex counts are those returned by the script.)

\sol{11.2} $\chi(M\#N)=\chi(M)+\chi(N)-2$ because a disc is removed from each (lowering each $\chi$ by $1$)
and the results are glued along a circle, of Euler characteristic $0$. So $\chi(T\#P)=0+1-2=-1$ and
$\chi(P\#P\#P)=1+1+1-4=-1$. Both are closed, connected and non-orientable (a connected sum is orientable only
if both summands are). By \cref{thm:classification} they are diffeomorphic, to $N_3$.

\sol{11.3} (a) The pairing matrix in the basis $(1,x)$ is
$\bigl(\begin{smallmatrix}0&1\\1&0\end{smallmatrix}\bigr)$, so $1^\#=x$ and $x^\#=1$, and
$w=1\cdot x+x\cdot1=2x$. Then $\varepsilon(w^0)=\varepsilon(1)=0$, $\varepsilon(w)=2$, and $w^2=4x^2=0$.
(b) $\varepsilon(g\cdot h)=\delta_{gh,e}/n$, so $g^\#=n\,g^{-1}$ and $w=\sum_gg\cdot ng^{-1}=n^2e$; hence
$\varepsilon(w^g)=n^{2g}\varepsilon(e)=n^{2g-1}$. A homomorphism $\pi_1\Sigma_g\to G$ to an abelian group is a
homomorphism from $H_1=\Z^{2g}$, and there are $n^{2g}$ of them; dividing by $n$ gives the same number.
Semisimple case: $e_ie_j=\delta_{ij}e_i$, so the pairing is diagonal with entries $\theta_i$, the dual basis
is $e_i^\#=e_i/\theta_i$, and $w=\sum_ie_i/\theta_i$. Then $w^g=\sum_ie_i/\theta_i^g$ and
$\varepsilon(w^g)=\sum_i\theta_i^{1-g}$.

\sol{11.4} By \cref{cor:pushout}, $W$ is obtained up to homotopy from $f^{-1}(a)$, a union of circles with
$\chi=0$, by attaching a $1$-cell; so $\chi(W)=-1$. Both $f^{-1}(a)$ and $f^{-1}(b)$ are non-empty: the minimum
and maximum of $f$ are not attained at the only critical point, a saddle, so they are attained on the
boundary. Hence $W$ has $b\ge2$ boundary components. If $W$ is orientable, $-1=2-2g-b$ gives
$(g,b)=(0,3)$, as $(1,1)$ is excluded: a sphere with three holes. If not, $-1=2-h-b$ with $h\ge1$, $b\ge2$
gives $(h,b)=(1,2)$: a projective plane with two holes, which is a Möbius band with one hole.

\sol{11.5} The torus is the composite
$\emptyset\xrightarrow{\eta}S^1\xrightarrow{\delta}S^1\sqcup S^1\xrightarrow{\mu}S^1\xrightarrow{\epsilon}
\emptyset$. Let $\beta=\epsilon\mu$, the pairing, and $\gamma=\delta\eta$, the copairing. The Frobenius
relation and the unit and counit laws give the zigzag identity
$(\beta\sqcup\id)(\id\sqcup\gamma)=\id$: indeed
$(\epsilon\sqcup\id)(\mu\sqcup\id)(\id\sqcup\delta)(\id\sqcup\eta)
=(\epsilon\sqcup\id)\,\delta\,\mu\,(\id\sqcup\eta)=\id$. So $Z(\gamma)$ and $Z(\beta)$ exhibit $A=Z(S^1)$ as its
own dual, with $Z(\gamma)$ the coevaluation and $Z(\beta)$ the evaluation, and by commutativity
$Z(T^2)=Z(\beta)Z(\gamma)=\tr(\id_A)=\dim A$.
%% ---- end sol/11.tex ----
\backmatter
%% ---- begin bib.tex ----
\chapter{References}
\begingroup\small
\renewcommand{\chapter}[2]{}
\begin{thebibliography}{ABGHR14}\setlength{\itemsep}{1pt}
\newcommand{\bi}[1]{\bibitem[#1]{#1}}
\bi{ABGHR14} M.~Ando, A.~J.~Blumberg, D.~Gepner, M.~J.~Hopkins, C.~Rezk, An $\infty$-categorical approach to $R$-line bundles, $R$-module Thom spectra, and twisted $R$-homology, \emph{J.~Topol.} 7 (2014), 869--893.
\bi{Abr96} L.~Abrams, Two-dimensional topological quantum field theories and Frobenius algebras, \emph{J.~Knot Theory Ramifications} 5 (1996), 569--587.
\bi{AF15} D.~Ayala, J.~Francis, Factorization homology of topological manifolds, \emph{J.~Topol.} 8 (2015), 1045--1084.
\bi{Ati61} M.~F.~Atiyah, Thom complexes, \emph{Proc.\ London Math.\ Soc.} (3) 11 (1961), 291--310.
\bi{BBC21} K.~Bauer, M.~Burke, M.~Ching, Tangent $\infty$-categories and Goodwillie calculus, preprint, arXiv:2101.07819.
\bi{BD95} J.~C.~Baez, J.~Dolan, Higher-dimensional algebra and topological quantum field theory, \emph{J.~Math.\ Phys.} 36 (1995), 6073--6105.
\bi{BEBP24} D.~Berwick-Evans, P.~Boavida de Brito, D.~Pavlov, Classifying spaces of infinity-sheaves, \emph{Algebr.\ Geom.\ Topol.} 24 (2024), 4891--4937.
\bi{BH11} J.~C.~Baez, A.~E.~Hoffnung, Convenient categories of smooth spaces, \emph{Trans.\ Amer.\ Math.\ Soc.} 363 (2011), 5789--5825.
\bi{BW13} P.~Boavida de Brito, M.~Weiss, Manifold calculus and homotopy sheaves, \emph{Homology Homotopy Appl.} 15 (2013), 361--383.
\bi{CC14} J.~R.~B.~Cockett, G.~S.~H.~Cruttwell, Differential structure, tangent structure, and SDG, \emph{Appl.\ Categ.\ Structures} 22 (2014), 331--417.
\bi{CCG20} R.~Cockett, G.~Cruttwell, J.~Gallagher, J.-S.~P.~Lemay, B.~MacAdam, G.~Plotkin, D.~Pronk, Reverse derivative categories, in \emph{Computer Science Logic 2020}, LIPIcs 152, 18:1--18:16.
\bi{Cer70} J.~Cerf, La stratification naturelle des espaces de fonctions diff\'erentiables r\'eelles et le th\'eor\`eme de la pseudo-isotopie, \emph{Publ.\ Math.\ IH\'ES} 39 (1970), 5--173.
\bi{CJS95} R.~L.~Cohen, J.~D.~S.~Jones, G.~B.~Segal, Morse theory and classifying spaces, preprint, 1995.
\bi{CS19} D.~Carchedi, P.~Steffens, On the universal property of derived manifolds, preprint, arXiv:1905.06195.
\bi{CSW14} J.~D.~Christensen, G.~Sinnamon, E.~Wu, The $D$-topology for diffeological spaces, \emph{Pacific J.~Math.} 272 (2014), 87--110.
\bi{DP80} A.~Dold, D.~Puppe, Duality, trace, and transfer, in \emph{Proceedings of the International Conference on Geometric Topology (Warsaw, 1978)}, PWN, 1980, 81--102.
\bi{Dub79} E.~J.~Dubuc, Sur les mod\`eles de la g\'eom\'etrie diff\'erentielle synth\'etique, \emph{Cahiers Topologie G\'eom.\ Diff\'erentielle} 20 (1979), 231--279.
\bi{EE69} C.~J.~Earle, J.~Eells, A fibre bundle description of Teichm\"uller theory, \emph{J.~Differential Geometry} 3 (1969), 19--43.
\bi{EM12} Y.~M.~Eliashberg, N.~M.~Mishachev, The space of framed functions is contractible, in \emph{Essays in Mathematics and its Applications}, Springer, 2012, 81--109.
\bi{FST19} B.~Fong, D.~I.~Spivak, R.~Tuy\'eras, Backprop as functor: a compositional perspective on supervised learning, in \emph{LICS 2019}, IEEE, 2019.
\bi{GK15} T.~G.~Goodwillie, J.~R.~Klein, Multiple disjunction for spaces of smooth embeddings, \emph{J.~Topol.} 8 (2015), 651--674.
\bi{GMTW09} S.~Galatius, I.~Madsen, U.~Tillmann, M.~Weiss, The homotopy type of the cobordism category, \emph{Acta Math.} 202 (2009), 195--239.
\bi{God07} V.~Godin, Higher string topology operations, preprint, arXiv:0711.4859.
\bi{GP21} D.~Grady, D.~Pavlov, The geometric cobordism hypothesis, preprint, arXiv:2111.01095.
\bi{GW99} T.~G.~Goodwillie, M.~Weiss, Embeddings from the point of view of immersion theory, Part~II, \emph{Geom.\ Topol.} 3 (1999), 103--118.
\bi{Hir59} M.~W.~Hirsch, Immersions of manifolds, \emph{Trans.\ Amer.\ Math.\ Soc.} 93 (1959), 242--276.
\bi{Hir76} M.~W.~Hirsch, \emph{Differential Topology}, Graduate Texts in Mathematics 33, Springer, 1976.
\bi{Igu87} K.~Igusa, The space of framed functions, \emph{Trans.\ Amer.\ Math.\ Soc.} 301 (1987), 431--477.
\bi{IZ13} P.~Iglesias-Zemmour, \emph{Diffeology}, Mathematical Surveys and Monographs 185, American Mathematical Society, 2013.
\bi{Joy19} D.~Joyce, \emph{Algebraic Geometry over $C^\infty$-rings}, Mem.\ Amer.\ Math.\ Soc.\ 260 (2019), no.~1256.
\bi{KM97} A.~Kriegl, P.~W.~Michor, \emph{The Convenient Setting of Global Analysis}, Mathematical Surveys and Monographs 53, American Mathematical Society, 1997.
\bi{KMS93} I.~Kol\'a\v{r}, P.~W.~Michor, J.~Slov\'ak, \emph{Natural Operations in Differential Geometry}, Springer, 1993.
\bi{Koc04} J.~Kock, \emph{Frobenius Algebras and 2D Topological Quantum Field Theories}, London Math.\ Soc.\ Student Texts 59, Cambridge University Press, 2004.
\bi{Koc06} A.~Kock, \emph{Synthetic Differential Geometry}, 2nd ed., London Math.\ Soc.\ Lecture Note Series 333, Cambridge University Press, 2006.
\bi{Leu17} P.~Leung, Classifying tangent structures using Weil algebras, \emph{Theory Appl.\ Categ.} 32 (2017), 286--337.
\bi{Lur09} J.~Lurie, On the classification of topological field theories, in \emph{Current Developments in Mathematics 2008}, International Press, 2009, 129--280.
\bi{Mac17} A.~W.~Macpherson, The universal property of derived geometry, preprint, arXiv:1701.08359.
\bi{May01} J.~P.~May, The additivity of traces in triangulated categories, \emph{Adv.\ Math.} 163 (2001), 34--73.
\bi{MR91} I.~Moerdijk, G.~E.~Reyes, \emph{Models for Smooth Infinitesimal Analysis}, Springer, 1991.
\bi{MW07} I.~Madsen, M.~Weiss, The stable moduli space of Riemann surfaces: Mumford's conjecture, \emph{Ann.\ of Math.} (2) 165 (2007), 843--941.
\bi{Pal60} R.~S.~Palais, Local triviality of the restriction map for embeddings, \emph{Comment.\ Math.\ Helv.} 34 (1960), 305--312.
\bi{Pon55} L.~S.~Pontryagin, \emph{Smooth manifolds and their applications in homotopy theory}, Trudy Mat.\ Inst.\ Steklov 45 (1955); English transl.\ in Amer.\ Math.\ Soc.\ Transl.\ (2) 11 (1959).
\bi{PS14} K.~Ponto, M.~Shulman, Traces in symmetric monoidal categories, \emph{Expo.\ Math.} 32 (2014), 248--273.
\bi{Ros84} J.~Rosick\'y, Abstract tangent functors, \emph{Diagrammes} 12 (1984), JR1--JR11.
\bi{Sch13} U.~Schreiber, Differential cohomology in a cohesive infinity-topos, preprint, arXiv:1310.7930.
\bi{Sma59} S.~Smale, The classification of immersions of spheres in Euclidean spaces, \emph{Ann.\ of Math.} (2) 69 (1959), 327--344.
\bi{SP09} C.~J.~Schommer-Pries, \emph{The classification of two-dimensional extended topological field theories}, Ph.D.\ thesis, University of California, Berkeley, 2009; arXiv:1112.1000.
\bi{Spi10} D.~I.~Spivak, Derived smooth manifolds, \emph{Duke Math.\ J.} 153 (2010), 55--128.
\bi{Tho54} R.~Thom, Quelques propri\'et\'es globales des vari\'et\'es diff\'erentiables, \emph{Comment.\ Math.\ Helv.} 28 (1954), 17--86.
\bi{Wei99} M.~Weiss, Embeddings from the point of view of immersion theory, Part~I, \emph{Geom.\ Topol.} 3 (1999), 67--101.
\bi{ZC05} A.~Zomorodian, G.~Carlsson, Computing persistent homology, \emph{Discrete Comput.\ Geom.} 33 (2005), 249--274.
\end{thebibliography}
\endgroup
%% ---- end bib.tex ----
\end{document}
