Continuous, single-column reading. Equations, tables, proofs, references and appendices stay in document order.
Contents · 104 sections
Higher Categorical Semantics Monograph
Diffeology in
Higher Categories
Concrete sheaves, cohesive shape, and stacks
behind Iglesias-Zemmour’s Diffeology
with applications to arithmetic, cryptography,
machine learning, artificial intelligence, and system design
One leaf of the Kronecker foliation of slope α=(5−1)/2 on T2.
Its leaf space Tα=R/(Z+αZ) is a point for topology, a group for diffeology, and BZ2 for homotopy.
Anonymous submission
Prepared for higher-categorical-semantics.pages.dev 27 November 2026
Abstract
In Diffeology [1], Patrick Iglesias-Zemmour develops differential geometry on sets equipped with a family of “plots”, and proves that this datum suffices for homotopy theory, Cartan calculus, fibre bundles and symplectic geometry far outside the category of manifolds. The arguments there are carried out directly with sets and maps. Here the categorical language is added, and the theory is then raised one categorical level.
Part I. The three axioms of a diffeology are the sheaf condition on a concrete site, and the structural theorems of the book (limits, colimits, function spaces, inductions and subductions) follow from the fact that Diff is the quasitopos of concrete sheaves on Cartesian spaces (Baez–Hoffnung, Dubuc). Part II.Diff embeds in the cohesive ∞-topos H=Sh∞(Cart) of smooth ∞-groupoids. There the book’s smooth homotopy groups are the homotopy groups of the shape∫X; its differential forms are maps into the non-concrete classifying sheaves Ωk; its fibre bundles are maps into classifying stacks BG that are not diffeological spaces; and the failure of de Rham’s theorem on the irrational torus becomes a spectral sequence whose first obstruction group is the group of principal R-bundles. The organising statement is a trichotomy of quotients, X//G⟶π0(X//G)⟶concπ0(X//G)=X/G, stack, smooth set, diffeological space, with exact criteria for when each arrow is an equivalence.
Part III consists of applications. In number theory, the irrational torus Tα realises GL2(Z)-equivalence, real quadratic units and Diophantine type as diffeological invariants. In cryptography, tori with real multiplication form a torsor under the class group of a real quadratic order, and deciding diffeomorphism is the principal ideal problem. In machine learning we prove correctness of forward-mode automatic differentiation by gluing over Diff, and that orbit spaces have no differentiable canonicalisation at points with isotropy. In artificial intelligence, a global smooth motion planner exists exactly on smoothly contractible spaces, and an agent restricted to smooth scalar observations can determine a space only up to its reflexive hull. In system design we give a minimal-realisation theorem with two inequivalent quotients, and classify multi-clock systems by their frequency module. Each of these chapters contains at least three theorems with proofs; every chapter ends with solved exercises graded from warm-up to proof.
A companion to the source text, a 450-page treatise whose method is to stay as close to the sets and the maps as possible. That method is a strength: the reader of [1] never needs a universe, a model structure or a coherence theorem. Three of the book’s central objects, however, are not objects of the category of diffeological spaces:
the object that classifies differential k-forms, Ωk, is a sheaf with exactly one point;
the object that classifies principal G-bundles, BG, is a stack;
the homotopy type ∫X is an ∞-groupoid.
In [1] each of these is treated by an explicit construction on plots. We put all three in one ambient ∞-topos, where the constructions become representability statements.
Attribution
A Theorem, Proposition or Lemma with a name or a reference in its heading is taken from the literature, and is given with that reference and, when it is short, a proof. Every other numbered statement is proved in the text. Formalisation in a proof assistant is the subject of a sequel; in Coda the statements are sorted by the infrastructure required.
How to read
Parts I and II are cumulative. The application chapters depend on them as follows.
application chapter
draws on
9 Number theory
Chapters 1, 5, 6, 7
10 Cryptography
Chapter 9; Chapter 8 for orbifolds
11 Machine learning
Chapters 1–3 and 8
12 Artificial intelligence
Chapters 1–3, 5 and 8
13 System design
Chapters 3, 7 and 9
Conventions
A domain is an open subset of some Rn, n≥0; a Cartesian space is a domain diffeomorphic to Rn. Dom and Cart are the corresponding categories with smooth maps. We cite the source as [IZ, art. x.y] for its numbered articles and [IZ, Exercise n] for its exercises. “Smooth” means C∞. All ∞-categorical statements are about (∞,1)-categories in the sense of [42]; limits and colimits in H are homotopy limits and colimits. R denotes the smooth additive group and Rδ the same group with the discrete diffeology. For a group G acting on X we write X/G for the diffeological quotient and X//G for the homotopy quotient in H; much of what follows is about the difference.
Diffeology as a category of sheaves
Plots
A diffeology is a choice of which parametrisations of a set are smooth. We recall the axioms, the two transport operations (pullback and pushforward), and the two distinguished classes of maps (inductions and subductions), organised around one fact: the underlying-set functor Diff→Set is topological. Three examples introduced here — the irrational torus, the orbit space R/{±1} and the cross — are the test cases for every later construction.
Source in the book.[IZ, Chapter 1] and the D-topology of [IZ, Chapter 2].
The axioms
A parametrisation of a set X is a map P:U→X whose source is a domain. We write Param(X) for the set of all of them.
Definition 1.1 ([IZ, art. 1.5]). A diffeology on a set X is a subset D⊆Param(X), whose elements are called plots, such that
covering: every constant parametrisation is a plot;
locality: if P:U→X restricts to a plot on each member of an open cover of U, then P is a plot;
smooth compatibility: if P:U→X is a plot and F:V→U is a smooth map between domains, then P∘F is a plot.
A diffeological space is a set with a diffeology. A map f:X→X′ is smooth if f∘P is a plot of X′ for every plot P of X. Diffeological spaces and smooth maps form the category Diff; its isomorphisms are called diffeomorphisms.
A diffeology is a family of maps into a set from domains of every dimension. By axiom [D3] the family is closed under smooth reparametrisation; by axiom [D2] membership in the family is a local property of the source. No structure on X itself is required.
Two observations set the tone for everything that follows.
Remark 1.2 (Plots are the smooth maps from domains). Give a domain U the diffeology of all smooth parametrisations. Then by [D3] a parametrisation P:U→X is a plot if and only if it is a smooth map U→X. So D(U)=Diff(U,X): a diffeological space is the functor it represents on Dom. This is made precise in Concrete sheaves.
Remark 1.3 (No condition on X). A manifold is a set that is locally modelled onRn. A diffeological space is a set that domains can be mapped into. The first is a condition on the object; the second is the choice of a structure. This is why every construction below exists without hypotheses.
Example 1.4.
A domain, or more generally a smooth manifold M, carries the standard diffeology of smooth parametrisations. A map between manifolds is smooth in the sense of 1.1 exactly when it is smooth in the usual sense, so Mfd↪Diff is full and faithful.
The discrete diffeology on a set consists of the locally constant parametrisations; the coarse diffeology consists of all parametrisations.
The wire diffeology on Rn consists of the parametrisations that are, near each point, either constant or of the form γ∘h with h:V→R and γ:R→Rn smooth [IZ, art. 1.10]. For n≥2 it is strictly finer than the standard one ([exo:wire]).
The underlying-set functor is topological
The diffeologies on a fixed set X are ordered by inclusion: D is finer than D′ if D⊆D′. Arbitrary intersections of diffeologies are diffeologies, so they form a complete lattice with the discrete diffeology at the bottom and the coarse one at the top. A subset F⊆Param(X)generates the smallest diffeology ⟨F⟩ containing it; explicitly, P∈⟨F⟩ if and only if near each point P is constant or of the form Q∘F with Q∈F and F smooth [IZ, art. 1.66–1.68].
Definition 1.5. Let f:X→X′ be a map of sets.
If X′ is diffeological, the pullbackf∗(D′) is the set of parametrisations P of X with f∘P∈D′. It is the coarsest diffeology on X making f smooth.
If X is diffeological, the pushforwardf∗(D) is the diffeology on X′ generated by {f∘P:P∈D}. It is the finest diffeology on X′ making f smooth.
A smooth map f:X→X′ is an induction if it is injective and D=f∗(D′); it is a subduction if it is surjective and D′=f∗(D).
Unwinding, f is a subduction exactly when it is surjective and plots of X′ lift locally: for every plot P:U→X′ and every r∈U there are an open V∋r and a plot Q:V→X with f∘Q=P∣V[IZ, art. 1.48]. Dually, f is an induction exactly when it is injective and a parametrisation of X is a plot as soon as its composite with f is one [IZ, art. 1.31].
The two distinguished classes of smooth maps. In The quasitopos \mathsf{Diff} they become the strong epimorphisms and the strong monomorphisms of Diff.
The whole of [IZ, Chapter 1] can be compressed into one categorical statement.
Theorem 1.6 (The underlying-set functor is topological). Let ∣⋅∣:Diff→Set be the underlying-set functor.
(Initial lifts.) For every family of maps fi:X→∣Xi∣ into diffeological spaces there is a unique diffeology on X such that a map g:Z→X from a diffeological space is smooth if and only if every fi∘g is smooth. It is ⋂ifi∗(Di).
(Final lifts.) For every family of maps gi:∣Xi∣→X there is a unique diffeology on X such that a map h:X→Z is smooth if and only if every h∘gi is smooth. It is generated by ⋃i{gi∘P:P∈Di}.
Consequently Diff is complete and cocomplete, ∣⋅∣ preserves limits and colimits, and ∣⋅∣ has a left adjoint (discrete diffeology) and a right adjoint (coarse diffeology).
Proof. (i) An intersection of diffeologies is a diffeology, and P∈⋂ifi∗(Di) means that each fi∘P is a plot. If g:Z→X and all fi∘g are smooth, then for a plot Q of Z each fi∘g∘Q is a plot, so g∘Q is a plot of X; the converse is composition. Uniqueness: two diffeologies with the property make the identity smooth in both directions. (ii) Let D be the generated diffeology. If every h∘gi is smooth and P∈D, then locally P is constant or P=gi∘Q∘F, so h∘P is locally a plot of Z, hence a plot by [D2]. The rest is as in (i). For the consequences: a limit of a diagram (Xj) is the limit of the underlying sets with the initial diffeology for the projections; a colimit is the colimit of sets with the final diffeology for the coprojections. The adjoints are the initial and final lifts of the empty family. ◻
Specialising 1.6 gives the constructions of the book with their universal properties attached:
construction
diffeology
reference
subspace A⊆X
initial for A↪X (plots of X with values in A)
[IZ, art. 1.33]
product ∏iXi
initial for the projections (componentwise plots)
[IZ, art. 1.55]
quotient X/∼
final for X→X/∼ (plots lift locally)
[IZ, art. 1.50]
sum ∐iXi
final for the injections (plots locally in one summand)
[IZ, art. 1.39]
Proposition 1.7 (Stability).
Subductions are closed under composition, under products, and under pullback along arbitrary smooth maps.
Inductions are closed under composition, under products, and under pullback along arbitrary smooth maps.
A map that is both an induction and a subduction is a diffeomorphism.
The proof is [exo:stability]. Part (i) is false in Top for quotient maps, and is the first respect in which Diff has better exactness properties than Top.
Function spaces
Definition 1.8 ([IZ, art. 1.57]). For diffeological spaces X,Y, the functional diffeology on C∞(X,Y) consists of the parametrisations P:U→C∞(X,Y) whose adjoint (r,x)↦P(r)(x) is a smooth map U×X→Y.
Theorem 1.9 (Cartesian closure, [IZ, art. 1.60]). For diffeological spaces X,Y,Z, currying is a diffeomorphism C∞(X×Y,Z)≅C∞(X,C∞(Y,Z)),f⟼(x↦f(x,−)). In particular evaluation ev:C∞(Y,Z)×Y→Z and composition C∞(X,Y)×C∞(Y,Z)→C∞(X,Z) are smooth.
The proof is [exo:ccc]. Two consequences: paths in a function space are the same thing as homotopies, and a smooth family of smooth maps is the same thing as a smooth map out of a product. Both are false for manifolds, where the function space does not exist, and both will be used without comment from Shape on.
Three running examples
The irrational torus
Fix α∈R∖Q, let Λα=Z+αZ⊂R, and let qα:R⟶Tα:=R/Λα carry the quotient diffeology. Since Λα is dense in R, the quotient topology on Tα is indiscrete. Equivalently Tα is the space of leaves of the linear foliation of slope α on T2=R2/Z2: the map (x,y)↦y−αx descends to a bijection T2/R→Tα, which is a diffeomorphism for the quotient diffeologies. The two descriptions are drawn in 1.3.
Two pictures of the irrational torus. Left: the leaf space of the Kronecker foliation. Right: the quotient of R by the dense subgroup Λα, itself the image of Z2 under a linear projection (the “cut and project” description of a one-dimensional quasicrystal).
Proposition 1.10.
Every smooth map from Tα to a manifold is constant; in particular C∞(Tα,R)=R.
The diffeology of Tα is neither discrete nor coarse.
qα is a subduction with discrete fibres, and any two local lifts of a plot differ by a locally constant element of Λα.
Proof. (i) If f:Tα→M is smooth then f∘qα:R→M is continuous and Λα-invariant, hence constant on a dense set, hence constant. (iii) qα is a subduction by definition. If Q,Q′:V→R lift the same plot then Q−Q′ is a continuous map into the countable set Λα, so it is locally constant; in particular every plot of a fibre is locally constant, and the fibres are discrete. (ii) qα is a plot that is not locally constant, so Tα is not discrete. The parametrisation t↦qα(∣t∣) is not a plot: by (iii) a local lift near 0 would be t↦∣t∣+λ, which is not smooth. So Tα is not coarse. ◻
The D-topology of Tα is indiscrete and its smooth real functions are constant, while its plots are those of a one-dimensional group. By Number theory: the arithmetic of irrational tori the plots determine the tail of the continued fraction of α.
Half of a line, twice
Let Δ1=R/{±1} with the quotient diffeology, and let H=[0,∞)⊂R with the subspace diffeology. The map x↦x2 factors as R↠Δ1sqH↪R.
Proposition 1.11. sq:Δ1→H is a smooth bijection that is not a diffeomorphism.
Proof. Smoothness and bijectivity are clear. The parametrisation P(r,s)=r2+s2 of H is a plot, being smooth into R with values in H. Suppose sq−1∘P were a plot of Δ1. Then on a disc V around 0 there would be a smooth Q:V→R with Q2=r2+s2. On the connected set V∖{0} the function Q has no zero, so it has constant sign and Q=±r2+s2, which is not differentiable at the origin. ◻
The same set [0,∞) carries two diffeologies. The plot on the left belongs to the subspace H⊂R but not to the quotient Δ1=R/{±1}, because lifting it through the squaring map would require smoothing a cone.
Let K={(x,y)∈R2:xy=0} with the subspace diffeology, and let R∨R be the pushout of two lines along their origins, with the final diffeology. The canonical map R∨R→K is a smooth bijection, and again not a diffeomorphism ([exo:cross]): a smooth curve in K can cross from one axis to the other at an isolated time, provided all its derivatives vanish there; such a curve is not a plot of R∨R.
The D-topology
Definition 1.12 ([IZ, art. 2.8]). A subset A⊆X of a diffeological space is D-open if P−1(A) is open for every plot P. The D-open sets form the D-topology, the finest topology making all plots continuous.
Smooth maps are D-continuous, so this defines a functor D:Diff→Top. For a quotient, A⊆X/∼ is D-open if and only if its preimage in X is D-open [IZ, art. 2.12]. The D-topology of a manifold is its topology; the D-topology of Tα is indiscrete. We will see in Proposition 1.6 that D is a left adjoint, and in Shape that it is the wrong tool for homotopy theory: the homotopy type of D(Tα) is a point, while the homotopy type that the plots of Tα determine is a torus.
Solved exercises
Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.
1 Show that for n≥2 the identity of Rn is not a plot for the wire diffeology of 1.4(c).
Solution. If it were, then near 0 we could write id=γ∘h with h:V→R and γ:R→Rn smooth. By the chain rule the derivative of γ∘h at any point has rank at most 1, while the identity has rank n≥2. (The alternative, that id is locally constant, is absurd.) Hence the wire diffeology is strictly finer than the standard one, although both contain exactly the same smooth curves. ◀
2 Show that the D-topology of Tα×Tα is indiscrete, and that Tα×Tα≅R2/(Λα×Λα).
Solution. By 1.7(i), qα×qα:R2→Tα×Tα is a subduction. Its fibres are the cosets of Λα×Λα, so the induced bijection R2/(Λα×Λα)→Tα×Tα is a subduction that is injective, hence a diffeomorphism by 1.7(iii). A D-open subset of the quotient has an open preimage in R2 that is invariant under the dense subgroup Λα×Λα; a non-empty open invariant set contains a translate of a ball by every element of a dense subgroup, so it is all of R2. ◀
2 Let φ(t)=e−1/t for t>0 and φ(t)=0 for t≤0. Show that c(t)=(φ(t),φ(−t)) is a plot of the cross K that does not lift to a plot of R∨R. Conclude that R∨R→K is not a diffeomorphism.
Solution.c is smooth into R2 and φ(t)φ(−t)=0, so c is a plot of the subspace K. A plot of the pushout R∨R is, near each point, constant or of the form ιj∘Q with ιj one of the two inclusions of R (final diffeology, 1.6(ii)); so near each point its image lies in one of the two lines. Every neighbourhood of t=0 contains points t>0 with c(t) on the first axis minus the origin and points t<0 with c(t) on the second axis minus the origin. Hence c is not a plot of R∨R, the bijection R∨R→K does not pull plots back to plots, and it is not a diffeomorphism. ◀
Solution. (i) Composition. If f:X→Y and g:Y→Z are subductions, a plot of Z lifts locally to Y, and that lift lifts locally to X. Products. A plot of Y1×Y2 is a pair (P1,P2) of plots with common domain; near r lift Pi to Qi on Vi∋r and take (Q1,Q2) on V1∩V2. Pullback. Let π:X→B be a subduction and f:B′→B smooth, and put X′={(b′,x):f(b′)=π(x)}⊆B′×X with the subspace diffeology, which is the pullback by 1.6. The projection X′→B′ is surjective because π is. Given a plot P of B′, the plot f∘P of B lifts near r to a plot Q of X with π∘Q=f∘P; then (P,Q) takes values in X′, is a plot of B′×X, hence a plot of X′, and lifts P.
(ii) Composition is immediate from the characterisation “P is a plot iff f∘P is”. Products: componentwise. Pullback: let j:A→B be an induction and f:B′→B smooth, A′={(b′,a):f(b′)=j(a)}. The projection A′→B′ is injective since j is. If P is a parametrisation of A′ with components (P1,P2) such that P1 is a plot of B′, then j∘P2=f∘P1 is a plot of B, so P2 is a plot of A because j is an induction, and P is a plot of A′.
(iii) A map that is both is bijective; its inverse sends a plot P of the target to a parametrisation whose composite with f is the plot P, hence to a plot, because f is an induction. ◀
Step 1: a bijection C∞(A×Y,Z)→C∞(A,C∞(Y,Z)) for every diffeological space A. Let f:A×Y→Z be smooth. For fixed a the map f(a,−) is the composite of f with the smooth map y↦(a,y), so Φ(f)(a)∈C∞(Y,Z). To see that Φ(f) is smooth, let P:U→A be a plot; we must show that (r,y)↦f(P(r),y) is smooth on U×Y. A plot of U×Y is a pair (ρ,Q), and s↦f(P(ρ(s)),Q(s)) is f composed with the plot (P∘ρ,Q) of A×Y. So Φ is well defined; it is clearly injective. Conversely let g:A→C∞(Y,Z) be smooth and put f(a,y)=g(a)(y). For a plot (P,Q):U→A×Y, the map g∘P is a plot of C∞(Y,Z), that is, (r,y)↦g(P(r))(y) is smooth on U×Y; composing with the plot r↦(r,Q(r)) of U×Y shows that r↦f(P(r),Q(r)) is a plot of Z. So f is smooth and Φ(f)=g.
Step 2: Φ is a diffeomorphism. By 1.2 and 1.8, a plot U→C∞(X×Y,Z) is the same as a smooth map U×X×Y→Z. By Step 1 with A=U×X this is the same as a smooth map U×X→C∞(Y,Z), which by 1.8 is the same as a plot U→C∞(X,C∞(Y,Z)). The composite identification is P↦Φ∘P. So Φ and Φ−1 carry plots to plots.
Step 3: evaluation and composition. Evaluation corresponds under Φ to the identity of C∞(Y,Z). Composition C∞(X,Y)×C∞(Y,Z)→C∞(X,Z) is smooth if and only if its adjoint C∞(X,Y)×C∞(Y,Z)×X→Z, (f,g,x)↦g(f(x)), is smooth, and this is two evaluations. ◀
Concrete sheaves
By axioms [D1]–[D3], the plots of X form a sheaf on the site of domains, and this sheaf is determined by its points. We prove the Baez–Hoffnung theorem Diff≃ConcSh(Cart), identify concreteness with separatedness for the adjunction Γ⊣coDisc, construct the concretisation functor, and introduce the first sheaves that are not diffeological spaces: the classifying sheaves of differential forms.
Source in the book. The axioms of [IZ, art. 1.5]. The dictionary between diffeologies and sheaves is due to Baez and Hoffnung [3], building on Dubuc [17].
The site
Let Dom be the category of domains and smooth maps, and Cart⊂Dom the full subcategory of Cartesian spaces. A family of open embeddings {Ui↪U} is covering if it is jointly surjective. This is a coverage on both categories: the preimage of an open cover under a smooth map is an open cover, and every open subset of Rn is a union of open balls, each diffeomorphic to Rn. By the same remark, Cart is a dense subsite of Dom, so by the comparison lemma [35, C2.2.3] restriction is an equivalence Sh(Dom)≃Sh(Cart)=:SmoothSet. Objects of SmoothSet are called smooth sets. We use Cart by default because its objects are contractible, which will matter in Cohesion; the reader who prefers the plots of [1] to be defined on arbitrary domains loses nothing.
Both sites have a terminal object, R0=∗, and for every object U the set Hom(∗,U) is the underlying set ∣U∣.
The Baez–Hoffnung theorem
Definition 1.1. A presheaf F on Cart (or Dom) is concrete if for every U the map F(U)⟶Set(∣U∣,F(∗)),s⟼(u↦u∗s), is injective. ConcSh(Cart)⊂SmoothSet is the full subcategory of concrete sheaves.
In words: a section over U is determined by the function ∣U∣→F(∗) it induces on points. A section of a concrete sheaf is a function with a property; a section of a general sheaf is a function with extra structure, or no function at all.
Theorem 1.2 (Baez–Hoffnung [3). ]The assignment X↦X:=Diff(−,X) is an equivalence of categories Diff≃ConcSh(Cart), with inverse F↦(F(∗),images of the maps F(U)→Set(∣U∣,F(∗))).
Proof.X is a concrete sheaf. By Remark 1.2, X(U) is the set of plots with source U. Axiom [D3] makes it a presheaf. It is concrete because a plot is a function and X(∗)=X by [D1]. It is separated because functions that coincide locally coincide. Given a compatible family of plots Pi:Ui→X on a cover, compatibility on points of the overlaps means that the Pi glue to a function P:U→X, and P is a plot by [D2].
From a concrete sheaf to a diffeology. Let F be a concrete sheaf, X=F(∗), and let DU⊆Set(∣U∣,X) be the image of F(U). [D1]: for x∈X, the pullback of x along U→∗ is a section whose underlying function is constant at x. [D3]: naturality of F(U)→Set(∣U∣,X) in U. [D2]: let P:∣U∣→X restrict to elements of DUi on a cover. By concreteness there are unique si∈F(Ui) with underlying function P∣Ui. For any W→Ui, W→Uj with the same composite to U, the two restrictions of si and sj to W have the same underlying function, hence coincide by concreteness. So the si glue to s∈F(U), whose underlying function coincides with P on each Ui, hence is P.
Morphisms. A natural transformation φ:F→G of concrete sheaves is determined by φ∗:F(∗)→G(∗), because the square relating φU to post-composition with φ∗ commutes and G(U)→Set(∣U∣,G(∗)) is injective; and by the same square φ∗ carries plots to plots. Conversely a smooth map induces a natural transformation by composition. The two constructions on objects are mutually inverse by inspection. ◻
Three nested categories of “smooth spaces”. Each hook is full and faithful; the two leftward arrows are left adjoints (reflections). There is no reflection onto Mfd, which is why manifolds are closed under so few constructions.
Remark 1.3 (What each axiom is). [D3] is functoriality, [D2] is descent, [D1] is a normalisation that makes the value on the point the underlying set. The only hypothesis of Definition 1.1 with no sheaf-theoretic name is the unstated one: that a plot is a map of sets. That is concreteness.
Concrete sites
The proof of 1.2 used only two properties of the site.
Definition 1.4 ([17, 3). ]A concrete site is a subcanonical site C with a terminal object ∗ such that (a)∣⋅∣=Hom(∗,−):C→Set is faithful, and (b) covering families are jointly surjective on points.
Concrete sites and their concrete sheaves. Dropping concreteness in the first row gives smooth sets; in the third it gives, up to set-theoretic care, condensed sets. The last row is the semantic basis of higher-order probabilistic programming and reappears in Artificial intelligence: planning, observation, semantics.
Every statement in the rest of this chapter holds for an arbitrary concrete site with the same proof.
Points, codiscrete objects, and separatedness
Let Γ:SmoothSet→Set be evaluation at the point, Γ(F)=F(∗). For a set S define a presheaf coDisc(S)(U)=Set(∣U∣,S).
Lemma 1.5. coDisc(S) is a concrete sheaf — it is the set S with the coarse diffeology — and Γ⊣coDisc. The counit ΓcoDisc(S)→S is a bijection, so coDisc is full and faithful. A sheaf F is concrete if and only if the unit ηF:F⟶coDiscΓF is a monomorphism.
The proof is [exo:coDisc]. The last sentence is a restatement of 1.1, but it changes what kind of condition concreteness is. The pair Γ⊣coDisc exhibits Set as a subtopos of SmoothSet (the inverse image Γ preserves all limits), hence corresponds to a Lawvere–Tierney topology j on SmoothSet, and an object is j-separated exactly when the unit to its j-sheafification is monic [35, A4.4]. So:
Theorem 1.6 (Dubuc [17). ; Baez–Hoffnung [3]; [35, A4.4, C2.2.13]]Diff is the category of separated objects for the Lawvere–Tierney topology on SmoothSet whose sheaves are the codiscrete objects. Consequently Diff is a Grothendieck quasitopos: it is complete, cocomplete and locally Cartesian closed, it has a classifier for strong subobjects, and it is a reflective subcategory of SmoothSet closed under limits, subobjects, and exponentials GF with G concrete and F arbitrary.
Each clause is made explicit in terms of plots in The quasitopos \mathsf{Diff}. Here we only construct the reflection.
Concretisation
Proposition 1.7 (Concretisation). The inclusion Diff↪SmoothSet has a left adjoint conc(F)=im(ηF:F→coDiscΓF). Explicitly, conc(F) is the set F(∗) with the diffeology whose plots are the functions ∣U∣→F(∗) that are locally the underlying function of a section of F. The functor conc preserves finite products and epimorphisms, and F→concF is an epimorphism of sheaves.
The proof is [exo:conc]. Two consequences are used constantly.
Corollary 1.8. Colimits in Diff are computed by taking the colimit in SmoothSet and concretising. Limits in Diff are computed in SmoothSet. In particular, for a diffeological group G acting on a diffeological space X, X/G=conc(sheaf quotient of X by G).
Concretisation is an image factorisation: two sections have the same image exactly when they have the same values on points.
Sheaves that are not spaces
The reason to care about SmoothSet∖Diff is that it contains the moduli objects of differential geometry.
Example 1.9 (Differential forms). For k≥0 let Ωk(U) be the vector space of smooth differential k-forms on U, with pullback as restriction. This is a sheaf on Cart. For k=0 it is the representable R, hence concrete. For k≥1 we have Ωk(∗)=0, so ΓΩk is a single point while Ωk(Rk) is infinite-dimensional: Ωk is as far from concrete as possible, and concΩk=∗. The same holds for the subsheaf Ωclk of closed forms.
Example 1.10 (A quotient that is not a space). Let Rδ be the additive group of real numbers with the discrete diffeology, acting on R by translation. The diffeological quotient R/Rδ is a point. The sheaf quotient is not: the exterior derivative d:R→Ωcl1 is an epimorphism of sheaves on Cart by the Poincaré lemma, and two functions have the same differential exactly when they differ by a locally constant function, so R/Rδ≅Ωcl1in SmoothSet. The “space of real numbers up to a constant” is the classifying sheaf of closed 1-forms. Its concretisation is a point.
Example 1.11 (An orbit space, before concretisation). Let Q be the sheaf quotient of R by {±1}. With φ as in [exo:cross], the functions f(x)=φ(x)−φ(−x) and g=∣f∣ are both smooth, and g(x)=±f(x) for every x, so they define the same plot of Δ1=concQ. But they are different sections of Q, because near 0 there is no locally constant sign ε with g=εf. So Q is not concrete: in Δ1 two parametrised families of orbits are equal as soon as they coincide pointwise, while in Q equality requires a locally constant sign relating their lifts. A third object appears in Bundles and stacks: the stack R//{±1}, in which the stabiliser of 0 is part of the data.
Remark 1.12 (Summary). A diffeological space is a smooth set with enough points. The classifying objects of geometry typically have too few: a differential form is not a function on points, and a principal bundle is not even a section of a sheaf of sets. In [1] differential forms are obtained by defining them directly on plots [IZ, art. 6.28]; by Forms this definition is HomSmoothSet(X,Ωk), and the exactness properties of the theory are those of SmoothSet.
Solved exercises
Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.
1 Show that the representable presheaf Rn=Cart(−,Rn) is a concrete sheaf, and identify the diffeological space it corresponds to under 1.2.
Solution. A smooth map is determined by its values, so Cart(U,Rn)→Set(∣U∣,Rn) is injective. Smoothness is a local condition and smooth maps that coincide on overlaps glue, so Rn is a sheaf (the site is subcanonical). Its value on ∗ is the set Rn and its plots are the smooth parametrisations: it is Rn with the standard diffeology. ◀
2 Show that HomSmoothSet(Ω1,R)=R (constant maps only), while HomSmoothSet(R,Ω1)≅C∞(R).
Solution. Let φ:Ω1→R be natural. For ω∈Ω1(U) and a point u:∗→U we get φU(ω)(u)=φ∗(u∗ω)=φ∗(0), because Ω1(∗)=0. So φU(ω) is the constant function with value c=φ∗(0), for every ω. Conversely each constant is natural. For the second claim, the Yoneda lemma gives Hom(R,Ω1)=Ω1(R)={a(x)dx}≅C∞(R). So there are many maps from a space to Ω1 and essentially none from Ω1 to a space: Ω1 is a place one maps into. ◀
2 Verify the isomorphism R/Rδ≅Ωcl1 of 1.10 by checking that d:R→Ωcl1 is the coequaliser of the action.
Solution. In a topos every epimorphism is the coequaliser of its kernel pair. d is an epimorphism: on a Cartesian space every closed 1-form is exact, so dU:C∞(U)→Ωcl1(U) is already surjective for every U∈Cart. Its kernel pair: sections over U are pairs (f,g) with df=dg, that is, g=f+c with c constant, U being connected. That is exactly the image of the map R×Rδ→R×R, (f,c)↦(f,f+c), since sections of the discrete Rδ over a connected U are constants. So the kernel pair of d is the action groupoid, and Ωcl1 is its quotient. ◀
Solution.Sheaf. Let R be a covering sieve on D and (sg)g∈R a compatible family, sg∈Set(∣E∣,S) for g:E→D. Define s:∣D∣→S by s(d)=sg(e) whenever g(e)=d with g∈R; such (g,e) exist by axiom (b). It is well defined: the point d:∗→D equals g∘e, which lies in the sieve, and compatibility gives sg∘e=e∗sg=sg(e), an element of Set(∣∗∣,S)=S depending only on d. By construction g∗s=sg, and s is unique because the g∈R are jointly surjective on points. Concrete:coDisc(S)(∗)=S and the comparison map is the identity of Set(∣D∣,S).
Adjunction. Given φ:F→coDiscS, naturality with respect to points d:∗→D forces φD(t)(d)=φ∗(d∗t), so φ is determined by φ∗:F(∗)→S; conversely any function F(∗)→S defines a natural transformation by this formula. Hence Hom(F,coDiscS)≅Set(ΓF,S), naturally. The counit at S is the identity of S. The unit ηF at D sends t to d↦d∗t, which is the map of 1.1; a morphism of sheaves is monic iff it is injective on every F(D). ◀
4 Prove 1.7: the image of ηF is a concrete sheaf, F↦imηF is left adjoint to the inclusion, and it preserves finite products.
Solution. Write C=imηF⊆coDiscΓF, the image in the topos SmoothSet, so that F↠C↪coDiscΓF.
C is concrete. A subsheaf C of a concrete sheaf G is concrete: C(U)⊆G(U)↪Set(∣U∣,G(∗)), and by naturality the functions so obtained take values in C(∗). Here C(∗)=F(∗) because evaluation at ∗ preserves images and ηF is a bijection on points. Since the image sheaf is the sheafification of the presheaf image, C(U) consists of the functions that are locally underlying functions of sections of F.
Universal property. Let f:F→G with G concrete. By naturality of η, ηG∘f=coDiscΓ(f)∘ηF. Let (a,b) be a pair of generalised elements of F with ηFa=ηFb. Then ηGfa=ηGfb, and ηG is monic, so fa=fb. Thus f coequalises the kernel pair of ηF. In a topos the epimorphism F↠C is the coequaliser of that kernel pair, so f factors uniquely through C. This is the adjunction HomDiff(concF,G)≅HomSmoothSet(F,G).
Finite products.Γ and coDisc preserve products, so ηF×F′=ηF×ηF′. In a topos a product of two epimorphisms is an epimorphism (pullbacks of epimorphisms are epimorphisms) and a product of monomorphisms is a monomorphism, so F×F′↠C×C′↪coDiscΓF×coDiscΓF′ is the image factorisation of ηF×F′. Also conc(∗)=∗.
Epimorphisms.conc is a left adjoint, so it preserves epimorphisms as a functor to Diff; and F↠concF is epic in SmoothSet by construction.
A consequence. For G concrete and F arbitrary, GF is concrete: for any sheaf A, Hom(A,GF)≅Hom(A×F,G)≅Hom(conc(A)×conc(F),G) depends on A only through concA. So every map A→GF factors uniquely through A↠concA; applied to the identity of A=GF this splits the epimorphism GF↠conc(GF), which is therefore an isomorphism. ◀
The quasitopos Diff
We make Theorem 1.6 explicit. Inductions and subductions are the strong monomorphisms and strong epimorphisms; every smooth map has two canonical images; function spaces exist in every slice. We then say precisely what Diff lacks: equivalence relations are not effective. That one defect is the reason for the next two enlargements, to smooth sets and to smooth ∞-groupoids.
Source in the book.[IZ, art. 1.29–1.65]: inductions, subductions, strict maps, functional diffeology; [IZ, art. 2.8–2.12] for the D-topology.
Four classes of maps
Proposition 1.1. In Diff:
the monomorphisms are the injective smooth maps, and the epimorphisms are the surjective smooth maps;
the strong monomorphisms are the inductions, and the strong epimorphisms are the subductions.
Proof. (i) Injective maps are monic. Conversely test against maps from the point. Surjective maps are epic. Conversely, if f:X→Y misses a point y0, the two maps Y→coDisc{0,1} given by the constant 0 and the indicator of y0 are smooth (every map into a coarse space is) and coincide on f(X). (ii) is [exo:strongmono] and its dual. ◻
Recall that a monomorphism m is strong if it is right orthogonal to every epimorphism: in each commutative square with an epimorphism e on the left and m on the right there is a unique diagonal filler. In a topos every monomorphism is strong. In Diff the identity map Rdisc⟶R is monic and epic but not an isomorphism, so Diff is not balanced and is not a topos. The four classes are drawn in 1.1.
Monomorphisms and epimorphisms in Diff, with their strong subclasses. The marked map lies in both outer regions and in neither inner one. In a topos the inner and outer regions coincide.
Two images
Theorem 1.2 (Two factorisation systems). Every smooth map f:X→Y factors, uniquely up to unique diffeomorphism, in two ways: where x∼fx′ iff f(x)=f(x′), the quotient carries the quotient diffeology and f(X)sub the subspace diffeology. The comparison κf is a smooth bijection. (Strong epi, mono) and (epi, strong mono) are orthogonal factorisation systems on Diff, and both left classes are stable under pullback.
Proof. Existence is the universal property of the quotient and of the subspace (Theorem 1.6). Orthogonality of subductions against injections: given a square m∘u=v∘e with e:A↠B a subduction and m injective, the unique set-theoretic filler d:B→X satisfies d∘e=u, so it is smooth because e is a subduction (final lift). Orthogonality of surjections against inductions is [exo:strongmono]. Uniqueness follows from orthogonality. Pullback stability of subductions is Proposition 1.7; surjections are pullback stable in Set. ◻
Definition 1.3 ([IZ, art. 1.54]). A smooth map f is strict if κf:coimf→imf is a diffeomorphism.
In a topos every map is strict. In Diff strictness is a real condition, and the non-strict maps are where the geometry is (1.1). The reader should think of coimf as “X with the identifications induced by f” and of imf as “the part of Y in the range of f”; they have the same points, and coimf has fewer plots.
Coimage and image of some smooth maps. In the second row the Δn are pairwise non-diffeomorphic [IZ, Exercise 50], so infinitely many different coimages have a single image.
Proposition 1.4 (Strong subobject classifier). Let Ωst=coDisc{0,1}. For every diffeological space X, the map A↦χA is a bijection between subsets A⊆X (equivalently, isomorphism classes of inductions into X) and smooth maps X→Ωst, and Asub↪X is the pullback of {1}↪Ωst along χA.
Proof. Every function into a coarse space is smooth, so Diff(X,Ωst)=Set(X,{0,1}). The pullback of {1}↪Ωst along χA is the set A with the initial diffeology for A→X, the map to the point imposing no condition. ◻
So Diff classifies the subobjects that carry no information beyond their points, and has no classifier for the others. Function spaces were treated in Theorem 1.9; under Theorem 1.2 the functional diffeology is the exponential of sheaves, which is concrete by Theorem 1.6. The same is true in every slice.
Theorem 1.5 (Local Cartesian closure, [3). ]For every smooth map f:B′→B the pullback functor f∗:Diff/B→Diff/B′ has a right adjoint Πf, as well as its left adjoint Σf given by composition. Consequently f∗ preserves all colimits: colimits in Diff are universal.
An explicit Πf is constructed in [exo:lcc]. “Colimits are universal” is the abstract form of Proposition 1.7(i), and it is what makes it legitimate to compute with quotients fibrewise: if X→B is a quotient map, so is its restriction over any plot of B.
Comparison with topological spaces
For a topological space T let C(T) be the set T with the continuous diffeology, whose plots are the continuous parametrisations.
Proposition 1.6 ([11). ]D:Diff→Top is left adjoint to C:Top→Diff. The adjunction restricts to an equivalence between the diffeological spaces with X≅CD(X) and the Δ-generated topological spaces.
The adjunction is [exo:Dadj]. Being a left adjoint, D preserves colimits; it does not preserve finite products in general [11]. The adjunction is far from an equivalence in both directions: CD(Tα) is coarse, and DC(T) is T with the Δ-generated refinement of its topology. For the purposes of this monograph the D-topology is a convenience for stating local conditions, and is never the carrier of homotopical information.
What Diff lacks
A quasitopos is a topos except for one exactness property. In Diff it fails as follows.
Proposition 1.7 (Equivalence relations are not effective). Let R↪X×X be an equivalence relation in Diff, that is, an injective smooth map whose image is an equivalence relation on the set X. The kernel pair of the quotient X→X/R is the set R with the subspace diffeology of X×X. Hence R is the kernel pair of its quotient if and only if R↪X×X is an induction.
Proof. The kernel pair is the pullback X×X/RX, which by Theorem 1.6 is the set of pairs with the same image, with the subspace diffeology of X×X. ◻
Example 1.8. The orbit relation of Rδ acting on R is R×Rδ→R×R, (x,c)↦(x,x+c). It is injective but not an induction: its image is all of R×R, whose subspace diffeology is the standard one. In Diff the quotient is a point and the relation is forgotten. In SmoothSet the quotient is Ωcl1 (Example 1.10) and the relation is recovered as its kernel pair.
This is the first rung of a ladder (1.2). Passing from Diff to SmoothSet makes equivalence relations effective, at the price of including objects that are not determined by their points. But a group action is an equivalence relation only when it is free, and the next defect appears immediately: for a non-free action, the action groupoid is not the kernel pair of anything in SmoothSet. Passing to the ∞-topos H of Cohesion makes all groupoid objects effective, at the price of including objects that are not sets. Theorem 1.8 will make this ladder into a theorem.
The exactness ladder. Each inclusion makes effective a class of quotients that is not effective in the previous category, and each has a left adjoint (conc, respectively π0) that computes the cruder quotient from the finer one.
Solved exercises
Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.
1 Show directly that id:Rdisc→R is a monomorphism and an epimorphism of Diff but neither an induction nor a subduction.
Solution. It is bijective, hence monic and epic by 1.1. It is not an induction: the identity parametrisation of R composed with it is a plot of R, but is not locally constant. It is not a subduction: the same plot of R has no local lift to a locally constant parametrisation. Equivalently, the inverse map is not smooth. ◀
2 Let j:(0,2π)→R2, j(t)=(sint,sin2t), with image the figure eight E. Show that j is an injective immersion that is not an induction.
Solution.j′(t)=(cost,2cos2t) never vanishes, and j is injective on (0,2π): the only parameter with j(t)=0 is t=π, and elsewhere (sint,sin2t) determines (sint,cost). Now let c(s)=(sins,sin2s) for ∣s∣<1. It is a smooth curve in R2 with values in E, hence a plot of Esub. But j−1∘c equals s for s>0, equals π at s=0, and equals s+2π for s<0. It is not continuous, so it is not a plot of (0,2π), and j is not an induction. Here coimj is an open interval and imj is the figure eight with both branches through the node available to plots. ◀
3 Prove that a monomorphism of Diff is strong if and only if it is an induction.
Solution. (⇐) Let m:X↪Y be an induction, e:A→B surjective and smooth, and u:A→X, v:B→Y smooth with mu=ve. For b∈B choose a with e(a)=b and put d(b)=u(a); this is independent of a because m is injective and m(u(a))=v(b). Then de=u and md=v. Since m∘d=v is smooth and m is an induction, d is smooth. Uniqueness holds since e is epic.
(⇒) Let m:X→Y be a strong monomorphism and factor it as Xm′m(X)subiY. The map m′ is a smooth bijection, hence an epimorphism. Apply orthogonality to the square m∘idX=i∘m′: there is a smooth d:m(X)sub→X with d∘m′=idX. So m′ is a diffeomorphism and m is an induction.
The dual statement, that strong epimorphisms are the subductions, is proved in the same way using the factorisation through X/∼f. ◀
3 Prove that D⊣C: for a diffeological space X and a topological space T, a map f:X→T is continuous for the D-topology if and only if it is smooth as a map X→C(T).
Solution.f:X→C(T) is smooth iff f∘P is a continuous parametrisation of T for every plot P of X. On the other hand the D-topology is the final topology for the family of all plots, so f:D(X)→T is continuous iff f∘P is continuous for every plot P. These are the same condition. Naturality in both variables is clear, so Top(DX,T)≅Diff(X,CT). ◀
3 Show that the category of finite-dimensional manifolds is not Cartesian closed: there is no manifold E with natural bijections Mfd(M×R,R)≅Mfd(M,E).
Solution. Suppose E exists, of dimension d. Taking M=∗ identifies the points of E with C∞(R), and by naturality in M a smooth map M→E has as underlying function m↦g(m,−) for the corresponding g∈C∞(M×R). Take M=Rk with k>d and g(a,t)=∑i<kaiti. The corresponding smooth map ψ:Rk→E is injective, because distinct coefficient vectors give distinct polynomial functions. But a smooth map from Rk to a manifold of dimension d<k is never injective: on the open set where its rank is maximal, the constant rank theorem makes it locally a projection with fibres of positive dimension. In Diff the same universal property is satisfied by C∞(R,R) with the functional diffeology. ◀
Solution. Let f:B′→B be smooth and p:E→B′ an object of Diff/B′. For b∈B let Fb=f−1(b) with the subspace diffeology, and let ΠfE={(b,s):b∈B,s:Fb→Esmooth,p∘s=idFb}πB. For a parametrisation r↦(br,sr) of ΠfE with domain U and r↦br a plot of B, write U×BB′={(r,b′):f(b′)=br}, a subspace of U×B′. Declare the parametrisation a plot if r↦br is a plot of B and U×BB′⟶E,(r,b′)⟼sr(b′) is smooth.
This is a diffeology.[D1]: for a constant parametrisation, U×BB′=U×Fb and the map is s∘pr2. [D3]: a smooth ϕ:V→U induces a smooth map V×BB′→U×BB′. [D2]: a plot of U×BB′ is a pair (ρ,Q), and locally ρ takes values in one member of a given cover of U; smoothness is tested on plots, hence locally in U.
The adjunction. Let q:Z→B be an object of Diff/B; then f∗Z=Z×BB′. Given g:Z→ΠfE over B, define g^(z,b′)=g(z)(b′). For a plot (ζ,Q) of Z×BB′, the composite g∘ζ is a plot of ΠfE, so (r,b′)↦g(ζ(r))(b′) is smooth on U×BB′; precomposing with the plot r↦(r,Q(r)) of U×BB′ shows that g^∘(ζ,Q) is a plot of E. So g^ is smooth, and it lies over B′. Conversely, given h:Z×BB′→E over B′, put hˇ(z)=(q(z),h(z,−)). Each h(z,−) is a smooth section over Fq(z), and for a plot ζ of Z the map (r,b′)↦h(ζ(r),b′) is the composite of h with the smooth map ζ×id restricted to U×BB′, so hˇ∘ζ is a plot. The two assignments are inverse to each other and natural in Z, so Hom/B(Z,ΠfE)≅Hom/B′(f∗Z,E).
For B=∗ this is Theorem 1.9: Πf(B′×Y→B′)=C∞(B′,Y). ◀
The higher structure
Cohesion
The topos of smooth sets carries four adjoint functors to sets — pieces, discrete, points, codiscrete — and the same is true one level up, for the ∞-topos H of smooth ∞-groupoids and the ∞-category of spaces. We set up this structure, locate Diff inside H as the concrete 0-types, and state the theorem that computes the leftmost adjoint, the shape, by smooth singular simplices.
Source in the book.[IZ, art. 5.6–5.9] (components) is the only direct contact. The framework is Lawvere’s axiomatic cohesion [40] and Schreiber’s cohesive ∞-topos of smooth ∞-groupoids [49].
Proposition 1.1 (Cohesion of smooth sets). There is a chain of adjunctions Π0⊣Disc⊣Γ⊣coDisc in which:
Disc(S) is the constant presheaf, i.e. the set S with the discrete diffeology;
Π0(F)=colimU∈CartopF(U), and for a diffeological space X this is the set π0(X) of smooth path components [IZ, art. 5.6];
Disc and coDisc are full and faithful;
Π0 preserves finite products;
the canonical map ΓF→Π0F is surjective, and DiscS→coDiscS is a monomorphism.
Proof. (i) Let {Ui↪U} be a cover of a Cartesian space and si∈S a family with si=sj whenever some W maps to both Ui and Uj, that is, whenever Ui∩Uj=∅. Since U is connected, any two members of the cover are joined by a chain of members with non-empty consecutive intersections, so all si are equal: the constant presheaf is a sheaf. Its plots are the constant maps on each Cartesian space, hence the locally constant parametrisations. (ii) Hom(F,DiscS) is the set of natural transformations from F to a constant functor, that is Set(colimF,S). For F=X the colimit is the set of plots modulo the relation generated by P∼P∘ϕ; every plot is equivalent to each of its values, and two points are equivalent iff they are joined by a finite chain of plots with connected domains, iff they are joined by a smooth path. (iii) ΓDiscS=S and ΓcoDiscS=S. (iv) Cart has finite products, so Cartop is sifted, and sifted colimits commute with finite products in Set. (v) An element of the colimit is represented by some s∈F(U), which is equivalent to its restriction to any point of U; and S→Set(∣U∣,S) is injective because U is non-empty. ◻
Lawvere calls a topos with such a quadruple, satisfying (iii)–(v), cohesive [40]. The names are meant literally: ΓX is the set of points of X, Π0X is the set of pieces into which the points cohere, and Disc and coDisc are the two extreme cohesions on a set. Composing adjacent functors gives three idempotent operations on SmoothSet, ∫0=DiscΠ0,♭=DiscΓ,♯=coDiscΓ,∫0⊣♭⊣♯, and Lemma 1.5 becomes: a smooth set X is a diffeological space iff X→♯X is monic.
Smooth ∞-groupoids
Definition 1.2. H=Sh∞(Cart) is the ∞-topos of sheaves of spaces on the site Cart: functors X:Cartop→S to the ∞-category of spaces such that for every covering family {Ui↪U} the map X(U)→lim[k]∈Δ∏X(Ui0∩⋯∩Uik) (with intersections computed in sheaves) is an equivalence. Its objects are smooth ∞-groupoids.
Concretely H is presented by simplicial presheaves on Cart with the local projective model structure; on this site Čech descent and hyperdescent coincide [49]. The 0-truncated objects of H are the smooth sets, and the 1-truncated objects are the stacks of groupoids on Cart [42, §6.4.5]. The truncation functors τ≤n are left adjoint to the inclusions; we write π0=τ≤0.
Theorem 1.3 (Schreiber [49). ]There is a chain of adjoint ∞-functors Π⊣Disc⊣Γ⊣coDisc:H⇄S with Disc and coDisc full and faithful and Π preserving finite products. Here DiscK is the constant presheaf, ΓX=X(∗), coDiscK=(U↦K∣U∣), and ΠX=colimCartopX.
Sketch. The key input is that constant presheaves are ∞-sheaves on Cart ([exo:constant-sheaf]); this uses that Cartesian spaces are contractible and would fail on Dom. Given that, MapH(X,DiscK) is the space of maps of presheaves into a constant presheaf, which is Map(colimX,K). Cartop is sifted, so Π preserves finite products [42, 5.5.8]. Evaluation at the point preserves limits and colimits of sheaves because the point has only the trivial cover; its right adjoint is as stated because Map(X,K∣−∣) is computed pointwise in ∣U∣. Full faithfulness: ΓDiscK=K=ΓcoDiscK. ◻
Definition 1.4. The three modalities of H are the idempotent (co)monads ∫=DiscΠ(shape),♭=DiscΓ(flat),♯=coDiscΓ(sharp),∫⊣♭⊣♯. For X∈H the space ΠX, or the discrete object ∫X, is called the shape or fundamental ∞-groupoid of X.
The position of diffeological spaces. Each hooked arrow is a full embedding; each arrow on the left is its left adjoint. The composite reflection H→Diff is X↦concπ0X.
Theorem 1.5 (Diff inside H). The composite Diff↪SmoothSet↪H is full and faithful, preserves limits, and has the left adjoint conc∘π0. Its essential image consists of the 0-truncated objects X for which the unit X→♯X is a monomorphism.
Proof. The 0-truncated objects of Sh∞(Cart) are the sheaves of sets, and the inclusion is right adjoint to π0. On 0-truncated objects ♯ restricts to coDiscΓ of Points, codiscrete objects, and separatedness, and a map of 0-truncated objects is a monomorphism in H iff it is one in SmoothSet. Now apply Lemma 1.5 and Proposition 1.7. ◻
Reading the modalities
For X∈H there are canonical maps ♭X⟶X⟶♯X,X⟶∫X. Here ♭X consists of the points of X with the discrete cohesion, ♯X of the points with the codiscrete cohesion, and ∫X is the homotopy type of X as a discrete object. Their values on the running examples are in 1.1.
The functors of cohesion on examples. Rows 3 and 6 are justified in Shape; note that the one-point sheaf Ωcl1 has a non-trivial shape, while Ωk is contractible by the homotopy (ω,t)↦tω.
X
ΓX
♭X
♯X
ΠX
Rn
the set Rn
Rn discrete
Rn coarse
∗
manifold M
the set M
M discrete
M coarse
homotopy type of M
Tα
R/Λα
discrete
coarse
BZ2≃T2
Δ1=R/{±1}
[0,∞)
discrete
coarse
∗
Ωk, k≥1
∗
∗
∗
∗
Ωcl1=R/Rδ
∗
∗
∗
BRδ=K(R,1)
BG, G a Lie group
B(Gδ)
B(Gδ)
B(♯G)
classifying space BG
Two entries are used repeatedly. First, a manifold has the shape of its underlying homotopy type: this is the nerve theorem for a good open cover, and is the reason for the name “shape”. Second, ♭BG=DiscB(Gδ): maps X→♭BG are principal bundles for the discrete group, that is, flatG-bundles, whence the name of the modality. By adjunction MapH(X,♭A)≃MapS(ΠX,ΓA), so cohomology with flat (locally constant) coefficients is ordinary cohomology of the shape. This formula does a great deal of work in Chapters Forms and Number theory: the arithmetic of irrational tori.
Computing the shape
For k≥0 let Δek={x∈Rk+1:∑xi=1} be the extended simplex, an affine hyperplane diffeomorphic to Rk. The Δek form a cosimplicial object of Cart.
The extended simplex.
Theorem 1.6 (Berwick-Evans–Boavida de Brito–Pavlov [5). ; Bunk [8]; Pavlov [47]]For every X∈H:
ΠX≃[k]↦X(Δek), the geometric realisation of the simplicial space of smooth singular simplices;
for every manifold M, Π[M,X]≃MapS(ΠM,ΠX), where [M,X] is the internal hom of H.
For a diffeological space X, by part (i) ΠX is the smooth singular simplicial set SD(X)k=Diff(Δek,X) of Christensen and Wu [12], regarded as a space. Part (ii) is the smooth Oka principle: the shape of a mapping space out of a manifold is the mapping space of shapes. It is a genuinely geometric theorem, since Π is a colimit and [M,−] is a limit.
Remark 1.7 (Shape versus the D-topology). There are two ways to extract a homotopy type from a diffeological space: the shape ΠX, and the weak homotopy type of the topological space D(X). They coincide for manifolds and differ in general. For Tα the second is a point and the first is a torus. The first is the right one, in the precise sense that it is computed by a left adjoint that preserves finite products and takes quotients by principal actions to homotopy quotients (Theorem 1.4); the D-topology has none of these properties.
Solved exercises
Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.
1 Compute Γ, Π0, ♭ and ♯ for X=R∖{0} and describe the maps ♭X→X→♯X.
Solution.ΓX is the underlying set. Π0X={−,+}, the two path components. ♭X is the set R∖{0} with the discrete diffeology and ♭X→X is the identity on points; it is smooth because locally constant parametrisations are plots, and it is not a diffeomorphism. ♯X is the same set with the coarse diffeology and X→♯X is again the identity on points. Both maps are bijective, hence monic and epic, and neither is strong (Proposition 1.1). ◀
2 Show that Π0(Ωk)=∗ for every k, and that Π0(X×Y)=Π0(X)×Π0(Y) for diffeological spaces, directly from the description by smooth paths.
Solution. An element of Π0(Ωk)=colimUΩk(U) is represented by a form ω∈Ωk(U). On U×R consider ω~=t⋅prU∗ω, with t the coordinate on R. Its restrictions along u↦(u,1) and u↦(u,0) are ω and 0, so ω∼ω~∼0 in the colimit, and 0∈Ωk(U) is the restriction of 0∈Ωk(∗). Hence there is one element. For products: a smooth path in X×Y is a pair of smooth paths, so two points (x,y), (x′,y′) are joined by a path iff x,x′ are and y,y′ are; one direction uses the constant path in one factor together with concatenation of stationary paths (Paths, loops and homotopy groups). ◀
2 Show that Π0(Tα)=∗ and that Tα→∫0Tα, ♭Tα→Tα and Tα→♯Tα are all non-invertible.
Solution.qα:R→Tα is surjective and R is path connected, so Tα is; hence ∫0Tα=∗ and the first map collapses Tα to a point. ♭Tα is the uncountable discrete set R/Λα and ♯Tα is the same set with the coarse diffeology; by Proposition 1.10(ii) the diffeology of Tα is neither, so the two identity-on-points maps are not diffeomorphisms. ◀
3 Let F be a smooth set with ΓF=∗. Show that Π0F=∗. Deduce that a non-empty smooth set with one point is connected, and give an example of one that is not contractible in the sense that its shape is not a point.
Solution. By 1.1(v) the map ΓF→Π0F is surjective, so Π0F has at most one element; it is non-empty because ΓF is. So one-point smooth sets are connected: “pieces have points”. For the example take F=Ωcl1. By Example 1.10 it is the quotient of R by the free action of the discrete group Rδ; such a quotient is the homotopy quotient (Theorem 1.2), Π preserves homotopy quotients and finite products, and ΠR=∗, so ΠΩcl1≃∗//Rδ=BRδ, an Eilenberg–MacLane space K(R,1) for the discrete group R. Its fundamental group is uncountable. (Concretely: a path in Ωcl1 is a 1-form a(t)dt on the line; it is automatically a loop, since Ωcl1 has one point, and its class is ∫01a.) ◀
4 Let K be a space. Prove that the constant presheaf with value K satisfies descent for every good open cover of a Cartesian space, and explain why this fails on Dom.
Solution. Let U={Ui}i∈I be a good cover of U≅Rn: every non-empty finite intersection Ui0…ik is diffeomorphic to Rn. Good covers are cofinal among open covers of U (take geodesically convex balls for a Riemannian metric) and generate the topology of Cart, so it suffices to verify descent for them. The Čech nerve of U in presheaves has in degree k the coproduct of the representables Ui0…ik over those (i0,…,ik) with non-empty intersection. For the constant presheaf K the descent map is therefore K=K(U)⟶[k]∈Δlim(i0,…,ik)Ui0…ik=∅∏K=Map(N(U),K), where N(U) is the nerve of the cover, the simplicial set whose k-simplices are the (k+1)-tuples with non-empty intersection, and the map is restriction along N(U)→∗. By the nerve theorem (Borsuk, Weil) the realisation of N(U) is homotopy equivalent to U, which is contractible. Hence N(U)→∗ is a weak equivalence and the descent map is an equivalence.
On Dom the first step of the argument is invalid: the value of a sheaf on a disconnected or non-simply-connected domain is forced by descent, and for U=R2∖{0} the sheafification of the constant presheaf has value Map(S1,K), the free loop space, not K. The constant presheaf is a sheaf exactly on a site whose objects are contractible; this is the technical reason for preferring Cart. ◀
Shape
The smooth homotopy groups of the book are the homotopy groups of the shape. We explain the comparison, prove that the shape functor turns diffeological fibre bundles into fibre sequences — which gives the long exact sequence of [IZ, art. 8.21] for free — and compute the shapes of the running examples. The irrational torus is a K(Z2,1), the quotient R/Q is a rational circle, and none of this is determined by the D-topology.
Source in the book.[IZ, Chapter 5] (paths, components, homotopy groups) and [IZ, art. 8.19–8.26] (homotopy of fibre bundles, coverings).
Paths, loops and homotopy groups
Following [IZ, art. 5.1], the space of paths of a diffeological space X is Paths(X)=C∞(R,X) with the functional diffeology; a path γ starts at γ(0) and ends at γ(1). Defining paths on all of R keeps the source a domain. The price is that two paths with γ(1)=γ′(0) cannot be concatenated naively; the remedy is to reparametrise by a smashing function, a smooth non-decreasing λ:R→[0,1] equal to 0 near (−∞,0] and to 1 near [1,∞) (1.1). The path γ∘λ is stationary near its ends, is homotopic to γ with fixed ends, and stationary paths concatenate smoothly [IZ, art. 5.2–5.5].
A smashing function, and the concatenation of two stationary paths.
Being joined by a path is then an equivalence relation, with quotient π0(X). For a base point x let Loops(X,x)={ℓ∈Paths(X):ℓ(0)=ℓ(1)=x} with the subspace diffeology and base point the constant loop x^. The higher homotopy groups are defined by recursion [IZ, art. 5.15–5.17]: πn(X,x)=πn−1(Loops(X,x),x^)=π0(Loopsn(X,x)). Unwinding with Theorem 1.9, an element of πn(X,x) is represented by a smooth map σ:Rn→X with σ(t)=x whenever some coordinate ti lies in {0,1}, and two such are identified when they are joined by a smooth one-parameter family of the same kind. A smooth homotopy between f,g:X→Y is a path in C∞(X,Y), equivalently a smooth H:X×R→Y with H0=f, H1=g. A space is smoothly contractible if its identity is homotopic to a constant.
Homotopy groups of the shape
Proposition 1.1 (Π inverts smooth homotopy). If f,g:X→Y are smoothly homotopic maps of smooth ∞-groupoids, then Πf≃Πg. In particular smooth homotopy equivalences induce equivalences of shapes, and a smoothly contractible object has contractible shape.
Proof. Let H:X×R→Y be the homotopy and i0,i1:X→X×R the inclusions at 0 and 1. Since Π preserves finite products and Π(R)=∗, the projection X×R→X induces an equivalence on shapes. Both i0 and i1 are sections of it, so Πi0≃Πi1, and Πf=ΠH∘Πi0≃ΠH∘Πi1=Πg. ◻
Theorem 1.2 (Christensen–Wu [12). ; Kihara [37]]For every diffeological space X, every x∈X and every n≥0 there is a natural isomorphism πn(ΠX,x)≅πn(X,x) between the homotopy groups of the shape and the smooth homotopy groups of [IZ, art. 5.17].
By Theorem 1.6(i) the left-hand side is πn of the smooth singular simplicial set SD(X)=Diff(Δe∙,X). For n=0 the statement is Proposition 1.1(ii). Christensen and Wu proved it for those X whose SD(X) is a Kan complex, a class that contains all diffeological groups and homogeneous spaces; Kihara removed the hypothesis. The content is that horn fillers, which need not exist smoothly, exist after reparametrising by smashing functions — the same device as in 1.1, one dimension at a time.
Remark 1.3 (Why not a model structure on Diff?). One would like to say that Diff “is a model for homotopy theory”. The obvious attempt, transferring the Kan–Quillen model structure along SD, fails [47]; Kihara’s model structure [36] uses simplices with a non-standard diffeology. From the present point of view nothing is lost: the homotopy theory is that of H, the functor Π is defined on all of H, and Diff is the full subcategory on which Π is computable by smooth paths.
Fibre sequences
A diffeological fibre bundle is a smooth surjection π:T→B whose pullback along every plot of B is locally trivial with a fixed fibre F[IZ, art. 8.9]. This is weaker than local triviality over D-open sets, and it has to be: T2→Tα is a fibre bundle with fibre R over a base whose only D-open sets are ∅ and Tα. Principal bundles are treated in Bundles and stacks; we use two facts from there. First, a principal G-bundle P→B satisfies B≃P//G in H (Theorem 1.2). Second, every diffeological fibre bundle with fibre F is associated to a principal Diff(F)-bundle [IZ, art. 8.14, 8.16].
Theorem 1.4 (Shape preserves bundle fibre sequences). Let F→TπB be a diffeological fibre bundle. Then ΠF⟶ΠT⟶ΠB is a fibre sequence of spaces. Consequently there is a long exact sequence ⋯→πn(F)→πn(T)→πn(B)→πn−1(F)→⋯→π0(T)→π0(B)→∗, which by 1.2 is the exact homotopy sequence of [IZ, art. 8.21].
Proof.Principal case. Let P→B be principal with group G. Then in HB≃P//G=[k]∈ΔopcolimP×Gk,henceΠB≃[k]∈ΔopcolimΠP×(ΠG)k=ΠP//ΠG, because Π preserves colimits, being a left adjoint, and finite products. The right-hand side is the homotopy quotient of the space ΠP by the group-like space ΠG. In S, as in any ∞-topos, the map from an object to its homotopy quotient by a group is a principal bundle with fibre the group [46]; so ΠG→ΠP→ΠB is a fibre sequence.
General case. Write T≅P×GF=(P×F)/G with G=Diff(F) and P→B principal. The diagonal action on P×F is again principal: if r↦((pr,fr),(prgr,gr−1fr)) is a plot of (P×F)2, then r↦gr is a plot of G because it is already determined smoothly by (pr,prgr) and the action on P is principal. Hence T≃(P×F)//G and ΠT≃(ΠP×ΠF)//ΠG. The map to ΠB≃ΠP//ΠG is induced by the projection, and its pullback along ΠP→ΠP//ΠG is ΠP×ΠF→ΠP, since colimits are universal in S. So its fibre is ΠF. ◻
The proof uses nothing about paths. In [1] the exact sequence is proved by constructing, for every fibre bundle, an associated bundle of loop spaces [IZ, art. 8.20]; here the sequence is a formal consequence of two properties of the left adjoint Π and one geometric input, the identification of quotients by principal actions with homotopy quotients.
Shapes of the running examples
Corollary 1.5 (Quotients of Rn by countable subgroups). Let Γ⊂Rn be a countable subgroup and TΓ=Rn/Γ. Then Rn→TΓ is a principal Γ-bundle with Γ discrete, and ΠTΓ≃BΓ=K(Γ,1). In particular ΠTα≃BZ2≃T2, and Π(R/Q)≃K(Q,1).
Proof. A plot of Rn with values in the countable set Γ is locally constant, so Γ is discrete as a subspace. The action map Rn×Γ→Rn×Rn, (x,γ)↦(x,x+γ), is an induction: if r↦(xr,yr) is a plot with yr−xr∈Γ, then r↦yr−xr is smooth with countable image, hence locally constant, hence a plot of Γ. So the action is principal (Definition 1.1), and 1.4 gives ΠTΓ≃ΠRn//Γ=∗//Γ. ◻
So the irrational torus has the homotopy type of the ordinary 2-torus, in accordance with its name and in contrast with its D-topology. Each of two fibre bundles over it gives the computation (1.2): the universal covering R→Tα with discrete fibre Z2, and the Kronecker fibration T2→Tα with contractible fibre R. Iglesias-Zemmour recounts in the afterword of [1] that reconciling these two computations is what led to the definition of diffeological fibre bundles. The space R/Q is a one-dimensional diffeological group whose shape is the rationalisation of the circle.
Two diffeological fibre bundles over the irrational torus and the fibre sequences of shapes they induce. Each gives ΠTα≃BZ2.
Some shapes. The difference between the third and fourth rows is the difference between a quotient and a homotopy quotient; the first two show that an indiscrete D-topology is compatible with any K(Γ,1) for countable torsion-free abelian Γ⊂Rn.
A covering is a diffeological fibre bundle with discrete fibre [IZ, art. 8.22]. For connected X there is a universal covering X~→X, simply connected and unique up to isomorphism, which is a principal bundle with structure group π1(X)[IZ, art. 8.26]. In H this becomes X≃X~//π1(X),classified byX⟶Bπ1(X)=τ≤1∫X, and X~ is the homotopy fibre of the 1-truncation of the shape unit. The monodromy theorem [IZ, art. 8.25], that a smooth map from a simply connected space lifts through any covering, is the corresponding lifting property. For X=Tα the universal covering is R, and for X=TΓ it is Rn.
Solved exercises
Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.
1 Construct a smashing function, and show that if γ,γ′ are paths with γ(1)=γ′(0), both stationary near their ends, then the concatenation γ∨γ′, equal to γ(2t) for t≤21 and to γ′(2t−1) for t≥21, is a smooth path.
Solution. Let φ(t)=e−1/t for t>0 and 0 otherwise, and put ψ(t)=φ(t)/(φ(t)+φ(1−t)). The denominator never vanishes, so ψ is smooth, non-decreasing, 0 on (−∞,0] and 1 on [1,∞). Then λ(t)=ψ(3t−1) is 0 on (−∞,31] and 1 on [32,∞). For the concatenation: there is ε>0 with γ constant on (1−ε,∞) and γ′ constant on (−∞,ε). On t<21+2ε the map γ∨γ′ coincides with t↦γ(2t), and on t>21−2ε with t↦γ′(2t−1); both are plots, they coincide on the overlap where they are constant at γ(1), and [D2] applies. By the same argument with parameters, concatenation is smooth as a map from the space of composable pairs of stationary paths to Paths(X). ◀
2 Show that Δn=Rn/O(n) and every non-empty coarse space are smoothly contractible.
Solution. Let λ be a smashing function and h:Rn×R→Rn, h(x,t)=(1−λ(t))x. It is smooth, h0=id, h1=0, and each ht is O(n)-equivariant. So π∘h is constant on the fibres of the subduction π×id:Rn×R→Δn×R (Proposition 1.7) and descends to a smooth hˉ:Δn×R→Δn from the identity to a constant. For a coarse space X with a point x0, the map H(x,t)=x for t<21 and H(x,t)=x0 for t≥21 is smooth, since every map into a coarse space is. By 1.1 both have contractible shape. ◀
2 Compute π1(Tα,0) directly from the definition, by lifting loops to R.
Solution. Let ℓ be a loop at 0=qα(0). It is a plot, so it lifts locally through qα, and two local lifts differ by a locally constant element of Λα (Proposition 1.10). Covering R by intervals on which lifts exist and correcting successive lifts by constants, we get a unique smooth ℓ~:R→R with qαℓ~=ℓ and ℓ~(0)=0. Put w(ℓ)=ℓ~(1)∈Λα. A homotopy of loops is a plot h:R2→Tα with h(s,0)=h(s,1)=0; by the same argument on the simply connected domain R2 it lifts to h~ with h~(s,0)=0, and s↦h~(s,1) is a continuous map into Λα, hence constant. So w is well defined on π1. It is a homomorphism because the lift of a concatenation is the lift of the first loop followed by the translate of the lift of the second. It is surjective: t↦qα(tμ) is a loop with w=μ. It is injective: if w(ℓ)=0 then ℓ~ is a loop in R at 0, and (s,t)↦qα(sℓ~(t)) contracts ℓ. Hence π1(Tα,0)≅Λα≅Z2. ◀
3 Show that R/Q is a diffeological Q-vector space with π1(R/Q)≅Q and all higher homotopy groups zero, and that every smooth map R/Q→R/Q fixing 0 is multiplication by a rational number.
Solution.Q is a countable subgroup, so by 1.5R→R/Q is a principal Q-bundle with Q discrete and Π(R/Q)≃K(Q,1); now apply 1.2. Multiplication by a∈Q on R preserves Q, so it descends to a smooth map on the quotient, and this makes R/Q a Q-vector space with smooth operations. Let f be smooth with f(0)=0. As in [exo:pi1-Talpha] the plot f∘q lifts to a smooth F:R→R with F(0)=0 and F(x+a)−F(x)∈Q for a∈Q. For fixed a the left side is continuous in x with values in a countable set, hence a constant ϕ(a). Differentiating, F′(x+a)=F′(x) for all a∈Q, so the continuous function F′ is constant on a dense set, hence constant: F(x)=cx. Finally c=F(1)−F(0)=ϕ(1)∈Q. ◀
3 Assuming that S∞ is contractible and that S∞→CP∞ is a principal U(1)-bundle [IZ, art. 4.10–4.11, 8.11], compute ΠCP∞. Do the same for Tα using the bundle T2→Tα.
Solution. By 1.4, ΠU(1)→ΠS∞→ΠCP∞ is a fibre sequence with contractible total space, so ΩΠCP∞≃ΠU(1)≃S1=K(Z,1). CP∞ is connected, hence ΠCP∞≃K(Z,2). For Tα: the fibre R has contractible shape, so ΠT2→ΠTα has contractible fibres over a connected base and is an equivalence; ΠT2≃T2≃BZ2 because T2 is a manifold. This is consistent with 1.5. ◀
4 Let Γ⊂Rn be a countable subgroup. Prove directly from the definition of the smooth homotopy groups, without 1.2 or 1.4, that πk(TΓ,0)=0 for all k≥2.
Solution. Let q:Rn→TΓ be the projection and Bk={t∈Rk:ti∈{0,1} for some i}. A class in πk(TΓ,0) is represented by a smooth σ:Rk→TΓ with σ(Bk)={0}, and two representatives define the same class when they are joined by a smooth family σs, s∈R, of such maps.
Lifting.σ is a plot, so every point of Rk has a neighbourhood on which σ lifts through q, and two lifts on a connected open set differ by a constant in Γ, because their difference is continuous with values in a countable subset of Rn. The local lifts therefore form a principal Γ-covering of Rk in the classical sense; it is trivial because Rk is simply connected. So there is a global smooth lift σ~:Rk→Rn with qσ~=σ, unique up to adding a constant of Γ.
Boundary values.σ~ maps Bk into q−1(0)=Γ. For k≥2 the set Bk is connected: it is a union of hyperplanes {ti=c}, c∈{0,1}, any two of which with different i intersect, and for k≥2 any two of them are linked through a third. A continuous map from a connected set to a countable subset of Rn is constant, so after subtracting a constant, σ~∣Bk=0.
Contraction. Put σs=q∘(sσ~) for s∈R. Then (s,t)↦σs(t) is smooth, each σs sends Bk to 0, σ1=σ and σ0 is constant. Hence [σ]=0.
For k=1 the argument is not available: B1={0,1} is disconnected, σ~(1)−σ~(0)∈Γ is the obstruction, and one recovers π1(TΓ)≅Γ as in [exo:pi1-Talpha]. ◀
Forms
A differential form on a diffeological space is a map into a classifying sheaf that is not itself a diffeological space. From this one definition we recover the Cartan–de Rham calculus of the book, a two-line proof that forms descend along subductions, and a spectral sequence that measures the failure of de Rham’s theorem. On the irrational torus its E2 page is the Künneth decomposition of the cohomology of S1×S1, with the cohomology of one circle represented by forms and that of the other by bundles.
Source in the book.[IZ, Chapter 6], especially art. 6.28–6.39 and 6.73–6.90; [IZ, art. 8.28–8.31, 8.40–8.42] for periods and integration bundles.
Forms are maps into Ωk
Definition 1.1 ([IZ, art. 6.28]). A differential k-form on a diffeological space X is a rule α assigning to each plot P:U→X a smooth form α(P)∈Ωk(U), such that α(P∘F)=F∗α(P) for every smooth F:V→U. The vector space of such is Ωk(X).
Proposition 1.2. Ωk(X)=HomSmoothSet(X,Ωk), naturally in X. For a manifold this is the usual space of k-forms.
Proof. A natural transformation X→Ωk is a family of maps X(U)→Ωk(U), natural in U; that is 1.1, word for word. If X=M is a manifold, a form ω on M gives P↦P∗ω; conversely the values of α on the inverses of charts glue to a form on M by the compatibility condition, and determine α because every plot factors locally through charts. ◻
A k-form on X is a map α:X→Ωk of smooth sets. By the Yoneda lemma, a map U→Ωk from a Cartesian space is an ordinary k-form on U, and the compatibility condition of 1.1 is the commutativity of the outer triangle.
Everything natural on Cartesian spaces therefore extends to all smooth sets by post-composition. The exterior derivative is a map of sheaves d:Ωk→Ωk+1 with d∘d=0; the wedge product is a map Ωk×Ωl→Ωk+l; pullback along f:X→Y is pre-composition. The identities of the Cartan calculus hold on X because they hold in the target. This is how [IZ, art. 6.32–6.35] proceed, plot by plot.
Remark 1.3 (The space of forms). The internal hom [X,Ωk] of SmoothSet has Ωk(X) as its set of points, but is not concrete: its sections over U are the k-forms on X×U, including those with components along U. The functional diffeology on Ωk(X) of [IZ, art. 6.29] is its concretisation.
Descent along subductions
Proposition 1.4 (Forms on quotients, [IZ, art. 6.38]). Let π:X→B be a subduction. Then Ωk(B)π∗Ωk(X)⇉Ωk(X×BX) is an equaliser: a form on X descends to B, uniquely, if and only if its two pullbacks to X×BX coincide. Explicitly, β=π∗α for a unique α iff β(P)=β(P′) for all plots P,P′ of X with π∘P=π∘P′.
Proof. A subduction is an epimorphism of sheaves, because plots lift locally. In a topos every epimorphism is the coequaliser of its kernel pair, and the kernel pair of π, computed in SmoothSet, is the diffeological space X×BX (the inclusion Diff↪SmoothSet preserves limits). Now apply HomSmoothSet(−,Ωk), which turns coequalisers into equalisers. ◻
The proof never used that the target was Ωk: the same statement holds for maps from B into any smooth set. Subductions are exactly the maps along which everything descends.
Proposition 1.5 (Forms on the running examples).
Let Γ⊂Rn be a dense countable subgroup. Then Ω∙(Rn/Γ) is the exterior algebra of constant-coefficient forms on Rn, with zero differential. In particular Ω0(Tα)=R, Ω1(Tα)=Rθ with qα∗θ=dx, and Ωk(Tα)=0 for k≥2.
Ω1(Δ1)={a(x)dx:a odd} under pullback to R, and every 1-form on Δ1 is exact.
Proof. (i) Two plots P,P′ of Rn with the same image in the quotient differ by a smooth map into Γ, which is locally constant. So the condition of 1.4 is invariance under all translations by γ∈Γ. The coefficients of an invariant form are continuous and Γ-periodic, hence constant. (ii) Taking P′=−P shows a must be odd. Conversely let a be odd, so that A(x)=∫0xa is even; by Whitney’s theorem [57] A(x)=B(x2) with B smooth. If P,P′ are plots of R with P′=±P pointwise then P′2=P2, and P∗(adx)=d(B∘P2)=P′∗(adx). By the same formula, adx=d(B∘sq) is exact on Δ1. ◻
De Rham cohomology and homotopy invariance
The de Rham cohomologyHdR∙(X) of a diffeological space is the cohomology of the complex (Ω∙(X),d), as in [IZ, art. 6.73]. From 1.5: HdR0(Tα)=R,HdR1(Tα)=R[θ],HdRk(Tα)=0(k≥2).
Proposition 1.6 (Homotopy invariance, [IZ, art. 6.88]). Smoothly homotopic maps induce the same map on de Rham cohomology.
Proof. It suffices to construct, naturally in the smooth set X, an operator K:Ωk(X×R)→Ωk−1(X) with dK+Kd=i1∗−i0∗. For a Cartesian space U let KUω=∫01ι∂tωdt be integration along the fibre of U×[0,1]→U. The classical computation gives the homotopy formula on U, and KU commutes with pullback along smooth maps V→U. A natural family of maps Ωk(U×R)→Ωk−1(U) is a map of sheaves [R,Ωk]→Ωk−1, so K is defined on Hom(X×R,Ωk)=Hom(X,[R,Ωk]) by post-composition, and the formula holds because it holds in the target. ◻
The chain-homotopy operator of [IZ, art. 6.83] is the refinement of K defined on Paths(X); the argument is the same.
De Rham’s theorem and its obstruction
On a Cartesian space the de Rham complex is exact in positive degrees and its H0 is the constants. As a statement about sheaves:
Lemma 1.7 (Poincaré). 0→♭R→Ω0dΩ1dΩ2→⋯ is an exact sequence of sheaves of abelian groups on Cart, where ♭R=Disc(R) is the constant sheaf. It is already exact on sections over every Cartesian space.
For a sheaf of abelian groups A on Cart and X∈H write Hq(X;A)=π0MapH(X,BqA). For A=♭R the adjunction (2) gives Hq(X;♭R)=Hq(ΠX;R), the real cohomology of the shape. For q=0 and X a smooth set, H0(X;Ωp)=Ωp(X).
Theorem 1.8 (De Rham’s theorem with obstruction; after [32, 45). ]Let X be a smooth set, for instance a diffeological space.
There is a first-quadrant spectral sequence E1p,q=Hq(X;Ωp)⟹Hp+q(ΠX;R),d1=d∗, with E2p,0=HdRp(X), whose edge maps HdRp(X)→Hp(ΠX;R) are the de Rham homomorphisms.
In low degrees there is an exact sequence 0→HdR1(X)→H1(ΠX;R)→E20,1→HdR2(X)→H2(ΠX;R), where E20,1=ker(d∗:H1(X;R)→H1(X;Ω1)) is a subgroup of the group H1(X;R) of isomorphism classes of principal R-bundles over X.
If X is a manifold then Hq(X;Ωp)=0 for q>0, and all edge maps are isomorphisms.
Proof. (i) By 1.7 the complex Ω∙ is a resolution of ♭R, so Bn♭R is the object of H associated by the Dold–Kan correspondence to the complex Ω0→⋯→Ωn−1→Ωcln, and Hn(ΠX;R)=Hn(X;♭R) is the hypercohomology Hn(X;Ω∙). Filtering Ω∙ by its stupid truncations Ω≥p gives a tower in H whose layers are Bn−pΩp, and mapping X into the tower gives the spectral sequence with E1p,q=π0Map(X,BqΩp). Its bottom row is Ω∙(X) with differential d. (ii) is the five-term exact sequence of a first-quadrant spectral sequence, together with Theorem 1.5 for the identification of H1(X;R) with principal R-bundles. (iii) Cover a manifold M by a good open cover; in H, M is the colimit of the Čech nerve, whose terms are coproducts of Cartesian spaces. Since BqΩp has vanishing higher cohomology on Cartesian spaces, Hq(M;Ωp) is the Čech cohomology of the cover with coefficients in Ωp, which vanishes for q>0 by a partition of unity. The spectral sequence collapses onto its bottom row. ◻
De Rham’s theorem is thus the statement that the sheaves Ωp are acyclic on X. On a manifold the reason is partitions of unity. A diffeological space has no partitions of unity in general — Tα has no non-constant functions at all — and the groups Hq(X;Ωp) are new invariants. The first of them, H1(X;Ω0), was introduced by Iglesias-Zemmour as the group Fl(X) of “flows” or principal R-bundles [IZ, art. 8.39]; part (ii) contains his description of the cokernel of the first de Rham homomorphism [IZ, art. 8.30].
Proposition 1.9 (The E2 page of the irrational torus). For X=Tα one has E1p,q=Hq(Λα;Ωp(R)), group cohomology of Λα≅Z2 acting by translation, and E2p,q={R0(p,q)∈{0,1}2,otherwise, for every irrational α. The spectral sequence degenerates at E2 and recovers H∙(T2;R). The classes are: 1 and [θ] in the row q=0; the Kronecker bundle [T2→Tα] in E20,1; and a class in E21,1=H1(Tα;Ω1)/dH1(Tα;R) that represents the fundamental class of T2.
Proof.Tα≃R//Λα in H by Corollary 1.5, so Map(Tα,BqΩp) is the space of homotopy fixed points of Λα on Map(R,BqΩp)≃Bq(Ωp(R)), whose π0 is Hq(Λα;Ωp(R)). Write Λα=Z⋅1⊕Z⋅α. By Lemma 1.6 the generator 1 has H1(Z;Ωp(R))=0 and H0(Z;Ωp(R))=Ωp(S1), so the Lyndon–Hochschild–Serre spectral sequence gives Hq(Λα;Ωp(R))=Hq(Z;Ωp(S1))for the rotation ρα, which is the invariants for q=0, the coinvariants Ωp(S1)/(ρα∗−1) for q=1, and zero for q≥2. The differential d1 is induced by d, so E2∙,q is the cohomology of the complex Hq(Z;Ω∙(S1)). For q=0 this is the complex of rotation-invariant forms R0Rdx. For q=1 it is the complex of coinvariants C∞(S1)/(ρα∗−1)dΩ1(S1)/(ρα∗−1). Its cokernel is Ω1(S1)/(dC∞(S1)+im(ρα∗−1))=HdR1(S1)=R, since a rotation acts trivially on cohomology. Its kernel consists of the classes of g with g′=h∘ρα−h; writing h=c+k′ with k periodic gives g=k∘ρα−k+const, so the kernel is the line of constants. All differentials dr, r≥2, vanish for degree reasons except d2:E20,1→E22,0=0. ◻
The de Rham spectral sequence of the irrational torus. The bottom row is the de Rham cohomology HdR∙(Tα)=(R,R,0). The top row is the contribution of principal R-bundles. Together they are H∙(ΠTα;R)=H∙(T2;R)=(R,R2,R).
So the torus T2 has two circles’ worth of cohomology and all of it is present in the cohomology of ΠTα, but only the circle transverse to the foliation is represented by differential forms; the circle along the leaves is represented by the non-trivial R-bundle T2→Tα. The E2 page is independent of the arithmetic of α. The dependence is on E1, in the size of Fl(Tα), and is the subject of Theorem 1.7.
Curvature and integration bundles
The same method applies to the next classifying object. Let P⊊R be a proper subgroup and TP=R/P; as a subspace of R, P is discrete, since it contains no interval. The differential descends to a map of sheaves d:TP→Ωcl1.
Lemma 1.10. The sequence of sheaves 0→♭(R/P)→TPdΩ1dΩcl2→0 is exact on Cart.
Proof. Exactness on the right and in the middle is 1.7, together with the fact that R→TP is an epimorphism. A section of TP over a Cartesian U with zero differential lifts locally to a function with zero differential, that is, to a constant; so it is a constant map U→R/P, and conversely. ◻
Define B(TP)conn∈H as the stack associated to the two-term complex TPdΩ1: over a Cartesian space its objects are 1-forms A, and its morphisms A→A′ are sections g of TP with A′=A+dg. It is the analogue for TP of the moduli stack of principal bundles with a connection 1-form (compare [IZ, art. 8.37]); for P=Z it is the usual BU(1)conn. The curvature is the map F:B(TP)conn→Ωcl2, A↦dA.
Theorem 1.11 (Integration bundles; after [IZ, art. 8.42]). There is a fibre sequence in HB(TP)connFΩcl2c♭B2(R/P). Consequently a closed 2-form ω on a diffeological space X is the curvature of a principal TP-bundle with connection if and only if the class c(ω)∈H2(ΠX;R/P) vanishes; this class is the reduction modulo P of the image of ω in H2(ΠX;R). If X is simply connected, c(ω)=0 if and only if the periods of ω over π2(X) lie in P, and then the bundle with connection is unique up to isomorphism.
Proof. By 1.10 the three-term complex TP→Ω1→Ωcl2 is a resolution of ♭(R/P) placed in degree 2, so it presents ♭B2(R/P). The inclusion of Ωcl2 as its last term is c, and the homotopy fibre of c is presented by the truncation TP→Ω1, with the map to Ωcl2 given by d. This is the fibre sequence. A map ω:X→Ωcl2 lifts through the fibre iff c∘ω is null-homotopic, and π0Map(X,♭B2(R/P))=H2(ΠX;R/P) by (2). The comparison of resolutions Ω∙→(TP→Ω1→Ωcl2) covers R→R/P, which identifies c(ω). If ΠX is simply connected, the Hurewicz and universal coefficient theorems give H2(ΠX;A)=Hom(π2(ΠX),A) for every abelian group A, and π2(ΠX)=π2(X) by Theorem 1.2. Lifts are a torsor under H1(ΠX;R/P)=Hom(π1(X),R/P)=0. ◻
Remark 1.12 (Prequantisation without integrality). Classically one needs the periods of ω to be integral to build a circle bundle with curvature ω. By 1.11 the integrality condition is an artefact of fixing the structure group R/Z: for any closed 2-form on a simply connected space whose group of periods Pω is not all of R, there is a canonical principal bundle with connection and curvature ω, with structure group the torus of periods TPω, which is an irrational torus as soon as Pω has rank at least 2. This is the theorem of Iglesias-Zemmour [IZ, art. 8.42], and a good example of a statement that is natural in Diff and has no formulation in Mfd.
Solved exercises
Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.
1 Show that Ω0(X)=C∞(X,R), and that Ωk(X)=0 for k≥1 if X is discrete.
Solution.Ω0=R is representable, so HomSmoothSet(X,R)=Diff(X,R) by Theorem 1.2. If X is discrete, every plot P:U→X is locally constant, so locally P=x∘c with c:V→∗ and x:∗→X. Then α(P)∣V=c∗α(x) and α(x)∈Ωk(∗)=0. ◀
2 Compute the de Rham homomorphism HdR1(Tα)→H1(ΠTα;R)=Hom(Λα,R) and its cokernel.
Solution.HdR1(Tα)=R[θ] with qα∗θ=dx. The period of θ on the loop t↦qα(tμ), μ∈Λα, is ∫01μdt=μ. So [θ] maps to the inclusion Λα↪R, and c[θ] to μ↦cμ. In the basis of Hom(Λα,R)=R2 given by the values on 1 and α, the image is the line spanned by (1,α). The cokernel is one-dimensional, spanned for instance by the class of ρ(m+nα)=−n. By 1.8(ii) and 1.9 it is E20,1, and by [exo:kronecker-class] the class of ρ is that of the bundle T2→Tα. ◀
3 Show that a coarse diffeological space has no non-zero differential forms of positive degree.
Solution. Let X be coarse, α∈Ωk(X) with k≥1, P:U→X a plot (any function) and r0∈U; we show α(P)r0=0. Choose a diffeomorphism identifying a neighbourhood of r0 with Rn and r0 with 0; by locality we may assume U=Rn. Let F(r)=(r13,…,rn3), a smooth homeomorphism with non-smooth inverse G. Since X is coarse, P∘G is a plot, and P=(P∘G)∘F with F smooth, so α(P)=F∗α(P∘G). The derivative of F at 0 is zero, so the pullback of any form of positive degree by F vanishes at 0. Hence α(P) vanishes at every point, for every plot. ◀
3 For a homomorphism ρ:Λα→R let Xρ=(R×R)/Λα for the action λ⋅(u,t)=(u+λ,t+ρ(λ)), a principal R-bundle over Tα with projection [u,t]↦qα(u) and action s⋅[u,t]=[u,t+s][IZ, art. 8.30]. Show that for ρ(m+nα)=−n the bundle Xρ is isomorphic to the Kronecker bundle T2→Tα, [x,y]↦qα(y−αx), with R acting by the flow s⋅[x,y]=[x+s,y+αs].
Solution. Define Φ:R×R→T2 by Φ(u,t)=[t,u+αt]. It is smooth, it lies over qα because (u+αt)−αt=u, and it intertwines translation in t with the flow. For λ=m+nα we have ρ(λ)=−n and Φ(u+λ,t−n)=[t−n,u+m+nα+αt−αn]=[t−n,u+αt+m]=Φ(u,t), so Φ descends to a smooth equivariant map Φˉ:Xρ→T2 over Tα. It is bijective: if Φ(u,t)=Φ(u′,t′) then t′=t+k and u′+αt′=u+αt+l with k,l∈Z, so u′=u+λ with λ=l−kα and t′=t+ρ(λ); and [x,y]=Φ(y−αx,x). The inverse [x,y]↦[y−αx,x] is well defined by the same computation and smooth because R2→T2 is a subduction. Hence Xρ≅T2 as principal R-bundles: the Kronecker bundle is the flat bundle with holonomy m+nα↦−n, and it spans the cokernel found in [exo:dR-Talpha]. ◀
4 Let X be a connected diffeological space. Deduce from the short exact sequence of sheaves 0→♭R→RdΩcl1→0 an exact sequence 0→HdR1(X)→Hom(π1(X),R)∂H1(X;R)→H1(X;Ωcl1), and show that ∂(ρ) is the class of the bundle Xρ=X~×π1(X)R of [IZ, art. 8.30].
Solution. A short exact sequence of sheaves of abelian groups gives a fibre sequence Bq♭R→BqR→BqΩcl1 in H for each q, and these splice into a long fibre sequence. Applying π0Map(X,−) yields the exact sequence C∞(X)dΩcl1(X)→H1(X;♭R)→H1(X;R)→H1(X;Ωcl1). The cokernel of the first map is HdR1(X), which therefore injects into the next term. By (2), H1(X;♭R)=H1(ΠX;R), and for a connected space with fundamental group π1 this is Hom(π1,R); by Theorem 1.2, π1(ΠX)=π1(X). This gives the sequence.
For ∂: it is induced by B♭R=BRδ→BR, which sends a principal Rδ-bundle to the principal R-bundle obtained by extending the structure group along the smooth homomorphism Rδ→R. Under H1(ΠX;R)=Hom(π1,R) the homomorphism ρ corresponds to the Rδ-bundle X~×π1Rδ associated to the universal covering, a principal π1-bundle (Shape), via ρ. Extending the group gives X~×π1R=Xρ.
Exactness at H1(X;R) is now the statement that Xρ is trivial if and only if ρ is the period homomorphism of a closed 1-form. This is the theorem of [IZ, art. 8.30]. Exactness at the next term gives more: a principal R-bundle is of the form Xρ, i.e. flat, if and only if its image in H1(X;Ωcl1) vanishes. ◀
Bundles and stacks
In [1] principal bundles are defined by an induction condition on the action map. We show that this condition holds exactly when the diffeological quotient is the homotopy quotient. It follows that principal bundles are classified by maps to a stack BG, which is not a diffeological space, and that a group action has three quotients — stack, smooth set, diffeological space — which coincide precisely for principal actions.
Source in the book.[IZ, Chapter 7] (groups) and [IZ, art. 8.1–8.19] (groupoids, fibrations, principal and associated bundles).
Diffeological groups
A diffeological group is a group object of Diff: a group G with a diffeology for which multiplication and inversion are smooth [IZ, art. 7.1]. Lie groups are examples; so are Tα and R/Q; so is every subgroup of a diffeological group with the subspace diffeology and every quotient group with the quotient diffeology [IZ, art. 7.2–7.3]; so is Diff(X) for every diffeological space X, with the diffeology in which r↦fr is a plot when both (r,x)↦fr(x) and (r,x)↦fr−1(x) are smooth [IZ, art. 1.61]. None of these constructions has hypotheses: there is no closedness condition on subgroups and no properness condition on quotients.
A diffeological group is in particular a group object of H, and so has a deloopingBG=∗//G=[k]∈ΔopcolimGk∈H,ΩBG≃G.BG is a connected 1-truncated object, a stack. It has one point and that point has automorphism group G; it is not a smooth set unless G is trivial.
Principal actions are homotopy quotients
Definition 1.1 ([IZ, art. 8.11]). A smooth right action of a diffeological group G on a diffeological space X is principal if the action map a:X×G⟶X×X,(x,g)⟼(x,xg), is an induction. A principal G-bundle over B is a space X with a principal G-action and a diffeomorphism X/G≅B.
Injectivity of a means that the action is free. The induction condition is stronger: whenever two plots r↦xr, r↦xr′ of X lie pointwise in the same orbit, the unique family gr with xr′=xrgr is a plot of G. In [1] this is the hypothesis under which X→X/G is proved to be a fibre bundle. Here is what it means.
Theorem 1.2 (Principal = homotopy quotient; compare [44). ]For a smooth action of a diffeological group G on a diffeological space X, with diffeological quotient π:X→B=X/G, the following are equivalent.
The action is principal.
The canonical map X//G→B is an equivalence in H.
For every plot P:U→B, the pullback P∗X→U is locally isomorphic to U×G as a space with G-action.
Proof.(i)⇔(ii). The quotient map π is a subduction, hence an epimorphism of sheaves, hence an effective epimorphism of H, since effective epimorphisms are detected on π0 [42, 7.2.1.14]. So B is the colimit of the Čech nerve Cˇ(π)k=X×B⋯×BX, and these fibre products may be computed in Diff because the inclusions Diff↪SmoothSet↪H preserve limits. On the other hand X//G is by definition the colimit of the nerve of the action groupoid, Nk=X×Gk. There is a map of simplicial objects Nk=X×Gk⟶Cˇ(π)k,(x,g1,…,gk)⟼(x,xg1,xg1g2,…), inducing X//G→B on colimits (1.1). Both sides are groupoid objects, so the map is an isomorphism in every degree iff it is one in degree 1, where it is the action map a with target restricted to its image X×BX. The fibres of π are the orbits, so a is onto X×BX; since X×BX carries the subspace diffeology of X×X, the map X×G→X×BX is a diffeomorphism iff a is an induction. Thus (i) implies (ii). Conversely, if X//G≃B then, groupoid objects in an ∞-topos being effective [42, 6.1.0.6], X×G≃X×X//GX≃X×BX via a, which is (i).
(i)⇒(iii). Since π is a subduction, P lifts near any r0 to a plot s:V→X. The map V×G→P∗X∣V, (r,g)↦(r,s(r)g), is a smooth equivariant bijection. Its inverse sends (r,x) to (r,g) where a(s(r),g)=(s(r),x), and is smooth because a is an induction.
(iii)⇒(i). The action is free because each P∗X is locally V×G. Let r↦(xr,xr′) be a plot of X×X with values in the image of a, and let P=π∘x=π∘x′. Trivialise P∗X near r0; the two sections r↦(r,xr) and r↦(r,xr′) become r↦(r,hr) and r↦(r,hr′) with h,h′ plots of G, and gr=hr−1hr′ is a plot of G with xr′=xrgr. ◻
The nerve of the action groupoid (top) maps to the Čech nerve of the quotient map (bottom). The top row computes the homotopy quotient, the bottom row the diffeological quotient. They coincide exactly when a is an isomorphism onto X×BX, i.e. an induction.
Corollary 1.3 ([IZ, art. 8.15]). Let H be any subgroup of a diffeological group G. Then G→G/H is a principal H-bundle, G/H≃G//H, and there is a fibre sequence H→G→G/H→BH→BG in H.
Proof. If r↦(gr,gr′) is a plot of G×G with gr−1gr′∈H, then r↦gr−1gr′ is a plot of G with values in H, that is, a plot of H. So the action is principal. The fibre sequence is the general one for a homomorphism of group objects [46]. ◻
No hypothesis on H: it may be dense, as Λα⊂R, or non-closed and of positive dimension, as an irrational line in T2. This one corollary contains the fact that T2→Tα and R→Tα are both fibre bundles.
The classifying stack
For a diffeological space X let BunG(X) be the groupoid of principal G-bundles over X and G-equivariant smooth maps over X.
Lemma 1.4.
The pullback of a principal G-bundle along any smooth map is a principal G-bundle.
Every morphism of principal G-bundles over X is an isomorphism.
([IZ, art. 8.19]) Every principal G-bundle over a Cartesian space is trivial. Hence BunG(U)≃B(C∞(U,G)) for U∈Cart.
(i) and (ii) are [exo:Bun-cart]. (iii) is a real theorem, the diffeological form of the homotopy lifting property, and we quote it. Its meaning here is that the presheaf of groupoids U↦B(C∞(U,G)) on Cart is already a stack: there is nothing to sheafify.
Theorem 1.5 (Classification; Minichiello [44). , after [54, 38]]For every diffeological group G and every diffeological space X there is an equivalence of groupoids, natural in X, BunG(X)≃MapH(X,BG), under which a bundle E→X corresponds to a map cE with E≃X×BG∗. In particular isomorphism classes of principal G-bundles are in bijection with H1(X;G):=π0MapH(X,BG).
Sketch.Cartesian U.BG is the stackification of U↦B(C∞(U,G)), which by 1.4(iii) is equivalent to the stack U↦BunG(U); so BG(U)≃BunG(U). General X. Every sheaf is the colimit of the representables over it, so X≃colim(U→X)U in H, the colimit being over the category of plots, and Map(X,BG)≃lim(U→X)BunG(U). An object of the limit is a principal bundle EP→U for every plot P, with coherent isomorphisms F∗EP≅EP∘F. Pulling back a bundle on X along its plots gives such a family. Conversely a family glues: let E be the disjoint union over x∈X of the fibres Ex over the point-plots, with the diffeology generated by the maps EP→E; then E→X is a principal bundle by criterion (iii) of 1.2, and P∗E≅EP. The two constructions are inverse equivalences. For the last statement, the pullback of ∗→BG along cE is a principal bundle with quotient X, as in any ∞-topos [46]. ◻
Remark 1.6 (There is no classifying space). Christensen and Wu construct a diffeological space BG that classifies the bundles that have a smooth partition of unity subordinate to a trivialising D-open cover, and observe that no diffeological space classifies all diffeological principal bundles [13]. The Kronecker bundle exhibits the obstruction. Homotopy classes of maps into a space classify bundles at best up to concordance, and every principal R-bundle over Tα is concordant to the trivial one: if τ is a cocycle for it in the sense of 1.7 below, then (x,s)↦sτ(λ)(x) is a cocycle for a bundle over Tα×R that restricts to the trivial bundle at s=0 and to the given one at s=1. Over a manifold, concordant bundles are isomorphic. Over Tα they are not: T2→Tα is concordant to the trivial bundle and not isomorphic to it. For the stack BR the distinction does not arise, because Map(X,BR) is the groupoid of bundles and isomorphisms, not a set of homotopy classes. BR has contractible shape, ΠBR≃B(ΠR)≃∗, and yet Map(Tα,BR) has the large set of components Fl(Tα) computed in Theorem 1.7. The classifying object of the book’s bundle theory exists, and is not a diffeological space.
Corollary 1.7 (Bundles over quotients of Rn). Let Γ⊂Rn be a countable subgroup and G a diffeological group. Then BunG(Rn/Γ)≃(BC∞(Rn,G))hΓ, the homotopy fixed points for the translation action. Its set of components is the non-abelian cohomology set H1(Γ;C∞(Rn,G)) of crossed homomorphisms τ:Γ→C∞(Rn,G), τ(γ+γ′)=(τ(γ)∘Tγ′)⋅τ(γ′), modulo τ∼(σ∘Tγ)⋅τ(γ)⋅σ−1.
Proof.Rn/Γ≃Rn//Γ by Corollary 1.5, and mapping out of a homotopy quotient gives homotopy fixed points: Map(Rn/Γ,BG)≃Map(Rn,BG)hΓ,Map(Rn,BG)≃BC∞(Rn,G), the second equivalence by 1.4(iii). ◻
For G=R and n=1 this is the cocycle description of [IZ, art. 8.39], obtained there by hand.
The three quotients
Theorem 1.8 (Trichotomy of quotients; compare [56). ]Let a diffeological group G act smoothly on a diffeological space X. In H there are canonical maps X//Guπ0(X//G)vconcπ0(X//G), and:
π0(X//G) is the quotient of X by G in SmoothSet, and concπ0(X//G) is the diffeological quotient X/G;
u is an equivalence if and only if the action is free;
if the action is free, v is an isomorphism if and only if the action is principal;
Π(X//G)≃ΠX//ΠG in all cases.
In particular X//G≃X/G if and only if the action is principal.
Proof. (i) π0 and conc are left adjoints (Theorem 1.5), so they carry the colimit X//G to the corresponding colimits in SmoothSet and Diff, which are the coequalisers of the action. (iv) Π preserves colimits and finite products. (ii) Let q:X→X//G be the canonical effective epimorphism, with X×X//GX≃X×G. The object X//G is 0-truncated iff its diagonal is a monomorphism, and this may be tested after pulling back along the effective epimorphism q×q, where it becomes the action map a:X×G→X×X. A map of concrete sheaves is a monomorphism iff it is injective on points. So X//G is 0-truncated iff a is injective iff the action is free. (iii) Assume the action free and write S=π0(X//G)=X//G. Both X→S and X→X/G are epimorphisms of sheaves, and an epimorphism in a topos is determined by its kernel pair. The kernel pair of X→S is X×G, embedded by a; that of X→X/G is X×X/GX, the image of a with the subspace diffeology. They coincide as subobjects of X×X iff a is an induction. ◻
The three quotients on examples. Reading down the columns: the homotopy quotient retains all the data; in the sheaf quotient the stabilisers are discarded; in the diffeological quotient families that coincide pointwise are moreover identified, whether or not they coincide in germs.
Theorem 1.8 is the precise form of the exactness ladder of [fig:ladder], and it is the one structural statement used in every application chapter. It also accounts for a pattern in [1]: the theorems there with strong conclusions — exact homotopy sequences, classification of bundles over tori, the group of flows — are about principal actions, where the diffeological quotient is the homotopy quotient and nothing is lost; the examples there with unexpected properties — Δn, orbifolds — are about non-free actions, where the diffeological space is the coarse space of a stack. Watts and Wolbert study the coarse space systematically as a “coarse moduli space” functor from stacks to diffeological spaces [56].
Groupoids and the book’s fibrations
In [1] a smooth surjection π:T→B is a fibration when its structure groupoid is fibrating[IZ, art. 8.4–8.8]. The structure groupoid K has objects B and as morphisms b→b′ the diffeomorphisms Tb→Tb′, with a functional diffeology; a diffeological groupoid is fibrating when (src,trg):Mor(K)→Ob(K)2 is a subduction.
Proposition 1.9 (Fibrating groupoids are deloopings). Let K be a fibrating diffeological groupoid with non-empty space of objects, b an object, and Kb its isotropy group. Then the inclusion BKb→∣K∣ of the one-object full subgroupoid into the stack presented by K is an equivalence in H. Consequently the canonical map Ob(K)→∣K∣≃BKb classifies a principal Kb-bundle over Ob(K), namely trg:src−1(b)→Ob(K).
The proof is [exo:fibrating]. Applied to the structure groupoid of π:T→B it gives: π is a diffeological fibre bundle with fibre F if and only if it is classified by a map B→BDiff(F), the principal Diff(F)-bundle being the bundle of “frames” F≅Tb[IZ, art. 8.14], and T being recovered as the associated bundle [IZ, art. 8.16]. The two-step definition of [1] — build a groupoid, require that it be fibrating — is the unpacking, in terms of plots, of “a map to a delooping”.
Solved exercises
Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.
2 Verify directly that the Kronecker action s⋅[x,y]=[x+s,y+αs] of R on T2 is principal when α is irrational, and that it is not principal when α is rational.
Solution. Let r↦(zr,zr′) be a plot of T2×T2 with zr′ in the orbit of zr. Near r0 lift to smooth (x,y),(x′,y′):V→R2. For each r there are s∈R and (m,n)∈Z2 with x′−x=s+m and y′−y=αs+n. Then w=(y′−y)−α(x′−x)=n−αm is a smooth function with values in Λα, hence locally constant; as α is irrational, w determines (m,n), which are therefore locally constant. So sr=xr′−xr−m is smooth, and it is the unique real number with zr′=sr⋅zr because the action is free. Hence the action map is an induction. If α=p/q is rational, s=q acts trivially, so the action is not free. ◀
2 For {±1} acting on R, compute the shapes of R//{±1} and of Δ1, and explain the difference in terms of fibres.
Solution. By 1.8(iv), Π(R//{±1})=∗//(Z/2)=BZ/2≃RP∞. By [exo:contractible], ΠΔ1=∗. The map R//{±1}→Δ1 is an isomorphism over the open half-line and has fibre BZ/2 over the point [0]; collapsing that one fibre changes the homotopy type from RP∞ to a point. The stack retains the stabiliser of 0, and in consequence its shape differs from that of the half-line. ◀
3 Prove 1.4(i) and (ii), and show that the automorphism group of the trivial bundle X×G→X is C∞(X,G).
Solution. (i) Let E→X be principal and f:X′→X smooth; f∗E=X′×XE carries the G-action on the second factor. Let r↦((xr′,er),(xr′,ergr)) be a plot of f∗E×f∗E in the image of the action map. Then r↦(er,ergr) is a plot of E×E in the image of the action map of E, so r↦gr is a plot of G. The quotient f∗E/G→X′ is a bijection, and it is a diffeomorphism because f∗E→X′ is a subduction (pullback of a subduction).
(ii) Let ϕ:E→E′ be equivariant over X. It is bijective, being a bijection on each fibre (a G-torsor). To see that ϕ−1 is smooth, let r↦er′ be a plot of E′; near r0 lift its projection to a plot r↦er of E. Then ϕ(er) and er′ lie in the same fibre, so er′=ϕ(er)gr with g a plot of G by principality of E′, and ϕ−1(er′)=ergr is a plot.
For the trivial bundle, an equivariant map over X has the form (x,g)↦(x,σ(x)g), with σ(x) the G-component of the image of (x,1); σ is smooth iff the map is. ◀
3 Classify the principal Z-bundles over Tα and describe their total spaces.
Solution. By 1.7, classes are H1(Λα;C∞(R,Z))=H1(Λα;Z)=Hom(Λα,Z)≅Z2, since a smooth map R→Z is constant and Λα acts trivially on constants. For ρ∈Hom(Λα,Z) the bundle is Eρ=(R×Z)/Λα with λ⋅(x,k)=(x+λ,k+ρ(λ)). If ρ=0 then Eρ=Tα×Z. If ρ=0, its image is dZ for some d≥1 and its kernel is infinite cyclic, generated by some μ∈Λα. The components of Eρ are indexed by Z/d, and each is R/kerρ=R/μZ, a circle of length ∣μ∣. So the connected coverings of Tα with group Z are the circles R/μZ, μ∈Λα primitive, on which the remaining generator of Λα acts by an irrational rotation with quotient Tα. The irrational torus is a circle modulo an irrational rotation in a GL2(Z)-worth of ways. ◀
Solution. Write O=Ob(K), M=Mor(K), E=src−1(b)⊆M with the subspace diffeology, and G=Kb acting on E by f⋅g=f∘g.
Step 1: trg:E→O is a subduction.E is the pullback of χ=(src,trg):M→O×O along O→O×O, x↦(b,x). Since K is fibrating, χ is a subduction, and subductions are stable under pullback (Proposition 1.7).
Step 2: the action of G on E is principal with quotient O. Two arrows f,f′∈E have the same target iff f′=f∘g with g=f−1∘f′∈G, so the fibres of trg∣E are the G-orbits and the action is free. If r↦(fr,fr′) is a plot of E×E with equal targets, then gr=fr−1∘fr′ is a plot of M, because inversion and composition are smooth in a diffeological groupoid, with values in G; so it is a plot of G. Thus the action map is an induction, and O≅E/G by Step 1 and uniqueness of quotients. By 1.2, O≃E//G in H.
Step 3: the equivalence.∣K∣ is the colimit of the nerve of K; the canonical map p:O→∣K∣ is an effective epimorphism with O×∣K∣O≃M. Consider the composite ∗bOp∣K∣. Its pullback along p is ∗×∣K∣O≃src−1(b)=E, mapping to O by trg, which is an effective epimorphism by Step 1. Effective epimorphisms descend along the effective epimorphism p, so ∗→∣K∣ is an effective epimorphism. Its Čech nerve has ∗×∣K∣∗≃src−1(b)∩trg−1(b)=G in degree 1, so it is the nerve of G, and ∣K∣≃colimGk=BG.
Step 4: the classified bundle. The principal bundle classified by p:O→∣K∣≃BG is the pullback of ∗→BG along p, which by Step 3 is E→O. ◀
Models
Manifolds, manifolds with boundary and corners, orbifolds and quasifolds are all “diffeological spaces locally diffeomorphic to a model”. We review what the diffeology determines in each case, where it is the coarse space of a stack, and how much of it is determined by real-valued functions.
Source in the book.[IZ, Chapter 4], and [IZ, art. 1.78, 2.22] for dimension.
Modelling
A local diffeomorphism between diffeological spaces is a map that is, near each point of its source, a diffeomorphism from a D-open subset onto a D-open subset [IZ, art. 2.5]. Given a class M of diffeological spaces, a space is modelled on M if every point has a D-open neighbourhood diffeomorphic to a D-open subset of a member of M[IZ, art. 4.19].
Classical and less classical geometries as modelled diffeological spaces. Half-spaces and corners carry the subspace diffeology of Rn; the quotients carry the quotient diffeology.
Five local models. The first three are subspaces of R2, the last two are quotients. Only the first is a manifold; all five are diffeological spaces, and each is determined up to diffeomorphism by its plots.
Manifolds, boundaries, corners
A diffeological space is a manifold of dimension n exactly when it is modelled on Rn, and smooth maps between manifolds are the usual ones ([exo:manifold-atlas]). For manifolds with boundary there is something to prove, because the model Hn is a subspace and its diffeology is defined by plots into it, while the classical notion of a smooth function on it is “restriction of a smooth function on Rn”.
Theorem 1.1 ([IZ, art. 4.13, 4.16]). A map f:Hn→R is smooth for the subspace diffeology if and only if it is the restriction of a smooth function on an open neighbourhood of Hn in Rn. Consequently manifolds with boundary, with their classical smooth maps, form a full subcategory of Diff.
The essential case is n=1 and is [exo:halfline-functions]; it rests on Whitney’s theorem that a smooth even function of t is a smooth function of t2 [57]. The same holds for corners [22]. In the language of Two images: the classical definition of a manifold with boundary is in terms of its functions, the diffeological one in terms of its plots, and by Whitney’s theorem, for half-spaces the two descriptions determine each other; see 1.4.
Orbifolds and quasifolds
A diffeological orbifold is a space modelled on quotients Rn/Γ by finite linear groups [30]. A priori the model is only the orbit space. In fact it determines the group.
Theorem 1.2 (Iglesias-Zemmour–Karshon–Zadka [30). ; [IZ, art. 4.18]]Let Γ,Γ′⊂GLn(R) be finite subgroups. Every local diffeomorphism from Rn/Γ to Rn/Γ′ sending [0] to [0] lifts to an equivariant local diffeomorphism of Rn at 0; in particular Γ and Γ′ are conjugate in GLn(R). Hence the structure group of an orbifold at a point is a diffeological invariant.
Corollary 1.3. Let Γ⊂GLn(R) be a finite subgroup. The point [0]∈Rn/Γ has a neighbourhood diffeomorphic to an open subset of Rn if and only if Γ is trivial.
Note the contrast with topology and with algebraic geometry: R/{±1} is homeomorphic to a half-line, and C/{±1} is isomorphic to C as a variety, but neither quotient is a diffeological manifold near the fixed point ([exo:delta1-singular]).
In the trichotomy of Theorem 1.8, with X=Rn and G=Γ, an orbifold chart has three incarnations: the stack Rn//Γ of the Lie-groupoid literature, the sheaf quotient, and the diffeological space Rn/Γ. By 1.2, for finite linear groups the last determines the first up to equivalence, locally. The determination is not functorial: the map from morphisms of stacks to smooth maps of quotients is neither injective nor, on 2-cells, defined; see [56]. A diffeological orbifold is a stack that is recoverable from its coarse space, in the way a reduced variety is recoverable from its points.
Quasifolds relax “finite” to “countable” [34]. The irrational torus is the basic example, and Theorem 1.1 is the corresponding rigidity statement: the diffeology of Rn/Γ determines Γ up to GLn(R).
Functions versus plots
A diffeology is a “maps in” structure. The older notions of Sikorski and Frölicher are “maps out” structures, given by a ring of real-valued functions. Each determines a candidate for the other: from plots one gets the functions that are smooth along all plots; from functions one gets the parametrisations along which all functions are smooth. A diffeological space is reflexive if it is recovered from its functions in this way. Manifolds, half-spaces and corners are reflexive. The irrational torus is as far from reflexive as possible, since its only smooth functions are constants; and Δ1=R/{±1} is not reflexive either, since it has the same smooth functions as the half-line H and strictly fewer plots (Proposition 1.11). This is developed as a Galois connection in Theorem 1.4 of Artificial intelligence: planning, observation, semantics, and Theorem 1.5 is the equivalence of reflexive diffeological spaces with Frölicher spaces [4]. The point for now is the slogan of [1]: function-based smooth structures miss the singular quotients, and the reason is that a quotient is a colimit, and maps out of a colimit are easy while maps in are the content.
Infinite dimensions and dimension
On the other side of Mfd, the functional diffeology is compatible with the classical infinite-dimensional theories where these exist. Banach manifolds embed fully faithfully in Diff[IZ, Exercise 72]; so do Fréchet manifolds [41]; and for a compact manifold M the functional diffeology on C∞(M,N) is the diffeology of its Fréchet manifold structure [39, 54]. In contrast with those theories, in Diff no topology on a function space is required to define a smooth curve in it: Theorem 1.9 is the definition.
Finally, a diffeological space has a dimension at each point: the smallest d such that the germ of the diffeology at the point is generated by plots with domains of dimension at most d[IZ, art. 1.78, 2.22]. It is a local invariant, equal to n for an n-manifold, and [IZ, Exercises 50–51] compute dim[0](Rn/O(n))=n,dim0([0,∞)sub)=∞. So the spaces Δn, all homeomorphic to a half-line and all with the same ring of smooth functions, are pairwise non-diffeomorphic, and none is diffeomorphic to the half-line H. We will use this in Chapters Machine learning: differentiable programs and singular hypothesis spaces and System design: state spaces, quotients, clocks as a supply of systems with identical observable behaviour and inequivalent state spaces.
Solved exercises
Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.
1 Show that x↦x is a D-continuous function on H=[0,∞)sub that is not smooth.
Solution. It is continuous for the usual topology of H, and plots of H are continuous, so it is D-continuous. The parametrisation t↦t2 is a plot of H, and its composite with the square root is t↦∣t∣, not smooth at 0. ◀
2 Prove the case n=1 of 1.1: f:H→R is smooth iff f=g∣H for some g∈C∞(R). Deduce that C∞(Δ1)≅C∞(H).
Solution. If g is smooth on R and P is a plot of H, then P is smooth into R and g∘P is smooth. Conversely let f be smooth on H. The plot t↦t2 gives a smooth even function e(t)=f(t2), so by Whitney’s theorem e(t)=g(t2) with g∈C∞(R), and then f(x)=g(x) for all x≥0. For the second claim: a smooth function on Δ1 is the same as a smooth even function on R (quotient), hence of the form g(x2), hence g∣H∘sq; so sq∗:C∞(H)→C∞(Δ1) is a bijection. The two spaces have the same functions and, by Proposition 1.11, different plots. ◀
3 Show that [0]∈Δ1=R/{±1} has no D-open neighbourhood diffeomorphic to an open interval. Deduce that every diffeomorphism of Δ1 fixes [0].
Solution. Suppose ψ:J→W is a diffeomorphism from an open interval onto a D-open neighbourhood W of [0], and let ψ(t0)=[0]. As a plot of Δ1, ψ lifts near t0 to a smooth f:J′→R with π∘f=ψ and f(t0)=0. Since ψ is injective, so is f; a continuous injective function on an interval is strictly monotone, so f(J′) is an open interval containing 0, and therefore contains both x and −x for small x=0. But π(x)=π(−x), contradicting injectivity of ψ=π∘f. Every other point [a], a>0, does have such a neighbourhood, namely π((a/2,2a)), on which π restricts to a diffeomorphism. A diffeomorphism of Δ1 preserves the set of points with a neighbourhood diffeomorphic to an interval, so it fixes the unique point without one. ◀
3 Let {±1} act on R2=C and let σ:C→R3, σ(z)=(∣z∣2,Rez2,Imz2), with image the half-cone S={(u,v,w):u=v2+w2}. Show that the induced bijection σˉ:C/{±1}→Ssub is smooth but not a diffeomorphism.
Solution.σ is smooth, invariant, and separates orbits because z2 determines ±z; so σˉ is a smooth bijection onto S. Consider P(r,s)=(∣z∣e−1/∣z∣2,Re(ze−1/∣z∣2),Im(ze−1/∣z∣2)),z=r+is,P(0)=0. The function e−1/∣z∣2 is smooth and flat at 0, and the product of a flat function with ∣z∣ is smooth; so P is a smooth map into R3, with values in S: a plot of Ssub. If σˉ−1∘P were a plot of the quotient, there would be a disc V∋0 and a smooth ζ:V→C with ζ2=ze−1/∣z∣2 on V. On a small circle around 0 the right-hand side has winding number 1 about the origin, while ζ2 has even winding number. So no continuous ζ exists even on V∖{0}. Thus Ssub has a plot that the orbifold C/{±1} lacks: the image of the invariant-theoretic embedding has strictly more plots than the orbit space. ◀
4 Let X be a diffeological space modelled on Rn. Prove that the local diffeomorphisms from open subsets of Rn to X form a smooth atlas in the classical sense, that the diffeology of X is the diffeology of smooth parametrisations for this atlas, and that a map between two such spaces is smooth iff it is smooth in charts.
Solution. Call a chart a diffeomorphism ϕ:U→ϕ(U) from a domain U⊆Rn onto a D-open subset of X with the subspace diffeology. By hypothesis the images of charts cover X.
Transition maps. Let ϕ,ψ be charts and W=ϕ(U)∩ψ(V), which is D-open. Then ϕ−1(W) and ψ−1(W) are open, because charts are plots and plots are D-continuous, and ψ−1∘ϕ:ϕ−1(W)→ψ−1(W) is a composite of smooth maps of diffeological spaces, with inverse ϕ−1∘ψ. A smooth map between domains in the diffeological sense is an ordinary smooth map (Remark 1.2). So the transition maps are classical diffeomorphisms between open subsets of Rn; the charts are homeomorphisms onto their images for the D-topology by the same argument; and we have a classical atlas on the topological space D(X).
The diffeology. Let P:O→X be a parametrisation. If P is a plot and r0∈O, choose a chart ϕ around P(r0); P−1(ϕ(U)) is an open neighbourhood of r0 on which ϕ−1∘P is a plot of U, i.e. smooth. So P is smooth in charts. Conversely if P is continuous and smooth in charts, then locally P=ϕ∘(ϕ−1∘P) is a plot composed with a smooth map, hence a plot, and P is a plot by [D2].
Maps. Let f:X→Y be a map between two such spaces. If f is smooth then it is D-continuous and, for charts ϕ of X and ψ of Y, ψ−1∘f∘ϕ is a smooth map of diffeological spaces between domains wherever defined, hence classically smooth. Conversely if f is continuous and smooth in charts, then for a plot P of X the parametrisation f∘P is continuous and smooth in charts of Y, hence a plot by the previous paragraph.
Classical manifolds also require the topology to be Hausdorff and paracompact; these are conditions on D(X) that are optional in the diffeological definition. ◀
Applications
Number theory: the arithmetic of irrational tori
The diffeological space Tα=R/(Z+αZ) is a point for topology and for smooth functions. We show that its plots nevertheless read off three layers of the arithmetic of α: its orbit under GL2(Z), that is, the tail of its continued fraction; the unit group of the quadratic order it generates, if any; and its Diophantine type. Each layer is a theorem about a different functor on H — Hom, Diff, and Map(−,BR) — applied to the same object.
Source in the book.[IZ, Exercises 4, 5, 105, 119, 134] and [IZ, art. 8.38–8.39]. The classification is due to Donato and Iglesias [16], the number-field generalisation to Iglesias and Lachaud [31], and the theory of flows over Tα to Iglesias-Zemmour [28, 29, 33].
Rigidity
Throughout, a quasi-torus is a quotient TΓ=Rn/Γ of Rn by a countable subgroup, with the quotient diffeology. By Corollary 1.5 the projection q:Rn→TΓ is the universal covering, a principal bundle for the discrete group Γ.
Theorem 1.1 (Linear rigidity of quasi-tori; after [16, 31). ]Let Γ⊂Rn and Γ′⊂Rm be countable subgroups, and assume that Γ spans Rn. Let f:TΓ→TΓ′ be smooth.
There are a smooth F:Rn→Rm with q′∘F=f∘q, unique up to a constant in Γ′, and a unique linear map A:Rn→Rm, such that F(x+γ)=F(x)+Aγ(x∈Rn,γ∈Γ). In particular AΓ⊆Γ′, and F−A is bounded.
If Γ is dense in Rn then F is affine: F(x)=Ax+c.
If Γ′ spans Rm and f is a diffeomorphism, then n=m, A∈GLn(R) and AΓ=Γ′.
Consequently two quasi-tori with spanning groups are diffeomorphic if and only if the groups are linearly equivalent: Rn/Γ≅Rn/Γ′⟺Γ′=AΓ for some A∈GLn(R).
Proof. (a) Lifting. The composite f∘q is a plot of TΓ′ with simply connected domain, so it lifts through q′ to a smooth F, unique up to a constant of Γ′; this is the argument of [exo:higher-TGamma]. The homomorphism. For γ∈Γ, the map x↦F(x+γ)−F(x) is continuous with values in the countable set Γ′, because both terms lift f∘q. So it is a constant ϕ(γ), and ϕ:Γ→Γ′ is a homomorphism. Linearity. Choose γ1,…,γn∈Γ forming a basis of Rn and let A be the linear map with Aγi=ϕ(γi). The function G=F−A is invariant under the lattice L=⨁Zγi, hence bounded. For γ∈Γ and k∈Z, G(x+kγ)−G(x)=k(ϕ(γ)−Aγ), and the left side is bounded in k; so ϕ(γ)=Aγ. Uniqueness of A is clear since Γ spans.
(b) G=F−A is continuous and invariant under the dense subgroup Γ, hence constant.
(c) Apply (a) to f−1 to get F′ and A′. Then F′∘F lifts the identity of TΓ, so F′(F(x))=x+γ0, and comparing the effect of translating x by γ∈Γ gives A′Aγ=γ. As Γ spans, A′A=id; symmetrically AA′=id. So n=m, and AΓ⊆Γ′, A′Γ′⊆Γ give AΓ=Γ′. Conversely a linear isomorphism with AΓ=Γ′ descends to a diffeomorphism, with inverse induced by A−1. ◻
For Γ a lattice the theorem recovers the familiar fact that all n-tori are diffeomorphic, all lattices in Rn being linearly equivalent. Its force is in rank greater than n, where the quotient determines the position of Γ in Rn exactly up to GLn(R). In rank 2 and dimension 1:
C∞(Tα,Tβ)≅{λ∈R:λΛα⊆Λβ}×Tβ, a smooth map being [x]↦[λx+c].
Tα≅Tβ if and only if α=cβ+daβ+b for some (acbd)∈GL2(Z).
(Serret; [24, Thm. 175]) Equivalently: the continued fraction expansions of α and β eventually coincide, up to a shift.
Proof. (i) is 1.1(a),(b) with n=m=1. (ii) By (c), Tα≅Tβ iff λΛα=Λβ for some λ=0, iff (λ,λα) is a Z-basis of Z+βZ, iff λ=cβ+d and λα=aβ+b with ad−bc=±1. ◻
Continued fractions as diffeological invariants. Tori whose expansions have a common tail are diffeomorphic (1.2). The last two rows are the two classes with real multiplication by Z[10], an order of class number 2 ([exo:sqrt10]).
Endomorphisms, units, and real multiplication
For irrational α put Oα={λ∈R:λΛα⊆Λα}, a subring of R. By 1.2(i) it is the ring of smooth endomorphisms of the group Tα, and also the monoid of smooth self-maps fixing 0: on an irrational torus every smooth map is a homomorphism up to translation.
Theorem 1.3 (Endomorphisms and diffeomorphisms; after [16). ]
If α is not a quadratic irrational, Oα=Z.
If Aα2+Bα+C=0 with A,B,C coprime integers and D=B2−4AC, then Oα=Z+ZAα is the order of discriminant D in the real quadratic field Q(D).
Diff(Tα)≅Tα⋊Oα× as diffeological groups, with Oα× discrete. Hence the identity component of Diff(Tα) is the group of translations and π0Diff(Tα)≅Oα×≅{{±1}{±1}×Zα not quadratic,α quadratic.
Proof. Let λ∈Oα. Then λ=λ⋅1∈Λα, say λ=x+yα with x,y∈Z, and λα=xα+yα2∈Λα iff yα2∈Z+Zα.
(i) If y=0 this makes α quadratic. So y=0 and λ∈Z.
(ii) Here yα2=−y(Bα+C)/A, and since 1,α are linearly independent over Q this lies in Z+Zα iff A∣yB and A∣yC, iff A∣ygcd(B,C), iff A∣y because gcd(A,B,C)=1. So Oα=Z+ZAα. The number Aα is a root of t2+Bt+AC, an algebraic integer of discriminant D, so Z[Aα] is the order of discriminant D.
(iii) By 1.2(i) every smooth self-map is [x]↦[λx+c] with λ∈Oα, and it is invertible iff λ∈Oα×. This gives the group isomorphism. For the diffeology, let r↦fr be a plot of Diff(Tα) on a ball V. Then (r,x)↦fr(qα(x)) is a plot of Tα on the simply connected V×R; it lifts to a smooth F(r,x)=λ(r)x+c(r), and λ=∂xF is continuous with values in a countable set, hence constant, while c is smooth. Conversely such families are plots. So Diff(Tα)≅Tα×Oα× as diffeological spaces with the second factor discrete, and Tα is connected. Finally the unit group of an order in a real quadratic field is {±εk} for a fundamental unit ε>1, by Dirichlet’s unit theorem; equivalently by the solvability of Pell’s equation. ◻
A torus Tα with α quadratic is said to have real multiplication by Oα, by analogy with complex multiplication of elliptic curves C/Λ; the analogy is Manin’s [43], and is developed in Cryptography: real multiplication, class groups, lattices. Geometrically: a quadratic irrational torus has a hyperbolic symmetry — multiplication by ε — not isotopic to ±id, and a non-quadratic one has none.
Example 1.4.
α=φ=(1+5)/2: O=Z[φ], ε=φ. On π1(Tφ)=Z⊕Zφ multiplication by φ is the matrix , and φk acts by Fibonacci numbers ([exo:golden]).
α=2: O=Z[2], ε=1+2.
α=79: O=Z[79], ε=80+979≈160. The smallest non-trivial symmetry of T79 stretches by a factor of 160.
α=32 or α=π: π0Diff(Tα)={±1}.
Proposition 1.5 (Number fields, after [31). ]Let K⊂R be a number field of degree d≥2 with r1 real and r2 pairs of complex embeddings, and let O⊂K be an order. Then TO=R/O is a one-dimensional diffeological group with ΠTO≃BZd,End(TO)≅O,π0Diff(TO)≅O×≅{±1}×Zr1+r2−1.
Proof.O is free of rank d≥2, hence dense in R, and countable. The shape is Corollary 1.5. By 1.1(b) smooth self-maps are [x]↦[λx+c] with λO⊆O; since 1∈O this means λ∈O. The argument of 1.3(iii) gives π0Diff=O×, and Dirichlet’s theorem gives its structure, the only roots of unity in a real field being ±1. ◻
So the unit rank of a number field with a real place is the rank of the mapping class group of a one-dimensional diffeological space, and the degree of the field is the rank of its fundamental group. Neither is determined by the D-topology or by the smooth real functions of R/O.
Diophantine type and principal R-bundles
We now compute the first obstruction group of Theorem 1.8, the group Fl(Tα)=H1(Tα;R) of isomorphism classes of principal R-bundles. Write ∥t∥ for the distance from t∈R to the nearest integer. An irrational α is Diophantine if there are c>0 and τ≥1 with ∥nα∥≥c∣n∣−τ for all n=0, and Liouville otherwise. Almost every real number is Diophantine, and so is every algebraic irrational, by Liouville’s theorem.
Lemma 1.6 (The cohomological equation on the line). For every g∈C∞(R) there is f∈C∞(R) with f(x+1)−f(x)=g(x), and f is unique up to a 1-periodic function. The same holds for differential forms on R. Hence H1(Z;Ωp(R))=0 and H0(Z;Ωp(R))=Ωp(S1) for the translation action.
Proof. Let χ be smooth with χ=0 on (−∞,0] and χ=1 on [1,∞), and split g=g++g− with g+=χg supported in [0,∞) and g−=(1−χ)g supported in (−∞,1]. Put f+(x)=k≥1∑g+(x−k),f−(x)=−k≥0∑g−(x+k). Both sums are locally finite, so f± are smooth, and telescoping gives f±(x+1)−f±(x)=g±(x). Take f=f++f−. Two solutions differ by a periodic function. For a 1-form gdx use fdx. ◻
Theorem 1.7 (Flows over the irrational torus; Iglesias-Zemmour [29, 33). , [IZ, art. 8.39]]Let ρα be the rotation x↦x+α of S1=R/Z. Then Fl(Tα)≅H1(Λα;C∞(R))≅C∞(S1)/(ρα∗−1)C∞(S1)=R⊕(ρα∗−1)C∞(S1)C0∞(S1), where C0∞ denotes functions of mean zero and the summand R is the mean. Moreover:
the summand R is the group E20,1 of flat bundles of Proposition 1.9, and consists of the Kronecker bundle T2→Tα with its flow run at all constant speeds;
the second summand is zero if and only if α is Diophantine;
if α is Liouville, the second summand is an infinite-dimensional real vector space.
The automorphism group of every principal R-bundle over Tα is R.
Proof.Reduction to group cohomology. By Corollary 1.7 with G=R, Map(Tα,BR)≃(BC∞(R))hΛα, whose set of components is H1(Λα;C∞(R)) and whose automorphism groups are H0(Λα;C∞(R)), the Λα-periodic smooth functions, which are constant. Splitting Λα=Z⊕Zα and using 1.6 for the first factor, the Lyndon–Hochschild–Serre sequence collapses to H1(Λα;C∞(R))≅H1(Zα;C∞(S1))=C∞(S1)/(ρα∗−1); an elementary proof is [exo:LHS]. Under this isomorphism a function g corresponds to the cocycle τ(m+nα)=∑k=0n−1g∘ραk for n≥0.
Fourier analysis. Write g=∑ng^ne2πinx. Then g=f∘ρα−f iff g^n=(e2πinα−1)f^n for all n. So a coboundary has g^0=0, and for g of mean zero the only candidate is f^n=e2πinα−1g^n(n=0),4∥nα∥≤∣e2πinα−1∣=2∣sinπnα∣≤2π∥nα∥. (i) The constant g=c gives τ(m+nα)=nc, the flat bundle Xρ with holonomy ρ(m+nα)=nc; for c=−1 this is the Kronecker bundle by [exo:kronecker-class], and it is not a coboundary since its mean is not zero.
(ii) If ∥nα∥≥c∣n∣−τ, then ∣f^n∣≤∣n∣τ∣g^n∣/4c is rapidly decreasing whenever g^n is, so every smooth g of mean zero is a coboundary.
(iii) If α is Liouville then for each k there are infinitely many n with ∥nα∥<n−k: otherwise the finitely many exceptions could be absorbed into the constant c and α would be Diophantine with exponent k. Choose n1<n2<⋯ with cj:=∥njα∥<nj−j and let g(x)=j∑2cjcos(2πnjx). For every k, njkcj<njk−j→0, so g is smooth, real, of mean zero. Its formal primitive has ∣f^nj∣≥cj/(2π∥njα∥)=1/2π, which does not tend to zero; so there is no smooth f, indeed no integrable one. Splitting (nj) into infinitely many disjoint infinite subsequences gives functions g1,g2,… of this kind with disjoint spectra, and any non-trivial finite combination ∑aigi has a formal primitive with coefficients of modulus at least ∣ai∣/2π along the i-th subsequence. So the classes [gi] are linearly independent. ◻
Small divisors. For the golden ratio the successive minima of ∥nα∥ stay within a bounded factor of 1/n: every mean-zero cocycle is a coboundary and Fl(Tα)=R. For Liouville’s constant the minima drop abruptly at n=10k!; Fourier modes placed at those frequencies give principal R-bundles over Tα that are not multiples of the Kronecker bundle. The data are exact computations.
Corollary 1.8. If α is an algebraic irrational — in particular if Tα has real multiplication — then Fl(Tα)≅R: every principal R-bundle over Tα is trivial or isomorphic to the Kronecker bundle with a rescaled flow.
Summary of invariants
The irrational torus as an arithmetic object. The first three rows are independent of α; the rest depend on the smooth structure beyond its shape. Every row is a functor on H evaluated at one object.
The chapter is summarised in 1.1. Continued fractions, Pell’s equation and small divisors are classical; Tα is a single geometric object of which they are all invariants, in a category where “invariant” has its ordinary meaning. In noncommutative geometry the same foliation has the irrational rotation algebra Aα attached to it, and the first row of arithmetic also appears there: Aα and Aβ are Morita equivalent exactly when α and β are GL2(Z)-equivalent [48]. The diffeological proof is a covering space argument.
Solved exercises
Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.
1 Let φ=(1+5)/2. Compute the action of the diffeomorphism [x]↦[φkx] of Tφ on π1(Tφ) in the basis (1,φ).
Solution.π1(Tφ)=Λφ and the induced map is multiplication by φk. Since φ2=φ+1, multiplication by φ sends 1↦φ and φ↦1+φ, with matrix acting on coordinate columns. By induction φk=Fk−1+Fkφ with Fk the Fibonacci numbers, and , of determinant (−1)k. For odd k the diffeomorphism reverses the orientation of π1 although it preserves that of R. ◀
2 Compute Oα and a generator of π0Diff(Tα)/{±1} for α=(1+3)/2. What is Oα for α=32?
Solution.2α−1=3 gives 2α2−2α−1=0, so (A,B,C)=(2,−2,−1) is primitive with D=4+8=12, and Oα=Z+Z⋅2α=Z[1+3]=Z[3]. Note that α∈/Oα. The fundamental unit of Z[3] is 2+3, of norm 1. One checks directly: (2+3)⋅1=1+2α and (2+3)α=(1+2α)α=α+2α2=1+3α, both in Λα, with matrix of determinant 1⋅3−2⋅1=1. For α=32, which is not quadratic, Oα=Z by 1.3(i). ◀
2 Show that T2≅T1+2≅T1/2 and that T2≅T3.
Solution.1+2 and 1/2 are the images of 2 under and , both in GL2(Z); apply 1.2. If β=(aα+b)/(cα+d) with integer coefficients then Q(β)⊆Q(α), and symmetrically; so GL2(Z)-equivalent irrationals generate the same field. Since Q(2)=Q(3), the tori are not diffeomorphic. (Indeed there is not even a non-constant smooth map between them, by 1.2(i): λ and λ2 in Z+Z3 with λ=0 would give 2∈Q(3).) ◀
3 Show that T10 and T10/2 have the same endomorphism ring Z[10] but are not diffeomorphic.
Solution. For α=10: (A,B,C)=(1,0,−10), D=40, Oα=Z[10]. For β=10/2: 2β2−5=0, (A,B,C)=(2,0,−5), D=40, Oβ=Z+Z⋅2β=Z[10]. Suppose λΛα=Λβ. Now Λα=Z[10]=O and 2Λβ=2Z+10Z=:p, an ideal of O of index 2. So p=2λO would be principal, generated by μ=2λ=x+y10∈O with ∣N(μ)∣=[O:p]=2, i.e. x2−10y2=±2. Reducing modulo 5 gives x2≡±2, impossible since the squares modulo 5 are 0,1,4. Hence no such λ exists. In terms of 1.2(iii): 10=[3;6] and 10/2=[1;1,1,2] have different tails. The two tori are related by a smooth homomorphism with kernel of order 2 in each direction, but not by a diffeomorphism. ◀
3 For Liouville’s constant α=∑k≥110−k!, write down an explicit smooth function on S1 of mean zero that is not of the form f∘ρα−f, and describe the corresponding bundle.
Solution. Let nj=10j!. Then njα=integer+∑k>j10j!−k!, so ∥njα∥=∑k>j10j!−k!<2⋅10−j⋅j!=2nj−j. Put cj=∥njα∥ and g(x)=∑j2cjcos(2πnjx). As in the proof of 1.7(iii), g is smooth of mean zero and the Fourier coefficients of a solution f would have modulus at least 1/2π at the frequencies nj, contradicting the Riemann–Lebesgue lemma. The bundle is Yg=(S1×R)/Z with 1⋅([x],t)=([x+α],t+g(x)), with its projection to S1/ρα=Tα and the R-action on t: a “skew translation” of the cylinder. It has a section iff g is a coboundary. So Yg→Tα is a non-trivial principal R-bundle with zero mean, hence not isomorphic to any rescaling of T2→Tα, and by [exo:IZ830] it is not flat. ◀
4 Prove, without spectral sequences, that H1(Λα;C∞(R))≅C∞(S1)/(ρα∗−1)C∞(S1).
Solution. Write M=C∞(R) with Λα acting by (Tλ∗h)(x)=h(x+λ). A 1-cocycle is a map τ:Λα→M with τ(λ+λ′)=Tλ′∗τ(λ)+τ(λ′); coboundaries are δσ(λ)=Tλ∗σ−σ.
Normalisation. By 1.6 there is σ∈M with τ(1)=T1∗σ−σ. Replacing τ by τ−δσ we may assume τ(1)=0; the remaining freedom is to subtract δσ with T1∗σ=σ, i.e. σ∈C∞(S1).
The invariant. Computing τ(1+α) in the two orders, Tα∗τ(1)+τ(α)=τ(1+α)=T1∗τ(α)+τ(1), so with τ(1)=0 the function g=τ(α) is 1-periodic: g∈C∞(S1). The cocycle identity then forces τ(m)=0 and τ(m+nα)=τ(nα)=∑k=0n−1Tkα∗g for n≥0, with τ(−nα)=−T−nα∗τ(nα). So a normalised cocycle is determined by g.
Existence. Conversely, for any g∈C∞(S1) these formulas define a cocycle: the identity for the subgroup Zα is the usual telescoping for a Z-cocycle with values in the Zα-module C∞(S1), and translation by integers acts trivially on the values, so the extension by τ(m+nα)=τ(nα) is consistent.
Coboundaries. A normalised τ is changed by an allowed δσ, σ∈C∞(S1), to one with g′=g−(Tα∗σ−σ)=g−(ρα∗−1)σ. So τ↦[g] is a well-defined bijection from H1(Λα;M) to C∞(S1)/(ρα∗−1)C∞(S1), and it is additive.
Geometrically the normalisation step trivialises the pullback of the bundle to the circle R/Z, which covers Tα with group Z ([exo:Z-bundles]), and g is the clutching function of the bundle over Tα=S1/ρα. This is the reduction in [IZ, art. 8.39]. ◀
Cryptography: real multiplication, class groups, lattices
Irrational tori are analogues of elliptic curves without a complex structure: they have isogenies, degrees, torsion subgroups and, in the quadratic case, real multiplication. We show that tori with real multiplication by a fixed order form a torsor under its class group, that deciding diffeomorphism between them is the principal ideal problem, and that the infrastructure of a real quadratic field is a circle of marked tori. We then treat lattices proper through their moduli orbifold, where the search and decision forms of the lattice isomorphism problem become the stack and its coarse space.
A pseudolattice is a subgroup Λ⊂R of rank 2 that is not cyclic, equivalently Λ=Zω1+Zω2 with ω1/ω2 irrational [43]. Every irrational torus is TΛ=R/Λ for a pseudolattice, and TΛ≅Tω2/ω1. An isogenyTΛ→TΛ′ is a non-constant smooth homomorphism.
Proposition 1.1 (Isogenies).
Λ↦TΛ is an equivalence from the category of pseudolattices, with morphisms Hom(Λ,Λ′)={λ∈R:λΛ⊆Λ′}, to the category of irrational tori and smooth homomorphisms.
An isogeny λ is surjective, with finite kernel λ−1Λ′/Λ≅Λ′/λΛ of order degλ:=[Λ′:λΛ], and it is a covering map. Degrees are multiplicative.
Every isogeny λ has a dual λ^=deg(λ)/λ:TΛ′→TΛ with λ^λ=[degλ]. So isogeny is an equivalence relation.
The N-torsion subgroup is TΛ[N]=N1Λ/Λ≅(Z/N)2.
Proof. (i) is Corollary 1.2(i): smooth homomorphisms are multiplications by real numbers preserving the groups. (ii) λΛ and Λ′ both have rank 2, so the index is finite; x↦λx is onto R; the kernel of the induced map is as stated, and it is a principal bundle for this finite group by Corollary 1.3. (iii) deg(λ)⋅Λ′⊆λΛ because a finite abelian group is annihilated by its order, so (degλ/λ)Λ′⊆Λ. (iv) is the kernel of multiplication by N. ◻
Complex and real multiplication. The right-hand column is a theorem-by-theorem translation of the left; the differences are in the last rows, and they are what matters for cryptography.
elliptic curve E=C/Λ
irrational torus T=R/Λ
lattice
discrete, rank 2 in C
dense, rank 2 in R
category
complex manifolds
diffeological spaces
morphisms
λ∈C, λΛ⊆Λ′
λ∈R, λΛ⊆Λ′
N-torsion
(Z/N)2
(Z/N)2
moduli
SL2(Z)\H
GL2(Z)\(R∖Q)
extra endomorphisms
imaginary quadratic order (CM)
real quadratic order (RM)
unit group of the order
finite
{±1}×Z
classes with given order
torsor under Pic(O)
torsor under Pic(O)
shape
BZ2
BZ2
The class group torsor
Fix a real quadratic field K⊂R and an order O⊂K of discriminant D. For a pseudolattice Λ write OΛ={λ∈R:λΛ⊆Λ}=End(TΛ). Let T(O) be the set of diffeomorphism classes of irrational tori TΛ with OΛ=O, and let Pic(O) be the group of invertible fractional O-ideals modulo principal ones.
Theorem 1.2 (Tori with real multiplication; after [43, 31). ]
Every pseudolattice with OΛ=O is homothetic to an invertible fractional ideal of O, and Λ↦[Λ] induces a bijection T(O)≅Pic(O). In particular there are exactly h(O) diffeomorphism classes of irrational tori with real multiplication by O.
Pic(O) acts simply transitively on T(O) by [a]⋅[TΛ]=[Ta−1Λ]. For an integral invertible ideal a the canonical map ϕa:TΛ⟶Ta−1Λ is an isogeny of degree N(a) with kernel TΛ[a]={x:ax=0}.
Every isogeny between tori with real multiplication by O is, up to diffeomorphism of its target, some ϕa.
Proof. (i) Scale Λ so that 1∈Λ, say Λ=Z+Zα. Then OΛ=Oα=Z, so by Theorem 1.3α is quadratic, Q(α)=K, and Λ⊂K is a lattice with multiplier ring O. In a quadratic order such a lattice is an invertible fractional ideal ([exo:proper-invertible]). If λΛ=Λ′ with both in K then λ∈K×. So homothety classes of pseudolattices with multiplier ring O are classes of invertible ideals modulo K×, and by Theorem 1.1 homothety classes are diffeomorphism classes. (ii) Multiplication by an invertible ideal preserves the multiplier ring, and the action of a group on itself is simply transitive. If a⊆O then Λ⊆a−1Λ with index N(a), and the identity of R induces ϕa with kernel a−1Λ/Λ={x∈R/Λ:ax⊆Λ}. (iii) If λΛ⊆Λ′ then a=λΛ⋅Λ′−1 is an integral invertible ideal and Λ′=a−1(λΛ); multiplication by λ is a diffeomorphism TΛ→TλΛ. ◻
This is the exact analogue of the main theorem of complex multiplication for elliptic curves over C, with the same proof. The diffeological input is Theorem 1.1, by which the category in which these objects are classified is the ordinary category of smooth spaces.
Example 1.3 (Two small isogeny graphs).
D=5, O=Z[φ], h=1: the golden torus is the only torus with real multiplication by Z[φ].
D=40, O=Z[10], h=2: the two classes are T10 and T10/2 ([exo:sqrt10]). The primes p2=(2,10) and p3=(3,1+10) are both non-principal, so isogenies of degree 2 and 3 interchange the two tori.
D=316, O=Z[79], h=3: the three classes are T79, T(1+79)/3 and T(−1+79)/3, permuted cyclically by the two primes above 3 (1.1, [exo:79]).
Left: the three irrational tori with real multiplication by Z[79], with the continued fraction of a representative, and the cyclic action of an ideal of norm 3. Right: the circle of marked tori homothetic to R/O (1.5), with the four reduced principal ideals at their exact positions 0, 0.119, 2.191 and 2.249 (successive ideals differ by the complete quotients of the continued fraction of 8+79).
Diffeomorphism is the principal ideal problem
Present a torus with real multiplication by the primitive integer form (A,B,C) of discriminant D with root α=(−B+D)/2A; this takes O(logD) bits. Then AΛα=AZ+2−B+DZ is an invertible ideal of OD, and every ideal class arises.
Theorem 1.4 (Complexity dictionary). Fix a non-square discriminant D>0 and let RD=logεD be the regulator of OD.
The problem of deciding whether Tα≅Tβ for two tori presented by forms of discriminant D is equivalent, under linear-time reductions in both directions, to deciding equality of two classes in Pic(OD). Finding the diffeomorphism λ, in the sense of approximating log∣λ∣ modulo RD, is equivalent to the principal ideal problem for OD.
Computing a generator of π0Diff(Tα)/{±1}≅Z, in the sense of approximating its dilation factor, is equivalent to computing RD, that is, to solving Pell’s equation.
Consequently both problems are solvable in quantum polynomial time in logD [23]. The best known classical algorithms are subexponential; and integer factoring reduces to (b) [23].
Proof. (a) By Theorem 1.1 and 1.2, Tα≅Tβ iff λΛα=Λβ for some λ∈K×, iff the ideals AΛα and A′Λβ are equivalent, and λ is, up to the rational factor A/A′ and a unit, a generator of the principal ideal A′Λβ(AΛα)−1. The translation between forms, tori and ideals is a relabelling of the input. (b) By Theorem 1.3(iii) the generator is multiplication by εD. (c) Hallgren’s algorithms compute RD and solve the principal ideal problem in real quadratic orders in quantum polynomial time. ◻
The theorem locates real-quadratic cryptography on the geometric side.
Proposition 1.5 (The infrastructure is a circle of marked tori). Fix a class c∈Pic(O). The set of pseudolattices Λ⊂R in the class c, not taken up to homothety, is a torsor under R×/O×≅R>0/εZ≅logR/RDZ, a circle of circumference the regulator. Equivalently it is the set of isomorphism classes of marked tori (R→T) in the diffeomorphism class c, where a marking is a choice of universal covering by R up to translation.
Proof.R× acts on lattices by homothety, transitively on a class by definition, and the stabiliser of Λ is {λ:λΛ=Λ}=O×={±εk}. A marked torus is the same as the subgroup Λ=ker(R→T), since translations do not change it. ◻
The finitely many reduced ideals in the class are distinguished points on this circle; Shanks called the circle with these points the infrastructure of the class [51]. Multiplying two reduced ideals and reducing lands near the sum of their positions, so one can take large steps around the circle without knowing its circumference. Buchmann and Williams built a Diffie–Hellman key exchange on this [7]: the parties exchange reduced ideals near positions aδ and bδ and share the one near abδ; an eavesdropper who can compute positions — that is, solve the principal ideal problem — recovers the key. In our terms: the Buchmann–Williams scheme is Diffie–Hellman in the circle group of marked tori diffeomorphic to R/O, with elements represented by nearby tori of small height and the circumference RD kept implicit. Hallgren’s algorithm computes the circumference and the positions, and breaks it.
Lattices
For lattices of full rank, all quotients Rn/L are diffeomorphic by Theorem 1.1. The object of lattice cryptography is the Euclidean structure, and the natural diffeological object is the moduli space of lattices. Let Sn be the open cone of positive definite symmetric n×n matrices, on which GLn(Z) acts by Q⋅U=UTQU; two Gram matrices are in the same orbit iff they come from isometric lattices. The lattice isomorphism problem (LIP) is: given Q,Q′, find a U with Q′=UTQU [18].
Theorem 1.6 (The orbifold of lattices). Let Ln=Sn/GLn(Z) with the quotient diffeology, and Aut(Q)={U∈GLn(Z):UTQU=Q}.
Ln is a diffeological orbifold of dimension n(n+1)/2. Near [Q] it is diffeomorphic to Symn(R)/ΓˉQ, where ΓˉQ=Aut(Q)/{±1} acts linearly by S↦UTSU.
The conjugacy class of the linear group ΓˉQ is an invariant of the germ of Ln at [Q]. In particular [Q] is a manifold point of Ln if and only if Aut(Q)={±1}.
In H there are canonical maps Sn//GLn(Z)→Sn//PGLn(Z)→Ln. The first is a BZ/2-bundle, the second is an isomorphism over the manifold points. Decision-LIP is equality of points of Ln; search-LIP is the construction of a 1-morphism Q→Q′ in the stack Sn//GLn(Z); and the set of solutions is a torsor under Aut(Q).
Proof. (i) The action is properly discontinuous: if Q and UTQU range over a compact subset of Sn then ∥U∥ is bounded, so only finitely many integer matrices U occur. Hence stabilisers are finite and every Q has an Aut(Q)-invariant open neighbourhood W with W⋅U∩W=∅ for U∈/Aut(Q). The saturation of W is open, so its image is D-open in the quotient and is diffeomorphic to W/Aut(Q). The action on Symn(R)⊃Sn is linear and fixes Q; translating by −Q identifies W/Aut(Q) with a neighbourhood of 0 in Symn(R)/Aut(Q). The kernel of GLn(Z)→GL(Symn(R)) is {±1}, so the effective group is ΓˉQ. (ii) is Theorem 1.2 and Corollary 1.3. (iii) is Theorem 1.8: the action of PGLn(Z) is free exactly over the points with ΓˉQ=1, and Hom(Q,Q′)={U:Q′=UTQU} is a torsor under the automorphism group of Q when it is non-empty. ◻
In this language a public key in an LIP-based scheme is a point of the stack with a hidden 1-morphism to a distinguished object, and the structure group at that object measures how many secret keys there are. For the lattice Zn, used in the signature scheme Hawk [19] in a module form, Aut(In) is the hyperoctahedral group of order 2nn!, the most singular kind of point; a generic Q is a manifold point with Aut(Q)={±1}. The distinction between the stack and the orbifold Ln is the distinction between search and decision: equality of points of the coarse space is the existence of an equivalence of forms, and a 1-cell of the stack is a choice of one. The zero-knowledge proofs of [18] are proofs of knowledge of a 1-cell in which only its endpoints are disclosed.
For subgroups of rank larger than the dimension the diffeology of the quotient is again informative.
Corollary 1.7 (Projected lattices). Let B,B′ be real n×N matrices of rank n that are injective on ZN. Then Rn/BZN≅Rn/B′ZN⟺B′=ABU for some A∈GLn(R),U∈GLN(Z)⟺kerB′=U−1kerB for some U∈GLN(Z). So diffeomorphism classes of such quasi-tori correspond to GLN(Z)-orbits of (N−n)-dimensional subspaces of RN meeting ZN trivially.
Proof. By Theorem 1.1 the quotients are diffeomorphic iff B′ZN=ABZN for some A; as B′ and AB are injective on ZN with the same image there is a unique U∈GLN(Z) with B′=ABU. A matrix of rank n is determined up to left multiplication by GLn(R) by its kernel. ◻
The geometric picture
Three things usually treated separately are here objects of one category: the class group action (isogenies of tori), the infrastructure (marked tori), and the search/decision distinction for isomorphism problems (stack versus coarse space).
Two facts about sizes orient the picture. Isogeny-based schemes such as CSIDH [9] use the action of a large imaginary quadratic class group, of size about ∣D∣, as a hard homogeneous space [15]. For real quadratic orders it is the product h⋅R that has this size, and heuristically the class number h is usually small [14]. So the torsor of 1.2 is small and the bulk of the structure is in the circle of 1.5, which is where period finding applies (1.4). For lattices, the Euclidean geometry used in cryptography is that of Sn and of the fibres of Sn→Ln, and the isomorphism problem is the problem of equality of points of the orbifold Ln.
Solved exercises
Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.
1 Show that multiplication by N on an irrational torus has degree N2, and that for λ∈OΛ the endomorphism λ of TΛ has degree ∣NK/Q(λ)∣ when Λ has real multiplication.
Solution.[Λ:NΛ]=N2 since Λ≅Z2. In general degλ=[Λ:λΛ] is the absolute value of the determinant of multiplication by λ on Λ≅Z2, which is the norm of λ as an element of the quadratic field (the determinant of multiplication by λ on K=Λ⊗Q). ◀
2 On the golden torus Tφ, compute the degree and kernel of multiplication by 5=2φ−1, and of multiplication by φ.
Solution.N(5)=−5, so the degree is 5 and the kernel is 51Z[φ]/Z[φ]≅Z[φ]/(5)≅Z/5, generated by the class of 1/5. N(φ)=−1, so multiplication by φ has degree 1: it is the diffeomorphism of [exo:golden]. The prime 5 ramifies in Z[φ], and Tφ[5] is the unique subgroup of Tφ[5]≅(Z/5)2 stable under real multiplication. ◀
2 Verify 1.3(c): the ideal p=(3,−1+79) of Z[79] is not principal, and p3 is.
Solution.N(p)=3. If p=(x+y79) then x2−79y2=±3. By a theorem of Lagrange, a solution of ∣x2−dy2∣<d in coprime integers has x/y a convergent of d. For 79=[8;1,7,1,16] the values p2−79q2 along the convergents are periodic and equal to −15,2,−15,1; so ±3 is not represented. On the other hand 172−79⋅22=−27, so μ=17+279 has norm −27. The ideal (μ) has norm 27 and is not divisible by (3)=ppˉ, because μ/3∈/Z[79]; so it is p3 or pˉ3, and either way [p]3=1. Hence [p] has order exactly 3. The three ideal classes 1,[p],[p]2 are represented by the pseudolattices Z+79Z, 31p=Z+3−1+79Z and 31pˉ=Z+31+79Z, whose continued fractions have three different periods, in accordance with Corollary 1.2(iii). ◀
3 Show that Tα and Tβ are isogenous if and only if β=(aα+b)/(cα+d) for an integer matrix of non-zero determinant. Deduce that the tori with real multiplication fall into one isogeny class for each real quadratic field, and that an isogeny class of tori without real multiplication contains infinitely many diffeomorphism classes.
Solution. An isogeny is a λ=0 with λΛα⊆Λβ: λ=c′β+d′ and λα=a′β+b′ with integers such that a′d′−b′c′=0 (otherwise α would be rational). So α is the image of β under a matrix in GL2(Q)∩M2(Z), and inverting, β is the image of α under such a matrix. The converse is the same computation backwards. If α is quadratic, its GL2(Q)-orbit is K∖Q for K=Q(α): any β∈K∖Q is aα+b with a=0 rational, hence the image of α under a matrix with integer entries after clearing denominators. So there is one isogeny class per field, and it contains tori with all the orders of K as endomorphism rings. If α is not quadratic, the stabiliser of α in PGL2(Q) is trivial, so the isogeny class is in bijection with PGL2(Q) and the diffeomorphism classes in it with PGL2(Z)\PGL2(Q), which is infinite: for instance the tori Tpα, p prime, are pairwise non-diffeomorphic. ◀
3 Describe the local structure of L2 at the square lattice Q=I2 and at the hexagonal lattice . Is L2 a manifold with corners near [I2]?
Solution. Use coordinates on Sym2(R)≅R3. Aut(I2) is the group of signed permutation matrices, of order 8, so Γˉ=Aut/{±1} has order 4. It is generated by diag(1,−1), acting as (a,b,c)↦(a,−b,c), and the swap, acting as (a,b,c)↦(c,b,a): two commuting reflections, in the planes b=0 and a=c. So near [I2], L2≅R×(R/{±1})×(R/{±1})=R×Δ1×Δ1. For the hexagonal lattice Aut has order 12 and Γˉ≅S3 of order 6, generated by reflections, with local model R×(R2/S3). These are the orbifold points i and eiπ/3 of the modular curve, times the scale. Topologically a neighbourhood of [I2] is R times a quadrant, but it is not a manifold with corners: Δ1≅[0,∞)sub by Proposition 1.11, and the structure group (Z/2)2 is an invariant by 1.6(ii). So the diffeology of the moduli space determines that the boundary of the quadrant consists of mirror points. ◀
4 Let α be a quadratic irrational with primitive equation Aα2+Bα+C=0, Λ=Z+Zα and O=Z+ZAα. Prove that Λ is an invertible fractional O-ideal, and complete the proof of 1.2(i).
Solution. Let αˉ be the conjugate and Λˉ=Z+Zαˉ; then α+αˉ=−B/A and ααˉ=C/A. Λ is an O-module by Theorem 1.3(ii), and so is Λˉ, as Oˉ=O. Compute the product of lattices: ΛΛˉ=Z+Zα+Zαˉ+Zααˉ=Z+Zα+ZAB+ZAC=A1(AZ+BZ+CZ+ZAα)=A1(Z+ZAα)=A1O, using αˉ=−B/A−α and gcd(A,B,C)=1. Hence Λ⋅(AΛˉ)=O and Λ is invertible with inverse AΛˉ.
Now the bijection. Let Λ′ be any pseudolattice with OΛ′=O. Dividing by a non-zero element we may assume Λ′=Z+Zα′; then Oα′=O=Z forces α′ quadratic with Q(α′)=K, and by the computation Λ′ is an invertible ideal of Oα′=O. So Λ′↦[Λ′]∈Pic(O) is defined on homothety classes. It is injective: if Λ′′=μΛ′ with μ∈K× the lattices are homothetic. It is surjective: an invertible fractional ideal a is a lattice in K⊂R of rank 2, not cyclic, with multiplier ring exactly O — if λa⊆a then λO=λaa−1⊆O. Finally homothety classes are diffeomorphism classes by Theorem 1.1(c), and a real λ with λΛ′=Λ′′, both inside K, lies in K. ◀
Machine learning: differentiable programs and singular hypothesis spaces
Three places where machine learning already involves more than manifolds. First, the space of functions computed by a model is a quotient of parameter space and a subspace of a function space, and these are two different smooth spaces. Second, the correctness of automatic differentiation for programs with higher-order functions is a theorem about gluing over Diff. Third, orbit spaces of data symmetries have no differentiable canonical form at points with isotropy. Each is a statement about the quasitopos structure of The quasitopos \mathsf{Diff}.
Source in the book. Quotients, strict maps and the functional diffeology, [IZ, art. 1.50–1.60], and [IZ, Exercises 50–51]. The theorem on automatic differentiation is due to Huot, Staton and Vákár [27].
Hypothesis spaces
A parametric model is a smooth map f:Θ×X→Y, where Θ is a space of parameters and X,Y are the spaces of inputs and outputs; think of manifolds, though nothing below requires it. Its realisation map is ρ:Θ⟶C∞(X,Y),ρ(θ)=f(θ,−). Two parameters are functionally equivalent, θ∼θ′, if ρ(θ)=ρ(θ′). Applying Theorem 1.2 to ρ gives two hypothesis spaces, Θ↠Hq:=Θ/∼κHs:=ρ(Θ)sub↪C∞(X,Y), the quotient and the subspace hypothesis space. They have the same points: the functions the model can compute.
Theorem 1.1 (Smooth learning objects).
ρ is smooth for the functional diffeology, and κ is a smooth bijection.
Let Y=Rk, let μ be a finite Borel measure with compact support on X×Rk, X a manifold, and ℓ:Rk×Rk→R smooth. The risk R:C∞(X,Rk)⟶R,R(h)=∫ℓ(h(x),y)dμ(x,y) is smooth. Hence the training loss L=R∘ρ is smooth and descends to smooth functions on Hq and on Hs.
A map out of Hq is smooth iff its composite with Θ→Hq is; a map into Hs is smooth iff its composite with Hs↪C∞(X,Y) is, i.e. iff it is a smooth family of functions.
κ need not be a diffeomorphism: there are models with smooth families of realisable functions that are not induced, even locally, by any smooth family of parameters.
Proof. (i) and (iii) are Theorem 1.9 and Theorem 1.2. (ii) is [exo:risk]. (iv) Take Θ=X=Y=R and f(θ,x)=θ2x. Then ρ(θ)=θ2⋅id, the image of ρ is the half-line {c⋅id:c≥0} inside the line of linear functions, which is an induced copy of R in C∞(R,R); so Hs≅H and Hq=R/{±1}=Δ1, and κ=sq is not a diffeomorphism by Proposition 1.11. The family (r,s)↦(r2+s2)id is a plot of Hs that does not lift to parameters near (0,0). ◻
The phenomenon in (iv) is the general one at singular parameters, where the fibres of ρ change dimension or symmetry type: deep linear networks at rank-deficient products, neural networks at parameters with vanishing or duplicated units. In singular learning theory [55] these points are studied through the local algebraic geometry of the loss. Theorem 1.1 is a structural remark: before any choice of loss there are two canonical smooth structures on the set of hypotheses; they coincide at regular parameters; and where they differ, the quotient structure Hq is the one with a universal property for learning dynamics, since dynamics are defined by maps out of Θ.
Parameters, the two hypothesis spaces, the function space, and the risk. Every arrow is smooth. κ is bijective, and is a diffeomorphism exactly when the realisation map is strict.
Proposition 1.2 (Symmetric gradient flow). Let a group G act on Θ=Rp by linear isometries and let L:Θ→R be smooth, G-invariant, with complete gradient flow Φt.
Φt is G-equivariant and descends to a smooth action of (R,+) on Θ/G, that is, to a smooth homomorphism R→Diff(Θ/G).
Stab(Φtθ)=Stab(θ) for all t. Hence every fixed subspace ΘK, K≤G, is invariant under the flow, and the flow on Θ/G preserves the type of each point.
Proof. For an isometry g, ∇L(gθ)=g∇L(θ), so gΦt and Φtg solve the same initial value problem. The map R×Θ→Θ→Θ/G is constant on orbits in the second variable and R×Θ→R×Θ/G is a subduction (Proposition 1.7), so we get a smooth R×Θ/G→Θ/G, an action because Φ is; its adjoint is smooth by Theorem 1.9. For (ii), gΦtθ=Φtθ iff Φtgθ=Φtθ iff gθ=θ. ◻
For G a group of permutations and sign changes of hidden units this is the familiar fact that units which start equal stay equal. In the language of Theorem 1.8, gradient flow is a flow on the stack Θ//G, and the induced flow on the orbit space preserves the stratification by stabilisers.
Correctness of automatic differentiation
Forward-mode automatic differentiation (AD) is a program transformation: replace every real number by a pair (value, derivative) and every primitive operation by its derivative-propagating version. For first-order straight-line programs its correctness is the chain rule. Real languages have higher-order functions, and then even stating correctness requires a semantics in which a program of type (real→real)→real denotes a smooth map on a space of smooth maps. Manifolds cannot provide it ([exo:mfd-not-ccc]). Diff can.
The language.
Types are τ::=real∣τ×τ∣τ→τ. Terms are variables, constants c for c∈R, applications op(t1,…,tk) of primitive operations, pairs, projections, λ-abstractions and applications, with the usual typing rules. The primitive operations form a set Op=⨆kOpk of smooth functions Rk→R containing addition and multiplication and closed under partial derivatives.
Semantics.
Put [[real]]=R, [[τ×σ]]=[[τ]]×[[σ]] and [[τ→σ]]=C∞([[τ]],[[σ]]) with the functional diffeology. By Theorem 1.9, Diff is Cartesian closed, so every term x1:τ1,…,xn:τn⊢t:τ has a denotation, a smooth map [[t]]:∏i[[τi]]→[[τ]].
The macro.
On types, D(real)=real×real, and D commutes with × and →. On terms D commutes with variables, pairing, projections, abstraction and application, and D(c)=⟨c,0⟩,D(op(t1,…,tk))=⟨op(u),∑i∂iop(u)⋅ui′⟩where ⟨ui,ui′⟩=D(ti).
Theorem 1.3 (Huot–Staton–Vákár [27). ]Let x1:real,…,xn:real⊢t:real be a term, possibly using higher-order functions internally, and let f=[[t]]:Rn→R and g=[[D(t)]]:(R×R)n→R×R. Then for all x,v∈Rn, g((x1,v1),…,(xn,vn))=(f(x),Df(x)⋅v).
Proof. Define, by induction on the type τ, a relation Sτ⊆C∞(R,[[τ]])×C∞(R,[[Dτ]]) between smooth curves: SrealSτ×σSτ→σ={(h,(h,h′)):h∈C∞(R,R)},={((a1,a2),(b1,b2)):(a1,b1)∈Sτ,(a2,b2)∈Sσ},={(a,b):∀(c,d)∈Sτ,(s↦a(s)(c(s)),s↦b(s)(d(s)))∈Sσ}. The last clause makes sense because a curve in a function space composed pointwise with a curve in its source is the composite of (a,c):R→C∞([[τ]],[[σ]])×[[τ]] with the evaluation map, which is smooth. The fundamental lemma ([exo:fundamental]) states: if x1:τ1,…,xn:τn⊢t:τ and (ai,bi)∈Sτi, then ([[t]]∘(a1,…,an),[[Dt]]∘(b1,…,bn))∈Sτ. Apply it to t of the theorem with ai(s)=xi+svi and bi=(ai,ai′), which lie in Sreal. The conclusion (f∘a,g∘b)∈Sreal means g(b(s))=(f(a(s)),(f∘a)′(s)); evaluate at s=0. ◻
The proof of 1.3 as a lifting problem. Syn is the syntactic category of the language. An object of Gl is a triple (X,X′,S) with S⊆Diff(R,X)×Diff(R,X′), and a morphism is a pair of smooth maps preserving the relations. Gl is Cartesian closed and the projection functor preserves that structure; since Syn is the free Cartesian closed category on the primitives, a lift exists as soon as each primitive operation preserves S, which is the chain rule.
Three comments. First, the role of diffeology is precise and minimal: the proof takes place in a Cartesian closed category containing R and its smooth maps, in which curves in function spaces are defined; Theorem 1.9 is the statement that Diff is one. Second, the same argument gives correctness for sum types, inductive types and, with more work, reverse mode [27]; coproducts in Diff are computed as in sets (Theorem 1.6), which is what the extension uses. Third, the relation Sτ is a relation between plots. Logical relations over a concrete site are a general technique, and the choice of site is a parameter: with smooth maps replaced by a class of piecewise analytic maps, the method applies to programs with conditionals and recursion [26].
Symmetries: no differentiable canonical form
Let a compact Lie group G act linearly and orthogonally on V=Rn; for instance the symmetric group permuting the points of a point cloud, or a rotation group acting on coordinates. An invariant model is a function on V/G. A popular way to build one is canonicalisation: choose a map y:V→V that picks a representative of each orbit, y(gv)=y(v),y(v)∈G⋅v(g∈G,v∈V), and apply an arbitrary network to y(v). Sorting is a canonicalisation for the symmetric group acting on Rn. Dym, Lawrence and Siegel show that for many actions of interest no continuous canonicalisation exists [20]. Sorting is continuous, so continuity is not always the obstruction. Differentiability always is, wherever there is isotropy.
Theorem 1.4 (No differentiable canonicalisation at isotropy). Let W⊆V be a G-invariant open set and y:W→V a canonicalisation. Let v∈W, with stabiliser Gv and normal space Nv=(Tv(G⋅v))⊥ to its orbit. If y is differentiable at v, then Gv acts trivially on Nv. Consequently:
if Gv acts non-trivially on Nv, no canonicalisation defined near v is differentiable at v;
if G is finite and acts faithfully, a canonicalisation is non-differentiable at every point with non-trivial stabiliser;
the quotient map π:V→V/G has a smooth local section near [v] only if Gv acts trivially on Nv.
Proof. Write y(v)=g0v. Replacing y by g0−1y, which is again a canonicalisation, we may assume y(v)=v. Let A=Dy(v).
A is injective on Nv. Let n∈Nv with An=0. Then y(v+tn)=v+o(t). Since y(v+tn)=gt(v+tn) for some gt∈G and G acts by isometries, ∣(v+tn)−gt−1v∣=o(t), so the distance from v+tn to the orbit G⋅v is o(t). But the orbit is a compact embedded submanifold and n is normal to it at v, so by the tubular neighbourhood theorem the distance from v+tn to the orbit is t∣n∣ for small t≥0. Hence n=0.
A is Gv-invariant. For h∈Gv, y(hw)=y(w) and h is linear with hv=v; differentiating at v gives Ah=A.
Conclusion.Gv preserves the orbit and fixes v, so it preserves Nv. For n∈Nv and h∈Gv we get A(hn)=A(n) with hn,n∈Nv, so hn=n.
(a) is the contrapositive. (b) For finite G orbits are discrete and Nv=V, on which Gv acts faithfully. (c) If c is a smooth section of π on a D-open neighbourhood of [v] then y=c∘π is a smooth canonicalisation near v. ◻
Canonicalisation. Left: for the symmetric group S2 the sorting map is continuous but folds the plane along the diagonal, where the stabiliser acts by −1 on the normal line. Right: for rotations any section of the orbit map must select a ray, and its composite with the quotient map, v↦∣v∣e, has a conical singularity at the fixed point.
Remark 1.5 (The converse, and the meaning). By the slice theorem a neighbourhood of the orbit of v is G×GvNv, so if Gv acts trivially on Nv the quotient is locally Nv and a smooth local section exists. So 1.4(c) is an equivalence: π has smooth local sections exactly over the points where V/G is locally the quotient by a free action. This is Theorem 1.8 at the level of the orbit space: over those points the diffeological quotient is the stack quotient and π is a principal bundle onto its image; elsewhere the orbit space is the coarse space of a stack with non-trivial isotropy, and a section would trivialise an isotropy group that is not trivial. Frame averaging and weighted frames [20] can be read as replacing a section of V→V/G by a section of an associated bundle of measures, which does exist.
The alternative to canonicalisation is to compute invariant features. Choose generators σ1,…,σm of the algebra of invariant polynomials, let σ=(σ1,…,σm):V→Rm, and let σˉ:V/G→σ(V) be the induced map.
Proposition 1.6 (Invariant features determine functions, not families).
σˉ:V/G→σ(V)sub is a smooth bijection.
(Schwarz [50]) It induces an isomorphism on smooth functions: C∞(V/G)=C∞(V)G=σ∗C∞(Rm)=σˉ∗C∞(σ(V)sub).
It is not a diffeomorphism in general. For G={±1} on R and on C, and for G=O(n) on Rn with σ=∣x∣2, the space σ(V)sub has plots that do not lift to V even locally. Moreover the spaces Rn/O(n), n≥1, are pairwise non-diffeomorphic and all have the same image [0,∞) and the same ring of smooth functions.
Proof. (i) Invariant polynomials separate the orbits of a compact group. (ii) Schwarz’s theorem is the middle equality; the outer ones are the universal property of the quotient and the fact that a smooth function on σ(V)sub pulls back to a smooth invariant function on V. (iii) is Proposition 1.11, [exo:cone-hilbert] and [IZ, Exercises 50–51]. ◻
So an invariant feature map is a faithful encoding of the orbit space for the purpose of defining smooth invariant functions, and an unfaithful one for the purpose of describing smooth families of orbits: the feature space contains smooth curves and surfaces of feature values that are not the features of any smooth family of inputs. A generative model trained in feature space can therefore produce smooth interpolations with no smooth preimage. The orbit space V/G with its quotient diffeology is the object whose plots are exactly the liftable families, and by the last sentence of (iii) it determines the dimension of the data, which the features ∣x∣2 do not.
Solved exercises
Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.
1 For the one-neuron model f((a,w),x)=atanh(wx) with Θ=R2, X=Y=R, determine the functional equivalence relation and describe Hq.
Solution. Let h(x)=atanh(wx). Then h′(0)=aw and h′′′(0)=−2aw3. If aw=0 then h=0. If aw=0 and atanh(wx)=a′tanh(w′x), then aw=a′w′ and aw3=a′w′3, so w′2=w2 and (a′,w′)=±(a,w); conversely tanh is odd. So the classes are: the cross {aw=0}, which is the fibre over the zero function, and the pairs {±(a,w)} with aw=0. Hq is the plane with the cross collapsed to one point and the remaining four open quadrants identified in antipodal pairs: two open quadrants, each a manifold, glued at a single point through which smooth families can pass only by lifting to curves in the plane that reach the cross. It is a manifold away from that point and not a manifold at it. ◀
2 Apply the macro D to x:real⊢times(x,sin(x)):real and to x:real⊢(λf.f(fx))(λz.times(z,z)):real, and check 1.3 on both.
Solution. Write the input as ⟨x,x′⟩. For the first term, D(sin(x))=⟨sinx,cosx⋅x′⟩ and so D(t)=⟨xsinx,sinx⋅x′+x⋅(cosx⋅x′)⟩, using ∂1times(u1,u2)=u2 and ∂2times=u1. The second component is (xsinx)′x′. For the second term, D commutes with abstraction and application, so D(t)=(λF.F(F⟨x,x′⟩))(λ⟨z,z′⟩.⟨z2,2zz′⟩), where F now has type real2→real2. Evaluating, F⟨x,x′⟩=⟨x2,2xx′⟩ and F(F⟨x,x′⟩)=⟨x4,2x2⋅2xx′⟩=⟨x4,4x3x′⟩. The term denotes x↦x4, with derivative 4x3. The higher-order function λf.f(fx) was never differentiated “as a function of f”; the macro simply changed the type of its argument. ◀
2 Show that y(a,b)=(min(a,b),max(a,b)) is a continuous canonicalisation for S2 acting on R2, and verify the conclusion of 1.4 on the diagonal.
Solution.min and max are continuous and symmetric, and y(a,b) is (a,b) or (b,a). At v=(a,a) the stabiliser is S2, the orbit is the point v, and Nv=R2. The swap acts on Nv with eigenvalues +1 on the diagonal direction and −1 on the antidiagonal direction (1,−1), so it acts non-trivially and the theorem predicts non-differentiability. Indeed y(a+t,a−t)=(a−∣t∣,a+∣t∣), which is not differentiable at t=0. Away from the diagonal the stabiliser is trivial and y is locally the identity or the swap, hence smooth. ◀
3 Let a Lie group G act smoothly on a manifold Θ and let L be a smooth G-invariant function. Show that at every critical point θ of L the Hessian of L vanishes on the tangent space to the orbit G⋅θ. Apply this to the rescaling symmetry (a,w)↦(ca,w/c) of the model f((a,w),x)=a⋅relu(wx) restricted to a,w>0.
Solution. For ξ in the Lie algebra let ξΘ be the corresponding vector field on Θ. Invariance gives dL(ξΘ)=0 identically. Differentiate this function in the direction of a tangent vector u at a critical point θ, in local coordinates: 0=∂u(∂iLξΘi)=HessL(u,ξΘ(θ))+∂iL(θ)∂uξΘi, and the second term vanishes because dL(θ)=0. Hence HessL(θ)(u,ξΘ(θ))=0 for all u. For the rescaling symmetry on {a,w>0}, relu(wx) is positively homogeneous in w, so f and therefore any loss is invariant; the group is (R>0,⋅) with generating vector field (a,−w). So at every critical point the Hessian has (a,−w) in its kernel: critical points are never isolated and never non-degenerate. In Hq the whole orbit is one point, and the degeneracy disappears; this is the practical meaning of the universal property in 1.1(iii). ◀
3 Prove 1.1(ii), and show that evaluation at a point x0 is a smooth map C∞(X,Rk)→Rk which is the special case μ=δ.
Solution. Let P:U→C∞(X,Rk) be a plot. By Definition 1.8 the map (r,x)↦P(r)(x) is smooth on U×X, so F(r,x,y)=ℓ(P(r)(x),y) is smooth on U×X×Rk. We must show that I(r)=∫F(r,x,y)dμ(x,y) is smooth on U. Let C be the compact support of μ and B⊂U a compact ball. Every partial derivative ∂rβF is continuous, hence bounded on B×C, and μ is finite. By dominated convergence I is continuous on B, and differentiation under the integral sign is justified for every ∂rβ by the mean value inequality with the bound on ∂rβ+eiF; induction on ∣β∣ gives I∈C∞(B). So R∘P is smooth for every plot P, i.e. R is smooth. Then L=R∘ρ is smooth, it is constant on the fibres of ρ, so it descends to Hq by the universal property of the quotient, and to Hs as the restriction of R. For the last assertion take μ the Dirac measure at (x0,0) and ℓ(h,y)=hj; or note directly that evaluation at x0 is the composite of ev:C∞(X,Rk)×X→Rk with h↦(h,x0). ◀
4 Prove the fundamental lemma used in the proof of 1.3.
Solution. We prove by induction on the typing derivation of Γ⊢t:τ, with Γ=x1:τ1,…,xn:τn, that for all (ai,bi)∈Sτi the pair ([[t]]∘a,[[Dt]]∘b) lies in Sτ. Here a=(a1,…,an):R→[[Γ]] and b:R→[[DΓ]]; both composites are smooth curves because denotations are smooth maps.
Variablexi: the pair is (ai,bi).
Constantc: the pair is (s↦c,s↦(c,0)), and 0 is the derivative of the constant curve.
Operationop(t1,…,tk): by induction [[tj]]∘a=hj and [[Dtj]]∘b=(hj,hj′) for smooth hj:R→R. By the definition of the macro, [[Dop(t)]]∘b=(op(h1,…,hk),j∑∂jop(h1,…,hk)hj′), and by the chain rule the second component is the derivative of s↦op(h1(s),…,hk(s))=[[op(t)]](a(s)).
Pairing and projections: immediate from the definition of Sτ×σ and the fact that D commutes with them.
Applicationtu with Γ⊢t:σ→τ and Γ⊢u:σ: by induction (a,b)=([[t]]∘a,[[Dt]]∘b)∈Sσ→τ and (c,d)=([[u]]∘a,[[Du]]∘b)∈Sσ. By the definition of Sσ→τ the pair (s↦a(s)(c(s)),s↦b(s)(d(s))) is in Sτ, and these curves are [[tu]]∘a and [[D(tu)]]∘b because D(tu)=DtDu and application denotes evaluation.
Abstractionλx:σ.t with Γ,x:σ⊢t:τ: we must show that (a,b)=([[λx.t]]∘a,[[D(λx.t)]]∘b)∈Sσ→τ. Let (c,d)∈Sσ. Then a(s)(c(s))=[[t]](a(s),c(s)) and, since D(λx.t)=λx.Dt, b(s)(d(s))=[[Dt]](b(s),d(s)). The extended tuples (a,c) and (b,d) are related componentwise, so the induction hypothesis for t in the context Γ,x:σ gives exactly that these two curves are related by Sτ.
This completes the induction. The only case with analytic content is that of the primitive operations; the rest is the statement that the relations Sτ are defined so as to be preserved by the Cartesian closed structure, and smoothness of all curves involved is Theorem 1.9. ◀
Three questions about agents, answered in Diff. When can an agent plan motions smoothly in the start and goal? Exactly when its configuration space is smoothly contractible, and for quasi-tori exactly when it is given a homotopy class of route. What can an agent learn about a space from smooth scalar observations alone? Its reflexive hull, and nothing more. In what categories do programs that manipulate functions, probabilities and derivatives have semantics? In categories of concrete sheaves, of which Diff is the smooth instance.
Source in the book.[IZ, art. 5.1–5.11] (paths, homotopy, contractibility), [IZ, Exercises 79–80] (reflexive spaces), [IZ, art. 1.57–1.60] (functional diffeology).
Smooth motion planning
Let X be the configuration space of a mechanical system. For rigid robots it is a manifold; for linkages at singular configurations, for identical robots that may be relabelled, for soft bodies whose configurations are embeddings of a curve or a surface, it is not, but it is always a diffeological space. The endpoint mapends:Paths(X)⟶X×X,γ⟼(γ(0),γ(1)) is smooth. Following Farber [21], a motion planner on A⊆X×X is a section of ends over A; we call it smooth if it is smooth as a map Asub→Paths(X), which by Theorem 1.9 means that the path s(a,b) depends smoothly on (a,b) jointly with time. The smooth topological complexityTCD(X) is the least number of D-open subsets covering X×X each of which carries a smooth motion planner, or ∞.
Theorem 1.1 (Smooth planners). Let X be a non-empty diffeological space.
X has a smooth motion planner on all of X×X if and only if X is smoothly contractible.
If X is smoothly dominated by Y — there are smooth f:X→Y and g:Y→X with g∘f smoothly homotopic to idX — then TCD(X)≤TCD(Y). In particular TCD is an invariant of smooth homotopy type.
If TCD(X)<∞ then X is connected, and if TCD(X)=1 then ΠX≃∗.
Proof. (i) Let s be a smooth planner and fix x0. The map H(x,t)=s(x,x0)(t) is smooth on X×R by Theorem 1.9, with H(x,0)=x and H(x,1)=x0: a contraction. Conversely let H:X×R→X be smooth with H0=id and H1≡x0, and let λ be a smashing function ([exo:smash]). Define s(x,y)(t)={H(x,λ(2t))H(y,λ(2−2t))t≤21,t≥21. Both expressions are smooth in (x,y,t) and both equal x0 for t near 21, so s:X×X×R→X is smooth, i.e. s:X×X→Paths(X) is smooth. And s(x,y)(0)=H(x,0)=x, s(x,y)(1)=H(y,0)=y. (ii) is [exo:TC-invariance]. (iii) A planner on a D-open cover joins any two points by a path. If TCD(X)=1, apply (i) and Proposition 1.1. ◻
The proof of (i) is Farber’s, and that is the point: in Diff it holds verbatim for every space, because “a family of paths depending smoothly on its endpoints” and “a smooth map into the path space” are the same thing. For manifolds one usually settles for continuous planners; for the singular and infinite-dimensional configuration spaces listed above there was previously no category in which to say “smooth planner” at all.
Three planning problems. On the circle no single smooth rule works. On the cross, a singular space, one does. On the irrational torus no rule works on any D-open set, but a smooth rule exists once the homotopy class of the route is part of the input (1.2).
Proposition 1.2 (Planning on quasi-tori). Let Γ⊂Rn be a dense countable subgroup and TΓ=Rn/Γ, for instance Tα.
The only D-open subsets of TΓ×TΓ are ∅ and the whole space, and TΓ is not contractible if Γ=0. Hence TCD(TΓ)=∞.
Let Π1(TΓ)=(Rn×Rn)/Γdiag, the quotient by the diagonal action; it is the space of triples (start, goal, homotopy class of paths between them), and it covers TΓ×TΓ with group Γ. The straight-line rule s[x,y](t)=q((1−t)x+ty) is a well-defined smooth map Π1(TΓ)→Paths(TΓ) lifting the covering: a smooth planner whose input includes a class of route.
No smooth planner defined on TΓ×TΓ, or on any non-empty D-open subset of it, exists; and s does not descend, because s[x,y] and s[x,y+γ] have the same endpoints and are not homotopic for γ=0.
Proof. (i) [exo:Dtop-Talpha] for the D-topology; π1(TΓ)=Γ by Corollary 1.5; then 1.1(i). (ii) The diagonal action is principal, so Π1(TΓ) is a diffeological space and R2n→Π1(TΓ)→TΓ2 are coverings; a point of Π1(TΓ) over (a,b) is a choice of lifts of a,b up to simultaneous translation, which is a homotopy class of paths from a to b by [exo:pi1-Talpha]. The map (x,y,t)↦q((1−t)x+ty) is smooth and invariant under (x,y)↦(x+γ,y+γ), since q is Γ-invariant; so it descends along the subduction R2n×R→Π1(TΓ)×R. (iii) The first statement is (i). The lifts of s[x,y] and s[x,y+γ] starting at x end at y and y+γ. ◻
For an agent this is a statement about what must be sensed. A system whose state is known only modulo a dense group — two encoders with incommensurable periods, a phase known modulo two incommensurable clocks — cannot be controlled by any smooth law in the quotient state alone, not even locally. It can be controlled smoothly given a lift, that is, with odometry; and the amount of extra state needed is exactly the fundamental group. In stack-theoretic terms, the planner is defined on the atlas of the fundamental groupoid.
Remark 1.3 (Cohomological bounds). A D-open cover {A,B} of X is a pushout in SmoothSet, hence a homotopy pushout in H, and Π preserves it; so Mayer–Vietoris holds for the cohomology of the shape, and the usual lower bound of TC by the zero-divisor cup-length of H∙(ΠX) holds for TCD with the usual proof. For manifolds TCD≥TC trivially; whether equality holds is a question about smoothing sections (Coda).
Observation versus intervention
An agent can interrogate an unknown smooth world X in two ways. It can observe: measure smooth real-valued quantities f:X→R. Or it can intervene: run a smoothly parametrised family of experiments P:U→X. A diffeology is a specification of the possible interventions; a Sikorski or Frölicher structure is a specification of the possible observations. For a set X, a set D of parametrisations and a set F of real functions, define Fun(D)Plot(F)={f:X→R:f∘P is smooth for all P∈D},={P∈Param(X):f∘P is smooth for all f∈F}.
Theorem 1.4 (The observation–intervention Galois connection).
Fun and Plot are order-reversing, D⊆PlotFun(D), F⊆FunPlot(F), and FunPlotFun=Fun, PlotFunPlot=Plot.
Plot(F) is a diffeology for every F. For a diffeology D, the reflexive hullD^=PlotFun(D) is the largest diffeology on X with the same smooth real functions as D.
Two diffeologies on X have the same smooth real functions if and only if they have the same reflexive hull.
X↦X^=(X,D^) is a functor, and X→X^ is the universal smooth map from X to a reflexive space, one with D=D^.
Manifolds, half-spaces and corners are reflexive. The hull of Tα is the coarse diffeology; the hull of Δ1=R/{±1} is the half-line H; the hull of the wire diffeology on Rn is the standard diffeology.
Proof. (i) is formal for any relation: here the relation between P and f is “f∘P is smooth”. (ii) Constants, locality and smooth reparametrisation are each preserved by the condition “f∘P smooth”, so Plot(F) satisfies [D1]–[D3]. By (i), Fun(D^)=Fun(D), and if D′ is a diffeology with Fun(D′)=Fun(D) then D′⊆PlotFun(D′)=D^. (iii) follows. (iv) Let f:X→Y be smooth and P∈D^X. For g∈Fun(DY) we have g∘f∈Fun(DX), so g∘f∘P is smooth; hence f∘P∈D^Y. So f:X^→Y^ is smooth, and if Y is reflexive f factors through X→X^, uniquely since that map is the identity on points. (v) For a manifold M, let P be a parametrisation along which all smooth functions are smooth. Testing against bump functions shows P is continuous, and testing against coordinate functions cut off by bump functions shows P is smooth in charts. Half-spaces and corners: the same argument with Theorem 1.1. For Tα, Fun is the constants (Proposition 1.10) and every parametrisation is smooth along constants. For Δ1, Fun is {g∘sq:g∈C∞(R)} by [exo:halfline-functions], and a parametrisation P of [0,∞) with g∘P smooth for all smooth g is a smooth map into R with values in [0,∞): a plot of H. For the wire diffeology, Fun consists of the functions smooth along all smooth curves, which by Boman’s theorem [6] are the smooth functions; then Plot of those is the standard diffeology by the manifold case. ◻
The Galois connection between interventions and observations. Its closed elements on the left are the reflexive diffeologies.
Theorem 1.5 ([4). ; [IZ, Exercises 79–80]]The full subcategory of reflexive diffeological spaces is isomorphic to the category of Frölicher spaces, and it is a reflective subcategory of Diff with reflector X↦X^.
Together these make a precise epistemic statement. An agent restricted to smooth scalar observations can identify a smooth world only up to its reflexive hull. It cannot tell the irrational torus from a structureless set, the orbifold R/{±1} from a half-line, or a plane in which only one-dimensional motions are possible from an ordinary plane. Each pair is separated by an intervention: a plot of one that is not a plot of the other. The hull is a closure operator, so there is a canonical “most permissive world consistent with all observations”, and by the theorem observation-based learning of smooth structure converges, at best, to that world. This is the differential-geometric version of the familiar gap between observational and interventional data, and the reason is the one given in Functions versus plots: observations are maps out, quotients are colimits, and the maps out of a colimit do not determine the diagram of which it is the colimit.
Semantic universes for programs
Theorem 1.3 used one property of Diff: it is a Cartesian closed category of spaces defined by plots. The same construction over other sites gives the semantic categories used for probabilistic and differentiable programming, and the theorem that makes them work is the same.
Theorem 1.6 (Cartesian closure for concrete sheaves; [17, 3). ]Let C be a concrete site with finite products, preserved by the functor of points. Then ConcSh(C) is Cartesian closed: for concrete sheaves X,Y, the set Hom(X,Y) with plots {P:∣U∣→Hom(X,Y):(u,x)↦P(u)(x) is a morphism U×X→Y} is a concrete sheaf YX, and Hom(Z×X,Y)≅Hom(Z,YX) naturally.
Proof. The proof of Theorem 1.9 in [exo:ccc] used three facts: a plot is a morphism from a representable, products of representables are representable, and a pair of plots is a plot of the product. All hold here. It remains to see that YX satisfies the sheaf condition. Let P:∣U∣→Hom(X,Y) restrict to plots on a covering family {Ui→U}. A plot of U×X is a pair (ρ,Q):V→U×X; the pullback of the cover along ρ is refined by a cover {Vj→V} on each member of which ρ factors through some Ui, so v↦P(ρ(v))(Q(v)) is a plot of Y on each Vj, hence a plot of Y because Y is a sheaf. ◻
Corollary 1.7 (Quasi-Borel spaces; Heunen–Kammar–Staton–Yang [25). ]A quasi-Borel space is a set X with a set MX of functions R→X containing the constants, closed under precomposition with Borel maps R→R, and closed under gluing along countable Borel partitions of R. These are the concrete sheaves on the site of standard Borel spaces with countable Borel covers, and they form a Cartesian closed category, whereas the category of measurable spaces is not Cartesian closed [2].
The three axioms of a quasi-Borel space are [D1], [D3] and [D2] with “smooth” replaced by “Borel” and open covers by countable Borel partitions. The parallel is exact (1.1): in each row a classical category of spaces lacks function spaces, and the category of concrete sheaves on its site of parameter spaces has them. For artificial intelligence the relevance is that a probabilistic program which takes a likelihood function as an argument, or a differentiable program which takes a loss function as an argument, has a denotation only in the right-hand column.
Three instances of one theorem. The second column is why semantics cannot be given in the first; the third is 1.6.
Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.
1 Write down a global smooth motion planner on a star-shaped open subset of Rn and on the cross K={xy=0}⊂R2.
Solution. Let X be star-shaped about x0, or X=K with x0=0. In both cases H(x,t)=x0+(1−λ(t))(x−x0) is a smooth contraction with values in X: for the cross, scaling preserves {xy=0}, and H is smooth into R2 with values in K, hence smooth into Ksub. The planner of 1.1(i) assigns the path that runs from x to x0 along the segment, is stationary near x0, and runs on to y. On a convex set the simpler rule s(x,y)(t)=(1−t)x+ty also works; on the cross it does not, since the segment between points on different arms is not contained in K. ◀
2 Show that TCD(S1)=2.
Solution.S1 is not contractible (π1=Z), so TCD(S1)≥2 by 1.1(i). Write points as eiθ. On A1={(a,b):b=−a} there is a unique ϕ∈(−π,π) with b=aeiϕ, depending smoothly on (a,b); put s1(a,b)(t)=aeiλ(t)ϕ, the shortest arc. On A2={(a,b):b=a} there is a unique ψ∈(0,2π) with b=aeiψ, depending smoothly on (a,b); put s2(a,b)(t)=aeiλ(t)ψ, the anticlockwise arc. Both are smooth sections of the endpoint map over open sets, and A1∪A2=S1×S1. ◀
2 The configuration space of two indistinguishable points on a line is C=R2/S2. Show that it has a global smooth motion planner, although (Theorem 1.4) there is no smooth way to label the two points.
Solution. In the coordinates u=a+b, w=a−b the swap is (u,w)↦(u,−w), so C≅R×Δ1. Both factors are smoothly contractible ([exo:contractible]), hence so is the product, and 1.1(i) gives a planner. Explicitly, the contraction h((a,b),t)=(1−λ(t))(a,b) of R2 is S2-equivariant and descends: the planner moves both points to the origin and out again. A smooth labelling would be a smooth section of R2→C near the diagonal, which does not exist by [exo:sort] and Theorem 1.4. Planning and labelling are different tasks: the planner is a map out of C×C, the labelling a map out of C into the covering space. ◀
3 Let X be R2 with the wire diffeology and X′ the set R2 with the diffeology D′ generated by the lines parallel to the two axes. Determine Fun for both. Show that an observer cannot distinguish X from the standard plane, can distinguish X′ from it, and that X′ is nevertheless not reflexive.
Solution.X. By 1.4(v) the hull of the wire diffeology is the standard one: same observables as the plane. The identity R2→R2 is an intervention available in the plane and not in X ([exo:wire]).
X′. A plot is locally constant or locally of the form r↦(h(r),c) or r↦(c,h(r)) with h smooth. So Fun(D′) is the set of separately smooth functions: f(⋅,c) and f(c,⋅) smooth for every c. It is strictly larger than C∞(R2): f(x,y)=xy/(x2+y2), f(0,0)=0, is separately smooth and discontinuous. So an observer who finds f among the observables knows the world is not the standard plane.
The hull of X′ excludes diagonal motion. The curve c(t)=(t,t) is not in PlotFun(D′), since f∘c takes the value 0 at t=0 and 21 elsewhere. More generally, if P is in the hull then P is smooth, the coordinates being observables, and at every point r one of dP1(r), dP2(r) vanishes: otherwise some direction v has dP1(v)=0=dP2(v), and the translate of f to P(r) is discontinuous along t↦P(r+tv).
The hull of X′ is larger than D′. With φ as in [exo:cross], let P(t)=(φ(−t),φ(t)), the curve that turns the corner at the origin. For a separately smooth f put g=f(⋅,0) and k=f(0,⋅), both smooth. Then f(P(t))=g(φ(−t))+k(φ(t))−f(0,0) for all t, a smooth function. So P is in the hull. But P is not a plot of D′: near t=0 it lies in no single line. Hence D′⊊D′^ and X′ is not reflexive.
So the wire plane is observationally a plane; the grid plane is observationally not a plane, but an observer still overestimates what can be done in it, crediting it with motions that turn corners. Only interventions settle either question. ◀
3 Show that the reflexive hull does not commute with quotients: exhibit a subduction π:X→B with X reflexive for which X^→B^ is not a subduction.
Solution. Take π=qα:R→Tα. R is reflexive, so R^=R, and Tα^ is the set R/Λα with the coarse diffeology. The map R→Tα^ is smooth and surjective, but a parametrisation of Tα^ that is not locally liftable, such as t↦qα(∣t∣) (Proposition 1.10), is a plot of the target with no local lift. So the hull of the quotient is not the quotient of the hull. Equivalently: the reflector X↦X^ is a left adjoint and so preserves colimits computed in the category of reflexive spaces, where the quotient of R by Λα is the coarse space; the category of Frölicher spaces has quotients, and they are the wrong ones. ◀
Solution. Let f:X→Y, g:Y→X be smooth and h:X×R→X a smooth homotopy with h0=g∘f and h1=idX. Let V1,…,Vk be D-open sets covering Y×Y with smooth planners σj:Vj→Paths(Y). Put Uj=(f×f)−1(Vj); these are D-open, because smooth maps are D-continuous, and they cover X×X. We construct a smooth planner on Uj.
Three paths. For (x,x′)∈Uj consider γ1(t)γ2(t)γ3(t)=h(x,1−λ(t))=g(σj(f(x),f(x′))(λ(t)))=h(x′,λ(t))from x to gf(x),from gf(x) to gf(x′),from gf(x′) to x′, where λ is a smashing function. Each is stationary near t≤0 and t≥1, each depends smoothly on (x,x′,t): for γ2 this is the smoothness of σj∘(f×f):Uj→Paths(Y) together with Theorem 1.9.
Concatenation. Define sj(x,x′)(t) to be γ1(3t) for t≤31, γ2(3t−1) for 31≤t≤32 and γ3(3t−2) for t≥32. Because λ is constant near 0 and near 1, there is a fixed ε>0, independent of (x,x′), such that on ∣t−31∣<ε the first two expressions are both equal to gf(x), and on ∣t−32∣<ε the last two are both equal to gf(x′). So on the three overlapping open sets t<31+ε, 31−ε<t<32+ε, t>32−ε of Uj×R the map (x,x′,t)↦sj(x,x′)(t) coincides with a smooth map, and by locality [D2] applied to its composites with plots it is smooth. Hence sj:Uj→Paths(X) is smooth, with sj(x,x′)(0)=h(x,1)=x and sj(x,x′)(1)=h(x′,1)=x′.
So X×X is covered by k D-open sets with smooth planners, and TCD(X)≤TCD(Y). If X and Y are smoothly homotopy equivalent each dominates the other and the two numbers coincide. ◀
System design: state spaces, quotients, clocks
A designer of systems with continuous state composes state spaces, abstracts them, and identifies states that should not be distinguished. We prove three results about doing so smoothly. Every smooth machine has two minimal realisations, a quotient and a subspace of the space of behaviours, which differ in general. A system of incommensurable clocks is classified, up to re-gearing, by a quasi-torus on which no conserved quantity exists. And reduction by a symmetry group is lossless exactly when the action is principal, in which case equivariant components upstairs are the same as components downstairs.
Source in the book.[IZ, art. 1.46–1.60] (subductions, quotients, strict maps, functional diffeology), [IZ, art. 8.11–8.16] (principal and associated bundles), [IZ, art. 8.38] (Kronecker flows).
A design rule
State spaces are built from other state spaces by a small number of operations, and each is a universal construction (1.1). The category of manifolds has the first row conditionally and the others not at all, which is why continuous-state design is usually done in coordinates with the structure maintained by hand. Diff has all of them unconditionally (Theorem 1.6, Theorem 1.9, Theorem 1.5), with one refinement that this chapter is about: the quotient in Diff is a quotient of points, and when the identifications themselves carry information the right object is the quotient in SmoothSet or in H (Theorem 1.8).
Design operations and the universal constructions that implement them in Diff.
design operation
construction
smoothness means
compose subsystems
product, pullback
families are pairs of families
impose an invariant
subspace (induction)
a family is smooth iff smooth in the ambient space
abstract, deduplicate
quotient (subduction)
every family of abstract states lifts locally
switch between modes
sum, pushout
a family stays locally in one mode
pass a component as data
function space
a family of components is a component with a parameter
depend on a parameter
slice, Πf
fibrewise function spaces
Two minimal realisations
Fix diffeological spaces I of inputs and O of outputs. A smooth machine is a diffeological space S of states with smooth maps δ:S×I→S,out:S→O, and a morphism of machines is a smooth map of state spaces commuting with δ and out. Write δ∗(s;i1,…,in) for the state reached from s on the input word i1⋯in. The space of behaviours is B=n≥0∏C∞(In,O), a machine with outB(b)=b0 and δB(b,i)n(i1,…,in)=bn+1(i,i1,…,in). The behaviour of a state s of a machine M is βM(s)=((i1,…,in)↦out(δ∗(s;i1,…,in)))n≥0.
Theorem 1.1 (Two minimal realisations). Let M=(S,δ,out) be a smooth machine.
B is a terminal object in the category of smooth machines: βM:M→B is the unique morphism.
The coimage Mq=S/∼, where s∼s′ iff βM(s)=βM(s′), and the image Ms=βM(S)sub carry unique machine structures making M↠MqκMs↪B morphisms of machines. κ is a bijection.
(Universal properties.) Every morphism M→M′ that is a subduction is followed by a unique morphism M′→Mq under M: Mq is the smallest quotient of M. Every morphism from M to a machine whose behaviour map is an induction factors uniquely through M→Ms: Ms is the reflection of M into extensional machines.
κ is an isomorphism if and only if βM is strict. It is not always: for S=R, I=∗, δ=id, out(s)=s2 one gets Mq=R/{±1} and Ms=[0,∞)sub.
Machines with the same set of behaviours have the same Ms, but can have non-diffeomorphic Mq: for Sn=Rn, I=∗, δ=id, out(s)=∣s∣2, all Ms coincide and the Mq=Rn/O(n) are pairwise non-diffeomorphic.
Proof. (i) The n-th component of βM is the adjoint of the smooth map S×In→O, (s,)↦out(δ∗(s;)), so it is smooth by Theorem 1.9, and a map into a product is smooth iff its components are. δB is smooth because partial evaluation C∞(In+1,O)×I→C∞(In,O) is. The identities outBβM=out and βMδ=δB(βM×id) are immediate. If h:M→B is any morphism then h(s)n()=outB(δB∗(h(s);))=outB(h(δ∗(s;)))=out(δ∗(s;)).
(ii) δ is compatible with ∼, because βM(δ(s,i))=δB(βM(s),i). The map S×I→Mq×I is a subduction (Proposition 1.7), so δ descends to a smooth δq:Mq×I→Mq; and out descends. The image βM(S) is closed under δB, and restrictions of smooth maps to subspaces, with values in subspaces, are smooth. Uniqueness is clear since S→Mq is onto and Ms→B is injective. κ is the comparison map of Theorem 1.2.
(iii) If h:M→M′ is a morphism then βM′h=βM by (i), so h identifies only ∼-equivalent states; if h is a subduction, S→Mq factors uniquely and smoothly through it, and the factor is a morphism because h is onto. If h:M→N with βN an induction, then βN identifies N with a subspace of B containing βM(S), and the inclusion Ms↪βN(N)sub≅N is the required factor.
(iv) is the definition of strict, and Proposition 1.11. (v) All these machines have β(S)={(c,c,…):c≥0}, a copy of [0,∞)sub in B=RN; the classes of ∼ are the spheres, so Mq=Rn/O(n), and [IZ, Exercise 50]. ◻
The two minimal realisations of a smooth machine. In classical automata theory they coincide (Myhill–Nerode); for manifolds neither exists in general; in Diff both exist, and the map between them is a smooth bijection that is a diffeomorphism exactly for strict behaviour maps.
For design this separates two meanings of the word “state”. Ms is the state space of the specification: it depends only on the observable behaviour, and a smooth family in it is a smooth family of behaviours, which is the kind of object over which a test suite or a contract quantifies. Mq is the state space of the implementation up to observation: a smooth family in it is one that some smooth family of internal states realises. By part (iv) a specification can have smooth families of behaviours that no smooth family of implementation states realises — the family (r,s)↦r2+s2 in the example — and by part (v) two implementations of one specification can have observational quotients of different local dimension. Neither phenomenon can be stated for manifolds, because neither quotient is one.
Clocks
Consider N≥2 periodic components with frequencies ω=(ω1,…,ωN)∈RN: counters, oscillators, tasks released periodically. Their joint phase is a point of the torus TN=RN/ZN and evolves by the linear flow x↦x+tω. Call ωnon-resonant if k⋅ω=0 for all k∈ZN∖{0}: no integer combination of the clocks is stationary. The space of phase relations of the system is the leaf space Qω=TN/R, whose points are the possible trajectories of the joint phase. Two initial conditions have the same long-run behaviour, up to a time shift, exactly when they define the same point of Qω.
Theorem 1.2 (Multi-clock systems). Let ω,ω′∈RN be non-resonant, N≥2.
Qω≅RN−1/Γω is a quasi-torus, where Γω≅ZN is the image of ZN in RN/Rω, a dense subgroup. The projection TN→Qω is a principal R-bundle, and ΠQω≃BZN≃TN.
Every D-continuous function on Qω is constant: the system has no non-trivial continuous conserved quantity.
Qω≅Qω′ if and only if ω′=cUω for some U∈GLN(Z) and c∈R×.
Diff(Qω)≅Qω⋊Σω, where Σω={U∈GLN(Z):Uω∈Rω} is the discrete group of unimodular integer matrices with eigenvector ω.
Proof. (i) Let p:RN→V=RN/Rω and Γω=p(ZN). Both Qω and V/Γω are the quotient of RN by the subgroup ZN+Rω, so they are diffeomorphic. If cω∈ZN with c=0, any non-zero integer vector orthogonal to cω would violate non-resonance; so Rω∩ZN=0 and p is injective on ZN. By Kronecker’s theorem non-resonance is equivalent to density of every orbit of the flow in TN, that is, to density of ZN+Rω in RN, that is, to density of Γω in V. The flow is the action of a subgroup of the diffeological group TN, so the quotient map is principal by Corollary 1.3; the subgroup is diffeomorphic to R as in [IZ, Exercise 31]. The shape is Corollary 1.5. (ii) A D-open set of V/Γω has an open preimage invariant under a dense group of translations. (iii) By Theorem 1.1(c), Qω≅Qω′ iff there is a linear isomorphism A:V→V′ with AΓω=Γω′. Given such A, there is a unique bijection U of ZN with p′U=Ap on ZN, because p′ is injective on ZN; it is additive, so U∈GLN(Z), and p′U=Ap on RN by linearity. Hence U(kerp)=kerp′, i.e. Uω∈Rω′. Conversely such a U induces A. (iv) By Theorem 1.1(b) every smooth self-map is affine, and its linear part corresponds to U as in (iii); the diffeology is treated as in Theorem 1.3(iii). ◻
Two clocks with period ratio the golden ratio. There is no hyperperiod and no continuous function of the joint phase is conserved, but the space of phase relations is the diffeological group Tφ, with a self-similarity: the frequencies ω=(1,1/φ) satisfy Uω=φω for , so replacing the counters (c1,c2) by (c1+c2,c1) gives the same system run φ times faster.
In design terms, (ii) means that there is nothing to synchronise on. A system of rate-monotonic periodic tasks with rational period ratios has a hyperperiod, a circle of phase relations, and schedules can be tabulated over it; with incommensurable periods the corresponding object exists but is a quasi-torus, and no table indexed by a continuous invariant of the phase can exist. (iii) is a normal form theorem: two multi-rate systems are the same up to re-gearing — replacing the counters by unimodular integer combinations of themselves and rescaling time — exactly when their leaf spaces are diffeomorphic. For N=2 this is Corollary 1.2 with α=ω2/ω1, and the invariant is the tail of the continued fraction of the rate ratio. (iv) gives the non-trivial re-gearing self-equivalences of a system: Σω is {±1} for generic rates, and it is the unit group Z[θ]×, of rank r1+r2−1 by Dirichlet’s theorem, when ω=(1,θ,…,θN−1) for an algebraic integer θ of degree N ([exo:three-clocks]; compare Proposition 1.5). Finally, for N=2, the principal R-bundles over Qω are computed in Theorem 1.7; they are the ways of attaching to the phase relation a real-valued accumulated quantity defined up to a flow. They depend on the Diophantine type of the rate ratio: for Diophantine ratios the only such quantity is elapsed time, up to scale, and for Liouville ratios there are others.
Lossless reduction
Let a diffeological group G act on a state space X by symmetries: relabellings of identical replicas, changes of frame, gauge freedoms of a representation. One wants to work with the reduced state space B=X/G. When is nothing lost? Write DiffG/X for the category of diffeological spaces with G-action and an equivariant smooth map to X; think of its objects as components attached to the system whose state transforms with the symmetry.
Theorem 1.3 (Lossless symmetry reduction). Let π:X→B=X/G be the quotient map.
The following are equivalent: the action is principal; X≃B×BG∗ in H, compatibly with the action and the projection, for a map c:B→BG; along every plot of B the state space is locally a product of reduced state and gauge, P∗X≅locU×G.
If the action is principal, then pulling back along π is an equivalence of categories π∗:Diff/B≃DiffG/X,with inverse E↦E/G.
In general H/(X//G) is equivalent to the ∞-category of objects of H with G-action and an equivariant map to X, and the functor of (ii) is the restriction of this equivalence along X//G→B, which is an equivalence exactly in the principal case.
So for a principal symmetry one may store only the reduced state, and every equivariant observer, controller or attached data structure is equivalently a component over the reduced state space: the reduction is an equivalence of design spaces, not merely a projection. When the action is not principal the same statement holds verbatim for the stack X//G and fails for the space X/G; the space X/G lacks the isotropy groups, and a component over X/G carries no action of the isotropy group at a state with symmetry. The three levels at which states can be identified in a design are listed in 1.2.
Three levels of identification, from Theorem 1.8. Moving down the table increases the stored data and improves compositionality: only the last row satisfies 1.3(iii) unconditionally.
level
object
two states are identified…
engineering analogue
points
X/G∈Diff
if some symmetry relates them
canonical form, deduplicated key
germs
π0(X//G)∈SmoothSet
by a symmetry varying smoothly with the family
equivalence with a locally consistent reason
witnesses
X//G∈H
by a recorded symmetry
keep the isomorphism: migration, merge witness, version vector
Solved exercises
Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.
1 Compute the space of phase relations Qω for two clocks with ω=(2,3), and more generally for ω=(p,q) with p,q coprime integers.
Solution.Qω=R2/(Z2+Rω). The linear form ℓ(x,y)=qx−py has kernel Rω, so it identifies R2/Rω with R and carries Z2 onto qZ+pZ=Z. Hence Qω≅R/Z, a circle: the flow on T2 is periodic and the phase relation is the conserved quantity qx−pymod1. The hyperperiod is the period of the flow, t=1 in these units. The contrast with 1.2 is entirely in whether ℓ(Z2) is discrete or dense. ◀
2 Let I=R, O=R. Let M1 have S=R, δ(s,θ)=s, out(s)=s2, and let M2 have S=R2, δ(s,θ) the rotation of s by the angle θ, out(s)=∣s∣2. Show that M1 and M2 have the same specification Ms and non-isomorphic observational quotients.
Solution. In both machines the output along any input word is constant: β(s)n(θ)=s2, respectively ∣s∣2. So both images in B are the set of constant behaviours with value c≥0. The map c↦(constc)n from R to B is an induction, since each component R→C∞(Rn,R) is; so Ms≅[0,∞)sub for both, with trivial transition and output c. The observational quotients are R/{±1}=Δ1 and R2/∼ with classes the circles, which is Δ2=R2/O(2). These are not diffeomorphic [IZ, Exercise 50]; indeed no machine isomorphism can exist since the underlying spaces differ. An observer cannot tell M1 from M2; a designer who can run smooth two-parameter families of initial states can. ◀
2 Determine Σω for ω=(1,2,3) and exhibit an element of infinite order in Σω for ω=(1,θ,θ2) with θ3=θ+1.
Solution. Both are non-resonant, the entries being linearly independent over Q. Let Uω=cω and M=Zω1+Zω2+Zω3⊂R; then cM⊆M. For the first ω: c=c⋅1∈M, say c=a+b2+d3. Then c2=2b+a2+d6∈M forces d=0 and c3=a3+b6∈M forces b=0. So c=a∈Z, the integer matrix U−c annihilates ω, hence is zero by non-resonance, and U=c=±1: Σω={±1}. For the second, multiplication by θ preserves M=Z[θ]: θ⋅1=θ, θ⋅θ=θ2, θ⋅θ2=1+θ. So satisfies Uω=θω, detU=1, and it has infinite order because θ>1. Three clocks with rates 1:θ:θ2 are re-gearing equivalent to themselves under (c1,c2,c3)↦(c2,c3,c1+c2) with time rescaled by θ. ◀
3 Let X=R2 with the flow of x˙=−∇L, L(x)=(∣x∣2−1)2, and G=SO(2). Describe the reduced dynamics on X/G, say where the reduction is lossless in the sense of 1.3, and compute the shape of X//G and of X/G.
Solution.L is invariant and its flow is complete in forward time, so by the argument of Proposition 1.2 it descends to X/G=R2/SO(2)=Δ2 (the orbits of SO(2) and O(2) coincide). In the coordinate u=∣x∣2∈[0,∞), u˙=2x⋅x˙=−8u(u−1): the point u=0 is an unstable equilibrium, u=1 a stable one, and every other trajectory tends to u=1. On X∘=R2∖{0} the action is free and proper, hence principal, with quotient the manifold (0,∞); there the state is (radius, angle), the angle is pure gauge, and by 1.3(ii) equivariant components over X∘ are the same as components over (0,∞). At the origin the stabiliser is all of G and the reduction is lossy. Shapes: Π(X//G)=∗//S1=BS1=CP∞, while Π(X/G)=∗ ([exo:contractible]). The entire difference is the isotropy of one state. ◀
The functor π∗. For E→B put π∗E=X×BE, with G acting on the first factor and the projection to X. It is an object of DiffG/X, functorially in E.
The functor Q. For p:E→X in DiffG/X put Q(E)=E/G with the map to B induced by π∘p, which is G-invariant.
The action on E is principal. Let r↦(er,ergr) be a plot of E×E. Applying p gives the plot r↦(p(er),p(er)gr) of X×X, and since the action on X is principal r↦gr is a plot of G. In particular the action on E is free and E→E/G is a principal bundle.
π∗Q≅id. For E in DiffG/X consider ϕ:E→X×BE/G, ϕ(e)=(p(e),[e]). It is smooth, G-equivariant, and lies over E/G. Now X×B(E/G)→E/G is a principal G-bundle, being the pullback of π along E/G→B (Lemma 1.4(i)), and E→E/G is a principal G-bundle by the previous step. A morphism of principal bundles over the same base is an isomorphism (Lemma 1.4(ii)); so ϕ is a diffeomorphism, natural in E, and it commutes with the maps to X.
Qπ∗≅id. For E→B, the projection X×BE→E is a subduction, as the pullback of the subduction π, and its fibres are the G-orbits. So it induces a bijective subduction (X×BE)/G→E, which is a diffeomorphism (Proposition 1.7(iii)), natural in E and compatible with the maps to B.
Morphisms. Both constructions are functorial and the two natural isomorphisms exhibit them as inverse equivalences.
The argument used principality twice: to make E→E/G a bundle, and to make X×B(E/G) one. For a free action that is not principal the statement fails. Let Rδ act on X=R, so that B=∗, and take E=X×G with the diagonal action and the first projection. Then E/G≅R via (x,h)↦x−h, so π∗Q(E)=R×R, which is not diffeomorphic to E=R×Rδ. ◀
Coda
A summary of the argument, open questions, and the strata in which the statements will be formalised.
The argument in one page
A diffeology is a concrete sheaf on Cartesian spaces (Theorem 1.2). Concreteness is separatedness for the adjunction “points ⊣ codiscrete” (Lemma 1.5), so Diff is a quasitopos (Theorem 1.6): it has every limit, colimit and function space, two kinds of image (Theorem 1.2), and one defect, non-effective equivalence relations (Proposition 1.7). Repairing the defect twice leads to the topos SmoothSet and the ∞-topos H (Theorem 1.5), and the quotient of a space by a group then has three values, which coincide exactly for the principal actions of the book (Theorem 1.2, Theorem 1.8). In H the book’s main constructions become representable: forms by the smooth sets Ωk (Proposition 1.2), principal bundles by the stacks BG (Theorem 1.5), homotopy groups by the shape Π (Theorem 1.2). Formal properties of Π give the exact homotopy sequence (Theorem 1.4); the Poincaré lemma for sheaves gives de Rham’s theorem with its obstruction (Theorem 1.8) and the integration bundles (Theorem 1.11).
Every statement can be checked on the irrational torus. It is R//Z2, so its shape is a torus; its forms account for half of the torus’ cohomology and its R-bundles for the other half (Proposition 1.9); its maps are affine (Theorem 1.1), so its symmetries are units (Theorem 1.3), its isomorphism classes are ideal classes (Theorem 1.2), and its bundles are solutions of a cohomological equation with small divisors (Theorem 1.7).
The applications use the quasitopos more than the ∞-topos. Because a map has two images, hypothesis spaces (Theorem 1.1), invariant features (Proposition 1.6) and minimal realisations (Theorem 1.1) each come in two versions. By Cartesian closure, automatic differentiation (Theorem 1.3) and motion planning (Theorem 1.1) are one-line arguments. The distinction between a quotient and a homotopy quotient is the reason that canonical forms fail at symmetric points (Theorem 1.4) and the criterion for symmetry reduction to be lossless (Theorem 1.3).
Open questions
Strictness of realisation maps. For which architectures is ρ:Θ→C∞(X,Y) strict, so that the two hypothesis spaces of Theorem 1.1 coincide? For deep linear networks the question is whether every smooth family of matrices of rank at most k factors locally and smoothly through k dimensions.
Higher obstruction groups. Compute Hq(TΓ;Ωp) for quasi-tori of rank N>2. The answer should be governed by simultaneous Diophantine conditions on Γ, generalising Theorem 1.7; the E2 page should again be the cohomology of TN.
The smooth Oka principle beyond manifolds.Theorem 1.6(ii) holds for manifolds, and by Remark 1.6Π[Tα,BR]≃∗ is consistent with it even though Map(Tα,BR) is large. For which diffeological spaces X is Π[X,A]≃Map(ΠX,ΠA) for all A?
Smooth versus continuous planning. Is TCD(M)=TC(M) for every closed manifold M?
Arithmetic beyond the class group. In complex multiplication the torsor of Theorem 1.2 carries a Galois action and generates class fields. Manin’s question [43] is whether real multiplication has an analogue. Diffeology provides the objects and their isogenies; the invariants are the open part.
Reverse mode and stacks. Is there a version of Theorem 1.3 for programs whose types denote stacks, for instance programs manipulating data up to a symmetry?
Formalisation: what is ready
Formalisation is the subject of a sequel. The statements of this monograph fall into three strata by the infrastructure required (1.1). The first stratum is elementary: sets, plots and real analysis. The second requires sheaves on a site. The third requires an ∞-topos, and the natural target is not a model but an axiomatisation: cohesive homotopy type theory, in which ∫, ♭ and ♯ are primitive modalities [52], and in which Theorem 1.8, Theorem 1.4 and Theorem 1.8 are statements about types.
Strata for formalisation. Everything in stratum A is provable from the definition of a diffeology in Definition 1.1 with no category theory.
The quoted theorems on which the results depend, and which would have to be formalised or assumed, are four: Whitney’s theorem on even functions (Theorem 1.1), the triviality of diffeological bundles over Cartesian spaces [IZ, art. 8.19] (Lemma 1.4), the comparison of smooth homotopy groups with the shape (Theorem 1.2), and the structure-group theorem for orbifolds (Theorem 1.2).
A dictionary
In the table the vocabulary of [1] is set beside the categorical vocabulary used here; the book is cited by article in the left column.
delooping of a group object; groupoid of principal G-bundles
Ωk, Ωclk
sheaves of k-forms and closed k-forms on Cart
Hq(X;A)
π0MapH(X,BqA)
R, Rδ
the smooth additive group; the same group with the discrete diffeology
Λα, Tα, qα
Z+αZ; the irrational torus R/Λα; the projection R→Tα
TΓ
the quasi-torus Rn/Γ
Δn, H
Rn/O(n) with the quotient diffeology; [0,∞) with the subspace diffeology
Oα, Pic(O), RD
endomorphism ring of Tα; class group; regulator
Fl(X)
group of isomorphism classes of principal R-bundles over X
∥t∥
distance from t to the nearest integer
References
P. Iglesias-Zemmour, Diffeology, Mathematical Surveys and Monographs 185, American Mathematical Society, Providence, 2013.
R. J. Aumann, Borel structures for function spaces, Illinois J. Math. 5 (1961), 614–630.
J. C. Baez and A. E. Hoffnung, Convenient categories of smooth spaces, Trans. Amer. Math. Soc. 363 (2011), 5789–5825.
A. Batubenge, P. Iglesias-Zemmour, Y. Karshon and J. Watts, Diffeological, Frölicher, and differential spaces, preprint, arXiv:1712.04576.
D. Berwick-Evans, P. Boavida de Brito and D. Pavlov, Classifying spaces of infinity-sheaves, Algebr. Geom. Topol. 24 (2024), 4891–4937.
J. Boman, Differentiability of a function and of its compositions with functions of one variable, Math. Scand. 20 (1967), 249–268.
J. Buchmann and H. C. Williams, A key exchange system based on real quadratic fields, in Advances in Cryptology – CRYPTO ’89, Lecture Notes in Comput. Sci. 435, Springer, 1990, 335–343.
S. Bunk, The R-local homotopy theory of smooth spaces, J. Homotopy Relat. Struct. 17 (2022).
W. Castryck, T. Lange, C. Martindale, L. Panny and J. Renes, CSIDH: an efficient post-quantum commutative group action, in Advances in Cryptology – ASIACRYPT 2018, Lecture Notes in Comput. Sci. 11274, Springer, 2018, 395–427.
P. Donato and P. Iglesias, Exemples de groupes difféologiques: flots irrationnels sur le tore, C. R. Acad. Sci. Paris Sér. I Math. 301 (1985), 127–130.
E. J. Dubuc, Concrete quasitopoi, in Applications of Sheaves, Lecture Notes in Math. 753, Springer, 1979, 239–254.
L. Ducas and W. van Woerden, On the lattice isomorphism problem, quadratic forms, remarkable lattices, and cryptography, in Advances in Cryptology – EUROCRYPT 2022, Lecture Notes in Comput. Sci. 13277, Springer, 2022.
L. Ducas, E. W. Postlethwaite, L. N. Pulles and W. van Woerden, Hawk: module LIP makes lattice signatures fast, compact and simple, in Advances in Cryptology – ASIACRYPT 2022, Springer, 2022.
N. Dym, H. Lawrence and J. W. Siegel, Equivariant frames and the impossibility of continuous canonicalization, in Proc. 41st Int. Conf. on Machine Learning, PMLR 235 (2024), 12228–12267.
M. Farber, Topological complexity of motion planning, Discrete Comput. Geom. 29 (2003), 211–221.
S. Gürer and P. Iglesias-Zemmour, Differential forms on manifolds with boundary and corners, Indag. Math. 30 (2019), 920–929.
S. Hallgren, Polynomial-time quantum algorithms for Pell’s equation and the principal ideal problem, J. ACM 54 (2007), no. 1, Art. 4.
G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford University Press, 1979.
C. Heunen, O. Kammar, S. Staton and H. Yang, A convenient category for higher-order probability theory, in Proc. 32nd ACM/IEEE Symp. on Logic in Computer Science (LICS), 2017.
M. Huot, A. K. Lew, V. K. Mansinghka and S. Staton, ωPAP spaces: reasoning denotationally about higher-order, recursive probabilistic and differentiable programs, in Proc. 38th ACM/IEEE Symp. on Logic in Computer Science (LICS), 2023.
M. Huot, S. Staton and M. Vákár, Correctness of automatic differentiation via diffeologies and categorical gluing, in Foundations of Software Science and Computation Structures (FoSSaCS 2020), Lecture Notes in Comput. Sci. 12077, Springer, 2020, 319–338.
P. Iglesias, Fibrations difféologiques et homotopie, Thèse d’État, Université de Provence, Marseille, 1985.
P. Iglesias, Difféologie d’espace singulier et petits diviseurs, C. R. Acad. Sci. Paris Sér. I Math. 302 (1986), 519–522.
P. Iglesias, Y. Karshon and M. Zadka, Orbifolds as diffeologies, Trans. Amer. Math. Soc. 362 (2010), 2811–2831.
P. Iglesias and G. Lachaud, Espaces différentiables singuliers et corps de nombres algébriques, Ann. Inst. Fourier (Grenoble) 40 (1990), 723–737.
P. Iglesias-Zemmour, Čech–de Rham bicomplex in diffeology, Israel J. Math. 259 (2024), 239–276.
P. Iglesias-Zemmour, Diffeology and arithmetic of irrational tori, preprint, arXiv:2508.07460.
P. Iglesias-Zemmour and E. Prato, Quasifolds, diffeology and noncommutative geometry, J. Noncommut. Geom. 15 (2021), 735–759.
P. T. Johnstone, Sketches of an Elephant: A Topos Theory Compendium, Oxford Logic Guides 43–44, Oxford University Press, 2002.
H. Kihara, Model category of diffeological spaces, J. Homotopy Relat. Struct. 14 (2019), 51–90.
H. Kihara, Smooth singular complexes and diffeological principal bundles, preprint, arXiv:2202.00131.
D. Krepski, J. Watts and S. Wolbert, Sheaves, principal bundles, and Čech cohomology for diffeological spaces, preprint, arXiv:2111.01032.
A. Kriegl and P. W. Michor, The Convenient Setting of Global Analysis, Mathematical Surveys and Monographs 53, American Mathematical Society, 1997.
F. W. Lawvere, Axiomatic cohesion, Theory Appl. Categ. 19 (2007), 41–49.
M. V. Losik, Fréchet manifolds as diffeological spaces, Izv. Vyssh. Uchebn. Zaved. Mat. (1992), no. 5, 36–42.
J. Lurie, Higher Topos Theory, Annals of Mathematics Studies 170, Princeton University Press, 2009.
Yu. I. Manin, Real multiplication and noncommutative geometry (ein Alterstraum), in The Legacy of Niels Henrik Abel, Springer, 2004, 685–727.
E. Minichiello, Diffeological principal bundles and principal infinity bundles, preprint, arXiv:2202.11023.
E. Minichiello, The diffeological Čech–de Rham obstruction, preprint, arXiv:2401.09400.
T. Nikolaus, U. Schreiber and D. Stevenson, Principal ∞-bundles: general theory, J. Homotopy Relat. Struct. 10 (2015), 749–801.
D. Pavlov, Projective model structures on diffeological spaces and smooth sets and the smooth Oka principle, preprint, arXiv:2210.12845.
M. A. Rieffel, C∗-algebras associated with irrational rotations, Pacific J. Math. 93 (1981), 415–429.
U. Schreiber, Differential cohomology in a cohesive ∞-topos, preprint, arXiv:1310.7930.
G. W. Schwarz, Smooth functions invariant under the action of a compact Lie group, Topology 14 (1975), 63–68.
D. Shanks, The infrastructure of a real quadratic field and its applications, in Proc. 1972 Number Theory Conference, University of Colorado, Boulder, 1972, 217–224.
M. Shulman, Brouwer’s fixed-point theorem in real-cohesive homotopy type theory, Math. Structures Comput. Sci. 28 (2018), 856–941.
J.-M. Souriau, Groupes différentiels, in Differential Geometrical Methods in Mathematical Physics, Lecture Notes in Math. 836, Springer, 1980, 91–128.
K. Waldorf, Transgression to loop spaces and its inverse, I: Diffeological bundles and fusion maps, Cah. Topol. Géom. Différ. Catég. 53 (2012), 162–210.
S. Watanabe, Algebraic Geometry and Statistical Learning Theory, Cambridge University Press, 2009.
J. Watts and S. Wolbert, Diffeological coarse moduli spaces of stacks over manifolds, preprint, arXiv:1406.1392.
H. Whitney, Differentiable even functions, Duke Math. J. 10 (1943), 159–160.
Complete flattened LaTeX source
\documentclass[11pt,oneside,letterpaper]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[sc]{mathpazo}
\linespread{1.045}
\usepackage{microtype}
\usepackage[letterpaper,inner=1.2in,outer=1.2in,top=1.1in,bottom=1.15in,headheight=14pt]{geometry}
\usepackage{amsmath,amssymb,amsthm,mathtools,mathrsfs,stmaryrd,bm}
\usepackage{enumitem,booktabs,array,multicol,longtable}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz,tikz-cd,pgfplots}
\usetikzlibrary{arrows.meta,calc,decorations.markings,decorations.pathmorphing,positioning,patterns,shapes.geometric,fit,backgrounds}
\pgfplotsset{compat=1.18}
\usepackage[most]{tcolorbox}
\usepackage{titlesec,fancyhdr,caption}
\usepackage[colorlinks=true,linkcolor=hcsteal,citecolor=hcsrust,urlcolor=hcsteal,bookmarksnumbered=true,
pdftitle={Diffeology in Higher Categories},pdfsubject={Higher Categorical Semantics monograph}]{hyperref}
\usepackage[nameinlink,capitalise,noabbrev]{cleveref}
\definecolor{hcsteal}{HTML}{0F5C63}
\definecolor{hcsrust}{HTML}{A4491F}
\definecolor{hcsink}{HTML}{1E2630}
\definecolor{hcssand}{HTML}{F5EFE2}
\definecolor{hcsmist}{HTML}{E6F0F0}
\definecolor{hcsgold}{HTML}{C8912B}
\definecolor{hcsgrey}{HTML}{7A8792}
\definecolor{hcsplum}{HTML}{6B3F6E}
\color{hcsink}
\titleformat{\chapter}[display]
{\normalfont\bfseries\color{hcsteal}}
{\large\scshape\MakeLowercase{\chaptertitlename}\ \thechapter}{0.6ex}
{\Huge\color{hcsink}\raggedright}[\vspace{0.6ex}{\color{hcsgold}\titlerule[1.2pt]}]
\titlespacing*{\chapter}{0pt}{0pt}{3.2ex}
\titleformat{\section}{\normalfont\Large\bfseries\color{hcsteal}}{\thesection}{0.8em}{}
\titleformat{\subsection}{\normalfont\large\bfseries\color{hcsink}}{\thesubsection}{0.7em}{}
\titleformat{\part}[display]{\normalfont\Huge\bfseries\color{hcsteal}\centering}{\Large\scshape\MakeLowercase{Part}\ \thepart}{1ex}{}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[L]{\small\scshape\color{hcsgrey}\nouppercase{\leftmark}}
\fancyhead[R]{\small\color{hcsgrey}\thepage}
\renewcommand{\headrulewidth}{0.3pt}
\renewcommand{\headrule}{\color{hcsgrey}\hrule height 0.3pt}
\fancypagestyle{plain}{\fancyhf{}\fancyfoot[C]{\small\color{hcsgrey}\thepage}\renewcommand{\headrulewidth}{0pt}\renewcommand{\headrule}{}}
\renewcommand{\chaptermark}[1]{\markboth{\thechapter.\ #1}{}}
\captionsetup{font=small,labelfont={bf,color=hcsteal},margin=1.5em}
\setlist{itemsep=0.2ex,topsep=0.6ex}
\setlength{\parskip}{0.25ex plus 0.3ex}
\newtheoremstyle{hcs}{0.4ex}{0.4ex}{\itshape}{}{\bfseries\color{hcsteal}}{.}{0.6em}{}
\newtheoremstyle{hcsdef}{0.4ex}{0.4ex}{\normalfont}{}{\bfseries\color{hcsteal}}{.}{0.6em}{}
\newtheoremstyle{hcsrem}{0.9ex}{0.9ex}{\normalfont}{}{\itshape\color{hcsteal}}{.}{0.6em}{}
\theoremstyle{hcs}
\newtheorem{theorem}{Theorem}[chapter]
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\theoremstyle{hcsdef}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{construction}[theorem]{Construction}
\theoremstyle{hcsrem}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{warning}[theorem]{Warning}
\tcbset{hcsbox/.style={enhanced,breakable,boxrule=0pt,frame hidden,sharp corners,
left=9pt,right=8pt,top=5pt,bottom=5pt,before skip=1.6ex plus 0.4ex,after skip=1.6ex plus 0.4ex}}
\tcolorboxenvironment{theorem}{hcsbox,colback=hcsmist,borderline west={2.2pt}{0pt}{hcsteal}}
\tcolorboxenvironment{proposition}{hcsbox,colback=hcsmist,borderline west={2.2pt}{0pt}{hcsteal}}
\tcolorboxenvironment{lemma}{hcsbox,colback=hcsmist!55,borderline west={1.2pt}{0pt}{hcsteal}}
\tcolorboxenvironment{corollary}{hcsbox,colback=hcsmist!55,borderline west={1.2pt}{0pt}{hcsteal}}
\tcolorboxenvironment{definition}{hcsbox,colback=hcssand,borderline west={2.2pt}{0pt}{hcsgold}}
\tcolorboxenvironment{construction}{hcsbox,colback=hcssand,borderline west={2.2pt}{0pt}{hcsgold}}
\newcommand{\hcsstar}{\raisebox{0.05ex}{\scalebox{0.72}{$\bigstar$}}}
\newcommand{\lvl}[1]{ \ifcase#1\or{\color{hcsgold}\hcsstar}{\color{hcsgrey!45}\hcsstar\hcsstar\hcsstar} \or{\color{hcsgold}\hcsstar\hcsstar}{\color{hcsgrey!45}\hcsstar\hcsstar} \or{\color{hcsgold}\hcsstar\hcsstar\hcsstar}{\color{hcsgrey!45}\hcsstar} \or{\color{hcsgold}\hcsstar\hcsstar\hcsstar\hcsstar}\fi}
\newcommand{\lvlname}[1]{\ifcase#1\or warm-up\or computation\or argument\or proof\fi}
\newtcolorbox[auto counter,number within=chapter,crefname={Exercise}{Exercises}]{exercise}[2][]{enhanced,breakable,sharp corners,
colback=white,colframe=hcsrust,boxrule=0.5pt,left=8pt,right=8pt,top=5pt,bottom=5pt,
before skip=2.2ex,after skip=0.8ex,
fonttitle=\bfseries\small,coltitle=white,colbacktitle=hcsrust,
title={Exercise \thetcbcounter\hfill \lvl{#2}\ \ {\normalfont\itshape\lvlname{#2}}},#1}
\newenvironment{solution}{\begin{tcolorbox}[hcsbox,colback=white,borderline west={1.2pt}{0pt}{hcsrust!60},
before skip=0.6ex,after skip=2.2ex]\small\textsc{\color{hcsrust}Solution.}\ }{\hfill{\color{hcsrust}$\blacktriangleleft$}\end{tcolorbox}}
\newcommand{\exercisesheading}{\section*{Solved exercises}\addcontentsline{toc}{section}{Solved exercises} {\small\itshape\color{hcsgrey} Ratings: \lvl{1} warm-up, \lvl{2} computation, \lvl{3} argument, \lvl{4} proof-level.
Every exercise is followed by a complete solution.}\par\medskip}
\newenvironment{chapabstract}{\begin{quote}\small\itshape\color{hcsink!85}}{\end{quote}\medskip}
\newcommand{\source}[1]{{\small\noindent\textsc{\color{hcsrust}Source in the book.}\ #1\par}\medskip}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\T}{\mathbb{T}}
\newcommand{\cat}[1]{\mathsf{#1}}
\newcommand{\Diff}{\cat{Diff}}
\newcommand{\Dom}{\cat{Dom}}
\newcommand{\Cart}{\cat{Cart}}
\newcommand{\Mfd}{\cat{Mfd}}
\newcommand{\Set}{\cat{Set}}
\newcommand{\Top}{\cat{Top}}
\newcommand{\Sh}{\cat{Sh}}
\newcommand{\PSh}{\cat{PSh}}
\newcommand{\ConcSh}{\cat{ConcSh}}
\newcommand{\SmSet}{\cat{SmoothSet}}
\newcommand{\Hh}{\mathbf{H}}
\newcommand{\Spc}{\cat{S}}
\newcommand{\Grpd}{\cat{Grpd}}
\newcommand{\Disc}{\operatorname{Disc}}
\newcommand{\coDisc}{\operatorname{coDisc}}
\newcommand{\conc}{\operatorname{conc}}
\newcommand{\shp}{\mathord{\textstyle\smallint}}
\newcommand{\fl}{\flat}
\newcommand{\shr}{\sharp}
\newcommand{\cinf}{C^{\infty}}
\newcommand{\Paths}{\operatorname{Paths}}
\newcommand{\Loops}{\operatorname{Loops}}
\newcommand{\Hom}{\operatorname{Hom}}
\newcommand{\Map}{\operatorname{Map}}
\newcommand{\End}{\operatorname{End}}
\newcommand{\Aut}{\operatorname{Aut}}
\newcommand{\Dif}{\operatorname{Diff}}
\newcommand{\GL}{\operatorname{GL}}
\newcommand{\SL}{\operatorname{SL}}
\newcommand{\PGL}{\operatorname{PGL}}
\newcommand{\Ort}{\operatorname{O}}
\newcommand{\Pic}{\operatorname{Pic}}
\newcommand{\Fl}{\operatorname{Fl}}
\newcommand{\Bun}{\operatorname{Bun}}
\newcommand{\B}{\mathbf{B}}
\newcommand{\Om}{\Omega}
\newcommand{\dR}{\mathrm{dR}}
\newcommand{\colim}{\operatorname*{colim}}
\newcommand{\holim}{\operatorname*{holim}}
\newcommand{\hocolim}{\operatorname*{hocolim}}
\newcommand{\im}{\operatorname{im}}
\newcommand{\coker}{\operatorname{coker}}
\newcommand{\id}{\mathrm{id}}
\newcommand{\ev}{\mathrm{ev}}
\newcommand{\pr}{\mathrm{pr}}
\newcommand{\op}{\mathrm{op}}
\newcommand{\Lam}{\Lambda}
\newcommand{\Tal}{T_{\alpha}}
\newcommand{\Rd}{\R^{\delta}}
\newcommand{\dd}{\mathrm{d}}
\newcommand{\norm}[1]{\lVert #1\rVert}
\newcommand{\abs}[1]{\lvert #1\rvert}
\newcommand{\set}[1]{\{\,#1\,\}}
\newcommand{\hquot}{/\!\!/}
\newcommand{\IZ}[1]{\textup{[IZ,\,#1]}}
\newcommand{\defn}[1]{\textbf{\color{hcsink}#1}}
\newcommand{\Sub}{\mathrm{sub}}
\newcommand{\xto}[1]{\xrightarrow{\;#1\;}}
\newcommand{\into}{\hookrightarrow}
\newcommand{\onto}{\twoheadrightarrow}
\newcommand{\dten}{\Delta}
\newcommand{\Ob}{\operatorname{Ob}}
\newcommand{\Mor}{\operatorname{Mor}}
\newcommand{\rk}{\operatorname{rk}}
\newcommand{\Sym}{\operatorname{Sym}}
\newcommand{\TC}{\operatorname{TC}}
\newcommand{\AD}{\mathcal{D}}
\tikzset{>={Stealth[length=5pt]},
hookr/.style={{Hooks[right,length=3pt,width=6pt]}->},
hcsnode/.style={draw=hcsteal,fill=hcsmist,rounded corners=2pt,inner sep=4pt,font=\small},
hcsnodeb/.style={draw=hcsgold,fill=hcssand,rounded corners=2pt,inner sep=4pt,font=\small},
hcsnoder/.style={draw=hcsrust,fill=white,rounded corners=2pt,inner sep=4pt,font=\small},
every picture/.style={line cap=round,line join=round}}
\newcommand{\hcsauthor}{Anonymous submission}
\newcommand{\hcsvenue}{higher-categorical-semantics.pages.dev}
\newcommand{\hcsdate}{27 November 2026}
\begin{document}
\frontmatter
\begin{titlepage}
\thispagestyle{empty}
\begin{center}
{\small\scshape\color{hcsgrey} Higher Categorical Semantics \textperiodcentered\ Monograph}\par
\vspace{2.2cm}
{\fontsize{34}{40}\selectfont\bfseries\color{hcsteal} Diffeology in\\[0.35ex] Higher Categories\par}
\vspace{0.9cm}
{\Large\color{hcsink} Concrete sheaves, cohesive shape, and stacks\\[0.3ex]
behind Iglesias-Zemmour's \emph{Diffeology}\par}
\vspace{0.5cm}
{\large\itshape\color{hcsrust} with applications to arithmetic, cryptography,\\ machine learning, artificial intelligence, and system design\par}
\vspace{1.3cm}
\begin{tikzpicture}[scale=5.2]
\def\gold{0.6180339}
\fill[hcsmist] (0,0) rectangle (1,1);
\begin{scope}
\clip (0,0) rectangle (1,1);
\foreach \n in {0,...,33}{
\pgfmathsetmacro{\c}{\n*\gold-floor(\n*\gold)}
\pgfmathsetmacro{\op}{0.25+0.75*(34-\n)/34}
\draw[hcsteal,line width=0.45pt,opacity=\op] (0,\c) -- (1,\c+\gold);
\draw[hcsteal,line width=0.45pt,opacity=\op] (0,\c-1) -- (1,\c-1+\gold);
}
\end{scope}
\draw[hcsink,line width=0.9pt] (0,0) rectangle (1,1);
\draw[hcsgold,line width=1.3pt,->] (0,0) -- (0.34,0.34*\gold);
\foreach \p in {(0.5,0),(0.5,1)} \draw[hcsink,line width=0.9pt] \p ++(-0.012,-0.02) -- ++(0.024,0.02) -- ++(-0.024,0.02);
\foreach \p in {(0,0.5),(1,0.5)} {\draw[hcsink,line width=0.9pt] \p ++(-0.02,-0.02) -- ++(0.02,0.024) -- ++(0.02,-0.024);
\draw[hcsink,line width=0.9pt] \p ++(-0.02,0.004) -- ++(0.02,0.024) -- ++(0.02,-0.024);}
\end{tikzpicture}\par
\vspace{0.35cm}
{\footnotesize\color{hcsgrey} One leaf of the Kronecker foliation of slope $\alpha=(\sqrt5-1)/2$ on $T^2$.\\
Its leaf space $T_\alpha=\R/(\Z+\alpha\Z)$ is a point for topology, a group for diffeology, and $\B\Z^2$ for homotopy.\par}
\vfill
{\large \hcsauthor\par}
\vspace{0.4ex}
{\small\color{hcsgrey} Prepared for \texttt{\hcsvenue}\ \textperiodcentered\ \hcsdate\par}
\end{center}
\end{titlepage}
\chapter*{Abstract}
\thispagestyle{plain}
In \emph{Diffeology} \cite{IZ}, Patrick Iglesias-Zemmour develops differential geometry on sets equipped
with a family of ``plots'', and proves that this datum suffices for homotopy theory, Cartan calculus,
fibre bundles and symplectic geometry far outside the category of manifolds. The arguments there are carried out directly with sets
and maps. Here the categorical language is added, and the theory is then raised one categorical level.
\medskip\noindent
\textbf{Part I.} The three axioms of a diffeology are the sheaf condition on a concrete site, and
the structural theorems of the book (limits, colimits, function spaces, inductions and subductions) follow from the fact that
$\Diff$ is the quasitopos of concrete sheaves on Cartesian spaces (Baez--Hoffnung, Dubuc).
\textbf{Part II.} $\Diff$ embeds in the cohesive $\infty$-topos $\Hh=\Sh_\infty(\Cart)$ of smooth
$\infty$-groupoids. There the book's smooth homotopy groups are the homotopy groups of the \emph{shape} $\shp X$;
its differential forms are maps into the non-concrete classifying sheaves $\Om^k$; its fibre bundles are maps
into classifying stacks $\B G$ that are not diffeological spaces; and the failure of de~Rham's theorem on the
irrational torus becomes a spectral sequence whose first obstruction group is the group of principal
$\R$-bundles. The organising statement is a trichotomy of quotients,
\[
X\hquot G\;\longrightarrow\;\pi_0(X\hquot G)\;\longrightarrow\;\conc\,\pi_0(X\hquot G)=X/G ,
\]
stack, smooth set, diffeological space, with exact criteria for when each arrow is an equivalence.
\medskip\noindent
\textbf{Part III} consists of applications. In number theory, the irrational torus $T_\alpha$ realises
$\GL_2(\Z)$-equivalence, real quadratic units and Diophantine type as diffeological invariants. In
cryptography, tori with real multiplication form a torsor under the class group of a real quadratic order, and
deciding diffeomorphism is the principal ideal problem. In machine learning we prove correctness of forward-mode
automatic differentiation by gluing over $\Diff$, and that orbit spaces have no differentiable canonicalisation at
points with isotropy. In artificial intelligence, a global smooth motion planner exists exactly on smoothly
contractible spaces, and an agent restricted to smooth scalar observations can determine a space only up to its reflexive hull. In system design we
give a minimal-realisation theorem with two inequivalent quotients, and classify multi-clock systems by their
frequency module. Each of these chapters contains at least three theorems with proofs; every chapter ends with
solved exercises graded from warm-up to proof.
\medskip\noindent
{\small\color{hcsgrey}\textbf{Keywords.} Diffeological space; concrete sheaf; quasitopos; cohesive $\infty$-topos; shape;
smooth stack; irrational torus; de~Rham obstruction; real multiplication; automatic differentiation; motion planning.\\
\textbf{MSC 2020.} 58A40, 18F10, 18N60, 18B25, 55P60, 57R18, 11R11, 11J70, 68T07, 94A60.}
\tableofcontents
\chapter*{Preface}
\addcontentsline{toc}{chapter}{Preface}
\markboth{Preface}{}
\section*{What this is}
A \emph{companion} to the source text, a 450-page treatise whose method is to stay as close to the sets and the maps as
possible. That method is a strength: the reader of \cite{IZ} never needs a universe, a model structure or a coherence
theorem. Three of the book's central objects, however, are not objects of the category of diffeological spaces:
\begin{enumerate}[label=(\roman*)]
\item the object that classifies differential $k$-forms, $\Om^k$, is a sheaf with exactly one point;
\item the object that classifies principal $G$-bundles, $\B G$, is a stack;
\item the homotopy type $\shp X$ is an $\infty$-groupoid.
\end{enumerate}
In \cite{IZ} each of these is treated by an explicit construction on plots. We put all three in one ambient
$\infty$-topos, where the constructions become representability statements.
\section*{Attribution}
A Theorem, Proposition or Lemma with a name or a reference in its heading is taken from the literature, and is given with that
reference and, when it is short, a proof. Every other numbered statement is proved in the text. Formalisation in a proof
assistant is the subject of a sequel; in \cref{ch:coda} the statements are sorted by the infrastructure required.
\section*{How to read}
Parts I and II are cumulative. The application chapters depend on them as follows.
\begin{center}
\begin{tikzpicture}[font=\small]
\node[hcsnode] (c1) at (0,0) {1 Plots};
\node[hcsnode] (c2) at (3.1,0) {2 Concrete sheaves};
\node[hcsnode] (c3) at (6.5,0) {3 Quasitopos};
\node[hcsnode] (c4) at (9.6,0) {4 Cohesion};
\node[hcsnode] (c5) at (0,-1.25) {5 Shape};
\node[hcsnode] (c6) at (3.1,-1.25) {6 Forms};
\node[hcsnode] (c7) at (6.5,-1.25) {7 Bundles and stacks};
\node[hcsnode] (c8) at (9.6,-1.25) {8 Models};
\draw[->] (c1)--(c2); \draw[->] (c2)--(c3); \draw[->] (c3)--(c4);
\draw[->,rounded corners=3pt] (c4.south) -- ++(0,-0.3) -| (c5.north);
\draw[->] (c5)--(c6); \draw[->] (c6)--(c7); \draw[->] (c7)--(c8);
\end{tikzpicture}
\medskip
{\small
\begin{tabular}{@{}ll@{}}\toprule
application chapter & draws on\\\midrule
9\ \ Number theory & Chapters 1, 5, 6, 7\\
10\ \ Cryptography & Chapter 9; Chapter 8 for orbifolds\\
11\ \ Machine learning & Chapters 1--3 and 8\\
12\ \ Artificial intelligence & Chapters 1--3, 5 and 8\\
13\ \ System design & Chapters 3, 7 and 9\\\bottomrule
\end{tabular}}
\end{center}
\section*{Conventions}
A \emph{domain} is an open subset of some $\R^n$, $n\ge 0$; a \emph{Cartesian space} is a domain diffeomorphic to $\R^n$.
$\Dom$ and $\Cart$ are the corresponding categories with smooth maps. We cite the source as \IZ{art.~$x.y$} for its numbered
articles and \IZ{Exercise~$n$} for its exercises. ``Smooth'' means $\cinf$. All $\infty$-categorical statements are about
$(\infty,1)$-categories in the sense of \cite{HTT}; limits and colimits in $\Hh$ are homotopy limits and colimits.
$\R$ denotes the smooth additive group and $\Rd$ the same group with the discrete diffeology. For a group $G$ acting on $X$ we
write $X/G$ for the diffeological quotient and $X\hquot G$ for the homotopy quotient in $\Hh$; much of what follows is
about the difference.
\mainmatter
\part{Diffeology as a category of sheaves}
\chapter{Plots}\label{ch:plots}
\begin{chapabstract}
A diffeology is a choice of which parametrisations of a set are smooth. We recall the axioms, the two transport operations
(pullback and pushforward), and the two distinguished classes of maps (inductions and subductions), organised around one
fact: the underlying-set functor $\Diff\to\Set$ is topological. Three examples introduced here --- the irrational torus, the
orbit space $\R/\{\pm1\}$ and the cross --- are the test cases for every later construction.
\end{chapabstract}
\source{\IZ{Chapter~1} and the D-topology of \IZ{Chapter~2}.}
\section{The axioms}
A \defn{parametrisation} of a set $X$ is a map $P\colon U\to X$ whose source is a domain. We write $\mathrm{Param}(X)$ for
the set of all of them.
\begin{definition}[\IZ{art.~1.5}]\label{def:diffeology}
A \defn{diffeology} on a set $X$ is a subset $\mathcal D\subseteq\mathrm{Param}(X)$, whose elements are called \defn{plots}, such that
\begin{enumerate}[label=\textup{(D\arabic*)}]
\item\label{D1} \emph{covering:} every constant parametrisation is a plot;
\item\label{D2} \emph{locality:} if $P\colon U\to X$ restricts to a plot on each member of an open cover of $U$, then $P$ is a plot;
\item\label{D3} \emph{smooth compatibility:} if $P\colon U\to X$ is a plot and $F\colon V\to U$ is a smooth map between domains, then $P\circ F$ is a plot.
\end{enumerate}
A \defn{diffeological space} is a set with a diffeology. A map $f\colon X\to X'$ is \defn{smooth} if $f\circ P$ is a plot of
$X'$ for every plot $P$ of $X$. Diffeological spaces and smooth maps form the category $\Diff$; its isomorphisms are called
\defn{diffeomorphisms}.
\end{definition}
\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
\draw[fill=hcssand,draw=hcsgold,line width=0.8pt] plot[smooth cycle,tension=0.8]
coordinates {(5.2,0.2) (6.6,-0.5) (8.3,0.1) (8.6,1.6) (7.3,2.5) (5.6,2.0)};
\node at (8.85,2.35) {$X$};
\draw[fill=hcsmist,draw=hcsteal] (0.2,1.25) ellipse (1.15 and 0.7);
\node at (0.2,1.25) {$U\subseteq\R^2$};
\draw[hcsteal,line width=1.3pt] (-0.7,-0.9) -- (1.1,-0.9);
\node[below] at (0.2,-0.95) {$V\subseteq\R$};
\draw[fill=hcsteal!22,draw=hcsteal] (6.95,1.2) ellipse (0.95 and 0.55);
\draw[hcsrust,line width=1.1pt] plot[smooth] coordinates {(6.3,1.0) (6.8,1.35) (7.3,1.1) (7.7,1.4)};
\draw[->] (1.45,1.35) to[bend left=12] node[above]{$P$} (5.9,1.45);
\draw[->] (1.2,-0.8) to[bend right=14] node[below]{$P\circ F$} (6.35,0.85);
\draw[->] (0.2,-0.75) -- node[left]{$F$} (0.2,0.45);
\end{tikzpicture}
\caption{A diffeology is a family of maps into a set from domains of every dimension. By axiom \ref{D3} the family is closed under smooth
reparametrisation; by axiom \ref{D2} membership in the family is a local property of the source. No structure on $X$ itself is required.}
\label{fig:plots}
\end{figure}
Two observations set the tone for everything that follows.
\begin{remark}[Plots are the smooth maps from domains]\label{rem:yoneda}
Give a domain $U$ the diffeology of all smooth parametrisations. Then by \ref{D3} a parametrisation $P\colon U\to X$ is a plot
if and only if it is a smooth map $U\to X$. So $\mathcal D(U)=\Diff(U,X)$: a diffeological space \emph{is} the functor it
represents on $\Dom$. This is made precise in \cref{ch:concrete}.
\end{remark}
\begin{remark}[No condition on $X$]
A manifold is a set that is locally \emph{modelled on} $\R^n$. A diffeological space is a set that domains can be \emph{mapped
into}. The first is a condition on the object; the second is the choice of a structure. This is why every construction
below exists without hypotheses.
\end{remark}
\begin{example}\label{ex:first}
\begin{enumerate}[label=(\alph*)]
\item A domain, or more generally a smooth manifold $M$, carries the \defn{standard} diffeology of smooth parametrisations.
A map between manifolds is smooth in the sense of \cref{def:diffeology} exactly when it is smooth in the usual sense, so
$\Mfd\into\Diff$ is full and faithful.
\item The \defn{discrete} diffeology on a set consists of the locally constant parametrisations; the \defn{coarse} diffeology
consists of all parametrisations.
\item The \defn{wire} diffeology on $\R^n$ consists of the parametrisations that are, near each point, either constant or of the
form $\gamma\circ h$ with $h\colon V\to\R$ and $\gamma\colon\R\to\R^n$ smooth \IZ{art.~1.10}. For $n\ge2$ it is strictly finer than the
standard one (\cref{exo:wire}).
\end{enumerate}
\end{example}
\section{The underlying-set functor is topological}
The diffeologies on a fixed set $X$ are ordered by inclusion: $\mathcal D$ is \defn{finer} than $\mathcal D'$ if
$\mathcal D\subseteq\mathcal D'$. Arbitrary intersections of diffeologies are diffeologies, so they form a complete lattice with
the discrete diffeology at the bottom and the coarse one at the top. A subset $\mathcal F\subseteq\mathrm{Param}(X)$
\defn{generates} the smallest diffeology $\langle\mathcal F\rangle$ containing it; explicitly, $P\in\langle\mathcal F\rangle$ if and
only if near each point $P$ is constant or of the form $Q\circ F$ with $Q\in\mathcal F$ and $F$ smooth \IZ{art.~1.66--1.68}.
\begin{definition}\label{def:pullpush}
Let $f\colon X\to X'$ be a map of sets.
\begin{enumerate}[label=(\alph*)]
\item If $X'$ is diffeological, the \defn{pullback} $f^*(\mathcal D')$ is the set of parametrisations $P$ of $X$ with $f\circ P\in\mathcal D'$.
It is the coarsest diffeology on $X$ making $f$ smooth.
\item If $X$ is diffeological, the \defn{pushforward} $f_*(\mathcal D)$ is the diffeology on $X'$ generated by $\set{f\circ P : P\in\mathcal D}$.
It is the finest diffeology on $X'$ making $f$ smooth.
\end{enumerate}
A smooth map $f\colon X\to X'$ is an \defn{induction} if it is injective and $\mathcal D=f^*(\mathcal D')$; it is a
\defn{subduction} if it is surjective and $\mathcal D'=f_*(\mathcal D)$.
\end{definition}
Unwinding, $f$ is a subduction exactly when it is surjective and \emph{plots of $X'$ lift locally}: for every plot
$P\colon U\to X'$ and every $r\in U$ there are an open $V\ni r$ and a plot $Q\colon V\to X$ with $f\circ Q=P|_V$
\IZ{art.~1.48}. Dually, $f$ is an induction exactly when it is injective and a parametrisation of $X$ is a plot as soon as its
composite with $f$ is one \IZ{art.~1.31}.
\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
\begin{scope}
\node (V) at (0,0) {$V$}; \node (X) at (2.2,1.5) {$X$}; \node (U) at (0,-1.3) {$U$}; \node (Y) at (2.2,-1.3) {$X'$};
\draw[->,dashed,hcsrust] (V) -- node[above left]{$\exists\,Q$} (X);
\draw[hookr] (V) -- (U);
\draw[->>] (X) -- node[right]{$f$} (Y);
\draw[->] (U) -- node[below]{$P$} (Y);
\node[font=\footnotesize,hcsgrey] at (1.1,-2.0) {subduction: plots lift locally};
\end{scope}
\begin{scope}[xshift=6.2cm]
\node (U) at (0,0.1) {$U$}; \node (X) at (2.4,0.1) {$X$}; \node (Y) at (2.4,-1.3) {$X'$};
\draw[->,dashed,hcsrust] (U) -- node[above]{$P$ is a plot} (X);
\draw[hookr] (X) -- node[right]{$f$} (Y);
\draw[->] (U) -- node[below left]{$f\circ P$ plot} (Y);
\node[font=\footnotesize,hcsgrey] at (1.2,-2.0) {induction: plots are detected in the target};
\end{scope}
\end{tikzpicture}
\caption{The two distinguished classes of smooth maps. In \cref{ch:quasitopos} they become the strong epimorphisms and the strong
monomorphisms of $\Diff$.}\label{fig:ind-sub}
\end{figure}
The whole of \IZ{Chapter~1} can be compressed into one categorical statement.
\begin{theorem}[The underlying-set functor is topological]\label{thm:topological}
Let $|\cdot|\colon\Diff\to\Set$ be the underlying-set functor.
\begin{enumerate}[label=\textup{(\roman*)}]
\item \textup{(Initial lifts.)} For every family of maps $f_i\colon X\to |X_i|$ into diffeological spaces there is a unique diffeology on $X$
such that a map $g\colon Z\to X$ from a diffeological space is smooth if and only if every $f_i\circ g$ is smooth. It is
$\bigcap_i f_i^*(\mathcal D_i)$.
\item \textup{(Final lifts.)} For every family of maps $g_i\colon |X_i|\to X$ there is a unique diffeology on $X$ such that
a map $h\colon X\to Z$ is smooth if and only if every $h\circ g_i$ is smooth. It is generated by $\bigcup_i\set{g_i\circ P : P\in\mathcal D_i}$.
\end{enumerate}
Consequently $\Diff$ is complete and cocomplete, $|\cdot|$ preserves limits and colimits, and $|\cdot|$ has a left adjoint
(discrete diffeology) and a right adjoint (coarse diffeology).
\end{theorem}
\begin{proof}
(i) An intersection of diffeologies is a diffeology, and $P\in\bigcap_i f_i^*(\mathcal D_i)$ means that each $f_i\circ P$ is a plot.
If $g\colon Z\to X$ and all $f_i\circ g$ are smooth, then for a plot $Q$ of $Z$ each $f_i\circ g\circ Q$ is a plot, so $g\circ Q$
is a plot of $X$; the converse is composition. Uniqueness: two diffeologies with the property make the identity smooth in both directions.
(ii) Let $\mathcal D$ be the generated diffeology. If every $h\circ g_i$ is smooth and $P\in\mathcal D$, then locally $P$ is
constant or $P=g_i\circ Q\circ F$, so $h\circ P$ is locally a plot of $Z$, hence a plot by \ref{D2}. The rest is as in (i).
For the consequences: a limit of a diagram $(X_j)$ is the limit of the underlying sets with the initial diffeology for the
projections; a colimit is the colimit of sets with the final diffeology for the coprojections. The adjoints are the initial and
final lifts of the empty family.
\end{proof}
Specialising \cref{thm:topological} gives the constructions of the book with their universal properties attached:
\begin{center}\small
\begin{tabular}{@{}lll@{}}\toprule
construction & diffeology & reference\\\midrule
subspace $A\subseteq X$ & initial for $A\into X$ (plots of $X$ with values in $A$) & \IZ{art.~1.33}\\
product $\prod_i X_i$ & initial for the projections (componentwise plots) & \IZ{art.~1.55}\\
quotient $X/{\sim}$ & final for $X\to X/{\sim}$ (plots lift locally) & \IZ{art.~1.50}\\
sum $\coprod_i X_i$ & final for the injections (plots locally in one summand) & \IZ{art.~1.39}\\
\bottomrule\end{tabular}
\end{center}
\begin{proposition}[Stability]\label{prop:stability}
\begin{enumerate}[label=\textup{(\roman*)}]
\item Subductions are closed under composition, under products, and under pullback along arbitrary smooth maps.
\item Inductions are closed under composition, under products, and under pullback along arbitrary smooth maps.
\item A map that is both an induction and a subduction is a diffeomorphism.
\end{enumerate}
\end{proposition}
\noindent The proof is \cref{exo:stability}. Part (i) is false in $\Top$ for quotient maps, and is the first respect in which $\Diff$ has
better exactness properties than $\Top$.
\section{Function spaces}
\begin{definition}[\IZ{art.~1.57}]\label{def:functional}
For diffeological spaces $X,Y$, the \defn{functional diffeology} on $\cinf(X,Y)$ consists of the parametrisations
$P\colon U\to\cinf(X,Y)$ whose adjoint $(r,x)\mapsto P(r)(x)$ is a smooth map $U\times X\to Y$.
\end{definition}
\begin{theorem}[Cartesian closure, \IZ{art.~1.60}]\label{thm:ccc}
For diffeological spaces $X,Y,Z$, currying is a diffeomorphism
\[
\cinf(X\times Y,Z)\;\cong\;\cinf\bigl(X,\cinf(Y,Z)\bigr),\qquad f\longmapsto\bigl(x\mapsto f(x,-)\bigr).
\]
In particular evaluation $\ev\colon\cinf(Y,Z)\times Y\to Z$ and composition
$\cinf(X,Y)\times\cinf(Y,Z)\to\cinf(X,Z)$ are smooth.
\end{theorem}
\noindent The proof is \cref{exo:ccc}. Two consequences: \emph{paths in a function space are the same thing as homotopies}, and
a smooth family of smooth maps is the same thing as a smooth map out of a product. Both are false for manifolds, where the
function space does not exist, and both will be used without comment from \cref{ch:homotopy} on.
\section{Three running examples}\label{sec:running}
\subsection{The irrational torus}
Fix $\alpha\in\R\smallsetminus\Q$, let $\Lam_\alpha=\Z+\alpha\Z\subset\R$, and let
\[
q_\alpha\colon\R\longrightarrow \Tal:=\R/\Lam_\alpha
\]
carry the quotient diffeology. Since $\Lam_\alpha$ is dense in $\R$, the quotient topology on $\Tal$ is indiscrete.
Equivalently $\Tal$ is the space of leaves of the linear foliation of slope $\alpha$ on $T^2=\R^2/\Z^2$: the map
$(x,y)\mapsto y-\alpha x$ descends to a bijection $T^2/\R\to\Tal$, which is a diffeomorphism for the quotient diffeologies.
The two descriptions are drawn in \cref{fig:cutproject}.
\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
\begin{scope}[scale=3.1]
\def\gold{0.6180339}
\fill[hcsmist] (0,0) rectangle (1,1);
\begin{scope}\clip (0,0) rectangle (1,1);
\foreach \n in {0,...,12}{
\pgfmathsetmacro{\c}{\n*\gold-floor(\n*\gold)}
\draw[hcsteal,line width=0.5pt] (0,\c) -- (1,\c+\gold);
\draw[hcsteal,line width=0.5pt] (0,\c-1) -- (1,\c-1+\gold);}
\end{scope}
\draw[line width=0.8pt] (0,0) rectangle (1,1);
\node[below] at (0.5,0) {$T^2=\R^2/\Z^2$};
\draw[hcsgold,line width=1.2pt,->] (0,0)--(0.4,0.4*\gold);
\node[font=\footnotesize,fill=hcsmist,inner sep=1.2pt] at (0.72,0.2) {slope $\alpha$};
\end{scope}
\draw[->>,line width=0.6pt] (3.4,1.55) -- node[above]{leaves} (4.6,1.55);
\node[hcsnode] at (5.2,1.55) {$\Tal$};
\draw[<<-,line width=0.6pt] (5.8,1.55) -- node[above]{$q_\alpha$} (6.8,1.55);
\begin{scope}[xshift=9.5cm,yshift=1.45cm,scale=0.66]
\def\gold{0.6180339}
\draw[->,hcsgrey] (-3.6,0)--(3.9,0) node[right,hcsink]{$\R$};
\foreach \m in {-2,...,2}\foreach \n in {-2,...,2}{
\pgfmathsetmacro{\x}{\m+\n*\gold}
\draw[hcsgrey,dashed,line width=0.35pt] (\m,\n) -- (\x,0);
\fill[hcsink] (\m,\n) circle (2.2pt);
\fill[hcsrust] (\x,0) circle (1.9pt);}
\node[font=\footnotesize] at (0.6,-2.75) {$\Z^2\ni(m,n)\mapsto m+n\alpha\in\Lam_\alpha$};
\end{scope}
\end{tikzpicture}
\caption{Two pictures of the irrational torus. Left: the leaf space of the Kronecker foliation. Right: the quotient of $\R$ by the
dense subgroup $\Lam_\alpha$, itself the image of $\Z^2$ under a linear projection (the ``cut and project'' description of a
one-dimensional quasicrystal).}\label{fig:cutproject}
\end{figure}
\begin{proposition}\label{prop:Talpha-basic}
\begin{enumerate}[label=\textup{(\roman*)}]
\item Every smooth map from $\Tal$ to a manifold is constant; in particular $\cinf(\Tal,\R)=\R$.
\item The diffeology of $\Tal$ is neither discrete nor coarse.
\item $q_\alpha$ is a subduction with discrete fibres, and any two local lifts of a plot differ by a locally constant element of $\Lam_\alpha$.
\end{enumerate}
\end{proposition}
\begin{proof}
(i) If $f\colon\Tal\to M$ is smooth then $f\circ q_\alpha\colon\R\to M$ is continuous and $\Lam_\alpha$-invariant, hence constant on a dense
set, hence constant. (iii) $q_\alpha$ is a subduction by definition. If $Q,Q'\colon V\to\R$ lift the same plot then $Q-Q'$ is a continuous
map into the countable set $\Lam_\alpha$, so it is locally constant; in particular every plot of a fibre is locally constant, and the fibres are discrete.
(ii) $q_\alpha$ is a plot that is not locally constant, so $\Tal$ is not discrete. The parametrisation $t\mapsto q_\alpha(\sqrt{\abs t})$ is not a
plot: by (iii) a local lift near $0$ would be $t\mapsto\sqrt{\abs t}+\lambda$, which is not smooth. So $\Tal$ is not coarse.
\end{proof}
The D-topology of $\Tal$ is indiscrete and its smooth real functions are constant, while its plots are those of a one-dimensional group. By \cref{ch:number-theory} the plots determine the tail of the
continued fraction of $\alpha$.
\subsection{Half of a line, twice}
Let $\dten_1=\R/\{\pm1\}$ with the quotient diffeology, and let $H=[0,\infty)\subset\R$ with the subspace diffeology. The map
$x\mapsto x^2$ factors as
\begin{equation}\label{eq:delta1}
\R\;\onto\;\dten_1\;\xto{\ \mathrm{sq}\ }\;H\;\into\;\R .
\end{equation}
\begin{proposition}\label{prop:delta1}
$\mathrm{sq}\colon\dten_1\to H$ is a smooth bijection that is not a diffeomorphism.
\end{proposition}
\begin{proof}
Smoothness and bijectivity are clear. The parametrisation $P(r,s)=r^2+s^2$ of $H$ is a plot, being smooth into $\R$ with values in $H$.
Suppose $\mathrm{sq}^{-1}\circ P$ were a plot of $\dten_1$. Then on a disc $V$ around $0$ there would be a smooth $Q\colon V\to\R$ with
$Q^2=r^2+s^2$. On the connected set $V\smallsetminus\{0\}$ the function $Q$ has no zero, so it has constant sign and $Q=\pm\sqrt{r^2+s^2}$,
which is not differentiable at the origin.
\end{proof}
\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
\begin{scope}
\draw[hcsteal,line width=0.9pt] (0,1.8) ellipse (1.25 and 0.3);
\draw[hcsteal,line width=0.9pt] plot[domain=-1.25:1.25,samples=40] (\x,{1.15*\x*\x});
\draw[hcsgrey,->] (-1.7,0)--(1.7,0); \draw[hcsgrey,->] (0,-0.2)--(0,2.5) node[above,hcsink]{$H$};
\node[font=\footnotesize] at (0,-0.55) {plot $P=r^2+s^2$ of $H$: smooth};
\end{scope}
\begin{scope}[xshift=5.4cm]
\draw[hcsrust,line width=0.9pt] (0,1.8) ellipse (1.25 and 0.3);
\draw[hcsrust,line width=0.9pt] (-1.25,1.8)--(0,0)--(1.25,1.8);
\draw[hcsgrey,->] (-1.7,0)--(1.7,0); \draw[hcsgrey,->] (0,-0.2)--(0,2.5) node[above,hcsink]{$\R$};
\node[font=\footnotesize] at (0,-0.55) {its only lifts $\pm\sqrt{r^2+s^2}$: a cone};
\end{scope}
\draw[->,dashed] (3.9,1.0) -- node[above,font=\footnotesize]{$x\mapsto x^2$} (1.9,1.0);
\end{tikzpicture}
\caption{The same set $[0,\infty)$ carries two diffeologies. The plot on the left belongs to the subspace $H\subset\R$ but not to the
quotient $\dten_1=\R/\{\pm1\}$, because lifting it through the squaring map would require smoothing a cone.}\label{fig:cone}
\end{figure}
So \eqref{eq:delta1} exhibits two different ``images'' of the squaring map: the quotient of the source and the subspace of the
target. A map for which they coincide is called \emph{strict} in \IZ{art.~1.54}; in \cref{ch:quasitopos} the two images are identified with
the two factorisation systems of a quasitopos, and the gap between them is the subject of Chapters~\ref{ch:ml} and~\ref{ch:systems}.
\subsection{The cross}
Let $K=\set{(x,y)\in\R^2 : xy=0}$ with the subspace diffeology, and let $\R\vee\R$ be the pushout of two lines along their origins,
with the final diffeology. The canonical map $\R\vee\R\to K$ is a smooth bijection, and again not a diffeomorphism
(\cref{exo:cross}): a smooth curve in $K$ can cross from one axis to the other at an isolated time, provided all its derivatives vanish there; such a curve is not a plot of
$\R\vee\R$.
\section{The D-topology}
\begin{definition}[\IZ{art.~2.8}]
A subset $A\subseteq X$ of a diffeological space is \defn{D-open} if $P^{-1}(A)$ is open for every plot $P$. The D-open sets form
the \defn{D-topology}, the finest topology making all plots continuous.
\end{definition}
Smooth maps are D-continuous, so this defines a functor $D\colon\Diff\to\Top$. For a quotient, $A\subseteq X/{\sim}$ is D-open
if and only if its preimage in $X$ is D-open \IZ{art.~2.12}. The D-topology of a manifold is its topology; the D-topology of
$\Tal$ is indiscrete. We will see in \cref{prop:Dadj} that $D$ is a left adjoint, and in \cref{ch:homotopy} that it is the wrong
tool for homotopy theory: the homotopy type of $D(\Tal)$ is a point, while the homotopy type that the plots of $\Tal$ determine is
a torus.
\exercisesheading
\begin{exercise}[label=exo:wire]{1}
Show that for $n\ge 2$ the identity of $\R^n$ is not a plot for the wire diffeology of \cref{ex:first}(c).
\end{exercise}
\begin{solution}
If it were, then near $0$ we could write $\id=\gamma\circ h$ with $h\colon V\to\R$ and $\gamma\colon\R\to\R^n$ smooth. By the chain
rule the derivative of $\gamma\circ h$ at any point has rank at most $1$, while the identity has rank $n\ge 2$. (The alternative,
that $\id$ is locally constant, is absurd.) Hence the wire diffeology is strictly finer than the standard one, although both
contain exactly the same smooth curves.
\end{solution}
\begin{exercise}[label=exo:Dtop-Talpha]{2}
Show that the D-topology of $\Tal\times\Tal$ is indiscrete, and that $\Tal\times\Tal\cong\R^2/(\Lam_\alpha\times\Lam_\alpha)$.
\end{exercise}
\begin{solution}
By \cref{prop:stability}(i), $q_\alpha\times q_\alpha\colon\R^2\to\Tal\times\Tal$ is a subduction. Its fibres are the cosets of
$\Lam_\alpha\times\Lam_\alpha$, so the induced bijection $\R^2/(\Lam_\alpha\times\Lam_\alpha)\to\Tal\times\Tal$ is a subduction that is injective,
hence a diffeomorphism by \cref{prop:stability}(iii). A D-open subset of the quotient has an open preimage in $\R^2$ that is invariant
under the dense subgroup $\Lam_\alpha\times\Lam_\alpha$; a non-empty open invariant set contains a translate of a ball by every element of a dense
subgroup, so it is all of $\R^2$.
\end{solution}
\begin{exercise}[label=exo:cross]{2}
Let $\varphi(t)=e^{-1/t}$ for $t>0$ and $\varphi(t)=0$ for $t\le0$. Show that $c(t)=(\varphi(t),\varphi(-t))$ is a plot of the cross $K$
that does not lift to a plot of $\R\vee\R$. Conclude that $\R\vee\R\to K$ is not a diffeomorphism.
\end{exercise}
\begin{solution}
$c$ is smooth into $\R^2$ and $\varphi(t)\varphi(-t)=0$, so $c$ is a plot of the subspace $K$. A plot of the pushout $\R\vee\R$ is, near
each point, constant or of the form $\iota_j\circ Q$ with $\iota_j$ one of the two inclusions of $\R$ (final diffeology,
\cref{thm:topological}(ii)); so near each point its image lies in one of the two lines. Every neighbourhood of $t=0$ contains points
$t>0$ with $c(t)$ on the first axis minus the origin and points $t<0$ with $c(t)$ on the second axis minus the origin. Hence $c$ is
not a plot of $\R\vee\R$, the bijection $\R\vee\R\to K$ does not pull plots back to plots, and it is not a diffeomorphism.
\end{solution}
\begin{exercise}[label=exo:stability]{3}
Prove \cref{prop:stability}.
\end{exercise}
\begin{solution}
(i) \emph{Composition.} If $f\colon X\to Y$ and $g\colon Y\to Z$ are subductions, a plot of $Z$ lifts locally to $Y$, and that lift lifts
locally to $X$. \emph{Products.} A plot of $Y_1\times Y_2$ is a pair $(P_1,P_2)$ of plots with common domain; near $r$ lift $P_i$ to $Q_i$
on $V_i\ni r$ and take $(Q_1,Q_2)$ on $V_1\cap V_2$. \emph{Pullback.} Let $\pi\colon X\to B$ be a subduction and $f\colon B'\to B$ smooth,
and put $X'=\set{(b',x) : f(b')=\pi(x)}\subseteq B'\times X$ with the subspace diffeology, which is the pullback by
\cref{thm:topological}. The projection $X'\to B'$ is surjective because $\pi$ is. Given a plot $P$ of $B'$, the plot $f\circ P$ of $B$
lifts near $r$ to a plot $Q$ of $X$ with $\pi\circ Q=f\circ P$; then $(P,Q)$ takes values in $X'$, is a plot of $B'\times X$, hence a plot
of $X'$, and lifts $P$.
(ii) \emph{Composition} is immediate from the characterisation ``$P$ is a plot iff $f\circ P$ is''. \emph{Products}: componentwise.
\emph{Pullback}: let $j\colon A\to B$ be an induction and $f\colon B'\to B$ smooth, $A'=\set{(b',a): f(b')=j(a)}$. The projection
$A'\to B'$ is injective since $j$ is. If $P$ is a parametrisation of $A'$ with components $(P_1,P_2)$ such that $P_1$ is a plot of $B'$,
then $j\circ P_2=f\circ P_1$ is a plot of $B$, so $P_2$ is a plot of $A$ because $j$ is an induction, and $P$ is a plot of $A'$.
(iii) A map that is both is bijective; its inverse sends a plot $P$ of the target to a parametrisation whose composite with $f$ is the
plot $P$, hence to a plot, because $f$ is an induction.
\end{solution}
\begin{exercise}[label=exo:ccc]{4}
Prove \cref{thm:ccc}.
\end{exercise}
\begin{solution}
Write $\Phi(f)(x)(y)=f(x,y)$.
\emph{Step 1: a bijection $\cinf(A\times Y,Z)\to\cinf(A,\cinf(Y,Z))$ for every diffeological space $A$.}
Let $f\colon A\times Y\to Z$ be smooth. For fixed $a$ the map $f(a,-)$ is the composite of $f$ with the smooth map $y\mapsto(a,y)$, so
$\Phi(f)(a)\in\cinf(Y,Z)$. To see that $\Phi(f)$ is smooth, let $P\colon U\to A$ be a plot; we must show that
$(r,y)\mapsto f(P(r),y)$ is smooth on $U\times Y$. A plot of $U\times Y$ is a pair $(\rho,Q)$, and
$s\mapsto f(P(\rho(s)),Q(s))$ is $f$ composed with the plot $(P\circ\rho,Q)$ of $A\times Y$. So $\Phi$ is well defined; it is clearly
injective. Conversely let $g\colon A\to\cinf(Y,Z)$ be smooth and put $f(a,y)=g(a)(y)$. For a plot $(P,Q)\colon U\to A\times Y$, the map
$g\circ P$ is a plot of $\cinf(Y,Z)$, that is, $(r,y)\mapsto g(P(r))(y)$ is smooth on $U\times Y$; composing with the plot
$r\mapsto(r,Q(r))$ of $U\times Y$ shows that $r\mapsto f(P(r),Q(r))$ is a plot of $Z$. So $f$ is smooth and $\Phi(f)=g$.
\emph{Step 2: $\Phi$ is a diffeomorphism.} By \cref{rem:yoneda} and \cref{def:functional}, a plot $U\to\cinf(X\times Y,Z)$ is the same
as a smooth map $U\times X\times Y\to Z$. By Step~1 with $A=U\times X$ this is the same as a smooth map $U\times X\to\cinf(Y,Z)$, which by
\cref{def:functional} is the same as a plot $U\to\cinf(X,\cinf(Y,Z))$. The composite identification is $P\mapsto\Phi\circ P$. So $\Phi$
and $\Phi^{-1}$ carry plots to plots.
\emph{Step 3: evaluation and composition.} Evaluation corresponds under $\Phi$ to the identity of $\cinf(Y,Z)$. Composition
$\cinf(X,Y)\times\cinf(Y,Z)\to\cinf(X,Z)$ is smooth if and only if its adjoint
$\cinf(X,Y)\times\cinf(Y,Z)\times X\to Z$, $(f,g,x)\mapsto g(f(x))$, is smooth, and this is two evaluations.
\end{solution}
\chapter{Concrete sheaves}\label{ch:concrete}
\begin{chapabstract}
By axioms \ref{D1}--\ref{D3}, the plots of $X$ form a sheaf on the site of domains, and this sheaf is determined by
its points. We prove the Baez--Hoffnung theorem $\Diff\simeq\ConcSh(\Cart)$, identify concreteness with separatedness for the
adjunction $\Gamma\dashv\coDisc$, construct the concretisation functor, and introduce the first sheaves that are \emph{not}
diffeological spaces: the classifying sheaves of differential forms.
\end{chapabstract}
\source{The axioms of \IZ{art.~1.5}. The dictionary between diffeologies and sheaves is due to Baez and Hoffnung \cite{BaezHoffnung},
building on Dubuc \cite{Dubuc}.}
\section{The site}
Let $\Dom$ be the category of domains and smooth maps, and $\Cart\subset\Dom$ the full subcategory of Cartesian spaces. A family
of open embeddings $\set{U_i\into U}$ is \defn{covering} if it is jointly surjective. This is a coverage on both categories: the
preimage of an open cover under a smooth map is an open cover, and every open subset of $\R^n$ is a union of open balls, each
diffeomorphic to $\R^n$. By the same remark, $\Cart$ is a dense subsite of $\Dom$, so by the comparison lemma
\cite[C2.2.3]{Elephant} restriction is an equivalence
\[
\Sh(\Dom)\;\xrightarrow{\ \simeq\ }\;\Sh(\Cart)=:\SmSet .
\]
Objects of $\SmSet$ are called \defn{smooth sets}. We use $\Cart$ by default because its objects are contractible, which will
matter in \cref{ch:cohesion}; the reader who prefers the plots of \cite{IZ} to be defined on arbitrary domains loses nothing.
Both sites have a terminal object, $\R^0=\ast$, and for every object $U$ the set $\Hom(\ast,U)$ is the underlying set $|U|$.
\section{The Baez--Hoffnung theorem}
\begin{definition}\label{def:concrete-sheaf}
A presheaf $F$ on $\Cart$ (or $\Dom$) is \defn{concrete} if for every $U$ the map
\[
F(U)\longrightarrow\Set\bigl(|U|,F(\ast)\bigr),\qquad s\longmapsto\bigl(u\mapsto u^*s\bigr),
\]
is injective. $\ConcSh(\Cart)\subset\SmSet$ is the full subcategory of concrete sheaves.
\end{definition}
In words: a section over $U$ is determined by the function $|U|\to F(\ast)$ it induces on points. A section of a concrete
sheaf is a function with a property; a section of a general sheaf is a function with extra structure, or no function at all.
\begin{theorem}[Baez--Hoffnung \cite{BaezHoffnung}]\label{thm:BH}
The assignment $X\mapsto\underline X:=\Diff(-,X)$ is an equivalence of categories
\[
\Diff\;\xrightarrow{\ \simeq\ }\;\ConcSh(\Cart),
\]
with inverse $F\mapsto\bigl(F(\ast),\ \text{images of the maps }F(U)\to\Set(|U|,F(\ast))\bigr)$.
\end{theorem}
\begin{proof}
\emph{$\underline X$ is a concrete sheaf.} By \cref{rem:yoneda}, $\underline X(U)$ is the set of plots with source $U$. Axiom
\ref{D3} makes it a presheaf. It is concrete because a plot is a function and $\underline X(\ast)=X$ by \ref{D1}. It is separated
because functions that coincide locally coincide. Given a compatible family of plots $P_i\colon U_i\to X$ on a cover, compatibility on
points of the overlaps means that the $P_i$ glue to a function $P\colon U\to X$, and $P$ is a plot by \ref{D2}.
\emph{From a concrete sheaf to a diffeology.} Let $F$ be a concrete sheaf, $X=F(\ast)$, and let $\mathcal D_U\subseteq\Set(|U|,X)$ be
the image of $F(U)$. \ref{D1}: for $x\in X$, the pullback of $x$ along $U\to\ast$ is a section whose underlying function is constant
at $x$. \ref{D3}: naturality of $F(U)\to\Set(|U|,X)$ in $U$. \ref{D2}: let $P\colon|U|\to X$ restrict to elements of $\mathcal D_{U_i}$ on
a cover. By concreteness there are unique $s_i\in F(U_i)$ with underlying function $P|_{U_i}$. For any $W\to U_i$, $W\to U_j$ with the
same composite to $U$, the two restrictions of $s_i$ and $s_j$ to $W$ have the same underlying function, hence coincide by concreteness.
So the $s_i$ glue to $s\in F(U)$, whose underlying function coincides with $P$ on each $U_i$, hence is $P$.
\emph{Morphisms.} A natural transformation $\varphi\colon F\to G$ of concrete sheaves is determined by $\varphi_\ast\colon F(\ast)\to G(\ast)$,
because the square relating $\varphi_U$ to post-composition with $\varphi_\ast$ commutes and $G(U)\to\Set(|U|,G(\ast))$ is injective; and by the
same square $\varphi_\ast$ carries plots to plots. Conversely a smooth map induces a natural transformation by composition. The
two constructions on objects are mutually inverse by inspection.
\end{proof}
\begin{figure}[t]
\centering
\begin{tikzcd}[column sep=3.6em,row sep=2.6em]
\Mfd \arrow[r,hook] & \Diff\simeq\ConcSh(\Cart) \arrow[r,hook,shift right=1.2ex] &
\SmSet=\Sh(\Cart) \arrow[l,shift right=1.2ex,"\conc"'] \arrow[r,hook,shift right=1.2ex] &
\PSh(\Cart) \arrow[l,shift right=1.2ex,"\text{sheafify}"']
\end{tikzcd}
\caption{Three nested categories of ``smooth spaces''. Each hook is full and faithful; the two leftward arrows are left adjoints
(reflections). There is no reflection onto $\Mfd$, which is why manifolds are closed under so few constructions.}\label{fig:tower1}
\end{figure}
\begin{remark}[What each axiom is]
\ref{D3} is functoriality, \ref{D2} is descent, \ref{D1} is a normalisation that makes the value on the point the underlying set. The
only hypothesis of \cref{def:diffeology} with no sheaf-theoretic name is the unstated one: that a plot is a \emph{map of sets}. That is concreteness.
\end{remark}
\section{Concrete sites}
The proof of \cref{thm:BH} used only two properties of the site.
\begin{definition}[\cite{Dubuc,BaezHoffnung}]\label{def:concrete-site}
A \defn{concrete site} is a subcanonical site $\mathcal C$ with a terminal object $\ast$ such that
\textup{(a)} $|\cdot|=\Hom(\ast,-)\colon\mathcal C\to\Set$ is faithful, and
\textup{(b)} covering families are jointly surjective on points.
\end{definition}
\begin{table}[t]\centering\small
\begin{tabular}{@{}p{4.6cm}p{3.6cm}p{5.2cm}@{}}\toprule
concrete site & covers & concrete sheaves\\\midrule
$\Cart$ or $\Dom$, smooth maps & open covers & diffeological spaces \cite{Souriau,IZ}\\
convex subsets of $\R^n$, smooth maps & open covers & Chen spaces \cite{Chen,BaezHoffnung}\\
compact Hausdorff spaces & finite jointly surjective families & quasi-topological spaces \cite{Dubuc}\\
standard Borel spaces & countable Borel covers & quasi-Borel spaces \cite{HKSY}\\\bottomrule
\end{tabular}
\caption{Concrete sites and their concrete sheaves. Dropping concreteness in the first row gives smooth sets; in the third it gives,
up to set-theoretic care, condensed sets. The last row is the semantic basis of higher-order probabilistic programming and reappears in
\cref{ch:ai}.}\label{tab:sites}
\end{table}
Every statement in the rest of this chapter holds for an arbitrary concrete site with the same proof.
\section{Points, codiscrete objects, and separatedness}\label{sec:coDisc}
Let $\Gamma\colon\SmSet\to\Set$ be evaluation at the point, $\Gamma(F)=F(\ast)$. For a set $S$ define a presheaf
\[
\coDisc(S)(U)=\Set(|U|,S).
\]
\begin{lemma}\label{lem:coDisc}
$\coDisc(S)$ is a concrete sheaf --- it is the set $S$ with the coarse diffeology --- and $\Gamma\dashv\coDisc$. The counit
$\Gamma\coDisc(S)\to S$ is a bijection, so $\coDisc$ is full and faithful. A sheaf $F$ is concrete if and only if the unit
\[
\eta_F\colon F\longrightarrow\coDisc\,\Gamma F
\]
is a monomorphism.
\end{lemma}
\noindent The proof is \cref{exo:coDisc}. The last sentence is a restatement of \cref{def:concrete-sheaf}, but it changes what kind of
condition concreteness is. The pair $\Gamma\dashv\coDisc$ exhibits $\Set$ as a subtopos of $\SmSet$ (the inverse image $\Gamma$ preserves
all limits), hence corresponds to a Lawvere--Tierney topology $j$ on $\SmSet$, and an object is \emph{$j$-separated} exactly when the unit
to its $j$-sheafification is monic \cite[A4.4]{Elephant}. So:
\begin{theorem}[Dubuc \cite{Dubuc}; Baez--Hoffnung \cite{BaezHoffnung}; {\cite[A4.4, C2.2.13]{Elephant}}]\label{thm:quasitopos-abstract}
$\Diff$ is the category of separated objects for the Lawvere--Tierney topology on $\SmSet$ whose sheaves are the codiscrete objects.
Consequently $\Diff$ is a Grothendieck quasitopos: it is complete, cocomplete and locally Cartesian closed, it has a classifier for strong
subobjects, and it is a reflective subcategory of $\SmSet$ closed under limits, subobjects, and exponentials $G^F$ with $G$ concrete and
$F$ arbitrary.
\end{theorem}
Each clause is made explicit in terms of plots in \cref{ch:quasitopos}. Here we only construct the reflection.
\section{Concretisation}
\begin{proposition}[Concretisation]\label{prop:conc}
The inclusion $\Diff\into\SmSet$ has a left adjoint
\[
\conc(F)=\im\bigl(\eta_F\colon F\to\coDisc\,\Gamma F\bigr).
\]
Explicitly, $\conc(F)$ is the set $F(\ast)$ with the diffeology whose plots are the functions $|U|\to F(\ast)$ that are \emph{locally}
the underlying function of a section of $F$. The functor $\conc$ preserves finite products and epimorphisms, and $F\to\conc F$ is an epimorphism of sheaves.
\end{proposition}
\noindent The proof is \cref{exo:conc}. Two consequences are used constantly.
\begin{corollary}\label{cor:colimits-conc}
Colimits in $\Diff$ are computed by taking the colimit in $\SmSet$ and concretising. Limits in $\Diff$ are computed in $\SmSet$.
In particular, for a diffeological group $G$ acting on a diffeological space $X$,
\[
X/G\;=\;\conc\bigl(\text{sheaf quotient of }X\text{ by }G\bigr).
\]
\end{corollary}
\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
\node[hcsnodeb] (F) at (0,0) {$F$};
\node[hcsnode] (C) at (3.4,-1.5) {$\conc F$};
\node[hcsnode] (S) at (6.8,0) {$\coDisc\,\Gamma F$};
\draw[->] (F) -- node[above]{$\eta_F$} (S);
\draw[->>] (F) -- node[below left]{epi} (C);
\draw[hookr] (C) -- node[below right]{mono} (S);
\node[font=\footnotesize,align=center,text width=4.6cm] at (0,0.85) {all sections of $F$:\\ ``functions with structure''};
\node[font=\footnotesize,align=center,text width=4.6cm] at (6.8,0.85) {all functions on points:\\ the coarse diffeology};
\node[font=\footnotesize,align=center,text width=5.2cm] at (3.4,-2.45) {functions that locally underlie a section};
\end{tikzpicture}
\caption{Concretisation is an image factorisation: two sections have the same image exactly when they have the same values on points.}\label{fig:conc}
\end{figure}
\section{Sheaves that are not spaces}\label{sec:nonconcrete}
The reason to care about $\SmSet\smallsetminus\Diff$ is that it contains the moduli objects of differential geometry.
\begin{example}[Differential forms]\label{ex:Omega}
For $k\ge0$ let $\Om^k(U)$ be the vector space of smooth differential $k$-forms on $U$, with pullback as restriction. This is a sheaf on
$\Cart$. For $k=0$ it is the representable $\underline\R$, hence concrete. For $k\ge1$ we have $\Om^k(\ast)=0$, so
$\Gamma\Om^k$ is a single point while $\Om^k(\R^k)$ is infinite-dimensional: $\Om^k$ is as far from concrete as possible, and
$\conc\,\Om^k=\ast$. The same holds for the subsheaf $\Om^k_{\mathrm{cl}}$ of closed forms.
\end{example}
\begin{example}[A quotient that is not a space]\label{ex:RmodRd}
Let $\Rd$ be the additive group of real numbers with the discrete diffeology, acting on $\R$ by translation. The diffeological quotient
$\R/\Rd$ is a point. The sheaf quotient is not: the exterior derivative $\dd\colon\underline\R\to\Om^1_{\mathrm{cl}}$ is an
epimorphism of sheaves on $\Cart$ by the Poincar\'e lemma, and two functions have the same differential exactly when they differ by a
locally constant function, so
\[
\underline\R\,/\,\Rd\;\cong\;\Om^1_{\mathrm{cl}}\qquad\text{in }\SmSet .
\]
The ``space of real numbers up to a constant'' is the classifying sheaf of closed $1$-forms. Its concretisation is a point.
\end{example}
\begin{example}[An orbit space, before concretisation]\label{ex:Rpm-sheaf}
Let $Q$ be the sheaf quotient of $\R$ by $\{\pm1\}$. With $\varphi$ as in \cref{exo:cross}, the functions $f(x)=\varphi(x)-\varphi(-x)$ and
$g=\abs f$ are both smooth, and $g(x)=\pm f(x)$ for every $x$, so they define the same plot of $\dten_1=\conc Q$. But they are different
sections of $Q$, because near $0$ there is no \emph{locally constant} sign $\varepsilon$ with $g=\varepsilon f$. So $Q$ is not concrete:
in $\dten_1$ two parametrised families of orbits are equal as soon as they coincide pointwise, while in $Q$ equality requires a locally constant sign relating their lifts.
A third object appears in \cref{ch:bundles}: the stack $\R\hquot\{\pm1\}$, in which the stabiliser of $0$ is part of the data.
\end{example}
\begin{remark}[Summary]
A diffeological space is a smooth set with enough points. The classifying objects of geometry typically have too few: a differential
form is not a function on points, and a principal bundle is not even a section of a sheaf of sets. In \cite{IZ} differential forms are obtained by
defining them directly on plots \IZ{art.~6.28}; by \cref{ch:forms} this definition is $\Hom_{\SmSet}(X,\Om^k)$, and
the exactness properties of the theory are those of $\SmSet$.
\end{remark}
\exercisesheading
\begin{exercise}[label=exo:repr]{1}
Show that the representable presheaf $\underline{\R^n}=\Cart(-,\R^n)$ is a concrete sheaf, and identify the diffeological space it corresponds to
under \cref{thm:BH}.
\end{exercise}
\begin{solution}
A smooth map is determined by its values, so $\Cart(U,\R^n)\to\Set(|U|,\R^n)$ is injective. Smoothness is a local condition and smooth maps
that coincide on overlaps glue, so $\underline{\R^n}$ is a sheaf (the site is subcanonical). Its value on $\ast$ is the set $\R^n$ and its
plots are the smooth parametrisations: it is $\R^n$ with the standard diffeology.
\end{solution}
\begin{exercise}[label=exo:Omega1]{2}
Show that $\Hom_{\SmSet}(\Om^1,\underline{\R})=\R$ (constant maps only), while $\Hom_{\SmSet}(\underline\R,\Om^1)\cong\cinf(\R)$.
\end{exercise}
\begin{solution}
Let $\varphi\colon\Om^1\to\underline\R$ be natural. For $\omega\in\Om^1(U)$ and a point $u\colon\ast\to U$ we get
$\varphi_U(\omega)(u)=\varphi_\ast(u^*\omega)=\varphi_\ast(0)$, because $\Om^1(\ast)=0$. So $\varphi_U(\omega)$ is the constant function with value
$c=\varphi_\ast(0)$, for every $\omega$. Conversely each constant is natural. For the second claim, the Yoneda lemma gives
$\Hom(\underline\R,\Om^1)=\Om^1(\R)=\set{a(x)\,\dd x}\cong\cinf(\R)$. So there are many maps from a space to $\Om^1$ and essentially none
from $\Om^1$ to a space: $\Om^1$ is a place one maps \emph{into}.
\end{solution}
\begin{exercise}[label=exo:RmodRd]{2}
Verify the isomorphism $\underline\R/\Rd\cong\Om^1_{\mathrm{cl}}$ of \cref{ex:RmodRd} by checking that
$\dd\colon\underline\R\to\Om^1_{\mathrm{cl}}$ is the coequaliser of the action.
\end{exercise}
\begin{solution}
In a topos every epimorphism is the coequaliser of its kernel pair. \emph{$\dd$ is an epimorphism:} on a Cartesian space every closed $1$-form
is exact, so $\dd_U\colon\cinf(U)\to\Om^1_{\mathrm{cl}}(U)$ is already surjective for every $U\in\Cart$. \emph{Its kernel pair:} sections over
$U$ are pairs $(f,g)$ with $\dd f=\dd g$, that is, $g=f+c$ with $c$ constant, $U$ being connected. That is exactly the image of the map
$\underline\R\times\Rd\to\underline\R\times\underline\R$, $(f,c)\mapsto(f,f+c)$, since sections of the discrete $\Rd$ over a connected $U$ are
constants. So the kernel pair of $\dd$ is the action groupoid, and $\Om^1_{\mathrm{cl}}$ is its quotient.
\end{solution}
\begin{exercise}[label=exo:coDisc]{3}
Prove \cref{lem:coDisc} for an arbitrary concrete site.
\end{exercise}
\begin{solution}
\emph{Sheaf.} Let $R$ be a covering sieve on $D$ and $(s_g)_{g\in R}$ a compatible family, $s_g\in\Set(|E|,S)$ for $g\colon E\to D$. Define
$s\colon|D|\to S$ by $s(d)=s_g(e)$ whenever $g(e)=d$ with $g\in R$; such $(g,e)$ exist by axiom (b). It is well defined: the point
$d\colon\ast\to D$ equals $g\circ e$, which lies in the sieve, and compatibility gives $s_{g\circ e}=e^*s_g=s_g(e)$, an element of
$\Set(|\ast|,S)=S$ depending only on $d$. By construction $g^*s=s_g$, and $s$ is unique because the $g\in R$ are jointly surjective on points.
\emph{Concrete:} $\coDisc(S)(\ast)=S$ and the comparison map is the identity of $\Set(|D|,S)$.
\emph{Adjunction.} Given $\varphi\colon F\to\coDisc S$, naturality with respect to points $d\colon\ast\to D$ forces
$\varphi_D(t)(d)=\varphi_\ast(d^*t)$, so $\varphi$ is determined by $\varphi_\ast\colon F(\ast)\to S$; conversely any function
$F(\ast)\to S$ defines a natural transformation by this formula. Hence $\Hom(F,\coDisc S)\cong\Set(\Gamma F,S)$, naturally. The counit at $S$ is
the identity of $S$. The unit $\eta_F$ at $D$ sends $t$ to $d\mapsto d^*t$, which is the map of \cref{def:concrete-sheaf}; a morphism of sheaves is
monic iff it is injective on every $F(D)$.
\end{solution}
\begin{exercise}[label=exo:conc]{4}
Prove \cref{prop:conc}: the image of $\eta_F$ is a concrete sheaf, $F\mapsto\im\eta_F$ is left adjoint to the inclusion, and it preserves
finite products.
\end{exercise}
\begin{solution}
Write $C=\im\eta_F\subseteq\coDisc\,\Gamma F$, the image in the topos $\SmSet$, so that $F\onto C\into\coDisc\,\Gamma F$.
\emph{$C$ is concrete.} A subsheaf $C$ of a concrete sheaf $G$ is concrete: $C(U)\subseteq G(U)\into\Set(|U|,G(\ast))$, and by naturality the
functions so obtained take values in $C(\ast)$. Here $C(\ast)=F(\ast)$ because evaluation at $\ast$ preserves images and $\eta_F$ is a bijection
on points. Since the image sheaf is the sheafification of the presheaf image, $C(U)$ consists of the functions that are locally underlying
functions of sections of $F$.
\emph{Universal property.} Let $f\colon F\to G$ with $G$ concrete. By naturality of $\eta$,
\[
\eta_G\circ f=\coDisc\Gamma(f)\circ\eta_F .
\]
Let $(a,b)$ be a pair of generalised elements of $F$ with $\eta_Fa=\eta_Fb$. Then $\eta_Gfa=\eta_Gfb$, and $\eta_G$ is monic, so $fa=fb$. Thus
$f$ coequalises the kernel pair of $\eta_F$. In a topos the epimorphism $F\onto C$ is the coequaliser of that kernel pair, so $f$ factors
uniquely through $C$. This is the adjunction $\Hom_{\Diff}(\conc F,G)\cong\Hom_{\SmSet}(F,G)$.
\emph{Finite products.} $\Gamma$ and $\coDisc$ preserve products, so $\eta_{F\times F'}=\eta_F\times\eta_{F'}$. In a topos a product of two
epimorphisms is an epimorphism (pullbacks of epimorphisms are epimorphisms) and a product of monomorphisms is a monomorphism, so
$F\times F'\onto C\times C'\into\coDisc\Gamma F\times\coDisc\Gamma F'$ is the image factorisation of $\eta_{F\times F'}$. Also
$\conc(\ast)=\ast$.
\emph{Epimorphisms.} $\conc$ is a left adjoint, so it preserves epimorphisms as a functor to $\Diff$; and $F\onto\conc F$ is epic in
$\SmSet$ by construction.
\emph{A consequence.} For $G$ concrete and $F$ arbitrary, $G^F$ is concrete: for any sheaf $A$,
$\Hom(A,G^F)\cong\Hom(A\times F,G)\cong\Hom(\conc(A)\times\conc(F),G)$ depends on $A$ only through $\conc A$. So every map
$A\to G^F$ factors uniquely through $A\onto\conc A$; applied to the identity of $A=G^F$ this splits the epimorphism
$G^F\onto\conc(G^F)$, which is therefore an isomorphism.
\end{solution}
\chapter{The quasitopos \texorpdfstring{$\Diff$}{Diff}}\label{ch:quasitopos}
\begin{chapabstract}
We make \cref{thm:quasitopos-abstract} explicit. Inductions and subductions are the strong monomorphisms and strong epimorphisms; every
smooth map has two canonical images; function spaces exist in every slice. We then say precisely what $\Diff$ lacks: equivalence relations
are not effective. That one defect is the reason for the next two enlargements, to smooth sets and to smooth $\infty$-groupoids.
\end{chapabstract}
\source{\IZ{art.~1.29--1.65}: inductions, subductions, strict maps, functional diffeology; \IZ{art.~2.8--2.12} for the D-topology.}
\section{Four classes of maps}
\begin{proposition}\label{prop:monoepi}
In $\Diff$:
\begin{enumerate}[label=\textup{(\roman*)}]
\item the monomorphisms are the injective smooth maps, and the epimorphisms are the surjective smooth maps;
\item the strong monomorphisms are the inductions, and the strong epimorphisms are the subductions.
\end{enumerate}
\end{proposition}
\begin{proof}
(i) Injective maps are monic. Conversely test against maps from the point. Surjective maps are epic. Conversely, if $f\colon X\to Y$ misses
a point $y_0$, the two maps $Y\to\coDisc\{0,1\}$ given by the constant $0$ and the indicator of $y_0$ are smooth (every map into a coarse
space is) and coincide on $f(X)$. (ii) is \cref{exo:strongmono} and its dual.
\end{proof}
Recall that a monomorphism $m$ is \emph{strong} if it is right orthogonal to every epimorphism: in each commutative square with an epimorphism
$e$ on the left and $m$ on the right there is a unique diagonal filler. In a topos every monomorphism is strong. In $\Diff$ the identity map
\[
\R_{\mathrm{disc}}\longrightarrow\R
\]
is monic and epic but not an isomorphism, so $\Diff$ is not balanced and is not a topos. The four classes are drawn in \cref{fig:classes}.
\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
\draw[hcsteal,fill=hcsmist,line width=0.7pt] (0,0) ellipse (3.3 and 1.75);
\draw[hcsteal,fill=hcsteal!28,line width=0.7pt] (-1.0,-0.25) ellipse (1.75 and 0.95);
\node at (0,2.05) {injective smooth maps = monos};
\node[align=center] at (-1.0,-0.25) {inductions\\= strong monos};
\node[font=\footnotesize,hcsrust] at (2.05,-0.55) {$\R_{\mathrm{disc}}\!\to\!\R$};
\fill[hcsrust] (2.05,-0.25) circle (1.5pt);
\begin{scope}[xshift=7.6cm]
\draw[hcsgold,fill=hcssand,line width=0.7pt] (0,0) ellipse (3.3 and 1.75);
\draw[hcsgold,fill=hcsgold!35,line width=0.7pt] (-1.0,-0.25) ellipse (1.75 and 0.95);
\node at (0,2.05) {surjective smooth maps = epis};
\node[align=center] at (-1.0,-0.25) {subductions\\= strong epis};
\node[font=\footnotesize,hcsrust] at (2.05,-0.55) {$\R_{\mathrm{disc}}\!\to\!\R$};
\fill[hcsrust] (2.05,-0.25) circle (1.5pt);
\end{scope}
\end{tikzpicture}
\caption{Monomorphisms and epimorphisms in $\Diff$, with their strong subclasses. The marked map lies in both outer regions and in
neither inner one. In a topos the inner and outer regions coincide.}\label{fig:classes}
\end{figure}
\section{Two images}\label{sec:two-images}
\begin{theorem}[Two factorisation systems]\label{thm:factorisations}
Every smooth map $f\colon X\to Y$ factors, uniquely up to unique diffeomorphism, in two ways:
\[
\begin{tikzcd}[column sep=3.2em,row sep=2.2em]
X \arrow[r,two heads,"\text{subduction}"] \arrow[d,two heads,"\text{surjection}"'] & \operatorname{coim}f=X/{\sim_f} \arrow[d,hook,"\text{injection}"] \arrow[dl,"\kappa_f"description]\\
\im f=f(X)_{\Sub} \arrow[r,hook,"\text{induction}"'] & Y
\end{tikzcd}
\]
where $x\sim_f x'$ iff $f(x)=f(x')$, the quotient carries the quotient diffeology and $f(X)_{\Sub}$ the subspace diffeology. The comparison
$\kappa_f$ is a smooth bijection. \textup{(Strong epi, mono)} and \textup{(epi, strong mono)} are orthogonal factorisation systems on $\Diff$, and
both left classes are stable under pullback.
\end{theorem}
\begin{proof}
Existence is the universal property of the quotient and of the subspace (\cref{thm:topological}). Orthogonality of subductions against
injections: given a square $m\circ u=v\circ e$ with $e\colon A\onto B$ a subduction and $m$ injective, the unique set-theoretic filler
$d\colon B\to X$ satisfies $d\circ e=u$, so it is smooth because $e$ is a subduction (final lift). Orthogonality of surjections against inductions
is \cref{exo:strongmono}. Uniqueness follows from orthogonality. Pullback stability of subductions is \cref{prop:stability}; surjections are
pullback stable in $\Set$.
\end{proof}
\begin{definition}[\IZ{art.~1.54}]
A smooth map $f$ is \defn{strict} if $\kappa_f\colon\operatorname{coim}f\to\im f$ is a diffeomorphism.
\end{definition}
In a topos every map is strict. In $\Diff$ strictness is a real condition, and the non-strict maps are where the geometry is
(\cref{tab:strict}). The reader should think of $\operatorname{coim}f$ as ``$X$ with the identifications induced by $f$'' and of $\im f$ as
``the part of $Y$ in the range of $f$''; they have the same points, and $\operatorname{coim} f$ has fewer plots.
\begin{table}[t]\centering\small
\begin{tabular}{@{}llll@{}}\toprule
map $f$ & $\operatorname{coim} f$ & $\im f$ & strict?\\\midrule
$\R\to\R$, $x\mapsto x^2$ & $\dten_1=\R/\{\pm1\}$ & $H=[0,\infty)_{\Sub}$ & no (\cref{prop:delta1})\\
$\R^n\to\R$, $x\mapsto\abs{x}^2$ & $\dten_n=\R^n/\Ort(n)$ & $H$ & no \IZ{Exercise~50}\\
$\R\sqcup\R\to\R^2$, the two axes & $\R\vee\R$ & the cross $K$ & no (\cref{exo:cross})\\
$(0,2\pi)\to\R^2$, figure eight & $(0,2\pi)$ & figure eight$_{\Sub}$ & no (\cref{exo:eight})\\
$\R\to T^2$, $t\mapsto[t,\alpha t]$ & $\R$ & dense leaf$_{\Sub}$ & yes \IZ{Exercise~31}\\
$\R\to\Tal$ & $\Tal$ & $\Tal$ & yes\\\bottomrule
\end{tabular}
\caption{Coimage and image of some smooth maps. In the second row the $\dten_n$ are pairwise non-diffeomorphic \IZ{Exercise~50}, so infinitely many different
coimages have a single image.}\label{tab:strict}
\end{table}
\section{Subobjects and function spaces}
\begin{proposition}[Strong subobject classifier]\label{prop:Omega}
Let $\Om_{\mathrm{st}}=\coDisc\{0,1\}$. For every diffeological space $X$, the map $A\mapsto\chi_A$ is a bijection between subsets
$A\subseteq X$ (equivalently, isomorphism classes of inductions into $X$) and smooth maps $X\to\Om_{\mathrm{st}}$, and
$A_{\Sub}\into X$ is the pullback of $\{1\}\into\Om_{\mathrm{st}}$ along $\chi_A$.
\end{proposition}
\begin{proof}
Every function into a coarse space is smooth, so $\Diff(X,\Om_{\mathrm{st}})=\Set(X,\{0,1\})$. The pullback of $\{1\}\into\Om_{\mathrm{st}}$
along $\chi_A$ is the set $A$ with the initial diffeology for $A\to X$, the map to the point imposing no condition.
\end{proof}
So $\Diff$ classifies the subobjects that carry no information beyond their points, and has no classifier for the others. Function spaces
were treated in \cref{thm:ccc}; under \cref{thm:BH} the functional diffeology is the exponential of sheaves, which is concrete by
\cref{thm:quasitopos-abstract}. The same is true in every slice.
\begin{theorem}[Local Cartesian closure, \cite{BaezHoffnung}]\label{thm:lcc}
For every smooth map $f\colon B'\to B$ the pullback functor $f^*\colon\Diff/B\to\Diff/B'$ has a right adjoint $\Pi_f$, as well as its left
adjoint $\Sigma_f$ given by composition. Consequently $f^*$ preserves all colimits: colimits in $\Diff$ are universal.
\end{theorem}
\noindent An explicit $\Pi_f$ is constructed in \cref{exo:lcc}. ``Colimits are universal'' is the abstract form of
\cref{prop:stability}(i), and it is what makes it legitimate to compute with quotients fibrewise: if $X\to B$ is a quotient map, so is its
restriction over any plot of $B$.
\section{Comparison with topological spaces}
For a topological space $T$ let $C(T)$ be the set $T$ with the \defn{continuous diffeology}, whose plots are the continuous parametrisations.
\begin{proposition}[\cite{ChristensenSinnamonWu}]\label{prop:Dadj}
$D\colon\Diff\to\Top$ is left adjoint to $C\colon\Top\to\Diff$. The adjunction restricts to an equivalence between the diffeological
spaces with $X\cong CD(X)$ and the $\Delta$-generated topological spaces.
\end{proposition}
\noindent The adjunction is \cref{exo:Dadj}. Being a left adjoint, $D$ preserves colimits; it does not preserve finite products in general
\cite{ChristensenSinnamonWu}. The adjunction is far from an equivalence in both directions: $CD(\Tal)$ is coarse, and $DC(T)$ is $T$ with the
$\Delta$-generated refinement of its topology. For the purposes of this monograph the D-topology is a convenience for stating local
conditions, and is never the carrier of homotopical information.
\section{What \texorpdfstring{$\Diff$}{Diff} lacks}\label{sec:lacks}
A quasitopos is a topos except for one exactness property. In $\Diff$ it fails as follows.
\begin{proposition}[Equivalence relations are not effective]\label{prop:noneffective}
Let $R\into X\times X$ be an equivalence relation in $\Diff$, that is, an injective smooth map whose image is an equivalence relation on the set $X$.
The kernel pair of the quotient $X\to X/R$ is the set $R$ with the \emph{subspace} diffeology of $X\times X$. Hence $R$ is the kernel
pair of its quotient if and only if $R\into X\times X$ is an induction.
\end{proposition}
\begin{proof}
The kernel pair is the pullback $X\times_{X/R}X$, which by \cref{thm:topological} is the set of pairs with the same image, with the
subspace diffeology of $X\times X$.
\end{proof}
\begin{example}\label{ex:noneffective}
The orbit relation of $\Rd$ acting on $\R$ is $\R\times\Rd\to\R\times\R$, $(x,c)\mapsto(x,x+c)$. It is injective but not an induction: its
image is all of $\R\times\R$, whose subspace diffeology is the standard one. In $\Diff$ the quotient is a point and the relation is forgotten.
In $\SmSet$ the quotient is $\Om^1_{\mathrm{cl}}$ (\cref{ex:RmodRd}) and the relation is recovered as its kernel pair.
\end{example}
This is the first rung of a ladder (\cref{fig:ladder}). Passing from $\Diff$ to $\SmSet$ makes equivalence relations effective, at the price of
including objects that are not determined by their points. But a group action is an equivalence relation only when it is free, and the next
defect appears immediately: for a non-free action, the action \emph{groupoid} is not the kernel pair of anything in $\SmSet$. Passing to the
$\infty$-topos $\Hh$ of \cref{ch:cohesion} makes all groupoid objects effective, at the price of including objects that are not sets.
\Cref{thm:three-quotients} will make this ladder into a theorem.
\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
\node[hcsnode,minimum width=3.3cm,minimum height=1.0cm,align=center] (a) at (0,0) {$\Diff$\\[-0.2ex]\footnotesize quasitopos};
\node[hcsnode,minimum width=3.3cm,minimum height=1.0cm,align=center] (b) at (5,0) {$\SmSet$\\[-0.2ex]\footnotesize topos};
\node[hcsnode,minimum width=3.3cm,minimum height=1.0cm,align=center] (c) at (10,0) {$\Hh=\Sh_\infty(\Cart)$\\[-0.2ex]\footnotesize $\infty$-topos};
\draw[hookr] (a)--(b); \draw[hookr] (b)--(c);
\node[font=\footnotesize,align=center,text width=3.6cm] at (0,-1.25) {effective: quotient maps that are subductions};
\node[font=\footnotesize,align=center,text width=3.6cm] at (5,-1.25) {effective: all equivalence relations};
\node[font=\footnotesize,align=center,text width=3.6cm] at (10,-1.25) {effective: all groupoid objects};
\node[font=\footnotesize,hcsrust] at (2.5,0.75) {free actions};
\node[font=\footnotesize,hcsrust] at (7.5,0.75) {all actions};
\end{tikzpicture}
\caption{The exactness ladder. Each inclusion makes effective a class of quotients that is not effective in the previous category, and each has a left adjoint
($\conc$, respectively $\pi_0$) that computes the cruder quotient from the finer one.}\label{fig:ladder}
\end{figure}
\exercisesheading
\begin{exercise}[label=exo:notbalanced]{1}
Show directly that $\id\colon\R_{\mathrm{disc}}\to\R$ is a monomorphism and an epimorphism of $\Diff$ but neither an induction nor a subduction.
\end{exercise}
\begin{solution}
It is bijective, hence monic and epic by \cref{prop:monoepi}. It is not an induction: the identity parametrisation of $\R$ composed with it
is a plot of $\R$, but is not locally constant. It is not a subduction: the same plot of $\R$ has no local lift to a locally constant
parametrisation. Equivalently, the inverse map is not smooth.
\end{solution}
\begin{exercise}[label=exo:eight]{2}
Let $j\colon(0,2\pi)\to\R^2$, $j(t)=(\sin t,\sin 2t)$, with image the figure eight $E$. Show that $j$ is an injective immersion that is not an induction.
\end{exercise}
\begin{solution}
$j'(t)=(\cos t,2\cos 2t)$ never vanishes, and $j$ is injective on $(0,2\pi)$: the only parameter with $j(t)=0$ is $t=\pi$, and elsewhere
$(\sin t,\sin 2t)$ determines $(\sin t,\cos t)$. Now let $c(s)=(\sin s,\sin 2s)$ for $\abs s<1$. It is a smooth curve in $\R^2$ with values
in $E$, hence a plot of $E_{\Sub}$. But $j^{-1}\circ c$ equals $s$ for $s>0$, equals $\pi$ at $s=0$, and equals $s+2\pi$ for $s<0$. It is
not continuous, so it is not a plot of $(0,2\pi)$, and $j$ is not an induction. Here $\operatorname{coim}j$ is an open interval and $\im j$ is
the figure eight with both branches through the node available to plots.
\end{solution}
\begin{exercise}[label=exo:strongmono]{3}
Prove that a monomorphism of $\Diff$ is strong if and only if it is an induction.
\end{exercise}
\begin{solution}
($\Leftarrow$) Let $m\colon X\into Y$ be an induction, $e\colon A\to B$ surjective and smooth, and $u\colon A\to X$, $v\colon B\to Y$ smooth
with $m u=v e$. For $b\in B$ choose $a$ with $e(a)=b$ and put $d(b)=u(a)$; this is independent of $a$ because $m$ is injective and
$m(u(a))=v(b)$. Then $d e=u$ and $m d=v$. Since $m\circ d=v$ is smooth and $m$ is an induction, $d$ is smooth. Uniqueness holds since $e$ is epic.
($\Rightarrow$) Let $m\colon X\to Y$ be a strong monomorphism and factor it as $X\xrightarrow{m'}m(X)_{\Sub}\xrightarrow{i}Y$. The map
$m'$ is a smooth bijection, hence an epimorphism. Apply orthogonality to the square $m\circ\id_X=i\circ m'$: there is a smooth
$d\colon m(X)_{\Sub}\to X$ with $d\circ m'=\id_X$. So $m'$ is a diffeomorphism and $m$ is an induction.
The dual statement, that strong epimorphisms are the subductions, is proved in the same way using the factorisation through $X/{\sim_f}$.
\end{solution}
\begin{exercise}[label=exo:Dadj]{3}
Prove that $D\dashv C$: for a diffeological space $X$ and a topological space $T$, a map $f\colon X\to T$ is continuous for the D-topology if
and only if it is smooth as a map $X\to C(T)$.
\end{exercise}
\begin{solution}
$f\colon X\to C(T)$ is smooth iff $f\circ P$ is a continuous parametrisation of $T$ for every plot $P$ of $X$. On the other hand the
D-topology is the final topology for the family of all plots, so $f\colon D(X)\to T$ is continuous iff $f\circ P$ is continuous for every
plot $P$. These are the same condition. Naturality in both variables is clear, so $\Top(D X,T)\cong\Diff(X,C T)$.
\end{solution}
\begin{exercise}[label=exo:mfd-not-ccc]{3}
Show that the category of finite-dimensional manifolds is not Cartesian closed: there is no manifold $E$ with natural bijections
$\Mfd(M\times\R,\R)\cong\Mfd(M,E)$.
\end{exercise}
\begin{solution}
Suppose $E$ exists, of dimension $d$. Taking $M=\ast$ identifies the points of $E$ with $\cinf(\R)$, and by naturality in $M$ a smooth
map $M\to E$ has as underlying function $m\mapsto g(m,-)$ for the corresponding $g\in\cinf(M\times\R)$. Take $M=\R^{k}$ with $k>d$ and
$g(a,t)=\sum_{i<k}a_it^i$. The corresponding smooth map $\psi\colon\R^k\to E$ is injective, because distinct coefficient vectors give
distinct polynomial functions. But a smooth map from $\R^k$ to a manifold of dimension $d<k$ is never injective: on the open set where its
rank is maximal, the constant rank theorem makes it locally a projection with fibres of positive dimension. In $\Diff$ the same universal
property is satisfied by $\cinf(\R,\R)$ with the functional diffeology.
\end{solution}
\begin{exercise}[label=exo:lcc]{4}
Construct the right adjoint $\Pi_f$ of \cref{thm:lcc}.
\end{exercise}
\begin{solution}
Let $f\colon B'\to B$ be smooth and $p\colon E\to B'$ an object of $\Diff/B'$. For $b\in B$ let $F_b=f^{-1}(b)$ with the subspace diffeology, and let
\[
\Pi_fE=\set{(b,s) : b\in B,\ s\colon F_b\to E\ \text{smooth},\ p\circ s=\id_{F_b}}\xrightarrow{\ \pi\ }B .
\]
For a parametrisation $r\mapsto(b_r,s_r)$ of $\Pi_fE$ with domain $U$ and $r\mapsto b_r$ a plot of $B$, write
$U\times_BB'=\set{(r,b') : f(b')=b_r}$, a subspace of $U\times B'$. Declare the parametrisation a plot if $r\mapsto b_r$ is a plot of $B$ and
\[
U\times_BB'\longrightarrow E,\qquad(r,b')\longmapsto s_r(b')
\]
is smooth.
\emph{This is a diffeology.} \ref{D1}: for a constant parametrisation, $U\times_BB'=U\times F_b$ and the map is $s\circ\pr_2$. \ref{D3}: a smooth
$\phi\colon V\to U$ induces a smooth map $V\times_BB'\to U\times_BB'$. \ref{D2}: a plot of $U\times_BB'$ is a pair $(\rho,Q)$, and locally $\rho$
takes values in one member of a given cover of $U$; smoothness is tested on plots, hence locally in $U$.
\emph{The adjunction.} Let $q\colon Z\to B$ be an object of $\Diff/B$; then $f^*Z=Z\times_BB'$. Given $g\colon Z\to\Pi_fE$ over $B$, define
$\hat g(z,b')=g(z)(b')$. For a plot $(\zeta,Q)$ of $Z\times_BB'$, the composite $g\circ\zeta$ is a plot of $\Pi_fE$, so
$(r,b')\mapsto g(\zeta(r))(b')$ is smooth on $U\times_BB'$; precomposing with the plot $r\mapsto(r,Q(r))$ of $U\times_BB'$ shows that
$\hat g\circ(\zeta,Q)$ is a plot of $E$. So $\hat g$ is smooth, and it lies over $B'$. Conversely, given $h\colon Z\times_BB'\to E$ over $B'$, put
$\check h(z)=(q(z),h(z,-))$. Each $h(z,-)$ is a smooth section over $F_{q(z)}$, and for a plot $\zeta$ of $Z$ the map
$(r,b')\mapsto h(\zeta(r),b')$ is the composite of $h$ with the smooth map $\zeta\times\id$ restricted to $U\times_BB'$, so $\check h\circ\zeta$ is a plot.
The two assignments are inverse to each other and natural in $Z$, so $\Hom_{/B}(Z,\Pi_fE)\cong\Hom_{/B'}(f^*Z,E)$.
For $B=\ast$ this is \cref{thm:ccc}: $\Pi_f(B'\times Y\to B')=\cinf(B',Y)$.
\end{solution}
\part{The higher structure}
\chapter{Cohesion}\label{ch:cohesion}
\begin{chapabstract}
The topos of smooth sets carries four adjoint functors to sets --- pieces, discrete, points, codiscrete --- and the same is true one level up,
for the $\infty$-topos $\Hh$ of smooth $\infty$-groupoids and the $\infty$-category of spaces. We set up this structure, locate $\Diff$
inside $\Hh$ as the concrete $0$-types, and state the theorem that computes the leftmost adjoint, the \emph{shape}, by smooth singular simplices.
\end{chapabstract}
\source{\IZ{art.~5.6--5.9} (components) is the only direct contact. The framework is Lawvere's axiomatic cohesion \cite{Lawvere} and
Schreiber's cohesive $\infty$-topos of smooth $\infty$-groupoids \cite{Schreiber}.}
\section{Pieces, discrete, points, codiscrete}
We already have $\Gamma\dashv\coDisc$ from \cref{sec:coDisc}. There are two more adjoints on the left.
\begin{proposition}[Cohesion of smooth sets]\label{prop:cohesion1}
There is a chain of adjunctions
\[
\begin{tikzcd}[column sep=5.5em]
\SmSet \arrow[r,shift left=4.5ex,"\Pi_0"] \arrow[r,shift right=1.5ex,"\Gamma"description]
& \Set \arrow[l,shift right=1.5ex,"\Disc"description] \arrow[l,shift left=4.5ex,"\coDisc"]
\end{tikzcd}
\qquad\Pi_0\dashv\Disc\dashv\Gamma\dashv\coDisc
\]
in which:
\begin{enumerate}[label=\textup{(\roman*)}]
\item $\Disc(S)$ is the constant presheaf, i.e.\ the set $S$ with the discrete diffeology;
\item $\Pi_0(F)=\colim_{U\in\Cart^{\op}}F(U)$, and for a diffeological space $X$ this is the set $\pi_0(X)$ of smooth path components \IZ{art.~5.6};
\item $\Disc$ and $\coDisc$ are full and faithful;
\item $\Pi_0$ preserves finite products;
\item the canonical map $\Gamma F\to\Pi_0F$ is surjective, and $\Disc S\to\coDisc S$ is a monomorphism.
\end{enumerate}
\end{proposition}
\begin{proof}
(i) Let $\{U_i\into U\}$ be a cover of a Cartesian space and $s_i\in S$ a family with $s_i=s_j$ whenever some $W$ maps to both $U_i$ and $U_j$,
that is, whenever $U_i\cap U_j\ne\varnothing$. Since $U$ is connected, any two members of the cover are joined by a chain of members with
non-empty consecutive intersections, so all $s_i$ are equal: the constant presheaf is a sheaf. Its plots are the constant maps on each
Cartesian space, hence the locally constant parametrisations. (ii) $\Hom(F,\Disc S)$ is the set of natural transformations from $F$ to a constant
functor, that is $\Set(\colim F,S)$. For $F=\underline X$ the colimit is the set of plots modulo the relation generated by $P\sim P\circ\phi$; every
plot is equivalent to each of its values, and two points are equivalent iff they are joined by a finite chain of plots with connected domains, iff they are joined by a smooth path.
(iii) $\Gamma\Disc S=S$ and $\Gamma\coDisc S=S$. (iv) $\Cart$ has finite products, so $\Cart^{\op}$ is sifted, and sifted colimits commute
with finite products in $\Set$. (v) An element of the colimit is represented by some $s\in F(U)$, which is equivalent to its restriction to
any point of $U$; and $S\to\Set(|U|,S)$ is injective because $U$ is non-empty.
\end{proof}
Lawvere calls a topos with such a quadruple, satisfying (iii)--(v), \emph{cohesive} \cite{Lawvere}. The names are meant literally: $\Gamma X$
is the set of points of $X$, $\Pi_0X$ is the set of pieces into which the points cohere, and $\Disc$ and $\coDisc$ are the two extreme cohesions on a set. Composing
adjacent functors gives three idempotent operations on $\SmSet$,
\[
\shp_0=\Disc\Pi_0,\qquad\fl=\Disc\,\Gamma,\qquad\shr=\coDisc\,\Gamma,\qquad\shp_0\dashv\fl\dashv\shr ,
\]
and \cref{lem:coDisc} becomes: \emph{a smooth set $X$ is a diffeological space iff $X\to\shr X$ is monic.}
\section{Smooth \texorpdfstring{$\infty$}{infinity}-groupoids}
\begin{definition}\label{def:H}
$\Hh=\Sh_\infty(\Cart)$ is the $\infty$-topos of sheaves of spaces on the site $\Cart$: functors $X\colon\Cart^{\op}\to\Spc$ to the
$\infty$-category of spaces such that for every covering family $\{U_i\into U\}$ the map $X(U)\to\lim_{[k]\in\Delta}\prod X(U_{i_0}\cap\dots\cap U_{i_k})$
(with intersections computed in sheaves) is an equivalence. Its objects are \defn{smooth $\infty$-groupoids}.
\end{definition}
Concretely $\Hh$ is presented by simplicial presheaves on $\Cart$ with the local projective model structure; on this site \v{C}ech descent
and hyperdescent coincide \cite{Schreiber}. The $0$-truncated objects of $\Hh$ are the smooth sets, and the $1$-truncated objects are the stacks
of groupoids on $\Cart$ \cite[\S6.4.5]{HTT}. The truncation functors $\tau_{\le n}$ are left adjoint to the inclusions; we write $\pi_0=\tau_{\le0}$.
\begin{theorem}[Schreiber \cite{Schreiber}]\label{thm:cohesive}
There is a chain of adjoint $\infty$-functors
\[
\Pi\dashv\Disc\dashv\Gamma\dashv\coDisc\colon\ \Hh\rightleftarrows\Spc
\]
with $\Disc$ and $\coDisc$ full and faithful and $\Pi$ preserving finite products. Here $\Disc K$ is the constant presheaf, $\Gamma X=X(\ast)$,
$\coDisc K=(U\mapsto K^{|U|})$, and $\Pi X=\colim_{\Cart^{\op}}X$.
\end{theorem}
\begin{proof}[Sketch]
The key input is that constant presheaves are $\infty$-sheaves on $\Cart$ (\cref{exo:constant-sheaf}); this uses that Cartesian spaces are
contractible and would fail on $\Dom$. Given that, $\Map_{\Hh}(X,\Disc K)$ is the space of maps of presheaves into a constant presheaf, which is
$\Map(\colim X,K)$. $\Cart^{\op}$ is sifted, so $\Pi$ preserves finite products \cite[5.5.8]{HTT}. Evaluation at the point preserves limits
and colimits of sheaves because the point has only the trivial cover; its right adjoint is as stated because $\Map(X,K^{|-|})$ is computed
pointwise in $|U|$. Full faithfulness: $\Gamma\Disc K=K=\Gamma\coDisc K$.
\end{proof}
\begin{definition}
The three \defn{modalities} of $\Hh$ are the idempotent (co)monads
\[
\shp=\Disc\,\Pi\ \ (\text{shape}),\qquad\fl=\Disc\,\Gamma\ \ (\text{flat}),\qquad\shr=\coDisc\,\Gamma\ \ (\text{sharp}),\qquad\shp\dashv\fl\dashv\shr .
\]
For $X\in\Hh$ the space $\Pi X$, or the discrete object $\shp X$, is called the \defn{shape} or \defn{fundamental $\infty$-groupoid} of $X$.
\end{definition}
\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
\node[hcsnode,minimum width=2.6cm] (H) at (0,0) {$\Hh$};
\node[hcsnode,minimum width=2.6cm] (S1) at (0,-1.5) {smooth stacks};
\node[hcsnode,minimum width=2.6cm] (S0) at (0,-3.0) {$\SmSet$};
\node[hcsnodeb,minimum width=2.6cm] (D) at (0,-4.5) {$\Diff$};
\node[hcsnoder,minimum width=2.6cm] (M) at (0,-6.0) {$\Mfd$};
\draw[hookr] (S1.north east) to[bend right=30] (H.south east);
\draw[hookr] (S0.north east) to[bend right=30] (S1.south east);
\draw[hookr] (D.north east) to[bend right=30] (S0.south east);
\draw[hookr] (M.north east) to[bend right=30] (D.south east);
\draw[->] (H.south west) to[bend right=30] node[left]{$\tau_{\le1}$} (S1.north west);
\draw[->] (S1.south west) to[bend right=30] node[left]{$\pi_0$} (S0.north west);
\draw[->] (S0.south west) to[bend right=30] node[left]{$\conc$} (D.north west);
\node[align=left,text width=7.4cm,font=\footnotesize] at (6.4,0) {all smooth $\infty$-groupoids: $\B^nG$, $\shp X$, moduli of bundles with connection};
\node[align=left,text width=7.4cm,font=\footnotesize] at (6.4,-1.5) {$1$-truncated: $\B G$, orbifolds, $X\hquot G$};
\node[align=left,text width=7.4cm,font=\footnotesize] at (6.4,-3.0) {$0$-truncated: $\Om^k$, $\Om^k_{\mathrm{cl}}$, sheaf quotients};
\node[align=left,text width=7.4cm,font=\footnotesize] at (6.4,-4.5) {$0$-truncated and $X\into\shr X$: $\Tal$, $\cinf(X,Y)$, $\Dif(X)$, orbit spaces};
\node[align=left,text width=7.4cm,font=\footnotesize] at (6.4,-6.0) {locally $\R^n$: no reflection, no quotients, no function spaces};
\end{tikzpicture}
\caption{The position of diffeological spaces. Each hooked arrow is a full embedding; each arrow on the left is its left adjoint. The composite
reflection $\Hh\to\Diff$ is $X\mapsto\conc\,\pi_0X$.}\label{fig:tower}
\end{figure}
\begin{theorem}[$\Diff$ inside $\Hh$]\label{thm:DiffinH}
The composite $\Diff\into\SmSet\into\Hh$ is full and faithful, preserves limits, and has the left adjoint $\conc\circ\pi_0$. Its essential
image consists of the $0$-truncated objects $X$ for which the unit $X\to\shr X$ is a monomorphism.
\end{theorem}
\begin{proof}
The $0$-truncated objects of $\Sh_\infty(\Cart)$ are the sheaves of sets, and the inclusion is right adjoint to $\pi_0$. On $0$-truncated
objects $\shr$ restricts to $\coDisc\,\Gamma$ of \cref{sec:coDisc}, and a map of $0$-truncated objects is a monomorphism in $\Hh$ iff it is one
in $\SmSet$. Now apply \cref{lem:coDisc} and \cref{prop:conc}.
\end{proof}
\section{Reading the modalities}
For $X\in\Hh$ there are canonical maps
\[
\fl X\longrightarrow X\longrightarrow\shr X,\qquad X\longrightarrow\shp X .
\]
Here $\fl X$ consists of the points of $X$ with the discrete cohesion, $\shr X$ of the points with the codiscrete cohesion, and $\shp X$ is the
homotopy type of $X$ as a discrete object. Their values on the running examples are in \cref{tab:modalities}.
\begin{table}[t]\centering\small
\begin{tabular}{@{}lllll@{}}\toprule
$X$ & $\Gamma X$ & $\fl X$ & $\shr X$ & $\Pi X$\\\midrule
$\R^n$ & the set $\R^n$ & $\R^n$ discrete & $\R^n$ coarse & $\ast$\\
manifold $M$ & the set $M$ & $M$ discrete & $M$ coarse & homotopy type of $M$\\
$\Tal$ & $\R/\Lam_\alpha$ & discrete & coarse & $\B\Z^2\simeq T^2$\\
$\dten_1=\R/\{\pm1\}$ & $[0,\infty)$ & discrete & coarse & $\ast$\\
$\Om^k$, $k\ge1$ & $\ast$ & $\ast$ & $\ast$ & $\ast$\\
$\Om^1_{\mathrm{cl}}=\R/\Rd$ & $\ast$ & $\ast$ & $\ast$ & $\B\Rd=K(\R,1)$\\
$\B G$, $G$ a Lie group & $\B(G^\delta)$ & $\B(G^\delta)$ & $\B(\shr G)$ & classifying space $BG$\\\bottomrule
\end{tabular}
\caption{The functors of cohesion on examples. Rows 3 and 6 are justified in \cref{ch:homotopy}; note that the one-point sheaf
$\Om^1_{\mathrm{cl}}$ has a non-trivial shape, while $\Om^k$ is contractible by the homotopy $(\omega,t)\mapsto t\omega$.}\label{tab:modalities}
\end{table}
Two entries are used repeatedly. First, a manifold has the shape of its underlying homotopy type: this is the nerve theorem for a good open
cover, and is the reason for the name ``shape''. Second, $\fl\B G=\Disc\,\B(G^\delta)$: maps $X\to\fl\B G$ are principal bundles for the
discrete group, that is, \emph{flat} $G$-bundles, whence the name of the modality. By adjunction
\begin{equation}\label{eq:flat-adjunction}
\Map_{\Hh}(X,\fl A)\;\simeq\;\Map_{\Spc}(\Pi X,\Gamma A),
\end{equation}
so cohomology with flat (locally constant) coefficients is ordinary cohomology of the shape. This formula does a great deal of work in
Chapters~\ref{ch:forms} and~\ref{ch:number-theory}.
\section{Computing the shape}
For $k\ge0$ let $\Delta^k_e=\set{x\in\R^{k+1} : \sum x_i=1}$ be the \defn{extended simplex}, an affine hyperplane diffeomorphic to $\R^k$. The
$\Delta^k_e$ form a cosimplicial object of $\Cart$.
\begin{figure}[t]
\centering
\begin{tikzpicture}[scale=1.0,font=\small]
\fill[hcsmist] (-1.6,-0.9) -- (3.4,-0.9) -- (4.4,1.9) -- (-0.6,1.9) -- cycle;
\draw[hcsteal] (-1.6,-0.9) -- (3.4,-0.9) -- (4.4,1.9) -- (-0.6,1.9) -- cycle;
\fill[hcsgold!45] (0,0) -- (2.4,0) -- (1.5,1.5) -- cycle;
\draw[hcsink,line width=0.9pt] (0,0) -- (2.4,0) -- (1.5,1.5) -- cycle;
\foreach \p/\l/\a in {(0,0)/$e_0$/below left,(2.4,0)/$e_1$/below right,(1.5,1.5)/$e_2$/above}{\fill \p circle (1.6pt); \node[\a] at \p {\l};}
\node at (1.3,0.5) {$\Delta^2$};
\node[hcsteal] at (3.4,1.5) {$\Delta^2_e\cong\R^2$};
\node[align=left,text width=6.0cm,font=\footnotesize] at (8.2,0.6) {A smooth singular simplex of $X$ is a plot $\Delta^k_e\to X$. Using the whole
affine plane, not the closed triangle, keeps the probes inside $\Cart$ and makes face and degeneracy maps smooth.};
\end{tikzpicture}
\caption{The extended simplex.}\label{fig:extsimplex}
\end{figure}
\begin{theorem}[Berwick-Evans--Boavida de Brito--Pavlov \cite{BBP}; Bunk \cite{Bunk}; Pavlov \cite{Pavlov}]\label{thm:shape}
For every $X\in\Hh$:
\begin{enumerate}[label=\textup{(\roman*)}]
\item $\Pi X\simeq\bigl|[k]\mapsto X(\Delta^k_e)\bigr|$, the geometric realisation of the simplicial space of smooth singular simplices;
\item for every manifold $M$, $\ \Pi\,[M,X]\simeq\Map_{\Spc}(\Pi M,\Pi X)$, where $[M,X]$ is the internal hom of $\Hh$.
\end{enumerate}
\end{theorem}
For a diffeological space $X$, by part (i) $\Pi X$ is the smooth singular simplicial set $S^D(X)_k=\Diff(\Delta^k_e,X)$ of Christensen
and Wu \cite{ChristensenWu}, regarded as a space. Part (ii) is the \emph{smooth Oka principle}: the shape of a mapping space out of a manifold
is the mapping space of shapes. It is a genuinely geometric theorem, since $\Pi$ is a colimit and $[M,-]$ is a limit.
\begin{remark}[Shape versus the D-topology]\label{rem:shape-vs-D}
There are two ways to extract a homotopy type from a diffeological space: the shape $\Pi X$, and the weak homotopy type of the topological space
$D(X)$. They coincide for manifolds and differ in general. For $\Tal$ the second is a point and the first is a torus. The first is the right
one, in the precise sense that it is computed by a left adjoint that preserves finite products and takes quotients by principal actions to
homotopy quotients (\cref{thm:fibre-seq}); the D-topology has none of these properties.
\end{remark}
\exercisesheading
\begin{exercise}[label=exo:four-functors]{1}
Compute $\Gamma$, $\Pi_0$, $\fl$ and $\shr$ for $X=\R\smallsetminus\{0\}$ and describe the maps $\fl X\to X\to\shr X$.
\end{exercise}
\begin{solution}
$\Gamma X$ is the underlying set. $\Pi_0X=\{-,+\}$, the two path components. $\fl X$ is the set $\R\smallsetminus\{0\}$ with the discrete
diffeology and $\fl X\to X$ is the identity on points; it is smooth because locally constant parametrisations are plots, and it is not a
diffeomorphism. $\shr X$ is the same set with the coarse diffeology and $X\to\shr X$ is again the identity on points. Both maps are
bijective, hence monic and epic, and neither is strong (\cref{prop:monoepi}).
\end{solution}
\begin{exercise}[label=exo:Pi0-forms]{2}
Show that $\Pi_0(\Om^k)=\ast$ for every $k$, and that $\Pi_0(X\times Y)=\Pi_0(X)\times\Pi_0(Y)$ for diffeological spaces, directly from the
description by smooth paths.
\end{exercise}
\begin{solution}
An element of $\Pi_0(\Om^k)=\colim_U\Om^k(U)$ is represented by a form $\omega\in\Om^k(U)$. On $U\times\R$ consider $\tilde\omega=t\cdot\pr_U^*\omega$,
with $t$ the coordinate on $\R$. Its restrictions along $u\mapsto(u,1)$ and $u\mapsto(u,0)$ are $\omega$ and $0$, so $\omega\sim\tilde\omega\sim0$ in the
colimit, and $0\in\Om^k(U)$ is the restriction of $0\in\Om^k(\ast)$. Hence there is one element. For products: a smooth path in $X\times Y$ is a
pair of smooth paths, so two points $(x,y)$, $(x',y')$ are joined by a path iff $x,x'$ are and $y,y'$ are; one direction uses the constant path
in one factor together with concatenation of stationary paths (\cref{sec:paths}).
\end{solution}
\begin{exercise}[label=exo:Talpha-modal]{2}
Show that $\Pi_0(\Tal)=\ast$ and that $\Tal\to\shp_0\Tal$, $\fl\Tal\to\Tal$ and $\Tal\to\shr\Tal$ are all non-invertible.
\end{exercise}
\begin{solution}
$q_\alpha\colon\R\to\Tal$ is surjective and $\R$ is path connected, so $\Tal$ is; hence $\shp_0\Tal=\ast$ and the first map collapses $\Tal$ to a
point. $\fl\Tal$ is the uncountable discrete set $\R/\Lam_\alpha$ and $\shr\Tal$ is the same set with the coarse diffeology; by
\cref{prop:Talpha-basic}(ii) the diffeology of $\Tal$ is neither, so the two identity-on-points maps are not diffeomorphisms.
\end{solution}
\begin{exercise}[label=exo:pieces-points]{3}
Let $F$ be a smooth set with $\Gamma F=\ast$. Show that $\Pi_0F=\ast$. Deduce that a non-empty smooth set with one point is connected, and
give an example of one that is not contractible in the sense that its shape is not a point.
\end{exercise}
\begin{solution}
By \cref{prop:cohesion1}(v) the map $\Gamma F\to\Pi_0F$ is surjective, so $\Pi_0F$ has at most one element; it is non-empty because
$\Gamma F$ is. So one-point smooth sets are connected: ``pieces have points''. For the example take $F=\Om^1_{\mathrm{cl}}$. By
\cref{ex:RmodRd} it is the quotient of $\underline\R$ by the free action of the discrete group $\Rd$; such a quotient is the homotopy quotient
(\cref{thm:principal}), $\Pi$ preserves homotopy quotients and finite products, and $\Pi\underline\R=\ast$, so
$\Pi\,\Om^1_{\mathrm{cl}}\simeq\ast\hquot\Rd=\B\Rd$, an Eilenberg--MacLane space $K(\R,1)$ for the discrete group $\R$. Its fundamental group
is uncountable. (Concretely: a path in $\Om^1_{\mathrm{cl}}$ is a $1$-form $a(t)\,\dd t$ on the line; it is automatically a loop, since $\Om^1_{\mathrm{cl}}$ has one point, and its class is $\int_0^1a$.)
\end{solution}
\begin{exercise}[label=exo:constant-sheaf]{4}
Let $K$ be a space. Prove that the constant presheaf with value $K$ satisfies descent for every good open cover of a Cartesian space, and explain
why this fails on $\Dom$.
\end{exercise}
\begin{solution}
Let $\mathcal U=\{U_i\}_{i\in I}$ be a \emph{good} cover of $U\cong\R^n$: every non-empty finite intersection $U_{i_0\dots i_k}$ is diffeomorphic to
$\R^n$. Good covers are cofinal among open covers of $U$ (take geodesically convex balls for a Riemannian metric) and generate the topology of
$\Cart$, so it suffices to verify descent for them. The \v{C}ech nerve of $\mathcal U$ in presheaves has in degree $k$ the coproduct of the
representables $U_{i_0\dots i_k}$ over those $(i_0,\dots,i_k)$ with non-empty intersection. For the constant presheaf $\underline K$ the descent
map is therefore
\[
K=\underline K(U)\longrightarrow\lim_{[k]\in\Delta}\ \prod_{\substack{(i_0,\dots,i_k)\\ U_{i_0\dots i_k}\neq\varnothing}}K\;=\;\Map\bigl(N(\mathcal U),K\bigr),
\]
where $N(\mathcal U)$ is the nerve of the cover, the simplicial set whose $k$-simplices are the $(k+1)$-tuples with non-empty intersection, and the
map is restriction along $N(\mathcal U)\to\ast$. By the nerve theorem (Borsuk, Weil) the realisation of $N(\mathcal U)$ is homotopy equivalent to
$U$, which is contractible. Hence $N(\mathcal U)\to\ast$ is a weak equivalence and the descent map is an equivalence.
On $\Dom$ the first step of the argument is invalid: the value of a sheaf on a disconnected or non-simply-connected domain is forced by descent, and
for $U=\R^2\smallsetminus\{0\}$ the sheafification of the constant presheaf has value $\Map(S^1,K)$, the free loop space, not $K$. The constant
presheaf is a sheaf exactly on a site whose objects are contractible; this is the technical reason for preferring $\Cart$.
\end{solution}
\chapter{Shape}\label{ch:homotopy}
\begin{chapabstract}
The smooth homotopy groups of the book are the homotopy groups of the shape. We explain the comparison, prove that the shape functor
turns diffeological fibre bundles into fibre sequences --- which gives the long exact sequence of \IZ{art.~8.21} for free --- and compute the
shapes of the running examples. The irrational torus is a $K(\Z^2,1)$, the quotient $\R/\Q$ is a rational circle, and none of this is
determined by the D-topology.
\end{chapabstract}
\source{\IZ{Chapter~5} (paths, components, homotopy groups) and \IZ{art.~8.19--8.26} (homotopy of fibre bundles, coverings).}
\section{Paths, loops and homotopy groups}\label{sec:paths}
Following \IZ{art.~5.1}, the space of \defn{paths} of a diffeological space $X$ is $\Paths(X)=\cinf(\R,X)$ with the functional
diffeology; a path $\gamma$ starts at $\gamma(0)$ and ends at $\gamma(1)$. Defining paths on all of $\R$ keeps the source a domain. The price is
that two paths with $\gamma(1)=\gamma'(0)$ cannot be concatenated naively; the remedy is to reparametrise by a \defn{smashing function}, a
smooth non-decreasing $\lambda\colon\R\to[0,1]$ equal to $0$ near $(-\infty,0]$ and to $1$ near $[1,\infty)$ (\cref{fig:smashing}). The path
$\gamma\circ\lambda$ is \defn{stationary} near its ends, is homotopic to $\gamma$ with fixed ends, and stationary paths concatenate smoothly
\IZ{art.~5.2--5.5}.
\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
\begin{scope}
\draw[->,hcsgrey] (-0.8,0)--(4.6,0) node[right,hcsink]{$t$};
\draw[->,hcsgrey] (0,-0.3)--(0,2.2);
\draw[hcsgrey,dashed] (-0.8,1.6)--(4.6,1.6);
\draw[hcsteal,line width=1.1pt] (-0.8,0)--(0.5,0) .. controls (1.6,0) and (1.6,1.6) .. (2.7,1.6)--(4.6,1.6);
\node[below] at (0,-0.3) {$0$}; \node[below] at (3.2,0) {$1$}; \draw (3.2,-0.06)--(3.2,0.06);
\node[left] at (0,1.6) {$1$};
\node[hcsteal] at (2.2,0.6) {$\lambda$};
\end{scope}
\begin{scope}[xshift=6.6cm,yshift=0.2cm]
\draw[hcsteal,line width=1pt] plot[smooth] coordinates {(0,0) (0.8,0.9) (1.8,0.7) (2.4,1.5)};
\draw[hcsrust,line width=1pt] plot[smooth] coordinates {(2.4,1.5) (3.2,1.9) (4.0,1.0) (4.9,1.3)};
\fill (0,0) circle (1.5pt) node[left]{$\gamma(0)$};
\fill (2.4,1.5) circle (1.8pt) node[above left]{$\gamma(1)=\gamma'(0)$};
\fill (4.9,1.3) circle (1.5pt) node[right]{$\gamma'(1)$};
\node[font=\footnotesize,align=center] at (3.2,-0.35) {both paths are stationary near the junction,\\ so the concatenation is smooth};
\end{scope}
\end{tikzpicture}
\caption{A smashing function, and the concatenation of two stationary paths.}\label{fig:smashing}
\end{figure}
Being joined by a path is then an equivalence relation, with quotient $\pi_0(X)$. For a base point $x$ let
$\Loops(X,x)=\set{\ell\in\Paths(X) : \ell(0)=\ell(1)=x}$ with the subspace diffeology and base point the constant loop $\hat x$. The
higher homotopy groups are defined by recursion \IZ{art.~5.15--5.17}:
\[
\pi_n(X,x)=\pi_{n-1}\bigl(\Loops(X,x),\hat x\bigr)=\pi_0\bigl(\Loops^n(X,x)\bigr).
\]
Unwinding with \cref{thm:ccc}, an element of $\pi_n(X,x)$ is represented by a smooth map $\sigma\colon\R^n\to X$ with $\sigma(t)=x$ whenever some
coordinate $t_i$ lies in $\{0,1\}$, and two such are identified when they are joined by a smooth one-parameter family of the same kind.
A \defn{smooth homotopy} between $f,g\colon X\to Y$ is a path in $\cinf(X,Y)$, equivalently a smooth $H\colon X\times\R\to Y$ with $H_0=f$,
$H_1=g$. A space is \defn{smoothly contractible} if its identity is homotopic to a constant.
\section{Homotopy groups of the shape}
\begin{proposition}[$\Pi$ inverts smooth homotopy]\label{prop:Pi-homotopy}
If $f,g\colon X\to Y$ are smoothly homotopic maps of smooth $\infty$-groupoids, then $\Pi f\simeq\Pi g$. In particular smooth homotopy
equivalences induce equivalences of shapes, and a smoothly contractible object has contractible shape.
\end{proposition}
\begin{proof}
Let $H\colon X\times\R\to Y$ be the homotopy and $i_0,i_1\colon X\to X\times\R$ the inclusions at $0$ and $1$. Since $\Pi$ preserves finite
products and $\Pi(\R)=\ast$, the projection $X\times\R\to X$ induces an equivalence on shapes. Both $i_0$ and $i_1$ are sections of it, so
$\Pi i_0\simeq\Pi i_1$, and $\Pi f=\Pi H\circ\Pi i_0\simeq\Pi H\circ\Pi i_1=\Pi g$.
\end{proof}
\begin{theorem}[Christensen--Wu \cite{ChristensenWu}; Kihara \cite{KiharaSing}]\label{thm:pin}
For every diffeological space $X$, every $x\in X$ and every $n\ge0$ there is a natural isomorphism
\[
\pi_n(\Pi X,x)\;\cong\;\pi_n(X,x)
\]
between the homotopy groups of the shape and the smooth homotopy groups of \IZ{art.~5.17}.
\end{theorem}
By \cref{thm:shape}(i) the left-hand side is $\pi_n$ of the smooth singular simplicial set $S^D(X)=\Diff(\Delta^\bullet_e,X)$. For $n=0$
the statement is \cref{prop:cohesion1}(ii). Christensen and Wu proved it for those $X$ whose $S^D(X)$ is a Kan complex, a class that contains
all diffeological groups and homogeneous spaces; Kihara removed the hypothesis. The content is that horn fillers, which need not exist smoothly,
exist after reparametrising by smashing functions --- the same device as in \cref{fig:smashing}, one dimension at a time.
\begin{remark}[Why not a model structure on $\Diff$?]
One would like to say that $\Diff$ ``is a model for homotopy theory''. The obvious attempt, transferring the Kan--Quillen model structure along
$S^D$, fails \cite{Pavlov}; Kihara's model structure \cite{KiharaModel} uses simplices with a non-standard diffeology. From the present point of view
nothing is lost: the homotopy theory is that of $\Hh$, the functor $\Pi$ is defined on all of $\Hh$, and $\Diff$ is the full subcategory on which
$\Pi$ is computable by smooth paths.
\end{remark}
\section{Fibre sequences}
A \defn{diffeological fibre bundle} is a smooth surjection $\pi\colon T\to B$ whose pullback along every plot of $B$ is locally trivial with a
fixed fibre $F$ \IZ{art.~8.9}. This is weaker than local triviality over D-open sets, and it has to be: $T^2\to\Tal$ is a fibre bundle with fibre
$\R$ over a base whose only D-open sets are $\varnothing$ and $\Tal$. Principal bundles are treated in \cref{ch:bundles}; we use two facts from there.
First, a principal $G$-bundle $P\to B$ satisfies $B\simeq P\hquot G$ in $\Hh$ (\cref{thm:principal}). Second, every diffeological fibre bundle with
fibre $F$ is associated to a principal $\Dif(F)$-bundle \IZ{art.~8.14, 8.16}.
\begin{theorem}[Shape preserves bundle fibre sequences]\label{thm:fibre-seq}
Let $F\to T\xrightarrow{\pi}B$ be a diffeological fibre bundle. Then
\[
\Pi F\longrightarrow\Pi T\longrightarrow\Pi B
\]
is a fibre sequence of spaces. Consequently there is a long exact sequence
\[
\cdots\to\pi_n(F)\to\pi_n(T)\to\pi_n(B)\to\pi_{n-1}(F)\to\cdots\to\pi_0(T)\to\pi_0(B)\to\ast ,
\]
which by \cref{thm:pin} is the exact homotopy sequence of \IZ{art.~8.21}.
\end{theorem}
\begin{proof}
\emph{Principal case.} Let $P\to B$ be principal with group $G$. Then in $\Hh$
\[
B\simeq P\hquot G=\colim_{[k]\in\Delta^{\op}}P\times G^k,\qquad\text{hence}\qquad\Pi B\simeq\colim_{[k]\in\Delta^{\op}}\Pi P\times(\Pi G)^k=\Pi P\hquot\Pi G,
\]
because $\Pi$ preserves colimits, being a left adjoint, and finite products. The right-hand side is the homotopy quotient of the space $\Pi P$ by the group-like space $\Pi G$. In $\Spc$, as in any $\infty$-topos, the map from an object to its
homotopy quotient by a group is a principal bundle with fibre the group \cite{NSS}; so $\Pi G\to\Pi P\to\Pi B$ is a fibre sequence.
\emph{General case.} Write $T\cong P\times_GF=(P\times F)/G$ with $G=\Dif(F)$ and $P\to B$ principal. The diagonal action on $P\times F$ is again
principal: if $r\mapsto((p_r,f_r),(p_rg_r,g_r^{-1}f_r))$ is a plot of $(P\times F)^2$, then $r\mapsto g_r$ is a plot of $G$ because it is already
determined smoothly by $(p_r,p_rg_r)$ and the action on $P$ is principal. Hence $T\simeq(P\times F)\hquot G$ and
$\Pi T\simeq(\Pi P\times\Pi F)\hquot\Pi G$. The map to $\Pi B\simeq\Pi P\hquot\Pi G$ is induced by the projection, and its pullback along
$\Pi P\to\Pi P\hquot\Pi G$ is $\Pi P\times\Pi F\to\Pi P$, since colimits are universal in $\Spc$. So its fibre is $\Pi F$.
\end{proof}
The proof uses nothing about paths. In \cite{IZ} the exact sequence is proved by constructing, for every fibre bundle, an associated bundle of loop
spaces \IZ{art.~8.20}; here the sequence is a formal consequence of two properties of the left adjoint $\Pi$ and one geometric input, the
identification of quotients by principal actions with homotopy quotients.
\section{Shapes of the running examples}
\begin{corollary}[Quotients of $\R^n$ by countable subgroups]\label{cor:TGamma}
Let $\Gamma\subset\R^n$ be a countable subgroup and $T_\Gamma=\R^n/\Gamma$. Then $\R^n\to T_\Gamma$ is a principal $\Gamma$-bundle with $\Gamma$
discrete, and
\[
\Pi\,T_\Gamma\simeq\B\Gamma=K(\Gamma,1).
\]
In particular $\Pi\,\Tal\simeq\B\Z^2\simeq T^2$, and $\Pi(\R/\Q)\simeq K(\Q,1)$.
\end{corollary}
\begin{proof}
A plot of $\R^n$ with values in the countable set $\Gamma$ is locally constant, so $\Gamma$ is discrete as a subspace. The action map
$\R^n\times\Gamma\to\R^n\times\R^n$, $(x,\gamma)\mapsto(x,x+\gamma)$, is an induction: if $r\mapsto(x_r,y_r)$ is a plot with $y_r-x_r\in\Gamma$,
then $r\mapsto y_r-x_r$ is smooth with countable image, hence locally constant, hence a plot of $\Gamma$. So the action is principal
(\cref{def:principal}), and \cref{thm:fibre-seq} gives $\Pi T_\Gamma\simeq\Pi\R^n\hquot\Gamma=\ast\hquot\Gamma$.
\end{proof}
So the irrational torus has the homotopy type of the ordinary $2$-torus, in accordance with its name and in contrast with its D-topology. Each of two
fibre bundles over it gives the computation (\cref{fig:two-fibrations}): the universal covering $\R\to\Tal$ with discrete fibre $\Z^2$, and the
Kronecker fibration $T^2\to\Tal$ with contractible fibre $\R$. Iglesias-Zemmour recounts in the afterword of \cite{IZ} that reconciling these two
computations is what led to the definition of diffeological fibre bundles. The space $\R/\Q$ is a one-dimensional diffeological group whose shape
is the rationalisation of the circle.
\begin{figure}[t]
\centering
\begin{tikzcd}[column sep=3.4em,row sep=2.0em]
\Lam_\alpha\cong\Z^2 \arrow[r] & \R \arrow[r,two heads,"q_\alpha"] & \Tal & & \Z^2 \arrow[r] & \ast \arrow[r] & \B\Z^2\\
\R \arrow[r] & T^2 \arrow[r,two heads] & \Tal & & \ast \arrow[r] & T^2 \arrow[r,"\simeq"] & \B\Z^2
\arrow[from=1-3,to=1-5,phantom,"\overset{\Pi}{\longmapsto}"]
\arrow[from=2-3,to=2-5,phantom,"\overset{\Pi}{\longmapsto}"]
\end{tikzcd}
\caption{Two diffeological fibre bundles over the irrational torus and the fibre sequences of shapes they induce. Each gives
$\Pi\Tal\simeq\B\Z^2$.}\label{fig:two-fibrations}
\end{figure}
\begin{table}[t]\centering\small
\begin{tabular}{@{}llll@{}}\toprule
$X$ & $\Pi X$ & reason & D-topology\\\midrule
$\Tal$ & $\B\Z^2$ & \cref{cor:TGamma} & indiscrete\\
$\R/\Q$ & $K(\Q,1)$ & \cref{cor:TGamma} & indiscrete\\
$\dten_n=\R^n/\Ort(n)$ & $\ast$ & radial contraction (\cref{exo:contractible}) & half-line\\
$\R^n\hquot\Ort(n)$ (stack) & $B\Ort(n)$ & $\Pi$ preserves homotopy quotients & ---\\
the cross $K$ & $\ast$ & radial contraction & cross\\
any non-empty coarse space & $\ast$ & \cref{exo:contractible} & indiscrete\\
$\Om^1_{\mathrm{cl}}$ & $K(\R,1)$ & \cref{exo:pieces-points} & ---\\
$S^\infty$ \IZ{art.~4.9} & $\ast$ & contractible \IZ{art.~4.10} & \\
$\C P^\infty=S^\infty/U(1)$ \IZ{art.~4.11} & $K(\Z,2)$ & \cref{thm:fibre-seq} & \\\bottomrule
\end{tabular}
\caption{Some shapes. The difference between the third and fourth rows is the difference between a quotient and a homotopy quotient; the first two show that an
indiscrete D-topology is compatible with any $K(\Gamma,1)$ for countable torsion-free abelian $\Gamma\subset\R^n$.}\label{tab:shapes}
\end{table}
\section{Coverings}
A \defn{covering} is a diffeological fibre bundle with discrete fibre \IZ{art.~8.22}. For connected $X$ there is a \emph{universal}
covering $\tilde X\to X$, simply connected and unique up to isomorphism, which is a principal bundle with structure group $\pi_1(X)$
\IZ{art.~8.26}. In $\Hh$ this becomes
\[
X\;\simeq\;\tilde X\hquot\pi_1(X),\qquad\text{classified by}\qquad X\longrightarrow\B\pi_1(X)=\tau_{\le1}\shp X ,
\]
and $\tilde X$ is the homotopy fibre of the $1$-truncation of the shape unit. The monodromy theorem \IZ{art.~8.25}, that a smooth map from a
simply connected space lifts through any covering, is the corresponding lifting property. For $X=\Tal$ the universal covering is $\R$, and for
$X=T_\Gamma$ it is $\R^n$.
\exercisesheading
\begin{exercise}[label=exo:smash]{1}
Construct a smashing function, and show that if $\gamma,\gamma'$ are paths with $\gamma(1)=\gamma'(0)$, both stationary near their ends, then the
concatenation $\gamma\vee\gamma'$, equal to $\gamma(2t)$ for $t\le\tfrac12$ and to $\gamma'(2t-1)$ for $t\ge\tfrac12$, is a smooth path.
\end{exercise}
\begin{solution}
Let $\varphi(t)=e^{-1/t}$ for $t>0$ and $0$ otherwise, and put $\psi(t)=\varphi(t)/(\varphi(t)+\varphi(1-t))$. The denominator never vanishes, so
$\psi$ is smooth, non-decreasing, $0$ on $(-\infty,0]$ and $1$ on $[1,\infty)$. Then $\lambda(t)=\psi(3t-1)$ is $0$ on $(-\infty,\tfrac13]$ and $1$ on
$[\tfrac23,\infty)$. For the concatenation: there is $\varepsilon>0$ with $\gamma$ constant on $(1-\varepsilon,\infty)$ and $\gamma'$ constant on
$(-\infty,\varepsilon)$. On $t<\tfrac12+\tfrac\varepsilon2$ the map $\gamma\vee\gamma'$ coincides with $t\mapsto\gamma(2t)$, and on
$t>\tfrac12-\tfrac\varepsilon2$ with $t\mapsto\gamma'(2t-1)$; both are plots, they coincide on the overlap where they are constant at $\gamma(1)$, and
\ref{D2} applies. By the same argument with parameters, concatenation is smooth as a map from the space of composable pairs of
stationary paths to $\Paths(X)$.
\end{solution}
\begin{exercise}[label=exo:contractible]{2}
Show that $\dten_n=\R^n/\Ort(n)$ and every non-empty coarse space are smoothly contractible.
\end{exercise}
\begin{solution}
Let $\lambda$ be a smashing function and $h\colon\R^n\times\R\to\R^n$, $h(x,t)=(1-\lambda(t))x$. It is smooth, $h_0=\id$, $h_1=0$, and each $h_t$
is $\Ort(n)$-equivariant. So $\pi\circ h$ is constant on the fibres of the subduction $\pi\times\id\colon\R^n\times\R\to\dten_n\times\R$
(\cref{prop:stability}) and descends to a smooth $\bar h\colon\dten_n\times\R\to\dten_n$ from the identity to a constant. For a coarse space
$X$ with a point $x_0$, the map $H(x,t)=x$ for $t<\tfrac12$ and $H(x,t)=x_0$ for $t\ge\tfrac12$ is smooth, since every map into a coarse space
is. By \cref{prop:Pi-homotopy} both have contractible shape.
\end{solution}
\begin{exercise}[label=exo:pi1-Talpha]{2}
Compute $\pi_1(\Tal,0)$ directly from the definition, by lifting loops to $\R$.
\end{exercise}
\begin{solution}
Let $\ell$ be a loop at $0=q_\alpha(0)$. It is a plot, so it lifts locally through $q_\alpha$, and two local lifts differ by a locally constant
element of $\Lam_\alpha$ (\cref{prop:Talpha-basic}). Covering $\R$ by intervals on which lifts exist and correcting successive lifts by constants,
we get a unique smooth $\tilde\ell\colon\R\to\R$ with $q_\alpha\tilde\ell=\ell$ and $\tilde\ell(0)=0$. Put $w(\ell)=\tilde\ell(1)\in\Lam_\alpha$. A
homotopy of loops is a plot $h\colon\R^2\to\Tal$ with $h(s,0)=h(s,1)=0$; by the same argument on the simply connected domain $\R^2$ it lifts to
$\tilde h$ with $\tilde h(s,0)=0$, and $s\mapsto\tilde h(s,1)$ is a continuous map into $\Lam_\alpha$, hence constant. So $w$ is well defined on
$\pi_1$. It is a homomorphism because the lift of a concatenation is the lift of the first loop followed by the translate of the lift of the second.
It is surjective: $t\mapsto q_\alpha(t\mu)$ is a loop with $w=\mu$. It is injective: if $w(\ell)=0$ then $\tilde\ell$ is a loop in $\R$ at $0$, and
$(s,t)\mapsto q_\alpha(s\tilde\ell(t))$ contracts $\ell$. Hence $\pi_1(\Tal,0)\cong\Lam_\alpha\cong\Z^2$.
\end{solution}
\begin{exercise}[label=exo:RmodQ]{3}
Show that $\R/\Q$ is a diffeological $\Q$-vector space with $\pi_1(\R/\Q)\cong\Q$ and all higher homotopy groups zero, and that every smooth map
$\R/\Q\to\R/\Q$ fixing $0$ is multiplication by a rational number.
\end{exercise}
\begin{solution}
$\Q$ is a countable subgroup, so by \cref{cor:TGamma} $\R\to\R/\Q$ is a principal $\Q$-bundle with $\Q$ discrete and $\Pi(\R/\Q)\simeq K(\Q,1)$;
now apply \cref{thm:pin}. Multiplication by $a\in\Q$ on $\R$ preserves $\Q$, so it descends to a smooth map on the quotient, and this makes
$\R/\Q$ a $\Q$-vector space with smooth operations. Let $f$ be smooth with $f(0)=0$. As in \cref{exo:pi1-Talpha} the plot $f\circ q$ lifts to a
smooth $F\colon\R\to\R$ with $F(0)=0$ and $F(x+a)-F(x)\in\Q$ for $a\in\Q$. For fixed $a$ the left side is continuous in $x$ with values in a
countable set, hence a constant $\phi(a)$. Differentiating, $F'(x+a)=F'(x)$ for all $a\in\Q$, so the continuous function $F'$ is constant on a
dense set, hence constant: $F(x)=cx$. Finally $c=F(1)-F(0)=\phi(1)\in\Q$.
\end{solution}
\begin{exercise}[label=exo:CPinfty]{3}
Assuming that $S^\infty$ is contractible and that $S^\infty\to\C P^\infty$ is a principal $U(1)$-bundle \IZ{art.~4.10--4.11, 8.11}, compute
$\Pi\,\C P^\infty$. Do the same for $\Tal$ using the bundle $T^2\to\Tal$.
\end{exercise}
\begin{solution}
By \cref{thm:fibre-seq}, $\Pi U(1)\to\Pi S^\infty\to\Pi\C P^\infty$ is a fibre sequence with contractible total space, so
$\Omega\,\Pi\C P^\infty\simeq\Pi U(1)\simeq S^1=K(\Z,1)$. $\C P^\infty$ is connected, hence $\Pi\C P^\infty\simeq K(\Z,2)$. For $\Tal$: the fibre $\R$
has contractible shape, so $\Pi T^2\to\Pi\Tal$ has contractible fibres over a connected base and is an equivalence;
$\Pi T^2\simeq T^2\simeq\B\Z^2$ because $T^2$ is a manifold. This is consistent with \cref{cor:TGamma}.
\end{solution}
\begin{exercise}[label=exo:higher-TGamma]{4}
Let $\Gamma\subset\R^n$ be a countable subgroup. Prove directly from the definition of the smooth homotopy groups, without \cref{thm:pin} or
\cref{thm:fibre-seq}, that $\pi_k(T_\Gamma,0)=0$ for all $k\ge2$.
\end{exercise}
\begin{solution}
Let $q\colon\R^n\to T_\Gamma$ be the projection and $B_k=\set{t\in\R^k : t_i\in\{0,1\}\text{ for some }i}$. A class in $\pi_k(T_\Gamma,0)$ is
represented by a smooth $\sigma\colon\R^k\to T_\Gamma$ with $\sigma(B_k)=\{0\}$, and two representatives define the same class when they are joined
by a smooth family $\sigma_s$, $s\in\R$, of such maps.
\emph{Lifting.} $\sigma$ is a plot, so every point of $\R^k$ has a neighbourhood on which $\sigma$ lifts through $q$, and two lifts on a
connected open set differ by a constant in $\Gamma$, because their difference is continuous with values in a countable subset of $\R^n$. The
local lifts therefore form a principal $\Gamma$-covering of $\R^k$ in the classical sense; it is trivial because $\R^k$ is simply connected. So there
is a global smooth lift $\tilde\sigma\colon\R^k\to\R^n$ with $q\tilde\sigma=\sigma$, unique up to adding a constant of $\Gamma$.
\emph{Boundary values.} $\tilde\sigma$ maps $B_k$ into $q^{-1}(0)=\Gamma$. For $k\ge2$ the set $B_k$ is connected: it is a union of hyperplanes
$\{t_i=c\}$, $c\in\{0,1\}$, any two of which with different $i$ intersect, and for $k\ge2$ any two of them are linked through a third.
A continuous map from a connected set to a countable subset of $\R^n$ is constant, so after subtracting a constant, $\tilde\sigma|_{B_k}=0$.
\emph{Contraction.} Put $\sigma_s=q\circ(s\,\tilde\sigma)$ for $s\in\R$. Then $(s,t)\mapsto\sigma_s(t)$ is smooth, each $\sigma_s$ sends $B_k$ to
$0$, $\sigma_1=\sigma$ and $\sigma_0$ is constant. Hence $[\sigma]=0$.
For $k=1$ the argument is not available: $B_1=\{0,1\}$ is disconnected, $\tilde\sigma(1)-\tilde\sigma(0)\in\Gamma$ is the obstruction,
and one recovers $\pi_1(T_\Gamma)\cong\Gamma$ as in \cref{exo:pi1-Talpha}.
\end{solution}
\chapter{Forms}\label{ch:forms}
\begin{chapabstract}
A differential form on a diffeological space is a map into a classifying sheaf that is not itself a diffeological space. From this one
definition we recover the Cartan--de~Rham calculus of the book, a two-line proof that forms descend along subductions, and a spectral sequence
that measures the failure of de~Rham's theorem. On the irrational torus its $E_2$ page is the K\"unneth decomposition of the cohomology of
$S^1\times S^1$, with the cohomology of one circle represented by forms and that of the other by bundles.
\end{chapabstract}
\source{\IZ{Chapter~6}, especially art.~6.28--6.39 and 6.73--6.90; \IZ{art.~8.28--8.31, 8.40--8.42} for periods and integration bundles.}
\section{Forms are maps into \texorpdfstring{$\Om^k$}{Omega k}}
\begin{definition}[\IZ{art.~6.28}]\label{def:form}
A \defn{differential $k$-form} on a diffeological space $X$ is a rule $\alpha$ assigning to each plot $P\colon U\to X$ a smooth form
$\alpha(P)\in\Om^k(U)$, such that $\alpha(P\circ F)=F^*\alpha(P)$ for every smooth $F\colon V\to U$. The vector space of such is $\Om^k(X)$.
\end{definition}
\begin{proposition}\label{prop:forms-yoneda}
$\Om^k(X)=\Hom_{\SmSet}(\underline X,\Om^k)$, naturally in $X$. For a manifold this is the usual space of $k$-forms.
\end{proposition}
\begin{proof}
A natural transformation $\underline X\to\Om^k$ is a family of maps $\underline X(U)\to\Om^k(U)$, natural in $U$; that is
\cref{def:form}, word for word. If $X=M$ is a manifold, a form $\omega$ on $M$ gives $P\mapsto P^*\omega$; conversely the values of $\alpha$ on
the inverses of charts glue to a form on $M$ by the compatibility condition, and determine $\alpha$ because every plot factors locally through charts.
\end{proof}
\begin{figure}[t]
\centering
\begin{tikzcd}[column sep=3.2em,row sep=2.2em]
V \arrow[r,"F"] \arrow[rr,bend left=32,"P\circ F"] \arrow[drr,bend right=18,"F^*\alpha(P)"'] & U \arrow[r,"P"] \arrow[dr,"\alpha(P)"description] & X \arrow[d,"\alpha"]\\
& & \Om^k
\end{tikzcd}
\caption{A $k$-form on $X$ is a map $\alpha\colon X\to\Om^k$ of smooth sets. By the Yoneda lemma, a map $U\to\Om^k$ from a Cartesian space is
an ordinary $k$-form on $U$, and the compatibility condition of \cref{def:form} is the commutativity of the outer triangle.}\label{fig:form}
\end{figure}
Everything natural on Cartesian spaces therefore extends to all smooth sets by post-composition. The exterior derivative is a map of sheaves
$\dd\colon\Om^k\to\Om^{k+1}$ with $\dd\circ\dd=0$; the wedge product is a map $\Om^k\times\Om^l\to\Om^{k+l}$; pullback along $f\colon X\to Y$ is
pre-composition. The identities of the Cartan calculus hold on $X$ because they hold in the target. This is how
\IZ{art.~6.32--6.35} proceed, plot by plot.
\begin{remark}[The space of forms]
The internal hom $[X,\Om^k]$ of $\SmSet$ has $\Om^k(X)$ as its set of points, but is not concrete: its sections over $U$ are the $k$-forms on
$X\times U$, including those with components along $U$. The functional diffeology on $\Om^k(X)$ of \IZ{art.~6.29} is its concretisation.
\end{remark}
\section{Descent along subductions}
\begin{proposition}[Forms on quotients, \IZ{art.~6.38}]\label{prop:forms-descent}
Let $\pi\colon X\to B$ be a subduction. Then
\[
\Om^k(B)\xrightarrow{\ \pi^*\ }\Om^k(X)\rightrightarrows\Om^k(X\times_BX)
\]
is an equaliser: a form on $X$ descends to $B$, uniquely, if and only if its two pullbacks to $X\times_BX$ coincide. Explicitly,
$\beta=\pi^*\alpha$ for a unique $\alpha$ iff $\beta(P)=\beta(P')$ for all plots $P,P'$ of $X$ with $\pi\circ P=\pi\circ P'$.
\end{proposition}
\begin{proof}
A subduction is an epimorphism of sheaves, because plots lift locally. In a topos every epimorphism is the coequaliser of its kernel pair, and
the kernel pair of $\pi$, computed in $\SmSet$, is the diffeological space $X\times_BX$ (the inclusion $\Diff\into\SmSet$ preserves limits). Now
apply $\Hom_{\SmSet}(-,\Om^k)$, which turns coequalisers into equalisers.
\end{proof}
The proof never used that the target was $\Om^k$: the same statement holds for maps from $B$ into \emph{any} smooth set. Subductions are
exactly the maps along which everything descends.
\begin{proposition}[Forms on the running examples]\label{prop:forms-examples}
\begin{enumerate}[label=\textup{(\roman*)}]
\item Let $\Gamma\subset\R^n$ be a dense countable subgroup. Then $\Om^\bullet(\R^n/\Gamma)$ is the exterior algebra of constant-coefficient forms on
$\R^n$, with zero differential. In particular $\Om^0(\Tal)=\R$, $\Om^1(\Tal)=\R\,\theta$ with $q_\alpha^*\theta=\dd x$, and $\Om^k(\Tal)=0$ for $k\ge2$.
\item $\Om^1(\dten_1)=\set{a(x)\,\dd x : a\text{ odd}}$ under pullback to $\R$, and every $1$-form on $\dten_1$ is exact.
\end{enumerate}
\end{proposition}
\begin{proof}
(i) Two plots $P,P'$ of $\R^n$ with the same image in the quotient differ by a smooth map into $\Gamma$, which is locally constant. So the
condition of \cref{prop:forms-descent} is invariance under all translations by $\gamma\in\Gamma$. The coefficients of an invariant form are
continuous and $\Gamma$-periodic, hence constant. (ii) Taking $P'=-P$ shows $a$ must be odd. Conversely let $a$ be odd, so that $A(x)=\int_0^xa$ is
even; by Whitney's theorem \cite{Whitney} $A(x)=B(x^2)$ with $B$ smooth. If $P,P'$ are plots of $\R$ with $P'=\pm P$ pointwise then
$P'^2=P^2$, and $P^*(a\,\dd x)=\dd(B\circ P^2)=P'^*(a\,\dd x)$. By the same formula, $a\,\dd x=\dd(B\circ\mathrm{sq})$ is exact on $\dten_1$.
\end{proof}
\section{De~Rham cohomology and homotopy invariance}
The \defn{de~Rham cohomology} $H^\bullet_{\dR}(X)$ of a diffeological space is the cohomology of the complex $(\Om^\bullet(X),\dd)$, as in
\IZ{art.~6.73}. From \cref{prop:forms-examples}:
\[
H^0_{\dR}(\Tal)=\R,\qquad H^1_{\dR}(\Tal)=\R\,[\theta],\qquad H^k_{\dR}(\Tal)=0\ \ (k\ge2).
\]
\begin{proposition}[Homotopy invariance, \IZ{art.~6.88}]\label{prop:dR-homotopy}
Smoothly homotopic maps induce the same map on de~Rham cohomology.
\end{proposition}
\begin{proof}
It suffices to construct, naturally in the smooth set $X$, an operator $K\colon\Om^k(X\times\R)\to\Om^{k-1}(X)$ with
$\dd K+K\dd=i_1^*-i_0^*$. For a Cartesian space $U$ let $K_U\omega=\int_0^1\iota_{\partial_t}\omega\,\dd t$ be integration along the fibre of
$U\times[0,1]\to U$. The classical computation gives the homotopy formula on $U$, and $K_U$ commutes with pullback along smooth maps $V\to U$.
A natural family of maps $\Om^k(U\times\R)\to\Om^{k-1}(U)$ is a map of sheaves $[\R,\Om^k]\to\Om^{k-1}$, so $K$ is defined on
$\Hom(X\times\R,\Om^k)=\Hom(X,[\R,\Om^k])$ by post-composition, and the formula holds because it holds in the target.
\end{proof}
The chain-homotopy operator of \IZ{art.~6.83} is the refinement of $K$ defined on $\Paths(X)$; the argument is the same.
\section{De~Rham's theorem and its obstruction}\label{sec:dR-obstruction}
On a Cartesian space the de~Rham complex is exact in positive degrees and its $H^0$ is the constants. As a statement about sheaves:
\begin{lemma}[Poincar\'e]\label{lem:poincare}
$0\to\fl\R\to\Om^0\xrightarrow{\dd}\Om^1\xrightarrow{\dd}\Om^2\to\cdots$ is an exact sequence of sheaves of abelian groups on $\Cart$, where
$\fl\R=\Disc(\R)$ is the constant sheaf. It is already exact on sections over every Cartesian space.
\end{lemma}
For a sheaf of abelian groups $A$ on $\Cart$ and $X\in\Hh$ write $H^q(X;A)=\pi_0\Map_{\Hh}(X,\B^qA)$. For $A=\fl\R$ the adjunction
\eqref{eq:flat-adjunction} gives $H^q(X;\fl\R)=H^q(\Pi X;\R)$, the real cohomology of the shape. For $q=0$ and $X$ a smooth set,
$H^0(X;\Om^p)=\Om^p(X)$.
\begin{theorem}[De~Rham's theorem with obstruction; after \cite{IZCech,MinichielloObs}]\label{thm:dR-obstruction}
Let $X$ be a smooth set, for instance a diffeological space.
\begin{enumerate}[label=\textup{(\roman*)}]
\item There is a first-quadrant spectral sequence
\[
E_1^{p,q}=H^q(X;\Om^p)\ \Longrightarrow\ H^{p+q}(\Pi X;\R),\qquad d_1=\dd_*,
\]
with $E_2^{p,0}=H^p_{\dR}(X)$, whose edge maps $H^p_{\dR}(X)\to H^p(\Pi X;\R)$ are the de~Rham homomorphisms.
\item In low degrees there is an exact sequence
\[
0\to H^1_{\dR}(X)\to H^1(\Pi X;\R)\to E_2^{0,1}\to H^2_{\dR}(X)\to H^2(\Pi X;\R),
\]
where $E_2^{0,1}=\ker\bigl(\dd_*\colon H^1(X;\R)\to H^1(X;\Om^1)\bigr)$ is a subgroup of the group $H^1(X;\R)$ of isomorphism classes of
principal $\R$-bundles over $X$.
\item If $X$ is a manifold then $H^q(X;\Om^p)=0$ for $q>0$, and all edge maps are isomorphisms.
\end{enumerate}
\end{theorem}
\begin{proof}
(i) By \cref{lem:poincare} the complex $\Om^\bullet$ is a resolution of $\fl\R$, so $\B^n\fl\R$ is the object of $\Hh$ associated by the
Dold--Kan correspondence to the complex $\Om^0\to\cdots\to\Om^{n-1}\to\Om^n_{\mathrm{cl}}$, and
$H^n(\Pi X;\R)=H^n(X;\fl\R)$ is the hypercohomology $\mathbb H^n(X;\Om^\bullet)$. Filtering $\Om^\bullet$ by its stupid truncations
$\Om^{\ge p}$ gives a tower in $\Hh$ whose layers are $\B^{n-p}\Om^p$, and mapping $X$ into the tower gives the spectral sequence with
$E_1^{p,q}=\pi_0\Map(X,\B^q\Om^p)$. Its bottom row is $\Om^\bullet(X)$ with differential $\dd$.
(ii) is the five-term exact sequence of a first-quadrant spectral sequence, together with \cref{thm:classification} for the identification of
$H^1(X;\R)$ with principal $\R$-bundles.
(iii) Cover a manifold $M$ by a good open cover; in $\Hh$, $M$ is the colimit of the \v{C}ech nerve, whose terms are coproducts of Cartesian
spaces. Since $\B^q\Om^p$ has vanishing higher cohomology on Cartesian spaces, $H^q(M;\Om^p)$ is the \v{C}ech cohomology of the cover with
coefficients in $\Om^p$, which vanishes for $q>0$ by a partition of unity. The spectral sequence collapses onto its bottom row.
\end{proof}
De~Rham's theorem is thus the statement that the sheaves $\Om^p$ are acyclic on $X$. On a manifold the reason is partitions of unity. A
diffeological space has no partitions of unity in general --- $\Tal$ has no non-constant functions at all --- and the groups $H^q(X;\Om^p)$ are
new invariants. The first of them, $H^1(X;\Om^0)$, was introduced by Iglesias-Zemmour as the group $\Fl(X)$ of ``flows'' or principal
$\R$-bundles \IZ{art.~8.39}; part (ii) contains his description of the cokernel of the first de~Rham homomorphism \IZ{art.~8.30}.
\begin{proposition}[The $E_2$ page of the irrational torus]\label{prop:E2-Talpha}
For $X=\Tal$ one has $E_1^{p,q}=H^q(\Lam_\alpha;\Om^p(\R))$, group cohomology of $\Lam_\alpha\cong\Z^2$ acting by translation, and
\[
E_2^{p,q}=\begin{cases}\R & (p,q)\in\{0,1\}^2,\\ 0&\text{otherwise,}\end{cases}
\]
for every irrational $\alpha$. The spectral sequence degenerates at $E_2$ and recovers $H^\bullet(T^2;\R)$. The classes are: $1$ and $[\theta]$ in the
row $q=0$; the Kronecker bundle $[T^2\to\Tal]$ in $E_2^{0,1}$; and a class in $E_2^{1,1}=H^1(\Tal;\Om^1)/\dd H^1(\Tal;\R)$ that
represents the fundamental class of $T^2$.
\end{proposition}
\begin{proof}
$\Tal\simeq\R\hquot\Lam_\alpha$ in $\Hh$ by \cref{cor:TGamma}, so $\Map(\Tal,\B^q\Om^p)$ is the space of homotopy fixed points of $\Lam_\alpha$ on
$\Map(\R,\B^q\Om^p)\simeq\B^q(\Om^p(\R))$, whose $\pi_0$ is $H^q(\Lam_\alpha;\Om^p(\R))$. Write $\Lam_\alpha=\Z\cdot1\oplus\Z\cdot\alpha$. By
\cref{lem:coboundary-line} the generator $1$ has $H^1(\Z;\Om^p(\R))=0$ and $H^0(\Z;\Om^p(\R))=\Om^p(S^1)$, so the Lyndon--Hochschild--Serre
spectral sequence gives
\[
H^q(\Lam_\alpha;\Om^p(\R))=H^q\bigl(\Z;\Om^p(S^1)\bigr)\quad\text{for the rotation }\rho_\alpha ,
\]
which is the invariants for $q=0$, the coinvariants $\Om^p(S^1)/(\rho_\alpha^*-1)$ for $q=1$, and zero for $q\ge2$. The differential $d_1$ is induced
by $\dd$, so $E_2^{\bullet,q}$ is the cohomology of the complex $H^q(\Z;\Om^\bullet(S^1))$. For $q=0$ this is the complex of
rotation-invariant forms $\R\xrightarrow{0}\R\,\dd x$. For $q=1$ it is the complex of coinvariants
$\cinf(S^1)/(\rho_\alpha^*-1)\xrightarrow{\dd}\Om^1(S^1)/(\rho_\alpha^*-1)$. Its cokernel is $\Om^1(S^1)/(\dd\cinf(S^1)+\im(\rho_\alpha^*-1))=H^1_{\dR}(S^1)=\R$,
since a rotation acts trivially on cohomology. Its kernel consists of the classes of $g$ with $g'=h\circ\rho_\alpha-h$; writing $h=c+k'$ with $k$
periodic gives $g=k\circ\rho_\alpha-k+\text{const}$, so the kernel is the line of constants. All differentials $d_r$, $r\ge2$, vanish for degree
reasons except $d_2\colon E_2^{0,1}\to E_2^{2,0}=0$.
\end{proof}
\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
\begin{scope}
\draw[->,hcsgrey] (-0.3,0)--(6.6,0) node[right,hcsink]{$p$};
\draw[->,hcsgrey] (0,-0.3)--(0,3.0) node[above,hcsink]{$q$};
\foreach \x/\l in {1.2/0,3.7/1,5.8/2} \node[below,hcsgrey] at (\x,-0.05) {\l};
\foreach \y/\l in {0.7/0,2.0/1} \node[left,hcsgrey] at (-0.05,\y) {\l};
\node[hcsnode] (a) at (1.2,0.7) {$\R$}; \node[hcsnode] (b) at (3.7,0.7) {$\R\,\theta$}; \node at (5.8,0.7) {$0$};
\node[hcsnodeb] (c) at (1.2,2.0) {$\Fl(\Tal)$}; \node[hcsnodeb] (d) at (3.7,2.0) {$\Om^1(S^1)/(\rho^*_\alpha-1)$}; \node at (5.8,2.0) {$0$};
\draw[->] (a)--node[above,font=\scriptsize]{$0$}(b); \draw[->] (c)--node[above,font=\scriptsize]{$\dd$}(d);
\node[font=\footnotesize,align=center] at (3.2,-1.05) {$E_1^{p,q}=H^q(\Tal;\Om^p)$:\\ depends on the arithmetic of $\alpha$};
\end{scope}
\begin{scope}[xshift=8.6cm]
\draw[->,hcsgrey] (-0.3,0)--(4.6,0) node[right,hcsink]{$p$};
\draw[->,hcsgrey] (0,-0.3)--(0,3.0) node[above,hcsink]{$q$};
\foreach \x/\l in {1.2/0,2.7/1,3.9/2} \node[below,hcsgrey] at (\x,-0.05) {\l};
\foreach \y/\l in {0.7/0,2.0/1} \node[left,hcsgrey] at (-0.05,\y) {\l};
\node[hcsnode] at (1.2,0.7) {$\R$}; \node[hcsnode] at (2.7,0.7) {$\R$}; \node at (3.9,0.7) {$0$};
\node[hcsnodeb] at (1.2,2.0) {$\R$}; \node[hcsnodeb] at (2.7,2.0) {$\R$}; \node at (3.9,2.0) {$0$};
\node[font=\scriptsize,hcsrust] at (1.2,2.55) {Kronecker}; \node[font=\scriptsize,hcsrust] at (2.7,2.55) {$[T^2]$};
\node[font=\scriptsize,hcsteal] at (1.2,1.2) {$1$}; \node[font=\scriptsize,hcsteal] at (2.7,1.2) {$[\theta]$};
\node[font=\footnotesize,align=center] at (2.2,-1.05) {$E_2=E_\infty$: the cohomology\\ of $S^1\times S^1$, for every $\alpha$};
\end{scope}
\end{tikzpicture}
\caption{The de~Rham spectral sequence of the irrational torus. The bottom row is the de~Rham cohomology $H_{\dR}^\bullet(\Tal)=(\R,\R,0)$. The top row is
the contribution of principal $\R$-bundles. Together they are $H^\bullet(\Pi\Tal;\R)=H^\bullet(T^2;\R)=(\R,\R^2,\R)$.}\label{fig:E2}
\end{figure}
So the torus $T^2$ has two circles' worth of cohomology and all of it is present in the cohomology of $\Pi\Tal$, but only the circle transverse to the
foliation is represented by differential forms; the circle along the leaves is represented by the non-trivial $\R$-bundle $T^2\to\Tal$. The $E_2$ page is independent of the arithmetic of
$\alpha$. The dependence is on $E_1$, in the size of $\Fl(\Tal)$, and is the subject of \cref{thm:Fl}.
\section{Curvature and integration bundles}
The same method applies to the next classifying object. Let $P\subsetneq\R$ be a proper subgroup and $T_P=\R/P$; as a subspace of $\R$, $P$ is
discrete, since it contains no interval. The differential descends to a map of sheaves $\dd\colon T_P\to\Om^1_{\mathrm{cl}}$.
\begin{lemma}\label{lem:TP-complex}
The sequence of sheaves $0\to\fl(\R/P)\to T_P\xrightarrow{\dd}\Om^1\xrightarrow{\dd}\Om^2_{\mathrm{cl}}\to0$ is exact on $\Cart$.
\end{lemma}
\begin{proof}
Exactness on the right and in the middle is \cref{lem:poincare}, together with the fact that $\R\to T_P$ is an epimorphism. A section of $T_P$
over a Cartesian $U$ with zero differential lifts locally to a function with zero differential, that is, to a constant; so it is a constant map
$U\to\R/P$, and conversely.
\end{proof}
Define $\B(T_P)_{\mathrm{conn}}\in\Hh$ as the stack associated to the two-term complex $T_P\xrightarrow{\dd}\Om^1$: over a Cartesian space its
objects are $1$-forms $A$, and its morphisms $A\to A'$ are sections $g$ of $T_P$ with $A'=A+\dd g$. It is the analogue for $T_P$ of the moduli stack of principal
bundles with a connection $1$-form (compare \IZ{art.~8.37}); for $P=\Z$ it is the usual $\B U(1)_{\mathrm{conn}}$. The
\defn{curvature} is the map $F\colon\B(T_P)_{\mathrm{conn}}\to\Om^2_{\mathrm{cl}}$, $A\mapsto\dd A$.
\begin{theorem}[Integration bundles; after \IZ{art.~8.42}]\label{thm:integration}
There is a fibre sequence in $\Hh$
\[
\B(T_P)_{\mathrm{conn}}\xrightarrow{\ F\ }\Om^2_{\mathrm{cl}}\xrightarrow{\ c\ }\fl\B^2(\R/P).
\]
Consequently a closed $2$-form $\omega$ on a diffeological space $X$ is the curvature of a principal $T_P$-bundle with connection if and only
if the class $c(\omega)\in H^2(\Pi X;\R/P)$ vanishes; this class is the reduction modulo $P$ of the image of $\omega$ in $H^2(\Pi X;\R)$. If $X$ is
simply connected, $c(\omega)=0$ if and only if the periods of $\omega$ over $\pi_2(X)$ lie in $P$, and then the bundle with connection is unique
up to isomorphism.
\end{theorem}
\begin{proof}
By \cref{lem:TP-complex} the three-term complex $T_P\to\Om^1\to\Om^2_{\mathrm{cl}}$ is a resolution of $\fl(\R/P)$ placed in degree $2$, so it
presents $\fl\B^2(\R/P)$. The inclusion of $\Om^2_{\mathrm{cl}}$ as its last term is $c$, and the homotopy fibre of $c$ is presented by the
truncation $T_P\to\Om^1$, with the map to $\Om^2_{\mathrm{cl}}$ given by $\dd$. This is the fibre sequence. A map $\omega\colon X\to\Om^2_{\mathrm{cl}}$
lifts through the fibre iff $c\circ\omega$ is null-homotopic, and $\pi_0\Map(X,\fl\B^2(\R/P))=H^2(\Pi X;\R/P)$ by \eqref{eq:flat-adjunction}. The
comparison of resolutions $\Om^\bullet\to(T_P\to\Om^1\to\Om^2_{\mathrm{cl}})$ covers $\R\to\R/P$, which identifies $c(\omega)$. If $\Pi X$ is simply
connected, the Hurewicz and universal coefficient theorems give $H^2(\Pi X;A)=\Hom(\pi_2(\Pi X),A)$ for every abelian group $A$, and
$\pi_2(\Pi X)=\pi_2(X)$ by \cref{thm:pin}. Lifts are a torsor under $H^1(\Pi X;\R/P)=\Hom(\pi_1(X),\R/P)=0$.
\end{proof}
\begin{remark}[Prequantisation without integrality]
Classically one needs the periods of $\omega$ to be integral to build a circle bundle with curvature $\omega$. By \cref{thm:integration} the
integrality condition is an artefact of fixing the structure group $\R/\Z$: for \emph{any} closed $2$-form on a simply connected space
whose group of periods $P_\omega$ is not all of $\R$, there is a canonical principal bundle with connection and curvature $\omega$, with structure
group the torus of periods $T_{P_\omega}$, which is an irrational torus as soon as $P_\omega$ has rank at least $2$. This is the theorem of
Iglesias-Zemmour \IZ{art.~8.42}, and a good example of a statement that is natural in $\Diff$ and has no formulation in $\Mfd$.
\end{remark}
\exercisesheading
\begin{exercise}[label=exo:forms-discrete]{1}
Show that $\Om^0(X)=\cinf(X,\R)$, and that $\Om^k(X)=0$ for $k\ge1$ if $X$ is discrete.
\end{exercise}
\begin{solution}
$\Om^0=\underline\R$ is representable, so $\Hom_{\SmSet}(\underline X,\underline\R)=\Diff(X,\R)$ by \cref{thm:BH}. If $X$ is discrete, every plot
$P\colon U\to X$ is locally constant, so locally $P=x\circ c$ with $c\colon V\to\ast$ and $x\colon\ast\to X$. Then
$\alpha(P)|_V=c^*\alpha(x)$ and $\alpha(x)\in\Om^k(\ast)=0$.
\end{solution}
\begin{exercise}[label=exo:dR-Talpha]{2}
Compute the de~Rham homomorphism $H^1_{\dR}(\Tal)\to H^1(\Pi\Tal;\R)=\Hom(\Lam_\alpha,\R)$ and its cokernel.
\end{exercise}
\begin{solution}
$H^1_{\dR}(\Tal)=\R[\theta]$ with $q_\alpha^*\theta=\dd x$. The period of $\theta$ on the loop $t\mapsto q_\alpha(t\mu)$, $\mu\in\Lam_\alpha$, is
$\int_0^1\mu\,\dd t=\mu$. So $[\theta]$ maps to the inclusion $\Lam_\alpha\into\R$, and $c[\theta]$ to $\mu\mapsto c\mu$. In the basis of
$\Hom(\Lam_\alpha,\R)=\R^2$ given by the values on $1$ and $\alpha$, the image is the line spanned by $(1,\alpha)$. The cokernel is one-dimensional,
spanned for instance by the class of $\rho(m+n\alpha)=-n$. By \cref{thm:dR-obstruction}(ii) and \cref{prop:E2-Talpha} it is $E_2^{0,1}$, and by
\cref{exo:kronecker-class} the class of $\rho$ is that of the bundle $T^2\to\Tal$.
\end{solution}
\begin{exercise}[label=exo:forms-coarse]{3}
Show that a coarse diffeological space has no non-zero differential forms of positive degree.
\end{exercise}
\begin{solution}
Let $X$ be coarse, $\alpha\in\Om^k(X)$ with $k\ge1$, $P\colon U\to X$ a plot (any function) and $r_0\in U$; we show $\alpha(P)_{r_0}=0$. Choose
a diffeomorphism identifying a neighbourhood of $r_0$ with $\R^n$ and $r_0$ with $0$; by locality we may assume $U=\R^n$. Let
$F(r)=(r_1^3,\dots,r_n^3)$, a smooth homeomorphism with non-smooth inverse $G$. Since $X$ is coarse, $P\circ G$ is a plot, and
$P=(P\circ G)\circ F$ with $F$ smooth, so $\alpha(P)=F^*\alpha(P\circ G)$. The derivative of $F$ at $0$ is zero, so the pullback of any form of
positive degree by $F$ vanishes at $0$. Hence $\alpha(P)$ vanishes at every point, for every plot.
\end{solution}
\begin{exercise}[label=exo:kronecker-class]{3}
For a homomorphism $\rho\colon\Lam_\alpha\to\R$ let $X_\rho=(\R\times\R)/\Lam_\alpha$ for the action $\lambda\cdot(u,t)=(u+\lambda,t+\rho(\lambda))$, a
principal $\R$-bundle over $\Tal$ with projection $[u,t]\mapsto q_\alpha(u)$ and action $s\cdot[u,t]=[u,t+s]$ \IZ{art.~8.30}. Show that for
$\rho(m+n\alpha)=-n$ the bundle $X_\rho$ is isomorphic to the Kronecker bundle $T^2\to\Tal$, $[x,y]\mapsto q_\alpha(y-\alpha x)$, with $\R$ acting by
the flow $s\cdot[x,y]=[x+s,y+\alpha s]$.
\end{exercise}
\begin{solution}
Define $\Phi\colon\R\times\R\to T^2$ by $\Phi(u,t)=[t,\,u+\alpha t]$. It is smooth, it lies over $q_\alpha$ because $(u+\alpha t)-\alpha t=u$, and it
intertwines translation in $t$ with the flow. For $\lambda=m+n\alpha$ we have $\rho(\lambda)=-n$ and
\[
\Phi\bigl(u+\lambda,\ t-n\bigr)=\bigl[t-n,\ u+m+n\alpha+\alpha t-\alpha n\bigr]=\bigl[t-n,\ u+\alpha t+m\bigr]=\Phi(u,t),
\]
so $\Phi$ descends to a smooth equivariant map $\bar\Phi\colon X_\rho\to T^2$ over $\Tal$. It is bijective: if $\Phi(u,t)=\Phi(u',t')$ then
$t'=t+k$ and $u'+\alpha t'=u+\alpha t+l$ with $k,l\in\Z$, so $u'=u+\lambda$ with $\lambda=l-k\alpha$ and $t'=t+\rho(\lambda)$; and
$[x,y]=\Phi(y-\alpha x,x)$. The inverse $[x,y]\mapsto[y-\alpha x,\,x]$ is well defined by the same computation and smooth because
$\R^2\to T^2$ is a subduction. Hence $X_\rho\cong T^2$ as principal $\R$-bundles: the Kronecker bundle is the flat bundle with holonomy
$m+n\alpha\mapsto-n$, and it spans the cokernel found in \cref{exo:dR-Talpha}.
\end{solution}
\begin{exercise}[label=exo:IZ830]{4}
Let $X$ be a connected diffeological space. Deduce from the short exact sequence of sheaves $0\to\fl\R\to\underline\R\xrightarrow{\dd}\Om^1_{\mathrm{cl}}\to0$
an exact sequence
\[
0\to H^1_{\dR}(X)\to\Hom(\pi_1(X),\R)\xrightarrow{\ \partial\ }H^1(X;\R)\to H^1(X;\Om^1_{\mathrm{cl}}),
\]
and show that $\partial(\rho)$ is the class of the bundle $X_\rho=\tilde X\times_{\pi_1(X)}\R$ of \IZ{art.~8.30}.
\end{exercise}
\begin{solution}
A short exact sequence of sheaves of abelian groups gives a fibre sequence $\B^q\fl\R\to\B^q\underline\R\to\B^q\Om^1_{\mathrm{cl}}$ in $\Hh$ for
each $q$, and these splice into a long fibre sequence. Applying $\pi_0\Map(X,-)$ yields the exact sequence
\[
\cinf(X)\xrightarrow{\dd}\Om^1_{\mathrm{cl}}(X)\to H^1(X;\fl\R)\to H^1(X;\R)\to H^1(X;\Om^1_{\mathrm{cl}}).
\]
The cokernel of the first map is $H^1_{\dR}(X)$, which therefore injects into the next term. By \eqref{eq:flat-adjunction},
$H^1(X;\fl\R)=H^1(\Pi X;\R)$, and for a connected space with fundamental group $\pi_1$ this is $\Hom(\pi_1,\R)$; by \cref{thm:pin},
$\pi_1(\Pi X)=\pi_1(X)$. This gives the sequence.
For $\partial$: it is induced by $\B\fl\R=\B\Rd\to\B\R$, which sends a principal $\Rd$-bundle to the principal $\R$-bundle obtained by extending
the structure group along the smooth homomorphism $\Rd\to\R$. Under $H^1(\Pi X;\R)=\Hom(\pi_1,\R)$ the homomorphism $\rho$ corresponds to the
$\Rd$-bundle $\tilde X\times_{\pi_1}\Rd$ associated to the universal covering, a principal $\pi_1$-bundle (\cref{ch:homotopy}), via $\rho$.
Extending the group gives $\tilde X\times_{\pi_1}\R=X_\rho$.
Exactness at $H^1(X;\R)$ is now the statement that $X_\rho$ is trivial if and only if $\rho$ is the period homomorphism of a closed $1$-form. This is the
theorem of \IZ{art.~8.30}. Exactness at the next term gives more: a principal $\R$-bundle is of the form $X_\rho$, i.e.\ flat, if and
only if its image in $H^1(X;\Om^1_{\mathrm{cl}})$ vanishes.
\end{solution}
\chapter{Bundles and stacks}\label{ch:bundles}
\begin{chapabstract}
In \cite{IZ} principal bundles are defined by an induction condition on the action map. We show that this condition holds exactly when the
diffeological quotient is the homotopy quotient. It follows that principal bundles are classified by maps to a stack $\B G$, which is not a
diffeological space, and that a group action has three quotients --- stack, smooth set, diffeological space --- which coincide precisely for
principal actions.
\end{chapabstract}
\source{\IZ{Chapter~7} (groups) and \IZ{art.~8.1--8.19} (groupoids, fibrations, principal and associated bundles).}
\section{Diffeological groups}
A \defn{diffeological group} is a group object of $\Diff$: a group $G$ with a diffeology for which multiplication and inversion are smooth
\IZ{art.~7.1}. Lie groups are examples; so are $\Tal$ and $\R/\Q$; so is every subgroup of a diffeological group with the subspace diffeology
and every quotient group with the quotient diffeology \IZ{art.~7.2--7.3}; so is $\Dif(X)$ for every diffeological space $X$, with the
diffeology in which $r\mapsto f_r$ is a plot when both $(r,x)\mapsto f_r(x)$ and $(r,x)\mapsto f_r^{-1}(x)$ are smooth \IZ{art.~1.61}. None of
these constructions has hypotheses: there is no closedness condition on subgroups and no properness condition on quotients.
A diffeological group is in particular a group object of $\Hh$, and so has a \defn{delooping}
\[
\B G=\ast\hquot G=\colim_{[k]\in\Delta^{\op}}G^k\ \in\Hh,\qquad\Omega\,\B G\simeq G .
\]
$\B G$ is a connected $1$-truncated object, a stack. It has one point and that point has automorphism group $G$; it is not a
smooth set unless $G$ is trivial.
\section{Principal actions are homotopy quotients}
\begin{definition}[\IZ{art.~8.11}]\label{def:principal}
A smooth right action of a diffeological group $G$ on a diffeological space $X$ is \defn{principal} if the action map
\[
a\colon X\times G\longrightarrow X\times X,\qquad(x,g)\longmapsto(x,xg),
\]
is an induction. A \defn{principal $G$-bundle} over $B$ is a space $X$ with a principal $G$-action and a diffeomorphism $X/G\cong B$.
\end{definition}
Injectivity of $a$ means that the action is free. The induction condition is stronger: whenever two plots $r\mapsto x_r$, $r\mapsto x'_r$ of $X$ lie
pointwise in the same orbit, the unique family $g_r$ with $x'_r=x_rg_r$ is a plot of $G$. In \cite{IZ} this is the hypothesis under which
$X\to X/G$ is proved to be a fibre bundle. Here is what it means.
\begin{theorem}[Principal $=$ homotopy quotient; compare \cite{MinichielloBun}]\label{thm:principal}
For a smooth action of a diffeological group $G$ on a diffeological space $X$, with diffeological quotient $\pi\colon X\to B=X/G$, the following
are equivalent.
\begin{enumerate}[label=\textup{(\roman*)}]
\item The action is principal.
\item The canonical map $X\hquot G\to B$ is an equivalence in $\Hh$.
\item For every plot $P\colon U\to B$, the pullback $P^*X\to U$ is locally isomorphic to $U\times G$ as a space with $G$-action.
\end{enumerate}
\end{theorem}
\begin{proof}
\emph{(i)$\Leftrightarrow$(ii).} The quotient map $\pi$ is a subduction, hence an epimorphism of sheaves, hence an effective epimorphism of
$\Hh$, since effective epimorphisms are detected on $\pi_0$ \cite[7.2.1.14]{HTT}. So $B$ is the colimit of the \v{C}ech nerve
$\check C(\pi)_k=X\times_B\cdots\times_BX$, and these fibre products may be computed in $\Diff$ because the inclusions $\Diff\into\SmSet\into\Hh$
preserve limits. On the other hand $X\hquot G$ is by definition the colimit of the nerve of the action groupoid, $N_k=X\times G^k$. There is a
map of simplicial objects
\[
N_k=X\times G^k\longrightarrow\check C(\pi)_k,\qquad(x,g_1,\dots,g_k)\longmapsto(x,xg_1,xg_1g_2,\dots),
\]
inducing $X\hquot G\to B$ on colimits (\cref{fig:nerves}). Both sides are groupoid objects, so the map is an isomorphism in every degree iff it is
one in degree $1$, where it is the action map $a$ with target restricted to its image $X\times_BX$. The fibres of $\pi$ are the orbits, so
$a$ is onto $X\times_BX$; since $X\times_BX$ carries the subspace diffeology of $X\times X$, the map $X\times G\to X\times_BX$ is a
diffeomorphism iff $a$ is an induction. Thus (i) implies (ii). Conversely, if $X\hquot G\simeq B$ then, groupoid objects in an $\infty$-topos being
effective \cite[6.1.0.6]{HTT}, $X\times G\simeq X\times_{X\hquot G}X\simeq X\times_BX$ via $a$, which is (i).
\emph{(i)$\Rightarrow$(iii).} Since $\pi$ is a subduction, $P$ lifts near any $r_0$ to a plot $s\colon V\to X$. The map
$V\times G\to P^*X|_V$, $(r,g)\mapsto(r,s(r)g)$, is a smooth equivariant bijection. Its inverse sends $(r,x)$ to $(r,g)$ where
$a(s(r),g)=(s(r),x)$, and is smooth because $a$ is an induction.
\emph{(iii)$\Rightarrow$(i).} The action is free because each $P^*X$ is locally $V\times G$. Let $r\mapsto(x_r,x'_r)$ be a plot of $X\times X$
with values in the image of $a$, and let $P=\pi\circ x=\pi\circ x'$. Trivialise $P^*X$ near $r_0$; the two sections $r\mapsto(r,x_r)$ and
$r\mapsto(r,x'_r)$ become $r\mapsto(r,h_r)$ and $r\mapsto(r,h'_r)$ with $h,h'$ plots of $G$, and $g_r=h_r^{-1}h'_r$ is a plot of $G$ with
$x'_r=x_rg_r$.
\end{proof}
\begin{figure}[t]
\centering
\begin{tikzcd}[column sep=2.8em,row sep=2.4em]
\cdots \arrow[r,shift left=1.6ex] \arrow[r,shift left=0.55ex] \arrow[r,shift right=0.55ex] \arrow[r,shift right=1.6ex] &
X\times G^2 \arrow[r,shift left=1.1ex] \arrow[r] \arrow[r,shift right=1.1ex] \arrow[d] &
X\times G \arrow[r,shift left=0.6ex] \arrow[r,shift right=0.6ex] \arrow[d,"a"] & X \arrow[r,two heads] \arrow[d,equal] & X\hquot G \arrow[d]\\
\cdots \arrow[r,shift left=1.6ex] \arrow[r,shift left=0.55ex] \arrow[r,shift right=0.55ex] \arrow[r,shift right=1.6ex] &
X\times_BX\times_BX \arrow[r,shift left=1.1ex] \arrow[r] \arrow[r,shift right=1.1ex] &
X\times_BX \arrow[r,shift left=0.6ex] \arrow[r,shift right=0.6ex] & X \arrow[r,two heads,"\pi"] & B=X/G
\end{tikzcd}
\caption{The nerve of the action groupoid (top) maps to the \v{C}ech nerve of the quotient map (bottom). The top row computes the homotopy
quotient, the bottom row the diffeological quotient. They coincide exactly when $a$ is an isomorphism onto $X\times_BX$, i.e.\ an induction.}\label{fig:nerves}
\end{figure}
\begin{corollary}[\IZ{art.~8.15}]\label{cor:GmodH}
Let $H$ be any subgroup of a diffeological group $G$. Then $G\to G/H$ is a principal $H$-bundle, $G/H\simeq G\hquot H$, and there is a
fibre sequence $H\to G\to G/H\to\B H\to\B G$ in $\Hh$.
\end{corollary}
\begin{proof}
If $r\mapsto(g_r,g'_r)$ is a plot of $G\times G$ with $g_r^{-1}g'_r\in H$, then $r\mapsto g_r^{-1}g'_r$ is a plot of $G$ with values in $H$,
that is, a plot of $H$. So the action is principal. The fibre sequence is the general one for a homomorphism of group objects \cite{NSS}.
\end{proof}
No hypothesis on $H$: it may be dense, as $\Lam_\alpha\subset\R$, or non-closed and of positive dimension, as an irrational line in $T^2$. This one
corollary contains the fact that $T^2\to\Tal$ and $\R\to\Tal$ are both fibre bundles.
\section{The classifying stack}
For a diffeological space $X$ let $\Bun_G(X)$ be the groupoid of principal $G$-bundles over $X$ and $G$-equivariant smooth maps over $X$.
\begin{lemma}\label{lem:Bun-basic}
\begin{enumerate}[label=\textup{(\roman*)}]
\item The pullback of a principal $G$-bundle along any smooth map is a principal $G$-bundle.
\item Every morphism of principal $G$-bundles over $X$ is an isomorphism.
\item \textup{(\IZ{art.~8.19})} Every principal $G$-bundle over a Cartesian space is trivial. Hence
$\Bun_G(U)\simeq\B\bigl(\cinf(U,G)\bigr)$ for $U\in\Cart$.
\end{enumerate}
\end{lemma}
\noindent (i) and (ii) are \cref{exo:Bun-cart}. (iii) is a real theorem, the diffeological form of the homotopy lifting property, and we quote
it. Its meaning here is that the presheaf of groupoids $U\mapsto\B(\cinf(U,G))$ on $\Cart$ is already a stack: there is nothing to sheafify.
\begin{theorem}[Classification; Minichiello \cite{MinichielloBun}, after \cite{Waldorf,KWW}]\label{thm:classification}
For every diffeological group $G$ and every diffeological space $X$ there is an equivalence of groupoids, natural in $X$,
\[
\Bun_G(X)\;\simeq\;\Map_{\Hh}(X,\B G),
\]
under which a bundle $E\to X$ corresponds to a map $c_E$ with $E\simeq X\times_{\B G}\ast$. In particular isomorphism classes of principal
$G$-bundles are in bijection with $H^1(X;G):=\pi_0\Map_{\Hh}(X,\B G)$.
\end{theorem}
\begin{proof}[Sketch]
\emph{Cartesian $U$.} $\B G$ is the stackification of $U\mapsto\B(\cinf(U,G))$, which by \cref{lem:Bun-basic}(iii) is equivalent to the stack
$U\mapsto\Bun_G(U)$; so $\B G(U)\simeq\Bun_G(U)$. \emph{General $X$.} Every sheaf is the colimit of the representables over it, so
$X\simeq\colim_{(U\to X)}U$ in $\Hh$, the colimit being over the category of plots, and $\Map(X,\B G)\simeq\lim_{(U\to X)}\Bun_G(U)$. An object
of the limit is a principal bundle $E_P\to U$ for every plot $P$, with coherent isomorphisms $F^*E_P\cong E_{P\circ F}$. Pulling back a bundle
on $X$ along its plots gives such a family. Conversely a family glues: let $E$ be the disjoint union over $x\in X$ of the fibres $E_x$ over the
point-plots, with the diffeology generated by the maps $E_P\to E$; then $E\to X$ is a principal bundle by criterion (iii) of
\cref{thm:principal}, and $P^*E\cong E_P$. The two constructions are inverse equivalences. For the last statement, the pullback of $\ast\to\B G$
along $c_E$ is a principal bundle with quotient $X$, as in any $\infty$-topos \cite{NSS}.
\end{proof}
\begin{remark}[There is no classifying \emph{space}]\label{rem:no-BG-space}
Christensen and Wu construct a diffeological space $BG$ that classifies the bundles that have a smooth partition of unity subordinate to a
trivialising D-open cover, and observe that no diffeological space classifies all diffeological principal bundles \cite{ChristensenWuBG}. The
Kronecker bundle exhibits the obstruction. Homotopy classes of maps into a space classify bundles at best up to \emph{concordance}, and every
principal $\R$-bundle over $\Tal$ is concordant to the trivial one: if $\tau$ is a cocycle for it in the sense of \cref{cor:bundles-TGamma}
below, then $(x,s)\mapsto s\,\tau(\lambda)(x)$ is a cocycle for a bundle over $\Tal\times\R$ that restricts to the trivial bundle at $s=0$ and to
the given one at $s=1$. Over a manifold, concordant bundles are isomorphic. Over $\Tal$ they are not: $T^2\to\Tal$ is concordant to the trivial
bundle and not isomorphic to it. For the stack $\B\R$ the distinction does not arise, because $\Map(X,\B\R)$ is the groupoid of bundles and
\emph{isomorphisms}, not a set of homotopy classes. $\B\R$ has contractible shape, $\Pi\,\B\R\simeq\B(\Pi\R)\simeq\ast$, and yet
$\Map(\Tal,\B\R)$ has the large set of components $\Fl(\Tal)$ computed in \cref{thm:Fl}. The classifying object of the book's bundle theory
exists, and is not a diffeological space.
\end{remark}
\begin{corollary}[Bundles over quotients of $\R^n$]\label{cor:bundles-TGamma}
Let $\Gamma\subset\R^n$ be a countable subgroup and $G$ a diffeological group. Then
\[
\Bun_G(\R^n/\Gamma)\;\simeq\;\bigl(\B\,\cinf(\R^n,G)\bigr)^{h\Gamma},
\]
the homotopy fixed points for the translation action. Its set of components is the non-abelian cohomology set $H^1(\Gamma;\cinf(\R^n,G))$ of
crossed homomorphisms $\tau\colon\Gamma\to\cinf(\R^n,G)$, $\tau(\gamma+\gamma')=(\tau(\gamma)\circ T_{\gamma'})\cdot\tau(\gamma')$, modulo
$\tau\sim(\sigma\circ T_\gamma)\cdot\tau(\gamma)\cdot\sigma^{-1}$.
\end{corollary}
\begin{proof}
$\R^n/\Gamma\simeq\R^n\hquot\Gamma$ by \cref{cor:TGamma}, and mapping out of a homotopy quotient gives homotopy fixed points:
\[
\Map(\R^n/\Gamma,\B G)\simeq\Map(\R^n,\B G)^{h\Gamma},\qquad\Map(\R^n,\B G)\simeq\B\,\cinf(\R^n,G),
\]
the second equivalence by \cref{lem:Bun-basic}(iii).
\end{proof}
\noindent For $G=\R$ and $n=1$ this is the cocycle description of \IZ{art.~8.39}, obtained there by hand.
\section{The three quotients}
\begin{theorem}[Trichotomy of quotients; compare \cite{WattsWolbert}]\label{thm:three-quotients}
Let a diffeological group $G$ act smoothly on a diffeological space $X$. In $\Hh$ there are canonical maps
\[
X\hquot G\;\xrightarrow{\ u\ }\;\pi_0(X\hquot G)\;\xrightarrow{\ v\ }\;\conc\,\pi_0(X\hquot G),
\]
and:
\begin{enumerate}[label=\textup{(\roman*)}]
\item $\pi_0(X\hquot G)$ is the quotient of $X$ by $G$ in $\SmSet$, and $\conc\,\pi_0(X\hquot G)$ is the diffeological quotient $X/G$;
\item $u$ is an equivalence if and only if the action is free;
\item if the action is free, $v$ is an isomorphism if and only if the action is principal;
\item $\Pi(X\hquot G)\simeq\Pi X\hquot\Pi G$ in all cases.
\end{enumerate}
In particular $X\hquot G\simeq X/G$ if and only if the action is principal.
\end{theorem}
\begin{proof}
(i) $\pi_0$ and $\conc$ are left adjoints (\cref{thm:DiffinH}), so they carry the colimit $X\hquot G$ to the corresponding colimits in $\SmSet$
and $\Diff$, which are the coequalisers of the action. (iv) $\Pi$ preserves colimits and finite products.
(ii) Let $q\colon X\to X\hquot G$ be the canonical effective epimorphism, with $X\times_{X\hquot G}X\simeq X\times G$. The object $X\hquot G$ is
$0$-truncated iff its diagonal is a monomorphism, and this may be tested after pulling back along the effective epimorphism $q\times q$, where it
becomes the action map $a\colon X\times G\to X\times X$. A map of concrete sheaves is a monomorphism iff it is injective on points. So $X\hquot G$ is
$0$-truncated iff $a$ is injective iff the action is free.
(iii) Assume the action free and write $S=\pi_0(X\hquot G)=X\hquot G$. Both $X\to S$ and $X\to X/G$ are epimorphisms of sheaves, and an epimorphism
in a topos is determined by its kernel pair. The kernel pair of $X\to S$ is $X\times G$, embedded by $a$; that of $X\to X/G$ is $X\times_{X/G}X$,
the image of $a$ with the subspace diffeology. They coincide as subobjects of $X\times X$ iff $a$ is an induction.
\end{proof}
\begin{table}[t]\centering\small
\begin{tabular}{@{}llllll@{}}\toprule
action & free & principal & $X\hquot G$ & $\pi_0(X\hquot G)$ & $X/G$\\\midrule
$\Lam_\alpha$ on $\R$ & yes & yes & $\Tal$ & $\Tal$ & $\Tal$\\
$\R$ on $T^2$ (Kronecker) & yes & yes & $\Tal$ & $\Tal$ & $\Tal$\\
$\Rd$ on $\R$ & yes & no & $\Om^1_{\mathrm{cl}}$ & $\Om^1_{\mathrm{cl}}$ & $\ast$\\
$\{\pm1\}$ on $\R$ & no & no & orbifold, $\Pi=\B\Z/2$ & $Q$ (\cref{ex:Rpm-sheaf}) & $\dten_1$, $\Pi=\ast$\\
$\Ort(n)$ on $\R^n$ & no & no & stack, $\Pi=B\Ort(n)$ & non-concrete & $\dten_n$, $\Pi=\ast$\\
$G$ on $\ast$ & no & no & $\B G$ & $\ast$ & $\ast$\\\bottomrule
\end{tabular}
\caption{The three quotients on examples. Reading down the columns: the homotopy quotient retains all the data; in the sheaf quotient the
stabilisers are discarded; in the diffeological quotient families that coincide pointwise are moreover identified, whether or not they coincide in germs.}
\label{tab:three}
\end{table}
\Cref{thm:three-quotients} is the precise form of the exactness ladder of \cref{fig:ladder}, and it is the one structural statement used
in every application chapter. It also accounts for a pattern in \cite{IZ}: the theorems there with strong conclusions --- exact homotopy
sequences, classification of bundles over tori, the group of flows --- are about principal actions, where the diffeological quotient is the
homotopy quotient and nothing is lost; the examples there with unexpected properties --- $\dten_n$, orbifolds --- are about non-free actions, where
the diffeological space is the coarse space of a stack. Watts and Wolbert study the coarse space systematically as a ``coarse moduli space'' functor from
stacks to diffeological spaces \cite{WattsWolbert}.
\section{Groupoids and the book's fibrations}
In \cite{IZ} a smooth surjection $\pi\colon T\to B$ is a \emph{fibration} when its \emph{structure groupoid} is \emph{fibrating}
\IZ{art.~8.4--8.8}. The structure groupoid $\mathbf K$ has objects $B$ and as morphisms $b\to b'$ the diffeomorphisms $T_b\to T_{b'}$, with a
functional diffeology; a diffeological groupoid is fibrating when $(\mathrm{src},\mathrm{trg})\colon\Mor(\mathbf K)\to\Ob(\mathbf K)^2$ is a subduction.
\begin{proposition}[Fibrating groupoids are deloopings]\label{prop:fibrating}
Let $\mathbf K$ be a fibrating diffeological groupoid with non-empty space of objects, $b$ an object, and $\mathbf K_b$ its isotropy group. Then the
inclusion $\B\mathbf K_b\to|\mathbf K|$ of the one-object full subgroupoid into the stack presented by $\mathbf K$ is an equivalence in $\Hh$.
Consequently the canonical map $\Ob(\mathbf K)\to|\mathbf K|\simeq\B\mathbf K_b$ classifies a principal $\mathbf K_b$-bundle over $\Ob(\mathbf K)$,
namely $\mathrm{trg}\colon\mathrm{src}^{-1}(b)\to\Ob(\mathbf K)$.
\end{proposition}
\noindent The proof is \cref{exo:fibrating}. Applied to the structure groupoid of $\pi\colon T\to B$ it gives: $\pi$ is a diffeological fibre bundle
with fibre $F$ if and only if it is classified by a map $B\to\B\Dif(F)$, the principal $\Dif(F)$-bundle being the bundle of ``frames''
$F\xrightarrow{\cong}T_b$ \IZ{art.~8.14}, and $T$ being recovered as the associated bundle \IZ{art.~8.16}. The two-step definition of \cite{IZ} ---
build a groupoid, require that it be fibrating --- is the unpacking, in terms of plots, of ``a map to a delooping''.
\exercisesheading
\begin{exercise}[label=exo:Kronecker-principal]{2}
Verify directly that the Kronecker action $s\cdot[x,y]=[x+s,y+\alpha s]$ of $\R$ on $T^2$ is principal when $\alpha$ is irrational, and that it is
not principal when $\alpha$ is rational.
\end{exercise}
\begin{solution}
Let $r\mapsto(z_r,z'_r)$ be a plot of $T^2\times T^2$ with $z'_r$ in the orbit of $z_r$. Near $r_0$ lift to smooth $(x,y),(x',y')\colon V\to\R^2$.
For each $r$ there are $s\in\R$ and $(m,n)\in\Z^2$ with $x'-x=s+m$ and $y'-y=\alpha s+n$. Then $w=(y'-y)-\alpha(x'-x)=n-\alpha m$ is a smooth
function with values in $\Lam_\alpha$, hence locally constant; as $\alpha$ is irrational, $w$ determines $(m,n)$, which are therefore locally constant.
So $s_r=x'_r-x_r-m$ is smooth, and it is the unique real number with $z'_r=s_r\cdot z_r$ because the action is free. Hence the action map is an
induction. If $\alpha=p/q$ is rational, $s=q$ acts trivially, so the action is not free.
\end{solution}
\begin{exercise}[label=exo:three-pm]{2}
For $\{\pm1\}$ acting on $\R$, compute the shapes of $\R\hquot\{\pm1\}$ and of $\dten_1$, and explain the difference in terms of fibres.
\end{exercise}
\begin{solution}
By \cref{thm:three-quotients}(iv), $\Pi(\R\hquot\{\pm1\})=\ast\hquot(\Z/2)=\B\Z/2\simeq\R P^\infty$. By \cref{exo:contractible},
$\Pi\dten_1=\ast$. The map $\R\hquot\{\pm1\}\to\dten_1$ is an isomorphism over the open half-line and has fibre $\B\Z/2$ over the point $[0]$;
collapsing that one fibre changes the homotopy type from $\R P^\infty$ to a point. The stack retains the stabiliser of $0$, and in consequence
its shape differs from that of the half-line.
\end{solution}
\begin{exercise}[label=exo:Bun-cart]{3}
Prove \cref{lem:Bun-basic}(i) and (ii), and show that the automorphism group of the trivial bundle $X\times G\to X$ is $\cinf(X,G)$.
\end{exercise}
\begin{solution}
(i) Let $E\to X$ be principal and $f\colon X'\to X$ smooth; $f^*E=X'\times_XE$ carries the $G$-action on the second factor. Let
$r\mapsto((x'_r,e_r),(x'_r,e_rg_r))$ be a plot of $f^*E\times f^*E$ in the image of the action map. Then $r\mapsto(e_r,e_rg_r)$ is a plot of
$E\times E$ in the image of the action map of $E$, so $r\mapsto g_r$ is a plot of $G$. The quotient $f^*E/G\to X'$ is a bijection, and it is a
diffeomorphism because $f^*E\to X'$ is a subduction (pullback of a subduction).
(ii) Let $\phi\colon E\to E'$ be equivariant over $X$. It is bijective, being a bijection on each fibre (a $G$-torsor). To see that $\phi^{-1}$ is
smooth, let $r\mapsto e'_r$ be a plot of $E'$; near $r_0$ lift its projection to a plot $r\mapsto e_r$ of $E$. Then $\phi(e_r)$ and $e'_r$ lie in
the same fibre, so $e'_r=\phi(e_r)g_r$ with $g$ a plot of $G$ by principality of $E'$, and $\phi^{-1}(e'_r)=e_rg_r$ is a plot.
For the trivial bundle, an equivariant map over $X$ has the form $(x,g)\mapsto(x,\sigma(x)g)$, with $\sigma(x)$ the $G$-component of the image of
$(x,1)$; $\sigma$ is smooth iff the map is.
\end{solution}
\begin{exercise}[label=exo:Z-bundles]{3}
Classify the principal $\Z$-bundles over $\Tal$ and describe their total spaces.
\end{exercise}
\begin{solution}
By \cref{cor:bundles-TGamma}, classes are $H^1(\Lam_\alpha;\cinf(\R,\Z))=H^1(\Lam_\alpha;\Z)=\Hom(\Lam_\alpha,\Z)\cong\Z^2$, since a smooth map
$\R\to\Z$ is constant and $\Lam_\alpha$ acts trivially on constants. For $\rho\in\Hom(\Lam_\alpha,\Z)$ the bundle is
$E_\rho=(\R\times\Z)/\Lam_\alpha$ with $\lambda\cdot(x,k)=(x+\lambda,k+\rho(\lambda))$. If $\rho=0$ then $E_\rho=\Tal\times\Z$. If $\rho\neq0$,
its image is $d\Z$ for some $d\ge1$ and its kernel is infinite cyclic, generated by some $\mu\in\Lam_\alpha$. The components of $E_\rho$ are indexed
by $\Z/d$, and each is $\R/\ker\rho=\R/\mu\Z$, a circle of length $\abs\mu$. So the connected coverings of $\Tal$ with group $\Z$ are the
circles $\R/\mu\Z$, $\mu\in\Lam_\alpha$ primitive, on which the remaining generator of $\Lam_\alpha$ acts by an irrational rotation with quotient
$\Tal$. The irrational torus is a circle modulo an irrational rotation in a $\GL_2(\Z)$-worth of ways.
\end{solution}
\begin{exercise}[label=exo:fibrating]{4}
Prove \cref{prop:fibrating}.
\end{exercise}
\begin{solution}
Write $O=\Ob(\mathbf K)$, $M=\Mor(\mathbf K)$, $E=\mathrm{src}^{-1}(b)\subseteq M$ with the subspace diffeology, and $G=\mathbf K_b$ acting on $E$ by
$f\cdot g=f\circ g$.
\emph{Step 1: $\mathrm{trg}\colon E\to O$ is a subduction.} $E$ is the pullback of $\chi=(\mathrm{src},\mathrm{trg})\colon M\to O\times O$ along
$O\to O\times O$, $x\mapsto(b,x)$. Since $\mathbf K$ is fibrating, $\chi$ is a subduction, and subductions are stable under pullback
(\cref{prop:stability}).
\emph{Step 2: the action of $G$ on $E$ is principal with quotient $O$.} Two arrows $f,f'\in E$ have the same target iff $f'=f\circ g$ with
$g=f^{-1}\circ f'\in G$, so the fibres of $\mathrm{trg}|_E$ are the $G$-orbits and the action is free. If $r\mapsto(f_r,f'_r)$ is a plot of
$E\times E$ with equal targets, then $g_r=f_r^{-1}\circ f'_r$ is a plot of $M$, because inversion and composition are smooth in a diffeological
groupoid, with values in $G$; so it is a plot of $G$. Thus the action map is an induction, and $O\cong E/G$ by Step~1 and uniqueness of
quotients. By \cref{thm:principal}, $O\simeq E\hquot G$ in $\Hh$.
\emph{Step 3: the equivalence.} $|\mathbf K|$ is the colimit of the nerve of $\mathbf K$; the canonical map $p\colon O\to|\mathbf K|$ is an effective
epimorphism with $O\times_{|\mathbf K|}O\simeq M$. Consider the composite $\ast\xrightarrow{b}O\xrightarrow{p}|\mathbf K|$. Its pullback along $p$ is
$\ast\times_{|\mathbf K|}O\simeq\mathrm{src}^{-1}(b)=E$, mapping to $O$ by $\mathrm{trg}$, which is an effective epimorphism by Step~1. Effective
epimorphisms descend along the effective epimorphism $p$, so $\ast\to|\mathbf K|$ is an effective epimorphism. Its \v{C}ech nerve has
$\ast\times_{|\mathbf K|}\ast\simeq\mathrm{src}^{-1}(b)\cap\mathrm{trg}^{-1}(b)=G$ in degree $1$, so it is the nerve of $G$, and
$|\mathbf K|\simeq\colim G^k=\B G$.
\emph{Step 4: the classified bundle.} The principal bundle classified by $p\colon O\to|\mathbf K|\simeq\B G$ is the pullback of $\ast\to\B G$
along $p$, which by Step~3 is $E\to O$.
\end{solution}
\chapter{Models}\label{ch:models}
\begin{chapabstract}
Manifolds, manifolds with boundary and corners, orbifolds and quasifolds are all ``diffeological spaces locally diffeomorphic to a model''. We
review what the diffeology determines in each case, where it is the coarse space of a stack, and how much of it is determined by real-valued functions.
\end{chapabstract}
\source{\IZ{Chapter~4}, and \IZ{art.~1.78, 2.22} for dimension.}
\section{Modelling}
A \defn{local diffeomorphism} between diffeological spaces is a map that is, near each point of its source, a diffeomorphism from a D-open
subset onto a D-open subset \IZ{art.~2.5}. Given a class $\mathcal M$ of diffeological spaces, a space is \defn{modelled on $\mathcal M$} if every
point has a D-open neighbourhood diffeomorphic to a D-open subset of a member of $\mathcal M$ \IZ{art.~4.19}.
\begin{table}[t]\centering\small
\begin{tabular}{@{}p{4.9cm}p{4.3cm}p{4.2cm}@{}}\toprule
models $\mathcal M$ & spaces modelled on $\mathcal M$ & reference\\\midrule
$\R^n$ & manifolds & \IZ{art.~4.1--4.3}\\
half-spaces $H^n=\R^{n-1}\times[0,\infty)$ & manifolds with boundary & \IZ{art.~4.12--4.16}\\
corners $\R^{n-k}\times[0,\infty)^k$ & manifolds with corners & \cite{GurerIZ}\\
$\R^n/\Gamma$, $\Gamma\subset\GL_n(\R)$ finite & orbifolds & \IZ{art.~4.17}, \cite{IKZ}\\
$\R^n/\Gamma$, $\Gamma$ countable, affine & quasifolds & \cite{IglesiasPrato}\\
diffeological vector spaces & diffeological manifolds, e.g.\ $S^\infty$ & \IZ{art.~4.7--4.9}\\\bottomrule
\end{tabular}
\caption{Classical and less classical geometries as modelled diffeological spaces. Half-spaces and corners carry the subspace diffeology of
$\R^n$; the quotients carry the quotient diffeology.}\label{tab:models}
\end{table}
\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\footnotesize]
\begin{scope}
\fill[hcsmist] (-0.9,-0.6) rectangle (0.9,0.6); \draw[hcsteal,dashed] (-0.9,-0.6) rectangle (0.9,0.6);
\fill (0,0) circle (1.3pt); \node at (0,-1.0) {$\R^2$};
\end{scope}
\begin{scope}[xshift=2.6cm]
\fill[hcsmist] (-0.9,0) rectangle (0.9,0.9); \draw[hcsteal,dashed] (-0.9,0)--(-0.9,0.9)--(0.9,0.9)--(0.9,0);
\draw[hcsink,line width=1pt] (-0.9,0)--(0.9,0); \fill (0,0) circle (1.3pt); \node at (0,-1.0) {$H^2$};
\end{scope}
\begin{scope}[xshift=5.2cm]
\fill[hcsmist] (-0.4,-0.4) rectangle (0.9,0.9); \draw[hcsteal,dashed] (-0.4,0.9)--(0.9,0.9)--(0.9,-0.4);
\draw[hcsink,line width=1pt] (-0.4,0.9)--(-0.4,-0.4)--(0.9,-0.4); \fill (-0.4,-0.4) circle (1.3pt); \node at (0.2,-1.0) {corner};
\end{scope}
\begin{scope}[xshift=7.8cm]
\fill[hcssand] (0,-0.55) -- (-0.8,0.6) arc (180:360:0.8 and 0.2) -- cycle;
\draw[hcsgold] (0,-0.55) -- (-0.8,0.6); \draw[hcsgold] (0,-0.55) -- (0.8,0.6);
\draw[hcsgold] (0,0.6) ellipse (0.8 and 0.2);
\fill (0,-0.55) circle (1.3pt); \node at (0,-1.0) {$\R^2/\Z_n$};
\end{scope}
\begin{scope}[xshift=10.5cm]
\draw[hcsgrey] (-1.0,0)--(1.0,0);
\foreach \x in {-0.95,-0.81,-0.62,-0.47,-0.38,-0.19,-0.05,0.09,0.24,0.33,0.52,0.67,0.76,0.95} \fill[hcsrust] (\x,0) circle (1pt);
\draw[hcsrust,->] (0,0.5) -- (0,0.12); \node[hcsrust] at (0,0.7) {dense orbit};
\node at (0,-1.0) {$\R/\Lam_\alpha$};
\end{scope}
\end{tikzpicture}
\caption{Five local models. The first three are subspaces of $\R^2$, the last two are quotients. Only the first is a manifold; all five are
diffeological spaces, and each is determined up to diffeomorphism by its plots.}\label{fig:models}
\end{figure}
\section{Manifolds, boundaries, corners}
A diffeological space is a manifold of dimension $n$ exactly when it is modelled on $\R^n$, and smooth maps between manifolds are the usual ones
(\cref{exo:manifold-atlas}). For manifolds with boundary there is something to prove, because the model $H^n$ is a subspace and its diffeology is
defined by plots \emph{into} it, while the classical notion of a smooth function \emph{on} it is ``restriction of a smooth function on $\R^n$''.
\begin{theorem}[\IZ{art.~4.13, 4.16}]\label{thm:halfspace}
A map $f\colon H^n\to\R$ is smooth for the subspace diffeology if and only if it is the restriction of a smooth function on an open neighbourhood
of $H^n$ in $\R^n$. Consequently manifolds with boundary, with their classical smooth maps, form a full subcategory of $\Diff$.
\end{theorem}
\noindent The essential case is $n=1$ and is \cref{exo:halfline-functions}; it rests on Whitney's theorem that a smooth even function of $t$ is a
smooth function of $t^2$ \cite{Whitney}. The same holds for corners \cite{GurerIZ}. In the language of \cref{sec:two-images}: the classical
definition of a manifold with boundary is in terms of its functions, the diffeological one in terms of its plots, and by Whitney's theorem, for
half-spaces the two descriptions determine each other; see \cref{sec:fn-vs-plots}.
\section{Orbifolds and quasifolds}
A diffeological \defn{orbifold} is a space modelled on quotients $\R^n/\Gamma$ by finite linear groups \cite{IKZ}. A priori the model is
only the orbit space. In fact it determines the group.
\begin{theorem}[Iglesias-Zemmour--Karshon--Zadka \cite{IKZ}; \IZ{art.~4.18}]\label{thm:IKZ}
Let $\Gamma,\Gamma'\subset\GL_n(\R)$ be finite subgroups. Every local diffeomorphism from $\R^n/\Gamma$ to $\R^n/\Gamma'$ sending $[0]$ to $[0]$ lifts to an
equivariant local diffeomorphism of $\R^n$ at $0$; in particular $\Gamma$ and $\Gamma'$ are conjugate in $\GL_n(\R)$. Hence the \defn{structure group} of
an orbifold at a point is a diffeological invariant.
\end{theorem}
\begin{corollary}\label{cor:manifold-point}
Let $\Gamma\subset\GL_n(\R)$ be a finite subgroup. The point $[0]\in\R^n/\Gamma$ has a neighbourhood diffeomorphic to an open subset of $\R^n$ if and only
if $\Gamma$ is trivial.
\end{corollary}
Note the contrast with topology and with algebraic geometry: $\R/\{\pm1\}$ is homeomorphic to a half-line, and $\C/\{\pm1\}$ is isomorphic to
$\C$ as a variety, but neither quotient is a diffeological manifold near the fixed point (\cref{exo:delta1-singular}).
In the trichotomy of \cref{thm:three-quotients}, with $X=\R^n$ and $G=\Gamma$, an orbifold chart has three incarnations: the stack
$\R^n\hquot\Gamma$ of the Lie-groupoid literature, the sheaf quotient, and the diffeological space $\R^n/\Gamma$. By \cref{thm:IKZ}, for
finite linear groups the last determines the first up to equivalence, locally. The determination is not functorial: the map from morphisms of
stacks to smooth maps of quotients is neither injective nor, on $2$-cells, defined; see \cite{WattsWolbert}. A diffeological
orbifold is a stack that is recoverable from its coarse space, in the way a reduced variety is recoverable from its points.
\defn{Quasifolds} relax ``finite'' to ``countable'' \cite{IglesiasPrato}. The irrational torus is the basic example, and
\cref{thm:linear-rigidity} is the corresponding rigidity statement: the diffeology of $\R^n/\Gamma$ determines $\Gamma$ up to $\GL_n(\R)$.
\section{Functions versus plots}\label{sec:fn-vs-plots}
A diffeology is a ``maps in'' structure. The older notions of Sikorski and Fr\"olicher are ``maps out'' structures, given by a ring of
real-valued functions. Each determines a candidate for the other: from plots one gets the functions that are smooth along all plots; from
functions one gets the parametrisations along which all functions are smooth. A diffeological space is \defn{reflexive} if it is recovered from its
functions in this way. Manifolds, half-spaces and corners are reflexive. The irrational torus is as far from reflexive as possible, since its only
smooth functions are constants; and $\dten_1=\R/\{\pm1\}$ is not reflexive either, since it has the same smooth functions as the half-line $H$ and
strictly fewer plots (\cref{prop:delta1}). This is developed as a Galois connection in \cref{thm:galois} of \cref{ch:ai}, and \cref{thm:reflexive} is the
equivalence of reflexive diffeological spaces with Fr\"olicher spaces \cite{BIKW}. The point for now is the slogan of \cite{IZ}: \emph{function-based
smooth structures miss the singular quotients}, and the reason is that a quotient is a colimit, and maps \emph{out} of a colimit are easy while maps
\emph{in} are the content.
\section{Infinite dimensions and dimension}
On the other side of $\Mfd$, the functional diffeology is compatible with the classical infinite-dimensional theories where these exist. Banach
manifolds embed fully faithfully in $\Diff$ \IZ{Exercise~72}; so do Fr\'echet manifolds \cite{Losik}; and for a compact manifold $M$ the
functional diffeology on $\cinf(M,N)$ is the diffeology of its Fr\'echet manifold structure \cite{KrieglMichor,Waldorf}. In contrast with those theories,
in $\Diff$ no topology on a function space is required to define a smooth curve in it: \cref{thm:ccc} is the definition.
Finally, a diffeological space has a \defn{dimension} at each point: the smallest $d$ such that the germ of the diffeology at the point is
generated by plots with domains of dimension at most $d$ \IZ{art.~1.78, 2.22}. It is a local invariant, equal to $n$ for an $n$-manifold, and
\IZ{Exercises~50--51} compute
\[
\dim_{[0]}\bigl(\R^n/\Ort(n)\bigr)=n,\qquad\dim_0\bigl([0,\infty)_{\Sub}\bigr)=\infty .
\]
So the spaces $\dten_n$, all homeomorphic to a half-line and all with the same ring of smooth functions, are pairwise non-diffeomorphic, and none
is diffeomorphic to the half-line $H$. We will use this in Chapters~\ref{ch:ml} and~\ref{ch:systems} as a supply of systems with identical observable
behaviour and inequivalent state spaces.
\exercisesheading
\begin{exercise}[label=exo:sqrt]{1}
Show that $x\mapsto\sqrt x$ is a D-continuous function on $H=[0,\infty)_{\Sub}$ that is not smooth.
\end{exercise}
\begin{solution}
It is continuous for the usual topology of $H$, and plots of $H$ are continuous, so it is D-continuous. The parametrisation $t\mapsto t^2$ is a plot
of $H$, and its composite with the square root is $t\mapsto\abs t$, not smooth at $0$.
\end{solution}
\begin{exercise}[label=exo:halfline-functions]{2}
Prove the case $n=1$ of \cref{thm:halfspace}: $f\colon H\to\R$ is smooth iff $f=g|_H$ for some $g\in\cinf(\R)$. Deduce that $\cinf(\dten_1)\cong\cinf(H)$.
\end{exercise}
\begin{solution}
If $g$ is smooth on $\R$ and $P$ is a plot of $H$, then $P$ is smooth into $\R$ and $g\circ P$ is smooth. Conversely let $f$ be smooth on $H$. The plot
$t\mapsto t^2$ gives a smooth even function $e(t)=f(t^2)$, so by Whitney's theorem $e(t)=g(t^2)$ with $g\in\cinf(\R)$, and then $f(x)=g(x)$ for all
$x\ge0$. For the second claim: a smooth function on $\dten_1$ is the same as a smooth even function on $\R$ (quotient), hence of the form
$g(x^2)$, hence $g|_H\circ\mathrm{sq}$; so $\mathrm{sq}^*\colon\cinf(H)\to\cinf(\dten_1)$ is a bijection. The two spaces have the same functions and, by
\cref{prop:delta1}, different plots.
\end{solution}
\begin{exercise}[label=exo:delta1-singular]{3}
Show that $[0]\in\dten_1=\R/\{\pm1\}$ has no D-open neighbourhood diffeomorphic to an open interval. Deduce that every diffeomorphism of $\dten_1$
fixes $[0]$.
\end{exercise}
\begin{solution}
Suppose $\psi\colon J\to W$ is a diffeomorphism from an open interval onto a D-open neighbourhood $W$ of $[0]$, and let $\psi(t_0)=[0]$. As a plot of
$\dten_1$, $\psi$ lifts near $t_0$ to a smooth $f\colon J'\to\R$ with $\pi\circ f=\psi$ and $f(t_0)=0$. Since $\psi$ is injective, so is $f$; a
continuous injective function on an interval is strictly monotone, so $f(J')$ is an open interval containing $0$, and therefore contains both
$x$ and $-x$ for small $x\ne0$. But $\pi(x)=\pi(-x)$, contradicting injectivity of $\psi=\pi\circ f$. Every other point $[a]$, $a>0$, does have
such a neighbourhood, namely $\pi((a/2,2a))$, on which $\pi$ restricts to a diffeomorphism. A diffeomorphism of $\dten_1$ preserves the set of
points with a neighbourhood diffeomorphic to an interval, so it fixes the unique point without one.
\end{solution}
\begin{exercise}[label=exo:cone-hilbert]{3}
Let $\{\pm1\}$ act on $\R^2=\C$ and let $\sigma\colon\C\to\R^3$, $\sigma(z)=(\abs z^2,\mathrm{Re}\,z^2,\mathrm{Im}\,z^2)$, with image the half-cone
$S=\set{(u,v,w) : u=\sqrt{v^2+w^2}}$. Show that the induced bijection $\bar\sigma\colon\C/\{\pm1\}\to S_{\Sub}$ is smooth but not a diffeomorphism.
\end{exercise}
\begin{solution}
$\sigma$ is smooth, invariant, and separates orbits because $z^2$ determines $\pm z$; so $\bar\sigma$ is a smooth bijection onto $S$. Consider
\[
P(r,s)=\bigl(\abs z\,e^{-1/\abs z^2},\ \mathrm{Re}\,(z\,e^{-1/\abs z^2}),\ \mathrm{Im}\,(z\,e^{-1/\abs z^2})\bigr),\qquad z=r+is,\quad P(0)=0 .
\]
The function $e^{-1/\abs z^2}$ is smooth and flat at $0$, and the product of a flat function with $\abs z$ is smooth; so $P$ is a smooth map into
$\R^3$, with values in $S$: a plot of $S_{\Sub}$. If $\bar\sigma^{-1}\circ P$ were a plot of the quotient, there would be a disc $V\ni0$ and a smooth
$\zeta\colon V\to\C$ with $\zeta^2=z\,e^{-1/\abs z^2}$ on $V$. On a small circle around $0$ the right-hand side has winding number $1$ about the
origin, while $\zeta^2$ has even winding number. So no continuous $\zeta$ exists even on $V\smallsetminus\{0\}$. Thus $S_{\Sub}$ has a plot that the
orbifold $\C/\{\pm1\}$ lacks: the image of the invariant-theoretic embedding has strictly more plots than the orbit space.
\end{solution}
\begin{exercise}[label=exo:manifold-atlas]{4}
Let $X$ be a diffeological space modelled on $\R^n$. Prove that the local diffeomorphisms from open subsets of $\R^n$ to $X$ form a smooth atlas
in the classical sense, that the diffeology of $X$ is the diffeology of smooth parametrisations for this atlas, and that a map between two such
spaces is smooth iff it is smooth in charts.
\end{exercise}
\begin{solution}
Call a \emph{chart} a diffeomorphism $\phi\colon U\to\phi(U)$ from a domain $U\subseteq\R^n$ onto a D-open subset of $X$ with the subspace diffeology.
By hypothesis the images of charts cover $X$.
\emph{Transition maps.} Let $\phi,\psi$ be charts and $W=\phi(U)\cap\psi(V)$, which is D-open. Then $\phi^{-1}(W)$ and $\psi^{-1}(W)$ are open, because
charts are plots and plots are D-continuous, and $\psi^{-1}\circ\phi\colon\phi^{-1}(W)\to\psi^{-1}(W)$ is a composite of smooth maps of diffeological
spaces, with inverse $\phi^{-1}\circ\psi$. A smooth map between domains in the diffeological sense is an ordinary smooth map (\cref{rem:yoneda}). So the
transition maps are classical diffeomorphisms between open subsets of $\R^n$; the charts are homeomorphisms onto their images for the D-topology by the
same argument; and we have a classical atlas on the topological space $D(X)$.
\emph{The diffeology.} Let $P\colon O\to X$ be a parametrisation. If $P$ is a plot and $r_0\in O$, choose a chart $\phi$ around $P(r_0)$;
$P^{-1}(\phi(U))$ is an open neighbourhood of $r_0$ on which $\phi^{-1}\circ P$ is a plot of $U$, i.e.\ smooth. So $P$ is smooth in charts.
Conversely if $P$ is continuous and smooth in charts, then locally $P=\phi\circ(\phi^{-1}\circ P)$ is a plot composed with a smooth map, hence a plot,
and $P$ is a plot by \ref{D2}.
\emph{Maps.} Let $f\colon X\to Y$ be a map between two such spaces. If $f$ is smooth then it is D-continuous and, for charts $\phi$ of $X$ and $\psi$ of
$Y$, $\psi^{-1}\circ f\circ\phi$ is a smooth map of diffeological spaces between domains wherever defined, hence classically smooth. Conversely if
$f$ is continuous and smooth in charts, then for a plot $P$ of $X$ the parametrisation $f\circ P$ is continuous and smooth in charts of $Y$, hence a plot by the
previous paragraph.
Classical manifolds also require the topology to be Hausdorff and paracompact; these are conditions on $D(X)$ that are
optional in the diffeological definition.
\end{solution}
\part{Applications}
\chapter{Number theory: the arithmetic of irrational tori}\label{ch:number-theory}
\chaptermark{Number theory}
\begin{chapabstract}
The diffeological space $\Tal=\R/(\Z+\alpha\Z)$ is a point for topology and for smooth functions. We show that its plots nevertheless read off
three layers of the arithmetic of $\alpha$: its orbit under $\GL_2(\Z)$, that is, the tail of its continued fraction; the unit group of the
quadratic order it generates, if any; and its Diophantine type. Each layer is a theorem about a different functor on $\Hh$ --- $\Hom$, $\Dif$, and
$\Map(-,\B\R)$ --- applied to the same object.
\end{chapabstract}
\source{\IZ{Exercises~4, 5, 105, 119, 134} and \IZ{art.~8.38--8.39}. The classification is due to Donato and Iglesias \cite{DonatoIglesias}, the
number-field generalisation to Iglesias and Lachaud \cite{IglesiasLachaud}, and the theory of flows over $\Tal$ to Iglesias-Zemmour
\cite{IZthesis,IZsmall,IZarith}.}
\section{Rigidity}
Throughout, a \defn{quasi-torus} is a quotient $T_\Gamma=\R^n/\Gamma$ of $\R^n$ by a countable subgroup, with the quotient diffeology. By
\cref{cor:TGamma} the projection $q\colon\R^n\to T_\Gamma$ is the universal covering, a principal bundle for the discrete group $\Gamma$.
\begin{theorem}[Linear rigidity of quasi-tori; after \cite{DonatoIglesias,IglesiasLachaud}]\label{thm:linear-rigidity}
Let $\Gamma\subset\R^n$ and $\Gamma'\subset\R^m$ be countable subgroups, and assume that $\Gamma$ spans $\R^n$. Let $f\colon T_\Gamma\to T_{\Gamma'}$ be smooth.
\begin{enumerate}[label=\textup{(\alph*)}]
\item There are a smooth $F\colon\R^n\to\R^m$ with $q'\circ F=f\circ q$, unique up to a constant in $\Gamma'$, and a unique linear map
$A\colon\R^n\to\R^m$, such that
\[
F(x+\gamma)=F(x)+A\gamma\qquad(x\in\R^n,\ \gamma\in\Gamma).
\]
In particular $A\Gamma\subseteq\Gamma'$, and $F-A$ is bounded.
\item If $\Gamma$ is dense in $\R^n$ then $F$ is affine: $F(x)=Ax+c$.
\item If $\Gamma'$ spans $\R^m$ and $f$ is a diffeomorphism, then $n=m$, $A\in\GL_n(\R)$ and $A\Gamma=\Gamma'$.
\end{enumerate}
Consequently two quasi-tori with spanning groups are diffeomorphic if and only if the groups are linearly equivalent:
\[
\R^n/\Gamma\cong\R^n/\Gamma'\iff\Gamma'=A\Gamma\ \text{ for some }A\in\GL_n(\R).
\]
\end{theorem}
\begin{proof}
(a) \emph{Lifting.} The composite $f\circ q$ is a plot of $T_{\Gamma'}$ with simply connected domain, so it lifts through $q'$ to a smooth $F$, unique
up to a constant of $\Gamma'$; this is the argument of \cref{exo:higher-TGamma}. \emph{The homomorphism.} For $\gamma\in\Gamma$, the map
$x\mapsto F(x+\gamma)-F(x)$ is continuous with values in the countable set $\Gamma'$, because both terms lift $f\circ q$. So it is a constant
$\phi(\gamma)$, and $\phi\colon\Gamma\to\Gamma'$ is a homomorphism. \emph{Linearity.} Choose $\gamma_1,\dots,\gamma_n\in\Gamma$ forming a basis of
$\R^n$ and let $A$ be the linear map with $A\gamma_i=\phi(\gamma_i)$. The function $G=F-A$ is invariant under the lattice
$L=\bigoplus\Z\gamma_i$, hence bounded. For $\gamma\in\Gamma$ and $k\in\Z$,
\[
G(x+k\gamma)-G(x)=k\bigl(\phi(\gamma)-A\gamma\bigr),
\]
and the left side is bounded in $k$; so $\phi(\gamma)=A\gamma$. Uniqueness of $A$ is clear since $\Gamma$ spans.
(b) $G=F-A$ is continuous and invariant under the dense subgroup $\Gamma$, hence constant.
(c) Apply (a) to $f^{-1}$ to get $F'$ and $A'$. Then $F'\circ F$ lifts the identity of $T_\Gamma$, so $F'(F(x))=x+\gamma_0$, and comparing the
effect of translating $x$ by $\gamma\in\Gamma$ gives $A'A\gamma=\gamma$. As $\Gamma$ spans, $A'A=\id$; symmetrically $AA'=\id$. So $n=m$, and
$A\Gamma\subseteq\Gamma'$, $A'\Gamma'\subseteq\Gamma$ give $A\Gamma=\Gamma'$. Conversely a linear isomorphism with $A\Gamma=\Gamma'$ descends to a
diffeomorphism, with inverse induced by $A^{-1}$.
\end{proof}
For $\Gamma$ a lattice the theorem recovers the familiar fact that all $n$-tori are diffeomorphic, all lattices in $\R^n$ being linearly
equivalent. Its force is in rank greater than $n$, where the quotient determines the position of $\Gamma$ in $\R^n$ exactly up to
$\GL_n(\R)$. In rank $2$ and dimension $1$:
\begin{corollary}[Donato--Iglesias \cite{DonatoIglesias}; \IZ{Exercise~4}]\label{cor:DI}
Let $\alpha,\beta$ be irrational.
\begin{enumerate}[label=\textup{(\roman*)}]
\item $\cinf(\Tal,T_\beta)\cong\set{\lambda\in\R : \lambda\Lam_\alpha\subseteq\Lam_\beta}\times T_\beta$, a smooth map being $[x]\mapsto[\lambda x+c]$.
\item $\Tal\cong T_\beta$ if and only if $\alpha=\dfrac{a\beta+b}{c\beta+d}$ for some $\begin{pmatrix}a&b\\c&d\end{pmatrix}\in\GL_2(\Z)$.
\item \textup{(Serret; \cite[Thm.~175]{HardyWright})} Equivalently: the continued fraction expansions of $\alpha$ and $\beta$ eventually coincide, up to a shift.
\end{enumerate}
\end{corollary}
\begin{proof}
(i) is \cref{thm:linear-rigidity}(a),(b) with $n=m=1$. (ii) By (c), $\Tal\cong T_\beta$ iff $\lambda\Lam_\alpha=\Lam_\beta$ for some
$\lambda\ne0$, iff $(\lambda,\lambda\alpha)$ is a $\Z$-basis of $\Z+\beta\Z$, iff $\lambda=c\beta+d$ and $\lambda\alpha=a\beta+b$ with
$ad-bc=\pm1$.
\end{proof}
\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small,
cf/.style={draw=hcsteal,fill=hcsmist,minimum width=5.2mm,minimum height=5.2mm,inner sep=0pt,font=\footnotesize},
pre/.style={draw=hcsgrey,fill=white,minimum width=5.2mm,minimum height=5.2mm,inner sep=0pt,font=\footnotesize},
alt/.style={draw=hcsgold,fill=hcssand,minimum width=5.2mm,minimum height=5.2mm,inner sep=0pt,font=\footnotesize}]
\node[anchor=east] at (-0.2,0) {$\sqrt2$}; \node[pre] at (0.3,0) {1}; \foreach \i in {1,...,7} \node[cf] at (0.3+0.55*\i,0) {2};
\node[anchor=east] at (-0.2,-0.7) {$1+\sqrt2$}; \foreach \i in {0,...,7} \node[cf] at (0.3+0.55*\i,-0.7) {2};
\node[anchor=east] at (-0.2,-1.4) {$1/\sqrt2$}; \node[pre] at (0.3,-1.4) {0}; \node[pre] at (0.85,-1.4) {1}; \foreach \i in {2,...,7} \node[cf] at (0.3+0.55*\i,-1.4) {2};
\node[anchor=west,hcsteal,font=\footnotesize] at (4.7,-0.7) {one diffeomorphism class};
\node[anchor=east] at (-0.2,-2.4) {$\sqrt{10}$}; \node[pre] at (0.3,-2.4) {3}; \foreach \i in {1,...,7} \node[cf] at (0.3+0.55*\i,-2.4) {6};
\node[anchor=east] at (-0.2,-3.1) {$\sqrt{10}/2$}; \node[pre] at (0.3,-3.1) {1};
\foreach \i/\v in {1/1,2/1,3/2,4/1,5/1,6/2,7/1} \node[alt] at (0.3+0.55*\i,-3.1) {\v};
\node[anchor=west,hcsrust,font=\footnotesize,align=left] at (4.7,-2.75) {two classes, same field,\\ same endomorphism ring};
\end{tikzpicture}
\caption{Continued fractions as diffeological invariants. Tori whose expansions have a common tail are diffeomorphic (\cref{cor:DI}). The last two rows
are the two classes with real multiplication by $\Z[\sqrt{10}]$, an order of class number~$2$ (\cref{exo:sqrt10}).}\label{fig:cf}
\end{figure}
\section{Endomorphisms, units, and real multiplication}
For irrational $\alpha$ put
\[
\mathcal O_\alpha=\set{\lambda\in\R : \lambda\Lam_\alpha\subseteq\Lam_\alpha},
\]
a subring of $\R$. By \cref{cor:DI}(i) it is the ring of smooth endomorphisms of the group $\Tal$, and also the monoid of smooth self-maps
fixing $0$: on an irrational torus every smooth map is a homomorphism up to translation.
\begin{theorem}[Endomorphisms and diffeomorphisms; after \cite{DonatoIglesias}]\label{thm:units}
\begin{enumerate}[label=\textup{(\roman*)}]
\item If $\alpha$ is not a quadratic irrational, $\mathcal O_\alpha=\Z$.
\item If $A\alpha^2+B\alpha+C=0$ with $A,B,C$ coprime integers and $D=B^2-4AC$, then $\mathcal O_\alpha=\Z+\Z A\alpha$ is the order of discriminant
$D$ in the real quadratic field $\Q(\sqrt D)$.
\item $\Dif(\Tal)\cong\Tal\rtimes\mathcal O_\alpha^\times$ as diffeological groups, with $\mathcal O_\alpha^\times$ discrete. Hence the identity
component of $\Dif(\Tal)$ is the group of translations and
\[
\pi_0\Dif(\Tal)\cong\mathcal O_\alpha^\times\cong\begin{cases}\{\pm1\}&\alpha\text{ not quadratic,}\\ \{\pm1\}\times\Z&\alpha\text{ quadratic.}\end{cases}
\]
\end{enumerate}
\end{theorem}
\begin{proof}
Let $\lambda\in\mathcal O_\alpha$. Then $\lambda=\lambda\cdot1\in\Lam_\alpha$, say $\lambda=x+y\alpha$ with $x,y\in\Z$, and
$\lambda\alpha=x\alpha+y\alpha^2\in\Lam_\alpha$ iff $y\alpha^2\in\Z+\Z\alpha$.
(i) If $y\ne0$ this makes $\alpha$ quadratic. So $y=0$ and $\lambda\in\Z$.
(ii) Here $y\alpha^2=-y(B\alpha+C)/A$, and since $1,\alpha$ are linearly independent over $\Q$ this lies in $\Z+\Z\alpha$ iff $A\mid yB$ and
$A\mid yC$, iff $A\mid y\gcd(B,C)$, iff $A\mid y$ because $\gcd(A,B,C)=1$. So $\mathcal O_\alpha=\Z+\Z A\alpha$. The number $A\alpha$ is a root of
$t^2+Bt+AC$, an algebraic integer of discriminant $D$, so $\Z[A\alpha]$ is the order of discriminant $D$.
(iii) By \cref{cor:DI}(i) every smooth self-map is $[x]\mapsto[\lambda x+c]$ with $\lambda\in\mathcal O_\alpha$, and it is invertible iff
$\lambda\in\mathcal O_\alpha^\times$. This gives the group isomorphism. For the diffeology, let $r\mapsto f_r$ be a plot of $\Dif(\Tal)$ on a ball
$V$. Then $(r,x)\mapsto f_r(q_\alpha(x))$ is a plot of $\Tal$ on the simply connected $V\times\R$; it lifts to a smooth
$F(r,x)=\lambda(r)x+c(r)$, and $\lambda=\partial_xF$ is continuous with values in a countable set, hence constant, while $c$ is smooth.
Conversely such families are plots. So $\Dif(\Tal)\cong\Tal\times\mathcal O_\alpha^\times$ as diffeological spaces with the second factor
discrete, and $\Tal$ is connected. Finally the unit group of an order in a real quadratic field is $\{\pm\varepsilon^k\}$ for a fundamental unit
$\varepsilon>1$, by Dirichlet's unit theorem; equivalently by the solvability of Pell's equation.
\end{proof}
A torus $\Tal$ with $\alpha$ quadratic is said to have \defn{real multiplication} by $\mathcal O_\alpha$, by analogy with complex multiplication of
elliptic curves $\C/\Lam$; the analogy is Manin's \cite{Manin}, and is developed in \cref{ch:crypto}. Geometrically: a quadratic
irrational torus has a hyperbolic symmetry --- multiplication by $\varepsilon$ --- not isotopic to $\pm\id$, and a non-quadratic one has none.
\begin{example}\label{ex:units}
\begin{enumerate}[label=(\alph*)]
\item $\alpha=\varphi=(1+\sqrt5)/2$: $\mathcal O=\Z[\varphi]$, $\varepsilon=\varphi$. On $\pi_1(T_\varphi)=\Z\oplus\Z\varphi$ multiplication by $\varphi$ is
the matrix $\begin{psmallmatrix}0&1\\1&1\end{psmallmatrix}$, and $\varphi^k$ acts by Fibonacci numbers (\cref{exo:golden}).
\item $\alpha=\sqrt2$: $\mathcal O=\Z[\sqrt2]$, $\varepsilon=1+\sqrt2$.
\item $\alpha=\sqrt{79}$: $\mathcal O=\Z[\sqrt{79}]$, $\varepsilon=80+9\sqrt{79}\approx160$. The smallest non-trivial symmetry of $T_{\sqrt{79}}$
stretches by a factor of $160$.
\item $\alpha=\sqrt[3]2$ or $\alpha=\pi$: $\pi_0\Dif(\Tal)=\{\pm1\}$.
\end{enumerate}
\end{example}
\begin{proposition}[Number fields, after \cite{IglesiasLachaud}]\label{prop:number-fields}
Let $K\subset\R$ be a number field of degree $d\ge2$ with $r_1$ real and $r_2$ pairs of complex embeddings, and let $\mathcal O\subset K$ be an order.
Then $T_{\mathcal O}=\R/\mathcal O$ is a one-dimensional diffeological group with
\[
\Pi\,T_{\mathcal O}\simeq\B\Z^d,\qquad\End(T_{\mathcal O})\cong\mathcal O,\qquad\pi_0\Dif(T_{\mathcal O})\cong\mathcal O^\times\cong\{\pm1\}\times\Z^{\,r_1+r_2-1}.
\]
\end{proposition}
\begin{proof}
$\mathcal O$ is free of rank $d\ge2$, hence dense in $\R$, and countable. The shape is \cref{cor:TGamma}. By \cref{thm:linear-rigidity}(b) smooth
self-maps are $[x]\mapsto[\lambda x+c]$ with $\lambda\mathcal O\subseteq\mathcal O$; since $1\in\mathcal O$ this means $\lambda\in\mathcal O$. The
argument of \cref{thm:units}(iii) gives $\pi_0\Dif=\mathcal O^\times$, and Dirichlet's theorem gives its structure, the only roots of unity in a
real field being $\pm1$.
\end{proof}
So the unit rank of a number field with a real place is the rank of the mapping class group of a one-dimensional diffeological space, and the
degree of the field is the rank of its fundamental group. Neither is determined by the D-topology or by the smooth real functions of $\R/\mathcal O$.
\section{Diophantine type and principal \texorpdfstring{$\R$}{R}-bundles}\label{sec:Fl}
We now compute the first obstruction group of \cref{thm:dR-obstruction}, the group $\Fl(\Tal)=H^1(\Tal;\R)$ of isomorphism classes of principal
$\R$-bundles. Write $\norm t$ for the distance from $t\in\R$ to the nearest integer. An irrational $\alpha$ is \defn{Diophantine} if there are
$c>0$ and $\tau\ge1$ with $\norm{n\alpha}\ge c\,\abs n^{-\tau}$ for all $n\ne0$, and \defn{Liouville} otherwise. Almost every real number is
Diophantine, and so is every algebraic irrational, by Liouville's theorem.
\begin{lemma}[The cohomological equation on the line]\label{lem:coboundary-line}
For every $g\in\cinf(\R)$ there is $f\in\cinf(\R)$ with $f(x+1)-f(x)=g(x)$, and $f$ is unique up to a $1$-periodic function. The same holds for
differential forms on $\R$. Hence $H^1(\Z;\Om^p(\R))=0$ and $H^0(\Z;\Om^p(\R))=\Om^p(S^1)$ for the translation action.
\end{lemma}
\begin{proof}
Let $\chi$ be smooth with $\chi=0$ on $(-\infty,0]$ and $\chi=1$ on $[1,\infty)$, and split $g=g_++g_-$ with $g_+=\chi g$ supported in
$[0,\infty)$ and $g_-=(1-\chi)g$ supported in $(-\infty,1]$. Put
\[
f_+(x)=\sum_{k\ge1}g_+(x-k),\qquad f_-(x)=-\sum_{k\ge0}g_-(x+k).
\]
Both sums are locally finite, so $f_\pm$ are smooth, and telescoping gives $f_\pm(x+1)-f_\pm(x)=g_\pm(x)$. Take $f=f_++f_-$. Two solutions differ by
a periodic function. For a $1$-form $g\,\dd x$ use $f\,\dd x$.
\end{proof}
\begin{theorem}[Flows over the irrational torus; Iglesias-Zemmour \cite{IZsmall,IZarith}, \IZ{art.~8.39}]\label{thm:Fl}
Let $\rho_\alpha$ be the rotation $x\mapsto x+\alpha$ of $S^1=\R/\Z$. Then
\[
\Fl(\Tal)\;\cong\;H^1\bigl(\Lam_\alpha;\cinf(\R)\bigr)\;\cong\;\cinf(S^1)\big/(\rho_\alpha^*-1)\,\cinf(S^1)\;=\;\R\,\oplus\,\frac{\cinf_0(S^1)}{(\rho_\alpha^*-1)\cinf(S^1)},
\]
where $\cinf_0$ denotes functions of mean zero and the summand $\R$ is the mean. Moreover:
\begin{enumerate}[label=\textup{(\roman*)}]
\item the summand $\R$ is the group $E_2^{0,1}$ of flat bundles of \cref{prop:E2-Talpha}, and consists of the Kronecker bundle $T^2\to\Tal$ with its
flow run at all constant speeds;
\item the second summand is zero if and only if $\alpha$ is Diophantine;
\item if $\alpha$ is Liouville, the second summand is an infinite-dimensional real vector space.
\end{enumerate}
The automorphism group of every principal $\R$-bundle over $\Tal$ is $\R$.
\end{theorem}
\begin{proof}
\emph{Reduction to group cohomology.} By \cref{cor:bundles-TGamma} with $G=\R$, $\Map(\Tal,\B\R)\simeq(\B\cinf(\R))^{h\Lam_\alpha}$, whose set of
components is $H^1(\Lam_\alpha;\cinf(\R))$ and whose automorphism groups are $H^0(\Lam_\alpha;\cinf(\R))$, the $\Lam_\alpha$-periodic smooth functions,
which are constant. Splitting $\Lam_\alpha=\Z\oplus\Z\alpha$ and using \cref{lem:coboundary-line} for the first factor, the
Lyndon--Hochschild--Serre sequence collapses to $H^1(\Lam_\alpha;\cinf(\R))\cong H^1(\Z\alpha;\cinf(S^1))=\cinf(S^1)/(\rho_\alpha^*-1)$; an elementary
proof is \cref{exo:LHS}. Under this isomorphism a function $g$ corresponds to the cocycle $\tau(m+n\alpha)=\sum_{k=0}^{n-1}g\circ\rho_\alpha^k$ for
$n\ge0$.
\emph{Fourier analysis.} Write $g=\sum_n\hat g_ne^{2\pi inx}$. Then $g=f\circ\rho_\alpha-f$ iff $\hat g_n=(e^{2\pi in\alpha}-1)\hat f_n$ for all $n$. So
a coboundary has $\hat g_0=0$, and for $g$ of mean zero the only candidate is
\[
\hat f_n=\frac{\hat g_n}{e^{2\pi in\alpha}-1}\quad(n\ne0),\qquad 4\norm{n\alpha}\le\abs{e^{2\pi in\alpha}-1}=2\abs{\sin\pi n\alpha}\le2\pi\norm{n\alpha}.
\]
(i) The constant $g=c$ gives $\tau(m+n\alpha)=nc$, the flat bundle $X_\rho$ with holonomy $\rho(m+n\alpha)=nc$; for $c=-1$ this is the Kronecker
bundle by \cref{exo:kronecker-class}, and it is not a coboundary since its mean is not zero.
(ii) If $\norm{n\alpha}\ge c\abs n^{-\tau}$, then $\abs{\hat f_n}\le\abs n^\tau\abs{\hat g_n}/4c$ is rapidly decreasing whenever $\hat g_n$ is, so
every smooth $g$ of mean zero is a coboundary.
(iii) If $\alpha$ is Liouville then for each $k$ there are infinitely many $n$ with $\norm{n\alpha}<n^{-k}$: otherwise the finitely many exceptions
could be absorbed into the constant $c$ and $\alpha$ would be Diophantine with exponent $k$. Choose $n_1<n_2<\cdots$ with
$c_j:=\norm{n_j\alpha}<n_j^{-j}$ and let
\[
g(x)=\sum_j2c_j\cos(2\pi n_jx).
\]
For every $k$, $n_j^kc_j<n_j^{k-j}\to0$, so $g$ is smooth, real, of mean zero. Its formal primitive has
$\abs{\hat f_{n_j}}\ge c_j/(2\pi\norm{n_j\alpha})=1/2\pi$, which does not tend to zero; so there is no smooth $f$, indeed no integrable one.
Splitting $(n_j)$ into infinitely many disjoint infinite subsequences gives functions $g_1,g_2,\dots$ of this kind with disjoint spectra, and any
non-trivial finite combination $\sum a_ig_i$ has a formal primitive with coefficients of modulus at least $\abs{a_i}/2\pi$ along the $i$-th
subsequence. So the classes $[g_i]$ are linearly independent.
\end{proof}
\begin{figure}[t]
\centering
\begin{tikzpicture}
\begin{loglogaxis}[width=11.2cm,height=6.0cm,xmin=0.7,xmax=3e6,ymin=1e-19,ymax=3,
xlabel={$n$},ylabel={$\norm{n\alpha}$},tick label style={font=\footnotesize},label style={font=\small},
legend style={font=\footnotesize,at={(0.5,-0.24)},anchor=north,draw=hcsgrey},legend cell align=left,
axis line style={hcsgrey},grid=major,grid style={hcsgrey!25}]
\addplot[hcsteal,mark=*,mark size=1.3pt,line width=0.6pt] coordinates {(1,3.820e-01) (2,2.361e-01) (3,1.459e-01) (5,9.017e-02) (8,5.573e-02)
(13,3.444e-02) (21,2.129e-02) (34,1.316e-02) (55,8.131e-03) (89,5.025e-03) (144,3.106e-03) (233,1.919e-03) (377,1.186e-03) (610,7.331e-04)
(987,4.531e-04) (1597,2.800e-04) (2584,1.731e-04) (4181,1.070e-04) (6765,6.611e-05) (10946,4.086e-05) (17711,2.525e-05) (28657,1.561e-05)
(46368,9.645e-06) (75025,5.961e-06) (121393,3.684e-06) (196418,2.277e-06) (317811,1.407e-06) (514229,8.697e-07) (832040,5.375e-07)};
\addlegendentry{$\alpha=(1+\sqrt5)/2$: successive minima, $\norm{n\alpha}\sim1/(\sqrt5\,n)$}
\addplot[hcsrust,mark=square*,mark size=1.6pt,line width=0.6pt] coordinates {(1,0.110001) (9,0.009991) (100,1e-4) (9909,9.1e-5) (10009,9e-6) (109999,1e-6) (1000000,1e-18)};
\addlegendentry{$\alpha=\sum_k10^{-k!}$: successive minima}
\addplot[hcsgrey,dashed,domain=1:2e6,samples=2] {1/x};
\addlegendentry{$1/n$}
\end{loglogaxis}
\end{tikzpicture}
\caption{Small divisors. For the golden ratio the successive minima of $\norm{n\alpha}$ stay within a bounded factor of $1/n$: every mean-zero cocycle is a coboundary
and $\Fl(\Tal)=\R$. For Liouville's constant the minima drop abruptly at $n=10^{k!}$; Fourier modes placed at those frequencies give principal
$\R$-bundles over $\Tal$ that are not multiples of the Kronecker bundle. The data are exact computations.}\label{fig:small-divisors}
\end{figure}
\begin{corollary}\label{cor:Fl-algebraic}
If $\alpha$ is an algebraic irrational --- in particular if $\Tal$ has real multiplication --- then $\Fl(\Tal)\cong\R$: every principal $\R$-bundle over
$\Tal$ is trivial or isomorphic to the Kronecker bundle with a rescaled flow.
\end{corollary}
\section{Summary of invariants}
\begin{table}[t]\centering\small
\begin{tabular}{@{}p{4.3cm}p{4.9cm}p{4.2cm}@{}}\toprule
invariant of $\Tal$ & value & dependence on $\alpha$\\\midrule
D-topology; $\cinf(\Tal,\R)$ & indiscrete; $\R$ & none\\
shape $\Pi\Tal$ & $\B\Z^2$ & none\\
$H^\bullet_{\dR}$; $E_2$ page & $(\R,\R,0)$; $H^\bullet(T^2)$ & none\\
diffeomorphism type & $\GL_2(\Z)\cdot\alpha$ & tail of the continued fraction\\
$\End(\Tal)$ & $\mathcal O_\alpha$ & quadratic or not; the order\\
$\pi_0\Dif(\Tal)$ & $\mathcal O_\alpha^\times$ & fundamental unit, regulator\\
$\Fl(\Tal)=H^1(\Tal;\R)$ & $\cinf(S^1)/(\rho_\alpha^*-1)$ & Diophantine or Liouville\\
classes with given $\End$ & $\Pic(\mathcal O)$ (\cref{thm:class-torsor}) & class number\\\bottomrule
\end{tabular}
\caption{The irrational torus as an arithmetic object. The first three rows are independent of $\alpha$; the rest depend on the smooth structure
beyond its shape. Every row is a functor on $\Hh$ evaluated at one object.}\label{tab:invariants}
\end{table}
The chapter is summarised in \cref{tab:invariants}. Continued fractions, Pell's equation and small divisors are classical; $\Tal$ is a single
geometric object of which they are all invariants, in a category where ``invariant'' has its ordinary meaning. In noncommutative geometry the same foliation has the irrational rotation
algebra $A_\alpha$ attached to it, and the first row of arithmetic also appears there: $A_\alpha$ and $A_\beta$ are Morita equivalent exactly when
$\alpha$ and $\beta$ are $\GL_2(\Z)$-equivalent \cite{Rieffel}. The diffeological proof is a covering space argument.
\exercisesheading
\begin{exercise}[label=exo:golden]{1}
Let $\varphi=(1+\sqrt5)/2$. Compute the action of the diffeomorphism $[x]\mapsto[\varphi^kx]$ of $T_\varphi$ on $\pi_1(T_\varphi)$ in the basis $(1,\varphi)$.
\end{exercise}
\begin{solution}
$\pi_1(T_\varphi)=\Lam_\varphi$ and the induced map is multiplication by $\varphi^k$. Since $\varphi^2=\varphi+1$, multiplication by $\varphi$
sends $1\mapsto\varphi$ and $\varphi\mapsto1+\varphi$, with matrix $M=\begin{psmallmatrix}0&1\\1&1\end{psmallmatrix}$ acting on coordinate
columns. By induction $\varphi^k=F_{k-1}+F_k\varphi$ with $F_k$ the Fibonacci numbers, and
$M^k=\begin{psmallmatrix}F_{k-1}&F_k\\F_k&F_{k+1}\end{psmallmatrix}$, of determinant $(-1)^k$. For odd $k$ the diffeomorphism reverses the
orientation of $\pi_1$ although it preserves that of $\R$.
\end{solution}
\begin{exercise}[label=exo:orders]{2}
Compute $\mathcal O_\alpha$ and a generator of $\pi_0\Dif(\Tal)/\{\pm1\}$ for $\alpha=(1+\sqrt3)/2$. What is $\mathcal O_\alpha$ for $\alpha=\sqrt[3]2$?
\end{exercise}
\begin{solution}
$2\alpha-1=\sqrt3$ gives $2\alpha^2-2\alpha-1=0$, so $(A,B,C)=(2,-2,-1)$ is primitive with $D=4+8=12$, and
$\mathcal O_\alpha=\Z+\Z\cdot2\alpha=\Z[1+\sqrt3]=\Z[\sqrt3]$. Note that $\alpha\notin\mathcal O_\alpha$. The fundamental unit of $\Z[\sqrt3]$ is
$2+\sqrt3$, of norm $1$. One checks directly: $(2+\sqrt3)\cdot1=1+2\alpha$ and
$(2+\sqrt3)\alpha=(1+2\alpha)\alpha=\alpha+2\alpha^2=1+3\alpha$, both in $\Lam_\alpha$, with matrix of determinant $1\cdot3-2\cdot1=1$. For
$\alpha=\sqrt[3]2$, which is not quadratic, $\mathcal O_\alpha=\Z$ by \cref{thm:units}(i).
\end{solution}
\begin{exercise}[label=exo:fields]{2}
Show that $T_{\sqrt2}\cong T_{1+\sqrt2}\cong T_{1/\sqrt2}$ and that $T_{\sqrt2}\not\cong T_{\sqrt3}$.
\end{exercise}
\begin{solution}
$1+\sqrt2$ and $1/\sqrt2$ are the images of $\sqrt2$ under $\begin{psmallmatrix}1&1\\0&1\end{psmallmatrix}$ and
$\begin{psmallmatrix}0&1\\1&0\end{psmallmatrix}$, both in $\GL_2(\Z)$; apply \cref{cor:DI}. If $\beta=(a\alpha+b)/(c\alpha+d)$ with integer
coefficients then $\Q(\beta)\subseteq\Q(\alpha)$, and symmetrically; so $\GL_2(\Z)$-equivalent irrationals generate the same field. Since
$\Q(\sqrt2)\ne\Q(\sqrt3)$, the tori are not diffeomorphic. (Indeed there is not even a non-constant smooth map between them, by \cref{cor:DI}(i):
$\lambda$ and $\lambda\sqrt2$ in $\Z+\Z\sqrt3$ with $\lambda\ne0$ would give $\sqrt2\in\Q(\sqrt3)$.)
\end{solution}
\begin{exercise}[label=exo:sqrt10]{3}
Show that $T_{\sqrt{10}}$ and $T_{\sqrt{10}/2}$ have the same endomorphism ring $\Z[\sqrt{10}]$ but are not diffeomorphic.
\end{exercise}
\begin{solution}
For $\alpha=\sqrt{10}$: $(A,B,C)=(1,0,-10)$, $D=40$, $\mathcal O_\alpha=\Z[\sqrt{10}]$. For $\beta=\sqrt{10}/2$: $2\beta^2-5=0$, $(A,B,C)=(2,0,-5)$,
$D=40$, $\mathcal O_\beta=\Z+\Z\cdot2\beta=\Z[\sqrt{10}]$. Suppose $\lambda\Lam_\alpha=\Lam_\beta$. Now $\Lam_\alpha=\Z[\sqrt{10}]=\mathcal O$ and
$2\Lam_\beta=2\Z+\sqrt{10}\Z=:\mathfrak p$, an ideal of $\mathcal O$ of index $2$. So $\mathfrak p=2\lambda\mathcal O$ would be principal, generated by
$\mu=2\lambda=x+y\sqrt{10}\in\mathcal O$ with $\abs{N(\mu)}=[\mathcal O:\mathfrak p]=2$, i.e.\ $x^2-10y^2=\pm2$. Reducing modulo $5$ gives
$x^2\equiv\pm2$, impossible since the squares modulo $5$ are $0,1,4$. Hence no such $\lambda$ exists. In terms of \cref{cor:DI}(iii):
$\sqrt{10}=[3;\overline6]$ and $\sqrt{10}/2=[1;\overline{1,1,2}]$ have different tails. The two tori are related by a smooth homomorphism with
kernel of order $2$ in each direction, but not by a diffeomorphism.
\end{solution}
\begin{exercise}[label=exo:liouville]{3}
For Liouville's constant $\alpha=\sum_{k\ge1}10^{-k!}$, write down an explicit smooth function on $S^1$ of mean zero that is not of the form
$f\circ\rho_\alpha-f$, and describe the corresponding bundle.
\end{exercise}
\begin{solution}
Let $n_j=10^{j!}$. Then $n_j\alpha=\text{integer}+\sum_{k>j}10^{j!-k!}$, so
$\norm{n_j\alpha}=\sum_{k>j}10^{j!-k!}<2\cdot10^{-j\cdot j!}=2n_j^{-j}$. Put $c_j=\norm{n_j\alpha}$ and $g(x)=\sum_j2c_j\cos(2\pi n_jx)$. As in the
proof of \cref{thm:Fl}(iii), $g$ is smooth of mean zero and the Fourier coefficients of a solution $f$ would have modulus at least $1/2\pi$ at the
frequencies $n_j$, contradicting the Riemann--Lebesgue lemma. The bundle is $Y_g=(S^1\times\R)/\Z$ with $1\cdot([x],t)=([x+\alpha],t+g(x))$, with its
projection to $S^1/\rho_\alpha=\Tal$ and the $\R$-action on $t$: a ``skew translation'' of the cylinder. It has a section iff $g$ is a coboundary.
So $Y_g\to\Tal$ is a non-trivial principal $\R$-bundle with zero mean, hence not isomorphic to any rescaling of $T^2\to\Tal$, and by
\cref{exo:IZ830} it is not flat.
\end{solution}
\begin{exercise}[label=exo:LHS]{4}
Prove, without spectral sequences, that $H^1(\Lam_\alpha;\cinf(\R))\cong\cinf(S^1)/(\rho_\alpha^*-1)\cinf(S^1)$.
\end{exercise}
\begin{solution}
Write $M=\cinf(\R)$ with $\Lam_\alpha$ acting by $(T_\lambda^*h)(x)=h(x+\lambda)$. A $1$-cocycle is a map $\tau\colon\Lam_\alpha\to M$ with
$\tau(\lambda+\lambda')=T_{\lambda'}^*\tau(\lambda)+\tau(\lambda')$; coboundaries are $\delta\sigma(\lambda)=T_\lambda^*\sigma-\sigma$.
\emph{Normalisation.} By \cref{lem:coboundary-line} there is $\sigma\in M$ with $\tau(1)=T_1^*\sigma-\sigma$. Replacing $\tau$ by $\tau-\delta\sigma$
we may assume $\tau(1)=0$; the remaining freedom is to subtract $\delta\sigma$ with $T_1^*\sigma=\sigma$, i.e.\ $\sigma\in\cinf(S^1)$.
\emph{The invariant.} Computing $\tau(1+\alpha)$ in the two orders,
\[
T_\alpha^*\tau(1)+\tau(\alpha)=\tau(1+\alpha)=T_1^*\tau(\alpha)+\tau(1),
\]
so with $\tau(1)=0$ the function $g=\tau(\alpha)$ is $1$-periodic: $g\in\cinf(S^1)$. The cocycle identity then forces $\tau(m)=0$ and
$\tau(m+n\alpha)=\tau(n\alpha)=\sum_{k=0}^{n-1}T_{k\alpha}^*g$ for $n\ge0$, with $\tau(-n\alpha)=-T_{-n\alpha}^*\tau(n\alpha)$. So a normalised
cocycle is determined by $g$.
\emph{Existence.} Conversely, for any $g\in\cinf(S^1)$ these formulas define a cocycle: the identity for the subgroup $\Z\alpha$ is the usual
telescoping for a $\Z$-cocycle with values in the $\Z\alpha$-module $\cinf(S^1)$, and translation by integers acts trivially on the values, so the
extension by $\tau(m+n\alpha)=\tau(n\alpha)$ is consistent.
\emph{Coboundaries.} A normalised $\tau$ is changed by an allowed $\delta\sigma$, $\sigma\in\cinf(S^1)$, to one with
$g'=g-(T_\alpha^*\sigma-\sigma)=g-(\rho_\alpha^*-1)\sigma$. So $\tau\mapsto[g]$ is a well-defined bijection from $H^1(\Lam_\alpha;M)$ to
$\cinf(S^1)/(\rho_\alpha^*-1)\cinf(S^1)$, and it is additive.
Geometrically the normalisation step trivialises the pullback of the bundle to the circle $\R/\Z$, which covers $\Tal$ with group $\Z$
(\cref{exo:Z-bundles}), and $g$ is the clutching function of the bundle over $\Tal=S^1/\rho_\alpha$. This is the reduction in \IZ{art.~8.39}.
\end{solution}
\chapter{Cryptography: real multiplication, class groups, lattices}\label{ch:crypto}
\chaptermark{Cryptography}
\begin{chapabstract}
Irrational tori are analogues of elliptic curves without a complex structure: they have isogenies, degrees, torsion subgroups and, in the quadratic
case, real multiplication. We show that tori with real multiplication by a fixed order form a torsor under its class group, that deciding
diffeomorphism between them is the principal ideal problem, and that the infrastructure of a real quadratic field is a circle of marked tori. We
then treat lattices proper through their moduli orbifold, where the search and decision forms of the lattice isomorphism problem become the
stack and its coarse space.
\end{chapabstract}
\source{The geometry used is \IZ{Exercise~4}, \IZ{art.~4.17--4.18} and \cref{ch:number-theory}. The real-multiplication viewpoint is
Manin's \cite{Manin}.}
\section{Isogenies of irrational tori}
A \defn{pseudolattice} is a subgroup $\Lam\subset\R$ of rank $2$ that is not cyclic, equivalently $\Lam=\Z\omega_1+\Z\omega_2$ with
$\omega_1/\omega_2$ irrational \cite{Manin}. Every irrational torus is $T_\Lam=\R/\Lam$ for a pseudolattice, and $T_\Lam\cong T_{\omega_2/\omega_1}$. An
\defn{isogeny} $T_\Lam\to T_{\Lam'}$ is a non-constant smooth homomorphism.
\begin{proposition}[Isogenies]\label{prop:isogenies}
\begin{enumerate}[label=\textup{(\roman*)}]
\item $\Lam\mapsto T_\Lam$ is an equivalence from the category of pseudolattices, with morphisms $\Hom(\Lam,\Lam')=\set{\lambda\in\R : \lambda\Lam\subseteq\Lam'}$,
to the category of irrational tori and smooth homomorphisms.
\item An isogeny $\lambda$ is surjective, with finite kernel $\lambda^{-1}\Lam'/\Lam\cong\Lam'/\lambda\Lam$ of order $\deg\lambda:=[\Lam':\lambda\Lam]$,
and it is a covering map. Degrees are multiplicative.
\item Every isogeny $\lambda$ has a dual $\hat\lambda=\deg(\lambda)/\lambda\colon T_{\Lam'}\to T_\Lam$ with $\hat\lambda\lambda=[\deg\lambda]$. So
isogeny is an equivalence relation.
\item The $N$-torsion subgroup is $T_\Lam[N]=\tfrac1N\Lam/\Lam\cong(\Z/N)^2$.
\end{enumerate}
\end{proposition}
\begin{proof}
(i) is \cref{cor:DI}(i): smooth homomorphisms are multiplications by real numbers preserving the groups. (ii) $\lambda\Lam$ and $\Lam'$ both have rank
$2$, so the index is finite; $x\mapsto\lambda x$ is onto $\R$; the kernel of the induced map is as stated, and it is a principal bundle for this finite
group by \cref{cor:GmodH}. (iii) $\deg(\lambda)\cdot\Lam'\subseteq\lambda\Lam$ because a finite abelian group is annihilated by its order, so
$(\deg\lambda/\lambda)\Lam'\subseteq\Lam$. (iv) is the kernel of multiplication by $N$.
\end{proof}
\begin{table}[t]\centering\small
\begin{tabular}{@{}p{3.6cm}p{4.9cm}p{4.9cm}@{}}\toprule
& elliptic curve $E=\C/\Lam$ & irrational torus $T=\R/\Lam$\\\midrule
lattice & discrete, rank $2$ in $\C$ & dense, rank $2$ in $\R$\\
category & complex manifolds & diffeological spaces\\
morphisms & $\lambda\in\C$, $\lambda\Lam\subseteq\Lam'$ & $\lambda\in\R$, $\lambda\Lam\subseteq\Lam'$\\
$N$-torsion & $(\Z/N)^2$ & $(\Z/N)^2$\\
moduli & $\SL_2(\Z)\backslash\mathfrak H$ & $\GL_2(\Z)\backslash(\R\smallsetminus\Q)$\\
extra endomorphisms & imaginary quadratic order (CM) & real quadratic order (RM)\\
unit group of the order & finite & $\{\pm1\}\times\Z$\\
classes with given order & torsor under $\Pic(\mathcal O)$ & torsor under $\Pic(\mathcal O)$\\
shape & $\B\Z^2$ & $\B\Z^2$\\\bottomrule
\end{tabular}
\caption{Complex and real multiplication. The right-hand column is a theorem-by-theorem translation of the left; the differences are in the last
rows, and they are what matters for cryptography.}\label{tab:CMRM}
\end{table}
\section{The class group torsor}
Fix a real quadratic field $K\subset\R$ and an order $\mathcal O\subset K$ of discriminant $D$. For a pseudolattice $\Lam$ write
$\mathcal O_\Lam=\set{\lambda\in\R:\lambda\Lam\subseteq\Lam}=\End(T_\Lam)$. Let $\mathcal T(\mathcal O)$ be the set of diffeomorphism classes of
irrational tori $T_\Lam$ with $\mathcal O_\Lam=\mathcal O$, and let $\Pic(\mathcal O)$ be the group of invertible fractional $\mathcal O$-ideals modulo
principal ones.
\begin{theorem}[Tori with real multiplication; after \cite{Manin,IglesiasLachaud}]\label{thm:class-torsor}
\begin{enumerate}[label=\textup{(\roman*)}]
\item Every pseudolattice with $\mathcal O_\Lam=\mathcal O$ is homothetic to an invertible fractional ideal of $\mathcal O$, and
$\Lam\mapsto[\Lam]$ induces a bijection $\mathcal T(\mathcal O)\cong\Pic(\mathcal O)$. In particular there are exactly $h(\mathcal O)$ diffeomorphism
classes of irrational tori with real multiplication by $\mathcal O$.
\item $\Pic(\mathcal O)$ acts simply transitively on $\mathcal T(\mathcal O)$ by $[\mathfrak a]\cdot[T_\Lam]=[T_{\mathfrak a^{-1}\Lam}]$. For an integral
invertible ideal $\mathfrak a$ the canonical map
\[
\phi_{\mathfrak a}\colon T_\Lam\longrightarrow T_{\mathfrak a^{-1}\Lam}
\]
is an isogeny of degree $N(\mathfrak a)$ with kernel $T_\Lam[\mathfrak a]=\set{x:\mathfrak a x=0}$.
\item Every isogeny between tori with real multiplication by $\mathcal O$ is, up to diffeomorphism of its target, some $\phi_{\mathfrak a}$.
\end{enumerate}
\end{theorem}
\begin{proof}
(i) Scale $\Lam$ so that $1\in\Lam$, say $\Lam=\Z+\Z\alpha$. Then $\mathcal O_\Lam=\mathcal O_\alpha\ne\Z$, so by \cref{thm:units} $\alpha$ is
quadratic, $\Q(\alpha)=K$, and $\Lam\subset K$ is a lattice with multiplier ring $\mathcal O$. In a quadratic order such a lattice is an invertible
fractional ideal (\cref{exo:proper-invertible}). If $\lambda\Lam=\Lam'$ with both in $K$ then $\lambda\in K^\times$. So homothety classes of
pseudolattices with multiplier ring $\mathcal O$ are classes of invertible ideals modulo $K^\times$, and by \cref{thm:linear-rigidity} homothety classes
are diffeomorphism classes. (ii) Multiplication by an invertible ideal preserves the multiplier ring, and the action of a group on itself is simply
transitive. If $\mathfrak a\subseteq\mathcal O$ then $\Lam\subseteq\mathfrak a^{-1}\Lam$ with index $N(\mathfrak a)$, and the identity of $\R$ induces
$\phi_{\mathfrak a}$ with kernel $\mathfrak a^{-1}\Lam/\Lam=\set{x\in\R/\Lam:\mathfrak ax\subseteq\Lam}$. (iii) If $\lambda\Lam\subseteq\Lam'$ then
$\mathfrak a=\lambda\Lam\cdot\Lam'^{-1}$ is an integral invertible ideal and $\Lam'=\mathfrak a^{-1}(\lambda\Lam)$; multiplication by $\lambda$ is a
diffeomorphism $T_\Lam\to T_{\lambda\Lam}$.
\end{proof}
This is the exact analogue of the main theorem of complex multiplication for elliptic curves over $\C$, with the same proof. The diffeological
input is \cref{thm:linear-rigidity}, by which the category in which these objects are classified is the ordinary category of smooth
spaces.
\begin{example}[Two small isogeny graphs]\label{ex:isogeny-graphs}
\begin{enumerate}[label=(\alph*)]
\item $D=5$, $\mathcal O=\Z[\varphi]$, $h=1$: the golden torus is the only torus with real multiplication by $\Z[\varphi]$.
\item $D=40$, $\mathcal O=\Z[\sqrt{10}]$, $h=2$: the two classes are $T_{\sqrt{10}}$ and $T_{\sqrt{10}/2}$ (\cref{exo:sqrt10}). The primes
$\mathfrak p_2=(2,\sqrt{10})$ and $\mathfrak p_3=(3,1+\sqrt{10})$ are both non-principal, so isogenies of degree $2$ and $3$ interchange the two tori.
\item $D=316$, $\mathcal O=\Z[\sqrt{79}]$, $h=3$: the three classes are $T_{\sqrt{79}}$, $T_{(1+\sqrt{79})/3}$ and $T_{(-1+\sqrt{79})/3}$, permuted
cyclically by the two primes above $3$ (\cref{fig:isogeny}, \cref{exo:79}).
\end{enumerate}
\end{example}
\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
\begin{scope}
\node[hcsnode,align=center] (a) at (90:2.0) {$T_{\sqrt{79}}$\\[-0.3ex]\scriptsize $[8;\overline{1,7,1,16}]$};
\node[hcsnode,align=center] (b) at (210:2.3) {$T_{(1+\sqrt{79})/3}$\\[-0.3ex]\scriptsize $[3;\overline{3,2,1,1,1,5}]$};
\node[hcsnode,align=center] (c) at (330:2.3) {$T_{(-1+\sqrt{79})/3}$\\[-0.3ex]\scriptsize $[2;\overline{1,1,1,2,3,5}]$};
\draw[->,hcsrust,line width=0.7pt] (a) to[bend right=14] node[left,font=\footnotesize]{$\phi_{\mathfrak p}$} (b);
\draw[->,hcsrust,line width=0.7pt] (b) to[bend right=14] node[below,font=\footnotesize]{$\phi_{\mathfrak p}$} (c);
\draw[->,hcsrust,line width=0.7pt] (c) to[bend right=14] node[right,font=\footnotesize]{$\phi_{\mathfrak p}$} (a);
\node[font=\footnotesize,align=center] at (0,-2.55) {$3$-isogeny graph, $\mathfrak p=(3,-1+\sqrt{79})$, $[\mathfrak p]^3=1$};
\end{scope}
\begin{scope}[xshift=8.9cm]
\draw[hcsteal,line width=0.9pt] (0,0) circle (1.75);
\foreach \ang in {0,8.4,155.4,159.5}{\fill[hcsrust] (\ang:1.75) circle (2.0pt);}
\node[right] at (-2:1.85) {$\mathcal O$};
\node[right,font=\footnotesize] at (11:1.85) {$\alpha_1\mathcal O$};
\node[left,font=\footnotesize] at (157.5:1.85) {two reduced ideals};
\draw[->,hcsgrey] (25:1.35) arc (25:140:1.35);
\node[font=\footnotesize,hcsgrey] at (0,0.35) {$\log\abs\lambda$};
\node[font=\footnotesize,align=center] at (0,-2.55) {infrastructure of $\Z[\sqrt{79}]$:\\ circumference $R=\log(80+9\sqrt{79})\approx5.075$};
\end{scope}
\end{tikzpicture}
\caption{Left: the three irrational tori with real multiplication by $\Z[\sqrt{79}]$, with the continued fraction of a representative, and the
cyclic action of an ideal of norm $3$. Right: the circle of marked tori homothetic to $\R/\mathcal O$ (\cref{prop:infrastructure}), with the four
reduced principal ideals at their exact positions $0$, $0.119$, $2.191$ and $2.249$ (successive ideals differ by the complete quotients of the
continued fraction of $8+\sqrt{79}$).}\label{fig:isogeny}
\end{figure}
\section{Diffeomorphism is the principal ideal problem}
Present a torus with real multiplication by the primitive integer form $(A,B,C)$ of discriminant $D$ with root $\alpha=(-B+\sqrt D)/2A$; this takes
$O(\log D)$ bits. Then $A\Lam_\alpha=A\Z+\tfrac{-B+\sqrt D}2\Z$ is an invertible ideal of $\mathcal O_D$, and every ideal class arises.
\begin{theorem}[Complexity dictionary]\label{thm:complexity}
Fix a non-square discriminant $D>0$ and let $R_D=\log\varepsilon_D$ be the regulator of $\mathcal O_D$.
\begin{enumerate}[label=\textup{(\alph*)}]
\item The problem of deciding whether $\Tal\cong T_\beta$ for two tori presented by forms of discriminant $D$ is equivalent, under linear-time
reductions in both directions, to deciding equality of two classes in $\Pic(\mathcal O_D)$. Finding the diffeomorphism $\lambda$, in the sense
of approximating $\log\abs\lambda$ modulo $R_D$, is equivalent to the principal ideal problem for $\mathcal O_D$.
\item Computing a generator of $\pi_0\Dif(\Tal)/\{\pm1\}\cong\Z$, in the sense of approximating its dilation factor, is equivalent to computing
$R_D$, that is, to solving Pell's equation.
\item Consequently both problems are solvable in quantum polynomial time in $\log D$ \cite{Hallgren}. The best known classical algorithms are
subexponential; and integer factoring reduces to \textup{(b)} \cite{Hallgren}.
\end{enumerate}
\end{theorem}
\begin{proof}
(a) By \cref{thm:linear-rigidity} and \cref{thm:class-torsor}, $\Tal\cong T_\beta$ iff $\lambda\Lam_\alpha=\Lam_\beta$ for some $\lambda\in K^\times$, iff the
ideals $A\Lam_\alpha$ and $A'\Lam_\beta$ are equivalent, and $\lambda$ is, up to the rational factor $A/A'$ and a unit, a generator of the principal
ideal $A'\Lam_\beta(A\Lam_\alpha)^{-1}$. The translation between forms, tori and ideals is a relabelling of the input. (b) By
\cref{thm:units}(iii) the generator is multiplication by $\varepsilon_D$. (c) Hallgren's algorithms compute $R_D$ and solve the principal ideal
problem in real quadratic orders in quantum polynomial time.
\end{proof}
The theorem locates real-quadratic cryptography on the geometric side.
\begin{proposition}[The infrastructure is a circle of marked tori]\label{prop:infrastructure}
Fix a class $c\in\Pic(\mathcal O)$. The set of pseudolattices $\Lam\subset\R$ in the class $c$, not taken up to homothety, is a torsor under
\[
\R^\times/\mathcal O^\times\;\cong\;\R_{>0}/\varepsilon^{\Z}\;\xrightarrow[\ \log\ ]{\ \cong\ }\;\R/R_D\Z ,
\]
a circle of circumference the regulator. Equivalently it is the set of isomorphism classes of \emph{marked} tori $(\R\to T)$ in the
diffeomorphism class $c$, where a marking is a choice of universal covering by $\R$ up to translation.
\end{proposition}
\begin{proof}
$\R^\times$ acts on lattices by homothety, transitively on a class by definition, and the stabiliser of $\Lam$ is $\set{\lambda:\lambda\Lam=\Lam}=\mathcal O^\times=\{\pm\varepsilon^k\}$.
A marked torus is the same as the subgroup $\Lam=\ker(\R\to T)$, since translations do not change it.
\end{proof}
The finitely many \emph{reduced} ideals in the class are distinguished points on this circle; Shanks called the circle with these points the
\emph{infrastructure} of the class \cite{Shanks}. Multiplying two reduced ideals and reducing lands near the sum of their positions, so one can
take large steps around the circle without knowing its circumference. Buchmann and Williams built a Diffie--Hellman key exchange on this
\cite{BuchmannWilliams}: the parties exchange reduced ideals near positions $a\delta$ and $b\delta$ and share the one near $ab\delta$; an
eavesdropper who can compute positions --- that is, solve the principal ideal problem --- recovers the key. In our terms: \emph{the
Buchmann--Williams scheme is Diffie--Hellman in the circle group of marked tori diffeomorphic to $\R/\mathcal O$, with elements represented by
nearby tori of small height and the circumference $R_D$ kept implicit.} Hallgren's algorithm computes the circumference and the positions, and
breaks it.
\section{Lattices}
For lattices of full rank, all quotients $\R^n/L$ are diffeomorphic by \cref{thm:linear-rigidity}. The object of lattice cryptography is the
Euclidean structure, and the natural diffeological object is the moduli space of lattices. Let $\mathcal S_n$ be the open cone of positive definite symmetric $n\times n$ matrices, on which $\GL_n(\Z)$
acts by $Q\cdot U=U^{\mathsf T}QU$; two Gram matrices are in the same orbit iff they come from isometric lattices. The \emph{lattice isomorphism problem}
(LIP) is: given $Q,Q'$, find a $U$ with $Q'=U^{\mathsf T}QU$ \cite{DucasVanWoerden}.
\begin{theorem}[The orbifold of lattices]\label{thm:lattice-orbifold}
Let $\mathfrak L_n=\mathcal S_n/\GL_n(\Z)$ with the quotient diffeology, and $\Aut(Q)=\set{U\in\GL_n(\Z):U^{\mathsf T}QU=Q}$.
\begin{enumerate}[label=\textup{(\roman*)}]
\item $\mathfrak L_n$ is a diffeological orbifold of dimension $n(n+1)/2$. Near $[Q]$ it is diffeomorphic to $\Sym_n(\R)/\bar\Gamma_Q$, where
$\bar\Gamma_Q=\Aut(Q)/\{\pm1\}$ acts linearly by $S\mapsto U^{\mathsf T}SU$.
\item The conjugacy class of the linear group $\bar\Gamma_Q$ is an invariant of the germ of $\mathfrak L_n$ at $[Q]$. In particular $[Q]$ is a
manifold point of $\mathfrak L_n$ if and only if $\Aut(Q)=\{\pm1\}$.
\item In $\Hh$ there are canonical maps $\mathcal S_n\hquot\GL_n(\Z)\to\mathcal S_n\hquot\PGL_n(\Z)\to\mathfrak L_n$. The first is a
$\B\Z/2$-bundle, the second is an isomorphism over the manifold points. Decision-LIP is equality of points of $\mathfrak L_n$; search-LIP is the
construction of a $1$-morphism $Q\to Q'$ in the stack $\mathcal S_n\hquot\GL_n(\Z)$; and the set of solutions is a torsor under $\Aut(Q)$.
\end{enumerate}
\end{theorem}
\begin{proof}
(i) The action is properly discontinuous: if $Q$ and $U^{\mathsf T}QU$ range over a compact subset of $\mathcal S_n$ then $\norm U$ is bounded, so only
finitely many integer matrices $U$ occur. Hence stabilisers are finite and every $Q$ has an $\Aut(Q)$-invariant open neighbourhood $W$ with
$W\cdot U\cap W=\varnothing$ for $U\notin\Aut(Q)$. The saturation of $W$ is open, so its image is D-open in the quotient and is diffeomorphic to
$W/\Aut(Q)$. The action on $\Sym_n(\R)\supset\mathcal S_n$ is linear and fixes $Q$; translating by $-Q$ identifies $W/\Aut(Q)$ with a neighbourhood of
$0$ in $\Sym_n(\R)/\Aut(Q)$. The kernel of $\GL_n(\Z)\to\GL(\Sym_n(\R))$ is $\{\pm1\}$, so the effective group is $\bar\Gamma_Q$.
(ii) is \cref{thm:IKZ} and \cref{cor:manifold-point}. (iii) is \cref{thm:three-quotients}: the action of $\PGL_n(\Z)$ is free exactly over the points with
$\bar\Gamma_Q=1$, and $\Hom(Q,Q')=\set{U:Q'=U^{\mathsf T}QU}$ is a torsor under the automorphism group of $Q$ when it is non-empty.
\end{proof}
In this language a public key in an LIP-based scheme is a point of the stack with a hidden $1$-morphism to a distinguished object, and the
structure group at that object measures how many secret keys there are. For the lattice $\Z^n$, used in the signature scheme \textsc{Hawk}
\cite{Hawk} in a module form, $\Aut(I_n)$ is the hyperoctahedral group of order $2^nn!$, the most singular kind of point; a generic $Q$ is a manifold
point with $\Aut(Q)=\{\pm1\}$. The distinction between the stack and the orbifold $\mathfrak L_n$ is the distinction between search and decision:
equality of points of the coarse space is the \emph{existence} of an equivalence of forms, and a $1$-cell of the stack is a \emph{choice} of one. The zero-knowledge proofs of \cite{DucasVanWoerden} are
proofs of knowledge of a $1$-cell in which only its endpoints are disclosed.
For subgroups of rank larger than the dimension the diffeology of the quotient is again informative.
\begin{corollary}[Projected lattices]\label{cor:projected}
Let $B,B'$ be real $n\times N$ matrices of rank $n$ that are injective on $\Z^N$. Then
\begin{align*}
\R^n/B\Z^N\cong\R^n/B'\Z^N&\iff B'=ABU\ \text{ for some }A\in\GL_n(\R),\ U\in\GL_N(\Z)\\
&\iff\ker B'=U^{-1}\ker B\ \text{ for some }U\in\GL_N(\Z).
\end{align*}
So diffeomorphism classes of such quasi-tori correspond to $\GL_N(\Z)$-orbits of $(N-n)$-dimensional subspaces of $\R^N$ meeting $\Z^N$ trivially.
\end{corollary}
\begin{proof}
By \cref{thm:linear-rigidity} the quotients are diffeomorphic iff $B'\Z^N=AB\Z^N$ for some $A$; as $B'$ and $AB$ are injective on $\Z^N$ with the
same image there is a unique $U\in\GL_N(\Z)$ with $B'=ABU$. A matrix of rank $n$ is determined up to left multiplication by $\GL_n(\R)$ by its kernel.
\end{proof}
\section{The geometric picture}\label{sec:crypto-picture}
Three things usually treated separately are here objects of one category: the class group action (isogenies of tori), the
infrastructure (marked tori), and the search/decision distinction for isomorphism problems (stack versus coarse space).
Two facts about sizes orient the picture. Isogeny-based schemes such as CSIDH \cite{CSIDH} use the action of a large imaginary quadratic class
group, of size about $\sqrt{\abs D}$, as a hard homogeneous space \cite{Couveignes}. For real quadratic orders it is the product $h\cdot R$ that
has this size, and heuristically the class number $h$ is usually small \cite{Cohen}. So the torsor of \cref{thm:class-torsor} is small and the
bulk of the structure is in the circle of \cref{prop:infrastructure}, which is where period finding applies (\cref{thm:complexity}). For
lattices, the Euclidean geometry used in cryptography is that of $\mathcal S_n$ and of the fibres of $\mathcal S_n\to\mathfrak L_n$, and the
isomorphism problem is the problem of equality of points of the orbifold $\mathfrak L_n$.
\exercisesheading
\begin{exercise}[label=exo:torsion]{1}
Show that multiplication by $N$ on an irrational torus has degree $N^2$, and that for $\lambda\in\mathcal O_\Lam$ the endomorphism $\lambda$ of
$T_\Lam$ has degree $\abs{N_{K/\Q}(\lambda)}$ when $\Lam$ has real multiplication.
\end{exercise}
\begin{solution}
$[\Lam:N\Lam]=N^2$ since $\Lam\cong\Z^2$. In general $\deg\lambda=[\Lam:\lambda\Lam]$ is the absolute value of the determinant of multiplication by
$\lambda$ on $\Lam\cong\Z^2$, which is the norm of $\lambda$ as an element of the quadratic field (the determinant of multiplication by $\lambda$
on $K=\Lam\otimes\Q$).
\end{solution}
\begin{exercise}[label=exo:sqrt5]{2}
On the golden torus $T_\varphi$, compute the degree and kernel of multiplication by $\sqrt5=2\varphi-1$, and of multiplication by $\varphi$.
\end{exercise}
\begin{solution}
$N(\sqrt5)=-5$, so the degree is $5$ and the kernel is $\tfrac1{\sqrt5}\Z[\varphi]/\Z[\varphi]\cong\Z[\varphi]/(\sqrt5)\cong\Z/5$, generated by
the class of $1/\sqrt5$. $N(\varphi)=-1$, so multiplication by $\varphi$ has degree $1$: it is the diffeomorphism of \cref{exo:golden}. The prime $5$
ramifies in $\Z[\varphi]$, and $T_\varphi[\sqrt5]$ is the unique subgroup of $T_\varphi[5]\cong(\Z/5)^2$ stable under real multiplication.
\end{solution}
\begin{exercise}[label=exo:79]{2}
Verify \cref{ex:isogeny-graphs}(c): the ideal $\mathfrak p=(3,-1+\sqrt{79})$ of $\Z[\sqrt{79}]$ is not principal, and $\mathfrak p^3$ is.
\end{exercise}
\begin{solution}
$N(\mathfrak p)=3$. If $\mathfrak p=(x+y\sqrt{79})$ then $x^2-79y^2=\pm3$. By a theorem of Lagrange, a solution of $\abs{x^2-dy^2}<\sqrt d$ in coprime
integers has $x/y$ a convergent of $\sqrt d$. For $\sqrt{79}=[8;\overline{1,7,1,16}]$ the values $p^2-79q^2$ along the convergents are periodic and
equal to $-15,2,-15,1$; so $\pm3$ is not represented. On the other hand $17^2-79\cdot2^2=-27$, so $\mu=17+2\sqrt{79}$ has norm $-27$. The ideal
$(\mu)$ has norm $27$ and is not divisible by $(3)=\mathfrak p\bar{\mathfrak p}$, because $\mu/3\notin\Z[\sqrt{79}]$; so it is $\mathfrak p^3$ or
$\bar{\mathfrak p}^3$, and either way $[\mathfrak p]^3=1$. Hence $[\mathfrak p]$ has order exactly $3$. The three ideal classes $1,[\mathfrak p],[\mathfrak p]^2$
are represented by the pseudolattices $\Z+\sqrt{79}\Z$, $\tfrac13\mathfrak p=\Z+\tfrac{-1+\sqrt{79}}3\Z$ and $\tfrac13\bar{\mathfrak p}=\Z+\tfrac{1+\sqrt{79}}3\Z$,
whose continued fractions have three different periods, in accordance with \cref{cor:DI}(iii).
\end{solution}
\begin{exercise}[label=exo:isogeny-classes]{3}
Show that $\Tal$ and $T_\beta$ are isogenous if and only if $\beta=(a\alpha+b)/(c\alpha+d)$ for an integer matrix of non-zero determinant. Deduce
that the tori with real multiplication fall into one isogeny class for each real quadratic field, and that an isogeny class of tori without real
multiplication contains infinitely many diffeomorphism classes.
\end{exercise}
\begin{solution}
An isogeny is a $\lambda\ne0$ with $\lambda\Lam_\alpha\subseteq\Lam_\beta$: $\lambda=c'\beta+d'$ and $\lambda\alpha=a'\beta+b'$ with integers such
that $a'd'-b'c'\ne0$ (otherwise $\alpha$ would be rational). So $\alpha$ is the image of $\beta$ under a matrix in $\GL_2(\Q)\cap M_2(\Z)$, and
inverting, $\beta$ is the image of $\alpha$ under such a matrix. The converse is the same computation backwards. If $\alpha$ is quadratic, its
$\GL_2(\Q)$-orbit is $K\smallsetminus\Q$ for $K=\Q(\alpha)$: any $\beta\in K\smallsetminus\Q$ is $a\alpha+b$ with $a\ne0$ rational, hence the image
of $\alpha$ under a matrix with integer entries after clearing denominators. So there is one isogeny class per field, and it contains tori with all the orders of $K$ as
endomorphism rings. If $\alpha$ is not quadratic, the stabiliser of $\alpha$ in $\mathrm{PGL}_2(\Q)$ is trivial, so the isogeny class is in
bijection with $\mathrm{PGL}_2(\Q)$ and the diffeomorphism classes in it with $\PGL_2(\Z)\backslash\mathrm{PGL}_2(\Q)$, which is infinite: for
instance the tori $T_{p\alpha}$, $p$ prime, are pairwise non-diffeomorphic.
\end{solution}
\begin{exercise}[label=exo:L2]{3}
Describe the local structure of $\mathfrak L_2$ at the square lattice $Q=I_2$ and at the hexagonal lattice $Q=\begin{psmallmatrix}2&1\\1&2\end{psmallmatrix}$.
Is $\mathfrak L_2$ a manifold with corners near $[I_2]$?
\end{exercise}
\begin{solution}
Use coordinates $S=\begin{psmallmatrix}a&b\\b&c\end{psmallmatrix}$ on $\Sym_2(\R)\cong\R^3$. $\Aut(I_2)$ is the group of signed permutation
matrices, of order $8$, so $\bar\Gamma=\Aut/\{\pm1\}$ has order $4$. It is generated by $\mathrm{diag}(1,-1)$, acting as $(a,b,c)\mapsto(a,-b,c)$, and the
swap, acting as $(a,b,c)\mapsto(c,b,a)$: two commuting reflections, in the planes $b=0$ and $a=c$. So near $[I_2]$,
$\mathfrak L_2\cong\R\times(\R/\{\pm1\})\times(\R/\{\pm1\})=\R\times\dten_1\times\dten_1$. For the hexagonal lattice $\Aut$ has order $12$ and
$\bar\Gamma\cong S_3$ of order $6$, generated by reflections, with local model $\R\times(\R^2/S_3)$. These are the orbifold points $i$ and
$e^{i\pi/3}$ of the modular curve, times the scale. Topologically a neighbourhood of $[I_2]$ is $\R$ times a quadrant, but it is not a manifold
with corners: $\dten_1\not\cong[0,\infty)_{\Sub}$ by \cref{prop:delta1}, and the structure group $(\Z/2)^2$ is an invariant by
\cref{thm:lattice-orbifold}(ii). So the diffeology of the moduli space determines that the boundary of the quadrant consists of mirror points.
\end{solution}
\begin{exercise}[label=exo:proper-invertible]{4}
Let $\alpha$ be a quadratic irrational with primitive equation $A\alpha^2+B\alpha+C=0$, $\Lam=\Z+\Z\alpha$ and $\mathcal O=\Z+\Z A\alpha$. Prove that
$\Lam$ is an invertible fractional $\mathcal O$-ideal, and complete the proof of \cref{thm:class-torsor}(i).
\end{exercise}
\begin{solution}
Let $\bar\alpha$ be the conjugate and $\bar\Lam=\Z+\Z\bar\alpha$; then $\alpha+\bar\alpha=-B/A$ and $\alpha\bar\alpha=C/A$. $\Lam$ is an
$\mathcal O$-module by \cref{thm:units}(ii), and so is $\bar\Lam$, as $\bar{\mathcal O}=\mathcal O$. Compute the product of lattices:
\begin{align*}
\Lam\bar\Lam&=\Z+\Z\alpha+\Z\bar\alpha+\Z\alpha\bar\alpha=\Z+\Z\alpha+\Z\tfrac BA+\Z\tfrac CA\\
&=\tfrac1A\bigl(A\Z+B\Z+C\Z+\Z A\alpha\bigr)=\tfrac1A\bigl(\Z+\Z A\alpha\bigr)=\tfrac1A\mathcal O,
\end{align*}
using $\bar\alpha=-B/A-\alpha$ and $\gcd(A,B,C)=1$. Hence $\Lam\cdot(A\bar\Lam)=\mathcal O$ and $\Lam$ is invertible with inverse $A\bar\Lam$.
Now the bijection. Let $\Lam'$ be any pseudolattice with $\mathcal O_{\Lam'}=\mathcal O$. Dividing by a non-zero element we may assume
$\Lam'=\Z+\Z\alpha'$; then $\mathcal O_{\alpha'}=\mathcal O\neq\Z$ forces $\alpha'$ quadratic with $\Q(\alpha')=K$, and by the computation $\Lam'$ is
an invertible ideal of $\mathcal O_{\alpha'}=\mathcal O$. So $\Lam'\mapsto[\Lam']\in\Pic(\mathcal O)$ is defined on homothety classes. It is
injective: if $\Lam''=\mu\Lam'$ with $\mu\in K^\times$ the lattices are homothetic. It is surjective: an invertible fractional ideal $\mathfrak a$ is a
lattice in $K\subset\R$ of rank $2$, not cyclic, with multiplier ring exactly $\mathcal O$ --- if $\lambda\mathfrak a\subseteq\mathfrak a$ then
$\lambda\mathcal O=\lambda\mathfrak a\mathfrak a^{-1}\subseteq\mathcal O$. Finally homothety classes are diffeomorphism classes by
\cref{thm:linear-rigidity}(c), and a real $\lambda$ with $\lambda\Lam'=\Lam''$, both inside $K$, lies in $K$.
\end{solution}
\chapter{Machine learning: differentiable programs and singular hypothesis spaces}\label{ch:ml}
\chaptermark{Machine learning}
\begin{chapabstract}
Three places where machine learning already involves more than manifolds. First, the space of functions computed by a model is a quotient of
parameter space and a subspace of a function space, and these are two different smooth spaces. Second, the correctness of automatic
differentiation for programs with higher-order functions is a theorem about gluing over $\Diff$. Third, orbit spaces of data symmetries have no
differentiable canonical form at points with isotropy. Each is a statement about the quasitopos structure of \cref{ch:quasitopos}.
\end{chapabstract}
\source{Quotients, strict maps and the functional diffeology, \IZ{art.~1.50--1.60}, and \IZ{Exercises~50--51}. The theorem on automatic
differentiation is due to Huot, Staton and V\'ak\'ar \cite{HSV}.}
\section{Hypothesis spaces}
A \defn{parametric model} is a smooth map $f\colon\Theta\times X\to Y$, where $\Theta$ is a space of parameters and $X,Y$ are the spaces of inputs
and outputs; think of manifolds, though nothing below requires it. Its \defn{realisation map} is
\[
\rho\colon\Theta\longrightarrow\cinf(X,Y),\qquad\rho(\theta)=f(\theta,-).
\]
Two parameters are \defn{functionally equivalent}, $\theta\sim\theta'$, if $\rho(\theta)=\rho(\theta')$. Applying \cref{thm:factorisations} to $\rho$
gives two hypothesis spaces,
\[
\Theta\;\onto\;\mathcal H_q:=\Theta/{\sim}\;\xrightarrow{\ \kappa\ }\;\mathcal H_s:=\rho(\Theta)_{\Sub}\;\into\;\cinf(X,Y),
\]
the \emph{quotient} and the \emph{subspace} hypothesis space. They have the same points: the functions the model can compute.
\begin{theorem}[Smooth learning objects]\label{thm:learning}
\begin{enumerate}[label=\textup{(\roman*)}]
\item $\rho$ is smooth for the functional diffeology, and $\kappa$ is a smooth bijection.
\item Let $Y=\R^k$, let $\mu$ be a finite Borel measure with compact support on $X\times\R^k$, $X$ a manifold, and $\ell\colon\R^k\times\R^k\to\R$ smooth.
The risk
\[
\mathcal R\colon\cinf(X,\R^k)\longrightarrow\R,\qquad\mathcal R(h)=\int\ell\bigl(h(x),y\bigr)\,\dd\mu(x,y)
\]
is smooth. Hence the training loss $L=\mathcal R\circ\rho$ is smooth and descends to smooth functions on $\mathcal H_q$ and on $\mathcal H_s$.
\item A map out of $\mathcal H_q$ is smooth iff its composite with $\Theta\to\mathcal H_q$ is; a map into $\mathcal H_s$ is smooth iff its composite with
$\mathcal H_s\into\cinf(X,Y)$ is, i.e.\ iff it is a smooth family of functions.
\item $\kappa$ need not be a diffeomorphism: there are models with smooth families of realisable functions that are not induced, even locally, by
any smooth family of parameters.
\end{enumerate}
\end{theorem}
\begin{proof}
(i) and (iii) are \cref{thm:ccc} and \cref{thm:factorisations}. (ii) is \cref{exo:risk}. (iv) Take $\Theta=X=Y=\R$ and $f(\theta,x)=\theta^2x$. Then
$\rho(\theta)=\theta^2\cdot\id$, the image of $\rho$ is the half-line $\set{c\cdot\id:c\ge0}$ inside the line of linear functions, which is an induced
copy of $\R$ in $\cinf(\R,\R)$; so $\mathcal H_s\cong H$ and $\mathcal H_q=\R/\{\pm1\}=\dten_1$, and $\kappa=\mathrm{sq}$ is not a diffeomorphism by
\cref{prop:delta1}. The family $(r,s)\mapsto(r^2+s^2)\,\id$ is a plot of $\mathcal H_s$ that does not lift to parameters near $(0,0)$.
\end{proof}
The phenomenon in (iv) is the general one at \emph{singular} parameters, where the fibres of $\rho$ change dimension or
symmetry type: deep linear networks at rank-deficient products, neural networks at parameters with vanishing or duplicated units. In
singular learning theory \cite{Watanabe} these points are studied through the local algebraic geometry of the loss. \Cref{thm:learning} is a
structural remark: before any choice of loss there are two canonical smooth structures on the set of hypotheses; they coincide at regular
parameters; and where they differ, the quotient structure $\mathcal H_q$ is the one with a universal property for learning dynamics, since
dynamics are defined by maps out of $\Theta$.
\begin{figure}[t]
\centering
\begin{tikzcd}[column sep=3.0em,row sep=2.4em]
\Theta \arrow[r,two heads] \arrow[drrr,bend right=14,"L"'] & \mathcal H_q=\Theta/{\sim} \arrow[r,"\kappa"] & \mathcal H_s \arrow[r,hook] & \cinf(X,Y) \arrow[d,"\mathcal R"]\\
& & & \R
\end{tikzcd}
\caption{Parameters, the two hypothesis spaces, the function space, and the risk. Every arrow is smooth. $\kappa$ is bijective, and is a diffeomorphism
exactly when the realisation map is strict.}\label{fig:hypothesis}
\end{figure}
\begin{proposition}[Symmetric gradient flow]\label{prop:gradflow}
Let a group $G$ act on $\Theta=\R^p$ by linear isometries and let $L\colon\Theta\to\R$ be smooth, $G$-invariant, with complete gradient flow $\Phi_t$.
\begin{enumerate}[label=\textup{(\roman*)}]
\item $\Phi_t$ is $G$-equivariant and descends to a smooth action of $(\R,+)$ on $\Theta/G$, that is, to a smooth homomorphism $\R\to\Dif(\Theta/G)$.
\item $\operatorname{Stab}(\Phi_t\theta)=\operatorname{Stab}(\theta)$ for all $t$. Hence every fixed subspace $\Theta^K$, $K\le G$, is invariant under the flow, and the flow on
$\Theta/G$ preserves the type of each point.
\end{enumerate}
\end{proposition}
\begin{proof}
For an isometry $g$, $\nabla L(g\theta)=g\nabla L(\theta)$, so $g\Phi_t$ and $\Phi_tg$ solve the same initial value problem. The map
$\R\times\Theta\to\Theta\to\Theta/G$ is constant on orbits in the second variable and $\R\times\Theta\to\R\times\Theta/G$ is a subduction
(\cref{prop:stability}), so we get a smooth $\R\times\Theta/G\to\Theta/G$, an action because $\Phi$ is; its adjoint is smooth by \cref{thm:ccc}. For
(ii), $g\Phi_t\theta=\Phi_t\theta$ iff $\Phi_tg\theta=\Phi_t\theta$ iff $g\theta=\theta$.
\end{proof}
\noindent For $G$ a group of permutations and sign changes of hidden units this is the familiar fact that units which start equal stay equal. In the
language of \cref{thm:three-quotients}, gradient flow is a flow on the stack $\Theta\hquot G$, and the induced flow on the orbit space preserves the
stratification by stabilisers.
\section{Correctness of automatic differentiation}
Forward-mode automatic differentiation (AD) is a program transformation: replace every real number by a pair (value, derivative) and every
primitive operation by its derivative-propagating version. For first-order straight-line programs its correctness is the chain rule. Real
languages have higher-order functions, and then even stating correctness requires a semantics in which a program of type
$(\mathtt{real}\to\mathtt{real})\to\mathtt{real}$ denotes a smooth map on a space of smooth maps. Manifolds cannot provide it
(\cref{exo:mfd-not-ccc}). $\Diff$ can.
\paragraph{The language.} Types are $\tau::=\mathtt{real}\mid\tau\times\tau\mid\tau\to\tau$. Terms are variables, constants $\underline c$ for $c\in\R$,
applications $\mathsf{op}(t_1,\dots,t_k)$ of primitive operations, pairs, projections, $\lambda$-abstractions and applications, with the usual typing
rules. The primitive operations form a set $\mathrm{Op}=\bigsqcup_k\mathrm{Op}_k$ of smooth functions $\R^k\to\R$ containing addition and multiplication
and closed under partial derivatives.
\paragraph{Semantics.} Put $\llbracket\mathtt{real}\rrbracket=\R$, $\llbracket\tau\times\sigma\rrbracket=\llbracket\tau\rrbracket\times\llbracket\sigma\rrbracket$ and
$\llbracket\tau\to\sigma\rrbracket=\cinf(\llbracket\tau\rrbracket,\llbracket\sigma\rrbracket)$ with the functional diffeology. By \cref{thm:ccc}, $\Diff$ is
Cartesian closed, so every term $x_1{:}\tau_1,\dots,x_n{:}\tau_n\vdash t:\tau$ has a denotation, a smooth map
$\llbracket t\rrbracket\colon\prod_i\llbracket\tau_i\rrbracket\to\llbracket\tau\rrbracket$.
\paragraph{The macro.} On types, $\AD(\mathtt{real})=\mathtt{real}\times\mathtt{real}$, and $\AD$ commutes with $\times$ and $\to$. On terms $\AD$
commutes with variables, pairing, projections, abstraction and application, and
\[
\AD(\underline c)=\langle\underline c,\underline0\rangle,\qquad
\AD\bigl(\mathsf{op}(t_1,\dots,t_k)\bigr)=\Bigl\langle\mathsf{op}(\vec u),\ \textstyle\sum_{i}\partial_i\mathsf{op}(\vec u)\cdot u_i'\Bigr\rangle
\quad\text{where }\langle u_i,u_i'\rangle=\AD(t_i).
\]
\begin{theorem}[Huot--Staton--V\'ak\'ar \cite{HSV}]\label{thm:AD}
Let $x_1{:}\mathtt{real},\dots,x_n{:}\mathtt{real}\vdash t:\mathtt{real}$ be a term, possibly using higher-order functions internally, and let
$f=\llbracket t\rrbracket\colon\R^n\to\R$ and $g=\llbracket\AD(t)\rrbracket\colon(\R\times\R)^n\to\R\times\R$. Then for all $x,v\in\R^n$,
\[
g\bigl((x_1,v_1),\dots,(x_n,v_n)\bigr)=\bigl(f(x),\ Df(x)\cdot v\bigr).
\]
\end{theorem}
\begin{proof}
Define, by induction on the type $\tau$, a relation $S_\tau\subseteq\cinf(\R,\llbracket\tau\rrbracket)\times\cinf(\R,\llbracket\AD\tau\rrbracket)$ between
smooth curves:
\begin{align*}
S_{\mathtt{real}}&=\set{(h,(h,h')) : h\in\cinf(\R,\R)},\\
S_{\tau\times\sigma}&=\set{((a_1,a_2),(b_1,b_2)) : (a_1,b_1)\in S_\tau,\ (a_2,b_2)\in S_\sigma},\\
S_{\tau\to\sigma}&=\set{(a,b) : \forall(c,d)\in S_\tau,\ \bigl(s\mapsto a(s)(c(s)),\ s\mapsto b(s)(d(s))\bigr)\in S_\sigma}.
\end{align*}
The last clause makes sense because a curve in a function space composed pointwise with a curve in its source is the composite of
$(a,c)\colon\R\to\cinf(\llbracket\tau\rrbracket,\llbracket\sigma\rrbracket)\times\llbracket\tau\rrbracket$ with the evaluation map, which is smooth.
The \emph{fundamental lemma} (\cref{exo:fundamental}) states: if $x_1{:}\tau_1,\dots,x_n{:}\tau_n\vdash t:\tau$ and $(a_i,b_i)\in S_{\tau_i}$, then
\[
\bigl(\llbracket t\rrbracket\circ(a_1,\dots,a_n),\ \llbracket\AD t\rrbracket\circ(b_1,\dots,b_n)\bigr)\in S_\tau .
\]
Apply it to $t$ of the theorem with $a_i(s)=x_i+sv_i$ and $b_i=(a_i,a_i')$, which lie in $S_{\mathtt{real}}$. The conclusion
$(f\circ a,\ g\circ b)\in S_{\mathtt{real}}$ means $g(b(s))=\bigl(f(a(s)),(f\circ a)'(s)\bigr)$; evaluate at $s=0$.
\end{proof}
\begin{figure}[t]
\centering
\begin{tikzcd}[column sep=4.2em,row sep=2.6em]
& \mathsf{Gl} \arrow[d,"\text{projection}"]\\
\mathsf{Syn} \arrow[ur,dashed,"\text{fundamental lemma}"] \arrow[r,"{(\llbracket-\rrbracket,\ \llbracket\AD(-)\rrbracket)}"'] & \Diff\times\Diff
\end{tikzcd}
\caption{The proof of \cref{thm:AD} as a lifting problem. $\mathsf{Syn}$ is the syntactic category of the language. An object of $\mathsf{Gl}$ is a
triple $(X,X',S)$ with $S\subseteq\Diff(\R,X)\times\Diff(\R,X')$, and a morphism is a pair of smooth maps preserving the relations. $\mathsf{Gl}$ is
Cartesian closed and the projection functor preserves that structure; since $\mathsf{Syn}$ is the free Cartesian closed category on the primitives, a
lift exists as soon as each primitive operation preserves $S$, which is the chain rule.}\label{fig:gluing}
\end{figure}
Three comments. First, the role of diffeology is precise and minimal: the proof takes place in a Cartesian closed category containing $\R$ and its smooth
maps, in which \emph{curves in function spaces} are defined; \cref{thm:ccc} is the statement that $\Diff$ is one. Second, the same argument gives
correctness for sum types, inductive types and, with more work, reverse mode \cite{HSV}; coproducts in $\Diff$ are computed as in sets
(\cref{thm:topological}), which is what the extension uses. Third, the relation $S_\tau$ is a relation between plots. Logical relations over a
concrete site are a general technique, and the choice of site is a parameter: with smooth maps replaced by a class of piecewise analytic maps, the method applies to
programs with conditionals and recursion \cite{omegaPAP}.
\section{Symmetries: no differentiable canonical form}
Let a compact Lie group $G$ act linearly and orthogonally on $V=\R^n$; for instance the symmetric group permuting the points of a point cloud, or a
rotation group acting on coordinates. An invariant model is a function on $V/G$. A popular way to build one is \defn{canonicalisation}: choose a map
$y\colon V\to V$ that picks a representative of each orbit,
\[
y(gv)=y(v),\qquad y(v)\in G\cdot v\qquad(g\in G,\ v\in V),
\]
and apply an arbitrary network to $y(v)$. Sorting is a canonicalisation for the symmetric group acting on $\R^n$. Dym, Lawrence and Siegel show that
for many actions of interest no \emph{continuous} canonicalisation exists \cite{DymLawrenceSiegel}. Sorting is continuous, so continuity is not always
the obstruction. Differentiability always is, wherever there is isotropy.
\begin{theorem}[No differentiable canonicalisation at isotropy]\label{thm:no-canon}
Let $W\subseteq V$ be a $G$-invariant open set and $y\colon W\to V$ a canonicalisation. Let $v\in W$, with stabiliser $G_v$ and normal space
$N_v=(T_v(G\cdot v))^\perp$ to its orbit. If $y$ is differentiable at $v$, then $G_v$ acts trivially on $N_v$. Consequently:
\begin{enumerate}[label=\textup{(\alph*)}]
\item if $G_v$ acts non-trivially on $N_v$, no canonicalisation defined near $v$ is differentiable at $v$;
\item if $G$ is finite and acts faithfully, a canonicalisation is non-differentiable at every point with non-trivial stabiliser;
\item the quotient map $\pi\colon V\to V/G$ has a smooth local section near $[v]$ only if $G_v$ acts trivially on $N_v$.
\end{enumerate}
\end{theorem}
\begin{proof}
Write $y(v)=g_0v$. Replacing $y$ by $g_0^{-1}y$, which is again a canonicalisation, we may assume $y(v)=v$. Let $A=Dy(v)$.
\emph{$A$ is injective on $N_v$.} Let $n\in N_v$ with $An=0$. Then $y(v+tn)=v+o(t)$. Since $y(v+tn)=g_t(v+tn)$ for some $g_t\in G$ and $G$ acts by
isometries, $\abs{(v+tn)-g_t^{-1}v}=o(t)$, so the distance from $v+tn$ to the orbit $G\cdot v$ is $o(t)$. But the orbit is a compact embedded
submanifold and $n$ is normal to it at $v$, so by the tubular neighbourhood theorem the distance from $v+tn$ to the orbit is $t\abs n$ for small
$t\ge0$. Hence $n=0$.
\emph{$A$ is $G_v$-invariant.} For $h\in G_v$, $y(hw)=y(w)$ and $h$ is linear with $hv=v$; differentiating at $v$ gives $Ah=A$.
\emph{Conclusion.} $G_v$ preserves the orbit and fixes $v$, so it preserves $N_v$. For $n\in N_v$ and $h\in G_v$ we get $A(hn)=A(n)$ with
$hn,n\in N_v$, so $hn=n$.
(a) is the contrapositive. (b) For finite $G$ orbits are discrete and $N_v=V$, on which $G_v$ acts faithfully. (c) If $c$ is a smooth section of
$\pi$ on a D-open neighbourhood of $[v]$ then $y=c\circ\pi$ is a smooth canonicalisation near $v$.
\end{proof}
\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
\begin{scope}
\fill[hcsmist] (-1.9,-1.9) rectangle (1.9,1.9);
\fill[hcsteal!25] (-1.9,-1.9) -- (1.9,1.9) -- (-1.9,1.9) -- cycle;
\draw[hcsteal,line width=0.9pt] (-1.9,-1.9) -- (1.9,1.9);
\draw[->,hcsgrey] (-2.1,0)--(2.2,0) node[right,hcsink]{$a$}; \draw[->,hcsgrey] (0,-2.1)--(0,2.2) node[above,hcsink]{$b$};
\fill[hcsrust] (1.2,0.4) circle (1.6pt) node[below right]{$(a,b)$};
\fill[hcsrust] (0.4,1.2) circle (1.6pt) node[above left]{$y(a,b)$};
\draw[->,hcsrust,dashed] (1.15,0.47) -- (0.47,1.15);
\fill[hcsink] (0.9,0.9) circle (1.6pt) node[below right,font=\footnotesize]{isotropy};
\node[font=\footnotesize,align=center] at (0,-2.6) {sorting $\R^2\to\{a\le b\}$: a fold along the diagonal};
\end{scope}
\begin{scope}[xshift=7.3cm]
\foreach \r in {0.45,0.9,1.35,1.8} \draw[hcsteal] (0,0) circle (\r);
\fill[hcsink] (0,0) circle (1.8pt);
\draw[hcsrust,line width=1pt] (0,0) -- (1.9,0);
\draw[hcsrust,line width=1pt,dashed] (0,0) -- (-1.6,0.9);
\node[font=\footnotesize,hcsrust] at (1.2,0.25) {section};
\node[font=\footnotesize,align=center] at (0,-2.6) {$\Ort(2)$ on $\R^2$: a ray is a continuous section,\\ and no section is differentiable at the centre};
\end{scope}
\end{tikzpicture}
\caption{Canonicalisation. Left: for the symmetric group $S_2$ the sorting map is continuous but folds the plane along the diagonal, where the
stabiliser acts by $-1$ on the normal line. Right: for rotations any section of the orbit map must select a ray, and its composite with the
quotient map, $v\mapsto\abs v\,e$, has a conical singularity at the fixed point.}\label{fig:canon}
\end{figure}
\begin{remark}[The converse, and the meaning]
By the slice theorem a neighbourhood of the orbit of $v$ is $G\times_{G_v}N_v$, so if $G_v$ acts trivially on $N_v$ the quotient is locally $N_v$
and a smooth local section exists. So \cref{thm:no-canon}(c) is an equivalence: \emph{$\pi$ has smooth local sections exactly over the points where
$V/G$ is locally the quotient by a free action}. This is \cref{thm:three-quotients} at the level of the orbit space: over those points the diffeological quotient
is the stack quotient and $\pi$ is a principal bundle onto its image; elsewhere the orbit space is the coarse space of a stack with non-trivial isotropy,
and a section would trivialise an isotropy group that is not trivial. Frame averaging and weighted frames \cite{DymLawrenceSiegel} can be read as
replacing a section of $V\to V/G$ by a section of an associated bundle of measures, which does exist.
\end{remark}
The alternative to canonicalisation is to compute invariant features. Choose generators $\sigma_1,\dots,\sigma_m$ of the algebra of invariant
polynomials, let $\sigma=(\sigma_1,\dots,\sigma_m)\colon V\to\R^m$, and let $\bar\sigma\colon V/G\to\sigma(V)$ be the induced map.
\begin{proposition}[Invariant features determine functions, not families]\label{prop:features}
\begin{enumerate}[label=\textup{(\roman*)}]
\item $\bar\sigma\colon V/G\to\sigma(V)_{\Sub}$ is a smooth bijection.
\item \textup{(Schwarz \cite{Schwarz})} It induces an isomorphism on smooth functions: $\cinf(V/G)=\cinf(V)^G=\sigma^*\cinf(\R^m)=\bar\sigma^*\cinf(\sigma(V)_{\Sub})$.
\item It is not a diffeomorphism in general. For $G=\{\pm1\}$ on $\R$ and on $\C$, and for $G=\Ort(n)$ on $\R^n$ with $\sigma=\abs x^2$, the space
$\sigma(V)_{\Sub}$ has plots that do not lift to $V$ even locally. Moreover the spaces $\R^n/\Ort(n)$, $n\ge1$, are pairwise non-diffeomorphic and all
have the same image $[0,\infty)$ and the same ring of smooth functions.
\end{enumerate}
\end{proposition}
\begin{proof}
(i) Invariant polynomials separate the orbits of a compact group. (ii) Schwarz's theorem is the middle equality; the outer ones are the universal
property of the quotient and the fact that a smooth function on $\sigma(V)_{\Sub}$ pulls back to a smooth invariant function on $V$. (iii) is
\cref{prop:delta1}, \cref{exo:cone-hilbert} and \IZ{Exercises~50--51}.
\end{proof}
So an invariant feature map is a faithful encoding of the orbit space for the purpose of defining smooth invariant \emph{functions}, and an unfaithful
one for the purpose of describing smooth \emph{families} of orbits: the feature space contains smooth curves and surfaces of feature values that are
not the features of any smooth family of inputs. A generative model trained in feature space can therefore produce smooth interpolations with no
smooth preimage. The orbit space $V/G$ with its quotient diffeology is the object whose plots are exactly the liftable families, and by the last sentence of (iii)
it determines the dimension of the data, which the features $\abs x^2$ do not.
\exercisesheading
\begin{exercise}[label=exo:one-neuron]{1}
For the one-neuron model $f((a,w),x)=a\tanh(wx)$ with $\Theta=\R^2$, $X=Y=\R$, determine the functional equivalence relation and describe $\mathcal H_q$.
\end{exercise}
\begin{solution}
Let $h(x)=a\tanh(wx)$. Then $h'(0)=aw$ and $h'''(0)=-2aw^3$. If $aw=0$ then $h=0$. If $aw\neq0$ and $a\tanh(wx)=a'\tanh(w'x)$, then $aw=a'w'$ and
$aw^3=a'w'^3$, so $w'^2=w^2$ and $(a',w')=\pm(a,w)$; conversely $\tanh$ is odd. So the classes are: the cross $\{aw=0\}$, which is the fibre over the
zero function, and the pairs $\{\pm(a,w)\}$ with $aw\ne0$. $\mathcal H_q$ is the plane with the cross collapsed to one point and the remaining four
open quadrants identified in antipodal pairs: two open quadrants, each a manifold, glued at a single point through which smooth families can pass
only by lifting to curves in the plane that reach the cross. It is a manifold away from that point and not a manifold at it.
\end{solution}
\begin{exercise}[label=exo:AD-example]{2}
Apply the macro $\AD$ to $x{:}\mathtt{real}\vdash\mathsf{times}(x,\mathsf{sin}(x)):\mathtt{real}$ and to
$x{:}\mathtt{real}\vdash(\lambda f.\,f(f\,x))\,(\lambda z.\,\mathsf{times}(z,z)):\mathtt{real}$, and check \cref{thm:AD} on both.
\end{exercise}
\begin{solution}
Write the input as $\langle x,x'\rangle$. For the first term, $\AD(\mathsf{sin}(x))=\langle\sin x,\cos x\cdot x'\rangle$ and so
\[
\AD(t)=\bigl\langle x\sin x,\ \sin x\cdot x'+x\cdot(\cos x\cdot x')\bigr\rangle ,
\]
using $\partial_1\mathsf{times}(u_1,u_2)=u_2$ and $\partial_2\mathsf{times}=u_1$. The second component is $(x\sin x)'x'$. For the second term,
$\AD$ commutes with abstraction and application, so $\AD(t)=(\lambda F.\,F(F\,\langle x,x'\rangle))\,(\lambda\langle z,z'\rangle.\,\langle z^2,2zz'\rangle)$,
where $F$ now has type $\mathtt{real}^2\to\mathtt{real}^2$. Evaluating, $F\langle x,x'\rangle=\langle x^2,2xx'\rangle$ and
$F(F\langle x,x'\rangle)=\langle x^4,\,2x^2\cdot2xx'\rangle=\langle x^4,4x^3x'\rangle$. The term denotes $x\mapsto x^4$, with derivative $4x^3$. The
higher-order function $\lambda f.\,f(f\,x)$ was never differentiated ``as a function of $f$''; the macro simply changed the type of its argument.
\end{solution}
\begin{exercise}[label=exo:sort]{2}
Show that $y(a,b)=(\min(a,b),\max(a,b))$ is a continuous canonicalisation for $S_2$ acting on $\R^2$, and verify the conclusion of \cref{thm:no-canon}
on the diagonal.
\end{exercise}
\begin{solution}
$\min$ and $\max$ are continuous and symmetric, and $y(a,b)$ is $(a,b)$ or $(b,a)$. At $v=(a,a)$ the stabiliser is $S_2$, the orbit is the point $v$,
and $N_v=\R^2$. The swap acts on $N_v$ with eigenvalues $+1$ on the diagonal direction and $-1$ on the antidiagonal direction $(1,-1)$, so it acts
non-trivially and the theorem predicts non-differentiability. Indeed $y(a+t,a-t)=(a-\abs t,a+\abs t)$, which is not differentiable at $t=0$. Away from
the diagonal the stabiliser is trivial and $y$ is locally the identity or the swap, hence smooth.
\end{solution}
\begin{exercise}[label=exo:hessian]{3}
Let a Lie group $G$ act smoothly on a manifold $\Theta$ and let $L$ be a smooth $G$-invariant function. Show that at every critical point $\theta$
of $L$ the Hessian of $L$ vanishes on the tangent space to the orbit $G\cdot\theta$. Apply this to the rescaling symmetry
$(a,w)\mapsto(ca,w/c)$ of the model $f((a,w),x)=a\cdot\mathrm{relu}(wx)$ restricted to $a,w>0$.
\end{exercise}
\begin{solution}
For $\xi$ in the Lie algebra let $\xi_\Theta$ be the corresponding vector field on $\Theta$. Invariance gives $\dd L(\xi_\Theta)=0$ identically.
Differentiate this function in the direction of a tangent vector $u$ at a critical point $\theta$, in local coordinates:
$0=\partial_u(\partial_iL\,\xi^i_\Theta)=\mathrm{Hess}L(u,\xi_\Theta(\theta))+\partial_iL(\theta)\,\partial_u\xi^i_\Theta$, and the second term vanishes
because $\dd L(\theta)=0$. Hence $\mathrm{Hess}L(\theta)(u,\xi_\Theta(\theta))=0$ for all $u$. For the rescaling symmetry on $\{a,w>0\}$, $\mathrm{relu}(wx)$
is positively homogeneous in $w$, so $f$ and therefore any loss is invariant; the group is $(\R_{>0},\cdot)$ with generating vector field $(a,-w)$. So
at every critical point the Hessian has $(a,-w)$ in its kernel: critical points are never isolated and never non-degenerate. In $\mathcal H_q$ the
whole orbit is one point, and the degeneracy disappears; this is the practical meaning of the universal property in \cref{thm:learning}(iii).
\end{solution}
\begin{exercise}[label=exo:risk]{3}
Prove \cref{thm:learning}(ii), and show that evaluation at a point $x_0$ is a smooth map $\cinf(X,\R^k)\to\R^k$ which is the special case $\mu=\delta$.
\end{exercise}
\begin{solution}
Let $P\colon U\to\cinf(X,\R^k)$ be a plot. By \cref{def:functional} the map $(r,x)\mapsto P(r)(x)$ is smooth on $U\times X$, so
$F(r,x,y)=\ell(P(r)(x),y)$ is smooth on $U\times X\times\R^k$. We must show that $I(r)=\int F(r,x,y)\,\dd\mu(x,y)$ is smooth on $U$. Let $C$ be the
compact support of $\mu$ and $B\subset U$ a compact ball. Every partial derivative $\partial_r^\beta F$ is continuous, hence bounded on $B\times C$, and
$\mu$ is finite. By dominated convergence $I$ is continuous on $B$, and differentiation under the integral sign is justified for every
$\partial_r^\beta$ by the mean value inequality with the bound on $\partial_r^{\beta+e_i}F$; induction on $\abs\beta$ gives $I\in\cinf(B)$. So
$\mathcal R\circ P$ is smooth for every plot $P$, i.e.\ $\mathcal R$ is smooth. Then $L=\mathcal R\circ\rho$ is smooth, it is constant on the fibres of
$\rho$, so it descends to $\mathcal H_q$ by the universal property of the quotient, and to $\mathcal H_s$ as the restriction of $\mathcal R$. For the
last assertion take $\mu$ the Dirac measure at $(x_0,0)$ and $\ell(h,y)=h_j$; or note directly that evaluation at $x_0$ is the composite of
$\ev\colon\cinf(X,\R^k)\times X\to\R^k$ with $h\mapsto(h,x_0)$.
\end{solution}
\begin{exercise}[label=exo:fundamental]{4}
Prove the fundamental lemma used in the proof of \cref{thm:AD}.
\end{exercise}
\begin{solution}
We prove by induction on the typing derivation of $\Gamma\vdash t:\tau$, with $\Gamma=x_1{:}\tau_1,\dots,x_n{:}\tau_n$, that for all
$(a_i,b_i)\in S_{\tau_i}$ the pair $\bigl(\llbracket t\rrbracket\circ\vec a,\ \llbracket\AD t\rrbracket\circ\vec b\bigr)$ lies in $S_\tau$. Here
$\vec a=(a_1,\dots,a_n)\colon\R\to\llbracket\Gamma\rrbracket$ and $\vec b\colon\R\to\llbracket\AD\Gamma\rrbracket$; both composites are smooth curves
because denotations are smooth maps.
\emph{Variable} $x_i$: the pair is $(a_i,b_i)$.
\emph{Constant} $\underline c$: the pair is $(s\mapsto c,\ s\mapsto(c,0))$, and $0$ is the derivative of the constant curve.
\emph{Operation} $\mathsf{op}(t_1,\dots,t_k)$: by induction $\llbracket t_j\rrbracket\circ\vec a=h_j$ and $\llbracket\AD t_j\rrbracket\circ\vec b=(h_j,h_j')$ for
smooth $h_j\colon\R\to\R$. By the definition of the macro,
\[
\llbracket\AD\,\mathsf{op}(\vec t)\rrbracket\circ\vec b=\Bigl(\mathsf{op}(h_1,\dots,h_k),\ \sum_j\partial_j\mathsf{op}(h_1,\dots,h_k)\,h_j'\Bigr),
\]
and by the chain rule the second component is the derivative of $s\mapsto\mathsf{op}(h_1(s),\dots,h_k(s))=\llbracket\mathsf{op}(\vec t)\rrbracket(\vec a(s))$.
\emph{Pairing and projections}: immediate from the definition of $S_{\tau\times\sigma}$ and the fact that $\AD$ commutes with them.
\emph{Application} $t\,u$ with $\Gamma\vdash t:\sigma\to\tau$ and $\Gamma\vdash u:\sigma$: by induction
$(a,b)=(\llbracket t\rrbracket\circ\vec a,\llbracket\AD t\rrbracket\circ\vec b)\in S_{\sigma\to\tau}$ and
$(c,d)=(\llbracket u\rrbracket\circ\vec a,\llbracket\AD u\rrbracket\circ\vec b)\in S_\sigma$. By the definition of $S_{\sigma\to\tau}$ the pair
$(s\mapsto a(s)(c(s)),\ s\mapsto b(s)(d(s)))$ is in $S_\tau$, and these curves are $\llbracket t\,u\rrbracket\circ\vec a$ and
$\llbracket\AD(t\,u)\rrbracket\circ\vec b$ because $\AD(t\,u)=\AD t\ \AD u$ and application denotes evaluation.
\emph{Abstraction} $\lambda x{:}\sigma.\,t$ with $\Gamma,x{:}\sigma\vdash t:\tau$: we must show that
$(a,b)=(\llbracket\lambda x.t\rrbracket\circ\vec a,\ \llbracket\AD(\lambda x.t)\rrbracket\circ\vec b)\in S_{\sigma\to\tau}$. Let $(c,d)\in S_\sigma$. Then
$a(s)(c(s))=\llbracket t\rrbracket(\vec a(s),c(s))$ and, since $\AD(\lambda x.t)=\lambda x.\AD t$,
$b(s)(d(s))=\llbracket\AD t\rrbracket(\vec b(s),d(s))$. The extended tuples $(\vec a,c)$ and $(\vec b,d)$ are related componentwise, so the induction
hypothesis for $t$ in the context $\Gamma,x{:}\sigma$ gives exactly that these two curves are related by $S_\tau$.
This completes the induction. The only case with analytic content is that of the primitive operations; the rest is the statement that the
relations $S_\tau$ are defined so as to be preserved by the Cartesian closed structure, and smoothness of all curves involved is \cref{thm:ccc}.
\end{solution}
\chapter{Artificial intelligence: planning, observation, semantics}\label{ch:ai}
\chaptermark{Artificial intelligence}
\begin{chapabstract}
Three questions about agents, answered in $\Diff$. When can an agent plan motions smoothly in the start and goal? Exactly when its configuration
space is smoothly contractible, and for quasi-tori exactly when it is given a homotopy class of route. What can an agent learn about a space from
smooth scalar observations alone? Its reflexive hull, and nothing more. In what categories do programs that manipulate functions,
probabilities and derivatives have semantics? In categories of concrete sheaves, of which $\Diff$ is the smooth instance.
\end{chapabstract}
\source{\IZ{art.~5.1--5.11} (paths, homotopy, contractibility), \IZ{Exercises~79--80} (reflexive spaces), \IZ{art.~1.57--1.60} (functional diffeology).}
\section{Smooth motion planning}
Let $X$ be the configuration space of a mechanical system. For rigid robots it is a manifold; for linkages at singular configurations, for
identical robots that may be relabelled, for soft bodies whose configurations are embeddings of a curve or a surface, it is not, but it is always a
diffeological space. The \defn{endpoint map}
\[
\mathrm{ends}\colon\Paths(X)\longrightarrow X\times X,\qquad\gamma\longmapsto(\gamma(0),\gamma(1))
\]
is smooth. Following Farber \cite{Farber}, a \defn{motion planner} on $A\subseteq X\times X$ is a section of $\mathrm{ends}$ over $A$; we call it
\emph{smooth} if it is smooth as a map $A_{\Sub}\to\Paths(X)$, which by \cref{thm:ccc} means that the path $s(a,b)$ depends smoothly on $(a,b)$ jointly
with time. The \defn{smooth topological complexity} $\TC^D(X)$ is the least number of D-open subsets covering $X\times X$ each of which carries a
smooth motion planner, or $\infty$.
\begin{theorem}[Smooth planners]\label{thm:planner}
Let $X$ be a non-empty diffeological space.
\begin{enumerate}[label=\textup{(\roman*)}]
\item $X$ has a smooth motion planner on all of $X\times X$ if and only if $X$ is smoothly contractible.
\item If $X$ is smoothly dominated by $Y$ --- there are smooth $f\colon X\to Y$ and $g\colon Y\to X$ with $g\circ f$ smoothly homotopic to
$\id_X$ --- then $\TC^D(X)\le\TC^D(Y)$. In particular $\TC^D$ is an invariant of smooth homotopy type.
\item If $\TC^D(X)<\infty$ then $X$ is connected, and if $\TC^D(X)=1$ then $\Pi X\simeq\ast$.
\end{enumerate}
\end{theorem}
\begin{proof}
(i) Let $s$ be a smooth planner and fix $x_0$. The map $H(x,t)=s(x,x_0)(t)$ is smooth on $X\times\R$ by \cref{thm:ccc}, with $H(x,0)=x$ and
$H(x,1)=x_0$: a contraction. Conversely let $H\colon X\times\R\to X$ be smooth with $H_0=\id$ and $H_1\equiv x_0$, and let $\lambda$ be a smashing
function (\cref{exo:smash}). Define
\[
s(x,y)(t)=\begin{cases}H\bigl(x,\lambda(2t)\bigr)&t\le\tfrac12,\\[0.3ex]H\bigl(y,\lambda(2-2t)\bigr)&t\ge\tfrac12.\end{cases}
\]
Both expressions are smooth in $(x,y,t)$ and both equal $x_0$ for $t$ near $\tfrac12$, so $s\colon X\times X\times\R\to X$ is smooth, i.e.\
$s\colon X\times X\to\Paths(X)$ is smooth. And $s(x,y)(0)=H(x,0)=x$, $s(x,y)(1)=H(y,0)=y$. (ii) is \cref{exo:TC-invariance}. (iii) A planner on
a D-open cover joins any two points by a path. If $\TC^D(X)=1$, apply (i) and \cref{prop:Pi-homotopy}.
\end{proof}
The proof of (i) is Farber's, and that is the point: in $\Diff$ it holds verbatim for every space, because ``a family of paths depending
smoothly on its endpoints'' and ``a smooth map into the path space'' are the same thing. For manifolds one usually settles for continuous planners;
for the singular and infinite-dimensional configuration spaces listed above there was previously no category in which to say ``smooth planner''
at all.
\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
\begin{scope}
\draw[hcsteal,line width=0.9pt] (0,0) circle (1.3);
\fill[hcsink] (150:1.3) circle (1.7pt) node[left=3pt]{$a$};
\fill[hcsink] (20:1.3) circle (1.7pt) node[right=3pt]{$b$};
\draw[hcsrust,line width=1.3pt,->] (150:1.45) arc (150:20:1.45);
\draw[hcsgold,line width=1.3pt,->,dashed] (150:1.15) arc (150:380:1.15);
\node[font=\footnotesize,align=center,text width=4.4cm] at (0,-2.15) {$S^1$: shortest arc (solid) or always anticlockwise (dashed), each on an open set; $\TC^D(S^1)=2$};
\end{scope}
\begin{scope}[xshift=5.0cm]
\draw[hcsteal,line width=0.9pt] (-1.4,0)--(1.4,0); \draw[hcsteal,line width=0.9pt] (0,-1.4)--(0,1.4);
\fill[hcsink] (1.0,0) circle (1.7pt) node[above]{$a$}; \fill[hcsink] (0,-0.9) circle (1.7pt) node[left]{$b$};
\draw[hcsrust,line width=1.3pt,->] (1.0,-0.12) -- (0.12,-0.12) -- (0.12,-0.9);
\fill[hcsgold] (0,0) circle (2.2pt);
\node[font=\footnotesize,align=center,text width=4.0cm] at (0,-2.15) {the cross: contract to the node; one global smooth planner};
\end{scope}
\begin{scope}[xshift=9.9cm]
\fill[hcsmist] (-1.5,-1.3) rectangle (1.5,1.3);
\begin{scope}\clip (-1.5,-1.3) rectangle (1.5,1.3);
\foreach \c in {-1.5,-0.9,-0.3,0.9,1.5} \draw[hcsgrey!70,dashed] (-1.6,-1.6+\c) -- (1.6,1.6+\c);
\draw[hcsrust,line width=0.8pt] (-1.6,-1.3) -- (1.6,1.9);
\end{scope}
\fill[hcsink] (-0.8,-0.5) circle (1.7pt) node[below right,font=\footnotesize]{$(x,y)$};
\fill[hcsink] (0.1,0.4) circle (1.7pt) node[above left,font=\footnotesize]{$(x{+}\lambda,y{+}\lambda)$};
\node[font=\footnotesize,align=center,text width=4.0cm] at (0,-2.15) {$\Tal$: plan on $\R^2/\Lam_{\mathrm{diag}}$, i.e.\ given a class of route};
\end{scope}
\end{tikzpicture}
\caption{Three planning problems. On the circle no single smooth rule works. On the cross, a singular space, one does. On the irrational torus no
rule works on any D-open set, but a smooth rule exists once the homotopy class of the route is part of the input (\cref{prop:planner-torus}).}\label{fig:planners}
\end{figure}
\begin{proposition}[Planning on quasi-tori]\label{prop:planner-torus}
Let $\Gamma\subset\R^n$ be a dense countable subgroup and $T_\Gamma=\R^n/\Gamma$, for instance $\Tal$.
\begin{enumerate}[label=\textup{(\roman*)}]
\item The only D-open subsets of $T_\Gamma\times T_\Gamma$ are $\varnothing$ and the whole space, and $T_\Gamma$ is not contractible if
$\Gamma\ne0$. Hence $\TC^D(T_\Gamma)=\infty$.
\item Let $\Pi_1(T_\Gamma)=(\R^n\times\R^n)/\Gamma_{\mathrm{diag}}$, the quotient by the diagonal action; it is the space of triples (start, goal,
homotopy class of paths between them), and it covers $T_\Gamma\times T_\Gamma$ with group $\Gamma$. The straight-line rule
\[
s[x,y](t)=q\bigl((1-t)x+ty\bigr)
\]
is a well-defined smooth map $\Pi_1(T_\Gamma)\to\Paths(T_\Gamma)$ lifting the covering: a smooth planner whose input includes a class of route.
\item No smooth planner defined on $T_\Gamma\times T_\Gamma$, or on any non-empty D-open subset of it, exists; and $s$ does not descend, because
$s[x,y]$ and $s[x,y+\gamma]$ have the same endpoints and are not homotopic for $\gamma\ne0$.
\end{enumerate}
\end{proposition}
\begin{proof}
(i) \cref{exo:Dtop-Talpha} for the D-topology; $\pi_1(T_\Gamma)=\Gamma$ by \cref{cor:TGamma}; then \cref{thm:planner}(i). (ii) The diagonal action is
principal, so $\Pi_1(T_\Gamma)$ is a diffeological space and $\R^{2n}\to\Pi_1(T_\Gamma)\to T_\Gamma^2$ are coverings; a point of $\Pi_1(T_\Gamma)$ over
$(a,b)$ is a choice of lifts of $a,b$ up to simultaneous translation, which is a homotopy class of paths from $a$ to $b$ by \cref{exo:pi1-Talpha}. The
map $(x,y,t)\mapsto q((1-t)x+ty)$ is smooth and invariant under $(x,y)\mapsto(x+\gamma,y+\gamma)$, since $q$ is $\Gamma$-invariant; so it descends along
the subduction $\R^{2n}\times\R\to\Pi_1(T_\Gamma)\times\R$. (iii) The first statement is (i). The lifts of $s[x,y]$ and $s[x,y+\gamma]$ starting at $x$
end at $y$ and $y+\gamma$.
\end{proof}
For an agent this is a statement about what must be sensed. A system whose state is known only modulo a dense group --- two encoders with
incommensurable periods, a phase known modulo two incommensurable clocks --- cannot be controlled by any smooth law in the quotient state alone, not
even locally. It can be controlled smoothly given a lift, that is, with odometry; and the amount of extra state needed is exactly the fundamental
group. In stack-theoretic terms, the planner is defined on the atlas of the fundamental groupoid.
\begin{remark}[Cohomological bounds]
A D-open cover $\{A,B\}$ of $X$ is a pushout in $\SmSet$, hence a homotopy pushout in $\Hh$, and $\Pi$ preserves it; so Mayer--Vietoris holds for the
cohomology of the shape, and the usual lower bound of $\TC$ by the zero-divisor cup-length of $H^\bullet(\Pi X)$ holds for $\TC^D$ with the usual proof.
For manifolds $\TC^D\ge\TC$ trivially; whether equality holds is a question about smoothing sections (\cref{ch:coda}).
\end{remark}
\section{Observation versus intervention}
An agent can interrogate an unknown smooth world $X$ in two ways. It can \emph{observe}: measure smooth real-valued quantities $f\colon X\to\R$. Or it
can \emph{intervene}: run a smoothly parametrised family of experiments $P\colon U\to X$. A diffeology is a specification of the possible
interventions; a Sikorski or Fr\"olicher structure is a specification of the possible observations. For a set $X$, a set $\mathcal D$ of
parametrisations and a set $\mathcal F$ of real functions, define
\begin{align*}
\mathrm{Fun}(\mathcal D)&=\set{f\colon X\to\R : f\circ P\text{ is smooth for all }P\in\mathcal D},\\
\mathrm{Plot}(\mathcal F)&=\set{P\in\mathrm{Param}(X) : f\circ P\text{ is smooth for all }f\in\mathcal F}.
\end{align*}
\begin{theorem}[The observation--intervention Galois connection]\label{thm:galois}
\begin{enumerate}[label=\textup{(\roman*)}]
\item $\mathrm{Fun}$ and $\mathrm{Plot}$ are order-reversing, $\mathcal D\subseteq\mathrm{Plot}\,\mathrm{Fun}(\mathcal D)$,
$\mathcal F\subseteq\mathrm{Fun}\,\mathrm{Plot}(\mathcal F)$, and $\mathrm{Fun}\,\mathrm{Plot}\,\mathrm{Fun}=\mathrm{Fun}$,
$\mathrm{Plot}\,\mathrm{Fun}\,\mathrm{Plot}=\mathrm{Plot}$.
\item $\mathrm{Plot}(\mathcal F)$ is a diffeology for every $\mathcal F$. For a diffeology $\mathcal D$, the \defn{reflexive hull}
$\hat{\mathcal D}=\mathrm{Plot}\,\mathrm{Fun}(\mathcal D)$ is the largest diffeology on $X$ with the same smooth real functions as $\mathcal D$.
\item Two diffeologies on $X$ have the same smooth real functions if and only if they have the same reflexive hull.
\item $X\mapsto\hat X=(X,\hat{\mathcal D})$ is a functor, and $X\to\hat X$ is the universal smooth map from $X$ to a \defn{reflexive} space, one with
$\mathcal D=\hat{\mathcal D}$.
\item Manifolds, half-spaces and corners are reflexive. The hull of $\Tal$ is the coarse diffeology; the hull of $\dten_1=\R/\{\pm1\}$ is the
half-line $H$; the hull of the wire diffeology on $\R^n$ is the standard diffeology.
\end{enumerate}
\end{theorem}
\begin{proof}
(i) is formal for any relation: here the relation between $P$ and $f$ is ``$f\circ P$ is smooth''. (ii) Constants, locality and smooth
reparametrisation are each preserved by the condition ``$f\circ P$ smooth'', so $\mathrm{Plot}(\mathcal F)$ satisfies \ref{D1}--\ref{D3}. By (i),
$\mathrm{Fun}(\hat{\mathcal D})=\mathrm{Fun}(\mathcal D)$, and if $\mathcal D'$ is a diffeology with $\mathrm{Fun}(\mathcal D')=\mathrm{Fun}(\mathcal D)$
then $\mathcal D'\subseteq\mathrm{Plot}\,\mathrm{Fun}(\mathcal D')=\hat{\mathcal D}$. (iii) follows. (iv) Let $f\colon X\to Y$ be smooth and
$P\in\hat{\mathcal D}_X$. For $g\in\mathrm{Fun}(\mathcal D_Y)$ we have $g\circ f\in\mathrm{Fun}(\mathcal D_X)$, so $g\circ f\circ P$ is smooth; hence
$f\circ P\in\hat{\mathcal D}_Y$. So $f\colon\hat X\to\hat Y$ is smooth, and if $Y$ is reflexive $f$ factors through $X\to\hat X$, uniquely since that
map is the identity on points. (v) For a manifold $M$, let $P$ be a parametrisation along which all smooth functions are smooth. Testing against bump
functions shows $P$ is continuous, and testing against coordinate functions cut off by bump functions shows $P$ is smooth in charts. Half-spaces and
corners: the same argument with \cref{thm:halfspace}. For $\Tal$, $\mathrm{Fun}$ is the constants (\cref{prop:Talpha-basic}) and every parametrisation is
smooth along constants. For $\dten_1$, $\mathrm{Fun}$ is $\set{g\circ\mathrm{sq}:g\in\cinf(\R)}$ by \cref{exo:halfline-functions}, and a parametrisation
$P$ of $[0,\infty)$ with $g\circ P$ smooth for all smooth $g$ is a smooth map into $\R$ with values in $[0,\infty)$: a plot of $H$. For the wire
diffeology, $\mathrm{Fun}$ consists of the functions smooth along all smooth curves, which by Boman's theorem \cite{Boman} are the smooth functions; then
$\mathrm{Plot}$ of those is the standard diffeology by the manifold case.
\end{proof}
\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
\node[hcsnode,minimum width=3.9cm,minimum height=2.6cm,align=center] (D) at (0,0) {};
\node[hcsnodeb,minimum width=3.9cm,minimum height=2.6cm,align=center] (F) at (7.4,0) {};
\node at (0,1.6) {diffeologies on $X$ (interventions)};
\node at (7.4,1.6) {function sets on $X$ (observations)};
\node (d1) at (-0.9,0.65) {$\mathcal D$}; \node (d2) at (0.9,-0.65) {$\hat{\mathcal D}$};
\node (f1) at (7.4,0) {$\mathrm{Fun}(\mathcal D)=\mathrm{Fun}(\hat{\mathcal D})$};
\draw[->] (d1) to[bend left=12] node[above,font=\footnotesize]{$\mathrm{Fun}$} (f1);
\draw[->] (f1) to[bend left=12] node[below,font=\footnotesize]{$\mathrm{Plot}$} (d2);
\draw[hookr,hcsrust] (d1) -- node[left,font=\footnotesize]{$\subseteq$} (d2);
\node[font=\footnotesize,align=center] at (3.7,-1.9) {an observer sees $\mathcal D$ only through $\hat{\mathcal D}$: $\Tal\rightsquigarrow$ coarse,
\ $\R/\{\pm1\}\rightsquigarrow[0,\infty)$, \ wire $\R^2\rightsquigarrow\R^2$};
\end{tikzpicture}
\caption{The Galois connection between interventions and observations. Its closed elements on the left are the reflexive diffeologies.}\label{fig:galois}
\end{figure}
\begin{theorem}[\cite{BIKW}; \IZ{Exercises~79--80}]\label{thm:reflexive}
The full subcategory of reflexive diffeological spaces is isomorphic to the category of Fr\"olicher spaces, and it is a reflective subcategory of
$\Diff$ with reflector $X\mapsto\hat X$.
\end{theorem}
Together these make a precise epistemic statement. \emph{An agent restricted to smooth scalar observations can identify a smooth world only up to
its reflexive hull.} It cannot tell the irrational torus from a structureless set, the orbifold $\R/\{\pm1\}$ from a half-line, or a plane in which
only one-dimensional motions are possible from an ordinary plane. Each pair is separated by an intervention: a plot of one that is not a plot of the
other. The hull is a closure operator, so there is a canonical ``most permissive world consistent with all observations'', and by the theorem
observation-based learning of smooth structure converges, at best, to that world. This is the differential-geometric version of the familiar
gap between observational and interventional data, and the reason is the one given in \cref{sec:fn-vs-plots}: observations are maps out, quotients
are colimits, and the maps out of a colimit do not determine the diagram of which it is the colimit.
\section{Semantic universes for programs}
\Cref{thm:AD} used one property of $\Diff$: it is a Cartesian closed category of spaces defined by plots. The same construction over other sites gives
the semantic categories used for probabilistic and differentiable programming, and the theorem that makes them work is the same.
\begin{theorem}[Cartesian closure for concrete sheaves; \cite{Dubuc,BaezHoffnung}]\label{thm:ccc-general}
Let $\mathcal C$ be a concrete site with finite products, preserved by the functor of points. Then $\ConcSh(\mathcal C)$ is Cartesian closed: for
concrete sheaves $X,Y$, the set $\Hom(X,Y)$ with plots
\[
\set{P\colon|U|\to\Hom(X,Y) : (u,x)\mapsto P(u)(x)\text{ is a morphism }U\times X\to Y}
\]
is a concrete sheaf $Y^X$, and $\Hom(Z\times X,Y)\cong\Hom(Z,Y^X)$ naturally.
\end{theorem}
\begin{proof}
The proof of \cref{thm:ccc} in \cref{exo:ccc} used three facts: a plot is a morphism from a representable, products of representables are
representable, and a pair of plots is a plot of the product. All hold here. It remains to see that $Y^X$ satisfies the sheaf condition. Let
$P\colon|U|\to\Hom(X,Y)$ restrict to plots on a covering family $\{U_i\to U\}$. A plot of $U\times X$ is a pair $(\rho,Q)\colon V\to U\times X$; the
pullback of the cover along $\rho$ is refined by a cover $\{V_j\to V\}$ on each member of which $\rho$ factors through some $U_i$, so
$v\mapsto P(\rho(v))(Q(v))$ is a plot of $Y$ on each $V_j$, hence a plot of $Y$ because $Y$ is a sheaf.
\end{proof}
\begin{corollary}[Quasi-Borel spaces; Heunen--Kammar--Staton--Yang \cite{HKSY}]\label{cor:qbs}
A \emph{quasi-Borel space} is a set $X$ with a set $M_X$ of functions $\R\to X$ containing the constants, closed under precomposition with Borel
maps $\R\to\R$, and closed under gluing along countable Borel partitions of $\R$. These are the concrete sheaves on the site of standard Borel
spaces with countable Borel covers, and they form a Cartesian closed category, whereas the category of measurable spaces is not Cartesian closed
\cite{Aumann}.
\end{corollary}
The three axioms of a quasi-Borel space are \ref{D1}, \ref{D3} and \ref{D2} with ``smooth'' replaced by ``Borel'' and open covers by countable Borel
partitions. The parallel is exact (\cref{tab:semantics}): in each row a classical category of spaces lacks function spaces, and the category of concrete
sheaves on its site of parameter spaces has them. For artificial intelligence the relevance is that a probabilistic program which
takes a likelihood function as an argument, or a differentiable program which takes a loss function as an argument, has a denotation only in the
right-hand column.
\begin{table}[t]\centering\small
\begin{tabular}{@{}p{3.1cm}p{3.5cm}p{3.6cm}p{3.1cm}@{}}\toprule
classical spaces & defect & concrete sheaves & used for\\\midrule
manifolds & no $\cinf(M,N)$, no quotients & diffeological spaces & differentiable programming \cite{HSV}\\
measurable spaces & no measurable $Y^X$ \cite{Aumann} & quasi-Borel spaces & probabilistic programming \cite{HKSY}\\
piecewise analytic maps & as above, plus recursion & $\omega$PAP spaces & AD with control flow \cite{omegaPAP}\\\bottomrule
\end{tabular}
\caption{Three instances of one theorem. The second column is why semantics cannot be given in the first; the third is \cref{thm:ccc-general}.}\label{tab:semantics}
\end{table}
\exercisesheading
\begin{exercise}[label=exo:planner-star]{1}
Write down a global smooth motion planner on a star-shaped open subset of $\R^n$ and on the cross $K=\set{xy=0}\subset\R^2$.
\end{exercise}
\begin{solution}
Let $X$ be star-shaped about $x_0$, or $X=K$ with $x_0=0$. In both cases $H(x,t)=x_0+(1-\lambda(t))(x-x_0)$ is a smooth contraction with values in
$X$: for the cross, scaling preserves $\set{xy=0}$, and $H$ is smooth into $\R^2$ with values in $K$, hence smooth into $K_{\Sub}$. The planner of
\cref{thm:planner}(i) assigns the path that runs from $x$ to $x_0$ along the segment, is stationary near $x_0$, and runs on to $y$. On a convex set the simpler rule
$s(x,y)(t)=(1-t)x+ty$ also works; on the cross it does not, since the segment between points on different arms is not contained in $K$.
\end{solution}
\begin{exercise}[label=exo:TC-circle]{2}
Show that $\TC^D(S^1)=2$.
\end{exercise}
\begin{solution}
$S^1$ is not contractible ($\pi_1=\Z$), so $\TC^D(S^1)\ge2$ by \cref{thm:planner}(i). Write points as $e^{i\theta}$. On
$A_1=\set{(a,b):b\ne-a}$ there is a unique $\phi\in(-\pi,\pi)$ with $b=ae^{i\phi}$, depending smoothly on $(a,b)$; put
$s_1(a,b)(t)=ae^{i\lambda(t)\phi}$, the shortest arc. On $A_2=\set{(a,b):b\ne a}$ there is a unique $\psi\in(0,2\pi)$ with $b=ae^{i\psi}$, depending
smoothly on $(a,b)$; put $s_2(a,b)(t)=ae^{i\lambda(t)\psi}$, the anticlockwise arc. Both are smooth sections of the endpoint map over open sets, and
$A_1\cup A_2=S^1\times S^1$.
\end{solution}
\begin{exercise}[label=exo:unlabelled]{2}
The configuration space of two indistinguishable points on a line is $C=\R^2/S_2$. Show that it has a global smooth motion planner, although
(\cref{thm:no-canon}) there is no smooth way to label the two points.
\end{exercise}
\begin{solution}
In the coordinates $u=a+b$, $w=a-b$ the swap is $(u,w)\mapsto(u,-w)$, so $C\cong\R\times\dten_1$. Both factors are smoothly contractible
(\cref{exo:contractible}), hence so is the product, and \cref{thm:planner}(i) gives a planner. Explicitly, the contraction
$h((a,b),t)=(1-\lambda(t))(a,b)$ of $\R^2$ is $S_2$-equivariant and descends: the planner moves both points to the origin and out again. A smooth labelling
would be a smooth section of $\R^2\to C$ near the diagonal, which does not exist by \cref{exo:sort} and \cref{thm:no-canon}. Planning and labelling are
different tasks: the planner is a map out of $C\times C$, the labelling a map out of $C$ into the covering space.
\end{solution}
\begin{exercise}[label=exo:hull-wire]{3}
Let $X$ be $\R^2$ with the wire diffeology and $X'$ the set $\R^2$ with the diffeology $\mathcal D'$ generated by the lines parallel to the two axes.
Determine $\mathrm{Fun}$ for both. Show that an observer cannot distinguish $X$ from the standard plane, can distinguish $X'$ from it, and that
$X'$ is nevertheless not reflexive.
\end{exercise}
\begin{solution}
\emph{$X$.} By \cref{thm:galois}(v) the hull of the wire diffeology is the standard one: same observables as the plane. The identity
$\R^2\to\R^2$ is an intervention available in the plane and not in $X$ (\cref{exo:wire}).
\emph{$X'$.} A plot is locally constant or locally of the form $r\mapsto(h(r),c)$ or $r\mapsto(c,h(r))$ with $h$ smooth. So
$\mathrm{Fun}(\mathcal D')$ is the set of \emph{separately} smooth functions: $f(\cdot,c)$ and $f(c,\cdot)$ smooth for every $c$. It is strictly larger
than $\cinf(\R^2)$: $f(x,y)=xy/(x^2+y^2)$, $f(0,0)=0$, is separately smooth and discontinuous. So an observer who finds $f$ among the observables knows
the world is not the standard plane.
\emph{The hull of $X'$ excludes diagonal motion.} The curve $c(t)=(t,t)$ is not in $\mathrm{Plot}\,\mathrm{Fun}(\mathcal D')$, since $f\circ c$ takes the value
$0$ at $t=0$ and $\tfrac12$ elsewhere. More generally, if $P$ is in the hull then $P$ is smooth, the coordinates being observables, and at every point $r$ one of
$\dd P_1(r)$, $\dd P_2(r)$ vanishes: otherwise some direction $v$ has $\dd P_1(v)\ne0\ne\dd P_2(v)$, and the translate of $f$ to $P(r)$ is
discontinuous along $t\mapsto P(r+tv)$.
\emph{The hull of $X'$ is larger than $\mathcal D'$.} With $\varphi$ as in \cref{exo:cross}, let $P(t)=(\varphi(-t),\varphi(t))$, the curve that turns
the corner at the origin. For a separately smooth $f$ put $g=f(\cdot,0)$ and $k=f(0,\cdot)$, both smooth. Then
$f(P(t))=g(\varphi(-t))+k(\varphi(t))-f(0,0)$ for all $t$, a smooth function. So $P$ is in the hull. But $P$ is not a plot of $\mathcal D'$: near
$t=0$ it lies in no single line. Hence $\mathcal D'\subsetneq\hat{\mathcal D'}$ and $X'$ is not reflexive.
So the wire plane is observationally a plane; the grid plane is observationally not a plane, but an observer still overestimates what can be done in
it, crediting it with motions that turn corners. Only interventions settle either question.
\end{solution}
\begin{exercise}[label=exo:hull-functor]{3}
Show that the reflexive hull does not commute with quotients: exhibit a subduction $\pi\colon X\to B$ with $X$ reflexive for which
$\hat X\to\hat B$ is not a subduction.
\end{exercise}
\begin{solution}
Take $\pi=q_\alpha\colon\R\to\Tal$. $\R$ is reflexive, so $\hat\R=\R$, and $\hat{\Tal}$ is the set $\R/\Lam_\alpha$ with the coarse diffeology.
The map $\R\to\hat{\Tal}$ is smooth and surjective, but a parametrisation of $\hat{\Tal}$ that is not locally liftable, such as
$t\mapsto q_\alpha(\sqrt{\abs t})$ (\cref{prop:Talpha-basic}), is a plot of the target with no local lift. So the hull of the quotient is not the quotient of
the hull. Equivalently: the reflector $X\mapsto\hat X$ is a left adjoint and so preserves colimits \emph{computed in the category of reflexive spaces},
where the quotient of $\R$ by $\Lam_\alpha$ is the coarse space; the category of Fr\"olicher spaces has quotients, and they are the wrong ones.
\end{solution}
\begin{exercise}[label=exo:TC-invariance]{4}
Prove \cref{thm:planner}(ii).
\end{exercise}
\begin{solution}
Let $f\colon X\to Y$, $g\colon Y\to X$ be smooth and $h\colon X\times\R\to X$ a smooth homotopy with $h_0=g\circ f$ and $h_1=\id_X$. Let
$V_1,\dots,V_k$ be D-open sets covering $Y\times Y$ with smooth planners $\sigma_j\colon V_j\to\Paths(Y)$. Put $U_j=(f\times f)^{-1}(V_j)$; these are
D-open, because smooth maps are D-continuous, and they cover $X\times X$. We construct a smooth planner on $U_j$.
\emph{Three paths.} For $(x,x')\in U_j$ consider
\begin{align*}
\gamma_1(t)&=h\bigl(x,1-\lambda(t)\bigr)&&\text{from }x\text{ to }g f(x),\\
\gamma_2(t)&=g\bigl(\sigma_j(f(x),f(x'))(\lambda(t))\bigr)&&\text{from }gf(x)\text{ to }gf(x'),\\
\gamma_3(t)&=h\bigl(x',\lambda(t)\bigr)&&\text{from }gf(x')\text{ to }x',
\end{align*}
where $\lambda$ is a smashing function. Each is stationary near $t\le0$ and $t\ge1$, each depends smoothly on $(x,x',t)$: for $\gamma_2$ this is
the smoothness of $\sigma_j\circ(f\times f)\colon U_j\to\Paths(Y)$ together with \cref{thm:ccc}.
\emph{Concatenation.} Define $s_j(x,x')(t)$ to be $\gamma_1(3t)$ for $t\le\tfrac13$, $\gamma_2(3t-1)$ for $\tfrac13\le t\le\tfrac23$ and
$\gamma_3(3t-2)$ for $t\ge\tfrac23$. Because $\lambda$ is constant near $0$ and near $1$, there is a fixed $\varepsilon>0$, independent of $(x,x')$,
such that on $\abs{t-\tfrac13}<\varepsilon$ the first two expressions are both equal to $gf(x)$, and on $\abs{t-\tfrac23}<\varepsilon$ the last two
are both equal to $gf(x')$. So on the three overlapping open sets $t<\tfrac13+\varepsilon$, $\tfrac13-\varepsilon<t<\tfrac23+\varepsilon$,
$t>\tfrac23-\varepsilon$ of $U_j\times\R$ the map $(x,x',t)\mapsto s_j(x,x')(t)$ coincides with a smooth map, and by locality \ref{D2} applied to its
composites with plots it is smooth. Hence $s_j\colon U_j\to\Paths(X)$ is smooth, with $s_j(x,x')(0)=h(x,1)=x$ and $s_j(x,x')(1)=h(x',1)=x'$.
So $X\times X$ is covered by $k$ D-open sets with smooth planners, and $\TC^D(X)\le\TC^D(Y)$. If $X$ and $Y$ are smoothly homotopy equivalent each
dominates the other and the two numbers coincide.
\end{solution}
\chapter{System design: state spaces, quotients, clocks}\label{ch:systems}
\chaptermark{System design}
\begin{chapabstract}
A designer of systems with continuous state composes state spaces, abstracts them, and identifies states that should not be distinguished. We
prove three results about doing so smoothly. Every smooth machine has two minimal realisations, a quotient and a subspace of the space of
behaviours, which differ in general. A system of incommensurable clocks is classified, up to re-gearing, by a quasi-torus on which no conserved
quantity exists. And reduction by a symmetry group is lossless exactly when the action is principal, in which case equivariant components upstairs
are the same as components downstairs.
\end{chapabstract}
\source{\IZ{art.~1.46--1.60} (subductions, quotients, strict maps, functional diffeology), \IZ{art.~8.11--8.16} (principal and associated bundles),
\IZ{art.~8.38} (Kronecker flows).}
\section{A design rule}
State spaces are built from other state spaces by a small number of operations, and each is a universal construction (\cref{tab:design}). The
category of manifolds has the first row conditionally and the others not at all, which is why continuous-state design is usually done in
coordinates with the structure maintained by hand. $\Diff$ has all of them unconditionally (\cref{thm:topological}, \cref{thm:ccc},
\cref{thm:lcc}), with one refinement that this chapter is about: the quotient in $\Diff$ is a quotient of \emph{points}, and when the identifications
themselves carry information the right object is the quotient in $\SmSet$ or in $\Hh$ (\cref{thm:three-quotients}).
\begin{table}[t]\centering\small
\begin{tabular}{@{}p{3.4cm}p{3.1cm}p{6.7cm}@{}}\toprule
design operation & construction & smoothness means\\\midrule
compose subsystems & product, pullback & families are pairs of families\\
impose an invariant & subspace (induction) & a family is smooth iff smooth in the ambient space\\
abstract, deduplicate & quotient (subduction) & every family of abstract states lifts locally\\
switch between modes & sum, pushout & a family stays locally in one mode\\
pass a component as data & function space & a family of components is a component with a parameter\\
depend on a parameter & slice, $\Pi_f$ & fibrewise function spaces\\\bottomrule
\end{tabular}
\caption{Design operations and the universal constructions that implement them in $\Diff$.}\label{tab:design}
\end{table}
\section{Two minimal realisations}
Fix diffeological spaces $I$ of inputs and $O$ of outputs. A \defn{smooth machine} is a diffeological space $S$ of states with smooth maps
\[
\delta\colon S\times I\to S,\qquad\mathrm{out}\colon S\to O ,
\]
and a morphism of machines is a smooth map of state spaces commuting with $\delta$ and $\mathrm{out}$. Write $\delta^*(s;i_1,\dots,i_n)$ for the
state reached from $s$ on the input word $i_1\cdots i_n$. The \defn{space of behaviours} is
\[
B=\prod_{n\ge0}\cinf(I^n,O),
\]
a machine with $\mathrm{out}_B(b)=b_0$ and $\delta_B(b,i)_n(i_1,\dots,i_n)=b_{n+1}(i,i_1,\dots,i_n)$. The \defn{behaviour} of a state $s$ of a machine $M$ is
$\beta_M(s)=\bigl((i_1,\dots,i_n)\mapsto\mathrm{out}(\delta^*(s;i_1,\dots,i_n))\bigr)_{n\ge0}$.
\begin{theorem}[Two minimal realisations]\label{thm:realisation}
Let $M=(S,\delta,\mathrm{out})$ be a smooth machine.
\begin{enumerate}[label=\textup{(\roman*)}]
\item $B$ is a terminal object in the category of smooth machines: $\beta_M\colon M\to B$ is the unique morphism.
\item The coimage $M_q=S/{\sim}$, where $s\sim s'$ iff $\beta_M(s)=\beta_M(s')$, and the image $M_s=\beta_M(S)_{\Sub}$ carry unique machine structures
making
\[
M\;\onto\;M_q\;\xrightarrow{\ \kappa\ }\;M_s\;\into\;B
\]
morphisms of machines. $\kappa$ is a bijection.
\item \textup{(Universal properties.)} Every morphism $M\to M'$ that is a subduction is followed by a unique morphism $M'\to M_q$ under $M$: $M_q$ is the
smallest quotient of $M$. Every morphism from $M$ to a machine whose behaviour map is an induction factors uniquely through $M\to M_s$: $M_s$ is the
reflection of $M$ into extensional machines.
\item $\kappa$ is an isomorphism if and only if $\beta_M$ is strict. It is not always: for $S=\R$, $I=\ast$, $\delta=\id$, $\mathrm{out}(s)=s^2$ one
gets $M_q=\R/\{\pm1\}$ and $M_s=[0,\infty)_{\Sub}$.
\item Machines with the same set of behaviours have the same $M_s$, but can have non-diffeomorphic $M_q$: for $S_n=\R^n$, $I=\ast$, $\delta=\id$,
$\mathrm{out}(s)=\abs s^2$, all $M_s$ coincide and the $M_q=\R^n/\Ort(n)$ are pairwise non-diffeomorphic.
\end{enumerate}
\end{theorem}
\begin{proof}
(i) The $n$-th component of $\beta_M$ is the adjoint of the smooth map $S\times I^n\to O$, $(s,\vec\imath)\mapsto\mathrm{out}(\delta^*(s;\vec\imath))$,
so it is smooth by \cref{thm:ccc}, and a map into a product is smooth iff its components are. $\delta_B$ is smooth because partial evaluation
$\cinf(I^{n+1},O)\times I\to\cinf(I^n,O)$ is. The identities $\mathrm{out}_B\beta_M=\mathrm{out}$ and $\beta_M\delta=\delta_B(\beta_M\times\id)$ are
immediate. If $h\colon M\to B$ is any morphism then $h(s)_n(\vec\imath)=\mathrm{out}_B(\delta_B^*(h(s);\vec\imath))=\mathrm{out}_B(h(\delta^*(s;\vec\imath)))=\mathrm{out}(\delta^*(s;\vec\imath))$.
(ii) $\delta$ is compatible with $\sim$, because $\beta_M(\delta(s,i))=\delta_B(\beta_M(s),i)$. The map $S\times I\to M_q\times I$ is a subduction
(\cref{prop:stability}), so $\delta$ descends to a smooth $\delta_q\colon M_q\times I\to M_q$; and $\mathrm{out}$ descends. The image $\beta_M(S)$ is closed
under $\delta_B$, and restrictions of smooth maps to subspaces, with values in subspaces, are smooth. Uniqueness is clear since $S\to M_q$ is onto and
$M_s\to B$ is injective. $\kappa$ is the comparison map of \cref{thm:factorisations}.
(iii) If $h\colon M\to M'$ is a morphism then $\beta_{M'}h=\beta_M$ by (i), so $h$ identifies only $\sim$-equivalent states; if $h$ is a subduction,
$S\to M_q$ factors uniquely and smoothly through it, and the factor is a morphism because $h$ is onto. If $h\colon M\to N$ with $\beta_N$ an
induction, then $\beta_N$ identifies $N$ with a subspace of $B$ containing $\beta_M(S)$, and the inclusion $M_s\into\beta_N(N)_{\Sub}\cong N$ is the
required factor.
(iv) is the definition of strict, and \cref{prop:delta1}. (v) All these machines have $\beta(S)=\set{(c,c,\dots):c\ge0}$, a copy of $[0,\infty)_{\Sub}$ in
$B=\R^{\N}$; the classes of $\sim$ are the spheres, so $M_q=\R^n/\Ort(n)$, and \IZ{Exercise~50}.
\end{proof}
\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
\node[hcsnode] (S) at (0,0) {$S$};
\node[hcsnodeb] (Q) at (3.4,0) {$M_q=S/{\sim}$};
\node[hcsnodeb] (I) at (7.6,0) {$M_s=\beta(S)_{\Sub}$};
\node[hcsnode] (B) at (11.2,0) {$B$};
\draw[->>] (S)--(Q); \draw[->] (Q)-- node[above]{$\kappa$} (I); \draw[hookr] (I)--(B);
\draw[->] (S) to[bend right=22] node[below]{$\beta_M$} (B);
\node[font=\footnotesize,align=center,text width=4.0cm] at (3.4,1.15) {states up to observational equivalence: families come from families of states};
\node[font=\footnotesize,align=center,text width=4.0cm] at (7.6,1.15) {realisable behaviours: families are smooth families of behaviours};
\end{tikzpicture}
\caption{The two minimal realisations of a smooth machine. In classical automata theory they coincide (Myhill--Nerode); for manifolds neither
exists in general; in $\Diff$ both exist, and the map between them is a smooth bijection that is a diffeomorphism exactly for strict behaviour
maps.}\label{fig:realisation}
\end{figure}
For design this separates two meanings of the word ``state''. $M_s$ is the state space of the \emph{specification}: it depends only on
the observable behaviour, and a smooth family in it is a smooth family of behaviours, which is the kind of object over which a test suite or a contract quantifies.
$M_q$ is the state space of the \emph{implementation up to observation}: a smooth family in it is one that some smooth family of internal states
realises. By part (iv) a specification can have smooth families of behaviours that no smooth family of implementation states realises ---
the family $(r,s)\mapsto r^2+s^2$ in the example --- and by part (v) two implementations of one specification can have observational
quotients of different local dimension. Neither phenomenon can be stated for manifolds, because neither quotient is one.
\section{Clocks}
Consider $N\ge2$ periodic components with frequencies $\omega=(\omega_1,\dots,\omega_N)\in\R^N$: counters, oscillators, tasks released
periodically. Their joint phase is a point of the torus $T^N=\R^N/\Z^N$ and evolves by the linear flow $x\mapsto x+t\omega$. Call $\omega$
\defn{non-resonant} if $k\cdot\omega\ne0$ for all $k\in\Z^N\smallsetminus\{0\}$: no integer combination of the clocks is stationary. The space of
\emph{phase relations} of the system is the leaf space
\[
Q_\omega=T^N/\R ,
\]
whose points are the possible trajectories of the joint phase. Two initial conditions have the same long-run behaviour, up to a time shift, exactly
when they define the same point of $Q_\omega$.
\begin{theorem}[Multi-clock systems]\label{thm:clocks}
Let $\omega,\omega'\in\R^N$ be non-resonant, $N\ge2$.
\begin{enumerate}[label=\textup{(\roman*)}]
\item $Q_\omega\cong\R^{N-1}/\Gamma_\omega$ is a quasi-torus, where $\Gamma_\omega\cong\Z^N$ is the image of $\Z^N$ in $\R^N/\R\omega$, a dense subgroup. The
projection $T^N\to Q_\omega$ is a principal $\R$-bundle, and $\Pi\,Q_\omega\simeq\B\Z^N\simeq T^N$.
\item Every D-continuous function on $Q_\omega$ is constant: the system has no non-trivial continuous conserved quantity.
\item $Q_\omega\cong Q_{\omega'}$ if and only if $\omega'=c\,U\omega$ for some $U\in\GL_N(\Z)$ and $c\in\R^\times$.
\item $\Dif(Q_\omega)\cong Q_\omega\rtimes\Sigma_\omega$, where $\Sigma_\omega=\set{U\in\GL_N(\Z):U\omega\in\R\omega}$ is the discrete group of unimodular
integer matrices with eigenvector $\omega$.
\end{enumerate}
\end{theorem}
\begin{proof}
(i) Let $p\colon\R^N\to V=\R^N/\R\omega$ and $\Gamma_\omega=p(\Z^N)$. Both $Q_\omega$ and $V/\Gamma_\omega$ are the quotient of $\R^N$ by the subgroup
$\Z^N+\R\omega$, so they are diffeomorphic. If $c\omega\in\Z^N$ with $c\neq0$, any non-zero integer vector orthogonal to $c\omega$ would violate
non-resonance; so $\R\omega\cap\Z^N=0$ and $p$ is injective on $\Z^N$. By Kronecker's theorem non-resonance is equivalent to density of every orbit of the
flow in $T^N$, that is, to density of $\Z^N+\R\omega$ in $\R^N$, that is, to density of $\Gamma_\omega$ in $V$. The flow is the action of a subgroup of the
diffeological group $T^N$, so the quotient map is principal by \cref{cor:GmodH}; the subgroup is diffeomorphic to $\R$ as in \IZ{Exercise~31}. The shape
is \cref{cor:TGamma}. (ii) A D-open set of $V/\Gamma_\omega$ has an open preimage invariant under a dense group of translations. (iii) By
\cref{thm:linear-rigidity}(c), $Q_\omega\cong Q_{\omega'}$ iff there is a linear isomorphism $A\colon V\to V'$ with $A\Gamma_\omega=\Gamma_{\omega'}$. Given such
$A$, there is a unique bijection $U$ of $\Z^N$ with $p'U=Ap$ on $\Z^N$, because $p'$ is injective on $\Z^N$; it is additive, so $U\in\GL_N(\Z)$, and
$p'U=Ap$ on $\R^N$ by linearity. Hence $U(\ker p)=\ker p'$, i.e.\ $U\omega\in\R\omega'$. Conversely such a $U$ induces $A$. (iv) By
\cref{thm:linear-rigidity}(b) every smooth self-map is affine, and its linear part corresponds to $U$ as in (iii); the diffeology is treated as in
\cref{thm:units}(iii).
\end{proof}
\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
\def\gold{1.6180339}
\draw[->,hcsgrey] (0,0.55)--(12.4,0.55) node[right,hcsink]{$t$};
\draw[->,hcsgrey] (0,-0.55)--(12.4,-0.55);
\node[left] at (0,0.55) {clock 1}; \node[left] at (0,-0.55) {clock 2};
\foreach \k in {0,...,12} \draw[hcsteal,line width=1pt] (0.95*\k,0.4)--(0.95*\k,0.7);
\foreach \k in {0,...,7} \draw[hcsrust,line width=1pt] (0.95*\gold*\k,-0.7)--(0.95*\gold*\k,-0.4);
\foreach \k in {0,...,12} \draw[hcsteal!50,line width=0.4pt,dashed] (0.95*\k,0.4)--(0.95*\k,-1.25);
\foreach \k in {0,...,7} \draw[hcsrust!50,line width=0.4pt,dashed] (0.95*\gold*\k,-0.7)--(0.95*\gold*\k,-1.25);
\draw[hcsgrey] (0,-1.25)--(12.4,-1.25);
\node[font=\footnotesize] at (6.2,-1.75) {merged tick sequence: never periodic; the order in which the two clocks tick is a Sturmian word};
\end{tikzpicture}
\caption{Two clocks with period ratio the golden ratio. There is no hyperperiod and no continuous function of the joint phase is conserved, but the
space of phase relations is the diffeological group $T_\varphi$, with a self-similarity: the frequencies $\omega=(1,1/\varphi)$ satisfy
$U\omega=\varphi\,\omega$ for $U=\begin{psmallmatrix}1&1\\1&0\end{psmallmatrix}$, so replacing the counters $(c_1,c_2)$ by $(c_1+c_2,c_1)$ gives the same
system run $\varphi$ times faster.}\label{fig:clocks}
\end{figure}
In design terms, (ii) means that there is nothing to synchronise on. A system of rate-monotonic periodic tasks with rational period ratios has a
hyperperiod, a circle of phase relations, and schedules can be tabulated over it; with incommensurable periods the corresponding object exists but is
a quasi-torus, and no table indexed by a continuous invariant of the phase can exist. (iii) is a normal form theorem: two multi-rate systems are
the same up to \emph{re-gearing} --- replacing the counters by unimodular integer combinations of themselves and rescaling time --- exactly when
their leaf spaces are diffeomorphic. For $N=2$ this is \cref{cor:DI} with $\alpha=\omega_2/\omega_1$, and the invariant is the tail of the continued
fraction of the rate ratio. (iv) gives the non-trivial re-gearing self-equivalences of a system: $\Sigma_\omega$ is $\{\pm1\}$ for generic rates,
and it is the unit group $\Z[\theta]^\times$, of rank $r_1+r_2-1$ by Dirichlet's theorem, when $\omega=(1,\theta,\dots,\theta^{N-1})$ for an
algebraic integer $\theta$ of degree $N$ (\cref{exo:three-clocks}; compare \cref{prop:number-fields}). Finally, for $N=2$, the principal $\R$-bundles over $Q_\omega$ are computed in \cref{thm:Fl}; they are the ways of attaching to the phase relation a real-valued
accumulated quantity defined up to a flow. They depend on the Diophantine type of the rate ratio: for Diophantine ratios the only such quantity is
elapsed time, up to scale, and for Liouville ratios there are others.
\section{Lossless reduction}
Let a diffeological group $G$ act on a state space $X$ by symmetries: relabellings of identical replicas, changes of frame, gauge freedoms of a
representation. One wants to work with the reduced state space $B=X/G$. When is nothing lost? Write $\Diff_G/X$ for the category of diffeological
spaces with $G$-action and an equivariant smooth map to $X$; think of its objects as components attached to the system whose state transforms
with the symmetry.
\begin{theorem}[Lossless symmetry reduction]\label{thm:reduction}
Let $\pi\colon X\to B=X/G$ be the quotient map.
\begin{enumerate}[label=\textup{(\roman*)}]
\item The following are equivalent: the action is principal; $X\simeq B\times_{\B G}\ast$ in $\Hh$, compatibly with the action and the projection, for a map $c\colon B\to\B G$; along every plot of
$B$ the state space is locally a product of reduced state and gauge, $P^*X\cong_{\mathrm{loc}}U\times G$.
\item If the action is principal, then pulling back along $\pi$ is an equivalence of categories
\[
\pi^*\colon\Diff/B\;\xrightarrow{\ \simeq\ }\;\Diff_G/X,\qquad\text{with inverse }E\mapsto E/G .
\]
\item In general $\Hh/(X\hquot G)$ is equivalent to the $\infty$-category of objects of $\Hh$ with $G$-action and an equivariant map to $X$, and the
functor of \textup{(ii)} is the restriction of this equivalence along $X\hquot G\to B$, which is an equivalence exactly in the principal case.
\end{enumerate}
\end{theorem}
\begin{proof}
(i) is \cref{thm:principal} and \cref{thm:classification}. (ii) is \cref{exo:descent}. (iii) is the general fact that objects over a homotopy quotient
are equivariant objects \cite{NSS}, together with \cref{thm:three-quotients}.
\end{proof}
So for a principal symmetry one may store only the reduced state, and every equivariant observer, controller or attached data structure is
equivalently a component over the reduced state space: the reduction is an equivalence of design spaces, not merely a projection. When the action is
not principal the same statement holds verbatim for the stack $X\hquot G$ and fails for the space $X/G$; the space $X/G$ lacks the isotropy groups, and a
component over $X/G$ carries no action of the isotropy group at a state with symmetry. The three levels at which states can be identified in a design
are listed in \cref{tab:identity}.
\begin{table}[t]\centering\small
\begin{tabular}{@{}p{2.7cm}p{3.2cm}p{3.9cm}p{3.6cm}@{}}\toprule
level & object & two states are identified\dots & engineering analogue\\\midrule
points & $X/G\in\Diff$ & if some symmetry relates them & canonical form, deduplicated key\\
germs & $\pi_0(X\hquot G)\in\SmSet$ & by a symmetry varying smoothly with the family & equivalence with a locally consistent reason\\
witnesses & $X\hquot G\in\Hh$ & by a recorded symmetry & keep the isomorphism: migration, merge witness, version vector\\\bottomrule
\end{tabular}
\caption{Three levels of identification, from \cref{thm:three-quotients}. Moving down the table increases the stored data and improves compositionality: only the
last row satisfies \cref{thm:reduction}(iii) unconditionally.}\label{tab:identity}
\end{table}
\exercisesheading
\begin{exercise}[label=exo:rational-clocks]{1}
Compute the space of phase relations $Q_\omega$ for two clocks with $\omega=(2,3)$, and more generally for $\omega=(p,q)$ with $p,q$ coprime integers.
\end{exercise}
\begin{solution}
$Q_\omega=\R^2/(\Z^2+\R\omega)$. The linear form $\ell(x,y)=qx-py$ has kernel $\R\omega$, so it identifies $\R^2/\R\omega$ with $\R$ and carries $\Z^2$
onto $q\Z+p\Z=\Z$. Hence $Q_\omega\cong\R/\Z$, a circle: the flow on $T^2$ is periodic and the phase relation is the conserved quantity
$qx-py\bmod1$. The hyperperiod is the period of the flow, $t=1$ in these units. The contrast with \cref{thm:clocks} is entirely in whether
$\ell(\Z^2)$ is discrete or dense.
\end{solution}
\begin{exercise}[label=exo:machines]{2}
Let $I=\R$, $O=\R$. Let $M_1$ have $S=\R$, $\delta(s,\theta)=s$, $\mathrm{out}(s)=s^2$, and let $M_2$ have $S=\R^2$, $\delta(s,\theta)$ the rotation of $s$
by the angle $\theta$, $\mathrm{out}(s)=\abs s^2$. Show that $M_1$ and $M_2$ have the same specification $M_s$ and non-isomorphic observational quotients.
\end{exercise}
\begin{solution}
In both machines the output along any input word is constant: $\beta(s)_n(\vec\theta)=s^2$, respectively $\abs s^2$. So both images in $B$ are the set of
constant behaviours with value $c\ge0$. The map $c\mapsto(\text{const}_c)_n$ from $\R$ to $B$ is an induction, since each component
$\R\to\cinf(\R^n,\R)$ is; so $M_s\cong[0,\infty)_{\Sub}$ for both, with trivial transition and output $c$. The observational quotients are
$\R/\{\pm1\}=\dten_1$ and $\R^2/\!\sim$ with classes the circles, which is $\dten_2=\R^2/\Ort(2)$. These are not diffeomorphic
\IZ{Exercise~50}; indeed no machine isomorphism can exist since the underlying spaces differ. An observer cannot tell $M_1$ from $M_2$; a designer
who can run smooth two-parameter families of initial states can.
\end{solution}
\begin{exercise}[label=exo:three-clocks]{2}
Determine $\Sigma_\omega$ for $\omega=(1,\sqrt2,\sqrt3)$ and exhibit an element of infinite order in $\Sigma_\omega$ for $\omega=(1,\theta,\theta^2)$ with
$\theta^3=\theta+1$.
\end{exercise}
\begin{solution}
Both are non-resonant, the entries being linearly independent over $\Q$. Let $U\omega=c\omega$ and $M=\Z\omega_1+\Z\omega_2+\Z\omega_3\subset\R$; then
$cM\subseteq M$. For the first $\omega$: $c=c\cdot1\in M$, say $c=a+b\sqrt2+d\sqrt3$. Then $c\sqrt2=2b+a\sqrt2+d\sqrt6\in M$ forces $d=0$ and
$c\sqrt3=a\sqrt3+b\sqrt6\in M$ forces $b=0$. So $c=a\in\Z$, the integer matrix $U-c$ annihilates $\omega$, hence is zero by non-resonance, and $U=c=\pm1$:
$\Sigma_\omega=\{\pm1\}$. For the second, multiplication by $\theta$ preserves $M=\Z[\theta]$: $\theta\cdot1=\theta$, $\theta\cdot\theta=\theta^2$,
$\theta\cdot\theta^2=1+\theta$. So $U=\begin{psmallmatrix}0&1&0\\0&0&1\\1&1&0\end{psmallmatrix}$ satisfies $U\omega=\theta\omega$, $\det U=1$, and it has
infinite order because $\theta>1$. Three clocks with rates $1:\theta:\theta^2$ are re-gearing equivalent to themselves under
$(c_1,c_2,c_3)\mapsto(c_2,c_3,c_1+c_2)$ with time rescaled by $\theta$.
\end{solution}
\begin{exercise}[label=exo:reduce-rotation]{3}
Let $X=\R^2$ with the flow of $\dot x=-\nabla L$, $L(x)=(\abs x^2-1)^2$, and $G=\mathrm{SO}(2)$. Describe the reduced dynamics on $X/G$, say where the
reduction is lossless in the sense of \cref{thm:reduction}, and compute the shape of $X\hquot G$ and of $X/G$.
\end{exercise}
\begin{solution}
$L$ is invariant and its flow is complete in forward time, so by the argument of \cref{prop:gradflow} it descends to $X/G=\R^2/\mathrm{SO}(2)=\dten_2$ (the orbits of $\mathrm{SO}(2)$ and
$\Ort(2)$ coincide). In the coordinate $u=\abs x^2\in[0,\infty)$, $\dot u=2x\cdot\dot x=-8u(u-1)$: the point $u=0$ is an unstable equilibrium, $u=1$ a
stable one, and every other trajectory tends to $u=1$. On $X^\circ=\R^2\smallsetminus\{0\}$ the action is free and proper, hence principal, with
quotient the manifold $(0,\infty)$; there the state is (radius, angle), the angle is pure gauge, and by \cref{thm:reduction}(ii) equivariant components
over $X^\circ$ are the same as components over $(0,\infty)$. At the origin the stabiliser is all of $G$ and the reduction is lossy. Shapes:
$\Pi(X\hquot G)=\ast\hquot S^1=\B S^1=\C P^\infty$, while $\Pi(X/G)=\ast$ (\cref{exo:contractible}). The entire difference is the isotropy of one state.
\end{solution}
\begin{exercise}[label=exo:descent]{4}
Prove \cref{thm:reduction}(ii).
\end{exercise}
\begin{solution}
Let $\pi\colon X\to B$ be a principal $G$-bundle.
\emph{The functor $\pi^*$.} For $E\to B$ put $\pi^*E=X\times_BE$, with $G$ acting on the first factor and the projection to $X$. It is an object of
$\Diff_G/X$, functorially in $E$.
\emph{The functor $Q$.} For $p\colon E\to X$ in $\Diff_G/X$ put $Q(E)=E/G$ with the map to $B$ induced by $\pi\circ p$, which is $G$-invariant.
\emph{The action on $E$ is principal.} Let $r\mapsto(e_r,e_rg_r)$ be a plot of $E\times E$. Applying $p$ gives the plot
$r\mapsto(p(e_r),p(e_r)g_r)$ of $X\times X$, and since the action on $X$ is principal $r\mapsto g_r$ is a plot of $G$. In particular the action on $E$
is free and $E\to E/G$ is a principal bundle.
\emph{$\pi^*Q\cong\id$.} For $E$ in $\Diff_G/X$ consider $\phi\colon E\to X\times_BE/G$, $\phi(e)=(p(e),[e])$. It is smooth, $G$-equivariant, and lies
over $E/G$. Now $X\times_B(E/G)\to E/G$ is a principal $G$-bundle, being the pullback of $\pi$ along $E/G\to B$ (\cref{lem:Bun-basic}(i)), and
$E\to E/G$ is a principal $G$-bundle by the previous step. A morphism of principal bundles over the same base is an isomorphism
(\cref{lem:Bun-basic}(ii)); so $\phi$ is a diffeomorphism, natural in $E$, and it commutes with the maps to $X$.
\emph{$Q\pi^*\cong\id$.} For $E\to B$, the projection $X\times_BE\to E$ is a subduction, as the pullback of the subduction $\pi$, and its fibres are the
$G$-orbits. So it induces a bijective subduction $(X\times_BE)/G\to E$, which is a diffeomorphism (\cref{prop:stability}(iii)), natural in $E$ and
compatible with the maps to $B$.
\emph{Morphisms.} Both constructions are functorial and the two natural isomorphisms exhibit them as inverse equivalences.
The argument used principality twice: to make $E\to E/G$ a bundle, and to make $X\times_B(E/G)$ one. For a free action that is not principal the
statement fails. Let $\Rd$ act on $X=\R$, so that $B=\ast$, and take $E=X\times G$ with the diagonal action and the first projection. Then
$E/G\cong\R$ via $(x,h)\mapsto x-h$, so $\pi^*Q(E)=\R\times\R$, which is not diffeomorphic to $E=\R\times\Rd$.
\end{solution}
\chapter{Coda}\label{ch:coda}
\begin{chapabstract}
A summary of the argument, open questions, and the strata in which the statements will be formalised.
\end{chapabstract}
\section{The argument in one page}
A diffeology is a concrete sheaf on Cartesian spaces (\cref{thm:BH}). Concreteness is separatedness for the adjunction ``points $\dashv$
codiscrete'' (\cref{lem:coDisc}), so $\Diff$ is a quasitopos (\cref{thm:quasitopos-abstract}): it has every limit, colimit and function space, two
kinds of image (\cref{thm:factorisations}), and one defect, non-effective equivalence relations (\cref{prop:noneffective}). Repairing the defect
twice leads to the topos $\SmSet$ and the $\infty$-topos $\Hh$ (\cref{thm:DiffinH}), and the quotient of a space by a group then has three values,
which coincide exactly for the principal actions of the book (\cref{thm:principal}, \cref{thm:three-quotients}). In $\Hh$ the book's main constructions
become representable: forms by the smooth sets $\Om^k$ (\cref{prop:forms-yoneda}), principal bundles by the stacks $\B G$
(\cref{thm:classification}), homotopy groups by the shape $\Pi$ (\cref{thm:pin}). Formal properties of $\Pi$ give the exact homotopy sequence
(\cref{thm:fibre-seq}); the Poincar\'e lemma for sheaves gives de~Rham's theorem with its obstruction (\cref{thm:dR-obstruction}) and the integration
bundles (\cref{thm:integration}).
Every statement can be checked on the irrational torus. It is $\R\hquot\Z^2$, so its shape is a torus; its forms account for half of the torus' cohomology and its
$\R$-bundles for the other half (\cref{prop:E2-Talpha}); its maps are affine (\cref{thm:linear-rigidity}), so its symmetries are units
(\cref{thm:units}), its isomorphism classes are ideal classes (\cref{thm:class-torsor}), and its bundles are solutions of a cohomological equation
with small divisors (\cref{thm:Fl}).
The applications use the quasitopos more than the $\infty$-topos. Because a map has two images, hypothesis spaces
(\cref{thm:learning}), invariant features (\cref{prop:features}) and minimal realisations (\cref{thm:realisation}) each come in two versions.
By Cartesian closure, automatic differentiation (\cref{thm:AD}) and motion planning (\cref{thm:planner}) are one-line arguments. The
distinction between a quotient and a homotopy quotient is the reason that canonical forms fail at symmetric points (\cref{thm:no-canon}) and the criterion for symmetry
reduction to be lossless (\cref{thm:reduction}).
\section{Open questions}
\begin{enumerate}[label=\arabic*.]
\item \emph{Strictness of realisation maps.} For which architectures is $\rho\colon\Theta\to\cinf(X,Y)$ strict, so that the two hypothesis spaces of
\cref{thm:learning} coincide? For deep linear networks the question is whether every smooth family of matrices of rank at most $k$ factors locally and smoothly
through $k$ dimensions.
\item \emph{Higher obstruction groups.} Compute $H^q(T_\Gamma;\Om^p)$ for quasi-tori of rank $N>2$. The answer should be governed by simultaneous
Diophantine conditions on $\Gamma$, generalising \cref{thm:Fl}; the $E_2$ page should again be the cohomology of $T^N$.
\item \emph{The smooth Oka principle beyond manifolds.} \Cref{thm:shape}(ii) holds for manifolds, and by \cref{rem:no-BG-space}
$\Pi[\Tal,\B\R]\simeq\ast$ is consistent with it even though $\Map(\Tal,\B\R)$ is large. For which diffeological spaces $X$ is
$\Pi[X,A]\simeq\Map(\Pi X,\Pi A)$ for all $A$?
\item \emph{Smooth versus continuous planning.} Is $\TC^D(M)=\TC(M)$ for every closed manifold $M$?
\item \emph{Arithmetic beyond the class group.} In complex multiplication the torsor of \cref{thm:class-torsor} carries a Galois action and generates
class fields. Manin's question \cite{Manin} is whether real multiplication has an analogue. Diffeology provides the objects and their
isogenies; the invariants are the open part.
\item \emph{Reverse mode and stacks.} Is there a version of \cref{thm:AD} for programs whose types denote stacks, for instance programs
manipulating data up to a symmetry?
\end{enumerate}
\section{Formalisation: what is ready}\label{sec:formal}
Formalisation is the subject of a sequel. The statements of this monograph fall into three strata by the infrastructure required (\cref{tab:formal}).
The first stratum is elementary: sets, plots and real analysis. The second requires sheaves on a site. The third requires an $\infty$-topos, and the
natural target is not a model but an axiomatisation: cohesive homotopy type theory, in which $\shp$, $\fl$ and $\shr$ are primitive modalities
\cite{Shulman}, and in which \cref{thm:three-quotients}, \cref{thm:fibre-seq} and \cref{thm:dR-obstruction} are statements about types.
\begin{table}[h]\centering\small
\begin{tabular}{@{}p{2.4cm}p{5.3cm}p{5.6cm}@{}}\toprule
stratum & requires & statements\\\midrule
A: plots & sets, smooth maps on $\R^n$, Fourier series & \cref{thm:topological,thm:ccc,thm:factorisations,thm:lcc}; \cref{thm:linear-rigidity,cor:DI,thm:units};
\cref{lem:coboundary-line} and the analytic part of \cref{thm:Fl}; \cref{thm:no-canon,thm:planner,thm:galois,thm:realisation,thm:clocks}; \cref{thm:AD}\\
B: sheaves & a Grothendieck topos, image factorisation & \cref{thm:BH,prop:conc,prop:cohesion1,prop:forms-descent,thm:ccc-general}\\
C: $\infty$-sheaves & effective groupoids, shape, descent & \cref{thm:principal,thm:classification,thm:three-quotients,thm:fibre-seq,thm:dR-obstruction,thm:integration,thm:reduction}\\\bottomrule
\end{tabular}
\caption{Strata for formalisation. Everything in stratum A is provable from the definition of a diffeology in \cref{def:diffeology} with no category theory.}
\label{tab:formal}
\end{table}
The quoted theorems on which the results depend, and which would have to be formalised or assumed, are four: Whitney's theorem on even functions
(\cref{thm:halfspace}), the triviality of diffeological bundles over Cartesian spaces \IZ{art.~8.19} (\cref{lem:Bun-basic}), the comparison of smooth
homotopy groups with the shape (\cref{thm:pin}), and the structure-group theorem for orbifolds (\cref{thm:IKZ}).
\appendix
\chapter{A dictionary}\label{ch:dictionary}
In the table the vocabulary of \cite{IZ} is set beside the categorical vocabulary used here; the book is cited by article in the left column.
{\small
\begin{longtable}{@{}p{4.7cm}p{5.6cm}p{3.1cm}@{}}
\toprule
in \emph{Diffeology} & here & where\\\midrule\endhead
\bottomrule\endfoot
domain; parametrisation (1.1--1.3) & object of the site $\Dom$; element of a presheaf & \cref{ch:concrete}\\
axioms D1--D3 (1.5) & normalisation, descent, functoriality & \cref{thm:BH}\\
diffeological space & concrete sheaf on $\Cart$; $0$-truncated object of $\Hh$ with $X\into\shr X$ & \cref{thm:BH,thm:DiffinH}\\
discrete, coarse diffeology (1.20--1.21) & $\Disc$, $\coDisc$; the modalities $\fl$, $\shr$ & \cref{prop:cohesion1}\\
pullback, pushforward (1.26, 1.43) & initial and final lifts along $\Diff\to\Set$ & \cref{thm:topological}\\
induction (1.29) & strong monomorphism & \cref{prop:monoepi}\\
subduction (1.46) & strong epimorphism; effective epimorphism of $\Hh$ & \cref{prop:monoepi,thm:principal}\\
strict map (1.54) & $\operatorname{coim}f\cong\im f$ & \cref{thm:factorisations}\\
functional diffeology (1.57) & internal hom; exponential ideal & \cref{thm:ccc,thm:quasitopos-abstract}\\
generating family (1.66) & covering sieve; presentation as a colimit of representables & \cref{thm:classification}\\
quotient (1.50) & $\conc\,\pi_0$ of the homotopy quotient & \cref{thm:three-quotients}\\
D-topology (2.8) & left adjoint $D\colon\Diff\to\Top$; not the shape & \cref{prop:Dadj,rem:shape-vs-D}\\
manifold, orbifold (4.1, 4.17) & modelled space; coarse space of an \'etale stack & \cref{ch:models}\\
components $\pi_0$ (5.7) & $\Pi_0$, left adjoint to $\Disc$ & \cref{prop:cohesion1}\\
homotopy groups $\pi_n$ (5.17) & homotopy groups of the shape $\Pi X$ & \cref{thm:pin}\\
differential form (6.28) & map $X\to\Om^k$ in $\SmSet$ & \cref{prop:forms-yoneda}\\
pushing forms onto quotients (6.38) & $\Hom(-,\Om^k)$ turns coequalisers into equalisers & \cref{prop:forms-descent}\\
De~Rham homomorphism (6.74) & edge map of the Poincar\'e spectral sequence & \cref{thm:dR-obstruction}\\
diffeological group (7.1) & $0$-truncated concrete group object of $\Hh$; has a delooping $\B G$ & \cref{ch:bundles}\\
fibrating groupoid (8.4) & groupoid Morita equivalent to a group: $|\mathbf K|\simeq\B\mathbf K_b$ & \cref{prop:fibrating}\\
fibration, local triviality along plots (8.8--8.9) & map classified by $B\to\B\Dif(F)$ & \cref{prop:fibrating}\\
principal action (8.11) & $X/G\simeq X\hquot G$ & \cref{thm:principal}\\
principal bundle & map $X\to\B G$ & \cref{thm:classification}\\
associated bundle (8.16) & $(P\times F)\hquot G$ & \cref{thm:fibre-seq}\\
exact homotopy sequence (8.21) & $\Pi$ preserves homotopy quotients & \cref{thm:fibre-seq}\\
universal covering (8.26) & fibre of $X\to\tau_{\le1}\shp X$ & \cref{ch:homotopy}\\
cokernel of the first De~Rham homomorphism (8.30) & $E_2^{0,1}$; flat $\R$-bundles & \cref{thm:dR-obstruction,exo:IZ830}\\
group of flows $\Fl(X)$ (8.39) & $H^1(X;\R)=\pi_0\Map(X,\B\R)$ & \cref{thm:Fl}\\
integration bundle of a closed 2-form (8.42) & lift of $X\to\Om^2_{\mathrm{cl}}$ through $\B(T_P)_{\mathrm{conn}}$ & \cref{thm:integration}\\
\end{longtable}}
\section*{Notation}
\addcontentsline{toc}{section}{Notation}
{\small
\begin{tabular}{@{}p{3.2cm}p{10.4cm}@{}}
$\Dom$, $\Cart$ & domains; Cartesian spaces, with smooth maps and open covers\\
$\Diff$, $\SmSet$, $\Hh$ & diffeological spaces; sheaves on $\Cart$; $\infty$-sheaves on $\Cart$\\
$\underline X$ & the sheaf of plots of $X$\\
$\Gamma,\Disc,\coDisc,\Pi_0$ & points, discrete, codiscrete, connected components\\
$\Pi$, $\shp$, $\fl$, $\shr$ & shape; the shape, flat and sharp modalities\\
$\conc$, $\pi_0$, $\tau_{\le n}$ & concretisation; $0$-truncation; $n$-truncation\\
$X/G$, $X\hquot G$ & diffeological quotient; homotopy quotient\\
$\B G$, $\Bun_G(X)$ & delooping of a group object; groupoid of principal $G$-bundles\\
$\Om^k$, $\Om^k_{\mathrm{cl}}$ & sheaves of $k$-forms and closed $k$-forms on $\Cart$\\
$H^q(X;A)$ & $\pi_0\Map_{\Hh}(X,\B^qA)$\\
$\R$, $\Rd$ & the smooth additive group; the same group with the discrete diffeology\\
$\Lam_\alpha$, $\Tal$, $q_\alpha$ & $\Z+\alpha\Z$; the irrational torus $\R/\Lam_\alpha$; the projection $\R\to\Tal$\\
$T_\Gamma$ & the quasi-torus $\R^n/\Gamma$\\
$\dten_n$, $H$ & $\R^n/\Ort(n)$ with the quotient diffeology; $[0,\infty)$ with the subspace diffeology\\
$\mathcal O_\alpha$, $\Pic(\mathcal O)$, $R_D$ & endomorphism ring of $\Tal$; class group; regulator\\
$\Fl(X)$ & group of isomorphism classes of principal $\R$-bundles over $X$\\
$\norm t$ & distance from $t$ to the nearest integer\\
\end{tabular}}
\backmatter
\begin{thebibliography}{99}
\addcontentsline{toc}{chapter}{Bibliography}
\small
\bibitem{IZ} P. Iglesias-Zemmour, \emph{Diffeology}, Mathematical Surveys and Monographs 185, American Mathematical Society, Providence, 2013.
\bibitem{Aumann} R. J. Aumann, Borel structures for function spaces, \emph{Illinois J. Math.} 5 (1961), 614--630.
\bibitem{BaezHoffnung} J. C. Baez and A. E. Hoffnung, Convenient categories of smooth spaces, \emph{Trans. Amer. Math. Soc.} 363 (2011), 5789--5825.
\bibitem{BIKW} A. Batubenge, P. Iglesias-Zemmour, Y. Karshon and J. Watts, Diffeological, Fr\"olicher, and differential spaces, preprint, arXiv:1712.04576.
\bibitem{BBP} D. Berwick-Evans, P. Boavida de Brito and D. Pavlov, Classifying spaces of infinity-sheaves, \emph{Algebr. Geom. Topol.} 24 (2024), 4891--4937.
\bibitem{Boman} J. Boman, Differentiability of a function and of its compositions with functions of one variable, \emph{Math. Scand.} 20 (1967), 249--268.
\bibitem{BuchmannWilliams} J. Buchmann and H. C. Williams, A key exchange system based on real quadratic fields, in \emph{Advances in Cryptology -- CRYPTO '89}, Lecture Notes in Comput. Sci. 435, Springer, 1990, 335--343.
\bibitem{Bunk} S. Bunk, The $\mathbb R$-local homotopy theory of smooth spaces, \emph{J. Homotopy Relat. Struct.} 17 (2022).
\bibitem{CSIDH} W. Castryck, T. Lange, C. Martindale, L. Panny and J. Renes, CSIDH: an efficient post-quantum commutative group action, in \emph{Advances in Cryptology -- ASIACRYPT 2018}, Lecture Notes in Comput. Sci. 11274, Springer, 2018, 395--427.
\bibitem{Chen} K.-T. Chen, Iterated path integrals, \emph{Bull. Amer. Math. Soc.} 83 (1977), 831--879.
\bibitem{ChristensenSinnamonWu} J. D. Christensen, G. Sinnamon and E. Wu, The $D$-topology for diffeological spaces, \emph{Pacific J. Math.} 272 (2014), 87--110.
\bibitem{ChristensenWu} J. D. Christensen and E. Wu, The homotopy theory of diffeological spaces, \emph{New York J. Math.} 20 (2014), 1269--1303.
\bibitem{ChristensenWuBG} J. D. Christensen and E. Wu, Smooth classifying spaces, \emph{Israel J. Math.} 241 (2021); arXiv:1709.10517.
\bibitem{Cohen} H. Cohen, \emph{A Course in Computational Algebraic Number Theory}, Graduate Texts in Mathematics 138, Springer, 1993.
\bibitem{Couveignes} J.-M. Couveignes, Hard homogeneous spaces, IACR Cryptology ePrint Archive, Report 2006/291.
\bibitem{DonatoIglesias} P. Donato and P. Iglesias, Exemples de groupes diff\'eologiques: flots irrationnels sur le tore, \emph{C. R. Acad. Sci. Paris S\'er. I Math.} 301 (1985), 127--130.
\bibitem{Dubuc} E. J. Dubuc, Concrete quasitopoi, in \emph{Applications of Sheaves}, Lecture Notes in Math. 753, Springer, 1979, 239--254.
\bibitem{DucasVanWoerden} L. Ducas and W. van Woerden, On the lattice isomorphism problem, quadratic forms, remarkable lattices, and cryptography, in \emph{Advances in Cryptology -- EUROCRYPT 2022}, Lecture Notes in Comput. Sci. 13277, Springer, 2022.
\bibitem{Hawk} L. Ducas, E. W. Postlethwaite, L. N. Pulles and W. van Woerden, Hawk: module LIP makes lattice signatures fast, compact and simple, in \emph{Advances in Cryptology -- ASIACRYPT 2022}, Springer, 2022.
\bibitem{DymLawrenceSiegel} N. Dym, H. Lawrence and J. W. Siegel, Equivariant frames and the impossibility of continuous canonicalization, in \emph{Proc. 41st Int. Conf. on Machine Learning}, PMLR 235 (2024), 12228--12267.
\bibitem{Farber} M. Farber, Topological complexity of motion planning, \emph{Discrete Comput. Geom.} 29 (2003), 211--221.
\bibitem{GurerIZ} S. G\"urer and P. Iglesias-Zemmour, Differential forms on manifolds with boundary and corners, \emph{Indag. Math.} 30 (2019), 920--929.
\bibitem{Hallgren} S. Hallgren, Polynomial-time quantum algorithms for Pell's equation and the principal ideal problem, \emph{J. ACM} 54 (2007), no.~1, Art.~4.
\bibitem{HardyWright} G. H. Hardy and E. M. Wright, \emph{An Introduction to the Theory of Numbers}, 5th ed., Oxford University Press, 1979.
\bibitem{HKSY} C. Heunen, O. Kammar, S. Staton and H. Yang, A convenient category for higher-order probability theory, in \emph{Proc. 32nd ACM/IEEE Symp. on Logic in Computer Science (LICS)}, 2017.
\bibitem{omegaPAP} M. Huot, A. K. Lew, V. K. Mansinghka and S. Staton, $\omega$PAP spaces: reasoning denotationally about higher-order, recursive probabilistic and differentiable programs, in \emph{Proc. 38th ACM/IEEE Symp. on Logic in Computer Science (LICS)}, 2023.
\bibitem{HSV} M. Huot, S. Staton and M. V\'ak\'ar, Correctness of automatic differentiation via diffeologies and categorical gluing, in \emph{Foundations of Software Science and Computation Structures (FoSSaCS 2020)}, Lecture Notes in Comput. Sci. 12077, Springer, 2020, 319--338.
\bibitem{IZthesis} P. Iglesias, \emph{Fibrations diff\'eologiques et homotopie}, Th\`ese d'\'Etat, Universit\'e de Provence, Marseille, 1985.
\bibitem{IZsmall} P. Iglesias, Diff\'eologie d'espace singulier et petits diviseurs, \emph{C. R. Acad. Sci. Paris S\'er. I Math.} 302 (1986), 519--522.
\bibitem{IKZ} P. Iglesias, Y. Karshon and M. Zadka, Orbifolds as diffeologies, \emph{Trans. Amer. Math. Soc.} 362 (2010), 2811--2831.
\bibitem{IglesiasLachaud} P. Iglesias and G. Lachaud, Espaces diff\'erentiables singuliers et corps de nombres alg\'ebriques, \emph{Ann. Inst. Fourier (Grenoble)} 40 (1990), 723--737.
\bibitem{IZCech} P. Iglesias-Zemmour, \v{C}ech--de~Rham bicomplex in diffeology, \emph{Israel J. Math.} 259 (2024), 239--276.
\bibitem{IZarith} P. Iglesias-Zemmour, Diffeology and arithmetic of irrational tori, preprint, arXiv:2508.07460.
\bibitem{IglesiasPrato} P. Iglesias-Zemmour and E. Prato, Quasifolds, diffeology and noncommutative geometry, \emph{J. Noncommut. Geom.} 15 (2021), 735--759.
\bibitem{Elephant} P. T. Johnstone, \emph{Sketches of an Elephant: A Topos Theory Compendium}, Oxford Logic Guides 43--44, Oxford University Press, 2002.
\bibitem{KiharaModel} H. Kihara, Model category of diffeological spaces, \emph{J. Homotopy Relat. Struct.} 14 (2019), 51--90.
\bibitem{KiharaSing} H. Kihara, Smooth singular complexes and diffeological principal bundles, preprint, arXiv:2202.00131.
\bibitem{KWW} D. Krepski, J. Watts and S. Wolbert, Sheaves, principal bundles, and \v{C}ech cohomology for diffeological spaces, preprint, arXiv:2111.01032.
\bibitem{KrieglMichor} A. Kriegl and P. W. Michor, \emph{The Convenient Setting of Global Analysis}, Mathematical Surveys and Monographs 53, American Mathematical Society, 1997.
\bibitem{Lawvere} F. W. Lawvere, Axiomatic cohesion, \emph{Theory Appl. Categ.} 19 (2007), 41--49.
\bibitem{Losik} M. V. Losik, Fr\'echet manifolds as diffeological spaces, \emph{Izv. Vyssh. Uchebn. Zaved. Mat.} (1992), no.~5, 36--42.
\bibitem{HTT} J. Lurie, \emph{Higher Topos Theory}, Annals of Mathematics Studies 170, Princeton University Press, 2009.
\bibitem{Manin} Yu. I. Manin, Real multiplication and noncommutative geometry (ein Alterstraum), in \emph{The Legacy of Niels Henrik Abel}, Springer, 2004, 685--727.
\bibitem{MinichielloBun} E. Minichiello, Diffeological principal bundles and principal infinity bundles, preprint, arXiv:2202.11023.
\bibitem{MinichielloObs} E. Minichiello, The diffeological \v{C}ech--de~Rham obstruction, preprint, arXiv:2401.09400.
\bibitem{NSS} T. Nikolaus, U. Schreiber and D. Stevenson, Principal $\infty$-bundles: general theory, \emph{J. Homotopy Relat. Struct.} 10 (2015), 749--801.
\bibitem{Pavlov} D. Pavlov, Projective model structures on diffeological spaces and smooth sets and the smooth Oka principle, preprint, arXiv:2210.12845.
\bibitem{Rieffel} M. A. Rieffel, $C^*$-algebras associated with irrational rotations, \emph{Pacific J. Math.} 93 (1981), 415--429.
\bibitem{Schreiber} U. Schreiber, Differential cohomology in a cohesive $\infty$-topos, preprint, arXiv:1310.7930.
\bibitem{Schwarz} G. W. Schwarz, Smooth functions invariant under the action of a compact Lie group, \emph{Topology} 14 (1975), 63--68.
\bibitem{Shanks} D. Shanks, The infrastructure of a real quadratic field and its applications, in \emph{Proc. 1972 Number Theory Conference}, University of Colorado, Boulder, 1972, 217--224.
\bibitem{Shulman} M. Shulman, Brouwer's fixed-point theorem in real-cohesive homotopy type theory, \emph{Math. Structures Comput. Sci.} 28 (2018), 856--941.
\bibitem{Souriau} J.-M. Souriau, Groupes diff\'erentiels, in \emph{Differential Geometrical Methods in Mathematical Physics}, Lecture Notes in Math. 836, Springer, 1980, 91--128.
\bibitem{Waldorf} K. Waldorf, Transgression to loop spaces and its inverse, I: Diffeological bundles and fusion maps, \emph{Cah. Topol. G\'eom. Diff\'er. Cat\'eg.} 53 (2012), 162--210.
\bibitem{Watanabe} S. Watanabe, \emph{Algebraic Geometry and Statistical Learning Theory}, Cambridge University Press, 2009.
\bibitem{WattsWolbert} J. Watts and S. Wolbert, Diffeological coarse moduli spaces of stacks over manifolds, preprint, arXiv:1406.1392.
\bibitem{Whitney} H. Whitney, Differentiable even functions, \emph{Duke Math. J.} 10 (1943), 159--160.
\end{thebibliography}
\end{document}