Independent scholarship · Open accessThe monthly digest

Full manuscript · browser edition

Diffeology in Higher Categories

Continuous, single-column reading. Equations, tables, proofs, references and appendices stay in document order.

Contents · 95 sections

Higher Categorical Semantics  Monograph  Volume II

Symplectic Diffeology in
Higher Categories

Moment maps, prequantisation, and reduction
behind Chapter 9 of Iglesias-Zemmour’s Diffeology

with applications to arithmetic, cryptography,
machine learning, artificial intelligence, and system design

image

A horizontal lift of a closed path to the Heisenberg group, for the connection form λ=dz+x dy\lambda=\mathrm{d}z+x\,\mathrm{d}y.
The lift closes up to a vertical translation equal to the enclosed area: curvature, holonomy, and the Weil pairing in one picture.

Anonymous submission

Prepared for higher-categorical-semantics.pages.dev  27 November 2026

Abstract

Chapter 9 of Patrick Iglesias-Zemmour’s Diffeology [1] builds symplectic geometry on arbitrary diffeological spaces: for every closed 22-form ω\omega on a space XX and every diffeological group GG of automorphisms of (X,ω)(X,\omega) there is a moment map, with values in a quotient of the space G∗\mathcal{G}^{*} of invariant 11-forms on GG, with no hypothesis of dimension, non-degeneracy or smoothness of orbits. Volume I of this series [2] placed Chapters 1–8 of [1] in the cohesive ∞\infty-topos H\mathbf{H} of smooth ∞\infty-groupoids. This volume does the same for Chapter 9 and continues to prequantisation and reduction.

Part I. A closed 22-form is a map X→Ωcl2X\to\Omega^{2}_{\mathrm{cl}} to a classifying sheaf with one point, and the category of parasymplectic spaces is a slice of the topos of smooth sets. The moment map of [1] is the transgression of ω\omega along the orbits of GG; for an invariant primitive α\alpha it is the obstruction to the descent of α\alpha to the homotopy quotient X/ ⁣ ⁣/GX/\!\!/G. The coadjoint orbit attached to a homogeneous space is the coimage of an orbit map, in the sense of the two factorisation systems of [I, Theorem 3.2].

Part II. A prequantisation is a lift of ω ⁣:X→Ωcl2\omega\colon X\to\Omega^{2}_{\mathrm{cl}} to the stack B(TP)conn\mathbf{B}(T_{P})_{\mathrm{conn}} of principal bundles with connection for a torus of periods TP=R/PT_P=\mathbb{R}/P, where P⊂RP\subset\mathbb{R} is any proper subgroup. Three theorems are proved for arbitrary diffeological spaces and groups. (A) An equivariant prequantum bundle (Y,λ)(Y,\lambda) has a canonical equivariant moment map, μ(x)=y^∗λ\mu(x)=\hat y^*\lambda, the pullback of the connection form along an orbit map; the holonomy and the Souriau class of [1] vanish. (B) The equivariant bundle is a map X/ ⁣ ⁣/G→B(TP)connX/\!\!/G\to\mathbf{B}(T_{P})_{\mathrm{conn}} exactly when μ=0\mu=0. (C) If GG acts principally on μ−1(0)\mu^{-1}(0) then the quotient μ−1(0)/G\mu^{-1}(0)/G carries a reduced closed 22-form and a reduced prequantum bundle with the same structure group, with no regularity hypothesis on the level set. Reduction of C2×C2\mathbb{C}^2\times\mathbb{C}^2 at an irrational level produces the prequantum bundle of S2×S2S^2\times S^2 as the leaf space (S3×S3)/R(S^3\times S^3)/\mathbb{R} of an irrational flow, with structure group an irrational torus.

Part III consists of applications. In number theory, products R/a×R/b\mathbb{R}/\mathfrak{a}\times\mathbb{R}/\mathfrak{b} of one-dimensional tori attached to ideals of a number field are classified up to diffeomorphism by the Steinitz class [ab][\mathfrak{a}\mathfrak{b}] and up to symplectomorphism by the ideal ab\mathfrak{a}\mathfrak{b}, which is the group of periods; their symplectic mapping class groups are Hilbert modular groups, and their prequantum bundles are Heisenberg quasi-nilmanifolds. In cryptography, the theta group of a polarised torus is the group of automorphisms of its prequantum bundle over the translations, the Weil pairing is its commutator, isogenies that preserve the polarisation are the quotients by isotropic subgroups, and the Gram–Schmidt profile of a symplectic lattice basis, including the NTRU bases of the signature scheme Falcon, is symmetric. In machine learning, Noether’s theorem holds for actions of arbitrary diffeological groups, compact symmetries of a loss give conserved momenta of Hamiltonian dynamics, non-compact symmetries give conserved quadratic forms of gradient flow, splitting integrators conserve the momenta exactly, and the symmetry accelerates training in four ways, by the choice of a level, by motion along orbits, by equivariant updates and by projection. In artificial intelligence, the momentum is a reachability invariant, the net motion produced by a cycle of shape changes is a holonomy, and a two-body system with irrational inertia ratio has a first integral with values in an irrational torus and none with values in a manifold. In system design, linear Lagrangian and Dirac relations compose, isotropic correspondences of diffeological spaces compose with no transversality hypothesis, and reduction commutes with interconnection. The common structure is stated in a final chapter: an objective on a quotient, a dynamics on an atlas, and a connection whose exact part gives conserved quantities and whose non-closed part gives phases; without the metric it holds in every ∞\infty-topos, with it in a differentially cohesive ∞\infty-topos, where the atlas of a quotient is a quotient by a formal group followed by a formally étale map, and for the syntax of an algebraic theory it is the theory of normal forms. In a last chapter the structure is made executable: architectures are terms of an initial algebra, the denotation, the two modes of differentiation and the parameter symmetries are its homomorphisms, and by a compiler to JAX the specifications of five published networks become optimizers whose forward and backward passes are selected at run time, and derivatives that are composites of the two modes are evaluated by plans of least cost.

The volume contains 31 numbered figures and a frontispiece, 19 tables, 79 numbered results and 79 solved exercises graded from warm-up to proof.

Keywords. Diffeological space; closed 22-form; moment map; Souriau cocycle; coadjoint orbit; prequantisation; torus of periods; symplectic reduction; Heisenberg group; Weil pairing; symplectic lattice; Noether’s theorem; geometric phase; port-Hamiltonian system.
MSC 2020. 58A40, 53D20, 53D50, 18F10, 18N60, 11R29, 14K25, 94A60, 68T07, 93B27.

Preface

What this is

The second volume of a categorical companion to [1]. Volume I [2] is devoted to Chapters 1–8 of the book: plots, the quasitopos Diff\mathsf{Diff}, cohesion, shape, differential forms, fibre bundles and stacks. The present volume covers Chapter 9, Symplectic Diffeology, and to two subjects that follow it: prequantisation, for which the integration bundles of art. 8.42 are the starting point, and symplectic reduction.

The method is the one of Volume I. Each construction of the book is first stated in its own terms, with the article number; it is then identified with a universal construction in the quasitopos Diff\mathsf{Diff}, the topos SmoothSet\mathsf{SmoothSet} of smooth sets or the ∞\infty-topos H=Sh∞(Cart)\mathbf{H}=\mathsf{Sh}_\infty(\mathsf{Cart}); and the identification is used to prove something further. In Part II the further results are the three theorems (A), (B), (C) of the abstract, proved by elementary arguments with plots and valid for every diffeological space and every diffeological group.

What is used from Volume I

The reader needs the following, cited as [I, …].

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.

image

application chapter uses
7 Number theory 1, 2, 4; [I, Chapters 9, 10]
8 Cryptography 4, 5; Number theory: periods, ideals, and Heisenberg quasi-nilmanifolds
9 Machine learning 2, 5, 6
10 Artificial intelligence 2, 5, 6; Machine learning: conservation laws of learning dynamics
11 System design 1, 6
12 The general structure 5, 6; Machine learning: conservation laws of learning dynamics, Artificial intelligence: invariants, phases, and reachability, System design: composition, ports, and reduction
13 Differentiable programs Machine learning: conservation laws of learning dynamics, The general structure: descent along an atlas; the package dprog

Every chapter ends with solved exercises. Their level is marked by one to four stars: warm-up, computation, argument, proof. Exercises of the fourth level are propositions of the text whose proofs were deferred.

Conventions

Domains are open subsets of some Rn\mathbb{R}^n; plots are defined on domains, or equivalently on Cartesian spaces. Manifolds are finite-dimensional, Hausdorff and paracompact. Groups act on the left. For a diffeological group GG, the space G∗\mathcal{G}^{*} of momenta is the space of left-invariant 11-forms on GG [IZ, art. 7.12]. A torus of periods is a quotient TP=R/PT_P=\mathbb{R}/P by a subgroup P⊊RP\subsetneq\mathbb{R}; its canonical 11-form θ\theta is the image of dt\mathrm{d}t. The Heisenberg group of a bilinear form BB on a vector space VV is HB=V×R\mathsf{H}_B=V\times\mathbb{R} with (v,z)(v′,z′)=(v+v′, z+z′−B(v,v′))(v,z)(v',z')=(v+v',\,z+z'-B(v,v')). References of the form [IZ, art. 9.1] are to articles of [1].

Symplectic diffeology

Closed 2-forms

A parasymplectic space is a diffeological space with a closed 22-form, that is, a map to the classifying sheaf Ωcl2\Omega^{2}_{\mathrm{cl}}. The category of parasymplectic spaces is a slice of the topos of smooth sets. We list the examples used throughout, compute the forms on quasi-tori, recall the chain-homotopy operator KK that transgresses forms to path spaces, and prove a lemma on 11-forms on products that carries most of the proofs of Part II.

Parasymplectic spaces

A differential kk-form on a diffeological space XX assigns to every plot P ⁣:U→XP\colon U\to X a form ω(P)∈Ωk(U)\omega(P)\in\Omega^k(U), compatibly with smooth reparametrisation [IZ, art. 6.28]. Equivalently it is a map X→ΩkX\to\Omega^k in SmoothSet\mathsf{SmoothSet}, where Ωk\Omega^k is the sheaf U↦Ωk(U)U\mapsto\Omega^k(U) on Cart\mathsf{Cart} [I, §6.1]. The exterior derivative is a map of sheaves d ⁣:Ωk→Ωk+1\mathrm{d}\colon\Omega^k\to\Omega^{k+1}, and its kernel in degree 22 is the sheaf Ωcl2\Omega^{2}_{\mathrm{cl}} of closed 22-forms. The sheaf Ωcl2\Omega^{2}_{\mathrm{cl}} has exactly one point, since a 22-form on R0\mathbb{R}^0 vanishes.

Definition 1.1. A parasymplectic space is a pair (X,ω)(X,\omega) of a diffeological space and a closed 22-form ω∈Ω2(X)\omega\in\Omega^2(X), dω=0\mathrm{d}\omega=0. A morphism (X,ω)→(X′,ω′)(X,\omega)\to(X',\omega') is a smooth map ff with f∗ω′=ωf^*\omega'=\omega. The category is denoted PSymp\mathsf{PSymp}, and the group of automorphisms of (X,ω)(X,\omega), with the functional diffeology, is Diff⁡(X,ω)\operatorname{Diff}(X,\omega).

No condition of non-degeneracy is imposed. A diffeological space has no tangent spaces on which to state one, and in [1] its role is taken by a property of the universal moment map (Coadjoint orbits). The term parasymplectic is that of [43].

Proposition 1.2 (The slice).

  1. PSymp\mathsf{PSymp} is the full subcategory of the slice topos SmoothSet/Ωcl2\mathsf{SmoothSet}/\Omega^{2}_{\mathrm{cl}} on the objects ω ⁣:X→Ωcl2\omega\colon X\to\Omega^{2}_{\mathrm{cl}} with XX diffeological, and Diff⁡(X,ω)\operatorname{Diff}(X,\omega) is the automorphism group of ω\omega in the slice.

  2. PSymp\mathsf{PSymp} has pullbacks and equalisers, computed in Diff\mathsf{Diff}. The product of (X,ω)(X,\omega) and (X′,ω′)(X',\omega') in PSymp\mathsf{PSymp} is the diffeological space X×ωX′  =  X×Ωcl2X′,X\times_\omega X'\;=\;X\times_{\Omega^{2}_{\mathrm{cl}}}X', whose underlying set is X×X′X\times X' and whose plots are the pairs of plots (P,P′)(P,P') with ω(P)=ω′(P′)\omega(P)=\omega'(P').

  3. The addition of forms + ⁣:Ωcl2×Ωcl2→Ωcl2+\colon\Omega^{2}_{\mathrm{cl}}\times\Omega^{2}_{\mathrm{cl}}\to\Omega^{2}_{\mathrm{cl}} induces a symmetric monoidal structure (X,ω)⊞(X′,ω′)=(X×X′, pr1∗ω+pr2∗ω′)(X,\omega)\boxplus(X',\omega')=(X\times X',\ \mathrm{pr}_1^*\omega+\mathrm{pr}_2^*\omega') with unit the point, and (X,ω)↦X‾=(X,−ω)(X,\omega)\mapsto\overline{X}=(X,-\omega) is an involution.

Proof. (i) A map X→Ωcl2X\to\Omega^{2}_{\mathrm{cl}} is a closed 22-form, and a map over Ωcl2\Omega^{2}_{\mathrm{cl}} is a smooth map compatible with the forms. (ii) Limits of connected diagrams in a slice are computed in the ambient category, and Diff↪SmoothSet\mathsf{Diff}\hookrightarrow\mathsf{SmoothSet} preserves limits [I, Theorem 4.5]. The product in a slice is the fibre product over the base. The fibre product X×Ωcl2X′X\times_{\Omega^{2}_{\mathrm{cl}}}X' is a subsheaf of the concrete sheaf X×X′X\times X', hence concrete; its sections over UU are the pairs (P,P′)(P,P') with equal images in Ωcl2(U)\Omega^{2}_{\mathrm{cl}}(U); and its points are all pairs (x,x′)(x,x'), because Ωcl2\Omega^{2}_{\mathrm{cl}} has one point. (iii) The sheaf Ωcl2\Omega^{2}_{\mathrm{cl}} is an abelian group object, and the stated product is the composite X×X′→Ωcl2×Ωcl2→Ωcl2X\times X'\to\Omega^{2}_{\mathrm{cl}}\times\Omega^{2}_{\mathrm{cl}}\to\Omega^{2}_{\mathrm{cl}}. ◻

The space X×ωX′X\times_\omega X' has the points of the product and fewer plots. It is used in System design: composition, ports, and reduction as the universal isotropic correspondence: a smooth map (s,t) ⁣:L→X×X′(s,t)\colon L\to X\times X' factors through X×ωX′X\times_\omega X' if and only if s∗ω=t∗ω′s^*\omega=t^*\omega'.

Parasymplectic spaces as objects over Ωcl2\Omega^{2}_{\mathrm{cl}}: a morphism, the product in the slice, and the monoidal sum.

Examples

Example 1.3 (Manifolds). A manifold with a closed 22-form is a parasymplectic space, and PSymp\mathsf{PSymp} contains the category of presymplectic manifolds and form-preserving maps as a full subcategory. Symplectic manifolds are characterised inside PSymp\mathsf{PSymp} by Theorem 1.6.

Example 1.4 (Dimension one). Every 22-form on the irrational torus Tα=R/(Z+αZ)T_{\alpha}=\mathbb{R}/(\mathbb{Z}+\alpha\mathbb{Z}) vanishes: its pullback to R\mathbb{R} is a 22-form on a 11-manifold, and pullback along a subduction is injective. The same holds for every quotient of a 11-manifold.

Proposition 1.5 (Forms on quasi-tori). Let Γ⊂Rn\Gamma\subset\mathbb{R}^n be a dense subgroup and q ⁣:Rn→TΓ=Rn/Γq\colon\mathbb{R}^n\to T_\Gamma=\mathbb{R}^n/\Gamma the projection. Then q∗q^* identifies Ωk(TΓ)\Omega^k(T_\Gamma) with the space Λk(Rn)∗\Lambda^k(\mathbb{R}^n)^* of constant kk-forms. Every form on TΓT_\Gamma is closed, and (TΓ,ωΩ)(T_\Gamma,\omega_\Omega) is a parasymplectic space for every alternating bilinear form Ω\Omega on Rn\mathbb{R}^n.

The proof is [exo:forms-quasitori]. For n=2n=2 and Γ\Gamma of rank at least 33 these are the symplectic irrational tori of [IZ, art. 9.30]; their arithmetic is the subject of Number theory: periods, ideals, and Heisenberg quasi-nilmanifolds.

Example 1.6 (The cone orbifold). Let Qm=C/ZmQ_m=\mathbb{C}/\mathbb{Z}_m be the quotient of the plane by the rotations of order mm, identified with C\mathbb{C} by z↦w=zmz\mapsto w=z^m. The form dx∧dy\mathrm{d}x\wedge\mathrm{d}y is invariant under rotations and descends to a closed 22-form ωm\omega_m on QmQ_m, and every 22-form on QmQ_m is f ωmf\,\omega_m for a smooth function ff [IZ, art. 9.32]. In the coordinate w=u+ivw=u+iv of the regular stratum, ωm=m−2∣w∣2/m−2 du∧dv\omega_m=m^{-2}\lvert w\rvert^{2/m-2}\,\mathrm{d}u\wedge\mathrm{d}v ([exo:cone-form]): a smooth form on QmQ_m whose coefficient in the coordinate ww is singular at the origin.

Example 1.7 (Infinite dimensions). On the Hilbert space H\mathcal H of square-summable complex sequences with the fine diffeology, α=12i∑k(zˉk dzk−zk dzˉk)\alpha=\tfrac1{2i}\sum_k(\bar z_k\,\mathrm{d}z_k-z_k\,\mathrm{d}\bar z_k) is a 11-form, ω=dα\omega=\mathrm{d}\alpha is a closed 22-form, and both restrict to the unit sphere and descend to the infinite projective space [IZ, art. 9.33]. The spaces of this example are diffeological vector spaces and their quotients; none is a Banach manifold with its usual structure.

Three parasymplectic spaces used throughout: a symplectic quasi-torus, the cone orbifold, and a product of spheres with incommensurable areas.

Transgression to paths

The space Paths⁡(X)=C∞(R,X)\operatorname{Paths}(X)=C^{\infty}(\mathbb{R},X) carries the functional diffeology, and 0^,1^ ⁣:Paths⁡(X)→X\hat0,\hat1\colon\operatorname{Paths}(X)\to X are the evaluations at 00 and 11.

Theorem 1.8 (The chain-homotopy operator, [IZ, art. 6.83–6.86]). For every diffeological space XX and every k≥1k\ge1 there is a linear operator K ⁣:Ωk(X)→Ωk−1(Paths⁡(X))K\colon\Omega^k(X)\to\Omega^{k-1}(\operatorname{Paths}(X)) such that K∘d+d∘K=1^∗−0^∗, K\circ\mathrm{d}+\mathrm{d}\circ K=\hat1^*-\hat0^* , natural in XX: for a smooth f ⁣:X→X′f\colon X\to X' with induced f∗ ⁣:Paths⁡(X)→Paths⁡(X′)f_*\colon\operatorname{Paths}(X)\to\operatorname{Paths}(X'), one has K∘f∗=(f∗)∗∘KK\circ f^*=(f_*)^*\circ K. For a plot Φ ⁣:U→Paths⁡(X)\Phi\colon U\to\operatorname{Paths}(X) with adjunct Φ~ ⁣:U×R→X\tilde\Phi\colon U\times\mathbb{R}\to X, (Kω)(Φ)=∫01(ι∂tΦ~∗ω)∣U×{t} dt.(K\omega)(\Phi)=\int_0^1\bigl(\iota_{\partial_t}\tilde\Phi^*\omega\bigr)\big|_{U\times\{t\}}\,\mathrm{d}t . For k=1k=1, KαK\alpha is the function p↦∫pαp\mapsto\int_p\alpha.

The operator is integration along the fibres of Paths⁡(X)×[0,1]→Paths⁡(X)\operatorname{Paths}(X)\times[0,1]\to\operatorname{Paths}(X) of the pullback of ω\omega by the evaluation map, and (1) is Stokes’ formula for that fibre. If ω\omega is closed then by (1) the restriction of KωK\omega to Loops⁡(X)\operatorname{Loops}(X) is closed.

Definition 1.9 ([IZ, art. 8.42]). Let (X,ω)(X,\omega) be parasymplectic. The group of periods Pω⊂RP_\omega\subset\mathbb{R} is the group of the integrals of KωK\omega over the loops in Loops⁡(X)\operatorname{Loops}(X). A smooth map S ⁣:T2→XS\colon T^2\to X has the toric period ∫T2S∗ω∈Pω\int_{T^2}S^*\omega\in P_\omega.

Example 1.10. For the quasi-torus (TΓ,ωΩ)(T_\Gamma,\omega_\Omega) and γ,γ′∈Γ\gamma,\gamma'\in\Gamma, the map (s,t)↦q(sγ+tγ′)(s,t)\mapsto q(s\gamma+t\gamma') is defined on T2T^2 and has toric period Ω(γ,γ′)\Omega(\gamma,\gamma'). So Pω⊇Ω(Γ∧Γ)P_\omega\supseteq\Omega(\Gamma\wedge\Gamma), the subgroup generated by the values of Ω\Omega on Γ\Gamma. For S2×S2S^2\times S^2 with the form c1ω1+c2ω2c_1\omega_1+c_2\omega_2, where ∫S2ωi=2π\int_{S^2}\omega_i=2\pi, the group of periods is 2π(c1Z+c2Z)2\pi(c_1\mathbb{Z}+c_2\mathbb{Z}): it is dense in R\mathbb{R} when c1/c2c_1/c_2 is irrational.

One-forms on products

The following lemma replaces, for 11-forms, the decomposition of a tangent vector to a product into its two components.

Lemma 1.11 (Slices). Let AA and BB be diffeological spaces. A 11-form β\beta on A×BA\times B is determined by its restrictions to the slices A×{b}A\times\{b\} and {a}×B\{a\}\times B. Precisely, for plots P ⁣:U→AP\colon U\to A and Q ⁣:U→BQ\colon U\to B let β1,β2\beta_1,\beta_2 be the components of β(P×Q)∈Ω1(U×U)\beta(P\times Q)\in\Omega^1(U\times U) along the two factors; then β(P,Q)=Δ∗β(P×Q),β1∣U×{s}=β(P,constQ(s)),β2∣{r}×U=β(constP(r),Q), \beta(P,Q)=\Delta^*\beta(P\times Q),\quad \beta_1|_{U\times\{s\}}=\beta\bigl(P,\mathrm{const}_{Q(s)}\bigr),\quad \beta_2|_{\{r\}\times U}=\beta\bigl(\mathrm{const}_{P(r)},Q\bigr), where Δ ⁣:U→U×U\Delta\colon U\to U\times U is the diagonal.

The proof is [exo:slices]. The statement is false for 22-forms: dx∧dy\mathrm{d}x\wedge\mathrm{d}y on R×R\mathbb{R}\times\mathbb{R} restricts to zero on every slice.

Corollary 1.12. Let GG act smoothly on YY, with action map Φ ⁣:G×Y→Y\Phi\colon G\times Y\to Y, and let λ∈Ω1(Y)\lambda\in\Omega^1(Y). Then Φ∗λ=prY∗λ\Phi^*\lambda=\mathrm{pr}_Y^*\lambda on G×YG\times Y if and only if gY∗λ=λg_Y^*\lambda=\lambda for every g∈Gg\in G and y^∗λ=0\hat y^*\lambda=0 for every y∈Yy\in Y, where y^ ⁣:G→Y\hat y\colon G\to Y is the orbit map g↦g⋅yg\mapsto g\cdot y.

Proof. Apply 1.11 to β=Φ∗λ−prY∗λ\beta=\Phi^*\lambda-\mathrm{pr}_Y^*\lambda. Its restriction to {g}×Y\{g\}\times Y is gY∗λ−λg_Y^*\lambda-\lambda, and its restriction to G×{y}G\times\{y\} is y^∗λ\hat y^*\lambda, because prY\mathrm{pr}_Y is constant on that slice. ◻

Solved exercises

Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.

1 Show that a closed 22-form on a quotient M/∼M/{\sim} of a surface MM by an equivalence relation is determined by a closed 22-form on MM, and that on a quotient of a curve it vanishes.

Solution.  The projection q ⁣:M→M/∼q\colon M\to M/{\sim} is a subduction, so q∗q^* is injective on forms [I, Proposition 6.4]. A form ω\omega on the quotient is therefore determined by q∗ω∈Ω2(M)q^*\omega\in\Omega^2(M), which is closed. If MM is a curve then Ω2(M)=0\Omega^2(M)=0. ◀\blacktriangleleft

2 Verify the formula ωm=m−2∣w∣2/m−2 du∧dv\omega_m=m^{-2}\lvert w\rvert^{2/m-2}\,\mathrm{d}u\wedge\mathrm{d}v of 1.6 on the regular stratum of QmQ_m, and show that the form du∧dv\mathrm{d}u\wedge\mathrm{d}v in the coordinate ww is also a smooth 22-form on QmQ_m. Which function ff gives du∧dv=f ωm\mathrm{d}u\wedge\mathrm{d}v=f\,\omega_m?

Solution.  The projection is πm(z)=zm=w\pi_m(z)=z^m=w. For a holomorphic map, πm∗(du∧dv)=∣πm′(z)∣2dx∧dy=m2∣z∣2m−2dx∧dy\pi_m^*(\mathrm{d}u\wedge\mathrm{d}v)=\lvert \pi_m'(z)\rvert^2\mathrm{d}x\wedge\mathrm{d}y=m^2\lvert z\rvert^{2m-2}\mathrm{d}x\wedge\mathrm{d}y. Since ∣z∣=∣w∣1/m\lvert z\rvert=\lvert w\rvert^{1/m}, on the regular stratum dx∧dy=πm∗(m−2∣w∣2/m−2du∧dv)\mathrm{d}x\wedge\mathrm{d}y=\pi_m^*\bigl(m^{-2}\lvert w\rvert^{2/m-2}\mathrm{d}u\wedge\mathrm{d}v\bigr), which is the formula. For the second statement, the plots of QmQ_m are locally of the form φm\varphi^m with φ\varphi a smooth parametrisation in C\mathbb{C} [IZ, art. 9.32], so they are smooth parametrisations in C\mathbb{C} and every form on the manifold C\mathbb{C} restricts to a form on QmQ_m. By the first computation du∧dv=fωm\mathrm{d}u\wedge\mathrm{d}v=f\omega_m with f(w)=m2∣w∣2−2/mf(w)=m^2\lvert w\rvert^{2-2/m}, and f∘πm=m2∣z∣2m−2f\circ\pi_m=m^2\lvert z\rvert^{2m-2} is smooth, so ff is a smooth function on QmQ_m. ◀\blacktriangleleft

2 Let f ⁣:X→X′f\colon X\to X' be a smooth map between parasymplectic spaces. Show that the following are equivalent: (a) f∗ω′=ωf^*\omega'=\omega; (b) the graph (id,f) ⁣:X→X‾⊞X′(\mathrm{id},f)\colon X\to\overline X\boxplus X' pulls the form back to zero; (c) the graph is a smooth map X→X×ωX′X\to X\times_\omega X'.

Solution.  The form of X‾⊞X′\overline X\boxplus X' is pr2∗ω′−pr1∗ω\mathrm{pr}_2^*\omega'-\mathrm{pr}_1^*\omega, and its pullback by (id,f)(\mathrm{id},f) is f∗ω′−ωf^*\omega'-\omega; so (a)  ⟺  \iff(b). For a plot PP of XX, the pair (P,f∘P)(P,f\circ P) is a plot of X×ωX′X\times_\omega X' if and only if ω(P)=ω′(f∘P)=(f∗ω′)(P)\omega(P)=\omega'(f\circ P)=(f^*\omega')(P); so (a)  ⟺  \iff(c). ◀\blacktriangleleft

3 Prove 1.5.

Solution.  Let ω∈Ωk(TΓ)\omega\in\Omega^k(T_\Gamma) and ω~=q∗ω∈Ωk(Rn)\tilde\omega=q^*\omega\in\Omega^k(\mathbb{R}^n). For γ∈Γ\gamma\in\Gamma the translation tγt_\gamma satisfies q∘tγ=qq\circ t_\gamma=q, so tγ∗ω~=ω~t_\gamma^*\tilde\omega=\tilde\omega: the coefficients of ω~\tilde\omega are smooth functions invariant under a dense group of translations, hence constant. Conversely let ω~\tilde\omega be a constant form, and let P,P′P,P' be plots of Rn\mathbb{R}^n with q∘P=q∘P′q\circ P=q\circ P'. Then P′−PP'-P is continuous with values in the countable set Γ\Gamma, so it is locally constant, P′=tγ∘PP'=t_\gamma\circ P locally, and ω~(P′)=ω~(P)\tilde\omega(P')=\tilde\omega(P). By the descent criterion [I, Proposition 6.4] there is a unique ω\omega with q∗ω=ω~q^*\omega=\tilde\omega. Since q∗q^* is injective and commutes with d\mathrm{d}, and constant forms are closed, every form on TΓT_\Gamma is closed. ◀\blacktriangleleft

4 Prove 1.11.

Solution.  The plot (P,Q) ⁣:U→A×B(P,Q)\colon U\to A\times B is the composite of the diagonal Δ\Delta with the plot P×Q ⁣:U×U→A×BP\times Q\colon U\times U\to A\times B, (r,s)↦(P(r),Q(s))(r,s)\mapsto(P(r),Q(s)), so β(P,Q)=Δ∗β(P×Q)\beta(P,Q)=\Delta^*\beta(P\times Q) by the compatibility of a form with reparametrisation. Write β(P×Q)=β1+β2\beta(P\times Q)=\beta_1+\beta_2, where β1\beta_1 is a combination of the dri\mathrm{d}r_i and β2\beta_2 of the dsj\mathrm{d}s_j, with coefficients smooth in (r,s)(r,s). The restriction of β(P×Q)\beta(P\times Q) to U×{s}U\times\{s\} is the value of β\beta on the plot r↦(P(r),Q(s))r\mapsto(P(r),Q(s)), which is the plot (P,constQ(s))(P,\mathrm{const}_{Q(s)}) of the slice A×{Q(s)}A\times\{Q(s)\}; and that restriction is β1∣U×{s}\beta_1|_{U\times\{s\}}, because the dsj\mathrm{d}s_j vanish on the slice. The same argument gives β2\beta_2. Hence the restrictions of β\beta to the slices determine β1\beta_1 and β2\beta_2 for every pair of plots, and so determine β(P,Q)\beta(P,Q). Every plot of A×BA\times B is of the form (P,Q)(P,Q), so β\beta is determined. ◀\blacktriangleleft

Moment maps

For a diffeological group GG acting on a parasymplectic space, a moment map is constructed in [1, 44] with values in a quotient of the space of momenta of GG. We state the construction and its properties with the article numbers, compute the examples, and identify the moment map in the exact case as the obstruction to the descent of a primitive to the homotopy quotient.

Momenta

Definition 1.1 ([IZ, art. 7.12, 7.15]). Let GG be a diffeological group, with left and right multiplications L(g) ⁣:k↦gkL(g)\colon k\mapsto gk and R(g) ⁣:k↦kgR(g)\colon k\mapsto kg. The space of momenta of GG is the vector space G∗={ α∈Ω1(G)∣L(g)∗α=α for all g∈G },\mathcal{G}^{*}=\{\,\alpha\in\Omega^1(G)\mid L(g)^*\alpha=\alpha\ \text{for all }g\in G\,\}, with the functional diffeology. The coadjoint action of GG on G∗\mathcal{G}^{*} is Ad⁡∗(g)(α)=Ad⁡(g−1)∗α=R(g)∗α\operatorname{Ad}_*(g)(\alpha)=\operatorname{Ad}(g^{-1})^*\alpha=R(g)^*\alpha.

The notation recalls the dual of a Lie algebra, and for a Lie group G∗\mathcal{G}^{*} is that dual, a left-invariant 11-form being determined by its value at the identity. In general G∗\mathcal{G}^{*} is defined by invariance and by no duality.

Example 1.2.

  1. If GG is discrete, every form of positive degree on GG vanishes and G∗=0\mathcal{G}^{*}=0.

  2. For a torus of periods TP=R/PT_P=\mathbb{R}/P, the pullback of a momentum to R\mathbb{R} is a translation-invariant 11-form, so G∗=R θ\mathcal{G}^{*}=\mathbb{R}\,\theta. For a quasi-torus Rn/Γ\mathbb{R}^n/\Gamma, and for the vector group Rn\mathbb{R}^n itself, G∗=(Rn)∗\mathcal{G}^{*}=(\mathbb{R}^n)^*, and the coadjoint action is trivial.

  3. For G=Diff⁡(X,ω)G=\operatorname{Diff}(X,\omega) the space Gω∗\mathcal{G}^{*}_\omega is infinite-dimensional in general; it is the target of the universal moment map of Coadjoint orbits.

The paths moment map

Let (X,ω)(X,\omega) be a parasymplectic space and ρ ⁣:G→Diff⁡(X,ω)\rho\colon G\to\operatorname{Diff}(X,\omega) a smooth action, written g⋅xg\cdot x. For a path p∈Paths⁡(X)p\in\operatorname{Paths}(X) let p^ ⁣:G→Paths⁡(X)\hat p\colon G\to\operatorname{Paths}(X) be the orbit map g↦g∘pg\mapsto g\circ p.

Theorem 1.3 (The paths moment map, [IZ, art. 9.1–9.6]). The 11-form Ψ(p)=p^∗(Kω)\Psi(p)=\hat p^*(K\omega) on GG is left-invariant, and the paths moment map Ψ ⁣:Paths⁡(X)→G∗\Psi\colon\operatorname{Paths}(X)\to\mathcal{G}^{*} is smooth. Moreover:

  1. Ψ(p∨p′)=Ψ(p)+Ψ(p′)\Psi(p\vee p')=\Psi(p)+\Psi(p') for composable stationary paths;

  2. Ψ(g∘p)=Ad⁡∗(g)(Ψ(p))\Psi(g\circ p)=\operatorname{Ad}_*(g)\bigl(\Psi(p)\bigr);

  3. d Ψ(p)=x^1∗ω−x^0∗ω\mathrm{d}\,\Psi(p)=\hat x_1^*\omega-\hat x_0^*\omega, where xi=p(i)x_i=p(i) and x^ ⁣:G→X\hat x\colon G\to X is the orbit map of a point;

  4. Ψ(p)=Ψ(p′)\Psi(p)=\Psi(p') if pp and p′p' are homotopic with fixed ends.

For a plot P ⁣:U→GP\colon U\to G, with a~ ⁣:U×R→X\tilde a\colon U\times\mathbb{R}\to X, a~(r,t)=P(r)⋅p(t)\tilde a(r,t)=P(r)\cdot p(t), Ψ(p)(P)=∫01(ι∂ta~∗ω)∣U×{t} dt. \Psi(p)(P)=\int_0^1\bigl(\iota_{\partial_t}\tilde a^*\omega\bigr)\big|_{U\times\{t\}}\,\mathrm{d}t .

Left-invariance follows from the naturality of KK and the invariance of ω\omega, and (3) is the formula of Theorem 1.8; for a manifold it is the formula Ψ(p)(P)r(δr)=∫01ω(p˙(t),δp(t))dt\Psi(p)(P)_r(\delta r)=\int_0^1\omega\bigl(\dot p(t),\delta p(t)\bigr)\mathrm{d}t of [IZ, art. 9.20]. Parts (ii) and (iii) are [exo:Psi].

Formula (3) has a geometric content (1.1). A plot of GG moves the path pp and sweeps a strip in XX; the moment Ψ(p)\Psi(p) evaluated on the plot is the integral of ω\omega over the strip, in the direction of the path. In the language of Closed 2-forms: Ψ(p)\Psi(p) is the transgression of ω\omega along the map G×[0,1]→XG\times[0,1]\to X, (g,t)↦g⋅p(t)(g,t)\mapsto g\cdot p(t).

Left: the paths moment map integrates ω\omega over the strip swept by a path under a plot of GG; its differential is carried by the two ends. Right: the passage from the paths moment map to the two-points moment map and to a moment map.

Holonomy, moment maps, and the Souriau class

From now on XX is connected.

Theorem 1.4 ([IZ, art. 9.7–9.10]). Let GG act on the connected parasymplectic space (X,ω)(X,\omega).

  1. Holonomy. Γ=Ψ(Loops⁡(X))\Gamma=\Psi(\operatorname{Loops}(X)) is a subgroup of G∗\mathcal{G}^{*}, the image of a homomorphism π1(X)→G∗\pi_1(X)\to\mathcal{G}^{*}. Its elements are closed and invariant under the coadjoint action.

  2. Two-points moment map. There is a unique smooth ψ ⁣:X×X→G∗/Γ\psi\colon X\times X\to\mathcal{G}^{*}/\Gamma with ψ(p(0),p(1))=class Ψ(p)\psi(p(0),p(1))=\mathrm{class}\,\Psi(p). It satisfies ψ(x,x′′)=ψ(x,x′)+ψ(x′,x′′)\psi(x,x'')=\psi(x,x')+\psi(x',x'') and ψ(gx,gx′)=Ad⁡∗Γ(g) ψ(x,x′)\psi(g x,g x')=\operatorname{Ad}_*^\Gamma(g)\,\psi(x,x').

  3. Moment maps. There is a smooth μ ⁣:X→G∗/Γ\mu\colon X\to\mathcal{G}^{*}/\Gamma with ψ(x,x′)=μ(x′)−μ(x)\psi(x,x')=\mu(x')-\mu(x), unique up to an additive constant.

  4. Souriau cocycle. The map θ(g)=μ(gx)−Ad⁡∗Γ(g) μ(x)\theta(g)=\mu(g x)-\operatorname{Ad}_*^\Gamma(g)\,\mu(x) is independent of xx and satisfies θ(gg′)=Ad⁡∗Γ(g) θ(g′)+θ(g)\theta(gg')=\operatorname{Ad}_*^\Gamma(g)\,\theta(g')+\theta(g). Its class σ∈H1(G,G∗/Γ)\sigma\in H^1(G,\mathcal{G}^{*}/\Gamma) is independent of the choice of μ\mu.

The action is called Hamiltonian if Γ=0\Gamma=0 and exact if σ=0\sigma=0, that is, if some moment map is equivariant.

Two features distinguish this from the classical definition. The moment map exists for every action that preserves ω\omega; the obstructions appear in its target G∗/Γ\mathcal{G}^{*}/\Gamma and in the class σ\sigma. And the target is in general a diffeological space that is not a vector space: for the translations of a quasi-torus it is again a quasi-torus (1.9).

Theorem 1.5 (The exact case, [IZ, art. 9.11]). Suppose ω=dα\omega=\mathrm{d}\alpha with α\alpha invariant under GG. Then Ψ(p)=x^1∗α−x^0∗α\Psi(p)=\hat x_1^*\alpha-\hat x_0^*\alpha, the action is Hamiltonian and exact, and μ ⁣:X→G∗,μ(x)=x^∗α,\mu\colon X\to\mathcal{G}^{*},\qquad\mu(x)=\hat x^*\alpha, is an equivariant moment map.

Proof. By (1), Kω=Kdα=1^∗α−0^∗α−d(Kα)K\omega=K\mathrm{d}\alpha=\hat1^*\alpha-\hat0^*\alpha-\mathrm{d}(K\alpha). The function Kα∘p^K\alpha\circ\hat p is g↦∫g∘pα=∫pg∗α=∫pαg\mapsto\int_{g\circ p}\alpha=\int_pg^*\alpha=\int_p\alpha, a constant; so p^∗d(Kα)=0\hat p^*\mathrm{d}(K\alpha)=0 and Ψ(p)=(1^∘p^)∗α−(0^∘p^)∗α\Psi(p)=(\hat1\circ\hat p)^*\alpha-(\hat0\circ\hat p)^*\alpha, with ı^∘p^=x^i\hat\imath\circ\hat p=\hat x_i. For a loop this vanishes. Equivariance: gx^=x^∘R(g)\widehat{g x}=\hat x\circ R(g), so μ(gx)=R(g)∗μ(x)=Ad⁡∗(g)μ(x)\mu(gx)=R(g)^*\mu(x)=\operatorname{Ad}_*(g)\mu(x). ◻

The moment map as an obstruction to descent

For an action with action map a ⁣:G×X→Xa\colon G\times X\to X, the homotopy quotient X/ ⁣ ⁣/GX/\!\!/G is the colimit in H\mathbf{H} of the simplicial object ⋯G×G×X→G×X⇉X\cdots G\times G\times X\to G\times X\rightrightarrows X [I, §7.2]. Since Ωk\Omega^k is a sheaf of sets, a map X/ ⁣ ⁣/G→ΩkX/\!\!/G\to\Omega^k is a form on XX whose two pullbacks to G×XG\times X coincide: Ωk(X/ ⁣ ⁣/G)={ β∈Ωk(X)∣a∗β=prX∗β }. \Omega^k(X/\!\!/G)=\{\,\beta\in\Omega^k(X)\mid a^*\beta=\mathrm{pr}_X^*\beta\,\}.

Proposition 1.6 (Basic forms).

  1. If the action is principal, π∗\pi^* identifies Ωk(X/G)\Omega^k(X/G) with the space (4).

  2. For k=1k=1 the condition a∗β=prX∗βa^*\beta=\mathrm{pr}_X^*\beta holds if and only if β\beta is invariant and x^∗β=0\hat x^*\beta=0 for every x∈Xx\in X.

  3. If α\alpha is an invariant 11-form with dα=ω\mathrm{d}\alpha=\omega and μ\mu is the moment map of 1.5, then a∗α−prX∗αa^*\alpha-\mathrm{pr}_X^*\alpha is the 11-form on G×XG\times X whose restriction to G×{x}G\times\{x\} is μ(x)\mu(x) and whose restriction to {g}×X\{g\}\times X is zero. In particular α\alpha is a 11-form on X/ ⁣ ⁣/GX/\!\!/G if and only if μ=0\mu=0.

The proof is [exo:basic]. Part (iii) is the first appearance of the theme of Part II: the moment map is the component along GG of the difference of the two pullbacks to G×XG\times X. Invariance is a condition on each slice {g}×X\{g\}\times X; the moment map is the remaining condition on the slices G×{x}G\times\{x\}.

Examples

Example 1.7 (Rotations). On C\mathbb{C} with ω=dx∧dy=dα\omega=\mathrm{d}x\wedge\mathrm{d}y=\mathrm{d}\alpha, α=12(x dy−y dx)\alpha=\tfrac12(x\,\mathrm{d}y-y\,\mathrm{d}x), the circle S1=R/2πZS^1=\mathbb{R}/2\pi\mathbb{Z} acts by rotations and preserves α\alpha. The orbit map of zz is φ↦eiφz\varphi\mapsto e^{i\varphi}z, and z^∗α=12∣z∣2dφ\hat z^*\alpha=\tfrac12\lvert z\rvert^2\mathrm{d}\varphi: the moment map is μ(z)=12∣z∣2\mu(z)=\tfrac12\lvert z\rvert^2 in the basis dφ\mathrm{d}\varphi of G∗\mathcal{G}^{*}. On the cone orbifold QmQ_m the moment map of the residual circle is μm(w)=12m∣w∣2/m\mu_m(w)=\tfrac1{2m}\lvert w\rvert^{2/m} ([exo:cone-moment]).

Example 1.8 (Translations, [IZ, art. 9.30]). The group G=RnG=\mathbb{R}^n acts on itself by translations and preserves every constant 22-form Ω\Omega. By (3), for a path from xx to yy, Ψ(p)=Ω(y−x,⋅)∈(Rn)∗\Psi(p)=\Omega(y-x,\cdot)\in(\mathbb{R}^n)^*. The holonomy is trivial, the moment maps are μ(x)=Ω(x,⋅)+c\mu(x)=\Omega(x,\cdot)+c, and the Souriau cocycle is θ(u)=Ω(u,⋅)\theta(u)=\Omega(u,\cdot), because the coadjoint action is trivial. The class σ\sigma is not zero unless Ω=0\Omega=0: no moment map is equivariant. In Equivariance and the moment map the class σ\sigma is identified with the commutator of the Heisenberg group.

Two moment maps. For rotations the target is the line G∗\mathcal{G}^{*} and the levels are the orbits. For the translations of a symplectic quasi-torus the target is a quotient of G∗\mathcal{G}^{*} by the holonomy, and the moment map is an isomorphism.

Proposition 1.9 (The moment map of a quasi-torus). Let Γ⊂Rn\Gamma\subset\mathbb{R}^n be a subgroup and Ω\Omega a non-degenerate alternating form. For the action of Rn\mathbb{R}^n on (TΓ,ωΩ)(T_\Gamma,\omega_\Omega) by translations, the holonomy is Ω(Γ,⋅)⊂(Rn)∗\Omega(\Gamma,\cdot)\subset(\mathbb{R}^n)^*, and the moment map μ ⁣:TΓ=Rn/Γ⟶(Rn)∗/Ω(Γ,⋅),[x]↦[Ω(x,⋅)]\mu\colon T_\Gamma=\mathbb{R}^n/\Gamma\longrightarrow(\mathbb{R}^n)^*/\Omega(\Gamma,\cdot),\qquad[x]\mapsto[\Omega(x,\cdot)] is a diffeomorphism onto a quasi-torus. The action is Hamiltonian only if Γ=0\Gamma=0.

Proof. A loop in TΓT_\Gamma lifts to a path in Rn\mathbb{R}^n from xx to x+γx+\gamma, and the paths moment maps of TΓT_\Gamma and Rn\mathbb{R}^n correspond under the projection, by naturality of KK; so Γhol=Ω(Γ,⋅)\Gamma_{\mathrm{hol}}=\Omega(\Gamma,\cdot) by 1.8. The linear isomorphism x↦Ω(x,⋅)x\mapsto\Omega(x,\cdot) maps Γ\Gamma onto Ω(Γ,⋅)\Omega(\Gamma,\cdot) and induces a diffeomorphism of the quotients, which is a moment map by the same naturality. ◻

So a symplectic quasi-torus is identified by its own moment map with a quotient of the space of momenta of its group of translations. This is the first instance of the statement of Coadjoint orbits that homogeneous symplectic spaces are coadjoint orbits.

Solved exercises

Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.

1 Compute the momenta and the coadjoint action for (a) the group Z+αZ⊂R\mathbb{Z}+\alpha\mathbb{Z}\subset\mathbb{R} with the subspace diffeology, (b) the irrational torus TαT_{\alpha}, (c) the affine group of the line.

Solution.  (a) The plots of a countable subgroup of R\mathbb{R} with the subspace diffeology are locally constant, so the group is discrete and G∗=0\mathcal{G}^{*}=0. (b) G∗=Rθ\mathcal{G}^{*}=\mathbb{R}\theta by 1.2(b), with trivial coadjoint action since the group is abelian. (c) G={ x↦ax+b }G=\{\,x\mapsto ax+b\,\} is a Lie group with coordinates (a,b)(a,b), a>0a>0 on the identity component. The left-invariant forms are spanned by da/a\mathrm{d}a/a and db/a\mathrm{d}b/a. Right multiplication by (a0,b0)(a_0,b_0) is (a,b)↦(aa0,ab0+b)(a,b)\mapsto(aa_0,ab_0+b), so Ad⁡∗(a0,b0)\operatorname{Ad}_*(a_0,b_0) fixes da/a\mathrm{d}a/a and maps db/a\mathrm{d}b/a to a0−1(b0 da/a+db/a)a_0^{-1}(b_0\,\mathrm{d}a/a+\mathrm{d}b/a). ◀\blacktriangleleft

2 Compute the moment map of the circle acting on the cone orbifold QmQ_m by w↦eiφww\mapsto e^{i\varphi}w.

Solution.  The form α=12(x dy−y dx)\alpha=\tfrac12(x\,\mathrm{d}y-y\,\mathrm{d}x) is invariant under rotations, so it descends to a 11-form αm\alpha_m on QmQ_m with dαm=ωm\mathrm{d}\alpha_m=\omega_m (Example 1.6). The rotation w↦eiφww\mapsto e^{i\varphi}w of QmQ_m is covered by z↦eiφ/mzz\mapsto e^{i\varphi/m}z. By 1.5, μm(w)=w^∗αm\mu_m(w)=\hat w^*\alpha_m, and with w=πm(z)w=\pi_m(z) the orbit map of ww is φ↦πm(eiφ/mz)\varphi\mapsto\pi_m(e^{i\varphi/m}z); hence w^∗αm=12∣z∣2 d(φ/m)=12m∣w∣2/mdφ\hat w^*\alpha_m=\tfrac12\lvert z\rvert^2\,\mathrm{d}(\varphi/m)=\tfrac1{2m}\lvert w\rvert^{2/m}\mathrm{d}\varphi. The image of the moment map is the half-line, as for the plane, and its level sets are the circles ∣w∣=const\lvert w\rvert=\mathrm{const}. ◀\blacktriangleleft

2 For the ordinary torus T2=R2/Z2T^2=\mathbb{R}^2/\mathbb{Z}^2 with ω=dx∧dy\omega=\mathrm{d}x\wedge\mathrm{d}y and the action of R2\mathbb{R}^2 by translations, compute the holonomy, a moment map and the Souriau cocycle.

Solution.  By 1.9 with Γ=Z2\Gamma=\mathbb{Z}^2 and Ω((x,y),(x′,y′))=xy′−x′y\Omega\bigl((x,y),(x',y')\bigr)=xy'-x'y: the holonomy is Ω(Z2,⋅)\Omega(\mathbb{Z}^2,\cdot), the lattice of linear forms with integer coefficients, G∗/Γhol=R2/Z2\mathcal{G}^{*}/\Gamma_{\mathrm{hol}}=\mathbb{R}^2/\mathbb{Z}^2, and μ[x,y]=[−y,x]\mu[x,y]=[-y,x] in the basis dual to the coordinates: a rotation of the torus by a quarter turn. The Souriau cocycle is θ(u)=[Ω(u,⋅)]\theta(u)=[\Omega(u,\cdot)]. The action is neither Hamiltonian nor exact; in the classical theory it has no moment map. ◀\blacktriangleleft

3 Prove 1.6.

Solution.  (i) If β=π∗β0\beta=\pi^*\beta_0 then a∗β=(π∘a)∗β0=(π∘prX)∗β0=prX∗βa^*\beta=(\pi\circ a)^*\beta_0=(\pi\circ\mathrm{pr}_X)^*\beta_0=\mathrm{pr}_X^*\beta. Conversely let a∗β=prX∗βa^*\beta=\mathrm{pr}_X^*\beta and let P,P′P,P' be plots of XX with π∘P=π∘P′\pi\circ P=\pi\circ P'. Since the action is principal, P′=g⋅PP'=g\cdot P for a plot gg of GG [I, Theorem 7.2], that is, P′=a∘(g,P)P'=a\circ(g,P). Then β(P′)=(g,P)∗a∗β=(g,P)∗prX∗β=β(P)\beta(P')=(g,P)^*a^*\beta=(g,P)^*\mathrm{pr}_X^*\beta=\beta(P), and β\beta descends by [I, Proposition 6.4]; π∗\pi^* is injective. (ii) is Corollary 1.12 with Y=XY=X. (iii) The form β=a∗α−prX∗α\beta=a^*\alpha-\mathrm{pr}_X^*\alpha restricts to g∗α−α=0g^*\alpha-\alpha=0 on {g}×X\{g\}\times X and to x^∗α=μ(x)\hat x^*\alpha=\mu(x) on G×{x}G\times\{x\}; by Lemma 1.11 these restrictions determine it, and it vanishes if and only if μ=0\mu=0. ◀\blacktriangleleft

4 Prove parts (ii) and (iii) of 1.3, and deduce that the holonomy consists of closed momenta.

Solution.  (ii) For g,k∈Gg,k\in G, g∘p^(k)=k∘g∘p=p^(kg)\widehat{g\circ p}(k)=k\circ g\circ p=\hat p(kg), so g∘p^=p^∘R(g)\widehat{g\circ p}=\hat p\circ R(g) and Ψ(g∘p)=R(g)∗p^∗(Kω)=Ad⁡∗(g)Ψ(p)\Psi(g\circ p)=R(g)^*\hat p^*(K\omega)=\operatorname{Ad}_*(g)\Psi(p). (iii) dΨ(p)=p^∗d(Kω)=p^∗(1^∗ω−0^∗ω−Kdω)\mathrm{d}\Psi(p)=\hat p^*\mathrm{d}(K\omega)=\hat p^*(\hat1^*\omega-\hat0^*\omega-K\mathrm{d}\omega) by (1), and dω=0\mathrm{d}\omega=0. The composite 1^∘p^\hat1\circ\hat p is g↦g⋅p(1)g\mapsto g\cdot p(1), the orbit map of x1x_1; likewise for 0^\hat0. For a loop, x0=x1x_0=x_1 and dΨ(ℓ)=0\mathrm{d}\Psi(\ell)=0. ◀\blacktriangleleft

Coadjoint orbits

Every parasymplectic space has a universal moment map, for the action of its whole group of automorphisms. When that group acts transitively, the moment map is a fibration onto an affine coadjoint orbit; when in addition its fibres are discrete, the space is called symplectic. For manifolds this recovers non-degeneracy. The diffeology of the orbit is a coimage, in the sense of the two factorisation systems of Diff\mathsf{Diff}.

The universal moment map

Let (X,ω)(X,\omega) be a connected parasymplectic space and Gω=Diff⁡(X,ω)G_\omega=\operatorname{Diff}(X,\omega), the automorphism group of ω ⁣:X→Ωcl2\omega\colon X\to\Omega^{2}_{\mathrm{cl}} in the slice (Proposition 1.2). All the constructions of Theorem 1.4 apply to GωG_\omega; they are written Ψω\Psi_\omega, Γω\Gamma_\omega, ψω\psi_\omega, μω\mu_\omega, θω\theta_\omega, σω\sigma_\omega and depend only on (X,ω)(X,\omega).

Proposition 1.1 (Functoriality, [IZ, art. 9.12–9.14]). Let ρ ⁣:G→Gω\rho\colon G\to G_\omega be a smooth action and ρ∗ ⁣:Gω∗→G∗\rho^*\colon\mathcal{G}^{*}_\omega\to\mathcal{G}^{*} the pullback of momenta. Then Ψ=ρ∗∘Ψω,Γ=ρ∗(Γω),ψ=ρΓ∗∘ψω,μ=ρΓ∗∘μω+const,\Psi=\rho^*\circ\Psi_\omega,\qquad\Gamma=\rho^*(\Gamma_\omega),\qquad\psi=\rho^*_\Gamma\circ\psi_\omega,\qquad\mu=\rho^*_\Gamma\circ\mu_\omega+\mathrm{const}, where ρΓ∗ ⁣:Gω∗/Γω→G∗/Γ\rho^*_\Gamma\colon\mathcal{G}^{*}_\omega/\Gamma_\omega\to\mathcal{G}^{*}/\Gamma is induced by ρ∗\rho^*.

Proof. The orbit maps satisfy p^G=p^Gω∘ρ\hat p^{G}=\hat p^{G_\omega}\circ\rho, so Ψ(p)=ρ∗p^∗(Kω)=ρ∗Ψω(p)\Psi(p)=\rho^*\hat p^*(K\omega)=\rho^*\Psi_\omega(p). The other identities follow from the definitions in Theorem 1.4. ◻

So every moment map of every symmetry group of (X,ω)(X,\omega) is a quotient of one map, which depends on the form alone. The group GωG_\omega contains a largest connected subgroup with trivial holonomy, the group Ham⁡(X,ω)\operatorname{Ham}(X,\omega) of Hamiltonian diffeomorphisms [IZ, art. 9.15]; for a symplectic manifold it is the classical group of that name [IZ, art. 9.22].

Homogeneous spaces

Let θ\theta be the Souriau cocycle of a moment map μ\mu. The affine coadjoint action of GG on G∗/Γ\mathcal{G}^{*}/\Gamma is Ad⁡∗Γ,θ(g)(m)=Ad⁡∗Γ(g)(m)+θ(g)\operatorname{Ad}_*^{\Gamma,\theta}(g)(m)=\operatorname{Ad}_*^\Gamma(g)(m)+\theta(g) [IZ, art. 7.16]; it is an action by the cocycle identity, and μ\mu is equivariant for it by the definition of θ\theta. Its orbits are the (Γ,θ)(\Gamma,\theta)-coadjoint orbits.

Recall that XX is homogeneous under GG if the orbit map x^0 ⁣:G→X\hat x_0\colon G\to X is a subduction for one, hence every, point x0x_0 [IZ, art. 7.8].

Theorem 1.2 (The homogeneous case, [IZ, art. 9.18]). Let XX be homogeneous under an action of GG preserving ω\omega, let μ\mu be a moment map with cocycle θ\theta, and let μ0=μ(x0)\mu_0=\mu(x_0). Then O=μ(X)O=\mu(X) is a (Γ,θ)(\Gamma,\theta)-coadjoint orbit, and St⁡(x0)⊆St⁡(μ0)\operatorname{St}(x_0)\subseteq\operatorname{St}(\mu_0). Give OO the pushforward of the diffeology of GG by the orbit map μ^0 ⁣:g↦Ad⁡∗Γ,θ(g)(μ0)\hat\mu_0\colon g\mapsto\operatorname{Ad}_*^{\Gamma,\theta}(g)(\mu_0). Then in the commutative triangle image x^0\hat x_0 and μ^0\hat\mu_0 are principal bundles with groups St⁡(x0)\operatorname{St}(x_0) and St⁡(μ0)\operatorname{St}(\mu_0), and μ\mu is a fibre bundle with fibre the homogeneous space St⁡(μ0)/St⁡(x0)\operatorname{St}(\mu_0)/\operatorname{St}(x_0).

For the first assertions see [exo:homogeneous]. By [I, Corollary 7.3] the two orbit maps are principal bundles.

Remark 1.3 (The orbit is a coimage). The orbit map μ^0 ⁣:G→G∗/Γ\hat\mu_0\colon G\to\mathcal{G}^{*}/\Gamma has two factorisations in Diff\mathsf{Diff} [I, Theorem 3.2]: through its coimage, the set OO with the quotient diffeology of GG, and through its image, the set OO with the subspace diffeology of G∗/Γ\mathcal{G}^{*}/\Gamma. The diffeology chosen in 1.2 is the coimage. The two coincide when μ^0\hat\mu_0 is strict, and the fibration statements of the theorem are statements about the coimage. The same choice occurs in [I, Theorem 11.1] for hypothesis spaces and in [I, Theorem 13.1] for minimal realisations.

Symplectic spaces

Definition 1.4 ([IZ, art. 9.17, 9.19]). The characteristics of a moment map μ\mu are the connected components of its fibres. A connected parasymplectic space (X,ω)(X,\omega) is a homogeneous symplectic space if it is homogeneous under Diff⁡(X,ω)\operatorname{Diff}(X,\omega) and the characteristics of the universal moment map μω\mu_\omega are points.

The definition is justified by two theorems on manifolds.

Theorem 1.5 (Souriau–Noether, [IZ, art. 9.25]). Let ω\omega be a closed 22-form on a manifold MM. If two points are joined by a path pp with p˙(t)∈ker⁡ωp(t)\dot p(t)\in\ker\omega_{p(t)} for all tt, then μω\mu_\omega takes the same value at both. Consequently every moment map of every action preserving ω\omega is constant along the characteristic distribution ker⁡ω\ker\omega.

Proof. By (3), Ψω(p)\Psi_\omega(p) evaluated on a plot is ∫01ω(p˙(t),δp(t)) dt\int_0^1\omega(\dot p(t),\delta p(t))\,\mathrm{d}t, which vanishes when p˙∈ker⁡ω\dot p\in\ker\omega. So μω(p(1))−μω(p(0))=0\mu_\omega(p(1))-\mu_\omega(p(0))=0, and the consequence follows from 1.1. ◻

Theorem 1.6 (Symplectic manifolds are coadjoint orbits, [IZ, art. 9.23]). Let ω\omega be a closed 22-form on a connected manifold MM. Then ω\omega is non-degenerate if and only if

  1. MM is homogeneous under Diff⁡(M,ω)\operatorname{Diff}(M,\omega), and

  2. the universal moment map μω ⁣:M→Gω∗/Γω\mu_\omega\colon M\to\mathcal{G}^{*}_\omega/\Gamma_\omega is injective.

In that case μω\mu_\omega identifies MM with a (Γω,θω)(\Gamma_\omega,\theta_\omega)-coadjoint orbit of Diff⁡(M,ω)\operatorname{Diff}(M,\omega).

So non-degeneracy, a pointwise condition on tangent vectors, is equivalent to a condition on maps: transitivity of the automorphism group and injectivity of one map out of MM. The second form is available on every diffeological space. By 1.5 condition (B) fails when ker⁡ω≠0\ker\omega\ne0; for a homogeneous presymplectic manifold the fibres of μω\mu_\omega are exactly the leaves of the characteristic foliation [IZ, art. 9.26].

Proposition 1.7 (Symplectic quasi-tori). Let Γ⊂Rn\Gamma\subset\mathbb{R}^n be a dense subgroup and Ω\Omega a non-degenerate alternating form on Rn\mathbb{R}^n. Then (TΓ,ωΩ)(T_\Gamma,\omega_\Omega) is a homogeneous symplectic space, and its moment map for the translations identifies it with the affine coadjoint orbit (Rn)∗/Ω(Γ,⋅)(\mathbb{R}^n)^*/\Omega(\Gamma,\cdot) of the group Rn\mathbb{R}^n.

The proof is [exo:quasitori-symplectic].

Parasymplectic spaces and the two conditions of 1.4: homogeneity under Diff⁡(X,ω)\operatorname{Diff}(X,\omega) and the characteristics of μω\mu_\omega. The third row is an instance of [IZ, art. 9.26]; the last is [IZ, art. 9.32].
(X,ω)(X,\omega) homogeneous characteristics conclusion
symplectic manifold yes points coadjoint orbit
(M,0)(M,0) yes MM μω\mu_\omega constant
contact form dα\mathrm{d}\alpha on S3S^3 yes Hopf circles μω\mu_\omega factors through S2S^2
(Rn/Γ,ωΩ)(\mathbb{R}^n/\Gamma,\omega_\Omega), Ω\Omega non-degenerate yes points affine orbit, a quasi-torus
cone orbifold (Qm,ωm)(Q_m,\omega_m) no: 00 is fixed — two strata
The universal moment map of a homogeneous parasymplectic space is a fibration onto a coadjoint orbit. Its fibres are unions of characteristics; the space is symplectic when they are points.

Solved exercises

Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.

1 Show that the plane (R2,dx∧dy)(\mathbb{R}^2,\mathrm{d}x\wedge\mathrm{d}y) is a single affine coadjoint orbit of its group of translations.

Solution.  By Example 1.8, G∗=(R2)∗\mathcal{G}^{*}=(\mathbb{R}^2)^*, Γ=0\Gamma=0, the coadjoint action is trivial, μ(x)=Ω(x,⋅)\mu(x)=\Omega(x,\cdot) and θ(u)=Ω(u,⋅)\theta(u)=\Omega(u,\cdot). The affine action is m↦m+Ω(u,⋅)m\mapsto m+\Omega(u,\cdot), which is simply transitive on (R2)∗(\mathbb{R}^2)^* because Ω\Omega is non-degenerate. So O=(R2)∗O=(\mathbb{R}^2)^*, both stabilisers are trivial, and μ\mu is the diffeomorphism x↦Ω(x,⋅)x\mapsto\Omega(x,\cdot). For the linear coadjoint action every orbit is a point: the cocycle is what makes the orbit two-dimensional. ◀\blacktriangleleft

2 Let MM be a connected manifold with ω=0\omega=0. Compute Diff⁡(M,ω)\operatorname{Diff}(M,\omega), the universal moment map and its characteristics.

Solution.  Every diffeomorphism preserves 00, so Diff⁡(M,0)=Diff⁡(M)\operatorname{Diff}(M,0)=\operatorname{Diff}(M), which is transitive. Since K0=0K0=0, the paths moment map vanishes, Γω=0\Gamma_\omega=0, and μω\mu_\omega is constant. The unique characteristic is MM, the orbit is a point, and the fibration of 1.2 is M→∗M\to\ast. ◀\blacktriangleleft

2 On the cylinder X=R×S1X=\mathbb{R}\times S^1 with ω=dr∧dφ\omega=\mathrm{d}r\wedge\mathrm{d}\varphi, compute the moment maps of (a) the rotations φ↦φ+s\varphi\mapsto\varphi+s and (b) the translations r↦r+sr\mapsto r+s.

Solution.  (a) ω=d(r dφ)\omega=\mathrm{d}(r\,\mathrm{d}\varphi) with r dφr\,\mathrm{d}\varphi invariant, so by Theorem 1.5 μ(r,φ)=r\mu(r,\varphi)=r in the basis ds\mathrm{d}s of G∗\mathcal{G}^{*}: the height. (b) The form −φ dr-\varphi\,\mathrm{d}r is not defined on XX, and Theorem 1.5 does not apply. By (3), for a path p=(r(t),φ(t))p=(r(t),\varphi(t)) with a continuous determination of the angle, Ψ(p)=∫01ω(p˙,∂r) dt  ds=−(φ(1)−φ(0)) ds\Psi(p)=\int_0^1\omega(\dot p,\partial_r)\,\mathrm{d}t\;\mathrm{d}s=-(\varphi(1)-\varphi(0))\,\mathrm{d}s. A loop winding once gives −2π ds-2\pi\,\mathrm{d}s, so Γ=2πZ ds\Gamma=2\pi\mathbb{Z}\,\mathrm{d}s, the action is not Hamiltonian, and the moment map is μ(r,φ)=−φ∈R/2πZ\mu(r,\varphi)=-\varphi\in\mathbb{R}/2\pi\mathbb{Z}: the angle is a moment map with values in a circle. ◀\blacktriangleleft

3 In the situation of 1.2, prove that μ(X)\mu(X) is a (Γ,θ)(\Gamma,\theta)-orbit, that St⁡(x0)⊆St⁡(μ0)\operatorname{St}(x_0)\subseteq\operatorname{St}(\mu_0), and that μ ⁣:X→O\mu\colon X\to O is a subduction when OO carries the pushforward diffeology of GG.

Solution.  Equivariance of μ\mu for the affine action gives μ(gx0)=Ad⁡∗Γ,θ(g)(μ0)\mu(g x_0)=\operatorname{Ad}_*^{\Gamma,\theta}(g)(\mu_0), that is, μ∘x^0=μ^0\mu\circ\hat x_0=\hat\mu_0. Since x^0\hat x_0 is surjective, μ(X)=μ^0(G)\mu(X)=\hat\mu_0(G) is the orbit of μ0\mu_0, and gx0=x0g x_0=x_0 implies Ad⁡∗Γ,θ(g)(μ0)=μ0\operatorname{Ad}_*^{\Gamma,\theta}(g)(\mu_0)=\mu_0. The orbit map x^0\hat x_0 is a subduction by homogeneity, so μ\mu is smooth into OO if and only if μ∘x^0=μ^0\mu\circ\hat x_0=\hat\mu_0 is, which holds by the definition of the pushforward diffeology. A plot of OO lifts locally along μ^0\hat\mu_0 to a plot of GG, whose image under x^0\hat x_0 is a local lift along μ\mu; so μ\mu is a subduction. ◀\blacktriangleleft

4 Prove 1.7.

Solution.  Homogeneity. Translations preserve ωΩ\omega_\Omega, so there is a smooth homomorphism ρ ⁣:Rn→Diff⁡(TΓ,ωΩ)\rho\colon\mathbb{R}^n\to\operatorname{Diff}(T_\Gamma,\omega_\Omega). Let PP be a plot of TΓT_\Gamma and x0=q(x~0)x_0=q(\tilde x_0). Locally P=q∘P~P=q\circ\tilde P with P~\tilde P smooth in Rn\mathbb{R}^n, and r↦ρ(P~(r)−x~0)r\mapsto\rho(\tilde P(r)-\tilde x_0) is a plot of Diff⁡(TΓ,ωΩ)\operatorname{Diff}(T_\Gamma,\omega_\Omega) whose image under the orbit map of x0x_0 is PP. So the orbit map is a subduction. Characteristics. By 1.1, the moment map μ\mu of the translations is ρΓ∗∘μω\rho^*_\Gamma\circ\mu_\omega up to a constant. By Proposition 1.9, μ\mu is injective; hence μω\mu_\omega is injective and its fibres are points. The orbit. For G=RnG=\mathbb{R}^n the coadjoint action is trivial and θ(u)=[Ω(u,⋅)]\theta(u)=[\Omega(u,\cdot)], so the affine action on (Rn)∗/Ω(Γ,⋅)(\mathbb{R}^n)^*/\Omega(\Gamma,\cdot) is by translations and is transitive; μ\mu is the diffeomorphism of Proposition 1.9. ◀\blacktriangleleft

One level up

Prequantisation

A prequantisation of a parasymplectic space is a principal bundle with connection whose curvature is the given form; its structure group is a torus of periods R/P\mathbb{R}/P, and PP need not be cyclic. In H\mathbf{H} it is a lift of ω ⁣:X→Ωcl2\omega\colon X\to\Omega^{2}_{\mathrm{cl}} to the stack B(TP)conn\mathbf{B}(T_{P})_{\mathrm{conn}}. We describe that stack, bound the periods, compute the examples, and determine the automorphisms of a prequantum bundle that cover the identity.

Tori of periods and bundles with connection

Let P⊊RP\subsetneq\mathbb{R} be a subgroup. A proper subgroup of R\mathbb{R} contains no interval, so its plots for the subspace diffeology are locally constant: PP is discrete as a diffeological group, countable or not, and R→TP=R/P\mathbb{R}\to T_P=\mathbb{R}/P is a covering [IZ, art. 8.37]. The form dt\mathrm{d}t descends to the canonical form θ∈Ω1(TP)\theta\in\Omega^1(T_P). For P=ZP=\mathbb{Z} this is the circle; for P=Z+αZP=\mathbb{Z}+\alpha\mathbb{Z} it is the irrational torus.

Definition 1.1 ([IZ, art. 8.37]). Let π ⁣:Y→X\pi\colon Y\to X be a principal TPT_P-bundle of diffeological spaces, with action (τ,y)↦τ⋅y(\tau,y)\mapsto\tau\cdot y and orbit maps y^ ⁣:TP→Y\hat y\colon T_P\to Y. A connection form is a 11-form λ\lambda on YY which is invariant, τY∗λ=λ\tau_Y^*\lambda=\lambda for all τ\tau, and calibrated, y^∗λ=θ\hat y^*\lambda=\theta for all yy.

Lemma 1.2. Let λ\lambda be a connection form on π ⁣:Y→X\pi\colon Y\to X, and ΦT ⁣:TP×Y→Y\Phi_T\colon T_P\times Y\to Y the action map.

  1. ΦT∗λ=prT∗θ+prY∗λ\Phi_T^*\lambda=\mathrm{pr}_T^*\theta+\mathrm{pr}_Y^*\lambda. For a plot ss of YY and a plot gg of TPT_P on the same domain, (g⋅s)∗λ=s∗λ+g∗θ(g\cdot s)^*\lambda=s^*\lambda+g^*\theta.

  2. There is a unique closed 22-form ω\omega on XX, the curvature, with π∗ω=dλ\pi^*\omega=\mathrm{d}\lambda.

  3. For a smooth τ ⁣:X→TP\tau\colon X\to T_P, the gauge transformation y↦τ(π(y))⋅yy\mapsto\tau(\pi(y))\cdot y maps λ\lambda to λ+π∗τ∗θ\lambda+\pi^*\tau^*\theta.

Proof. (i) Both sides are 11-forms on a product with the same restrictions to the slices: τY∗λ=λ\tau_Y^*\lambda=\lambda on {τ}×Y\{\tau\}\times Y and y^∗λ=θ\hat y^*\lambda=\theta on TP×{y}T_P\times\{y\}. They coincide by Lemma 1.11. The second formula is the pullback of the first by (g,s)(g,s). (ii) By (i), ΦT∗dλ=prY∗dλ\Phi_T^*\mathrm{d}\lambda=\mathrm{pr}_Y^*\mathrm{d}\lambda, since dθ=0\mathrm{d}\theta=0. The action is principal, so dλ\mathrm{d}\lambda descends by Proposition 1.6(i); the descended form is closed because π∗\pi^* is injective. (iii) The gauge transformation is ΦT∘(τ∘π,idY)\Phi_T\circ(\tau\circ\pi,\mathrm{id}_Y); pull back (i). ◻

The stack B(TP)conn\mathbf{B}(T_{P})_{\mathrm{conn}} is defined on Cartesian spaces by the groupoids B(TP)conn(U)={ objects A∈Ω1(U);morphisms g ⁣:A→A+g∗θ, g∈C∞(U,TP) },\mathbf{B}(T_{P})_{\mathrm{conn}}(U)=\Bigl\{\ \text{objects } A\in\Omega^1(U);\quad\text{morphisms } g\colon A\to A+g^*\theta,\ g\in C^{\infty}(U,T_P)\ \Bigr\}, the groupoid of connection forms on the trivial bundle U×TPU\times T_P and gauge transformations [I, §6.5]. There are maps Diagram where F(A)=dAF(A)=\mathrm{d}A is the curvature, the horizontal maps send a form to the trivial bundle with that connection and a bundle with connection to its underlying bundle, and the row is a fibre sequence.

Proposition 1.3. For a diffeological space XX, the groupoid Map⁡(X,B(TP)conn)\operatorname{Map}(X,\mathbf{B}(T_{P})_{\mathrm{conn}}) is equivalent to the groupoid of principal TPT_P-bundles over XX with a connection form and their connection-preserving isomorphisms. Under this equivalence, composition with FF is the curvature of 1.2.

Proof. As in [I, Theorem 7.5], XX is the colimit in H\mathbf{H} of its plots and Map⁡(X,B(TP)conn)≃lim⁡(U→X)B(TP)conn(U)\operatorname{Map}(X,\mathbf{B}(T_{P})_{\mathrm{conn}})\simeq\lim_{(U\to X)}\mathbf{B}(T_{P})_{\mathrm{conn}}(U). Given (Y,λ)(Y,\lambda) and a plot P ⁣:U→XP\colon U\to X, the pullback P∗YP^*Y is trivial [I, Lemma 7.4]; a section ss gives the object As=s∗λA_s=s^*\lambda, and by 1.2(i) another section g⋅sg\cdot s gives As+g∗θA_s+g^*\theta, an isomorphic object. This defines a point of the limit. Conversely a point of the limit has an underlying map X→BTPX\to\mathbf{B}T_P, which is a principal bundle YY [I, Theorem 7.5], together with a connection form λP\lambda_P on each P∗YP^*Y, compatible with reparametrisation. For a plot RR of YY let P=π∘RP=\pi\circ R; then RR is a section of P∗YP^*Y and λ(R)=R∗λP\lambda(R)=R^*\lambda_P defines a 11-form on YY, invariant and calibrated because each λP\lambda_P is. The two constructions are inverse, and dAs=s∗dλ=P∗ω\mathrm{d}A_s=s^*\mathrm{d}\lambda=P^*\omega. ◻

Prequantum bundles

Definition 1.4. A prequantisation of a parasymplectic space (X,ω)(X,\omega) with group of periods PP is a principal TPT_P-bundle with connection (Y,λ)(Y,\lambda) over XX with curvature ω\omega; equivalently, a lift image

Theorem 1.5 (Integration bundles, [IZ, art. 8.42]; [I, Theorem 6.11]). Let (X,ω)(X,\omega) be connected and simply connected, with group of periods Pω≠RP_\omega\neq\mathbb{R}. Then (X,ω)(X,\omega) has a prequantisation with structure group TPω=R/PωT_{P_\omega}=\mathbb{R}/P_\omega.

The classical condition that the periods be integral, up to a common factor, is the condition that PωP_\omega be cyclic, so that TPωT_{P_\omega} is a circle. No such condition appears in the theorem: for S2×S2S^2\times S^2 with incommensurable areas the structure group is an irrational torus (Example 1.10), and the bundle is constructed in Theorem 1.5. Conversely the periods bound the structure group from below.

Proposition 1.6 (Periods lie in PP). If (X,ω)(X,\omega) has a prequantisation with structure group TPT_P, then for every smooth map SS from T2T^2 or S2S^2 to XX the period ∫S∗ω\int S^*\omega belongs to PP.

Proof. For the torus, pull (Y,λ)(Y,\lambda) back along R2→T2→SX\mathbb{R}^2\to T^2\xrightarrow{S}X. Over R2\mathbb{R}^2 the bundle is trivial, with connection A∈Ω1(R2)A\in\Omega^1(\mathbb{R}^2), dA=S~∗ω\mathrm{d}A=\tilde S^*\omega. The translations τ1,τ2\tau_1,\tau_2 by the basis vectors act on the pulled-back bundle; in the trivialisation they are gauge transformations gi ⁣:R2→TPg_i\colon\mathbb{R}^2\to T_P with τi∗A=A+gi∗θ\tau_i^*A=A+g_i^*\theta, and gig_i lifts to g^i ⁣:R2→R\hat g_i\colon\mathbb{R}^2\to\mathbb{R}. Stokes’ formula on the unit square (1.1) gives ∫[0,1]2dA=(g^1(e2)−g^1(0))−(g^2(e1)−g^2(0)).\int_{[0,1]^2}\mathrm{d}A=\bigl(\hat g_1(e_2)-\hat g_1(0)\bigr)-\bigl(\hat g_2(e_1)-\hat g_2(0)\bigr). The two translations commute, so g2(x+e1)+g1(x)=g1(x+e2)+g2(x)g_2(x+e_1)+g_1(x)=g_1(x+e_2)+g_2(x) in TPT_P, and the right-hand side is the value at 00 of a function with values in PP. The sphere is [exo:sphere-periods]. ◻

Left: the proof of 1.6. Right: the three ways of presenting a closed 22-form, as a form, as a curvature, and as an exact form.

Examples

Example 1.7 (Exact forms). If ω=dα\omega=\mathrm{d}\alpha, then for every PP the trivial bundle Y=X×TPY=X\times T_P with λ=prX∗α+prT∗θ\lambda=\mathrm{pr}_X^*\alpha+\mathrm{pr}_T^*\theta is a prequantisation. Two primitives that differ by dh\mathrm{d}h give isomorphic prequantisations ([exo:exact-prequantum]).

Example 1.8 (The Heisenberg bundle). On R2\mathbb{R}^2 with ω=dx∧dy=d(x dy)\omega=\mathrm{d}x\wedge\mathrm{d}y=\mathrm{d}(x\,\mathrm{d}y), the previous example with P=0P=0 is Y=R3Y=\mathbb{R}^3 with λ=dz+x dy\lambda=\mathrm{d}z+x\,\mathrm{d}y. The group structure (x,y,z)(x′,y′,z′)=(x+x′,y+y′,z+z′−xy′)(x,y,z)(x',y',z')=(x+x',y+y',z+z'-xy') on YY makes it the Heisenberg group H\mathsf{H}; left multiplications preserve λ\lambda and cover the translations of the plane. The subgroup N=Z3N=\mathbb{Z}^3 acts on the left, λ\lambda descends to N\HN\backslash\mathsf{H}, and N\H→R2/Z2N\backslash\mathsf{H}\to\mathbb{R}^2/\mathbb{Z}^2 is a prequantisation of the torus of area 11 with P=ZP=\mathbb{Z}. In Number theory: periods, ideals, and Heisenberg quasi-nilmanifolds Z\mathbb{Z} is replaced by the ring of integers of a number field.

Example 1.9 (The cone). The form ωm\omega_m of the cone orbifold is exact, ωm=dαm\omega_m=\mathrm{d}\alpha_m ([exo:cone-moment]), so Qm×TPQ_m\times T_P is a prequantisation for every PP. It is the quotient of the trivial bundle C×TP\mathbb{C}\times T_P by Zm\mathbb{Z}_m acting on the first factor.

Automorphisms

An automorphism of a prequantum bundle (Y,λ)(Y,\lambda) is a diffeomorphism ϕ\phi of YY that commutes with the action of TPT_P and satisfies ϕ∗λ=λ\phi^*\lambda=\lambda. It covers a diffeomorphism of XX, which preserves ω\omega because π∗\pi^* is injective. The group Aut⁡(Y,λ)\operatorname{Aut}(Y,\lambda) has the functional diffeology.

Theorem 1.10 (The Kostant–Souriau sequence). Let (Y,λ)(Y,\lambda) be a prequantisation of a connected parasymplectic space (X,ω)(X,\omega). The sequence of diffeological groups 1⟶TP⟶Aut⁡(Y,λ)⟶Diff⁡(X,ω)1\longrightarrow T_P\longrightarrow\operatorname{Aut}(Y,\lambda)\longrightarrow\operatorname{Diff}(X,\omega) is exact, and TPT_P is central. If X=R2nX=\mathbb{R}^{2n} with a constant symplectic form and P=0P=0, the last map is surjective, and the preimage of the group of translations is the Heisenberg group.

Proof. An automorphism covering the identity is a gauge transformation by some τ ⁣:X→TP\tau\colon X\to T_P. By 1.2(iii) it preserves λ\lambda if and only if π∗τ∗θ=0\pi^*\tau^*\theta=0, that is, τ∗θ=0\tau^*\theta=0. For a plot QQ of XX, the map τ∘Q\tau\circ Q lifts locally to a real function ff with df=(τ∘Q)∗θ=0\mathrm{d}f=(\tau\circ Q)^*\theta=0, so τ∘Q\tau\circ Q is locally constant; since XX is connected, τ\tau is constant. Constants are central because automorphisms commute with the action of TPT_P. For R2n\mathbb{R}^{2n} with ω=dα\omega=\mathrm{d}\alpha and Y=R2n×RY=\mathbb{R}^{2n}\times\mathbb{R}, λ=dz+α\lambda=\mathrm{d}z+\alpha: if f∗ω=ωf^*\omega=\omega then f∗α−α=dhf^*\alpha-\alpha=\mathrm{d}h for a function hh, and (v,z)↦(f(v),z−h(v))(v,z)\mapsto(f(v),z-h(v)) is an automorphism covering ff. For translations, with α=B(v,dv)\alpha=B(v,\mathrm{d}v) and BB bilinear, these are the left multiplications of HB\mathsf{H}_B. ◻

The Kostant–Souriau sequence of 1.10 and, for X=R2nX=\mathbb{R}^{2n} and P=0P=0, its restriction to the translations. Both groups are automorphism groups in slices of H\mathbf{H}, and the sequence is induced by the curvature map FF.

In the language of [28, 27]: Aut⁡(Y,λ)\operatorname{Aut}(Y,\lambda) is the automorphism group of ∇ ⁣:X→B(TP)conn\nabla\colon X\to\mathbf{B}(T_{P})_{\mathrm{conn}} in the slice H/B(TP)conn\mathbf{H}/\mathbf{B}(T_{P})_{\mathrm{conn}}, as Diff⁡(X,ω)\operatorname{Diff}(X,\omega) is the automorphism group of ω\omega in the slice over Ωcl2\Omega^{2}_{\mathrm{cl}} (Proposition 1.2), and the sequence is induced by FF. The kernel TPT_P is the group of automorphisms of the trivial flat bundle over a connected space.

Proposition 1.11 (Characters). The smooth homomorphisms TP→U(1)T_P\to U(1) are [t]↦e2πikt[t]\mapsto e^{2\pi ikt} with k∈Rk\in\mathbb{R}, kP⊆ZkP\subseteq\mathbb{Z}. If PP contains two elements with irrational ratio, the only one is trivial.

Proof. A smooth homomorphism TP→R/ZT_P\to\mathbb{R}/\mathbb{Z} composed with R→TP\mathbb{R}\to T_P lifts to a smooth homomorphism R→R\mathbb{R}\to\mathbb{R}, t↦ktt\mapsto kt, which maps PP into Z\mathbb{Z}. If a,b∈Pa,b\in P and ka,kb∈Zka,kb\in\mathbb{Z} with k≠0k\neq0 then a/b∈Qa/b\in\mathbb{Q}. ◻

So a prequantum bundle with a dense group of periods has no associated Hermitian line bundle, and the usual passage from the principal bundle to a space of sections is not available. The three presentations of a closed 22-form are compared in 1.1.

Three levels of structure and their classifying objects.
datum on XX classifying object automorphisms exists when
closed 22-form ω\omega Ωcl2\Omega^{2}_{\mathrm{cl}}, a sheaf Diff⁡(X,ω)\operatorname{Diff}(X,\omega) —
prequantisation ∇\nabla B(TP)conn\mathbf{B}(T_{P})_{\mathrm{conn}}, a stack Aut⁡(Y,λ)\operatorname{Aut}(Y,\lambda), an extension by TPT_P periods in PP; 1.5
primitive α\alpha Ω1\Omega^1, a sheaf Diff⁡(X,α)\operatorname{Diff}(X,\alpha) ω\omega exact

Solved exercises

Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.

1 Verify that λ=prX∗α+prT∗θ\lambda=\mathrm{pr}_X^*\alpha+\mathrm{pr}_T^*\theta is a connection form on X×TPX\times T_P with curvature dα\mathrm{d}\alpha, and that the prequantisations defined by α\alpha and α+dh\alpha+\mathrm{d}h are isomorphic.

Solution.  The action of TPT_P is by translation of the second factor; θ\theta is translation-invariant and prX\mathrm{pr}_X is invariant, so λ\lambda is invariant. The orbit map of (x,τ)(x,\tau) is σ↦(x,σ+τ)\sigma\mapsto(x,\sigma+\tau), which pulls λ\lambda back to θ\theta. dλ=prX∗dα\mathrm{d}\lambda=\mathrm{pr}_X^*\mathrm{d}\alpha. The gauge transformation by τ=[h] ⁣:X→TP\tau=[h]\colon X\to T_P maps λ\lambda to λ+prX∗dh\lambda+\mathrm{pr}_X^*\mathrm{d}h by 1.2(iii), since [h]∗θ=dh[h]^*\theta=\mathrm{d}h. ◀\blacktriangleleft

2 In the Heisenberg bundle (R3,dz+x dy)(\mathbb{R}^3,\mathrm{d}z+x\,\mathrm{d}y), compute the horizontal lift of the boundary of the rectangle [x0,x0+a]×[y0,y0+b][x_0,x_0+a]\times[y_0,y_0+b], traversed counter-clockwise from (x0,y0,z0)(x_0,y_0,z_0).

Solution.  A curve is horizontal if z˙=−xy˙\dot z=-x\dot y. Along the bottom edge y˙=0\dot y=0 and z=z0z=z_0. Along the right edge x=x0+ax=x_0+a and zz decreases by (x0+a)b(x_0+a)b. Along the top edge zz is constant. Along the left edge x=x0x=x_0, yy decreases by bb, and zz increases by x0bx_0b. The lift ends at z0−abz_0-ab: the holonomy is minus the area, as in the frontispiece, in accordance with ∫dλ=∫ω\int\mathrm{d}\lambda=\int\omega and 1.2(ii). ◀\blacktriangleleft

2 Compute the smooth characters of TPT_P for P=ZP=\mathbb{Z}, P=Z+2 ZP=\mathbb{Z}+\sqrt2\,\mathbb{Z} and P=QP=\mathbb{Q}.

Solution.  By 1.11 the characters are indexed by { k∈R∣kP⊆Z }\{\,k\in\mathbb{R}\mid kP\subseteq\mathbb{Z}\,\}. For P=ZP=\mathbb{Z} this is Z\mathbb{Z}. For P=Z+2ZP=\mathbb{Z}+\sqrt2\mathbb{Z}, k∈Zk\in\mathbb{Z} and k2∈Zk\sqrt2\in\mathbb{Z} force k=0k=0. For P=QP=\mathbb{Q}, k/n∈Zk/n\in\mathbb{Z} for all nn forces k=0k=0. In the last two cases the group TPT_P has no non-trivial smooth unitary character, although R/Q\mathbb{R}/\mathbb{Q} has many discontinuous ones. ◀\blacktriangleleft

3 Prove 1.6 for the sphere.

Solution.  Pull the bundle back to S2S^2 by SS. Let UN,USU_N,U_S be the complements of the south and north poles; they are diffeomorphic to R2\mathbb{R}^2, so the bundle is trivial over each, with connections AN,ASA_N,A_S, dAN=S∗ω\mathrm{d}A_N=S^*\omega, dAS=S∗ω\mathrm{d}A_S=S^*\omega. On UN∩USU_N\cap U_S the trivialisations differ by g ⁣:UN∩US→TPg\colon U_N\cap U_S\to T_P and AN=AS+g∗θA_N=A_S+g^*\theta by 1.2(i). Stokes’ formula on the two closed hemispheres, whose common boundary is the equator EE with opposite orientations, gives ∫S2S∗ω=∫E(AN−AS)=∫Eg∗θ\int_{S^2}S^*\omega=\int_E(A_N-A_S)=\int_Eg^*\theta. The map g∣E ⁣:S1→R/Pg|_E\colon S^1\to\mathbb{R}/P lifts along the covering R→S1\mathbb{R}\to S^1 to g^ ⁣:R→R\hat g\colon\mathbb{R}\to\mathbb{R} with g^(t+1)−g^(t)∈P\hat g(t+1)-\hat g(t)\in P, and ∫Eg∗θ=g^(1)−g^(0)∈P\int_Eg^*\theta=\hat g(1)-\hat g(0)\in P. ◀\blacktriangleleft

4 Let X=R2X=\mathbb{R}^2, ω=dx∧dy\omega=\mathrm{d}x\wedge\mathrm{d}y, (Y,λ)=(R3,dz+x dy)(Y,\lambda)=(\mathbb{R}^3,\mathrm{d}z+x\,\mathrm{d}y). Determine the automorphisms of (Y,λ)(Y,\lambda) covering the linear symplectic maps A∈SL⁡2(R)A\in\operatorname{SL}_2(\mathbb{R}), and show that A↦A^A\mapsto\hat A can be chosen to be a homomorphism.

Solution.  By the proof of 1.10, the lifts of AA are (v,z)↦(Av,z−h(v)+c)(v,z)\mapsto(Av,z-h(v)+c) with dh=A∗α−α\mathrm{d}h=A^*\alpha-\alpha, α=x dy\alpha=x\,\mathrm{d}y. Put β=12(x dy−y dx)\beta=\tfrac12(x\,\mathrm{d}y-y\,\mathrm{d}x), which is invariant under SL⁡2(R)\operatorname{SL}_2(\mathbb{R}), and note α=β+d(12xy)\alpha=\beta+\mathrm{d}(\tfrac12xy). Then A∗α−α=d(12(xy)∘A−12xy)A^*\alpha-\alpha=\mathrm{d}\bigl(\tfrac12(xy)\circ A-\tfrac12xy\bigr), so h=qAh=q_A with qA(v)=12((xy)(Av)−xy)q_A(v)=\tfrac12\bigl((xy)(Av)-xy\bigr), a quadratic form. The choice A^(v,z)=(Av,z−qA(v))\hat A(v,z)=(Av,z-q_A(v)) is a homomorphism: in the coordinate ζ=z+12xy\zeta=z+\tfrac12xy it is (v,ζ)↦(Av,ζ)(v,\zeta)\mapsto(Av,\zeta), and λ=dζ+β\lambda=\mathrm{d}\zeta+\beta. So SL⁡2(R)\operatorname{SL}_2(\mathbb{R}) acts on the Heisenberg bundle by automorphisms, and Aut⁡(Y,λ)\operatorname{Aut}(Y,\lambda) contains the semidirect product of SL⁡2(R)\operatorname{SL}_2(\mathbb{R}) with the Heisenberg group. ◀\blacktriangleleft

Equivariance and the moment map

When the action of a group lifts to a prequantum bundle, the moment map is the pullback of the connection form along the orbits upstairs. It is equivariant, and it vanishes exactly when the bundle with its connection descends to the homotopy quotient. When the action does not lift, it lifts for a central extension of the group, and the Souriau cocycle is the coadjoint action of the extension on its central momentum.

The moment map of an equivariant prequantum bundle

Throughout, (X,ω)(X,\omega) is a connected parasymplectic space with a prequantisation (Y,λ)(Y,\lambda), π ⁣:Y→X\pi\colon Y\to X, with group of periods PP, and ρ ⁣:G→Diff⁡(X,ω)\rho\colon G\to\operatorname{Diff}(X,\omega) is a smooth action of a diffeological group.

Definition 1.1. An equivariant prequantisation is a smooth action Φ ⁣:G×Y→Y\Phi\colon G\times Y\to Y by automorphisms of (Y,λ)(Y,\lambda) covering ρ\rho; equivalently, a smooth homomorphism G→Aut⁡(Y,λ)G\to\operatorname{Aut}(Y,\lambda) lifting ρ\rho through the sequence of Theorem 1.10.

Theorem 1.2 (A: the prequantum moment map). Let (Y,λ)(Y,\lambda) be an equivariant prequantisation. For x∈Xx\in X choose y∈π−1(x)y\in\pi^{-1}(x) and put μ(x)=y^∗λ∈Ω1(G),y^ ⁣:G→Y, g↦g⋅y.\mu(x)=\hat y^*\lambda\in\Omega^1(G),\qquad\hat y\colon G\to Y,\ g\mapsto g\cdot y .

  1. μ(x)\mu(x) is independent of yy and is left-invariant; μ ⁣:X→G∗\mu\colon X\to\mathcal{G}^{*} is smooth.

  2. μ(g⋅x)=Ad⁡∗(g) μ(x)\mu(g\cdot x)=\operatorname{Ad}_*(g)\,\mu(x).

  3. For every path pp in XX, the paths moment map of Theorem 1.3 is Ψ(p)=μ(p(1))−μ(p(0))\Psi(p)=\mu(p(1))-\mu(p(0)).

Consequently the holonomy Γ\Gamma and the Souriau class σ\sigma of the action vanish, and μ\mu is an equivariant moment map in the sense of Theorem 1.4.

Proof. (i) For τ∈TP\tau\in T_P, τy^=τY∘y^\widehat{\tau y}=\tau_Y\circ\hat y because the two actions commute, and τY∗λ=λ\tau_Y^*\lambda=\lambda. For h∈Gh\in G, y^∘L(h)=hY∘y^\hat y\circ L(h)=h_Y\circ\hat y and hY∗λ=λh_Y^*\lambda=\lambda, so L(h)∗μ(x)=μ(x)L(h)^*\mu(x)=\mu(x). Smoothness: over a plot of XX with Cartesian domain UU the bundle has a section ss, and r↦μ(Q(r))r\mapsto\mu(Q(r)) is the family of restrictions to the slices G×{r}G\times\{r\} of the form (Φ∘(id×s))∗λ(\Phi\circ(\mathrm{id}\times s))^*\lambda on G×UG\times U. (ii) gy^=y^∘R(g)\widehat{g y}=\hat y\circ R(g), and gygy lies over gxgx. (iii) The pullback p∗Yp^*Y is a principal bundle over R\mathbb{R}, hence trivial, so pp has a smooth lift p~∈Paths⁡(Y)\tilde p\in\operatorname{Paths}(Y). Let π∗ ⁣:Paths⁡(Y)→Paths⁡(X)\pi_*\colon\operatorname{Paths}(Y)\to\operatorname{Paths}(X) be induced by π\pi; then π∗∘p~^=p^\pi_*\circ\hat{\tilde p}=\hat p, where p~^(g)=gY∘p~\hat{\tilde p}(g)=g_Y\circ\tilde p. By naturality of KK and (1), Ψ(p)=p~^ ∗(π∗)∗Kω=p~^ ∗K(π∗ω)=p~^ ∗K(dλ)=p~^ ∗(1^∗λ−0^∗λ−d(Kλ)).\Psi(p)=\hat{\tilde p}^{\,*}(\pi_*)^*K\omega=\hat{\tilde p}^{\,*}K(\pi^*\omega)=\hat{\tilde p}^{\,*}K(\mathrm{d}\lambda) =\hat{\tilde p}^{\,*}\bigl(\hat1^*\lambda-\hat0^*\lambda-\mathrm{d}(K\lambda)\bigr). The function Kλ∘p~^K\lambda\circ\hat{\tilde p} is g↦∫gY∘p~λ=∫p~gY∗λ=∫p~λg\mapsto\int_{g_Y\circ\tilde p}\lambda=\int_{\tilde p}g_Y^*\lambda=\int_{\tilde p}\lambda, a constant, so the last term vanishes. The composite 1^∘p~^\hat1\circ\hat{\tilde p} is the orbit map of p~(1)\tilde p(1), which lies over p(1)p(1); so the first term is μ(p(1))\mu(p(1)), and the second is μ(p(0))\mu(p(0)). For a loop Ψ=0\Psi=0; hence Γ=0\Gamma=0, ψ(x,x′)=μ(x′)−μ(x)\psi(x,x')=\mu(x')-\mu(x), and θ=0\theta=0 by (ii). ◻

For the trivial bundle of an invariant primitive α\alpha (Example 1.7), with GG acting on the first factor, μ(x)=x^∗α\mu(x)=\hat x^*\alpha: 1.2 contains Theorem 1.5. The classical formula ⟨μ,ξ⟩=λ(ξY)\langle\mu,\xi\rangle=\lambda(\xi_Y) for the moment map of a prequantised Hamiltonian action of a Lie group, due to Kostant and Souriau [53, 79], is the value of y^∗λ\hat y^*\lambda at the identity.

Proposition 1.3 (Characters and levels). The equivariant structures on (Y,λ)(Y,\lambda) covering ρ\rho form a torsor under the group Hom⁡∞(G,TP)\operatorname{Hom}^\infty(G,T_P) of smooth characters, or are absent. Twisting by a character χ\chi, g⋆y=χ(g)⋅(g⋅y)g\star y=\chi(g)\cdot(g\cdot y), changes the moment map to μ+χ∗θ\mu+\chi^*\theta. For G=S1=R/2πZG=S^1=\mathbb{R}/2\pi\mathbb{Z} the moment maps of the equivariant structures are μ0+c\mu_0+c with 2πc∈P2\pi c\in P.

The proof is [exo:levels]. So the constant of Theorem 1.4(iii), which is arbitrary for the form ω\omega, is quantised for the bundle: the admissible levels are c∈12πPc\in\tfrac1{2\pi}P. If the level is prescribed, the group of periods must contain 2πc2\pi c. This is the origin of the integrality condition in the reduction of Reduction.

Left: the 11-form Φ∗λ−prY∗λ\Phi^*\lambda-\mathrm{pr}_Y^*\lambda on G×YG\times Y is determined by its restrictions to the two families of slices (Lemma 1.11). Right: the corresponding factorisations of the prequantum bundle.

Descent to the homotopy quotient

Let GδG^\delta be the group GG with the discrete diffeology. The identity Gδ→GG^\delta\to G induces X/ ⁣ ⁣/Gδ→X/ ⁣ ⁣/GX/\!\!/G^\delta\to X/\!\!/G, and there is the projection X/ ⁣ ⁣/G→X/GX/\!\!/G\to X/G.

Theorem 1.4 (B: descent).

  1. Map⁡(X/ ⁣ ⁣/Gδ,B(TP)conn)\operatorname{Map}(X/\!\!/G^\delta,\mathbf{B}(T_{P})_{\mathrm{conn}}) is the groupoid of prequantum data (Y,λ)(Y,\lambda) with an action of the abstract group GG by automorphisms.

  2. The groupoid of equivariant prequantum data is the fibre product Map⁡(X/ ⁣ ⁣/G,BTP)×Map⁡(X/ ⁣ ⁣/Gδ,BTP)Map⁡(X/ ⁣ ⁣/Gδ,B(TP)conn),\operatorname{Map}(X/\!\!/G,\mathbf{B}T_P)\times_{\operatorname{Map}(X/\!\!/G^\delta,\mathbf{B}T_P)}\operatorname{Map}(X/\!\!/G^\delta,\mathbf{B}(T_{P})_{\mathrm{conn}}), and its objects have the moment maps μ\mu of 1.2, which are equivariant smooth maps X→G∗X\to\mathcal{G}^{*}.

  3. Map⁡(X/ ⁣ ⁣/G,B(TP)conn)\operatorname{Map}(X/\!\!/G,\mathbf{B}(T_{P})_{\mathrm{conn}}) is the full subgroupoid of equivariant prequantum data with μ=0\mu=0.

  4. If the action of GG on XX is principal and μ=0\mu=0, then (Y,λ)(Y,\lambda) is the pullback of a bundle with connection (Y0,λ0)(Y_0,\lambda_0) on X/GX/G, unique up to isomorphism, whose curvature ω0\omega_0 satisfies πG∗ω0=ω\pi_G^*\omega_0=\omega.

Proof. The homotopy quotient is the colimit of the simplicial object G∙×XG^{\bullet}\times X, and B(TP)conn\mathbf{B}(T_{P})_{\mathrm{conn}} is 11-truncated, so a map out of it is a descent datum: an object over XX, an isomorphism between its two pullbacks to G×XG\times X, and a cocycle condition over G×G×XG\times G\times X. By Proposition 1.3 the object is a pair (Y,λ)(Y,\lambda). An isomorphism prX∗Y→a∗Y\mathrm{pr}_X^*Y\to a^*Y of principal bundles over G×XG\times X is a smooth map Φ ⁣:G×Y→Y\Phi\colon G\times Y\to Y covering the action and commuting with TPT_P; the cocycle condition is that Φ\Phi be an action; and the isomorphism preserves the connections if and only if Φ∗λ=prY∗λon G×Y. \Phi^*\lambda=\mathrm{pr}_Y^*\lambda\quad\text{on }G\times Y . By Corollary 1.12, (6) holds if and only if gY∗λ=λg_Y^*\lambda=\lambda for all gg and y^∗λ=0\hat y^*\lambda=0 for all yy, that is, if and only if Φ\Phi is an equivariant prequantisation with μ=0\mu=0. This is (iii). For GδG^\delta the plots of the first factor are locally constant, the slices G×{y}G\times\{y\} contribute nothing, and smoothness in gg is no condition; this is (i). For (ii), the fibre product imposes that the bundle isomorphism be smooth over G×XG\times X and preserve the connection on each slice {g}×X\{g\}\times X. (iv) By [I, Theorem 7.2], X/G≃X/ ⁣ ⁣/GX/G\simeq X/\!\!/G, so (iii) is a map X/G→B(TP)connX/G\to\mathbf{B}(T_{P})_{\mathrm{conn}}, which is a bundle with connection by Proposition 1.3; its curvature pulls back to ω\omega because FF is a map of stacks. ◻

Three conditions that are stated together in the classical theory are separate in the theorem. Invariance of the connection under each group element is descent to X/ ⁣ ⁣/GδX/\!\!/G^\delta. Smoothness of the lifted action is descent of the underlying bundle to X/ ⁣ ⁣/GX/\!\!/G. The vanishing of the moment map is the remaining condition for the connection: it is the statement that the connection has no component along the group.

The central extension

Suppose only that each ρ(g)\rho(g) lifts to an automorphism of (Y,λ)(Y,\lambda), and let G^=G×Diff⁡(X,ω)Aut⁡(Y,λ)={ (g,ϕ)∣ϕ covers ρ(g) }\hat G=G\times_{\operatorname{Diff}(X,\omega)}\operatorname{Aut}(Y,\lambda)=\{\,(g,\phi)\mid\phi\text{ covers }\rho(g)\,\} with the subspace diffeology of the product.

Theorem 1.5 (The prequantum extension).

  1. 1→TP→ i G^→G→11\to T_P\xrightarrow{\,i\,}\hat G\to G\to1 is a central extension of diffeological groups.

  2. G^\hat G acts on (Y,λ)(Y,\lambda) by automorphisms, so (Y,λ)(Y,\lambda) is an equivariant prequantisation for G^\hat G, with an equivariant moment map μ^ ⁣:X→G^∗\hat\mu\colon X\to\hat{\mathcal G}^* by 1.2.

  3. i∗μ^(x)=θi^*\hat\mu(x)=\theta for every xx: the moment map of the centre is the constant 11.

  4. The equivariant prequantisations for GG are the smooth homomorphic sections ss of G^→G\hat G\to G, and the moment map of ss is s∗∘μ^s^*\circ\hat\mu.

The proof is [exo:extension]. By part (iv) the obstruction to an equivariant prequantisation is the class of the extension: if G^→G\hat G\to G has no homomorphic section there is no equivariant prequantisation, although every element of GG preserves the isomorphism class of the bundle.

Example 1.6 (Translations and the Heisenberg group). Let X=R2nX=\mathbb{R}^{2n} with a constant symplectic form Ω\Omega, the antisymmetrisation of a bilinear form BB, and G=R2nG=\mathbb{R}^{2n} acting by translations. By Theorem 1.10, G^\hat G is the Heisenberg group HB\mathsf{H}_B acting on Y=HBY=\mathsf{H}_B by left multiplication. The commutator of (u,c)(u,c) and (v,c′)(v,c') is (0,−Ω(u,v))(0,-\Omega(u,v)), while GG is abelian: there is no homomorphic section. The moment map of HB\mathsf{H}_B is computed from the orbit map (a,c)↦(a,c)(x,0)=(a+x, c−B(a,x))(a,c)\mapsto(a,c)(x,0)=(a+x,\,c-B(a,x)): μ^(x)=λH+Ω(x,⋅),λH=dc+B(a,da),\hat\mu(x)=\lambda_{\mathsf{H}}+\Omega(x,\cdot),\qquad\lambda_{\mathsf{H}}=\mathrm{d}c+B(a,\mathrm{d}a), where λH\lambda_{\mathsf{H}} is the left-invariant form dual to the centre. The coadjoint action on it is Ad⁡∗(u,c) λH=λH+Ω(u,⋅)\operatorname{Ad}_*(u,c)\,\lambda_{\mathsf{H}}=\lambda_{\mathsf{H}}+\Omega(u,\cdot) ([exo:heis-coadjoint]).

Comparing with Example 1.8: the non-equivariant moment map μ(x)=Ω(x,⋅)\mu(x)=\Omega(x,\cdot) of the translations is the non-central part of the equivariant moment map μ^\hat\mu of the Heisenberg group, and its Souriau cocycle θ(u)=Ω(u,⋅)\theta(u)=\Omega(u,\cdot) is the coadjoint action of the extension on the central momentum. The affine coadjoint orbit of [exo:plane-orbit] is the linear coadjoint orbit of λH\lambda_{\mathsf{H}} in G^∗\hat{\mathcal G}^*.

Four successive obstructions for a group acting on a prequantised space.
obstruction vanishes when example where it is non-zero
holonomy Γ⊂G∗\Gamma\subset\mathcal{G}^{*} the action is Hamiltonian translations of a quasi-torus (Proposition 1.9)
Souriau class σ\sigma some moment map is equivariant translations of the plane (Example 1.8)
class of G^→G\hat G\to G the action lifts to (Y,λ)(Y,\lambda) translations and H\mathsf{H} (1.6)
moment map μ\mu (Y,λ)(Y,\lambda) descends to X/ ⁣ ⁣/GX/\!\!/G rotations of the plane (Example 1.7)

Solved exercises

Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.

1 For the rotations of C\mathbb{C} and the trivial bundle C×TP\mathbb{C}\times T_P with λ=α+θ\lambda=\alpha+\theta, list the equivariant structures and their moment maps.

Solution.  The action eiφ⋅(z,t)=(eiφz,t)e^{i\varphi}\cdot(z,t)=(e^{i\varphi}z,t) is an equivariant structure with μ0(z)=12∣z∣2\mu_0(z)=\tfrac12\lvert z\rvert^2 (Example 1.7). By 1.3 the others are eiφ⋆(z,t)=(eiφz, t+cφ)e^{i\varphi}\star(z,t)=(e^{i\varphi}z,\,t+c\varphi), defined when 2πc∈P2\pi c\in P, with moment map 12∣z∣2+c\tfrac12\lvert z\rvert^2+c. For P=0P=0 only c=0c=0 occurs; for P=2πZP=2\pi\mathbb{Z} the levels are the integers; for P=2π(Z+αZ)P=2\pi(\mathbb{Z}+\alpha\mathbb{Z}) they are the dense set Z+αZ\mathbb{Z}+\alpha\mathbb{Z}. ◀\blacktriangleleft

2 Verify the two formulas of 1.6.

Solution.  The form λ=dz+B(v,dv)\lambda=\mathrm{d}z+B(v,\mathrm{d}v) pulled back by (a,c)↦(a+x,c−B(a,x))(a,c)\mapsto(a+x,c-B(a,x)) is dc−B(da,x)+B(a+x,da)=dc+B(a,da)+B(x,da)−B(da,x)=λH+Ω(x,da)\mathrm{d}c-B(\mathrm{d}a,x)+B(a+x,\mathrm{d}a)=\mathrm{d}c+B(a,\mathrm{d}a)+B(x,\mathrm{d}a)-B(\mathrm{d}a,x)=\lambda_{\mathsf{H}}+\Omega(x,\mathrm{d}a). Right multiplication by (u,c′)(u,c') is (a,c)↦(a+u, c+c′−B(a,u))(a,c)\mapsto(a+u,\,c+c'-B(a,u)), and pulls λH\lambda_{\mathsf{H}} back to dc−B(da,u)+B(a+u,da)=λH+Ω(u,da)\mathrm{d}c-B(\mathrm{d}a,u)+B(a+u,\mathrm{d}a)=\lambda_{\mathsf{H}}+\Omega(u,\mathrm{d}a). ◀\blacktriangleleft

3 Let Y=S3⊂C2Y=S^3\subset\mathbb{C}^2 with λ=Im⁡(zˉ1dz1+zˉ2dz2)\lambda=\operatorname{Im}(\bar z_1\mathrm{d}z_1+\bar z_2\mathrm{d}z_2) and the action of U(1)U(1) by scalars. Show that U(2)U(2) acts by automorphisms, that the induced action on S2=Y/U(1)S^2=Y/U(1) is that of SO(3)\mathrm{SO}(3), and that the extension G^→SO(3)\hat G\to\mathrm{SO}(3) of 1.5 has no homomorphic section.

Solution.  λ\lambda is the restriction of the imaginary part of the Hermitian form ⟨z,dz⟩\langle z,\mathrm{d}z\rangle, which is U(2)U(2)-invariant, and U(2)U(2) commutes with scalars. The induced action on CP1=S2\mathbb{C}P^1=S^2 is by PU(2)=U(2)/U(1)≅SO(3)PU(2)=U(2)/U(1)\cong\mathrm{SO}(3), and the kernel U(1)U(1) is the structure group; by Theorem 1.10 the automorphisms covering a given rotation are a coset of U(1)U(1), so G^=U(2)\hat G=U(2). A homomorphic section SO(3)→U(2)\mathrm{SO}(3)\to U(2) would be a two-dimensional unitary representation of SO(3)\mathrm{SO}(3) inducing the identity of PU(2)PU(2). The irreducible representations of SO(3)\mathrm{SO}(3) have odd dimension, so a two-dimensional one is a sum of characters, hence trivial since SO(3)\mathrm{SO}(3) is perfect; this contradicts the condition on PU(2)PU(2). So the Hopf bundle is an equivariant prequantisation for SU(2)SU(2) and for U(2)U(2), and for no action of SO(3)\mathrm{SO}(3). ◀\blacktriangleleft

3 Prove 1.3.

Solution.  Let Φ,Φ′\Phi,\Phi' be two equivariant structures covering ρ\rho. For each gg, gY′∘gY−1g'_Y\circ g_Y^{-1} is an automorphism covering the identity, hence the action of a constant χ(g)∈TP\chi(g)\in T_P by Theorem 1.10. Since TPT_P is central in Aut⁡(Y,λ)\operatorname{Aut}(Y,\lambda), χ\chi is a homomorphism; it is smooth because Φ\Phi and Φ′\Phi' are. Conversely g⋆y=χ(g)⋅(g⋅y)g\star y=\chi(g)\cdot(g\cdot y) is an action by automorphisms. Its orbit map is ΦT∘(χ,y^)\Phi_T\circ(\chi,\hat y), and by Lemma 1.2(i) it pulls λ\lambda back to χ∗θ+y^∗λ\chi^*\theta+\hat y^*\lambda. For G=R/2πZG=\mathbb{R}/2\pi\mathbb{Z}, a smooth character to R/P\mathbb{R}/P lifts to φ↦cφ\varphi\mapsto c\varphi with 2πc∈P2\pi c\in P, and χ∗θ=c dφ\chi^*\theta=c\,\mathrm{d}\varphi. ◀\blacktriangleleft

4 Prove 1.5.

Solution.  (i) The projection G^→G\hat G\to G is a smooth homomorphism, surjective by hypothesis, with kernel the automorphisms covering the identity, which is TPT_P by Theorem 1.10, central in Aut⁡(Y,λ)\operatorname{Aut}(Y,\lambda) and hence in G^\hat G. (ii) The second projection G^→Aut⁡(Y,λ)\hat G\to\operatorname{Aut}(Y,\lambda) is a smooth homomorphism covering the action ρ∘pr1\rho\circ\mathrm{pr}_1 of G^\hat G on XX. (iii) The orbit map of yy restricted to the centre is the orbit map of the principal action of TPT_P, and λ\lambda is calibrated. (iv) A smooth homomorphic section ss is a smooth homomorphism G→Aut⁡(Y,λ)G\to\operatorname{Aut}(Y,\lambda) lifting ρ\rho, and conversely. The orbit maps satisfy y^G=y^G^∘s\hat y^{G}=\hat y^{\hat G}\circ s, so the moment map is s∗μ^s^*\hat\mu. ◀\blacktriangleleft

Reduction

The reduced space of an equivariantly prequantised space is the quotient of the zero level of the moment map. When the group acts principally on the level set, the quotient is a parasymplectic space with a prequantum bundle of the same structure group, and no regularity of the level set is required. Reduction at an irrational level produces prequantum bundles whose structure group is an irrational torus. For non-principal actions the prequantum data are defined on the stack quotient, and reduction can be performed in stages.

The reduction theorem

Let (Y,λ)(Y,\lambda) be an equivariant prequantisation of (X,ω)(X,\omega) for a diffeological group GG, with moment map μ ⁣:X→G∗\mu\colon X\to\mathcal{G}^{*} (Theorem 1.2). Put Z=μ−1(0)⊆X,YZ=π−1(Z)⊆Y,X0=Z/G,Y0=YZ/G,Z=\mu^{-1}(0)\subseteq X,\qquad Y_Z=\pi^{-1}(Z)\subseteq Y,\qquad X_0=Z/G,\qquad Y_0=Y_Z/G, with subspace and quotient diffeologies. The subset ZZ is invariant because μ\mu is equivariant and the coadjoint action is linear. The space X0X_0 is the reduced space.

Lemma 1.1.

  1. If GG acts principally on ZZ and W→ZW\to Z is a smooth equivariant map of GG-spaces, then GG acts principally on WW.

  2. If commuting actions of HH and KK on WW define a principal action of H×KH\times K, then KK acts principally on W/HW/H, with quotient W/(H×K)W/(H\times K). Conversely, if HH acts principally on WW and KK acts principally on W/HW/H, then H×KH\times K acts principally on WW.

  3. If q ⁣:W→Bq\colon W\to B is a subduction and A⊆WA\subseteq W is saturated, A=q−1(q(A))A=q^{-1}(q(A)), then q∣A ⁣:A→q(A)q|_A\colon A\to q(A) is a subduction for the subspace diffeologies.

The proof is [exo:principal].

Theorem 1.2 (C: reduction). Suppose GG acts principally on Z=μ−1(0)Z=\mu^{-1}(0). Then:

  1. there is a unique closed 22-form ω0\omega_0 on X0X_0 with πG∗ω0=ω∣Z\pi_G^*\omega_0=\omega|_Z;

  2. Y0→X0Y_0\to X_0 is a principal TPT_P-bundle, and λ∣YZ\lambda|_{Y_Z} descends to a connection form λ0\lambda_0 on Y0Y_0 with curvature ω0\omega_0;

  3. (Y0,λ0)(Y_0,\lambda_0) is the bundle with connection on Z/G≃Z/ ⁣ ⁣/GZ/G\simeq Z/\!\!/G of Theorem 1.4(iv).

So (X0,ω0)(X_0,\omega_0) is a parasymplectic space prequantised by (Y0,λ0)(Y_0,\lambda_0) with the same group of periods PP.

Proof. The bundle. The projection YZ→ZY_Z\to Z is equivariant, so GG acts principally on YZY_Z by 1.1(a). The torus TPT_P acts principally on YZY_Z, the restriction of a principal bundle. The product G×TPG\times T_P acts principally on YZY_Z: if (g,τ)⋅y=y(g,\tau)\cdot y=y then gg fixes π(y)\pi(y), so g=1g=1 and then τ=1\tau=1; and if r↦(yr,grτryr)r\mapsto(y_r,g_r\tau_ry_r) is a plot of YZ×YZY_Z\times Y_Z then r↦grr\mapsto g_r is a plot of GG by principality on ZZ, hence r↦τryrr\mapsto\tau_ry_r is a plot, and r↦τrr\mapsto\tau_r is a plot of TPT_P. By 1.1(b), TPT_P acts principally on Y0=YZ/GY_0=Y_Z/G with quotient YZ/(G×TP)=(YZ/TP)/G=Z/GY_Z/(G\times T_P)=(Y_Z/T_P)/G=Z/G.

The connection. Every gYg_Y preserves λ\lambda, and for y∈YZy\in Y_Z the orbit pullback y^∗λ=μ(π(y))\hat y^*\lambda=\mu(\pi(y)) vanishes. By Corollary 1.12, Φ∗λ=prY∗λ\Phi^*\lambda=\mathrm{pr}_Y^*\lambda on G×YZG\times Y_Z, and by Proposition 1.6(i) the form λ∣YZ\lambda|_{Y_Z} descends to a form λ0\lambda_0 on Y0Y_0. It is invariant under TPT_P because λ\lambda is and the quotient map q ⁣:YZ→Y0q\colon Y_Z\to Y_0 is equivariant. It is calibrated: the orbit map of q(y)q(y) under TPT_P is q∘y^q\circ\hat y, and (q∘y^)∗λ0=y^∗λ=θ(q\circ\hat y)^*\lambda_0=\hat y^*\lambda=\theta.

The curvature. Let ω0\omega_0 be the curvature of λ0\lambda_0 (Lemma 1.2), so π0∗ω0=dλ0\pi_0^*\omega_0=\mathrm{d}\lambda_0 with π0 ⁣:Y0→X0\pi_0\colon Y_0\to X_0. Then π∗πG∗ω0=q∗π0∗ω0=q∗dλ0=dλ∣YZ=π∗(ω∣Z),\pi^*\pi_G^*\omega_0=q^*\pi_0^*\omega_0=q^*\mathrm{d}\lambda_0=\mathrm{d}\lambda|_{Y_Z}=\pi^*(\omega|_Z), and π∗\pi^* is injective; so πG∗ω0=ω∣Z\pi_G^*\omega_0=\omega|_Z. Uniqueness holds because πG∗\pi_G^* is injective. (iii) Both bundles pull back to (YZ,λ)(Y_Z,\lambda) with its descent datum, and descent data determine the descended object. ◻

Three features of the statement differ from the theorem of Marsden and Weinstein [64]. The level set is an arbitrary subset with the subspace diffeology: 00 need not be a regular value, and ZZ need not be a manifold. The group is an arbitrary diffeological group. And the hypothesis is the single condition that the action on ZZ be principal, which for a Lie group acting on a manifold ZZ is the classical condition that the action be free and proper [I, §7.1].

Corollary 1.3 (The exact case). Let α\alpha be an invariant 11-form on XX, ω=dα\omega=\mathrm{d}\alpha, μ(x)=x^∗α\mu(x)=\hat x^*\alpha. If GG acts principally on Z=μ−1(0)Z=\mu^{-1}(0), then α∣Z\alpha|_Z descends to a 11-form α0\alpha_0 on Z/GZ/G and ω0=dα0\omega_0=\mathrm{d}\alpha_0.

Reduction of a prequantised space. Each column is a principal TPT_P-bundle with connection; the right-hand squares are pullbacks of bundles with connection.

Levels and periods

Reduction at a non-zero level is reduction at zero for a twisted lift. By Proposition 1.3, a character χ ⁣:G→TP\chi\colon G\to T_P changes the moment map to μ+χ∗θ\mu+\chi^*\theta; so μ−1(−χ∗θ)\mu^{-1}(-\chi^*\theta) is the zero level of an equivariant prequantisation, and 1.2 applies to it. For the circle the admissible levels are the cc with 2πc∈P2\pi c\in P. If ω\omega is exact, every PP is available for the bundle upstairs (Example 1.7), and the level determines the smallest one: reduction of an exact form at the level cc produces a prequantum bundle whose group of periods is generated by 2πc2\pi c.

Example 1.4 (Projective space). Let X=Cn+1X=\mathbb{C}^{n+1} with α=12∑(xkdyk−ykdxk)\alpha=\tfrac12\sum(x_k\mathrm{d}y_k-y_k\mathrm{d}x_k), and let S1S^1 act by scalars, μ0=12∣z∣2\mu_0=\tfrac12\lvert z\rvert^2. Fix c>0c>0, P=2πcZP=2\pi c\mathbb{Z}, Y=Cn+1×TPY=\mathbb{C}^{n+1}\times T_P, λ=α+θ\lambda=\alpha+\theta, with the lift eiφ⋅(z,t)=(eiφz, t−cφ)e^{i\varphi}\cdot(z,t)=(e^{i\varphi}z,\,t-c\varphi) and moment map 12∣z∣2−c\tfrac12\lvert z\rvert^2-c. The zero level is the sphere of radius 2c\sqrt{2c}, on which S1S^1 acts principally, and X0=CPnX_0=\mathbb{C}P^n. Each orbit in YZY_Z intersects {t=0}\{t=0\} exactly once, so Y0≅S2n+1Y_0\cong S^{2n+1} with λ0=α∣S2n+1\lambda_0=\alpha|_{S^{2n+1}}: the Hopf bundle, with ∫CP1ω0=2πc\int_{\mathbb{C}P^1}\omega_0=2\pi c.

Theorem 1.5 (The prequantum bundle of S2×S2S^2\times S^2). Let c1,c2>0c_1,c_2>0, P=2π(c1Z+c2Z)P=2\pi(c_1\mathbb{Z}+c_2\mathbb{Z}), and let T2T^2 act on X=C2×C2X=\mathbb{C}^2\times\mathbb{C}^2 by scalars on the two factors, lifted to Y=X×TPY=X\times T_P by (φ1,φ2)⋅(z,w,t)=(eiφ1z, eiφ2w, t−c1φ1−c2φ2)(\varphi_1,\varphi_2)\cdot(z,w,t)=(e^{i\varphi_1}z,\,e^{i\varphi_2}w,\,t-c_1\varphi_1-c_2\varphi_2). Let K⊂R2K\subset\mathbb{R}^2 be the line c1φ1+c2φ2=0c_1\varphi_1+c_2\varphi_2=0 and Kˉ\bar K its image in T2T^2.

  1. The reduced space is (S2×S2, c1ω1+c2ω2)(S^2\times S^2,\ c_1\omega_1+c_2\omega_2) with ∫S2ωi=2π\int_{S^2}\omega_i=2\pi.

  2. The reduced prequantum bundle is Y0≅(S3×S3)/KY_0\cong(S^3\times S^3)/K, the space of orbits of the linear flow of slope −c1/c2-c_1/c_2 on the tori T2⋅(z,w)T^2\cdot(z,w), with structure group T2/Kˉ≅TPT^2/\bar K\cong T_P.

  3. If c1/c2c_1/c_2 is rational, Kˉ\bar K is a circle, Y0Y_0 is a compact 55-manifold and TPT_P is a circle.

  4. If c1/c2c_1/c_2 is irrational, TPT_P is an irrational torus, K≅RK\cong\mathbb{R} acts principally on S3×S3S^3\times S^3, and Y0Y_0 has the shape of S3×S3S^3\times S^3; its D-topology is not Hausdorff.

Proof. The lift is defined on T2T^2 because 2πci∈P2\pi c_i\in P, and it preserves λ=α1+α2+θ\lambda=\alpha_1+\alpha_2+\theta. By Proposition 1.3 the moment map is (12∣z∣2−c1, 12∣w∣2−c2)(\tfrac12\lvert z\rvert^2-c_1,\ \tfrac12\lvert w\rvert^2-c_2), with zero level Z=S3×S3Z=S^3\times S^3, on which T2T^2 acts freely and properly. This gives (i) by 1.2 and 1.4. (ii) The map S3×S3→Y0S^3\times S^3\to Y_0, (z,w)↦[z,w,0](z,w)\mapsto[z,w,0], is a subduction: a plot of Y0Y_0 lifts locally to S3×S3×RS^3\times S^3\times\mathbb{R}, and the rotation by φ1=t/c1\varphi_1=t/c_1 moves it into {t=0}\{t=0\}. Two points of {t=0}\{t=0\} are identified if and only if they differ by (φ1,φ2)(\varphi_1,\varphi_2) with c1φ1+c2φ2∈Pc_1\varphi_1+c_2\varphi_2\in P, that is, by an element of K+(2πZ)2K+(2\pi\mathbb{Z})^2. The structure group acts through T2/Kˉ=R2/(K+(2πZ)2)T^2/\bar K=\mathbb{R}^2/(K+(2\pi\mathbb{Z})^2), which (φ1,φ2)↦c1φ1+c2φ2(\varphi_1,\varphi_2)\mapsto c_1\varphi_1+c_2\varphi_2 maps isomorphically to R/P\mathbb{R}/P. (iii) is clear. (iv) The map K→T2K\to T^2 is the irrational winding, an induction [IZ, Exercise 31]; so a plot of T2T^2 with values in Kˉ\bar K is a plot of KK, and the action of KK on S3×S3S^3\times S^3, a restriction of the principal action of T2T^2, is principal. By [I, Theorem 5.4] the shape of Y0Y_0 is the quotient of the shape of S3×S3S^3\times S^3 by that of K≅RK\cong\mathbb{R}, which is contractible. The D-topology is [exo:nonhausdorff]. ◻

So the prequantum bundle of a product of spheres with incommensurable areas, which exists by Theorem 1.5, has the explicit model (S3×S3)/R(S^3\times S^3)/\mathbb{R}: a diffeological space of dimension 55 with the homotopy type of S3×S3S^3\times S^3, fibred over S2×S2S^2\times S^2 by irrational tori. As the ratio c1/c2c_1/c_2 varies, the manifolds of (iii) and the spaces of (iv) alternate densely.

Left: the kernel of T2→TPT^2\to T_P in 1.5 is a dense line; the structure group is its space of leaves. Right: the levels at which a circle action can be reduced together with its prequantum bundle form the group 12πP\tfrac1{2\pi}P.

Non-principal actions

When the action on ZZ is not principal, Theorem 1.4(iii) still applies to the GG-space ZZ.

Theorem 1.6 (Reduction to the stack). For every equivariant prequantisation, the restriction of (Y,λ)(Y,\lambda) to Z=μ−1(0)Z=\mu^{-1}(0) is a map ∇0 ⁣:Z/ ⁣ ⁣/G→B(TP)conn\nabla_0\colon Z/\!\!/G\to\mathbf{B}(T_{P})_{\mathrm{conn}}, and ω∣Z\omega|_Z is a closed 22-form on Z/ ⁣ ⁣/GZ/\!\!/G in the sense of (4), the curvature of ∇0\nabla_0.

Proof. The moment map of the GG-space ZZ with the restricted bundle is zero, so Theorem 1.4(iii) gives ∇0\nabla_0. Composing with FF gives a map Z/ ⁣ ⁣/G→Ωcl2Z/\!\!/G\to\Omega^{2}_{\mathrm{cl}} restricting to ω∣Z\omega|_Z. ◻

By [I, Theorem 7.8] the stack Z/ ⁣ ⁣/GZ/\!\!/G maps to the diffeological orbit space Z/GZ/G, and the question is which of the data descend further. For the form there is a general answer when ZZ is a manifold.

Theorem 1.7 (Karshon–Watts [48). ]Let a Lie group GG act on a manifold MM so that its identity component acts properly. Then π∗\pi^* is an isomorphism from the diffeological forms on M/GM/G onto the basic forms on MM, that is, the invariant forms annihilated by the contractions with the generators of the action.

Corollary 1.8. In the situation of 1.7, let M=Z=μ−1(0)M=Z=\mu^{-1}(0) be a submanifold of a manifold XX. Then ω∣Z\omega|_Z descends to a closed 22-form on the diffeological space Z/GZ/G. The bundle YZ/G→Z/GY_Z/G\to Z/G has fibre TP/χz(Gz)T_P/\chi_z(G_z) over the orbit of zz, where χz ⁣:Gz→TP\chi_z\colon G_z\to T_P is the character by which the stabiliser acts on the fibre of YY over zz.

Proof. ω∣Z\omega|_Z is invariant, and ιξZω∣Z=−d⟨μ,ξ⟩∣Z=0\iota_{\xi_Z}\omega|_Z=-\mathrm{d}\langle\mu,\xi\rangle|_Z=0, so it is basic. The stabiliser GzG_z preserves the fibre YzY_z and commutes with TPT_P, so it acts by translations through a homomorphism χz\chi_z, and the fibre of YZ/GY_Z/G over [z][z] is Yz/GzY_z/G_z. ◻

What descends to which quotient.
quotient of ZZ object reduced 22-form reduced prequantum bundle
Z/ ⁣ ⁣/GZ/\!\!/G stack always (1.6) always
Z/GZ/G, action principal diffeological space, ≃Z/ ⁣ ⁣/G\simeq Z/\!\!/G yes (1.2) yes
Z/GZ/G, ZZ manifold, proper diffeological space yes (1.8) where the characters χz\chi_z are trivial

For the circle acting on C2\mathbb{C}^2 with weights (1,2)(1,2) at a positive level, Z=S3Z=S^3, Z/GZ/G is the teardrop orbifold with one point of structure group Z2\mathbb{Z}_2, the reduced form exists by 1.8, and the reduced bundle is a principal bundle away from that point. An example with XX of infinite dimension and singular reduced space is in [43].

Reduction in stages

Theorem 1.9 (Stages). Let GG and HH act on XX by commuting actions, and let (Y,λ)(Y,\lambda) be an equivariant prequantisation for G×HG\times H, with moment map (μG,μH) ⁣:X→G∗×H∗(\mu_G,\mu_H)\colon X\to\mathcal{G}^{*}\times\mathcal{H}^{*} and zero levels ZGZ_G, ZHZ_H.

  1. μH\mu_H is GG-invariant. The group HH acts on XG=ZG/GX_G=Z_G/G, and (ZG∩ZH)/(G×H)  ≅  ((ZG∩ZH)/G)/H(Z_G\cap Z_H)/(G\times H)\;\cong\;\bigl((Z_G\cap Z_H)/G\bigr)/H as diffeological spaces, where (ZG∩ZH)/G(Z_G\cap Z_H)/G is a subspace of XGX_G.

  2. If GG acts principally on ZGZ_G and HH acts principally on (ZG∩ZH)/G(Z_G\cap Z_H)/G, then G×HG\times H acts principally on ZG∩ZHZ_G\cap Z_H, the reduced space XGX_G is prequantised and HH-equivariant with moment map induced by μH\mu_H, and the reduction of XGX_G by HH is the reduction of XX by G×HG\times H, with the same 22-form and the same prequantum bundle.

The proof is [exo:stages].

Solved exercises

Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.

1 Reduce the plane C\mathbb{C} by the rotations at a level c>0c>0, with P=2πcZP=2\pi c\mathbb{Z}.

Solution.  With the lift of 1.4 for n=0n=0, the zero level is the circle ∣z∣2=2c\lvert z\rvert^2=2c, on which S1S^1 acts principally, and X0X_0 is a point. The bundle YZ=S1×TPY_Z=S^1\times T_P has the action eiφ⋅(z,t)=(eiφz,t−cφ)e^{i\varphi}\cdot(z,t)=(e^{i\varphi}z,t-c\varphi), and Y0≅S1Y_0\cong S^1 by the slice t=0t=0; under TP=R/2πcZT_P=\mathbb{R}/2\pi c\mathbb{Z} the orbit of a point of Y0Y_0 is all of Y0Y_0. So Y0→X0Y_0\to X_0 is TP→∗T_P\to\ast, the only principal bundle over a point, and ω0=0\omega_0=0. ◀\blacktriangleleft

2 In 1.5 let c1=pc_1=p and c2=qc_2=q be coprime positive integers. Describe Kˉ\bar K, TPT_P and Y0Y_0.

Solution.  P=2π(pZ+qZ)=2πZP=2\pi(p\mathbb{Z}+q\mathbb{Z})=2\pi\mathbb{Z}, so TPT_P is the circle of length 2π2\pi. The line pφ1+qφ2=0p\varphi_1+q\varphi_2=0 is φ=s(q,−p)\varphi=s(q,-p), and its image in T2T^2 is the circle s∈R/2πZs\in\mathbb{R}/2\pi\mathbb{Z}, embedded because p,qp,q are coprime. So Y0=(S3×S3)/S1Y_0=(S^3\times S^3)/S^1 for the action eis⋅(z,w)=(eiqsz,e−ipsw)e^{is}\cdot(z,w)=(e^{iqs}z,e^{-ips}w), which is free; Y0Y_0 is a compact 55-manifold, a circle bundle over S2×S2S^2\times S^2 with Chern class (p,q)(p,q) in the basis dual to the two spheres, since the curvature has the periods 2πp2\pi p and 2πq2\pi q on them. ◀\blacktriangleleft

3 Show that for c1/c2c_1/c_2 irrational the D-topology of Y0=(S3×S3)/KY_0=(S^3\times S^3)/K is not Hausdorff, and determine the closure of a point.

Solution.  The D-topology of a quotient is the quotient of the D-topology [IZ, art. 2.12], here of the manifold topology of S3×S3S^3\times S^3. The orbit of (z,w)(z,w) under KK is dense in the orbit under T2T^2, because Kˉ\bar K is dense in T2T^2. A saturated closed set containing (z,w)(z,w) therefore contains T2⋅(z,w)T^2\cdot(z,w), and conversely the T2T^2-orbit is closed and saturated. So the closure of the point [z,w]∈Y0[z,w]\in Y_0 is the fibre of Y0→S2×S2Y_0\to S^2\times S^2 through it, a copy of TPT_P, and two points of one fibre have no disjoint neighbourhoods. The quotient of Y0Y_0 by the relation of having the same closure is S2×S2S^2\times S^2. ◀\blacktriangleleft

3 Prove 1.1.

Solution.  (a) If gw=wgw=w then gg fixes the image of ww in ZZ, so g=1g=1. Let r↦(wr,grwr)r\mapsto(w_r,g_rw_r) be a plot of W×WW\times W. Its image in Z×ZZ\times Z is a plot r↦(zr,grzr)r\mapsto(z_r,g_rz_r), so r↦grr\mapsto g_r is a plot of GG, because the action map of ZZ is an induction; then r↦(gr,wr)r\mapsto(g_r,w_r) is a plot of G×WG\times W. (b) If k[w]=[w]k[w]=[w] then kw=hwkw=hw for some hh, so (h−1,k)(h^{-1},k) fixes ww and k=1k=1. Let r↦([wr],kr[wr])r\mapsto([w_r],k_r[w_r]) be a plot of (W/H)2(W/H)^2; locally it lifts to a plot r↦(wr,wr′)r\mapsto(w_r,w'_r) of W2W^2 with wr′=hrkrwrw'_r=h_rk_rw_r, and r↦(hr,kr)r\mapsto(h_r,k_r) is a plot of H×KH\times K by principality, so r↦krr\mapsto k_r is a plot. The quotient of W/HW/H by KK is W/(H×K)W/(H\times K) because a composite of subductions is a subduction. Conversely, if (h,k)w=w(h,k)w=w then k[w]=[w]k[w]=[w], so k=1k=1 and then h=1h=1; and for a plot r↦(wr,hrkrwr)r\mapsto(w_r,h_rk_rw_r) the projection to (W/H)2(W/H)^2 gives that r↦krr\mapsto k_r is a plot, hence r↦hrwr=kr−1wr′r\mapsto h_rw_r=k_r^{-1}w'_r is a plot, and r↦hrr\mapsto h_r is a plot. (c) Let QQ be a plot of BB with values in q(A)q(A). Locally Q=q∘Q~Q=q\circ\tilde Q with Q~\tilde Q a plot of WW, and Q~\tilde Q takes its values in q−1(q(A))=Aq^{-1}(q(A))=A; so Q~\tilde Q is a plot of the subspace AA. ◀\blacktriangleleft

4 Prove 1.9.

Solution.  Momenta of a product. A left-invariant 11-form on G×HG\times H is determined by its restrictions to the slices (Lemma 1.11), which by invariance are determined by the restrictions to G×{1}G\times\{1\} and {1}×H\{1\}\times H; conversely prG∗β+prH∗γ\mathrm{pr}_G^*\beta+\mathrm{pr}_H^*\gamma is left-invariant. So the momenta of G×HG\times H are G∗×H∗\mathcal{G}^{*}\times\mathcal{H}^{*}, and since the factors commute, Ad⁡∗(g,1)\operatorname{Ad}_*(g,1) is the identity on H∗\mathcal{H}^{*}. Equivariance of the moment map (Theorem 1.2) gives μH(gx)=μH(x)\mu_H(gx)=\mu_H(x).

(i) The action of HH preserves ZGZ_G and commutes with GG, so it descends to XGX_G. The set ZG∩ZHZ_G\cap Z_H is saturated for ZG→XGZ_G\to X_G because μH\mu_H is GG-invariant; by 1.1(c) its image in XGX_G, with the subspace diffeology, is the quotient (ZG∩ZH)/G(Z_G\cap Z_H)/G. The displayed isomorphism holds because both sides are quotients of ZG∩ZHZ_G\cap Z_H by the same equivalence relation and subductions compose.

(ii) By 1.2, XGX_G is prequantised by YG=YZG/GY_G=Y_{Z_G}/G with λG\lambda_G. The action of HH on YZGY_{Z_G} commutes with GG and preserves λ\lambda, so it descends to an action on YGY_G preserving λG\lambda_G. Its moment map at [x][x] is the pullback of λG\lambda_G by the orbit map q∘y^Hq\circ\hat y^H, which is (y^H)∗λ=μH(x)(\hat y^H)^*\lambda=\mu_H(x). So the zero level in XGX_G is (ZG∩ZH)/G(Z_G\cap Z_H)/G. The restriction of the principal action of GG to the invariant subspace ZG∩ZHZ_G\cap Z_H is principal, and by 1.1(b) so is the action of G×HG\times H. Both reductions are therefore defined on the same space. The two reduced 22-forms pull back to ω∣ZG∩ZH\omega|_{Z_G\cap Z_H} and the two connection forms to λ∣YZG∩ZH\lambda|_{Y_{Z_G\cap Z_H}}; pullback along a subduction is injective, so they coincide. ◀\blacktriangleleft

Applications

Number theory: periods, ideals, and Heisenberg quasi-nilmanifolds

Let K⊂RK\subset\mathbb{R} be a number field with ring of integers O\mathcal{O}. For fractional ideals a,b\mathfrak{a},\mathfrak{b} the product R/a×R/b\mathbb{R}/\mathfrak{a}\times\mathbb{R}/\mathfrak{b} is a two-dimensional symplectic quasi-torus. Its diffeomorphism type is the Steinitz class of a⊕b\mathfrak{a}\oplus\mathfrak{b}, its symplectic type is the ideal ab\mathfrak{a}\mathfrak{b}, which is its group of periods, its symplectic mapping class group is a Hilbert modular group, and its prequantum bundle is a quotient of the Heisenberg group by an arithmetic subgroup, with structure group R/ab\mathbb{R}/\mathfrak{a}\mathfrak{b}.

Symplectic rigidity

Volume I attached to an irrational number α\alpha the one-dimensional torus TαT_{\alpha} and read the arithmetic of Z+αZ\mathbb{Z}+\alpha\mathbb{Z} from its diffeology [I, Chapter 9]. A one-dimensional space carries no non-zero 22-form (Example 1.4); the first symplectic examples are quotients of the plane.

Theorem 1.1 (Symplectic rigidity of quasi-tori). Let Γ,Γ′⊂R2n\Gamma,\Gamma'\subset\mathbb{R}^{2n} be dense subgroups and Ω,Ω′\Omega,\Omega' non-degenerate alternating forms.

  1. (TΓ,ωΩ)≅(TΓ′,ωΩ′)(T_\Gamma,\omega_\Omega)\cong(T_{\Gamma'},\omega_{\Omega'}) in PSymp\mathsf{PSymp} if and only if there is A∈GL⁡2n(R)A\in\operatorname{GL}_{2n}(\mathbb{R}) with AΓ=Γ′A\Gamma=\Gamma' and A∗Ω′=ΩA^*\Omega'=\Omega.

  2. Diff⁡(TΓ,ωΩ)={ [x]↦[Ax+b]∣A∈Sp⁡(Γ,Ω), b∈R2n }\operatorname{Diff}(T_\Gamma,\omega_\Omega)=\{\,[x]\mapsto[Ax+b]\mid A\in\operatorname{Sp}(\Gamma,\Omega),\ b\in\mathbb{R}^{2n}\,\}, where Sp⁡(Γ,Ω)={ A∈Sp⁡(Ω)∣AΓ=Γ }\operatorname{Sp}(\Gamma,\Omega)=\{\,A\in\operatorname{Sp}(\Omega)\mid A\Gamma=\Gamma\,\}. Its identity component is the group TΓT_\Gamma of translations, and its group of components is Sp⁡(Γ,Ω)\operatorname{Sp}(\Gamma,\Omega).

  3. The group Ω(Γ∧Γ)⊂R\Omega(\Gamma\wedge\Gamma)\subset\mathbb{R} generated by the toric periods Ω(γ,γ′)\Omega(\gamma,\gamma') is an invariant of (TΓ,ωΩ)(T_\Gamma,\omega_\Omega).

The proof is [exo:symp-rigidity]; it combines the linear rigidity of [I, Theorem 9.1] with Proposition 1.5.

For a lattice Γ\Gamma in the plane the only invariant is the area of the torus. For a dense subgroup the form Ω\Omega restricted to Γ\Gamma is a homomorphism Λ2Γ→R\Lambda^2\Gamma\to\mathbb{R} of a group of rank (rk⁡Γ2)\binom{\operatorname{rk}\Gamma}2, and its image is a dense subgroup of R\mathbb{R} with its own arithmetic.

Tori attached to ideals

Fix a number field KK of degree d≥2d\ge2 with an embedding K⊂RK\subset\mathbb{R}. A fractional ideal a\mathfrak{a} is a dense subgroup of R\mathbb{R} of rank dd, and Ta=R/aT_\mathfrak{a}=\mathbb{R}/\mathfrak{a} is a one-dimensional quasi-torus with End⁡(Ta)=O\operatorname{End}(T_\mathfrak{a})=\mathcal{O}; two of them are diffeomorphic if and only if the ideals have the same class in Cl⁡(K)\operatorname{Cl}(K) [I, Proposition 9.5, Theorem 10.2]. For two fractional ideals put Xa,b=Ta×Tb=R2/(a⊕b),ω=the image of dx∧dy.X_{\mathfrak{a},\mathfrak{b}}=T_\mathfrak{a}\times T_\mathfrak{b}=\mathbb{R}^2/(\mathfrak{a}\oplus\mathfrak{b}),\qquad\omega=\text{the image of }\mathrm{d}x\wedge\mathrm{d}y .

Theorem 1.2 (Steinitz class and periods).

  1. Xa,b≅Xa′,b′X_{\mathfrak{a},\mathfrak{b}}\cong X_{\mathfrak{a}',\mathfrak{b}'} as diffeological spaces if and only if [ab]=[a′b′][\mathfrak{a}\mathfrak{b}]=[\mathfrak{a}'\mathfrak{b}'] in Cl⁡(K)\operatorname{Cl}(K).

  2. The group of toric periods of (Xa,b,ω)(X_{\mathfrak{a},\mathfrak{b}},\omega) is the ideal ab⊂R\mathfrak{a}\mathfrak{b}\subset\mathbb{R}.

  3. (Xa,b,ω)≅(Xa′,b′,ω)(X_{\mathfrak{a},\mathfrak{b}},\omega)\cong(X_{\mathfrak{a}',\mathfrak{b}'},\omega) in PSymp\mathsf{PSymp} if and only if ab=a′b′\mathfrak{a}\mathfrak{b}=\mathfrak{a}'\mathfrak{b}'.

  4. The symplectic mapping class group π0Diff⁡(Xa,b,ω)\pi_0\operatorname{Diff}(X_{\mathfrak{a},\mathfrak{b}},\omega) is SL⁡(a⊕b)={(abcd) ∣ a,d∈O, b∈ab−1, c∈a−1b, ad−bc=1},\operatorname{SL}(\mathfrak{a}\oplus\mathfrak{b})=\Bigl\{\begin{pmatrix}a&b\\c&d\end{pmatrix}\ \Big|\ a,d\in\mathcal{O},\ b\in\mathfrak{a}\mathfrak{b}^{-1},\ c\in\mathfrak{a}^{-1}\mathfrak{b},\ ad-bc=1\Bigr\}, which is conjugate in SL⁡2(K)\operatorname{SL}_2(K) to the Hilbert modular group SL⁡(O⊕ab)\operatorname{SL}(\mathcal{O}\oplus\mathfrak{a}\mathfrak{b}).

Proof. Let M=a⊕bM=\mathfrak{a}\oplus\mathfrak{b} and M′=a′⊕b′M'=\mathfrak{a}'\oplus\mathfrak{b}', dense subgroups of R2\mathbb{R}^2. A matrix A∈GL⁡2(R)A\in\operatorname{GL}_2(\mathbb{R}) with AM⊆M′AM\subseteq M' has entries in KK: its first column maps a\mathfrak{a} into a′\mathfrak{a}' and into b′\mathfrak{b}', so a∈a′a−1a\in\mathfrak{a}'\mathfrak{a}^{-1} and c∈b′a−1c\in\mathfrak{b}'\mathfrak{a}^{-1}, and similarly for the second column. Hence AA is KK-linear on K2K^2 and commutes with multiplication by O\mathcal{O}: it is a homomorphism of O\mathcal{O}-modules M→M′M\to M'.

(i) By [I, Theorem 9.1], Xa,b≅Xa′,b′X_{\mathfrak{a},\mathfrak{b}}\cong X_{\mathfrak{a}',\mathfrak{b}'} if and only if AM=M′AM=M' for some A∈GL⁡2(R)A\in\operatorname{GL}_2(\mathbb{R}), that is, if and only if M≅M′M\cong M' as O\mathcal{O}-modules. By Steinitz’s theorem [67] a finitely generated torsion-free module over a Dedekind domain is determined by its rank and its Steinitz class, which for a⊕b\mathfrak{a}\oplus\mathfrak{b} is [ab][\mathfrak{a}\mathfrak{b}].

(ii) For m=(x,y)m=(x,y) and m′=(x′,y′)m'=(x',y') in MM, Ω(m,m′)=xy′−x′y\Omega(m,m')=xy'-x'y, and these elements generate ab\mathfrak{a}\mathfrak{b}.

(iii) If the spaces are symplectomorphic the groups of periods coincide, by 1.1(iii). Conversely let ab=a′b′=c\mathfrak{a}\mathfrak{b}=\mathfrak{a}'\mathfrak{b}'=\mathfrak{c}. By (i) there is B∈GL⁡2(K)B\in\operatorname{GL}_2(K) with B(O⊕c)=MB(\mathcal{O}\oplus\mathfrak{c})=M. For m,m′∈K2m,m'\in K^2, Ω(Bm,Bm′)=det⁡B⋅Ω(m,m′)\Omega(Bm,Bm')=\det B\cdot\Omega(m,m'), so by (ii) ab=det⁡B⋅c\mathfrak{a}\mathfrak{b}=\det B\cdot\mathfrak{c}, and det⁡B\det B is a unit of O\mathcal{O}. Then B⋅diag((det⁡B)−1,1)B\cdot\mathrm{diag}((\det B)^{-1},1) has determinant 11 and maps O⊕c\mathcal{O}\oplus\mathfrak{c} onto MM. The same holds for M′M', and the composite M→O⊕c→M′M\to\mathcal{O}\oplus\mathfrak{c}\to M' has determinant 11; apply 1.1(i).

(iv) By 1.1(ii) the group is { A∈SL⁡2(R)∣AM=M }\{\,A\in\operatorname{SL}_2(\mathbb{R})\mid AM=M\,\}. The inclusions aa⊆aa\mathfrak{a}\subseteq\mathfrak{a}, bb⊆ab\mathfrak{b}\subseteq\mathfrak{a}, ca⊆bc\mathfrak{a}\subseteq\mathfrak{b}, db⊆bd\mathfrak{b}\subseteq\mathfrak{b} give the stated conditions, which are stable under inversion in SL⁡2\operatorname{SL}_2. Conjugation by the matrix of (iii) carries it to SL⁡(O⊕c)\operatorname{SL}(\mathcal{O}\oplus\mathfrak{c}). ◻

Corollary 1.3. Ta×Tb≅TO×TabT_\mathfrak{a}\times T_\mathfrak{b}\cong T_{\mathcal{O}}\times T_{\mathfrak{a}\mathfrak{b}}, and Ta×Ta−1≅TO×TOT_\mathfrak{a}\times T_{\mathfrak{a}^{-1}}\cong T_{\mathcal{O}}\times T_{\mathcal{O}}. The diffeomorphism classes of the spaces Xa,bX_{\mathfrak{a},\mathfrak{b}} are in bijection with Cl⁡(K)\operatorname{Cl}(K), and under this bijection the product of tori is the multiplication of ideal classes.

So the class group, which in [I, Theorem 10.2] acted on the set of tori with real multiplication, is here the set of diffeomorphism types of their pairwise products, with its group law. The finer invariant of (iii) is not a class: it is the ideal itself, as a subgroup of R\mathbb{R}. Rescaling the form multiplies it: (XO,c,λω)≅(XO,λc,ω)(X_{\mathcal{O},\mathfrak{c}},\lambda\omega)\cong(X_{\mathcal{O},\lambda\mathfrak{c}},\omega) for λ∈K\lambda\in K, λ>0\lambda>0.

The groups of periods of (XO,O,ω)(X_{\mathcal{O},\mathcal{O}},\omega) and of (XO,p,ω)(X_{\mathcal{O},\mathfrak{p}},\omega) for K=Q(10)K=\mathbb{Q}(\sqrt{10}): two dense subgroups of R\mathbb{R}, one of index 22 in the other, and not related by any rescaling since p\mathfrak{p} is not principal.

Heisenberg quasi-nilmanifolds

Let H=R3\mathsf{H}=\mathbb{R}^3 with (x,y,z)(x′,y′,z′)=(x+x′,y+y′,z+z′−xy′)(x,y,z)(x',y',z')=(x+x',y+y',z+z'-xy') and λ=dz+x dy\lambda=\mathrm{d}z+x\,\mathrm{d}y (Example 1.8), and for an integer n≥1n\ge1 let Hn\mathsf{H}_n be the same with −nxy′-nxy' and λn=dz+nx dy\lambda_n=\mathrm{d}z+nx\,\mathrm{d}y. Put c=ab\mathfrak{c}=\mathfrak{a}\mathfrak{b} and Na,b={ (a,b,c)∣a∈a, b∈b, c∈c },Ya,b(n)=Na,b\Hn.N_{\mathfrak{a},\mathfrak{b}}=\{\,(a,b,c)\mid a\in\mathfrak{a},\ b\in\mathfrak{b},\ c\in\mathfrak{c}\,\},\qquad Y^{(n)}_{\mathfrak{a},\mathfrak{b}}=N_{\mathfrak{a},\mathfrak{b}}\backslash\mathsf{H}_n . The set Na,bN_{\mathfrak{a},\mathfrak{b}} is a subgroup of Hn\mathsf{H}_n because n ab⊆cn\,\mathfrak{a}\mathfrak{b}\subseteq\mathfrak{c}. It is dense in Hn\mathsf{H}_n, and Ya,b(n)Y^{(n)}_{\mathfrak{a},\mathfrak{b}} is a diffeological space of dimension 33: a Heisenberg quasi-nilmanifold.

Theorem 1.4 (Arithmetic prequantisation).

  1. Ya,b(n)→Xa,bY^{(n)}_{\mathfrak{a},\mathfrak{b}}\to X_{\mathfrak{a},\mathfrak{b}} is a principal TcT_\mathfrak{c}-bundle, λn\lambda_n descends to a connection form, and the curvature is nωn\omega. For n=1n=1 the structure group is the smallest possible: c\mathfrak{c} is the group of toric periods.

  2. A translation of Xa,bX_{\mathfrak{a},\mathfrak{b}} lifts to an automorphism of (Ya,b(n),λn)(Y^{(n)}_{\mathfrak{a},\mathfrak{b}},\lambda_n) if and only if it is a translation by a point of Xa,b[n]=1n(a⊕b)/(a⊕b)≅(O/n)2X_{\mathfrak{a},\mathfrak{b}}[n]=\tfrac1n(\mathfrak{a}\oplus\mathfrak{b})/(\mathfrak{a}\oplus\mathfrak{b})\cong(\mathcal{O}/n)^2. The lifts form a central extension 1⟶Tc⟶Gn⟶Xa,b[n]⟶1,1\longrightarrow T_\mathfrak{c}\longrightarrow G_n\longrightarrow X_{\mathfrak{a},\mathfrak{b}}[n]\longrightarrow1, whose commutator is the pairing en(v,w)=n Ω(v~,w~) mod ce_n(v,w)=n\,\Omega(\tilde v,\tilde w)\bmod\mathfrak{c} with values in 1nc/c≅O/n\tfrac1n\mathfrak{c}/\mathfrak{c}\cong\mathcal{O}/n; it is O\mathcal{O}-bilinear, alternating and perfect.

  3. Every A∈SL⁡(a⊕b)A\in\operatorname{SL}(\mathfrak{a}\oplus\mathfrak{b}) with A≡1 mod 2A\equiv1\bmod2 lifts to an automorphism of (Ya,b(n),λn)(Y^{(n)}_{\mathfrak{a},\mathfrak{b}},\lambda_n).

Proof. (i) Let ZH={ (0,0,z) }Z_{\mathsf{H}}=\{\,(0,0,z)\,\} be the centre and L=Na,bZH=a×b×RL=N_{\mathfrak{a},\mathfrak{b}}Z_{\mathsf{H}}=\mathfrak{a}\times\mathfrak{b}\times\mathbb{R}. Then Na,bN_{\mathfrak{a},\mathfrak{b}} is normal in LL, L/Na,b≅R/cL/N_{\mathfrak{a},\mathfrak{b}}\cong\mathbb{R}/\mathfrak{c} by (a,b,z)↦[z](a,b,z)\mapsto[z], and L\Hn=R2/(a⊕b)L\backslash\mathsf{H}_n=\mathbb{R}^2/(\mathfrak{a}\oplus\mathfrak{b}). By [exo:tower], N\Hn→L\HnN\backslash\mathsf{H}_n\to L\backslash\mathsf{H}_n is a principal L/NL/N-bundle. Left multiplication by (a,b,c)(a,b,c) maps (x,y,z)(x,y,z) to (a+x,b+y,c+z−nay)(a+x,b+y,c+z-nay), and d(z−nay)+n(a+x) dy=λn\mathrm{d}(z-nay)+n(a+x)\,\mathrm{d}y=\lambda_n: the form is left-invariant, and it descends to the quotient by the discrete group Na,bN_{\mathfrak{a},\mathfrak{b}}. The centre acts by translation of zz, so the descended form is invariant and calibrated, and dλn=n dx∧dy\mathrm{d}\lambda_n=n\,\mathrm{d}x\wedge\mathrm{d}y. Minimality for n=1n=1 is Proposition 1.6 with 1.2(ii).

(ii) Left multiplication by h∈Hnh\in\mathsf{H}_n descends to N\HnN\backslash\mathsf{H}_n if and only if hh normalises NN. Conjugation by h=(v,z)h=(v,z) maps (m,c)(m,c) to (m,c−nΩ(v,m))(m,c-n\Omega(v,m)), so the normaliser is { (v,z)∣nΩ(v,a⊕b)⊆c }=1n(a⊕b)×R\{\,(v,z)\mid n\Omega(v,\mathfrak{a}\oplus\mathfrak{b})\subseteq\mathfrak{c}\,\}=\tfrac1n(\mathfrak{a}\oplus\mathfrak{b})\times\mathbb{R}; here Ω(v,a⊕b)⊆1nc\Omega(v,\mathfrak{a}\oplus\mathfrak{b})\subseteq\tfrac1n\mathfrak{c} if and only if v∈1n(a⊕b)v\in\tfrac1n(\mathfrak{a}\oplus\mathfrak{b}) because the ideals are invertible. These automorphisms preserve λn\lambda_n, commute with the centre and cover the translations by vv; the group they form is Gn=Norm⁡(N)/NG_n=\operatorname{Norm}(N)/N. By Theorem 1.10 every lift of a translation that has one is of this form. A translation by v∉1n(a⊕b)v\notin\tfrac1n(\mathfrak{a}\oplus\mathfrak{b}) has no lift: it changes the holonomy of the loop t↦[tγ]t\mapsto[t\gamma], γ∈a⊕b\gamma\in\mathfrak{a}\oplus\mathfrak{b}, by nΩ(v,γ) mod cn\Omega(v,\gamma)\bmod\mathfrak{c}. The commutator in Hn\mathsf{H}_n is [(v,z),(w,z′)]=(0,−nΩ(v,w))[(v,z),(w,z')]=(0,-n\Omega(v,w)). Bilinearity over O\mathcal{O} and the alternating property are clear, and the pairing is perfect because Ω\Omega identifies 1na⊕1nb\tfrac1n\mathfrak{a}\oplus\tfrac1n\mathfrak{b} with the dual of a⊕b\mathfrak{a}\oplus\mathfrak{b} into 1nc\tfrac1n\mathfrak{c}.

(iii) In the coordinate ζ=z+n2xy\zeta=z+\tfrac n2xy the group law is ζ+ζ′−n2Ω(v,v′)\zeta+\zeta'-\tfrac n2\Omega(v,v') and λn=dζ+n2(x dy−y dx)\lambda_n=\mathrm{d}\zeta+\tfrac n2(x\,\mathrm{d}y-y\,\mathrm{d}x), both invariant under SL⁡2(R)\operatorname{SL}_2(\mathbb{R}) acting on vv ([exo:quantomorphisms]). So A^(v,z)=(Av,z−nqA(v))\hat A(v,z)=(Av,z-nq_A(v)), with qA(x,y)=12ac x2+12bd y2+bc xyq_A(x,y)=\tfrac12ac\,x^2+\tfrac12bd\,y^2+bc\,xy, is an automorphism of Hn\mathsf{H}_n preserving λn\lambda_n. It preserves Na,bN_{\mathfrak{a},\mathfrak{b}} if qA(a⊕b)⊆cq_A(\mathfrak{a}\oplus\mathfrak{b})\subseteq\mathfrak{c}. For x∈ax\in\mathfrak{a}, y∈by\in\mathfrak{b}: bc xy∈cbc\,xy\in\mathfrak{c} always, and if b∈2ab−1b\in2\mathfrak{a}\mathfrak{b}^{-1}, c∈2a−1bc\in2\mathfrak{a}^{-1}\mathfrak{b} then 12ac x2∈c\tfrac12ac\,x^2\in\mathfrak{c} and 12bd y2∈c\tfrac12bd\,y^2\in\mathfrak{c}. ◻

For n=1n=1 part (ii) is the statement that no translation of Xa,bX_{\mathfrak{a},\mathfrak{b}} other than the identity lifts: in the classical terminology the polarisation is principal, for every pair of ideals. For general nn the group GnG_n is the theta group of Cryptography: pairings, isotropic kernels, symplectic lattices, and ene_n is a Weil pairing with values in the nn-torsion of the torus of periods TcT_\mathfrak{c}, an O\mathcal{O}-module of rank one. The restriction to the congruence subgroup in (iii) is the classical phenomenon of theta characteristics.

Left: the Heisenberg quasi-nilmanifold as a principal TcT_\mathfrak{c}-bundle over Xa,bX_{\mathfrak{a},\mathfrak{b}}, c=ab\mathfrak{c}=\mathfrak{a}\mathfrak{b}; rows are quotients by dense subgroups, columns are central extensions. Right: the product of tori attached to ideals realises the multiplication of ideal classes (1.3).

Proposition 1.5 (Duality). The moment map of the translations identifies Xa,bX_{\mathfrak{a},\mathfrak{b}} with Xb,aX_{\mathfrak{b},\mathfrak{a}}, by [x,y]↦[−y,x][x,y]\mapsto[-y,x] in the coordinates dual to (x,y)(x,y).

Proof. Proposition 1.9: the holonomy Ω(a⊕b,⋅)\Omega(\mathfrak{a}\oplus\mathfrak{b},\cdot) is the set of linear forms (x′,y′)↦xy′−x′y(x',y')\mapsto xy'-x'y, with coefficients (−y,x)∈b⊕a(-y,x)\in\mathfrak{b}\oplus\mathfrak{a}. ◻

The symplectic quasi-torus Xa,bX_{\mathfrak{a},\mathfrak{b}} as an arithmetic object.
invariant of (Xa,b,ω)(X_{\mathfrak{a},\mathfrak{b}},\omega) value arithmetic
shape BZ2d\mathbf{B}\mathbb{Z}^{2d} degree d=[K:Q]d=[K:\mathbb{Q}]
diffeomorphism type [ab]∈Cl⁡(K)[\mathfrak{a}\mathfrak{b}]\in\operatorname{Cl}(K) Steinitz class
group of periods ab⊂R\mathfrak{a}\mathfrak{b}\subset\mathbb{R} an ideal, not only its class
π0Diff⁡(X,ω)\pi_0\operatorname{Diff}(X,\omega) SL⁡(O⊕ab)\operatorname{SL}(\mathcal{O}\oplus\mathfrak{a}\mathfrak{b}) Hilbert modular group
prequantum bundle Na,b\HN_{\mathfrak{a},\mathfrak{b}}\backslash\mathsf{H}, group TabT_{\mathfrak{a}\mathfrak{b}} arithmetic subgroup of H\mathsf{H}
lifts of translations to nωn\omega extension of (O/n)2(\mathcal{O}/n)^2 by TabT_{\mathfrak{a}\mathfrak{b}} theta group, Weil pairing in O/n\mathcal{O}/n

Solved exercises

Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.

1 For K=Q(2)K=\mathbb{Q}(\sqrt2) and a=b=O\mathfrak{a}=\mathfrak{b}=\mathcal{O}, compute the group of periods of (XO,O,ω)(X_{\mathcal{O},\mathcal{O}},\omega), the shape of XO,OX_{\mathcal{O},\mathcal{O}}, and the rank of Λ2Γ\Lambda^2\Gamma.

Solution.  Γ=Z[2]2\Gamma=\mathbb{Z}[\sqrt2]^2 has rank 44, so the shape is BZ4\mathbf{B}\mathbb{Z}^4, the homotopy type of a 44-torus, and Λ2Γ\Lambda^2\Gamma has rank 66. The periods xy′−x′yxy'-x'y with x,y,x′,y′∈Z[2]x,y,x',y'\in\mathbb{Z}[\sqrt2] generate Z[2]\mathbb{Z}[\sqrt2], of rank 22. So the period homomorphism Λ2Γ→R\Lambda^2\Gamma\to\mathbb{R} has a kernel of rank 44: a two-dimensional space with a closed 22-form, the homotopy type of a 44-torus, and two independent periods. ◀\blacktriangleleft

2 Let K=Q(10)K=\mathbb{Q}(\sqrt{10}), p=(2,10)\mathfrak{p}=(2,\sqrt{10}), q=(3,1+10)\mathfrak{q}=(3,1+\sqrt{10}). Find A∈SL⁡2(K)A\in\operatorname{SL}_2(K) with A(O⊕pq)=p⊕qA(\mathcal{O}\oplus\mathfrak{p}\mathfrak{q})=\mathfrak{p}\oplus\mathfrak{q}, and deduce the symplectic type of Xp,qX_{\mathfrak{p},\mathfrak{q}}.

Solution.  The ideals have norms 22 and 33, so p+q=O\mathfrak{p}+\mathfrak{q}=\mathcal{O}; indeed a=−2∈pa=-2\in\mathfrak{p}, b=3∈qb=3\in\mathfrak{q}, a+b=1a+b=1. The map (s,t)↦(as−t, bs+t)(s,t)\mapsto(as-t,\ bs+t) has matrix A=(−2−131)A=\bigl(\begin{smallmatrix}-2&-1\\3&1\end{smallmatrix}\bigr) of determinant 11. It maps O⊕pq\mathcal{O}\oplus\mathfrak{p}\mathfrak{q} into p⊕q\mathfrak{p}\oplus\mathfrak{q} because pq⊆p∩q\mathfrak{p}\mathfrak{q}\subseteq\mathfrak{p}\cap\mathfrak{q}, and onto: for (x,y)∈p⊕q(x,y)\in\mathfrak{p}\oplus\mathfrak{q} take s=x+ys=x+y and t=ay−bx∈pqt=ay-bx\in\mathfrak{p}\mathfrak{q}. The ideal pq\mathfrak{p}\mathfrak{q} has norm 66 and contains 4+104+\sqrt{10} of norm 66, so pq=(4+10)\mathfrak{p}\mathfrak{q}=(4+\sqrt{10}). By 1.2, (Xp,q,ω)≅(XO,(4+10),ω)≅(XO,O,(4+10) ω)(X_{\mathfrak{p},\mathfrak{q}},\omega)\cong(X_{\mathcal{O},(4+\sqrt{10})},\omega)\cong(X_{\mathcal{O},\mathcal{O}},(4+\sqrt{10})\,\omega). Neither p\mathfrak{p} nor q\mathfrak{q} is principal, since x2−10y2=±2,±3x^2-10y^2=\pm2,\pm3 have no solutions modulo 55; their product is. The computation is verified in checks.py. ◀\blacktriangleleft

2 For K=Q(2)K=\mathbb{Q}(\sqrt2) exhibit an element of infinite order in π0Diff⁡(XO,O,ω)\pi_0\operatorname{Diff}(X_{\mathcal{O},\mathcal{O}},\omega) that is diagonal, and one that is not conjugate to a diagonal element over KK.

Solution.  The group is SL⁡2(Z[2])\operatorname{SL}_2(\mathbb{Z}[\sqrt2]). With ε=1+2\varepsilon=1+\sqrt2, a unit, diag(ε,ε−1)\mathrm{diag}(\varepsilon,\varepsilon^{-1}) acts on TO×TOT_{\mathcal{O}}\times T_{\mathcal{O}} by the unit ε\varepsilon on one factor and its inverse on the other; each factor is the hyperbolic symmetry of [I, Theorem 9.3], and the product preserves ω\omega because the determinant is 11. The matrix (1101)\bigl(\begin{smallmatrix}1&1\\0&1\end{smallmatrix}\bigr) is unipotent, of infinite order, and not diagonalisable. So the symplectic mapping class group contains hyperbolic and parabolic elements, as the modular group of an ordinary torus does, and in addition the diagonal units, which have no analogue for a lattice. ◀\blacktriangleleft

3 Prove 1.1.

Solution.  (i) Let ff be a diffeomorphism with f∗ωΩ′=ωΩf^*\omega_{\Omega'}=\omega_\Omega. By [I, Theorem 9.1], ff lifts to F(x)=Ax+bF(x)=Ax+b with A∈GL⁡2n(R)A\in\operatorname{GL}_{2n}(\mathbb{R}) and AΓ=Γ′A\Gamma=\Gamma'. Then q∗f∗ωΩ′=F∗q′∗ωΩ′=F∗Ω′=A∗Ω′q^*f^*\omega_{\Omega'}=F^*q'^*\omega_{\Omega'}=F^*\Omega'=A^*\Omega', and q∗ωΩ=Ωq^*\omega_\Omega=\Omega; since q∗q^* is injective, A∗Ω′=ΩA^*\Omega'=\Omega. The converse is the same computation. (ii) Take Γ′=Γ\Gamma'=\Gamma, Ω′=Ω\Omega'=\Omega in (i); translations preserve every ωΩ\omega_\Omega. Let r↦frr\mapsto f_r be a plot of Diff⁡(TΓ,ωΩ)\operatorname{Diff}(T_\Gamma,\omega_\Omega), so that (r,x)↦fr(q(x))(r,x)\mapsto f_r(q(x)) is smooth and lifts locally to Fr(x)=Arx+brF_r(x)=A_rx+b_r, smooth in (r,x)(r,x). For γ∈Γ\gamma\in\Gamma, Arγ=Fr(x+γ)−Fr(x)A_r\gamma=F_r(x+\gamma)-F_r(x) is continuous in rr with values in the countable set Γ\Gamma, hence locally constant; as Γ\Gamma spans, ArA_r is locally constant. So the linear part is constant on components, and the translations, a quotient of R2n\mathbb{R}^{2n}, are connected. (iii) If AΓ=Γ′A\Gamma=\Gamma' and A∗Ω′=ΩA^*\Omega'=\Omega then Ω′(Aγ,Aγ′)=Ω(γ,γ′)\Omega'(A\gamma,A\gamma')=\Omega(\gamma,\gamma'). ◀\blacktriangleleft

3 For K=Q(2)K=\mathbb{Q}(\sqrt2), a=b=O\mathfrak{a}=\mathfrak{b}=\mathcal{O} and n=2n=2, describe X[2]X[2], the pairing e2e_2, and the number of its Lagrangian O\mathcal{O}-submodules.

Solution.  X[2]=(O/2)2X[2]=(\mathcal{O}/2)^2 with O/2=F2[ϵ]/(ϵ2)\mathcal{O}/2=\mathbb F_2[\epsilon]/(\epsilon^2), ϵ=2\epsilon=\sqrt2; it has 1616 elements, and e2(v,w)=v1w2−v2w1∈O/2e_2(v,w)=v_1w_2-v_2w_1\in\mathcal{O}/2. A Lagrangian submodule is a submodule LL equal to its orthogonal; since the pairing is perfect over the ring O/2\mathcal{O}/2 of length 22, LL has 44 elements. The free submodules generated by one element vv with a unit coordinate are isotropic and have 44 elements: there are ∣P1(O/2)∣=6\lvert \mathbb P^1(\mathcal{O}/2)\rvert=6 of them. The submodule ϵX[2]\epsilon X[2] has 44 elements and is isotropic because ϵ2=0\epsilon^2=0. A submodule with 44 elements is either free of rank one or annihilated by ϵ\epsilon, and in the second case it is ϵX[2]\epsilon X[2], which has exactly 44 elements. So there are 77 Lagrangian submodules. They are the analogues for XO,OX_{\mathcal{O},\mathcal{O}} of the Lagrangian kernels of Theorem 1.2, with the additional condition of stability under O\mathcal{O}. ◀\blacktriangleleft

4 Let N⊆LN\subseteq L be subgroups of a diffeological group HH, with NN normal in LL. Prove that N\H→L\HN\backslash H\to L\backslash H is a principal bundle with group L/NL/N.

Solution.  The group L/NL/N acts on N\HN\backslash H by [l]⋅Nh=Nlh[l]\cdot Nh=Nlh, well defined because Nlnh=N(lnl−1)lh=NlhNlnh=N(lnl^{-1})lh=Nlh for n∈Nn\in N. The orbits are the fibres of N\H→L\HN\backslash H\to L\backslash H, and the action is free: Nlh=NhNlh=Nh implies l∈Nl\in N. Let r↦(Nhr,Nhr′)r\mapsto(Nh_r,Nh'_r) be a plot of pairs in the same fibre. The projection H→N\HH\to N\backslash H is a subduction, so locally hrh_r and hr′h'_r are plots of HH, and hr′hr−1h'_rh_r^{-1} is a plot of HH with values in LL, hence a plot of the subgroup LL. Its class in L/NL/N is the unique element carrying NhrNh_r to Nhr′Nh'_r, and it is a plot of L/NL/N. So the action map is an induction, the action is principal, and its quotient is L\HL\backslash H because subductions compose [I, Theorem 7.2, Corollary 7.3]. ◀\blacktriangleleft

Cryptography: pairings, isotropic kernels, symplectic lattices

Three objects of public-key cryptography are parts of the prequantum geometry of a torus. The theta group is the group of automorphisms of the prequantum bundle over the translations, and the Weil pairing is its commutator. The isogenies that preserve a polarisation are the quotients by isotropic subgroups, because those are the subgroups along which the prequantum bundle descends. And the Gram–Schmidt profile of a symplectic basis of a lattice is symmetric, which applies to the NTRU bases of the signature scheme Falcon.

The theta group and the Weil pairing

A polarised torus is a triple (V,Λ,Ω)(V,\Lambda,\Omega): a real vector space of dimension 2n2n, a lattice, and a non-degenerate alternating form with Ω(Λ,Λ)⊆Z\Omega(\Lambda,\Lambda)\subseteq\mathbb{Z}. Put T=V/ΛT=V/\Lambda and Λ#={ v∈V∣Ω(v,Λ)⊆Z }⊇Λ.\Lambda^{\#}=\{\,v\in V\mid\Omega(v,\Lambda)\subseteq\mathbb{Z}\,\}\supseteq\Lambda. The polarisation is principal if Λ#=Λ\Lambda^{\#}=\Lambda. Choose a bilinear form BB on VV with B(v,w)−B(w,v)=Ω(v,w)B(v,w)-B(w,v)=\Omega(v,w) and B(Λ,Λ)⊆ZB(\Lambda,\Lambda)\subseteq\mathbb{Z}, which exists by the normal form of an integral alternating form, and let HB=V×R\mathsf{H}_B=V\times\mathbb{R} with (v,z)(v′,z′)=(v+v′,z+z′−B(v,v′))(v,z)(v',z')=(v+v',z+z'-B(v,v')), λ=dz+B(v,dv)\lambda=\mathrm{d}z+B(v,\mathrm{d}v), N=Λ×ZN=\Lambda\times\mathbb{Z}. As in Theorem 1.4, Y=N\HB→TY=N\backslash\mathsf{H}_B\to T is a prequantisation of (T,ωΩ)(T,\omega_\Omega) with P=ZP=\mathbb{Z}: a circle bundle with connection of curvature Ω\Omega. Over C\mathbb{C}, when VV has a complex structure compatible with Ω\Omega, it is the unit circle bundle of the line bundle of the polarisation.

Theorem 1.1 (Theta group; Mumford [69). ]

  1. The translation of TT by [v][v] lifts to an automorphism of (Y,λ)(Y,\lambda) if and only if v∈Λ#v\in\Lambda^{\#}.

  2. The lifts of translations form the group G(Ω)=Norm⁡(N)/NG(\Omega)=\operatorname{Norm}(N)/N, a central extension 1⟶R/Z⟶G(Ω)⟶Λ#/Λ⟶1.1\longrightarrow\mathbb{R}/\mathbb{Z}\longrightarrow G(\Omega)\longrightarrow\Lambda^{\#}/\Lambda\longrightarrow1 .

  3. The commutator of two lifts is e(v,w)=Ω(v~,w~) mod Ze(v,w)=\Omega(\tilde v,\tilde w)\bmod\mathbb{Z}, up to sign. The pairing ee on Λ#/Λ\Lambda^{\#}/\Lambda is alternating and non-degenerate.

  4. If Ω\Omega is principal and N≥1N\ge1, then for the polarisation NΩN\Omega the group (Λ#)NΩ/Λ(\Lambda^{\#})_{N\Omega}/\Lambda is the NN-torsion subgroup T[N]=1NΛ/ΛT[N]=\tfrac1N\Lambda/\Lambda, and eN(x,y)=N Ω(x~,y~) mod Ze_N(x,y)=N\,\Omega(\tilde x,\tilde y)\bmod\mathbb{Z} takes its values in 1NZ/Z\tfrac1N\mathbb{Z}/\mathbb{Z}.

Proof. The argument of Theorem 1.4(ii) applies with a⊕b\mathfrak{a}\oplus\mathfrak{b} replaced by Λ\Lambda and c\mathfrak{c} by Z\mathbb{Z}: conjugation by (v,z)(v,z) maps (m,c)∈N(m,c)\in N to (m,c−Ω(v,m))(m,c-\Omega(v,m)), the normaliser is Λ#×R\Lambda^{\#}\times\mathbb{R}, left multiplications by its elements descend to automorphisms of (Y,λ)(Y,\lambda), any two lifts of one translation differ by a constant by Theorem 1.10, and a translation by v∉Λ#v\notin\Lambda^{\#} changes holonomies. The commutator in HB\mathsf{H}_B is (0,−Ω(v,w))(0,-\Omega(v,w)). If Ω(v,w)∈Z\Omega(v,w)\in\mathbb{Z} for all w∈Λ#w\in\Lambda^{\#} then v∈(Λ#)#=Λv\in(\Lambda^{\#})^{\#}=\Lambda. For (iv), NΩ(v,Λ)⊆ZN\Omega(v,\Lambda)\subseteq\mathbb{Z} if and only if Nv∈Λ#=ΛNv\in\Lambda^{\#}=\Lambda. ◻

The group G(NΩ)G(N\Omega) is the theta group of the NN-th power of a principal polarisation, and eNe_N is the Weil pairing on the NN-torsion points, in its complex-analytic form. For an elliptic curve C/(Z+τZ)\mathbb{C}/(\mathbb{Z}+\tau\mathbb{Z}) with Ω(1,τ)=1\Omega(1,\tau)=1 it is eN(a+bτN,c+dτN)=ad−bcN mod Ze_N\bigl(\tfrac{a+b\tau}N,\tfrac{c+d\tau}N\bigr)=\tfrac{ad-bc}N\bmod\mathbb{Z}. In the present terms the pairing is a holonomy: the translations by xx and yy commute on TT, their lifts to the prequantum bundle do not, and the defect is the integral of the curvature NΩN\Omega over the parallelogram spanned by the lifts of xx and yy (1.1). Bilinearity and the alternating property are properties of area.

Left: the Weil pairing as the integral of the curvature over a parallelogram. Centre and right: for an elliptic curve and p=3p=3, the Lagrangian subgroups of T[3]T[3] are its four lines, and each is the kernel of an isogeny along which the polarisation descends.

Isotropic kernels

Let K⊆Λ#/ΛK\subseteq\Lambda^{\#}/\Lambda be a subgroup, ΛK⊆Λ#\Lambda_K\subseteq\Lambda^{\#} its preimage, and f ⁣:T→T′=V/ΛKf\colon T\to T'=V/\Lambda_K the quotient map, an isogeny with kernel KK.

Theorem 1.2 (Descent of the polarisation). The following are equivalent:

  1. KK is isotropic for the pairing ee;

  2. Ω(ΛK,ΛK)⊆Z\Omega(\Lambda_K,\Lambda_K)\subseteq\mathbb{Z}, that is, (V,ΛK,Ω)(V,\Lambda_K,\Omega) is a polarised torus;

  3. there is a prequantisation (Y′,λ′)(Y',\lambda') of (T′,ωΩ)(T',\omega_\Omega) with f∗(Y′,λ′)≅(Y,λ)f^*(Y',\lambda')\cong(Y,\lambda).

In that case the descents (Y′,λ′)(Y',\lambda') of (Y,λ)(Y,\lambda) correspond to the homomorphic lifts K→G(Ω)K\to G(\Omega), a torsor under Hom⁡(K,R/Z)\operatorname{Hom}(K,\mathbb{R}/\mathbb{Z}); the group ΛK#/ΛK\Lambda_K^{\#}/\Lambda_K of the quotient is K⊥/KK^\perp/K, of order ∣Λ#/Λ∣/∣K∣2\lvert \Lambda^{\#}/\Lambda\rvert/\lvert K\rvert^2; and the quotient is principally polarised if and only if KK is Lagrangian, K=K⊥K=K^\perp.

Proof. (a)  ⟺  \iff(b) by the definition of ee. (a)⇒\Rightarrow(c): the preimage GKG_K of KK in G(Ω)G(\Omega) is a central extension of the finite abelian group KK by R/Z\mathbb{R}/\mathbb{Z} with trivial commutator pairing, hence abelian, and it splits because R/Z\mathbb{R}/\mathbb{Z} is divisible. A splitting is a group K~≅K\tilde K\cong K of automorphisms of (Y,λ)(Y,\lambda) covering the translations by KK. It acts freely on YY, commutes with the circle, and Y′=Y/K~→T/KY'=Y/\tilde K\to T/K is a principal circle bundle to which the invariant form λ\lambda descends; its pullback to TT is YY. (c)⇒\Rightarrow(a): the deck transformations of f∗Y′→Y′f^*Y'\to Y' are automorphisms of (Y,λ)(Y,\lambda) covering the translations by KK and forming a group isomorphic to KK, so commutators of lifts of elements of KK are trivial. Two splittings differ by a character of KK. Finally v∈ΛK#v\in\Lambda_K^{\#} if and only if Ω(v,ΛK)⊆Z\Omega(v,\Lambda_K)\subseteq\mathbb{Z}, that is, [v]∈K⊥[v]\in K^\perp; and ∣K⊥∣=∣Λ#/Λ∣/∣K∣\lvert K^\perp\rvert=\lvert \Lambda^{\#}/\Lambda\rvert/\lvert K\rvert because ee is non-degenerate. ◻

Corollary 1.3 (NN-isogenies). Let (V,Λ,Ω)(V,\Lambda,\Omega) be principally polarised. The quotients T→T/KT\to T/K for which NΩN\Omega descends to a principal polarisation are those with K⊆T[N]K\subseteq T[N] Lagrangian for eNe_N; then ∣K∣=Nn\lvert K\rvert=N^n. For N=pN=p prime their number is ∏i=1n(pi+1)\prod_{i=1}^n(p^i+1).

The count is [exo:lagrangian-count]; the values 3,4,63,4,6 for n=1n=1 and 15,4015,40 for n=2n=2, p=2,3p=2,3 are confirmed by enumeration in checks.py.

For n=1n=1 every cyclic subgroup of order NN is Lagrangian, and the p+1p+1 quotients are the edges of the isogeny graphs on which the protocols of [18] and their predecessors operate. For n=2n=2 and p=2p=2 the 1515 quotients are the Richelot isogenies. The polynomial-time attacks on the SIDH protocol [17, 61, 74] compute isogenies from products of elliptic curves, in dimensions 22, 44 and 88, whose kernels are maximal isotropic for a Weil pairing; isotropy is the condition under which the quotient is again principally polarised. Theorem 1.2 is the statement over C\mathbb{C}; over a finite field the same statement holds with the algebraic theta group [69]. Its geometric form is that of Theorem 1.4: a bundle with connection descends along a quotient exactly when the group acts on it, and for a finite group of translations the obstruction is the commutator.

Symplectic lattices

Let RnR_n be the n×nn\times n matrix with ones on the antidiagonal, and J=(0Rn−Rn0),JT=−J=J−1.J=\begin{pmatrix}0&R_n\\-R_n&0\end{pmatrix},\qquad J^{\mathsf{T}}=-J=J^{-1} . For a basis b1,…,bmb_1,\dots,b_m of Rm\mathbb{R}^m, written as the rows of a matrix BB, let b1∗,…,bm∗b_1^*,\dots,b_m^* be its Gram–Schmidt orthogonalisation.

Theorem 1.4 (Duality of the Gram–Schmidt profile). Let B∈GL⁡2n(R)B\in\operatorname{GL}_{2n}(\mathbb{R}) satisfy BJBT=cJBJB^{\mathsf{T}}=cJ with c>0c>0. Then ∥bi∗∥⋅∥b2n+1−i∗∥=c(1≤i≤2n).\lVert b_i^*\rVert\cdot\lVert b^*_{2n+1-i}\rVert=c\qquad(1\le i\le 2n).

Proof. Replacing BB by c−1/2Bc^{-1/2}B we may take c=1c=1. Then B−T=JBJTB^{-\mathsf T}=JBJ^{\mathsf{T}}. Row ii of JBJB is ±b2n+1−i\pm b_{2n+1-i}, so the dual basis is di=±b2n+1−iJTd_i=\pm b_{2n+1-i}J^{\mathsf{T}}, and the dual basis in reversed order is (±b1JT,…,±b2nJT)(\pm b_1J^{\mathsf{T}},\dots,\pm b_{2n}J^{\mathsf{T}}): the image of the basis BB under an orthogonal map and changes of sign, with the same Gram–Schmidt norms as BB. By [exo:reversed-dual] the reversed dual basis has Gram–Schmidt norms ∥b2n∗∥−1,…,∥b1∗∥−1\lVert b^*_{2n}\rVert^{-1},\dots,\lVert b_1^*\rVert^{-1}. Comparing, ∥bj∗∥=∥b2n+1−j∗∥−1\lVert b_j^*\rVert=\lVert b^*_{2n+1-j}\rVert^{-1}. ◻

Corollary 1.5 (NTRU bases; Gama–Howgrave-Graham–Nguyen [32). ]Let R=Z[x]/(xn+1)\mathcal R=\mathbb{Z}[x]/(x^n+1) and let u=(g,−f)u=(g,-f), u′=(G,−F)u'=(G,-F) in R2\mathcal R^2 satisfy fG−gF=qfG-gF=q. Then the basis u,xu,…,xn−1u,u′,xu′,…,xn−1u′u,xu,\dots,x^{n-1}u,u',xu',\dots,x^{n-1}u' of the NTRU lattice, written in coefficients, satisfies BJBT=qJBJB^{\mathsf{T}}=qJ, and ∥bi∗∥ ∥b2n+1−i∗∥=q\lVert b_i^*\rVert\,\lVert b^*_{2n+1-i}\rVert=q. The same holds for the public basis (1h0q)\bigl(\begin{smallmatrix}1&h\\0&q\end{smallmatrix}\bigr).

Proof. The form ωR(v,w)=v1w2−v2w1\omega_{\mathcal R}(v,w)=v_1w_2-v_2w_1 on R2\mathcal R^2 is R\mathcal R-bilinear and alternating. Its value on (u,u′)(u,u') is qq, and its value on the public basis (1,h)(1,h), (0,q)(0,q) is also qq. Let ℓ ⁣:R→Z\ell\colon\mathcal R\to\mathbb{Z} be the coefficient of xn−1x^{n-1}. For 0≤i,j<n0\le i,j<n, ℓ(xi+j)=1\ell(x^{i+j})=1 if i+j=n−1i+j=n-1 and 00 otherwise, since xi+j=−xi+j−nx^{i+j}=-x^{i+j-n} for i+j≥ni+j\ge n has degree at most n−2n-2. So ℓ∘ωR\ell\circ\omega_{\mathcal R} has the matrix JJ in the coefficient basis of R2\mathcal R^2, and ℓ ωR(xiu,xju′)=q ℓ(xi+j),ℓ ωR(xiu,xju)=0.\ell\,\omega_{\mathcal R}(x^iu,x^ju')=q\,\ell(x^{i+j}),\qquad\ell\,\omega_{\mathcal R}(x^iu,x^ju)=0 . That is BJBT=qJBJB^{\mathsf{T}}=qJ; apply 1.4. ◻

So the second half of the Gram–Schmidt profile of an NTRU basis is determined by the first. The key generation of Falcon [30] must bound max⁡i∥bi∗∥\max_i\lVert b_i^*\rVert for the secret basis, and by the corollary it suffices to bound ∥bi∗∥\lVert b_i^*\rVert and q/∥bi∗∥q/\lVert b_i^*\rVert for i≤ni\le n; the symmetry is also the reason that the profile of such a basis is centred at q\sqrt q (1.2). In the terms of this monograph, an NTRU lattice is a polarised torus (R2n,Λ,q−1ℓωR)(\mathbb{R}^{2n},\Lambda,q^{-1}\ell\omega_{\mathcal R}) whose polarisation is principal, the ring R\mathcal R acts on it by endomorphisms, as O\mathcal{O} does on Xa,bX_{\mathfrak{a},\mathfrak{b}}, and the symmetry of the profile is the self-duality Λ#=Λ\Lambda^{\#}=\Lambda in metric form. The moduli of principally polarised tori with a compatible metric is the Siegel orbifold Sp⁡2n(Z)\Sp⁡2n(R)/U(n)\operatorname{Sp}_{2n}(\mathbb{Z})\backslash\operatorname{Sp}_{2n}(\mathbb{R})/U(n), a diffeological orbifold by the argument of [I, Theorem 10.6]; the isomorphism problem for symplectic lattices is the search problem on its stack.

The Gram–Schmidt profile of a symplectic basis is symmetric about 12log⁡c\tfrac12\log c: the pairs (i,2n+1−i)(i,2n+1-i) joined by arrows have product qq. Data computed in checks.py.

Solved exercises

Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.

1 For Λ=Z+τZ⊂C\Lambda=\mathbb{Z}+\tau\mathbb{Z}\subset\mathbb{C} with Ω(1,τ)=1\Omega(1,\tau)=1, derive the formula for eNe_N and check that eN(x,x)=0e_N(x,x)=0 and that eN(x,⋅)=0e_N(x,\cdot)=0 implies x=0x=0.

Solution.  Ω(a+bτ,c+dτ)=ad−bc\Omega(a+b\tau,c+d\tau)=ad-bc by bilinearity, so eN(a+bτN,c+dτN)=N⋅ad−bcN2=ad−bcN mod Ze_N\bigl(\tfrac{a+b\tau}N,\tfrac{c+d\tau}N\bigr)=N\cdot\tfrac{ad-bc}{N^2}=\tfrac{ad-bc}N\bmod\mathbb{Z}. It vanishes on the diagonal. If ad−bc≡0 mod Nad-bc\equiv0\bmod N for all (c,d)(c,d), take (c,d)=(0,1)(c,d)=(0,1) and (1,0)(1,0): a≡b≡0a\equiv b\equiv0. ◀\blacktriangleleft

2 For T=R2/Z2T=\mathbb{R}^2/\mathbb{Z}^2 with Ω=dx∧dy\Omega=\mathrm{d}x\wedge\mathrm{d}y and N=2N=2, write the lifts of the translations by (12,0)(\tfrac12,0) and (0,12)(0,\tfrac12) to the prequantum bundle of 2Ω2\Omega, and compute their commutator.

Solution.  In H2\mathsf{H}_2, with law z+z′−2xy′z+z'-2xy', the lifts are the left multiplications by h1=(12,0,0)h_1=(\tfrac12,0,0) and h2=(0,12,0)h_2=(0,\tfrac12,0), which normalise N=Z3N=\mathbb{Z}^3. Then h1h2=(12,12,−12)h_1h_2=(\tfrac12,\tfrac12,-\tfrac12) and h2h1=(12,12,0)h_2h_1=(\tfrac12,\tfrac12,0), so h1h2=(0,0,−12) h2h1h_1h_2=(0,0,-\tfrac12)\,h_2h_1: the two lifts commute up to the element −12∈R/Z-\tfrac12\in\mathbb{R}/\mathbb{Z} of the centre, which acts on the associated line bundle by −1-1. The squares h12=(1,0,0)h_1^2=(1,0,0) and h22=(0,1,0)h_2^2=(0,1,0) lie in NN, so the lifts have order 22 on YY and generate, with the centre, the Heisenberg group of level 22. ◀\blacktriangleleft

2 Count the Lagrangian subspaces of a symplectic vector space of dimension 44 over Fp\mathbb F_p, and state the general formula.

Solution.  Count ordered bases (v,w)(v,w) of Lagrangian planes: v≠0v\neq0 gives p4−1p^4-1 choices, and w∈v⊥∖⟨v⟩w\in v^\perp\smallsetminus\langle v\rangle gives p3−pp^3-p. Each plane has (p2−1)(p2−p)(p^2-1)(p^2-p) ordered bases. The quotient is (p2−1)(p2+1) p(p2−1)(p2−1) p(p−1)=(p2+1)(p+1)\frac{(p^2-1)(p^2+1)\,p(p^2-1)}{(p^2-1)\,p(p-1)}=(p^2+1)(p+1): 1515 for p=2p=2, 4040 for p=3p=3. In dimension 2n2n the same count, or induction through v⊥/⟨v⟩v^\perp/\langle v\rangle, gives ∏i=1n(pi+1)\prod_{i=1}^n(p^i+1). ◀\blacktriangleleft

3 Let K⊆T[N]K\subseteq T[N] be Lagrangian for eNe_N and f ⁣:T→T′=T/Kf\colon T\to T'=T/K. Show that f(T[N])⊆T′[N]f(T[N])\subseteq T'[N] is Lagrangian for eN′e'_N, and that the quotient of T′T' by it is TT again.

Solution.  T′=V/ΛKT'=V/\Lambda_K with the principal polarisation Ω′=NΩ\Omega'=N\Omega, and eN′(x,y)=NΩ′(x~,y~)=N2Ω(x~,y~)e'_N(x,y)=N\Omega'(\tilde x,\tilde y)=N^2\Omega(\tilde x,\tilde y) on 1NΛK/ΛK\tfrac1N\Lambda_K/\Lambda_K. The image of T[N]T[N] is K′=1NΛ/ΛKK'=\tfrac1N\Lambda/\Lambda_K, and for x~,y~∈1NΛ\tilde x,\tilde y\in\tfrac1N\Lambda, N2Ω(x~,y~)∈ZN^2\Omega(\tilde x,\tilde y)\in\mathbb{Z}: K′K' is isotropic. Its order is [1NΛ:ΛK]=N2n/Nn=Nn[\tfrac1N\Lambda:\Lambda_K]=N^{2n}/N^n=N^n, so it is Lagrangian. The quotient T′/K′=V/1NΛT'/K'=V/\tfrac1N\Lambda is identified with T=V/ΛT=V/\Lambda by multiplication by NN, and the composite T→T′→TT\to T'\to T is multiplication by NN: the second map is the dual isogeny. ◀\blacktriangleleft

3 Let BB have rows b1,…,bmb_1,\dots,b_m with Gram–Schmidt norms d1,…,dmd_1,\dots,d_m. Show that the dual basis in reversed order has Gram–Schmidt norms dm−1,…,d1−1d_m^{-1},\dots,d_1^{-1}.

Solution.  Gram–Schmidt orthogonalisation is the factorisation B=LDQB=LDQ with LL lower triangular with unit diagonal, D=diag(di)D=\mathrm{diag}(d_i) and QQ orthogonal, and it is unique. The dual basis is B−T=L−TD−1QB^{-\mathsf T}=L^{-\mathsf T}D^{-1}Q, with L−TL^{-\mathsf T} upper unitriangular. Let RR be the permutation matrix reversing the order. Then RB−T=(RL−TR)(RD−1R)(RQ)RB^{-\mathsf T}=(RL^{-\mathsf T}R)(RD^{-1}R)(RQ), where RL−TRRL^{-\mathsf T}R is lower unitriangular, RD−1R=diag(dm−1,…,d1−1)RD^{-1}R=\mathrm{diag}(d_m^{-1},\dots,d_1^{-1}) and RQRQ is orthogonal. By uniqueness this is the Gram–Schmidt factorisation of the reversed dual basis. ◀\blacktriangleleft

4 Complete the proof of 1.4: show that BJBT=JBJB^{\mathsf{T}}=J implies B−T=JBJTB^{-\mathsf T}=JBJ^{\mathsf{T}}, that row ii of JBJB is ±b2n+1−i\pm b_{2n+1-i}, and that the operations used preserve Gram–Schmidt norms.

Solution.  From BJBT=JBJB^{\mathsf{T}}=J, B−1=JBTJ−1B^{-1}=JB^{\mathsf{T}}J^{-1} and B−T=J−TBJT=JBJTB^{-\mathsf T}=J^{-\mathsf T}BJ^{\mathsf{T}}=JBJ^{\mathsf{T}}, since J−T=(−J)−1=JJ^{-\mathsf T}=(-J)^{-1}=J. For i≤ni\le n, row ii of JJ has its only non-zero entry, 11, in column n+(n+1−i)=2n+1−in+(n+1-i)=2n+1-i; for i=n+ki=n+k it has −1-1 in column n+1−k=2n+1−in+1-k=2n+1-i. So row ii of JBJB is ±b2n+1−i\pm b_{2n+1-i}. Multiplying all vectors of a basis on the right by an orthogonal matrix replaces QQ by QJTQJ^{\mathsf{T}} in the factorisation LDQLDQ and leaves DD unchanged. Changing the sign of a basis vector bib_i changes the sign of bi∗b_i^* and of the coefficients μji\mu_{ji}, μij\mu_{ij}, and leaves every norm unchanged. Hence the reversed dual basis (±bjJT)j(\pm b_jJ^{\mathsf{T}})_j has the Gram–Schmidt norms of BB, which is what the proof uses. ◀\blacktriangleleft

Machine learning: conservation laws of learning dynamics

A symmetry of a loss function constrains the dynamics of training, and the form of the constraint depends on the dynamics. Noether’s theorem holds for every diffeological group of symmetries of an exact symplectic manifold. For a linear symmetry group stable under transposition, the compact directions give conserved momenta of Hamiltonian and momentum dynamics, the non-compact directions give conserved quadratic forms of gradient flow, and splitting integrators conserve the former exactly. The zero level of the gradient-flow invariants of a linear network is a slice for its non-compact symmetry.

Noether’s theorem for diffeological groups

Theorem 1.1 (Noether). Let MM be a manifold with a 11-form α\alpha such that ω=dα\omega=\mathrm{d}\alpha is symplectic, and let HtH_t be a smooth time-dependent Hamiltonian with vector field ιXtω=−dHt\iota_{X_t}\omega=-\mathrm{d}H_t. Let a diffeological group GG act smoothly on MM, preserving α\alpha and every HtH_t. Then the moment map μ ⁣:M→G∗\mu\colon M\to\mathcal{G}^{*}, μ(x)=x^∗α\mu(x)=\hat x^*\alpha, of Theorem 1.5 is constant along every integral curve of XtX_t.

Proof. Let P ⁣:U→GP\colon U\to G be a plot, r∈Ur\in U, δr\delta r a tangent vector at rr, and ks=P(r+s δr)P(r)−1k_s=P(r+s\,\delta r)P(r)^{-1}, a smooth path in GG with k0=1k_0=1. Let η\eta be the vector field ηy=dds∣0ks⋅y\eta_y=\frac{\mathrm{d}}{\mathrm{d}s}\big|_0k_s\cdot y on MM, and f=α(η)f=\alpha(\eta). By the definition of the pullback, μ(x)(P)r(δr)=α(dds∣0P(r+s δr)⋅x)=f(P(r)⋅x).\mu(x)(P)_r(\delta r)=\alpha\Bigl(\tfrac{\mathrm{d}}{\mathrm{d}s}\big|_0P(r+s\,\delta r)\cdot x\Bigr)=f\bigl(P(r)\cdot x\bigr). Since ks∗α=αk_s^*\alpha=\alpha and k0=idk_0=\mathrm{id}, Lηα=0\mathcal L_\eta\alpha=0, so df=dιηα=−ιηω\mathrm{d}f=\mathrm{d}\iota_\eta\alpha=-\iota_\eta\omega; and since Ht∘ks=HtH_t\circ k_s=H_t, η(Ht)=0\eta(H_t)=0. Hence Xt(f)=−ω(η,Xt)=−dHt(η)=0X_t(f)=-\omega(\eta,X_t)=-\mathrm{d}H_t(\eta)=0. Each g∈Gg\in G preserves ω\omega and HtH_t, so it commutes with the flow, and f(P(r)⋅x(t))f(P(r)\cdot x(t)) is the value of ff along the integral curve through P(r)⋅x(0)P(r)\cdot x(0), which is constant. ◻

The classical statement is the case of a Lie group, where G∗\mathcal{G}^{*} is the dual of the Lie algebra. No such assumption is made in the theorem. For a discrete group G∗=0\mathcal{G}^{*}=0 and there is no conserved momentum: a permutation symmetry of the units of a network constrains gradient flow to fixed-point sets [I, Proposition 11.2] and gives no conservation law. For a group of gauge transformations G∗\mathcal{G}^{*} is infinite-dimensional and the theorem gives one conserved quantity for each momentum.

For learning, the relevant phase space is M=T∗Θ=Θ×Θ∗M=T^*\Theta=\Theta\times\Theta^* for a parameter space Θ=Rd\Theta=\mathbb{R}^d, with α=⟨p,dθ⟩\alpha=\langle p,\mathrm{d}\theta\rangle. A subgroup G⊆GL⁡(Θ)G\subseteq\operatorname{GL}(\Theta) acts by g⋅(θ,p)=(gθ,g−Tp)g\cdot(\theta,p)=(g\theta,g^{-\mathsf T}p) and preserves α\alpha; for a one-parameter subgroup esAe^{sA} the momentum is μA(θ,p)=⟨p,Aθ⟩. \mu_A(\theta,p)=\langle p,A\theta\rangle . A Hamiltonian neural network [33] is a parametrised family HwH_w of Hamiltonians fitted to observed trajectories. If the architecture makes every HwH_w invariant under GG, then by 1.1 every predicted trajectory conserves every μA\mu_A, for every value of the weights: the conservation law is a property of the hypothesis class and is independent of the quality of the fit.

Two conservation laws for a symmetric loss

Let L ⁣:Θ→RL\colon\Theta\to\mathbb{R} be a smooth loss, invariant under a group G⊆GL⁡(Θ)G\subseteq\operatorname{GL}(\Theta): L(gθ)=L(θ)L(g\theta)=L(\theta). Differentiating along esAe^{sA}, ⟨∇L(θ),Aθ⟩=0for all A∈g. \langle\nabla L(\theta),A\theta\rangle=0\qquad\text{for all }A\in\mathfrak{g}.

Theorem 1.2 (Momentum and gradient flow). Let A∈gA\in\mathfrak{g}.

  1. Momentum dynamics. If AT=−AA^{\mathsf{T}}=-A, then along every solution of θ¨+γθ˙=−∇L(θ)\ddot\theta+\gamma\dot\theta=-\nabla L(\theta) the momentum JA=⟨θ˙,Aθ⟩J_A=\langle\dot\theta,A\theta\rangle satisfies JA(t)=e−γtJA(0)J_A(t)=e^{-\gamma t}J_A(0). It is conserved for γ=0\gamma=0.

  2. Gradient flow. If AT=AA^{\mathsf{T}}=A, then QA(θ)=12⟨θ,Aθ⟩Q_A(\theta)=\tfrac12\langle\theta,A\theta\rangle is constant along every solution of θ˙=−∇L(θ)\dot\theta=-\nabla L(\theta).

  3. Gradient descent. If AT=AA^{\mathsf{T}}=A and θ+=θ−h∇L(θ)\theta^+=\theta-h\nabla L(\theta), then QA(θ+)=QA(θ)+h22⟨∇L(θ),A∇L(θ)⟩Q_A(\theta^+)=Q_A(\theta)+\tfrac{h^2}2\langle\nabla L(\theta),A\nabla L(\theta)\rangle.

  4. If AT=−AA^{\mathsf{T}}=-A, every solution of gradient flow satisfies ⟨θ˙,Aθ⟩=0\langle\dot\theta,A\theta\rangle=0: the velocity is orthogonal to the orbits of the compact directions.

Proof. (a) J˙A=⟨θ¨,Aθ⟩+⟨θ˙,Aθ˙⟩=−⟨∇L,Aθ⟩−γ⟨θ˙,Aθ⟩+0=−γJA\dot J_A=\langle\ddot\theta,A\theta\rangle+\langle\dot\theta,A\dot\theta\rangle=-\langle\nabla L,A\theta\rangle-\gamma\langle\dot\theta,A\theta\rangle+0=-\gamma J_A by (8) and antisymmetry. (b) Q˙A=⟨θ˙,Aθ⟩=−⟨∇L,Aθ⟩=0\dot Q_A=\langle\dot\theta,A\theta\rangle=-\langle\nabla L,A\theta\rangle=0, using symmetry in the first step. (c) Expand 12⟨θ−h∇L,A(θ−h∇L)⟩\tfrac12\langle\theta-h\nabla L,A(\theta-h\nabla L)\rangle; the term of order hh is −h⟨∇L,Aθ⟩=0-h\langle\nabla L,A\theta\rangle=0. (d) is (8). ◻

If g\mathfrak{g} is stable under transposition it decomposes as g=k⊕s\mathfrak{g}=\mathfrak{k}\oplus\mathfrak{s} into antisymmetric and symmetric parts, the Cartan decomposition of a reductive group. The two halves are compared in 1.1. Part (a) is 1.1 for the Hamiltonian 12∣p∣2+L(θ)\tfrac12\lvert p\rvert^2+L(\theta) and the momentum (7). Part (b) is not an instance of Noether’s theorem: gradient flow is not Hamiltonian, and the conserved quantity is quadratic in θ\theta alone. Special cases of (b) and (c) are the balancedness of linear and homogeneous networks [6, 24] and the conservation laws catalogued in [54].

The two halves of a reductive symmetry algebra and the corresponding conservation laws.
compact: k\mathfrak{k}, AT=−AA^{\mathsf{T}}=-A non-compact: s\mathfrak{s}, AT=AA^{\mathsf{T}}=A
example rotations of a layer rescaling of a unit; GL⁡k\operatorname{GL}_k between linear layers
momentum dynamics ⟨θ˙,Aθ⟩\langle\dot\theta,A\theta\rangle conserved, or decaying as e−γte^{-\gamma t} —
gradient flow ⟨θ˙,Aθ⟩=0\langle\dot\theta,A\theta\rangle=0 identically 12⟨θ,Aθ⟩\tfrac12\langle\theta,A\theta\rangle conserved
gradient descent, step hh — drift h22⟨∇L,A∇L⟩\tfrac{h^2}2\langle\nabla L,A\nabla L\rangle per step
geometric meaning moment map of the cotangent lift derivative of 12∣θ∣2\tfrac12\lvert \theta\rvert^2 along the orbit

Example 1.3 (Three symmetric directions). (i) For a unit with positively homogeneous activation, the rescaling (win,wout)↦(swin,s−1wout)(w_{\mathrm{in}},w_{\mathrm{out}})\mapsto(sw_{\mathrm{in}},s^{-1}w_{\mathrm{out}}) preserves the loss; AA is +1+1 on the incoming and −1-1 on the outgoing weights, and QA=12(∣win∣2−∣wout∣2)Q_A=\tfrac12(\lvert w_{\mathrm{in}}\rvert^2-\lvert w_{\mathrm{out}}\rvert^2). (ii) For a linear network W2W1W_2W_1, the group GL⁡k\operatorname{GL}_k acts by (W2g−1,gW1)(W_2g^{-1},gW_1), and the symmetric generators give the conserved matrix W1W1T−W2TW2W_1W_1^{\mathsf{T}}-W_2^{\mathsf{T}}W_2. (iii) After a normalisation layer the loss is invariant under θ↦sθ\theta\mapsto s\theta; A=1A=1 and QA=12∣θ∣2Q_A=\tfrac12\lvert \theta\rvert^2: the norm is constant under gradient flow, and by (c) its square increases by h2∣∇L∣2h^2\lvert \nabla L\rvert^2 at each step of gradient descent.

image image

Left: gradient flow of a two-parameter network moves along the hyperbolas w2−a2=constw^2-a^2=\mathrm{const} of 1.2(b) to the curve of minima; the balanced line Q=0Q=0 is invariant. Right: 1.5; the leapfrog scheme conserves the angular momentum to rounding error and explicit Euler does not. Data from checks.py.

The balanced slice

The function Q ⁣:Θ→s∗Q\colon\Theta\to\mathfrak{s}^*, Q(θ)(A)=QA(θ)Q(\theta)(A)=Q_A(\theta), is equivariant for the compact part of GG, and dds∣012∣esAθ∣2=2QA(θ)\frac{\mathrm{d}}{\mathrm{d}s}\big|_0\tfrac12\lvert e^{sA}\theta\rvert^2=2Q_A(\theta). So Q(θ)=0Q(\theta)=0 if and only if θ\theta is a critical point of the norm on its orbit under the non-compact directions. For a real reductive group the zeros of QQ are the vectors of minimal norm in the closed orbits, and each closed orbit intersects Q−1(0)Q^{-1}(0) in one orbit of the maximal compact subgroup [49, 73]. For the deep linear network the identification of the invariants with a moment map, and the resulting decomposition of training into a flow along the fibres and a flow on the balanced manifold, are in [58]; quiver moduli as hypothesis spaces are in [46], and [86] is a survey of parameter symmetries. For linear networks the statement is elementary.

Theorem 1.4 (Balanced factorisations; compare [58, 84). ]Let Θ=Rm×k×Rk×n∋(W2,W1)\Theta=\mathbb{R}^{m\times k}\times\mathbb{R}^{k\times n}\ni(W_2,W_1) with G=GL⁡kG=\operatorname{GL}_k, and Q(W2,W1)=W1W1T−W2TW2Q(W_2,W_1)=W_1W_1^{\mathsf{T}}-W_2^{\mathsf{T}}W_2.

  1. QQ is constant along gradient flow of every loss of the form ℓ(W2W1)\ell(W_2W_1); in particular the balanced set Q−1(0)Q^{-1}(0) is invariant.

  2. The map (W2,W1)↦W2W1(W_2,W_1)\mapsto W_2W_1 induces a bijection from Q−1(0)/O⁡(k)Q^{-1}(0)/\operatorname{O}(k) onto the set of m×nm\times n matrices of rank at most kk.

  3. The composite Q−1(0)/O⁡(k)→Θ/GL⁡kQ^{-1}(0)/\operatorname{O}(k)\to\Theta/\operatorname{GL}_k is injective, and its image is the set of closed orbits.

Parts (i) and (ii) are [exo:balanced]; (iii) follows from (ii) and the theorem of [73].

In [I, Theorem 11.1] the hypothesis space of a model had two diffeologies, the quotient Θ/G\Theta/G and the image in the space of functions. For a linear network the quotient by GL⁡k\operatorname{GL}_k is not Hausdorff, because of the non-closed orbits. A third description follows from 1.4: gradient flow from a balanced initialisation is a flow on Q−1(0)/O⁡(k)Q^{-1}(0)/\operatorname{O}(k), the quotient of a real algebraic set by a compact group, whose points are exactly the hypotheses. The reduction from GL⁡k\operatorname{GL}_k to O⁡(k)\operatorname{O}(k) is the passage from g\mathfrak{g} to k\mathfrak{k} in 1.1: the non-compact directions are fixed by the conservation law and the compact ones remain as a symmetry. By 1.2(d) the flow is orthogonal to the orbits of O⁡(k)\operatorname{O}(k).

The balanced slice for the scalar two-layer network. The orbits of the rescaling group are the hyperbolas aw=constaw=\mathrm{const}; on each, the points of minimal norm are the points where the orbit is tangent to a circle, and they lie on Q=0Q=0, that is, w=±aw=\pm a. The residual symmetry O⁡(1)={±1}\operatorname{O}(1)=\{\pm1\} exchanges the two points of each orbit.

Discrete conservation

Theorem 1.5 (Integrators). Let H(q,p)=T(p)+V(q)H(q,p)=T(p)+V(q) on Rd×Rd\mathbb{R}^d\times\mathbb{R}^d with V(gq)=V(q)V(gq)=V(q) and T(g−Tp)=T(p)T(g^{-\mathsf T}p)=T(p) for gg in a group G⊆GL⁡dG\subseteq\operatorname{GL}_d, and let A∈gA\in\mathfrak{g}.

  1. The maps (q,p)↦(q,p−h∇V(q))(q,p)\mapsto(q,p-h\nabla V(q)) and (q,p)↦(q+h∇T(p),p)(q,p)\mapsto(q+h\nabla T(p),p) preserve μA=⟨p,Aq⟩\mu_A=\langle p,Aq\rangle. Hence so do symplectic Euler, the leapfrog scheme and every composition of these two maps.

  2. (Cooper [22]) The implicit midpoint rule z+=z+hf(z+z+2)z^+=z+hf\bigl(\tfrac{z+z^+}2\bigr) for z˙=f(z)\dot z=f(z) conserves every quadratic first integral.

  3. Explicit Euler changes μA\mu_A by −h2⟨∇V(q),A∇T(p)⟩-h^2\langle\nabla V(q),A\nabla T(p)\rangle at each step.

Proof. Invariance gives ⟨∇V(q),Aq⟩=0\langle\nabla V(q),Aq\rangle=0 and ⟨p,A∇T(p)⟩=0\langle p,A\nabla T(p)\rangle=0. (a) The first map changes μA\mu_A by −h⟨∇V(q),Aq⟩-h\langle\nabla V(q),Aq\rangle and the second by h⟨p,A∇T(p)⟩h\langle p,A\nabla T(p)\rangle. (b) is [exo:midpoint]. (c) ⟨p−h∇V,A(q+h∇T)⟩=μA+h⟨p,A∇T⟩−h⟨∇V,Aq⟩−h2⟨∇V,A∇T⟩\langle p-h\nabla V,A(q+h\nabla T)\rangle=\mu_A+h\langle p,A\nabla T\rangle-h\langle\nabla V,Aq\rangle-h^2\langle\nabla V,A\nabla T\rangle. ◻

Part (a) is the discrete form of 1.1 for the integrators used in Hamiltonian Monte Carlo and in the rollout of Hamiltonian networks: with an invariant potential and kinetic energy, every leapfrog trajectory stays on a level set of the moment map, exactly and for every step size. For a posterior with a continuous symmetry, a sampler of this kind explores within one trajectory only the level set μ−1(c)\mu^{-1}(c), and the refreshment of the momentum is the only mechanism that changes the level. The reduced dynamics is a Hamiltonian flow on the reduced space μ−1(c)/Gc\mu^{-1}(c)/G_c, which by Theorem 1.2 and Corollary 1.3 is a parasymplectic diffeological space whenever the action on the level set is principal, without any assumption that the level be regular.

Acceleration

A conservation law by itself changes no convergence rate, as the two-parameter network already shows.

Proposition 1.6 (Rate and sharpness). Let L(a,w)=12(aw−1)2L(a,w)=\tfrac12(aw-1)^2, m=awm=aw, Q=12(w2−a2)Q=\tfrac12(w^2-a^2).

  1. Along gradient flow, m˙=−2Q2+m2 (m−1)\dot m=-2\sqrt{Q^2+m^2}\,(m-1).

  2. At a minimum the Hessian has the eigenvalues 00 and λQ=2Q2+1\lambda_Q=2\sqrt{Q^2+1}.

  3. Gradient descent linearised at the minimum multiplies the error in mm by 1−hλQ1-h\lambda_Q at each step. The contraction factors attained by the stable steps 0<h<2/λQ0<h<2/\lambda_Q form the interval (−1,1)(-1,1) for every QQ.

Proof. With ρ=m−1\rho=m-1, m˙=a˙w+aw˙=−ρ (a2+w2)\dot m=\dot aw+a\dot w=-\rho\,(a^2+w^2), and (a2+w2)2=(w2−a2)2+4a2w2=4Q2+4m2(a^2+w^2)^2=(w^2-a^2)^2+4a^2w^2=4Q^2+4m^2. At a minimum the Hessian is ∇ρ ∇ρT\nabla\rho\,\nabla\rho^{\mathsf{T}} with ∇ρ=(w,a)\nabla\rho=(w,a), of norm squared a2+w2a^2+w^2. (iii) follows from (ii). ◻

So for a single unit the level of QQ rescales the speed of the flow and the largest stable step by the same factor. A gain is available when several blocks with different levels share one step size: the block with the largest λQ\lambda_Q bounds hh, and every other block converges at the rate hλQ′h\lambda_{Q'}. The symmetry can be used in four ways to remove this mismatch, and the next three propositions make them explicit.

Proposition 1.7 (The induced dynamics on the product). Let (B,A)∈Rm×r×Rr×n(B,A)\in\mathbb{R}^{m\times r}\times\mathbb{R}^{r\times n} have rank rr, X=BAX=BA, and let G=∇ℓ(X)G=\nabla\ell(X) for a loss ℓ(X)\ell(X).

  1. Gradient descent on (B,A)(B,A) with step η\eta gives X+=X−η (BBTG+GATA)+η2 GXTGX^+=X-\eta\,(BB^{\mathsf{T}}G+GA^{\mathsf{T}}A)+\eta^2\,GX^{\mathsf{T}}G. On the balanced slice of 1.4, BBT=(XXT)1/2BB^{\mathsf{T}}=(XX^{\mathsf{T}})^{1/2} and ATA=(XTX)1/2A^{\mathsf{T}}A=(X^{\mathsf{T}}X)^{1/2}.

  2. The scaled update B+=B−η GAT(AAT)−1B^+=B-\eta\,GA^{\mathsf{T}}(AA^{\mathsf{T}})^{-1}, A+=A−η (BTB)−1BTGA^+=A-\eta\,(B^{\mathsf{T}}B)^{-1}B^{\mathsf{T}}G commutes with the action of GL⁡r\operatorname{GL}_r, and X+=X−η (PcG+GPr)+η2 GX†G,X^+=X-\eta\,(P_cG+GP_r)+\eta^2\,GX^{\dagger}G, where PcP_c and PrP_r are the orthogonal projectors onto the column and row spaces of XX and X†X^\dagger is the Moore–Penrose inverse.

  3. Let ℓ(X)=12∥X−M∥2\ell(X)=\tfrac12\lVert X-M\rVert^2 with MM of rank rr and singular values σ1≥⋯≥σr\sigma_1\ge\dots\ge\sigma_r. Linearised at X=MX=M, the component of the error along the singular vectors ui,vju_i,v_j is multiplied by 1−η(σi+σj)1-\eta(\sigma_i+\sigma_j) in case (i) on the balanced slice, with σi=0\sigma_i=0 for i>ri>r, and by 1−2η1-2\eta or 1−η1-\eta in case (ii).

Parts (i) and (ii) are [exo:induced]. For (iii), GG is the error EE to first order, the preconditioners are evaluated at MM, and (MMT)1/2(MM^{\mathsf{T}})^{1/2}, (MTM)1/2(M^{\mathsf{T}}M)^{1/2}, PcP_c, PrP_r are diagonal in the singular bases. In case (i) the stable steps satisfy η<1/σ1\eta<1/\sigma_1 and the slowest tangent direction contracts by 1−ησr1-\eta\sigma_r: the number of steps grows as the condition number σ1/σr\sigma_1/\sigma_r. In case (ii) the rates do not involve the singular values. Part (i) on the balanced slice is the preconditioned end-to-end dynamics of [6]; part (ii) is the scaled gradient descent of [80], where convergence at a rate independent of the condition number is proved for several low-rank estimation problems. In the terms of this chapter, the update of (ii) is defined on the quotient Θ/GL⁡r\Theta/\operatorname{GL}_r: it is independent of the level of QQ. Low-rank adapters W0+BAW_0+BA have this symmetry, and so do the key–query and value–output pairs of an attention head, whose output depends on the products only; the usual initialisation of an adapter, B=0B=0 and AA random, lies at the level Q=AATQ=AA^{\mathsf{T}}, far from the balanced slice [37].

image image

Factorisation of a 2×22\times2 matrix with singular values 11 and 10−210^{-2} from the same initial point. The update that commutes with GL⁡2\operatorname{GL}_2 reaches rounding error in 77 iterations; gradient descent on the factors takes about 800800. Data from checks.py.

Proposition 1.8 (Weight decay on scale-invariant weights). Let L(sθ)=L(θ)L(s\theta)=L(\theta) for s>0s>0, and θ+=(1−hλ)θ−h∇L(θ)\theta^+=(1-h\lambda)\theta-h\nabla L(\theta). Then ∣θ+∣2=(1−hλ)2∣θ∣2+h2 ∣g^∣2∣θ∣2,g^=∇L(θ/∣θ∣),\lvert \theta^+\rvert^2=(1-h\lambda)^2\lvert \theta\rvert^2+\frac{h^2\,\lvert \hat g\rvert^2}{\lvert \theta\rvert^2},\qquad\hat g=\nabla L(\theta/\lvert \theta\rvert), the norm is stationary at ∣θ∣4=h∣g^∣2/λ(2−hλ)\lvert \theta\rvert^4=h\lvert \hat g\rvert^2/\lambda(2-h\lambda), and there the effective step size h/∣θ∣2h/\lvert \theta\rvert^2 on the unit sphere is hλ(2−hλ) /∣g^∣\sqrt{h\lambda(2-h\lambda)}\,/\lvert \hat g\rvert, so that each step has angular length hλ(2−hλ)\sqrt{h\lambda(2-h\lambda)}.

The proof is [exo:weight-decay]. The stationary effective step depends on hh and λ\lambda through the product hλh\lambda alone, to first order [55]: the drift of 1.2(c) balances the decay, and the two hyperparameters act through their product.

Proposition 1.9 (Horizontal projection). Let A∈sA\in\mathfrak{s} and let θ+=θ+u\theta^+=\theta+u be any update. Then QA(θ+)−QA(θ)=⟨u,Aθ⟩+12⟨u,Au⟩Q_A(\theta^+)-Q_A(\theta)=\langle u,A\theta\rangle+\tfrac12\langle u,Au\rangle. For u=−h∇L(θ)u=-h\nabla L(\theta) the first term vanishes. For u=−hD∇L(θ)u=-hD\nabla L(\theta) with a positive diagonal matrix DD, as in adaptive methods, it is −h⟨D∇L,Aθ⟩-h\langle D\nabla L,A\theta\rangle, of first order in hh. For the projected update u⊥=u−∑j⟨u,Ajθ⟩∣Ajθ∣2 Ajθ,u_\perp=u-\sum_j\frac{\langle u,A_j\theta\rangle}{\lvert A_j\theta\rvert^2}\,A_j\theta , over generators AjA_j with mutually orthogonal AjθA_j\theta, the first term vanishes again.

Proof. Expand 12⟨θ+u,A(θ+u)⟩\tfrac12\langle\theta+u,A(\theta+u)\rangle with AA symmetric, and use (8). ◻

For the sign update u=−h sign(∇L)u=-h\,\mathrm{sign}(\nabla L) on the two-parameter network, the invariant QQ changes over a unit of time by 0.310.31 for h=10−2h=10^{-2} and by 0.320.32 for h=10−3h=10^{-3}; with the projection the changes are 6.2⋅10−36.2\cdot10^{-3} and 6.2⋅10−46.2\cdot10^{-4} (checks.py). For the scale symmetry, A=1A=1, the projection removes the radial part of the update, which is the method of [39].

The four uses are therefore: to choose the level of QQ at initialisation, which by 1.7(i) is a choice of preconditioner; to move along the orbit during training, at no cost in loss, either back to the balanced slice or to the point of the orbit with the largest gradient [85]; to make the update equivariant, so that it is defined on the quotient (1.7(ii), [4]); and to project a non-gradient update onto the directions orthogonal to the orbits (1.9). All four are instances of one geometric statement, Theorem 1.3 of The general structure: descent along an atlas.

Solved exercises

Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.

1 Compute the momentum (7) for the rotations of Θ=R2\Theta=\mathbb{R}^2, and for the scalings.

Solution.  For A=(0−110)A=\bigl(\begin{smallmatrix}0&-1\\1&0\end{smallmatrix}\bigr), Aθ=(−θ2,θ1)A\theta=(-\theta_2,\theta_1) and μA=p2θ1−p1θ2\mu_A=p_2\theta_1-p_1\theta_2, the angular momentum. For A=1A=1, μA=⟨p,θ⟩\mu_A=\langle p,\theta\rangle, the generator of dilations. The first is antisymmetric and governed by 1.2(a); the second is symmetric, and under gradient flow of a scale-invariant loss the conserved quantity is 12∣θ∣2\tfrac12\lvert \theta\rvert^2 by (b). ◀\blacktriangleleft

2 For L(a,w)=12(aw−1)2L(a,w)=\tfrac12(aw-1)^2 verify 1.2(b),(c) directly, and solve gradient flow on the balanced line.

Solution.  The symmetry is (a,w)↦(s−1a,sw)(a,w)\mapsto(s^{-1}a,sw), A=diag(−1,1)A=\mathrm{diag}(-1,1), Q=12(w2−a2)Q=\tfrac12(w^2-a^2). With ρ=aw−1\rho=aw-1, a˙=−ρw\dot a=-\rho w, w˙=−ρa\dot w=-\rho a, so ddt(w2−a2)=−2ρaw+2ρaw=0\frac{\mathrm{d}}{\mathrm{d}t}(w^2-a^2)=-2\rho aw+2\rho aw=0. One step of gradient descent gives w+2−a+2=(w2−a2)(1−h2ρ2)w^{+2}-a^{+2}=(w^2-a^2)(1-h^2\rho^2), that is, Q+=Q+h22ρ2(a2−w2)Q^+=Q+\tfrac{h^2}2\rho^2(a^2-w^2), which is (c) with ∇L=ρ(w,a)\nabla L=\rho(w,a). On the line a=w=sa=w=s the flow is s˙=−(s2−1)s\dot s=-(s^2-1)s, with the stable equilibrium s=1s=1: the balanced solution of aw=1aw=1. In checks.py the drift of QQ over a fixed time is proportional to hh, as (c) predicts. ◀\blacktriangleleft

2 Let LL be invariant under θ↦sθ\theta\mapsto s\theta, s>0s>0. Show that under gradient descent ∣θk∣\lvert \theta_k\rvert is non-decreasing and that the tangent of the angular step is h∣∇L(θk/∣θk∣)∣/∣θk∣2h\lvert \nabla L(\theta_k/\lvert \theta_k\rvert)\rvert/\lvert \theta_k\rvert^2.

Solution.  By 1.2(c) with A=1A=1, ∣θk+1∣2=∣θk∣2+h2∣∇L(θk)∣2\lvert \theta_{k+1}\rvert^2=\lvert \theta_k\rvert^2+h^2\lvert \nabla L(\theta_k)\rvert^2. Scale invariance gives ∇L(sθ)=s−1∇L(θ)\nabla L(s\theta)=s^{-1}\nabla L(\theta) and ⟨∇L,θ⟩=0\langle\nabla L,\theta\rangle=0, so the step h∇L(θk)h\nabla L(\theta_k) is tangent to the sphere of radius ∣θk∣\lvert \theta_k\rvert, of length h∣∇L(θk/∣θk∣)∣/∣θk∣h\lvert \nabla L(\theta_k/\lvert \theta_k\rvert)\rvert/\lvert \theta_k\rvert, and the tangent of the angle it subtends is the stated quantity. The effective step size on the unit sphere is h/∣θk∣2h/\lvert \theta_k\rvert^2 and decreases along training. ◀\blacktriangleleft

3 Let f(x)=∑ivi σ(⟨wi,x⟩)f(x)=\sum_iv_i\,\sigma(\langle w_i,x\rangle) with σ\sigma positively homogeneous of degree 11. Derive the conserved quantities of gradient flow for a loss depending on ff alone, at parameters where the loss is differentiable.

Solution.  For each ii and s>0s>0, (wi,vi)↦(swi,s−1vi)(w_i,v_i)\mapsto(sw_i,s^{-1}v_i) leaves ff unchanged. The generator is Ai=diag(+1 on wi, −1 on vi)A_i=\mathrm{diag}(+1\text{ on }w_i,\ -1\text{ on }v_i), a symmetric matrix, and (8) holds wherever LL is differentiable. By 1.2(b), Qi=12(∣wi∣2−vi2)Q_i=\tfrac12(\lvert w_i\rvert^2-v_i^2) is conserved for every unit. These are the balancedness conditions of [24]; the group is (R>0)k(\mathbb{R}_{>0})^k, all of whose directions are non-compact, so no momentum of type (a) arises from it. ◀\blacktriangleleft

3 Prove 1.5(b).

Solution.  Let I(z)=⟨z,Cz⟩+⟨c,z⟩I(z)=\langle z,Cz\rangle+\langle c,z\rangle with CC symmetric be a first integral: ⟨2Cz+c,f(z)⟩=0\langle2Cz+c,f(z)\rangle=0 for all zz. With m=12(z+z+)m=\tfrac12(z+z^+) and z+−z=hf(m)z^+-z=hf(m), I(z+)−I(z)=⟨z+−z, C(z++z)⟩+⟨c,z+−z⟩=h ⟨f(m), 2Cm+c⟩=0.I(z^+)-I(z)=\langle z^+-z,\ C(z^++z)\rangle+\langle c,z^+-z\rangle=h\,\langle f(m),\,2Cm+c\rangle=0 . ◀\blacktriangleleft

4 Prove parts (i) and (ii) of 1.4.

Solution.  (i) The loss is invariant under (W2g−1,gW1)(W_2g^{-1},gW_1). For a symmetric SS the generator maps (W2,W1)(W_2,W_1) to (−W2S,SW1)(-W_2S,SW_1), a symmetric operator for the Frobenius inner product, and QS=12tr⁡(SW1W1T)−12tr⁡(W2SW2T)=12tr⁡(S(W1W1T−W2TW2))Q_S=\tfrac12\operatorname{tr}(SW_1W_1^{\mathsf{T}})-\tfrac12\operatorname{tr}(W_2SW_2^{\mathsf{T}})=\tfrac12\operatorname{tr}\bigl(S(W_1W_1^{\mathsf{T}}-W_2^{\mathsf{T}}W_2)\bigr). By 1.2(b) this is conserved for every SS, so the matrix is conserved.

(ii) Surjectivity. Let M=UΣVTM=U\Sigma V^{\mathsf{T}} be a singular value decomposition with Σ\Sigma of size k×kk\times k. Then W2=UΣ1/2W_2=U\Sigma^{1/2}, W1=Σ1/2VTW_1=\Sigma^{1/2}V^{\mathsf{T}} is balanced and W2W1=MW_2W_1=M. Injectivity. Let (W2,W1)(W_2,W_1) and (W2′,W1′)(W_2',W_1') be balanced with the same product MM. Then MMT=W2(W1W1T)W2T=(W2W2T)2MM^{\mathsf{T}}=W_2(W_1W_1^{\mathsf{T}})W_2^{\mathsf{T}}=(W_2W_2^{\mathsf{T}})^2, so W2W2T=(MMT)1/2=W2′W2′TW_2W_2^{\mathsf{T}}=(MM^{\mathsf{T}})^{1/2}=W_2'W_2'^{\mathsf T}, and two m×km\times k matrices with the same Gram matrix of rows differ by an orthogonal matrix: W2′=W2RW_2'=W_2R, R∈O⁡(k)R\in\operatorname{O}(k). Put D=RW1′−W1D=RW_1'-W_1. Then W2D=W2′W1′−W2W1=0W_2D=W_2'W_1'-W_2W_1=0, so the columns of DD lie in ker⁡W2=ker⁡W2TW2=ker⁡W1W1T\ker W_2=\ker W_2^{\mathsf{T}}W_2=\ker W_1W_1^{\mathsf{T}}, the orthogonal complement of the column space of W1W_1; hence W1TD=0W_1^{\mathsf{T}}D=0. Balancedness of both pairs gives (RW1′)(RW1′)T=RW2′TW2′RT=W2TW2=W1W1T(RW_1')(RW_1')^{\mathsf{T}}=RW_2'^{\mathsf T}W_2'R^{\mathsf{T}}=W_2^{\mathsf{T}}W_2=W_1W_1^{\mathsf{T}}, and taking traces, tr⁡(W1W1T)=tr⁡((W1+D)(W1+D)T)=tr⁡(W1W1T)+2tr⁡(W1TD)+tr⁡(DDT)\operatorname{tr}(W_1W_1^{\mathsf{T}})=\operatorname{tr}\bigl((W_1+D)(W_1+D)^{\mathsf{T}}\bigr)=\operatorname{tr}(W_1W_1^{\mathsf{T}})+2\operatorname{tr}(W_1^{\mathsf{T}}D)+\operatorname{tr}(DD^{\mathsf{T}}). So tr⁡(DDT)=0\operatorname{tr}(DD^{\mathsf{T}})=0, D=0D=0, and (W2′,W1′)=(W2R,RTW1)(W_2',W_1')=(W_2R,R^{\mathsf{T}}W_1). ◀\blacktriangleleft

2 Prove 1.8, and compute the stationary norm and the angular step for h=0.05h=0.05, λ=0.1\lambda=0.1, ∣g^∣=1\lvert \hat g\rvert=1.

Solution.  Scale invariance gives ⟨∇L(θ),θ⟩=0\langle\nabla L(\theta),\theta\rangle=0 and ∇L(θ)=g^/∣θ∣\nabla L(\theta)=\hat g/\lvert \theta\rvert, so the two terms of θ+\theta^+ are orthogonal and ∣θ+∣2=(1−hλ)2∣θ∣2+h2∣g^∣2/∣θ∣2\lvert \theta^+\rvert^2=(1-h\lambda)^2\lvert \theta\rvert^2+h^2\lvert \hat g\rvert^2/\lvert \theta\rvert^2. The norm is stationary when (1−(1−hλ)2)∣θ∣4=h2∣g^∣2\bigl(1-(1-h\lambda)^2\bigr)\lvert \theta\rvert^4=h^2\lvert \hat g\rvert^2, that is, ∣θ∣4=h∣g^∣2/λ(2−hλ)\lvert \theta\rvert^4=h\lvert \hat g\rvert^2/\lambda(2-h\lambda). The step on the unit sphere is h∣∇L(θ)∣/∣θ∣=h∣g^∣/∣θ∣2h\lvert \nabla L(\theta)\rvert/\lvert \theta\rvert=h\lvert \hat g\rvert/\lvert \theta\rvert^2; substituting, the effective step size is hλ(2−hλ)/∣g^∣\sqrt{h\lambda(2-h\lambda)}/\lvert \hat g\rvert and the angular length is hλ(2−hλ)\sqrt{h\lambda(2-h\lambda)}. For the given values ∣θ∣4=0.2506\lvert \theta\rvert^4=0.2506, ∣θ∣=0.7075\lvert \theta\rvert=0.7075, and the angular step is 0.09990.0999; the simulation in checks.py gives ∣θ∣4=0.250627\lvert \theta\rvert^4=0.250627. ◀\blacktriangleleft

3 Prove parts (i) and (ii) of 1.7.

Solution.  The gradients of ℓ(BA)\ell(BA) are GATGA^{\mathsf{T}} and BTGB^{\mathsf{T}}G. (i) (B−ηGAT)(A−ηBTG)=X−η GATA−η BBTG+η2GATBTG(B-\eta GA^{\mathsf{T}})(A-\eta B^{\mathsf{T}}G)=X-\eta\,GA^{\mathsf{T}}A-\eta\,BB^{\mathsf{T}}G+\eta^2GA^{\mathsf{T}}B^{\mathsf{T}}G. For a balanced pair, XXT=B(AAT)BT=B(BTB)BT=(BBT)2XX^{\mathsf{T}}=B(AA^{\mathsf{T}})B^{\mathsf{T}}=B(B^{\mathsf{T}}B)B^{\mathsf{T}}=(BB^{\mathsf{T}})^2, and likewise XTX=(ATA)2X^{\mathsf{T}}X=(A^{\mathsf{T}}A)^2. (ii) Under (B,A)↦(Bg−1,gA)(B,A)\mapsto(Bg^{-1},gA) the product and GG are unchanged, GATgT(gAATgT)−1=GAT(AAT)−1g−1GA^{\mathsf{T}}g^{\mathsf{T}}(gAA^{\mathsf{T}}g^{\mathsf{T}})^{-1}=GA^{\mathsf{T}}(AA^{\mathsf{T}})^{-1}g^{-1} and (g−TBTBg−1)−1g−TBTG=g(BTB)−1BTG(g^{-\mathsf T}B^{\mathsf{T}}Bg^{-1})^{-1}g^{-\mathsf T}B^{\mathsf{T}}G=g(B^{\mathsf{T}}B)^{-1}B^{\mathsf{T}}G; so (B+,A+)↦(B+g−1,gA+)(B^+,A^+)\mapsto(B^+g^{-1},gA^+). The product is X−η B(BTB)−1BTG−η GAT(AAT)−1A+η2 GAT(AAT)−1(BTB)−1BTG.X-\eta\,B(B^{\mathsf{T}}B)^{-1}B^{\mathsf{T}}G-\eta\,GA^{\mathsf{T}}(AA^{\mathsf{T}})^{-1}A+\eta^2\,GA^{\mathsf{T}}(AA^{\mathsf{T}})^{-1}(B^{\mathsf{T}}B)^{-1}B^{\mathsf{T}}G . The matrices Pc=B(BTB)−1BTP_c=B(B^{\mathsf{T}}B)^{-1}B^{\mathsf{T}} and Pr=AT(AAT)−1AP_r=A^{\mathsf{T}}(AA^{\mathsf{T}})^{-1}A are the orthogonal projectors onto the column space of BB and the row space of AA, which are those of XX because the rank is rr. The matrix X†=AT(AAT)−1(BTB)−1BTX^\dagger=A^{\mathsf{T}}(AA^{\mathsf{T}})^{-1}(B^{\mathsf{T}}B)^{-1}B^{\mathsf{T}} satisfies XX†=PcXX^\dagger=P_c, X†X=PrX^\dagger X=P_r, XX†X=XXX^\dagger X=X and X†XX†=X†X^\dagger XX^\dagger=X^\dagger, the four conditions that characterise the Moore–Penrose inverse. ◀\blacktriangleleft

Artificial intelligence: invariants, phases, and reachability

For an agent whose dynamics has a symmetry, the moment map is an invariant of every admissible trajectory, and it bounds the reachable set for every controller. At zero momentum the motion of the agent along the symmetry directions is the holonomy of a connection on the bundle of configurations over shapes. For the simplest two-body system the connection is flat, its holonomy is a rotation by an angle fixed by the ratio of inertias, and when the ratio is irrational the universal first integral takes its values in an irrational torus.

Momentum as a reachability invariant

A controlled Hamiltonian system is a family HuH_u, u∈Uu\in\mathcal U, of Hamiltonians on an exact symplectic manifold (M,dα)(M,\mathrm{d}\alpha); a control is a piecewise smooth map t↦u(t)t\mapsto u(t), and the trajectory follows the Hamiltonian vector field of Hu(t)H_{u(t)}.

Theorem 1.1 (Invariance of the reachable set). Let a diffeological group GG act on MM preserving α\alpha and every HuH_u, with moment map μ ⁣:M→G∗\mu\colon M\to\mathcal{G}^{*}. Then for every control the trajectory from xx stays in μ−1(μ(x))\mu^{-1}(\mu(x)). Consequently:

  1. a set B⊆MB\subseteq M with μ(x)∉μ(B)\mu(x)\notin\mu(B) is unreachable from xx under every controller of the class;

  2. the system induces a controlled system on the quotient μ−1(c)/Gc\mu^{-1}(c)/G_c of each level by the stabiliser of cc, and when GcG_c acts principally on the level this quotient is a parasymplectic diffeological space.

Proof. On each interval where the control is smooth, Theorem 1.1 applies to the time-dependent Hamiltonian Hu(t)H_{u(t)}; μ\mu is continuous along the trajectory, so its value is the same on all intervals. (i) is immediate. (ii) The flows commute with GG and preserve the level, which GcG_c preserves by equivariance. For c=0c=0 the quotient is the reduced space of Corollary 1.3; a level cc fixed by the coadjoint action is brought to zero by Proposition 1.3 when c=−χ∗θc=-\chi^*\theta for a character χ\chi. ◻

Part (i) is a certificate of safety of the strongest kind: it is exact, it requires no simulation, and it holds for every policy, learned or not, as long as the actuation preserves the symmetry. A free-floating robot whose actuators exert only internal forces cannot change its angular momentum; a learned controller for it cannot reach a state of different momentum, whatever its training. Part (ii) is the statement that planning and learning for such a system take place on the reduced space, of dimension smaller by twice the dimension of the group at regular points.

The geometric phase

At a fixed momentum the remaining freedom of the agent is its shape, and the symmetry variables are determined by the history of the shape.

Let QQ be a configuration manifold with a free and proper action of G=RG=\mathbb{R} or S1S^1, generated by a vector field ξQ\xi_Q, and let S=Q/GS=Q/G be the shape space. Let gg be a GG-invariant Riemannian metric, the kinetic energy. The momentum of a velocity q˙\dot q is J(q,q˙)=g(q˙,ξQ(q))J(q,\dot q)=g(\dot q,\xi_Q(q)), which is the moment map (7) of the cotangent lift under the Legendre transform. The mechanical connection is the 11-form A=g(⋅,ξQ)g(ξQ,ξQ)∈Ω1(Q).A=\frac{g(\cdot,\xi_Q)}{g(\xi_Q,\xi_Q)}\in\Omega^1(Q) .

Theorem 1.2 (Holonomy of zero-momentum motion; [65, 68). ]

  1. AA is a connection form on the principal bundle Q→SQ\to S in the sense of Definition 1.1, and a curve in QQ has zero momentum if and only if it is horizontal for AA. Every shape curve has a unique zero-momentum lift through each point of the fibre over its origin.

  2. Let F∈Ω2(S)F\in\Omega^2(S) be the curvature. If a closed shape curve cc bounds a disc DD, its zero-momentum lift ends at exp⁡(Δ ξ)⋅q(0)\exp(\Delta\,\xi)\cdot q(0) with Δ=−∫DF\Delta=-\int_DF.

  3. If F=0F=0, the displacement of a loop depends only on its homotopy class, and the displacements form the image of a homomorphism π1(S)→G\pi_1(S)\to G.

Proof. (i) AA is invariant because gg and ξQ\xi_Q are, and A(ξQ)=1A(\xi_Q)=1, which is calibration. J(q,q˙)=0J(q,\dot q)=0 if and only if A(q˙)=0A(\dot q)=0. In a local trivialisation Q∣V≅V×GQ|_V\cong V\times G with fibre coordinate φ\varphi, A=dφ+aA=\mathrm{d}\varphi+a with a∈Ω1(V)a\in\Omega^1(V), and the horizontal lift of cc solves φ˙=−a(c˙)\dot\varphi=-a(\dot c). (ii) Over the disc the bundle is trivial, F=daF=\mathrm{d}a, and Δ=φ(1)−φ(0)=−∮ca=−∫Dda\Delta=\varphi(1)-\varphi(0)=-\oint_ca=-\int_D\mathrm{d}a. (iii) A flat connection has locally constant horizontal sections, so the lift of a contractible loop closes, and concatenation of loops adds displacements. ◻

The theorem is the abelian case of the gauge theory of locomotion: a body that changes its shape cyclically, with no external force and no momentum, is displaced by the holonomy of the cycle [77, 68]. For a planner the consequence is a division of the problem: the shape variables are controlled directly, and motion in the group direction is obtained from the area enclosed in shape space, weighted by the curvature (1.1). If the curvature does not vanish, every displacement is the holonomy of some loop ([exo:variable-beanie]).

Left: the displacement produced by a cycle of shape changes is minus the integral of the curvature over the enclosed region. Right: for the two-body system of 1.3 the connection is flat and the zero-momentum motions are the leaves of a linear foliation of the torus; one turn of the joint rotates the body by −2πα-2\pi\alpha.

A first integral with values in an irrational torus

Two planar rigid bodies with moments of inertia I1,I2I_1,I_2 are joined at their common centre of mass by a motor. The configuration is (θ,ψ)∈T2=(R/2πZ)2(\theta,\psi)\in T^2=(\mathbb{R}/2\pi\mathbb{Z})^2, where θ\theta is the orientation of the first body and ψ\psi the joint angle; the kinetic energy is 12I1θ˙2+12I2(θ˙+ψ˙)2\tfrac12I_1\dot\theta^2+\tfrac12I_2(\dot\theta+\dot\psi)^2, the rotations act on θ\theta, and the momentum is J=I1θ˙+I2(θ˙+ψ˙)J=I_1\dot\theta+I_2(\dot\theta+\dot\psi). With α=I2I1+I2∈(0,1),\alpha=\frac{I_2}{I_1+I_2}\in(0,1), the mechanical connection is A=dθ+α dψA=\mathrm{d}\theta+\alpha\,\mathrm{d}\psi. The shape space is the circle of joint angles.

The two-body system and the orientations θ0−2πkα\theta_0-2\pi k\alpha reachable at zero momentum with the joint returned to its initial angle.

Theorem 1.3 (The two-body system). Consider the zero-momentum motions of the system, the curves in T2T^2 with dθ+α dψ=0\mathrm{d}\theta+\alpha\,\mathrm{d}\psi=0.

  1. The connection is flat. The set reachable from (θ0,ψ0)(\theta_0,\psi_0) is the leaf { (θ0−αs,ψ0+s)∣s∈R }\{\,(\theta_0-\alpha s,\psi_0+s)\mid s\in\mathbb{R}\,\}. The orientations reachable with the joint returned to ψ0\psi_0 are θ0−2παZ\theta_0-2\pi\alpha\mathbb{Z}.

  2. The map c ⁣:T2→R/2π(Z+αZ)c\colon T^2\to\mathbb{R}/2\pi(\mathbb{Z}+\alpha\mathbb{Z}), c(θ,ψ)=[θ+αψ]c(\theta,\psi)=[\theta+\alpha\psi], is a smooth first integral and a subduction whose fibres are the reachable sets. It is universal: every smooth map from T2T^2 to a diffeological space that is constant on zero-momentum curves factors uniquely and smoothly through cc.

  3. If α=p/q\alpha=p/q in lowest terms, the reachable sets are circles, the target of cc is a circle, and the reachable orientations at a fixed joint angle are qq points.

  4. If α\alpha is irrational, the target of cc is the irrational torus TαT_{\alpha}; every reachable set is dense and, with the subspace diffeology, diffeomorphic to R\mathbb{R}; every first integral with values in a manifold is constant; and for each convergent pj/qjp_j/q_j of α\alpha, every orientation is reached within 3π/qj3\pi/q_j by fewer than qjq_j turns of the joint.

Proof. (i) dA=0\mathrm{d}A=0. The lift of the shape curve ψ0+s\psi_0+s is θ0−αs\theta_0-\alpha s, and one turn of the joint is s=2πs=2\pi. (ii) The linear map (θ,ψ)↦θ+αψ(\theta,\psi)\mapsto\theta+\alpha\psi from R2\mathbb{R}^2 to R\mathbb{R} is a subduction, it maps (2πZ)2(2\pi\mathbb{Z})^2 into 2π(Z+αZ)2\pi(\mathbb{Z}+\alpha\mathbb{Z}), and two points have the same image in the quotient if and only if they lie on one leaf. So cc is a subduction with the leaves as fibres, and the universal property is that of a quotient diffeology. (iii) The group 2π(Z+pqZ)=2πqZ2\pi(\mathbb{Z}+\tfrac pq\mathbb{Z})=\tfrac{2\pi}q\mathbb{Z} is discrete. (iv) The target is R/2π(Z+αZ)≅Tα\mathbb{R}/2\pi(\mathbb{Z}+\alpha\mathbb{Z})\cong T_{\alpha}. The leaf is the image of the irrational winding R→T2\mathbb{R}\to T^2, which is an induction [IZ, Exercise 31]. A first integral f ⁣:T2→Nf\colon T^2\to N is continuous and constant on a dense leaf, hence constant on T2T^2 when NN is Hausdorff. The bound is [exo:approx]. ◻

Zero-momentum reachability of the two-body system as a function of the inertia ratio.
α=p/q\alpha=p/q α\alpha irrational
holonomy group cyclic of order qq 2παZ2\pi\alpha\mathbb{Z}, dense in the circle
reachable set a closed curve a dense leaf, ≅R\cong\mathbb{R}
universal first integral circle-valued TαT_{\alpha}-valued
real-valued first integrals functions on a circle constants
exact controllability of θ\theta no no
approximate controllability no yes, at a cost set by the convergents of α\alpha

For an analysis based on real-valued invariants the irrational system has no conserved quantity on the zero-momentum level and its orbits are dense, the usual indications of controllability. It is not controllable: each reachable set is a single leaf, of measure zero. The invariant that separates the reachable sets exists, is smooth, and is unique up to diffeomorphisms of its target; its target is a diffeological space that is not a manifold. This is the situation of [I, Theorem 12.4]: the smooth real functions on TαT_{\alpha} are the constants, and the structure of TαT_{\alpha} is carried by its plots. Along a leaf, planning is elementary, since the leaf is a line and has a smooth planner [I, Theorem 12.1]; between leaves no motion exists. By the last clause of (iv) the cost of approximate control is bounded in terms of the continued fraction of the inertia ratio, the invariant that classifies TαT_{\alpha} up to diffeomorphism [I, Corollary 9.2].

Solved exercises

Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.

1 For I1=I2I_1=I_2 compute the rotation of the first body produced by one turn of the joint at zero momentum, and the reachable orientations.

Solution.  α=12\alpha=\tfrac12, so one turn of the joint rotates the first body by −π-\pi and the second by +π+\pi relative to the frame: the system returns to its shape with both bodies reversed. Two turns restore the configuration. The reachable orientations at a fixed joint angle are θ0\theta_0 and θ0+π\theta_0+\pi, and c=[θ+12ψ]∈R/πZc=[\theta+\tfrac12\psi]\in\mathbb{R}/\pi\mathbb{Z} is a circle-valued first integral. ◀\blacktriangleleft

2 For α=p/q\alpha=p/q in lowest terms, show that the leaf through (θ0,ψ0)(\theta_0,\psi_0) closes after qq turns of the joint, and describe the leaf as a curve on the torus.

Solution.  After kk turns the orientation is θ0−2πkp/q\theta_0-2\pi kp/q, equal to θ0\theta_0 modulo 2π2\pi exactly when qq divides kk, since pp and qq are coprime. The leaf is the closed curve s↦(θ0−pqs,ψ0+s)s\mapsto(\theta_0-\tfrac pqs,\psi_0+s), s∈[0,2πq]s\in[0,2\pi q], winding qq times in the direction of ψ\psi and −p-p times in the direction of θ\theta: a torus knot of type (q,−p)(q,-p) when the torus is embedded in space. The orientations visited at the joint angle ψ0\psi_0 are the qq points θ0−2πk/q\theta_0-2\pi k/q. ◀\blacktriangleleft

3 Suppose the second body can also change its moment of inertia, I2=I2(r)I_2=I_2(r) with rr in an interval and I2′≠0I_2'\neq0. Show that every orientation is reachable at zero momentum with the shape returned to its initial value.

Solution.  The shape space is the cylinder of (r,ψ)(r,\psi) and A=dθ+α(r) dψA=\mathrm{d}\theta+\alpha(r)\,\mathrm{d}\psi with α(r)=I2(r)/(I1+I2(r))\alpha(r)=I_2(r)/(I_1+I_2(r)), so F=α′(r) dr∧dψ≠0F=\alpha'(r)\,\mathrm{d}r\wedge\mathrm{d}\psi\neq0. Consider the shape loop: turn the joint once at r1r_1, change rr from r1r_1 to r2r_2, turn the joint once backwards, return to r1r_1. Changes of rr at fixed ψ\psi do not move θ\theta. The displacement is −2πα(r1)+2πα(r2)-2\pi\alpha(r_1)+2\pi\alpha(r_2), a continuous function of r2r_2 vanishing at r2=r1r_2=r_1 and not locally constant. So an interval of rotations around 00 is reachable by one such loop, and every rotation by repeating it. The loop is contractible in the cylinder and its displacement is −∫DF-\int_DF over the annulus it bounds, in accordance with 1.2(ii). ◀\blacktriangleleft

3 Let α\alpha be irrational. Show that the D-topology of the target of cc is trivial, and deduce directly that a first integral with values in a space whose D-topology is Hausdorff is constant. Which smooth first integral is not constant?

Solution.  The D-topology of R/2π(Z+αZ)\mathbb{R}/2\pi(\mathbb{Z}+\alpha\mathbb{Z}) is the quotient topology, and a saturated open set of R\mathbb{R} is invariant under a dense group of translations, so it is empty or R\mathbb{R}. A first integral ff factors as fˉ∘c\bar f\circ c with fˉ\bar f smooth, hence D-continuous; a continuous map from an indiscrete space to a Hausdorff space is constant. The map cc itself is a non-constant smooth first integral, with values in TαT_{\alpha}, whose D-topology is not Hausdorff. ◀\blacktriangleleft

4 Let α\alpha be irrational with convergents pj/qjp_j/q_j. Prove that every point of R/Z\mathbb{R}/\mathbb{Z} is within 32qj\tfrac3{2q_j} of one of the points kαk\alpha, 0≤k<qj0\le k<q_j, and deduce the last clause of 1.3(iv).

Solution.  The convergents satisfy ∣qjα−pj∣<1/qj+1\lvert q_j\alpha-p_j\rvert<1/q_{j+1} [36]. For 0≤k<qj0\le k<q_j, ∣kα−kpj/qj∣=kqj∣qjα−pj∣<1/qj+1\lvert k\alpha-kp_j/q_j\rvert=\tfrac k{q_j}\lvert q_j\alpha-p_j\rvert<1/q_{j+1}. Since pjp_j and qjq_j are coprime, the points kpj/qj mod 1kp_j/q_j\bmod1, 0≤k<qj0\le k<q_j, are all the multiples of 1/qj1/q_j, and every point of the circle is within 12qj\tfrac1{2q_j} of one of them. So every point is within 12qj+1qj+1≤32qj\tfrac1{2q_j}+\tfrac1{q_{j+1}}\le\tfrac3{2q_j} of some kαk\alpha. In the system, kk turns of the joint rotate the body by −2πkα-2\pi k\alpha; multiplying by 2π2\pi, every orientation is within 3π/qj3\pi/q_j of one reached by fewer than qjq_j turns. ◀\blacktriangleleft

System design: composition, ports, and reduction

Open physical systems are composed along shared ports, and the composite of energy-conserving systems should be energy-conserving. For linear systems this is the theorem that Lagrangian and Dirac relations compose. For non-linear systems the composite of two correspondences is a fibre product, which exists in Diff\mathsf{Diff} without transversality hypotheses. Port-Hamiltonian systems are closed under interconnection, and the reduction of a symmetric component commutes with its interconnection to the rest of a design.

Correspondences

A design assembles components by identifying variables at their interfaces. In Hamiltonian terms an interface is a parasymplectic space of port variables, and a component is a relation between its ports that is compatible with the forms.

Definition 1.1. An isotropic correspondence from (X,ω)(X,\omega) to (X′,ω′)(X',\omega') is a diffeological space LL with smooth maps s ⁣:L→Xs\colon L\to X, t ⁣:L→X′t\colon L\to X' such that s∗ω=t∗ω′s^*\omega=t^*\omega'; equivalently a span X←L→X′X\leftarrow L\to X' in the slice SmoothSet/Ωcl2\mathsf{SmoothSet}/\Omega^{2}_{\mathrm{cl}}; equivalently a smooth map L→X×ωX′L\to X\times_\omega X' to the product of Proposition 1.2; equivalently a smooth map L→X‾⊞X′L\to\overline X\boxplus X' that pulls the form back to zero.

Theorem 1.2 (Composition). Isotropic correspondences compose by fibre product, (X′←s′L′→t′X′′)∘(X←sL→tX′)=(X←s∘prL×X′L′→t′∘pr′X′′),(X'\xleftarrow{s'}L'\xrightarrow{t'}X'')\circ(X\xleftarrow{s}L\xrightarrow{t}X')=\bigl(X\xleftarrow{s\circ\mathrm{pr}}L\times_{X'}L'\xrightarrow{t'\circ\mathrm{pr}'}X''\bigr), and with this composition the parasymplectic spaces are the objects of a bicategory Corr\mathsf{Corr}. The graph of a morphism of PSymp\mathsf{PSymp} is a correspondence, and composition of graphs is composition of maps. The sum ⊞\boxplus is a symmetric monoidal structure on Corr\mathsf{Corr}, and correspondences X↛X′X\nrightarrow X' are the correspondences ∗↛X‾⊞X′\ast\nrightarrow\overline X\boxplus X'.

Proof. The fibre product exists in Diff\mathsf{Diff} [I, Theorem 1.6], and (s∘pr)∗ω=pr∗t∗ω′=(t∘pr)∗ω′=(s′∘pr′)∗ω′=(t′∘pr′)∗ω′′(s\circ\mathrm{pr})^*\omega=\mathrm{pr}^*t^*\omega'=(t\circ\mathrm{pr})^*\omega'=(s'\circ\mathrm{pr}')^*\omega'=(t'\circ\mathrm{pr}')^*\omega'', because t∘pr=s′∘pr′t\circ\mathrm{pr}=s'\circ\mathrm{pr}' on the fibre product. Associativity and units hold up to the canonical isomorphisms of iterated fibre products, as for spans in any category with pullbacks. For a morphism ff the graph is X←idX→fX′X\xleftarrow{\mathrm{id}}X\xrightarrow{f}X' ([exo:graph]), and X×X′X′≅XX\times_{X'}X'\cong X. The last statement is the last clause of 1.1. ◻

In the category of manifolds the fibre product L×X′L′L\times_{X'}L' exists only under a transversality condition, and the composition of Lagrangian correspondences is for that reason only partially defined [82]. In Diff\mathsf{Diff} the composite always exists; when transversality fails it is a diffeological space that is not a manifold, with its forms, its plots and its homotopy type. The condition of being Lagrangian, isotropic of half dimension, is pointwise and is available when the tangent spaces are; the linear case is next.

Left: composition of isotropic correspondences is composition of spans over Ωcl2\Omega^{2}_{\mathrm{cl}}. Right: symplectic reduction is a correspondence from a space to its reduced space.

Linear relations

Let VV be a finite-dimensional real vector space with a non-degenerate bilinear form ⟨ , ⟩\langle\ ,\ \rangle, symmetric or antisymmetric, and V‾\overline V the same space with the opposite form. A subspace LL is Lagrangian if L=L⊥L=L^\perp. A Lagrangian relation V1↛V2V_1\nrightarrow V_2 is a Lagrangian subspace of V‾1⊕V2\overline V_1\oplus V_2, and the composite of relations is L2∘L1={ (v1,v3)∣∃ v2: (v1,v2)∈L1, (v2,v3)∈L2 }L_2\circ L_1=\{\,(v_1,v_3)\mid\exists\,v_2:\ (v_1,v_2)\in L_1,\ (v_2,v_3)\in L_2\,\}.

Theorem 1.3 (Lagrangian relations compose).

  1. Reduction. If C⊆VC\subseteq V is coisotropic, C⊥⊆CC^\perp\subseteq C, and L⊆VL\subseteq V is Lagrangian, then LC=(L∩C+C⊥)/C⊥L_C=(L\cap C+C^\perp)/C^\perp is Lagrangian in C/C⊥C/C^\perp.

  2. The composite of two Lagrangian relations is a Lagrangian relation, with no hypothesis of transversality.

The statement holds for forms of either symmetry type.

Proof. (i) The form of VV induces a non-degenerate form on C/C⊥C/C^\perp, for which LCL_C is isotropic. Since (L∩C)⊥=L⊥+C⊥=L+C⊥(L\cap C)^\perp=L^\perp+C^\perp=L+C^\perp, dim⁡(L∩C)=dim⁡V−dim⁡L−dim⁡C⊥+dim⁡(L∩C⊥),\dim(L\cap C)=\dim V-\dim L-\dim C^\perp+\dim(L\cap C^\perp), and with dim⁡L=12dim⁡V\dim L=\tfrac12\dim V and dim⁡C=dim⁡V−dim⁡C⊥\dim C=\dim V-\dim C^\perp this gives dim⁡LC=dim⁡(L∩C)−dim⁡(L∩C⊥)=12(dim⁡C−dim⁡C⊥)\dim L_C=\dim(L\cap C)-\dim(L\cap C^\perp)=\tfrac12(\dim C-\dim C^\perp). An isotropic subspace of half dimension is equal to its orthogonal. (ii) In V=V‾1⊕V2⊕V‾2⊕V3V=\overline V_1\oplus V_2\oplus\overline V_2\oplus V_3 the subspace L=L1⊕L2L=L_1\oplus L_2 is Lagrangian and C=V1⊕ΔV2⊕V3C=V_1\oplus\Delta_{V_2}\oplus V_3 is coisotropic with C⊥=0⊕ΔV2⊕0C^\perp=0\oplus\Delta_{V_2}\oplus0, because the diagonal of V2⊕V‾2V_2\oplus\overline V_2 is Lagrangian. Then C/C⊥=V‾1⊕V3C/C^\perp=\overline V_1\oplus V_3 and LC=L2∘L1L_C=L_2\circ L_1. ◻

For antisymmetric forms this is the linear symplectic category [35]. For the symmetric pairing ⟨(f,e),(f′,e′)⟩=e(f′)+e′(f)\langle(f,e),(f',e')\rangle=e(f')+e'(f) on a space F⊕F∗F\oplus F^* of flows and efforts, a Lagrangian subspace is a Dirac structure: the constitutive relation of a lossless interconnection, on which the power e(f)e(f) vanishes.

Corollary 1.4 (Cervera–van der Schaft–Baños [19). ]The interconnection of two Dirac structures on F1⊕F2F_1\oplus F_2 and on F2⊕F3F_2\oplus F_3 through the shared port, with f2=−f2′f_2=-f_2' and e2=e2′e_2=e_2', is a Dirac structure on F1⊕F3F_1\oplus F_3.

The proof is [exo:dirac]. Kirchhoff’s laws, ideal transformers and rigid kinematic constraints are Dirac structures, and the corollary is the statement that a network of lossless interconnections is a lossless interconnection. In the passive linear case the composition of circuits is of this kind [9]; eliminating an internal node is a composition of relations, and no non-degeneracy of the eliminated block is needed ([exo:schur]).

Port-Hamiltonian systems

A port-Hamiltonian system on a manifold XX with energy HH is x˙=(J(x)−R(x))∇H(x)+g(x) u,y=g(x)T∇H(x), \dot x=\bigl(J(x)-R(x)\bigr)\nabla H(x)+g(x)\,u,\qquad y=g(x)^{\mathsf{T}}\nabla H(x), with JJ antisymmetric, RR symmetric positive semi-definite, input uu and output yy [75].

Theorem 1.5 (Interconnection).

  1. Along every trajectory of (9), H˙=−∇HTR ∇H+yTu≤yTu\dot H=-\nabla H^{\mathsf{T}}R\,\nabla H+y^{\mathsf{T}}u\le y^{\mathsf{T}}u.

  2. The feedback interconnection u1=−y2+e1u_1=-y_2+e_1, u2=y1+e2u_2=y_1+e_2 of two port-Hamiltonian systems is port-Hamiltonian on X1×X2X_1\times X_2 with H=H1+H2,J=(J1−g1g2Tg2g1TJ2),R=(R100R2),g=(g100g2).H=H_1+H_2,\quad J=\begin{pmatrix}J_1&-g_1g_2^{\mathsf{T}}\\ g_2g_1^{\mathsf{T}}&J_2\end{pmatrix},\quad R=\begin{pmatrix}R_1&0\\0&R_2\end{pmatrix},\quad g=\begin{pmatrix}g_1&0\\0&g_2\end{pmatrix}.

  3. Hence H(x(t))−H(x(0))≤∫0t(y1Te1+y2Te2) dτH(x(t))-H(x(0))\le\int_0^t(y_1^{\mathsf{T}}e_1+y_2^{\mathsf{T}}e_2)\,\mathrm{d}\tau: the composite is passive with storage function H1+H2H_1+H_2.

Proof. (i) H˙=∇HTx˙=∇HTJ∇H−∇HTR∇H+∇HTgu\dot H=\nabla H^{\mathsf{T}}\dot x=\nabla H^{\mathsf{T}}J\nabla H-\nabla H^{\mathsf{T}}R\nabla H+\nabla H^{\mathsf{T}}gu, and the first term vanishes. (ii) Substituting, x˙1=(J1−R1)∇H1−g1g2T∇H2+g1e1\dot x_1=(J_1-R_1)\nabla H_1-g_1g_2^{\mathsf{T}}\nabla H_2+g_1e_1 and x˙2=(J2−R2)∇H2+g2g1T∇H1+g2e2\dot x_2=(J_2-R_2)\nabla H_2+g_2g_1^{\mathsf{T}}\nabla H_1+g_2e_2; the off-diagonal blocks are negative transposes of each other. (iii) Integrate (i) for the composite. ◻

The feedback law of (ii) is a Dirac structure on the port variables, y1Tu1+y2Tu2=y1Te1+y2Te2y_1^{\mathsf{T}}u_1+y_2^{\mathsf{T}}u_2=y_1^{\mathsf{T}}e_1+y_2^{\mathsf{T}}e_2, and the theorem is the non-linear, dissipative counterpart of 1.4. The state space of a design assembled in this way is a product of the state spaces of the components, cut down by the constraints of the interconnection and divided by its symmetries. By [I, Theorem 13.1] such state spaces are diffeological spaces in general, and the two operations of cutting down and dividing are the two steps of reduction.

Five compositional settings for open Hamiltonian systems.
setting interface component composition
PSymp\mathsf{PSymp} space with closed 22-form form-preserving map of maps
Corr\mathsf{Corr} the same isotropic span fibre product (1.2)
linear symplectic symplectic vector space Lagrangian relation of relations (1.3)
power ports F⊕F∗F\oplus F^* Dirac structure shared port (1.4)
port-Hamiltonian inputs and outputs system (9) feedback (1.5)

Reduction commutes with interconnection

Theorem 1.6 (Modular reduction). Let (X1,ω1)(X_1,\omega_1) be equivariantly prequantised for a group GG acting principally on Z1=μ1−1(0)Z_1=\mu_1^{-1}(0), with reduced space (X1,0,ω1,0)(X_{1,0},\omega_{1,0}).

  1. The span X1↩Z1→πGX1,0X_1\hookleftarrow Z_1\xrightarrow{\pi_G}X_{1,0} is an isotropic correspondence R ⁣:X1↛X1,0\mathcal R\colon X_1\nrightarrow X_{1,0}. For every isotropic L→X1L\to X_1 the composite R∘L=L×X1Z1→X1,0\mathcal R\circ L=L\times_{X_1}Z_1\to X_{1,0} is isotropic.

  2. For every parasymplectic space (X2,ω2)(X_2,\omega_2), with GG acting on X1⊞X2X_1\boxplus X_2 through the first factor, (Z1×X2)/G  ≅  X1,0×X2,with reduced form ω1,0⊞ω2.(Z_1\times X_2)/G\;\cong\;X_{1,0}\times X_2,\qquad\text{with reduced form }\omega_{1,0}\boxplus\omega_2 . A function H1+H2+HcH_1+H_2+H_c on X1×X2X_1\times X_2 with H1H_1 and the coupling HcH_c invariant under GG descends to X1,0×X2X_{1,0}\times X_2.

  3. If a second group HH acts on X2X_2 in the same way, the reductions by GG, by HH and by G×HG\times H are related as in Theorem 1.9, and the reduced space is X1,0×X2,0X_{1,0}\times X_{2,0}.

The proof is [exo:modular]. In design terms: a component with a symmetry can be replaced by its reduced model inside any larger design whose coupling to it is invariant, and the result is the reduced model of the whole. The reduced component is an object of the same kind, a parasymplectic diffeological space, also when it is singular. This is the Hamiltonian form of the lossless symmetry reduction of [I, Theorem 13.3], and the cases in which the quotient must be taken as a stack are listed in [tab:reduced].

Left: the feedback interconnection of 1.5. Right: 1.6(ii); coupling and reduction commute.

Solved exercises

Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.

1 Show that for morphisms f ⁣:X→X′f\colon X\to X' and f′ ⁣:X′→X′′f'\colon X'\to X'' of PSymp\mathsf{PSymp} the composite of the graphs is the graph of f′∘ff'\circ f.

Solution.  The graph of ff is L=XL=X with (s,t)=(id,f)(s,t)=(\mathrm{id},f), and that of f′f' is L′=X′L'=X' with (id,f′)(\mathrm{id},f'). The fibre product L×X′L′={ (x,x′)∣f(x)=x′ }L\times_{X'}L'=\{\,(x,x')\mid f(x)=x'\,\} is identified with XX by the first projection, and under this identification the two legs are id\mathrm{id} and f′∘ff'\circ f. ◀\blacktriangleleft

2 In V=R4V=\mathbb{R}^4 with coordinates (q1,q2,p1,p2)(q_1,q_2,p_1,p_2) and the standard symplectic form, let Λ={ p=∇S(q) }\Lambda=\{\,p=\nabla S(q)\,\} with S=12aq12+bq1q2+12cq22S=\tfrac12aq_1^2+bq_1q_2+\tfrac12cq_2^2, and let C={ p1=0 }C=\{\,p_1=0\,\}. Compute ΛC⊆R2\Lambda_C\subseteq\mathbb{R}^2 for a≠0a\neq0 and for a=0≠ba=0\neq b.

Solution.  C⊥C^\perp is spanned by ∂q1\partial_{q_1}, and C/C⊥=R2C/C^\perp=\mathbb{R}^2 with coordinates (q2,p2)(q_2,p_2). On Λ∩C\Lambda\cap C: p1=aq1+bq2=0p_1=aq_1+bq_2=0 and p2=bq1+cq2p_2=bq_1+cq_2. If a≠0a\neq0 then q1=−bq2/aq_1=-bq_2/a and ΛC={ p2=(c−b2/a) q2 }\Lambda_C=\{\,p_2=(c-b^2/a)\,q_2\,\}, the graph of the Schur complement: the generating function of the reduced relation is SS with the internal variable eliminated. If a=0a=0 and b≠0b\neq0 then q2=0q_2=0 and p2=bq1p_2=bq_1 is arbitrary: ΛC\Lambda_C is the vertical line { q2=0 }\{\,q_2=0\,\}. It is Lagrangian, in accordance with 1.3(i), and it is not the graph of a function: elimination of an internal variable with a degenerate block produces a constraint in place of a constitutive law. ◀\blacktriangleleft

2 Write a mass–spring system with force input and velocity output as a port-Hamiltonian system, and compute the feedback interconnection of two of them.

Solution.  x=(q,p)x=(q,p), H=12mp2+k2q2H=\tfrac1{2m}p^2+\tfrac k2q^2, J=(01−10)J=\bigl(\begin{smallmatrix}0&1\\-1&0\end{smallmatrix}\bigr), R=0R=0, g=(0,1)Tg=(0,1)^{\mathsf{T}}: q˙=p/m\dot q=p/m, p˙=−kq+u\dot p=-kq+u, y=p/my=p/m, the velocity, and H˙=yu\dot H=yu, force times velocity. For two such systems, g1g2Tg_1g_2^{\mathsf{T}} is the matrix unit coupling the two momenta, and 1.5(ii) gives p˙1=−k1q1−p2/m2+e1\dot p_1=-k_1q_1-p_2/m_2+e_1, p˙2=−k2q2+p1/m1+e2\dot p_2=-k_2q_2+p_1/m_1+e_2: a gyroscopic coupling. The total energy H1+H2H_1+H_2 satisfies H˙=y1e1+y2e2\dot H=y_1e_1+y_2e_2 and is conserved for e=0e=0. ◀\blacktriangleleft

3 Deduce 1.4 from 1.3.

Solution.  Let Wi=Fi⊕Fi∗W_i=F_i\oplus F_i^* with the symmetric pairing. The map σ(f,e)=(−f,e)\sigma(f,e)=(-f,e) satisfies ⟨σw,σw′⟩=−⟨w,w′⟩\langle\sigma w,\sigma w'\rangle=-\langle w,w'\rangle, so it is an isometry Wi→W‾iW_i\to\overline W_i. A Dirac structure DAD_A on F1⊕F2F_1\oplus F_2 is a Lagrangian subspace of W1⊕W2W_1\oplus W_2; applying σ\sigma to the first factor makes it a Lagrangian relation W1↛W2W_1\nrightarrow W_2, and similarly DBD_B becomes a relation W2↛W3W_2\nrightarrow W_3 after applying σ\sigma to its W2W_2-component. The composite of the two relations identifies (f2,e2)(f_2,e_2) in the first with σ(f2′,e2′)=(−f2′,e2′)\sigma(f_2',e_2')=(-f_2',e_2') in the second, which is the interconnection constraint. By 1.3(ii) the composite is Lagrangian in W‾1⊕W3\overline W_1\oplus W_3, and applying σ\sigma to the first factor again gives a Dirac structure on F1⊕F3F_1\oplus F_3. ◀\blacktriangleleft

4 Prove 1.6.

Solution.  (i) By Theorem 1.2, πG∗ω1,0=ω1∣Z1\pi_G^*\omega_{1,0}=\omega_1|_{Z_1}, which is the isotropy of the span. The second statement is 1.2 applied to ∗↛X1↛X1,0\ast\nrightarrow X_1\nrightarrow X_{1,0}. (ii) The map πG×id ⁣:Z1×X2→X1,0×X2\pi_G\times\mathrm{id}\colon Z_1\times X_2\to X_{1,0}\times X_2 is a product of subductions, hence a subduction [I, Proposition 1.7], and its fibres are the orbits of GG; so it induces a diffeomorphism from (Z1×X2)/G(Z_1\times X_2)/G. The form ω1∣Z1⊞ω2\omega_1|_{Z_1}\boxplus\omega_2 is the pullback of ω1,0⊞ω2\omega_{1,0}\boxplus\omega_2, and pullback along a subduction is injective, so the latter is the reduced form. The functions H1∣Z1H_1|_{Z_1} and Hc∣Z1×X2H_c|_{Z_1\times X_2} are invariant, hence constant on the fibres of a subduction, and descend to smooth functions; H2H_2 is a function of the second factor. (iii) Apply (ii) twice, or Theorem 1.9 to the commuting actions of GG and HH on X1⊞X2X_1\boxplus X_2: the zero level is Z1×Z2Z_1\times Z_2 and its quotient by G×HG\times H is X1,0×X2,0X_{1,0}\times X_{2,0} by the same argument. ◀\blacktriangleleft

The general structure: descent along an atlas

The conservation laws of Machine learning: conservation laws of learning dynamics, the geometric phases of Artificial intelligence: invariants, phases, and reachability and the four uses of symmetry in Acceleration are one situation: an objective defined on a quotient, and a dynamics defined on an atlas of the quotient by means of a structure that does not descend. We state it symplectically, as a condition on a Lagrangian submanifold, and metrically, as a connection whose exact part gives the conserved quantities and whose non-closed part gives the phases. The part of the statement that uses no tangent structure holds in every ∞\infty-topos. With tangent structure it holds in a differentially cohesive ∞\infty-topos, for every group object acting on a Riemannian manifold, where the atlas of the quotient is the composite of a quotient by a formal group and a formally étale map. For the syntax of an algebraic theory it is the theory of normal forms and of invariant definitions.

Invariance as a Lagrangian condition

Let a Lie group GG act on a manifold Θ\Theta. The cotangent lift of the action preserves the canonical 11-form α=⟨p,dθ⟩\alpha=\langle p,\mathrm{d}\theta\rangle of T∗ΘT^*\Theta, and by Theorem 1.5 its moment map is μ(θ,p)(ξ)=⟨p,ξΘ(θ)⟩\mu(\theta,p)(\xi)=\langle p,\xi_\Theta(\theta)\rangle, where ξΘ\xi_\Theta is the vector field generated by ξ∈g\xi\in\mathfrak{g}.

Theorem 1.1 (Invariant functions and the zero level).

  1. A function L∈C∞(Θ)L\in C^{\infty}(\Theta) is invariant under the identity component of GG if and only if the graph of dL\mathrm{d}L is contained in μ−1(0)\mu^{-1}(0).

  2. If GG acts freely and properly on Θ\Theta, with quotient π ⁣:Θ→X\pi\colon\Theta\to X, then μ−1(0)=π∗T∗X\mu^{-1}(0)=\pi^*T^*X, the action of GG on it is principal, and the reduced space of Corollary 1.3 is T∗XT^*X with its canonical forms.

  3. In that case, for L=ℓ∘πL=\ell\circ\pi, the image of the graph of dL\mathrm{d}L under the reduction correspondence R ⁣:T∗Θ↛T∗X\mathcal R\colon T^*\Theta\nrightarrow T^*X of Theorem 1.6 is the graph of dℓ\mathrm{d}\ell.

Proof. (i) μ(θ,dLθ)(ξ)=dL(ξΘ)\mu(\theta,\mathrm{d}L_\theta)(\xi)=\mathrm{d}L(\xi_\Theta) is the derivative of LL along the orbit; it vanishes for all ξ\xi if and only if LL is constant on the orbits of the identity component. (ii) A covector at θ\theta lies in μ−1(0)\mu^{-1}(0) if and only if it vanishes on the tangent space of the orbit, that is, if and only if it is π∗β\pi^*\beta for a unique β∈Tπ(θ)∗X\beta\in T^*_{\pi(\theta)}X. So μ−1(0)=π∗T∗X\mu^{-1}(0)=\pi^*T^*X, and the map (θ,π∗β)↦(π(θ),β)(\theta,\pi^*\beta)\mapsto(\pi(\theta),\beta) is a principal GG-bundle over T∗XT^*X, the pullback of π\pi; the action is principal also by Lemma 1.1(a). For a tangent vector vv at (θ,π∗β)(\theta,\pi^*\beta), α(v)=π∗β(dτ v)=β(dπ dτ v)\alpha(v)=\pi^*\beta(\mathrm{d}\tau\,v)=\beta(\mathrm{d}\pi\,\mathrm{d}\tau\,v) with τ\tau the projection to Θ\Theta, which is the pullback of the canonical form of T∗XT^*X. (iii) dL=π∗dℓ\mathrm{d}L=\pi^*\mathrm{d}\ell, so the graph of dL\mathrm{d}L lies in the zero level and its image is { (x,dℓx) }\{\,(x,\mathrm{d}\ell_x)\,\}. ◻

Theorem 1.1. An invariant objective is a Lagrangian submanifold of the zero level of the moment map of the cotangent lift, and its reduction is the objective on the quotient.

The theorem contains no dynamics. For an optimisation algorithm one more datum is required, a rule that converts the covector dL\mathrm{d}L into a motion, and on Θ\Theta that rule is a metric. If the metric is invariant under GG it descends with everything else. The phenomena of Machine learning: conservation laws of learning dynamics arise because the Euclidean metric of the parameters is invariant under a compact subgroup only.

The connection of a metric

Let Θ⊆Rd\Theta\subseteq\mathbb{R}^d be open and invariant under a closed subgroup G⊆GL⁡d(R)G\subseteq\operatorname{GL}_d(\mathbb{R}) whose Lie algebra is stable under transposition, g=k⊕s\mathfrak{g}=\mathfrak{k}\oplus\mathfrak{s}, and let K=G∩O⁡(d)K=G\cap\operatorname{O}(d). For A∈gA\in\mathfrak{g} let aA=⟨Aθ,dθ⟩∈Ω1(Θ),a_A=\langle A\theta,\mathrm{d}\theta\rangle\in\Omega^1(\Theta), the 11-form dual to the generator AθA\theta for the Euclidean metric.

Theorem 1.2 (Exact part and non-closed part).

  1. A vector vv at θ\theta is orthogonal to the orbit of GG if and only if aA(v)=0a_A(v)=0 for all A∈gA\in\mathfrak{g}. The gradient of every GG-invariant function is orthogonal to the orbits.

  2. For A∈sA\in\mathfrak{s} the form is exact: aA=dQAa_A=\mathrm{d}Q_A with QA=12⟨θ,Aθ⟩Q_A=\tfrac12\langle\theta,A\theta\rangle.

  3. For A∈kA\in\mathfrak{k} the form is not closed unless A=0A=0: daA=−2∑i<jAij dθi∧dθj\mathrm{d}a_A=-2\sum_{i<j}A_{ij}\,\mathrm{d}\theta_i\wedge\mathrm{d}\theta_j.

  4. Every curve orthogonal to the orbits lies in a level set of Q ⁣:Θ→s∗Q\colon\Theta\to\mathfrak{s}^*. On the level set Q−1(0)Q^{-1}(0), which KK preserves, the orthogonal complement of the GG-orbits is the orthogonal complement of the KK-orbits, the mechanical connection of Theorem 1.2 for the group KK.

Proof. (i) The tangent space of the orbit is gθ\mathfrak{g}\theta, and aA(v)=⟨Aθ,v⟩a_A(v)=\langle A\theta,v\rangle; the second statement is (8). (ii) d 12⟨θ,Aθ⟩=⟨Aθ,dθ⟩\mathrm{d}\,\tfrac12\langle\theta,A\theta\rangle=\langle A\theta,\mathrm{d}\theta\rangle for symmetric AA. (iii) aA=∑i,jAijθj dθia_A=\sum_{i,j}A_{ij}\theta_j\,\mathrm{d}\theta_i and daA=∑i,jAij dθj∧dθi=∑i<j(Aji−Aij) dθi∧dθj\mathrm{d}a_A=\sum_{i,j}A_{ij}\,\mathrm{d}\theta_j\wedge\mathrm{d}\theta_i=\sum_{i<j}(A_{ji}-A_{ij})\,\mathrm{d}\theta_i\wedge\mathrm{d}\theta_j. (iv) By (i) and (ii) the functions QAQ_A are constant along such a curve. The tangent space of a level set of QQ is (sθ)⊥(\mathfrak{s}\theta)^\perp, and (gθ)⊥=(sθ)⊥∩(kθ)⊥(\mathfrak{g}\theta)^\perp=(\mathfrak{s}\theta)^\perp\cap(\mathfrak{k}\theta)^\perp. Equivariance of QQ under KK gives the invariance of the zero level. ◻

So the conservation laws of gradient flow and the geometric phases are the two parts of one object. The symmetric directions give exact forms, hence first integrals and a foliation by slices; the antisymmetric directions give forms that are not closed, and where daA\mathrm{d}a_A is non-zero on pairs of vectors orthogonal to the orbits the connection has curvature, with a holonomy and no first integral (1.11). Theorem 1.2(b) and (d) are parts (ii) and (i); the two-body system of Theorem 1.3 is the case of a closed form that is not exact, where the first integral exists with values in a quotient of R\mathbb{R}.

Theorem 1.3 (Four positions). In the situation above, let GG act freely and properly on Θ\Theta, π ⁣:Θ→X\pi\colon\Theta\to X, and L=ℓ∘πL=\ell\circ\pi.

  1. Gauge dependence. dπθ(∇L(θ))=Cθ dℓx\mathrm{d}\pi_\theta\bigl(\nabla L(\theta)\bigr)=C_\theta\,\mathrm{d}\ell_x, where Cθ=dπθ∘dπθT ⁣:Tx∗X→TxXC_\theta=\mathrm{d}\pi_\theta\circ\mathrm{d}\pi_\theta^{\mathsf{T}}\colon T^*_xX\to T_xX is symmetric and positive definite. It satisfies Ckθ=CθC_{k\theta}=C_\theta for k∈Kk\in K, and it depends on the point of the fibre otherwise.

  2. A slice. If Q−1(0)Q^{-1}(0) intersects each fibre in one orbit of KK, then CC restricted to Q−1(0)Q^{-1}(0) is a cometric CbalC^{\mathrm{bal}} on XX, and gradient flow from a balanced point projects to x˙=−Cbaldℓ\dot x=-C^{\mathrm{bal}}\mathrm{d}\ell. For the linear network, Cbal(G)=(XXT)1/2G+G(XTX)1/2C^{\mathrm{bal}}(G)=(XX^{\mathsf{T}})^{1/2}G+G(X^{\mathsf{T}}X)^{1/2}.

  3. An invariant metric. For a GG-invariant metric g′g' on Θ\Theta the cometric C′C' is constant on fibres, and the g′g'-gradient flow of LL projects to x˙=−C′dℓ\dot x=-C'\mathrm{d}\ell from every initial point. For the linear network and g′=tr⁡(dB AATdBT)+tr⁡(dATBTB dA)g'=\operatorname{tr}(\mathrm{d}B\,AA^{\mathsf{T}}\mathrm{d}B^{\mathsf{T}})+\operatorname{tr}(\mathrm{d}A^{\mathsf{T}}B^{\mathsf{T}}B\,\mathrm{d}A), C′(G)=PcG+GPrC'(G)=P_cG+GP_r.

  4. Projection. Every update u∈TθΘu\in T_\theta\Theta is the sum of a part orthogonal to the orbit and a part tangent to it. Only the first has an image in TxXT_xX; the second changes QAQ_A at first order by ⟨Aθ,u⟩\langle A\theta,u\rangle for A∈sA\in\mathfrak{s}, and moves θ\theta along its KK-orbit for A∈kA\in\mathfrak{k}.

Proof. (a) dL=dℓ∘dπ\mathrm{d}L=\mathrm{d}\ell\circ\mathrm{d}\pi, so ∇L=dπTdℓ\nabla L=\mathrm{d}\pi^{\mathsf{T}}\mathrm{d}\ell and dπ ∇L=dπ dπTdℓ\mathrm{d}\pi\,\nabla L=\mathrm{d}\pi\,\mathrm{d}\pi^{\mathsf{T}}\mathrm{d}\ell. Since π∘k=π\pi\circ k=\pi and kk is orthogonal, dπkθ=dπθ∘k−1\mathrm{d}\pi_{k\theta}=\mathrm{d}\pi_\theta\circ k^{-1} and Ckθ=CθC_{k\theta}=C_\theta. (b) follows from (a), from the invariance of the balanced set (Theorem 1.2(b)), and for the linear network from Proposition 1.7(i) and Theorem 1.4(ii). (c) For an invariant metric π\pi is a Riemannian submersion onto XX with the quotient metric, and the gradient of ℓ∘π\ell\circ\pi is the horizontal lift of the gradient of ℓ\ell. The g′g'-gradients are GAT(AAT)−1GA^{\mathsf{T}}(AA^{\mathsf{T}})^{-1} and (BTB)−1BTG(B^{\mathsf{T}}B)^{-1}B^{\mathsf{T}}G, and the formula is Proposition 1.7(ii) to first order in η\eta. (d) is 1.2(i),(ii). ◻

The four positions of 1.3. Fibres are orbits of the symmetry group, the curves are level sets of the invariants of gradient flow, and the same objective on XX is descended at different speeds from different levels.
The uses of a parameter symmetry as positions with respect to the quotient map.
position what is chosen dynamics on XX in the literature
(a) none a point of the fibre, by the initialisation −Cθ dℓ-C_\theta\,\mathrm{d}\ell, with θ\theta moving in a level set conservation laws [54, 86]
(b) slice the level Q=0Q=0 −Cbaldℓ-C^{\mathrm{bal}}\mathrm{d}\ell [6, 58]
(b′') change of slice a vertical move CC changes, ℓ\ell does not teleportation [85]
(c) invariant metric g′g' on Θ\Theta −C′dℓ-C'\mathrm{d}\ell, for all levels [4, 80]
(d) projection the orthogonal part of uu image of u⊥u_\perp [39]

The statements of this section are classical in each of their parts: optimisation on quotient manifolds [4], the moment map and the theorem of Kempf and Ness for the balanced set [58], and cotangent bundle reduction [3]. Their placement in the present volume is the following: 1.1 is Corollary 1.3 for a cotangent bundle, position (b) is the reduction of structure group of Theorem 1.4, and position (d) is the connection of Theorem 1.2.

The same structure in an ∞\infty-topos

Three of the four positions use no metric. Let H\mathbf{H} be an ∞\infty-topos and p ⁣:Θ→Xp\colon\Theta\to X an effective epimorphism, an atlas of XX, with Čech nerve Cˇ(p)n=Θ×X⋯×XΘ\check C(p)_n=\Theta\times_X\cdots\times_X\Theta.

Proposition 1.4 (Atlases).

  1. Descent. XX is the colimit of Cˇ(p)\check C(p), and Map⁡(X,V)\operatorname{Map}(X,V) is the limit of Map⁡(Cˇ(p)∙,V)\operatorname{Map}(\check C(p)_\bullet,V) [60]. For a 00-truncated VV a map X→VX\to V is a map f ⁣:Θ→Vf\colon\Theta\to V whose two pullbacks to Θ×XΘ\Theta\times_X\Theta coincide.

  2. Invariant dynamics. If X=Θ/ ⁣ ⁣/GX=\Theta/\!\!/G and u ⁣:Θ→Θu\colon\Theta\to\Theta is GG-equivariant, then uu induces uˉ ⁣:X→X\bar u\colon X\to X with p∘u≃uˉ∘pp\circ u\simeq\bar u\circ p.

  3. Slices. If s ⁣:S→Θs\colon S\to\Theta is a map such that p∘sp\circ s is an effective epimorphism, then XX is the colimit of Cˇ(p∘s)\check C(p\circ s).

  4. Invariants of a dynamics. For an endomorphism uu of Θ\Theta let Θu\Theta_u be the coequaliser of uu and the identity. For a 00-truncated VV, the maps Θu→V\Theta_u\to V are the maps f ⁣:Θ→Vf\colon\Theta\to V with f∘u=ff\circ u=f.

Proof. (i) Groupoid objects of an ∞\infty-topos are effective, so an effective epimorphism is the colimit of its Čech nerve [60, Theorem 6.1.0.6]; for 00-truncated VV the limit is the equaliser of the first two terms. (ii) An equivariant map is a map of the simplicial objects G∙×ΘG^\bullet\times\Theta, and colimits are functorial. (iii) is (i) for p∘sp\circ s. (iv) is the universal property of the coequaliser, the homotopy coherences being vacuous for a 00-truncated target. ◻

Each part has appeared in this volume. Part (i) for V=ΩkV=\Omega^k is (4), and for the 11-truncated V=B(TP)connV=\mathbf{B}(T_{P})_{\mathrm{conn}} it is Theorem 1.4. Part (ii) is position (c). Part (iii) with S=Q−1(0)S=Q^{-1}(0) is position (b): the Čech nerve of the slice is the action groupoid of the smaller group KK. Part (iv) for a flow in place of an endomorphism is the universal first integral of Theorem 1.3(ii), whose target is the irrational torus. The smooth statements of the previous section use one more datum, a splitting of the tangent map of pp, which is the connection. It is formulated in differential cohesion in 1.4.

Differential cohesion

Theorem 1.3 was proved for a linear group acting freely and properly on an open subset of Rd\mathbb{R}^d, by computation with matrices. Its statements involve tangent vectors, and there are none in 1.4. Two things are required for a general formulation: a tangent functor that commutes with the formation of quotients, and a separation of the infinitesimal part of a symmetry from the rest. Both are part of the structure of a differentially cohesive ∞\infty-topos [76, 50].

Definition 1.5. A differentially cohesive ∞\infty-topos with first-order infinitesimals is an ∞\infty-topos H\mathbf{H} with

  1. an adjoint triple ℜ⊣ℑ⊣&\Re\dashv\Im\dashv\& of endofunctors, in which ℑ\Im is an idempotent monad with unit η\eta and ℜ\Re preserves finite products;

  2. a 00-truncated commutative ring object RR and a subobject D⊆RD\subseteq R containing 00, with ℜD≃∗\Re D\simeq\ast, such that the functor T=[D,−]T=[D,-] preserves colimits;

  3. the Kock–Lawvere property: (a,b)↦(d↦a+bd)(a,b)\mapsto(d\mapsto a+bd) is an equivalence R×R→[D,R]R\times R\to[D,R].

An object AA is coreduced if ηA\eta_A is an equivalence, and a map f ⁣:A→Bf\colon A\to B is formally étale if the naturality square of η\eta is a pullback, A≃B×ℑBℑAA\simeq B\times_{\Im B}\Im A. The projection TA→ATA\to A is evaluation at 00 and the zero section A→TAA\to TA is restriction along D→∗D\to\ast. For a group object GG with unit ee, the kernel of TG→GTG\to G is the group object g=TeG\mathfrak{g}=T_eG, and the fibre of ηG\eta_G over the unit is the group object G^\hat G.

The model, fixed from 1.10 on, is the ∞\infty-topos of sheaves on the site of formal Cartesian spaces Rn×Spec⁡W\mathbb{R}^n\times\operatorname{Spec}W, with WW a Weil algebra and covers those of the factor Rn\mathbb{R}^n. Here RR is the line, D=Spec⁡R[ε]/(ε2)D=\operatorname{Spec}\mathbb{R}[\varepsilon]/(\varepsilon^2), ℜ(Rn×Spec⁡W)=Rn\Re(\mathbb{R}^n\times\operatorname{Spec}W)=\mathbb{R}^n and (ℑA)(U)=A(ℜU)(\Im A)(U)=A(\Re U). The functor TT is restriction along U↦U×DU\mapsto U\times D, under which the covers of UU and of U×DU\times D correspond, so TT has both adjoints. The 00-truncated objects form the Cahiers topos [25, 52]. Manifolds embed fully faithfully, and [D,M][D,M] is the tangent bundle of a manifold MM. Smooth sets embed by a functor that preserves colimits and finite products, and diffeological spaces embed through smooth sets. In the model ηG\eta_G is an effective epimorphism for every group object GG, since ℜU\Re U is a retract of UU for every object UU of the site.

Lemma 1.6.

  1. ℑ\Im and TT preserve limits and colimits.

  2. [D,ℑA]≃ℑA[D,\Im A]\simeq\Im A for every AA: all tangent vectors of a coreduced object are zero.

  3. Formally étale maps are stable under pullback, and every map between coreduced objects is formally étale.

  4. If f ⁣:A→Bf\colon A\to B is formally étale then TA≃A×BTBTA\simeq A\times_BTB.

The proof is [exo:dc-lemma].

Proposition 1.7 (Tangent and infinitesimal shape of an atlas). Let p ⁣:Θ→Xp\colon\Theta\to X be an effective epimorphism. Then TpTp and ℑp\Im p are effective epimorphisms, with Čech nerves TCˇ(p)T\check C(p) and ℑCˇ(p)\Im\check C(p). For a group object GG acting on Θ\Theta, T(Θ/ ⁣ ⁣/G)≃TΘ/ ⁣ ⁣/TG,ℑ(Θ/ ⁣ ⁣/G)≃ℑΘ/ ⁣ ⁣/ℑG.T(\Theta/\!\!/G)\simeq T\Theta/\!\!/TG,\qquad\Im(\Theta/\!\!/G)\simeq\Im\Theta/\!\!/\Im G .

Proof. Both functors preserve colimits and limits (1.6(i)), and the Čech nerve and the action groupoid are built from fibre products; TGTG and ℑG\Im G are group objects because the functors preserve finite products. ◻

For a Lie group acting on a manifold, TΘ/ ⁣ ⁣/TGT\Theta/\!\!/TG is the tangent stack of the quotient stack, and its sections are the vector fields on the stack defined in [40].

Theorem 1.8 (Infinitesimal and étale parts of a symmetry). Let GG act on Θ\Theta, p ⁣:Θ→X=Θ/ ⁣ ⁣/Gp\colon\Theta\to X=\Theta/\!\!/G, and X^=X×ℑXℑΘ\hat X=X\times_{\Im X}\Im\Theta.

  1. pp factors as Θ→  e  X^→  ε  X\Theta\xrightarrow{\;e\;}\hat X\xrightarrow{\;\varepsilon\;}X with ℑe\Im e an equivalence and ε\varepsilon formally étale, and the factorisation with these properties is unique [20].

  2. ε\varepsilon is a principal bundle for the coreduced group ℑG\Im G: X≃X^/ ⁣ ⁣/ℑGX\simeq\hat X/\!\!/\Im G, X^≃(Θ×ℑG)/ ⁣ ⁣/G\hat X\simeq(\Theta\times\Im G)/\!\!/G and X^×XΘ≃ℑG×Θ\hat X\times_X\Theta\simeq\Im G\times\Theta. If ηG\eta_G is an effective epimorphism, then X^≃Θ/ ⁣ ⁣/G^\hat X\simeq\Theta/\!\!/\hat G.

  3. TX^≃X^×XTXT\hat X\simeq\hat X\times_XTX. Hence the relative tangent map TΘ→Θ×XTXT\Theta\to\Theta\times_XTX of pp is the relative tangent map of ee.

  4. ℑG^≃∗\Im\hat G\simeq\ast and TeG^≃gT_e\hat G\simeq\mathfrak{g}.

  5. pp is formally étale if and only if ηG×id ⁣:G×Θ→ℑG×Θ\eta_G\times\mathrm{id}\colon G\times\Theta\to\Im G\times\Theta is an equivalence. This holds when GG is coreduced, and then g≃∗\mathfrak{g}\simeq\ast.

Proof. (i) Let e=(p,ηΘ)e=(p,\eta_\Theta) and ε=pr1\varepsilon=\mathrm{pr}_1. Since ℑ\Im preserves fibre products and is idempotent, ℑX^≃ℑX×ℑXℑΘ≃ℑΘ\Im\hat X\simeq\Im X\times_{\Im X}\Im\Theta\simeq\Im\Theta, and ℑe\Im e is the identity under this equivalence. The map ε\varepsilon is a pullback of ℑp\Im p, a map between coreduced objects, and is formally étale by 1.6(iii). The ℑ\Im-equivalences and the formally étale maps are the two classes of an orthogonal factorisation system. (ii) and (iii) are [exo:dc-factorisation]. (iv) ℑ\Im preserves finite products, so ℑG\Im G is a group object and ηG\eta_G a homomorphism. ℑG^\Im\hat G is the fibre of ℑηG\Im\eta_G, an equivalence. TT preserves fibres and TℑG≃ℑGT\Im G\simeq\Im G by 1.6(ii), so TG^≃TG×ℑG∗≃TG×GG^T\hat G\simeq TG\times_{\Im G}\ast\simeq TG\times_G\hat G, whose fibre over ee is g\mathfrak{g}. (v) By uniqueness in (i), pp is formally étale if and only if ee is an equivalence, which may be tested after pullback along the effective epimorphism X^×XΘ→X^\hat X\times_X\Theta\to\hat X. The pullback of ee is Θ×XΘ≃G×Θ→ℑG×Θ\Theta\times_X\Theta\simeq G\times\Theta\to\Im G\times\Theta, the map ηG×id\eta_G\times\mathrm{id}. If GG is coreduced, TG≃[D,ℑG]≃ℑG≃GTG\simeq[D,\Im G]\simeq\Im G\simeq G and the fibre of TG→GTG\to G is a point. ◻

image image

Theorem 1.8. The atlas of a quotient is the composite of a map inverted by ℑ\Im, the quotient by the formal group G^\hat G, and a formally étale map, the quotient by the coreduced group ℑG\Im G, along which tangent objects are pulled back.

So every statement about tangent vectors, vertical directions and connections for the atlas pp is a statement about e ⁣:Θ→X^e\colon\Theta\to\hat X, and depends on GG through the formal group G^\hat G only; the rest of the symmetry is in ε\varepsilon, along which there are no vertical tangent directions. The object X^\hat X is the formal completion of XX along pp, and in derived algebraic geometry the maps Θ→X^\Theta\to\hat X of this kind are the Lie algebroids on Θ\Theta [31]; here it is the action algebroid, whose anchor is the map aa of the next proposition.

Proposition 1.9 (The relative tangent sequence). Let GG act on Θ\Theta with action map act\mathrm{act}, p ⁣:Θ→X=Θ/ ⁣ ⁣/Gp\colon\Theta\to X=\Theta/\!\!/G, and let g\mathfrak{g} act on TΘT\Theta by restriction of the action of TGTG.

  1. The relative tangent map q ⁣:TΘ→Θ×XTXq\colon T\Theta\to\Theta\times_XTX is an effective epimorphism, and Θ×XTX≃TΘ/ ⁣ ⁣/g\Theta\times_XTX\simeq T\Theta/\!\!/\mathfrak{g}.

  2. The fibre of qq over the zero section is g×Θ\mathfrak{g}\times\Theta, with the map a ⁣:g×Θ→TΘa\colon\mathfrak{g}\times\Theta\to T\Theta, a(ξ,θ)=Tact(ξ,0θ)a(\xi,\theta)=T\mathrm{act}(\xi,0_\theta), the infinitesimal action.

  3. If Θ\Theta is a manifold, g\mathfrak{g} acts by translations: ξ⋅v=v+a(ξ,θ)\xi\cdot v=v+a(\xi,\theta) for vv over θ\theta.

  4. Let Θ\Theta be a manifold with a Riemannian metric gg, and H⊆TΘH\subseteq T\Theta the subobject of the vectors vv over θ\theta with g(a(ξ,θ),v)=0g(a(\xi,\theta),v)=0 for all ξ\xi. If GG is a Lie group and the action is locally free, then HH is a vector bundle and qq restricts to an equivalence H→Θ×XTXH\to\Theta\times_XTX: a splitting of the relative tangent map, by the orthogonal complement of the orbits of 1.2(i).

Proof. (i) By 1.7, TΘ×TXTΘ≃T(G×Θ)=TG×TΘT\Theta\times_{TX}T\Theta\simeq T(G\times\Theta)=TG\times T\Theta, and the fibre product of qq with itself is the part of it over the diagonal Θ→Θ×XΘ≃G×Θ\Theta\to\Theta\times_X\Theta\simeq G\times\Theta, θ↦(e,θ)\theta\mapsto(e,\theta), which is g×TΘ\mathfrak{g}\times T\Theta: the Čech nerve of qq is the action groupoid of g\mathfrak{g}. The pullback of qq along the effective epimorphism Θ×XTΘ→Θ×XTX\Theta\times_XT\Theta\to\Theta\times_XTX is the map TG×TΘ→G×TΘTG\times T\Theta\to G\times T\Theta, which has a section, so qq is an effective epimorphism. (ii) is the restriction of (i) to the zero section. (iii) In a chart, by the Kock–Lawvere property, a tangent vector of GG at ee acts as x↦x+dF1(x)x\mapsto x+dF_1(x), and a tangent vector at θ\theta is d↦θ+dvd\mapsto\theta+dv; the composite is d↦θ+d (v+F1(θ))d\mapsto\theta+d\,(v+F_1(\theta)) since d2=0d^2=0, and F1(θ)=a(ξ,θ)F_1(\theta)=a(\xi,\theta). (iv) The map aa is linear in ξ\xi and injective on fibres, with image a subbundle EE. The action of g\mathfrak{g} on TΘT\Theta is free, its quotient is the vector bundle TΘ/ET\Theta/E, and H=E⊥H=E^\perp is a complement of EE. ◻

So the pullback to Θ\Theta of the tangent object of the quotient is the quotient of the complex g×Θ→TΘ\mathfrak{g}\times\Theta\to T\Theta, for every group object and without conditions on the action. A connection is a splitting of qq. A metric gives the subobject HH in every case, and HH is a splitting when the action is locally free. The next theorem is 1.3 in this generality: the group is an arbitrary group object of the model, the action need be neither free nor proper, and the quotient is a stack.

Theorem 1.10 (Positions in differential cohesion). Let H\mathbf{H} be the model, Θ\Theta a manifold with a Riemannian metric gg, GG a group object of H\mathbf{H} acting on Θ\Theta, p ⁣:Θ→X=Θ/ ⁣ ⁣/Gp\colon\Theta\to X=\Theta/\!\!/G, and L ⁣:Θ→RL\colon\Theta\to R.

  1. Objective and connection. L=ℓ∘pL=\ell\circ p for a unique ℓ ⁣:X→R\ell\colon X\to R if and only if L∘act=L∘prΘL\circ\mathrm{act}=L\circ\mathrm{pr}_\Theta. In that case g(∇L(θ),a(ξ,θ))=0g\bigl(\nabla L(\theta),a(\xi,\theta)\bigr)=0 on g×Θ\mathfrak{g}\times\Theta: the gradient is a section of HH.

  2. Exact part. For a point ξ\xi of g\mathfrak{g} let aξ=g(a(ξ,−),−)a_\xi=g(a(\xi,-),-), a 11-form on Θ\Theta. If aξ=dQξa_\xi=\mathrm{d}Q_\xi, then QξQ_\xi is constant along the gradient flow of every invariant LL.

  3. Invariant metric. If g(Tact(0h,v),Tact(0h,w))=g(v,w)g\bigl(T\mathrm{act}(0_h,v),T\mathrm{act}(0_h,w)\bigr)=g(v,w) on G×(TΘ×ΘTΘ)G\times(T\Theta\times_\Theta T\Theta) and LL is invariant, then ∇L\nabla L is equivariant, and there is a section σ\sigma of TX→XTX\to X with σ∘p=Tp∘∇L\sigma\circ p=Tp\circ\nabla L.

  4. Étale symmetry. If GG is coreduced, then g≃∗\mathfrak{g}\simeq\ast, parts (a) and (b) are empty, TΘ≃Θ×XTXT\Theta\simeq\Theta\times_XTX, and a vector field on Θ\Theta induces a section of TX→XTX\to X if and only if it is GG-equivariant.

  5. General symmetry. The objects aa, HH, aξa_\xi and QξQ_\xi of (a) and (b) depend on GG through G^\hat G only, and X≃X^/ ⁣ ⁣/ℑGX\simeq\hat X/\!\!/\Im G with ℑG\Im G coreduced and TX^≃X^×XTXT\hat X\simeq\hat X\times_XTX.

Proof. (a) RR is 00-truncated, so the first statement is 1.4(i). The differential of LL is dL=pr2∘TL ⁣:TΘ→R×R→R\mathrm{d}L=\mathrm{pr}_2\circ TL\colon T\Theta\to R\times R\to R, by the Kock–Lawvere property, and g(∇L,v)=dL(v)g(\nabla L,v)=\mathrm{d}L(v). Then dL(a(ξ,θ))=pr2T(L∘act)(ξ,0θ)=pr2T(L∘prΘ)(ξ,0θ)=pr2TL(0θ)=0.\mathrm{d}L\bigl(a(\xi,\theta)\bigr)=\mathrm{pr}_2T(L\circ\mathrm{act})(\xi,0_\theta)=\mathrm{pr}_2T(L\circ\mathrm{pr}_\Theta)(\xi,0_\theta)=\mathrm{pr}_2TL(0_\theta)=0 . (b) Along an integral curve of −∇L-\nabla L the derivative of QξQ_\xi is −dQξ(∇L)=−g(a(ξ,−),∇L)-\mathrm{d}Q_\xi(\nabla L)=-g(a(\xi,-),\nabla L), which vanishes by (a). (c) Write h∗=Tact(0h,−)h_*=T\mathrm{act}(0_h,-) for a generalised element hh of GG. For ww over hθh\theta, g(h∗∇L(θ),w)=g(∇L(θ),h∗−1w)=d(L∘h−1)(w)=dL(w)=g(∇L(hθ),w)g(h_*\nabla L(\theta),w)=g(\nabla L(\theta),h^{-1}_*w)=\mathrm{d}(L\circ h^{-1})(w)=\mathrm{d}L(w)=g(\nabla L(h\theta),w), so h∗∇L(θ)=∇L(hθ)h_*\nabla L(\theta)=\nabla L(h\theta) by the non-degeneracy of gg. Let GG act on TΘT\Theta through the zero section G→TGG\to TG, a homomorphism. For 00-truncated objects with an action of GG, a map that commutes with the actions is equivariant, by descent along ∗→BG\ast\to\mathbf{B}G; so ∇L\nabla L induces Θ/ ⁣ ⁣/G→TΘ/ ⁣ ⁣/G\Theta/\!\!/G\to T\Theta/\!\!/G, and σ\sigma is its composite with the map TΘ/ ⁣ ⁣/G→TΘ/ ⁣ ⁣/TG≃TXT\Theta/\!\!/G\to T\Theta/\!\!/TG\simeq TX induced by the zero section. The composite of σ\sigma with TX→XTX\to X is induced by the identity of Θ\Theta. (d) By 1.8(v), pp and all the face maps of its Čech nerve are formally étale, so by 1.6(iv) the simplicial object TCˇ(p)T\check C(p) is the pullback of TXTX along Cˇ(p)→X\check C(p)\to X. By descent [60] the sections of TX→XTX\to X are the sections of TΘ→ΘT\Theta\to\Theta with descent data. Since TG≃GTG\simeq G, the descent isomorphism over G×ΘG\times\Theta is (h,v)↦(h,h∗v)(h,v)\mapsto(h,h_*v), and for the 00-truncated objects Θ\Theta and TΘT\Theta a descent datum for a section is the property of equivariance. (e) The fibre of TG^→G^T\hat G\to\hat G over ee is g\mathfrak{g}, and the rest is 1.8(ii),(iii). ◻

Symmetries of a parameter space and the two parts of their atlases. For a coreduced group the Lie algebra is trivial and there is no function QξQ_\xi; the functions QξQ_\xi of a general group are those of its formal group.
symmetry GG coreduced g\mathfrak{g} X^\hat X the functions QξQ_\xi
permutations of units yes 00 Θ\Theta none
Z+αZ\mathbb{Z}+\alpha\mathbb{Z} acting on R\mathbb{R} yes 00 R\mathbb{R}, with X=TαX=T_{\alpha} none
rescalings (R>0)k(\mathbb{R}_{>0})^k no Rk\mathbb{R}^k Θ/ ⁣ ⁣/G^\Theta/\!\!/\hat G ∣win∣2−∣wout∣2\lvert w_{\mathrm{in}}\rvert^2-\lvert w_{\mathrm{out}}\rvert^2 per unit
GL⁡k\operatorname{GL}_k, linear layers no glk\mathfrak{gl}_k Θ/ ⁣ ⁣/G^\Theta/\!\!/\hat G W1W1T−W2TW2W_1W_1^{\mathsf{T}}-W_2^{\mathsf{T}}W_2
(R>0)k⋊Sk(\mathbb{R}_{>0})^k\rtimes S_k no Rk\mathbb{R}^k as above the same, permuted by SkS_k

The positions of 1.3 are recovered as follows. For a locally free action of a Lie group the restriction of gg to HH is a metric on the pullback Θ×XTX\Theta\times_XTX of the tangent stack. It is a descent datum when the maps induced by GG on HH are isometries, in particular in position (c), and it depends on the point of the fibre in general, which is the gauge dependence of 1.3(a). The slice of position (b) is a level set of the functions QξQ_\xi of part (b) together with 1.4(iii), and the projection of position (d) is the splitting of 1.9(iv).

Three consequences are recorded. First, the remark after Theorem 1.1, that a discrete symmetry gives no conserved quantity, is part (d): the atlas of a discrete symmetry is formally étale. Second, the irrational torus is the quotient of R\mathbb{R} by the coreduced group Z+αZ\mathbb{Z}+\alpha\mathbb{Z}, so R→Tα\mathbb{R}\to T_{\alpha} is a formally étale atlas, TTα≃Tα×RTT_{\alpha}\simeq T_{\alpha}\times R, and the vector fields on TαT_{\alpha} are the constants ([exo:tangent-Talpha]): the tangent object of a space on which every real function is constant is a line bundle with a one-dimensional space of sections. Third, for a network with rescaling and permutation symmetries the hypothesis space is reached in two steps, Θ→X^→X\Theta\to\hat X\to X. The first is the quotient by the formal group of the rescalings; the conservation laws and the choice of preconditioner of Acceleration are statements about it. The second is the quotient by the coreduced group ℑG\Im G, of which the permutations are a subgroup, and a dynamics descends along it when it is equivariant.

Two refinements follow: a description of all the conserved quantities, and of the vector fields with the same image under the relative tangent map qq.

Proposition 1.11 (All conserved quantities; compare [63). ]In the situation of 1.10, let Q ⁣:Θ→RQ\colon\Theta\to R.

  1. QQ is constant along the gradient flow of every invariant LL if and only if g(∇Q,∇L)=0g(\nabla Q,\nabla L)=0 for every invariant LL.

  2. If GG is a Lie group acting freely and properly, this holds if and only if dQ\mathrm{d}Q vanishes on HH, that is, if and only if dQ=g(a(ψ,−),−)\mathrm{d}Q=g(a(\psi,-),-) for a smooth map ψ ⁣:Θ→g\psi\colon\Theta\to\mathfrak{g}, which is then unique.

  3. In the case (ii) the conserved quantities are the first integrals of the distribution HH. Near a point where the Lie algebra of vector fields generated by the sections of HH has constant rank rr, there are dim⁡Θ−r\dim\Theta-r functionally independent ones and no more.

Proof. (i) The derivative of QQ at time 00 along the flow of −∇L-\nabla L through θ\theta is −g(∇Q,∇L)(θ)-g(\nabla Q,\nabla L)(\theta). (ii) XX is a manifold and pp a submersion, so every covector at p(θ)p(\theta) is the differential of a function ℓ\ell, and the gradients ∇(ℓ∘p)(θ)=dpθTdℓ\nabla(\ell\circ p)(\theta)=\mathrm{d}p_\theta^{\mathsf{T}}\mathrm{d}\ell span the orthogonal complement HθH_\theta of the kernel of dpθ\mathrm{d}p_\theta. So the condition of (i) is ∇Q(θ)∈Hθ⊥=a(g,θ)\nabla Q(\theta)\in H_\theta^\perp=a(\mathfrak{g},\theta) for all θ\theta, and ψ=a−1∘∇Q\psi=a^{-1}\circ\nabla Q is smooth because aa is an isomorphism of g×Θ\mathfrak{g}\times\Theta onto a subbundle. (iii) A function is a first integral of HH if and only if it is one of the involutive distribution generated by HH, whose leaves have dimension rr by the theorem of Frobenius. ◻

Part (iii) is the count of [63], made there for an arbitrary parametrisation in place of a quotient map, with the span of the gradients of its components in the place of HH, and with algorithms for the rank. The functions QξQ_\xi of 1.10(b) are the conserved quantities with constant ψ\psi. The others have two sources. A function of the QξQ_\xi has a non-constant ψ\psi. And a form aξa_\xi that is not closed may have an integrating factor: for the rotations of the punctured plane aA=r2 dφa_A=r^2\,\mathrm{d}\varphi, the line field HH is involutive, ψ=r−2A\psi=r^{-2}A, and the conserved quantity is the angle φ\varphi, with values in the circle ([exo:dc-angle]). For the rotations of R3∖{0}\mathbb{R}^3\setminus\{0\} part (i) gives the direction θ/∣θ∣\theta/\lvert \theta\rvert, with values in the sphere. So the curvature of the connection is the restriction of the forms daξ\mathrm{d}a_\xi to pairs of vectors of HH, and it is this restriction, not daξ\mathrm{d}a_\xi, that excludes a first integral and produces a holonomy.

Proposition 1.12 (Vector fields with the same image; compare [40). ]In the model, let a Lie group GG act on a manifold Θ\Theta and X=Θ/ ⁣ ⁣/GX=\Theta/\!\!/G. The sections of Θ×XTX→Θ\Theta\times_XTX\to\Theta form the groupoid whose objects are the vector fields on Θ\Theta and whose morphisms u→u′u\to u' are the smooth maps ψ ⁣:Θ→g\psi\colon\Theta\to\mathfrak{g} with u′=u+a(ψ,−)u'=u+a(\psi,-). In particular q∘u≃q∘u′q\circ u\simeq q\circ u' if and only if u′−u=a(ψ,−)u'-u=a(\psi,-) for some ψ\psi.

Proof. By 1.9(i), a section is a torsor P→ΘP\to\Theta for the group object g×Θ\mathfrak{g}\times\Theta over Θ\Theta with an equivariant map P→TΘP\to T\Theta over Θ\Theta. An effective epimorphism onto a manifold has sections over the members of an open cover, so PP is given by a Čech cocycle of smooth maps to the vector space g\mathfrak{g}, which is a coboundary by a partition of unity. For the trivial torsor an equivariant map is determined by the image uu of the unit section, and an automorphism of the trivial torsor is the translation by a map ψ\psi, which replaces uu by u+a(ψ,−)u+a(\psi,-) by 1.9(iii). ◻

Hence the part of an update that is tangent to the orbits is isomorphic to zero as a section, and for a locally free action an update and its projection to HH are isomorphic sections: this is position (d) of 1.3. For a compact Lie group the vector fields on the stack XX are the equivariant vector fields on Θ\Theta with the equivariant maps ψ\psi as morphisms [40]. These are the isomorphic vector fields of [51], and they form a Lie 22-algebra [13].

Scope. Lemma 1.6, Proposition 1.7, Theorem 1.8 and 1.9(i),(ii) hold in every H\mathbf{H} that satisfies (DC1)–(DC3). Proposition 1.9(iii),(iv) and Theorem 1.10, Proposition 1.11, Proposition 1.12 are statements in the model, in which manifolds, tangent bundles and Riemannian metrics are available. The properties of the model that are used are the Kock–Lawvere property, the two adjoints of TT and the full embedding of manifolds [25, 52, 76]. The first-order computations for the rescaling, rotation and translation actions are reproduced in exact arithmetic with dual numbers by checks.py.

Sources. The parts of this section are in the literature, in other contexts. The factorisation of 1.8(i) is the factorisation system of a modality [20]. The unit η\eta, along which X^\hat X is a pullback, is the map whose base change is the jet comonad of [50]. The map Θ→X^\Theta\to\hat X is a formal moduli problem under Θ\Theta, that is, a Lie algebroid in the sense of [31]. The tangent stack and its sections are those of [40, 13]. The conserved quantities of gradient flows are counted in [63] and attached to symmetries in [54, 84, 86]. They are combined in 1.10 and 1.2: a parameter symmetry is separated into a formal group, to which the connection and the conserved quantities belong, and a coreduced group, along which a dynamics descends when it is equivariant. This combination was not found in a search of the literature on parameter symmetries of networks and on differential cohesion made in November 2026.

Inductive theories

The same structure is present in the syntax of a theory presented by generators and relations. Let Σ\Sigma be a finitary signature, VV a set of variables, and W=TΣ(V)W=T_\Sigma(V) the set of terms: the free Σ\Sigma-algebra on VV, that is, the initial algebra of Y↦V+ΣYY\mapsto V+\Sigma Y, defined by induction. Let EE be a set of equations, ≈\approx the congruence on WW that it generates, and p ⁣:W⟶F=W/≈p\colon W\longrightarrow F=W/{\approx} the quotient, the free algebra of the theory T=(Σ,E)\mathbb T=(\Sigma,E). The finitely generated free algebras are the objects of the syntactic site of T\mathbb T, whose category of models is the category of T\mathbb T-algebras. The map pp is an atlas of the semantic object FF by the inductively defined object WW.

Proposition 1.13 (Descent of recursive definitions). Let AA be a Σ\Sigma-algebra, ρ ⁣:V→A\rho\colon V\to A a valuation, and fρ ⁣:W→Af_\rho\colon W\to A the unique homomorphism extending ρ\rho.

  1. If AA satisfies EE then fρf_\rho factors through pp. If VV is infinite and fρf_\rho factors through pp for every ρ\rho, then AA satisfies EE.

  2. Let a group Γ\Gamma act on VV, hence on WW by renaming, and on AA by automorphisms of Σ\Sigma-algebras. If ρ\rho is equivariant then fρf_\rho is equivariant.

Proof. (i) The kernel of fρf_\rho is a congruence; if AA satisfies EE it contains every substitution instance of every equation, hence ≈\approx. Conversely an equation of EE in variables of VV is a pair t≈t′t\approx t', and fρ(t)=fρ(t′)f_\rho(t)=f_\rho(t') for all ρ\rho is its validity in AA. (ii) For γ∈Γ\gamma\in\Gamma the map γA−1∘fρ∘γW\gamma_A^{-1}\circ f_\rho\circ\gamma_W is a homomorphism extending γA−1∘ρ∘γV=ρ\gamma_A^{-1}\circ\rho\circ\gamma_V=\rho; by uniqueness it is fρf_\rho. ◻

So for an inductively defined object the descent condition of 1.4(i) is checked one constructor at a time: the algebra must satisfy the equations, and the factorisation follows from the uniqueness of the recursion. This is the counterpart of the fact that the gradient of each sample is orthogonal to the orbits, so that no global verification is needed. In type theory the statement is the elimination rule of a quotient inductive type.

A slice of pp is a choice of normal forms: a map nf ⁣:W→W\mathrm{nf}\colon W\to W with nf(t)≈t\mathrm{nf}(t)\approx t and nf(t)=nf(t′)\mathrm{nf}(t)=\mathrm{nf}(t') whenever t≈t′t\approx t'. In sets a slice exists by choice. The obstruction is one of effectivity, as it was one of smoothness in [I, Theorem 11.4].

Theorem 1.14 (Computable slices). Let Σ\Sigma and VV be countable and EE recursively enumerable. The quotient p ⁣:W→Fp\colon W\to F has a computable slice if and only if the relation ≈\approx is decidable. Consequently, for a finitely presented theory with unsolvable word problem, pp is an atlas with no computable slice.

The proof is [exo:normal-forms].

The positions of 1.3 for the atlas of a theory by its syntax.
optimisation on a quotient syntax of an inductive theory
atlas Θ→Θ/ ⁣ ⁣/G\Theta\to\Theta/\!\!/G terms W→F=W/≈W\to F=W/{\approx}; sites of one topos; coded models of one theory
invariant objective function on terms that satisfies the equations; definable set (1.15)
slice Q=0Q=0 normal forms; normalisation by evaluation [12]; indices in place of names
move along the orbit rewriting to an equal term; extraction from an e-graph [83]; change of site [16]
invariant update definition by the eliminator of the quotient (1.13); nominal sets [72]
projection off the orbit focused proof search, in which no step permutes inference rules [5]
conserved quantity invariant of the rewriting relation; the universal one is FF
isotropy, no smooth slice undecidable equality, no computable slice (1.14)

For theories with relations and quantifiers the atlas is the space of models, and the quotient is the theory itself.

Theorem 1.15 (Theories as quotients; [47, 15, 59). ]

  1. Every Grothendieck topos is equivalent to the topos of equivariant sheaves on a localic groupoid; if it has enough points, on a topological groupoid of its points.

  2. For a countable first-order language, a Borel set of structures on N\mathbb{N} is invariant under the permutations of N\mathbb{N} if and only if it is the set of models of a sentence of Lω1ωL_{\omega_1\omega}.

Part (i) is the statement that the classifying topos of a theory is Θ/ ⁣ ⁣/G\Theta/\!\!/G for Θ\Theta a space of models and GG their isomorphisms; the first-order case with its syntactic reconstruction is [7]. Part (ii) is 1.4(i) for that atlas: a set of models descends to the theory exactly when it is invariant. In the absence of a 22-form the correspondence between symmetries and invariants is therefore of Galois type, invariance against definability, where Noether’s correspondence pairs a symmetry with a function. The quantitative statements of Acceleration, the preconditioner and the drift of order h2h^2, require a tangent structure on the atlas. A syntactic site of a differential calculus has one; such a signature, the layers of a network, is the subject of Semantics of differentiable programs. A bare algebraic theory has none, and there a cost on rewriting steps is an additional datum.

Solved exercises

Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.

1 Verify 1.1(i) for L(a,w)=12(aw−1)2L(a,w)=\tfrac12(aw-1)^2 and the rescaling group.

Solution.  The generator is A=diag(−1,1)A=\mathrm{diag}(-1,1), Aθ=(−a,w)A\theta=(-a,w), and μA(θ,p)=−apa+wpw\mu_A(\theta,p)=-ap_a+wp_w. On the graph of dL\mathrm{d}L, p=ρ (w,a)p=\rho\,(w,a) with ρ=aw−1\rho=aw-1, so μA=−aρw+wρa=0\mu_A=-a\rho w+w\rho a=0. ◀\blacktriangleleft

2 Compute aAa_A and daA\mathrm{d}a_A on R2\mathbb{R}^2 for the rescaling A=diag(−1,1)A=\mathrm{diag}(-1,1) and for the rotation A=(0−110)A=\bigl(\begin{smallmatrix}0&-1\\1&0\end{smallmatrix}\bigr), and describe the curves on which each vanishes.

Solution.  Rescaling: aA=−a da+w dw=d 12(w2−a2)a_A=-a\,\mathrm{d}a+w\,\mathrm{d}w=\mathrm{d}\,\tfrac12(w^2-a^2), closed, vanishing on the curves tangent to the hyperbolas w2−a2=constw^2-a^2=\mathrm{const}. Rotation: Aθ=(−w,a)A\theta=(-w,a), aA=−w da+a dw=r2 dφa_A=-w\,\mathrm{d}a+a\,\mathrm{d}w=r^2\,\mathrm{d}\varphi in polar coordinates, and daA=2 da∧dw\mathrm{d}a_A=2\,\mathrm{d}a\wedge\mathrm{d}w, twice the area form. The form vanishes on radial curves. No smooth function on the plane has the radial lines as its level sets, and the integral of aAa_A around a closed curve is twice the enclosed area. ◀\blacktriangleleft

2 Let WW be the words in two letters x,yx,y and ≈\approx the congruence generated by xy≈yxxy\approx yx. Give a slice, a function that descends and one that does not, and check 1.13(ii) for the exchange of the letters.

Solution.  FF is the free commutative monoid N2\mathbb{N}^2. Sorting the letters, nf(t)=xiyj\mathrm{nf}(t)=x^iy^j, is a slice. The homomorphism to (N,+)(\mathbb{N},+) with ρ(x)=ρ(y)=1\rho(x)=\rho(y)=1, the length, descends because (N,+)(\mathbb{N},+) is commutative. The identity homomorphism to the monoid of words does not: xyxy and yxyx are different words. The exchange of xx and yy acts on WW, and ρ\rho is equivariant for the trivial action on N\mathbb{N}, so the length is invariant under the exchange; the valuation ρ(x)=1\rho(x)=1, ρ(y)=2\rho(y)=2 is not equivariant, and the weighted length is not invariant. ◀\blacktriangleleft

2 In the model of 1.4, let Θ=R2∖{0}∋(w,v)\Theta=\mathbb{R}^2\setminus\{0\}\ni(w,v) with the Euclidean metric and G=R>0G=\mathbb{R}_{>0} acting by s⋅(w,v)=(sw,s−1v)s\cdot(w,v)=(sw,s^{-1}v). Compute aa, aξa_\xi, QξQ_\xi, HH and Θ×XTX\Theta\times_XTX. What changes for G′=R×G'=\mathbb{R}^\times acting by the same formula?

Solution.  g=R\mathfrak{g}=R and a(ξ,(w,v))=ξ (w,−v)a(\xi,(w,v))=\xi\,(w,-v), so aξ=ξ (w dw−v dv)=dQξa_\xi=\xi\,(w\,\mathrm{d}w-v\,\mathrm{d}v)=\mathrm{d}Q_\xi with Qξ=ξ2(w2−v2)Q_\xi=\tfrac\xi2(w^2-v^2), the invariant of Theorem 1.2(b). The map aa is injective on fibres since (w,v)≠0(w,v)\neq0, and H={(w˙,v˙):ww˙=vv˙}H=\{(\dot w,\dot v):w\dot w=v\dot v\} is a line bundle; by 1.9(iv), Θ×XTX≃H\Theta\times_XTX\simeq H. The action is free and not proper: the orbits of the points of the axes are not separated from the neighbouring hyperbolas, and XX is a non-Hausdorff manifold of dimension one. No part of 1.10 is affected. For G′=R>0×{±1}G'=\mathbb{R}_{>0}\times\{\pm1\} the kernel of TG′→G′TG'\to G' and the formal group are those of GG, so aa, QξQ_\xi, HH and X^\hat X are the same, and ℑG′=ℑG×{±1}\Im G'=\Im G\times\{\pm1\}: the second map ε\varepsilon is in addition a quotient by the sign, along which tangent objects are pulled back, and there is no further conserved quantity. ◀\blacktriangleleft

2 Determine all the quantities conserved by the gradient flows of the invariant functions for the rotations of Θ=R2∖{0}\Theta=\mathbb{R}^2\setminus\{0\}, and for the rescalings (a,w)↦(a/s,sw)(a,w)\mapsto(a/s,sw) of the quadrant a,w>0a,w>0.

Solution.  Both actions are free and proper, so 1.11(ii),(iii) apply, and HH is a line field, hence involutive, with r=1r=1: there is one independent conserved quantity. Rotations: aA=−y dx+x dy=r2 dφa_A=-y\,\mathrm{d}x+x\,\mathrm{d}y=r^2\,\mathrm{d}\varphi is not closed, HH is the radial line field, and dQ=ψ aA\mathrm{d}Q=\psi\,a_A holds for Q=F(φ)Q=F(\varphi) with FF periodic and ψ=F′(φ)/r2\psi=F'(\varphi)/r^2. The conserved quantities are the functions of the angle, for instance x/rx/r and y/ry/r, and the universal one is θ/∣θ∣\theta/\lvert \theta\rvert with values in the circle. Rescalings: aA=−a da+w dw=dQAa_A=-a\,\mathrm{d}a+w\,\mathrm{d}w=\mathrm{d}Q_A with QA=12(w2−a2)Q_A=\tfrac12(w^2-a^2), and the conserved quantities are the functions F(QA)F(Q_A), with ψ=F′(QA)\psi=F'(Q_A). In the first case no conserved quantity has constant ψ\psi; in the second the generator is QAQ_A. ◀\blacktriangleleft

3 For π(a,w)=aw\pi(a,w)=aw on the quadrant a,w>0a,w>0, compute the cometric CθC_\theta of 1.3(a) for the Euclidean metric and for the invariant metric g′=(da/a)2+(dw/w)2g'=(\mathrm{d}a/a)^2+(\mathrm{d}w/w)^2, and the projected gradient flows of ℓ(m)\ell(m).

Solution.  dπ=(w,a)\mathrm{d}\pi=(w,a). Euclidean: Cθ=w2+a2=2Q2+m2C_\theta=w^2+a^2=2\sqrt{Q^2+m^2}, which depends on the level QQ of the fibre point, and m˙=−2Q2+m2 ℓ′(m)\dot m=-2\sqrt{Q^2+m^2}\,\ell'(m); for ℓ=12(m−1)2\ell=\tfrac12(m-1)^2 this is Proposition 1.6(i). Invariant metric: the g′g'-gradient of LL is (a2∂aL, w2∂wL)(a^2\partial_aL,\ w^2\partial_wL), so a˙=−a2w ℓ′\dot a=-a^2w\,\ell', w˙=−w2a ℓ′\dot w=-w^2a\,\ell' and m˙=−2m2 ℓ′(m)\dot m=-2m^2\,\ell'(m): the cometric is C′=2m2C'=2m^2, a function on XX, and the projected flow is the same from every point of a fibre. The metric g′g' is invariant because da/a\mathrm{d}a/a and dw/w\mathrm{d}w/w are invariant under (a,w)↦(a/s,sw)(a,w)\mapsto(a/s,sw). ◀\blacktriangleleft

3 Prove 1.6.

Solution.  (i) ℑ\Im has the left adjoint ℜ\Re and the right adjoint &\&. TT has the left adjoint −×D-\times D and preserves colimits by (DC2). (ii) For every object UU, Map⁡(U,[D,ℑA])≃Map⁡(U×D,ℑA)≃Map⁡(ℜU×ℜD,A)≃Map⁡(ℜU,A)≃Map⁡(U,ℑA),\operatorname{Map}(U,[D,\Im A])\simeq\operatorname{Map}(U\times D,\Im A)\simeq\operatorname{Map}(\Re U\times\Re D,A)\simeq\operatorname{Map}(\Re U,A)\simeq\operatorname{Map}(U,\Im A), since ℜ\Re preserves finite products and ℜD≃∗\Re D\simeq\ast. The composite is induced by the projection U×D→UU\times D\to U, so the zero section ℑA→[D,ℑA]\Im A\to[D,\Im A] is an equivalence. (iii) Let f ⁣:A→Bf\colon A\to B be formally étale, b ⁣:B′→Bb\colon B'\to B and A′=A×BB′A'=A\times_BB'. Since ℑ\Im preserves pullbacks, B′×ℑB′ℑA′≃B′×ℑB′(ℑB′×ℑBℑA)≃B′×ℑBℑA≃B′×B(B×ℑBℑA)≃B′×BA=A′.B'\times_{\Im B'}\Im A'\simeq B'\times_{\Im B'}(\Im B'\times_{\Im B}\Im A)\simeq B'\times_{\Im B}\Im A\simeq B'\times_B(B\times_{\Im B}\Im A)\simeq B'\times_BA=A'. For coreduced AA and BB, B×ℑBℑA≃ℑA≃AB\times_{\Im B}\Im A\simeq\Im A\simeq A. (iv) TT preserves the pullback A≃B×ℑBℑAA\simeq B\times_{\Im B}\Im A, and by (ii) TℑA≃ℑAT\Im A\simeq\Im A and TℑB≃ℑBT\Im B\simeq\Im B, compatibly with the projections to the base. Hence TA≃TB×ℑBℑA≃TB×B(B×ℑBℑA)≃TB×BATA\simeq TB\times_{\Im B}\Im A\simeq TB\times_B(B\times_{\Im B}\Im A)\simeq TB\times_BA. ◀\blacktriangleleft

3 In the model, let Γ=Z+αZ\Gamma=\mathbb{Z}+\alpha\mathbb{Z} with α\alpha irrational act on R\mathbb{R} by translations. Prove that Γ\Gamma is coreduced, that R/ ⁣ ⁣/Γ\mathbb{R}/\!\!/\Gamma is the irrational torus TαT_{\alpha}, that TTα≃Tα×RTT_{\alpha}\simeq T_{\alpha}\times R, and that the sections of TTα→TαTT_{\alpha}\to T_{\alpha} are the constants. Describe their flows.

Solution.  Γ\Gamma is the coproduct of copies of the terminal object indexed by its elements, and ℑ\Im preserves coproducts and the terminal object; so Γ\Gamma is coreduced. The action is free, so the action groupoid is an equivalence relation and R/ ⁣ ⁣/Γ\mathbb{R}/\!\!/\Gamma is the 00-truncated quotient sheaf: a section over UU is given locally by a smooth map to R\mathbb{R}, up to locally constant maps to Γ\Gamma. Two smooth maps U→RU\to\mathbb{R} whose difference has values in the countable set Γ\Gamma differ by a locally constant map, so the quotient sheaf is concrete, and it is the diffeological quotient TαT_{\alpha}. By 1.7 and TΓ≃ΓT\Gamma\simeq\Gamma, TTα≃(R×R)/ ⁣ ⁣/ΓTT_{\alpha}\simeq(\mathbb{R}\times R)/\!\!/\Gamma with γ⋅(x,v)=(x+γ,v)\gamma\cdot(x,v)=(x+\gamma,v), the derivative of a translation being the identity; hence TTα≃Tα×RTT_{\alpha}\simeq T_{\alpha}\times R, in agreement with 1.10(d). A section is a map Tα→RT_{\alpha}\to R, that is, by 1.4(i), a smooth function on R\mathbb{R} invariant under the dense subgroup Γ\Gamma, a constant cc. The constant vector field cc on R\mathbb{R} is Γ\Gamma-equivariant, its flow x↦x+tcx\mapsto x+tc is equivariant, and by 1.4(ii) it induces the translation by the class of tctc on TαT_{\alpha}. ◀\blacktriangleleft

4 Prove 1.14.

Solution.  Fix a computable enumeration t0,t1,…t_0,t_1,\dots of WW. If nf\mathrm{nf} is a computable slice, then t≈t′t\approx t' if and only if nf(t)=nf(t′)\mathrm{nf}(t)=\mathrm{nf}(t'), and equality of terms is decidable; so ≈\approx is decidable. Conversely let ≈\approx be decidable and let nf(t)\mathrm{nf}(t) be the first tkt_k in the enumeration with tk≈tt_k\approx t. The search terminates because tt occurs in the enumeration, nf(t)≈t\mathrm{nf}(t)\approx t by construction, and t≈t′t\approx t' implies that the same tkt_k is found for both. The hypothesis that EE is recursively enumerable makes ≈\approx recursively enumerable in general, so that decidability is the only additional condition. For a finitely presented group or semigroup with unsolvable word problem ≈\approx is undecidable, and by the first part no computable slice exists. ◀\blacktriangleleft

4 Prove 1.8(ii) and (iii).

Solution.  (ii) By 1.7, ℑX≃ℑΘ/ ⁣ ⁣/ℑG\Im X\simeq\Im\Theta/\!\!/\Im G, so ℑp\Im p is a principal bundle for ℑG\Im G, and so is its pullback ε\varepsilon; hence X≃X^/ ⁣ ⁣/ℑGX\simeq\hat X/\!\!/\Im G. The bundle ℑp\Im p is classified by the map ℑX→BℑG\Im X\to\mathbf{B}\Im G, and ε\varepsilon by the composite X→ℑX→BℑGX\to\Im X\to\mathbf{B}\Im G, which by the naturality of η\eta is the composite of the classifying map X→BGX\to\mathbf{B}G of pp with BηG\mathbf{B}\eta_G. So X^≃X×BℑG∗≃(Θ/ ⁣ ⁣/G)×BG(BG×BℑG∗)≃(Θ/ ⁣ ⁣/G)×BG(ℑG/ ⁣ ⁣/G)≃(Θ×ℑG)/ ⁣ ⁣/G,\hat X\simeq X\times_{\mathbf{B}\Im G}\ast\simeq(\Theta/\!\!/G)\times_{\mathbf{B}G}(\mathbf{B}G\times_{\mathbf{B}\Im G}\ast)\simeq(\Theta/\!\!/G)\times_{\mathbf{B}G}(\Im G/\!\!/G)\simeq(\Theta\times\Im G)/\!\!/G, where GG acts on ℑG\Im G by translations through ηG\eta_G. If ηG\eta_G is an effective epimorphism, this action is transitive with stabiliser G^\hat G, so ℑG/ ⁣ ⁣/G≃BG^\Im G/\!\!/G\simeq\mathbf{B}\hat G and X^≃Θ/ ⁣ ⁣/G^\hat X\simeq\Theta/\!\!/\hat G. The object X^×XΘ\hat X\times_X\Theta is the pullback of the principal bundle ℑp\Im p along the composite Θ→ℑΘ→ℑX\Theta\to\Im\Theta\to\Im X, and the pullback of ℑp\Im p along itself is trivial: X^×XΘ≃Θ×ℑΘ(ℑΘ×ℑXℑΘ)≃Θ×ℑΘ(ℑG×ℑΘ)≃ℑG×Θ.\hat X\times_X\Theta\simeq\Theta\times_{\Im\Theta}(\Im\Theta\times_{\Im X}\Im\Theta)\simeq\Theta\times_{\Im\Theta}(\Im G\times\Im\Theta)\simeq\Im G\times\Theta . (iii) The map ε\varepsilon is formally étale by (i), so TX^≃X^×XTXT\hat X\simeq\hat X\times_XTX by 1.6(iv). Then Θ×X^TX^≃Θ×X^(X^×XTX)≃Θ×XTX\Theta\times_{\hat X}T\hat X\simeq\Theta\times_{\hat X}(\hat X\times_XTX)\simeq\Theta\times_XTX, and under this equivalence the relative tangent map of ee is that of p=ε∘ep=\varepsilon\circ e, since TT is a functor. ◀\blacktriangleleft

Semantics of differentiable programs

An architecture is a term of a signature of layers. The terms are an initial algebra, and three semantics are homomorphisms out of it: the denotation, a parametrised map; its image under the tangent functor T=[D,−]T=[D,-] of Differential cohesion; and the transposed tangent map. Forward and reverse differentiation are the second and the third, by the uniqueness of homomorphisms. A fourth homomorphism assigns to a term the symmetries of its parameter object, which are 22-cells, and with them the atlas, the connection and the conserved quantities of The general structure: descent along an atlas. A training step is then a position with respect to that atlas. The construction is executable: by a compiler to JAX the specifications of five published networks become optimizers whose forward and backward passes are arguments of one traced program, and every statement of the chapter that has a numerical form is measured on them. Derivatives that are composites of the two modes are evaluated by a plan of least cost.

Terms, the free category, and parametrised maps

Definition 1.1 (Signature of layers). A shape is a finite sequence of positive integers and a type is a finite sequence of shapes. The signature Σ\Sigma has the generators Dense(n)(n), Conv(c,k)(c,k), Act, MaxPool(k)(k), GlobalAvgPool, Flatten, BatchNorm, LayerNorm, Attention(h)(h), Downsample(c)(c) and Id, from one shape to one shape, the diagonal Copy from (s)(s) to (s,s)(s,s), the sum Add from (s,s)(s,s) to (s)(s), and two constructors, composition t ;t′t\,;t' and tensor t⊗t′t\otimes t'. The set WW of well-typed terms is the initial algebra of Σ\Sigma. Let ≈\approx be the congruence generated by the associativity and unit laws of the two constructors and the interchange law (t ;t′)⊗(s ;s′)≈(t⊗s) ;(t′⊗s′)(t\,;t')\otimes(s\,;s')\approx(t\otimes s)\,;(t'\otimes s'), and p ⁣:W→F=W/≈p\colon W\to F=W/{\approx} the quotient: FF is the set of morphisms of the free strict monoidal category on Σ\Sigma. The residual block is the derived term Res(t,s)=Copy ;(t⊗s) ;Add\mathrm{Res}(t,s)=\texttt{Copy}\,;(t\otimes s)\,;\texttt{Add}.

Definition 1.2 (Parametrised maps; [29, 23). ]Let H\mathbf{H} be the model of Differential cohesion. A 11-cell A→BA\to B of Para(H)\mathbf{Para}(\mathbf{H}) is a pair (P,f)(P,f) with f ⁣:P×A→Bf\colon P\times A\to B; the composite of (P,f)(P,f) and (Q,g)(Q,g) is (P×Q, (p,q,a)↦g(q,f(p,a)))(P\times Q,\ (p,q,a)\mapsto g(q,f(p,a))), and the tensor is the product. A 22-cell (P,f)⇒(P′,f′)(P,f)\Rightarrow(P',f') is a map r ⁣:P→P′r\colon P\to P' with f=f′∘(r×id)f=f'\circ(r\times\mathrm{id}). The symmetry group Aut⁡(P,f)\operatorname{Aut}(P,f) is the group of invertible 22-cells from (P,f)(P,f) to itself. For a subgroup GG the map ff is invariant, and for a 00-truncated BB it descends to (P/ ⁣ ⁣/G)×A→B(P/\!\!/G)\times A\to B by Proposition 1.4(i); the stack P/ ⁣ ⁣/GP/\!\!/G is the hypothesis stack.

The generators Act, x↦max⁡(x,αx)x\mapsto\max(x,\alpha x) with α≤1\alpha\le1, and MaxPool are continuous and piecewise linear. A point (θ,x)(\theta,x) is regular for a term if no argument of these generators lies on a locus of non-differentiability in the evaluation at (θ,x)(\theta,x); the regular points are an open set, invariant under all the group actions below, and dense for generic xx. The statements about tangent maps are statements at regular points.

Theorem 1.3 (Compilation). Let a 11-cell (Pσ,⟦σ⟧)(P_\sigma,\llbracket \sigma\rrbracket) of Para(H)\mathbf{Para}(\mathbf{H}) be given for every generator σ\sigma.

  1. There is a unique assignment t↦(Θt,⟦t⟧)t\mapsto(\Theta_t,\llbracket t\rrbracket) on WW that extends it and takes composition and tensor of terms to composition and tensor of 11-cells. It is the fold of Proposition 1.13.

  2. If t≈t′t\approx t', the reassociation of the product of the parameter objects is an invertible 22-cell (Θt,⟦t⟧)≅(Θt′,⟦t′⟧)(\Theta_t,\llbracket t\rrbracket)\cong(\Theta_{t'},\llbracket t'\rrbracket). Hence the fold induces a homomorphism of bicategories from the free monoidal category FF, with identity 22-cells, to Para(H)\mathbf{Para}(\mathbf{H}).

  3. The flattening nf ⁣:W→W\mathrm{nf}\colon W\to W of nested compositions and tensors, with deletion of identities, is a computable slice of pp for the associativity and unit laws, and with Θt\Theta_t the list of the parameter blocks of the generators of tt in order of occurrence, Θnf(t)=Θt\Theta_{\mathrm{nf}(t)}=\Theta_t and ⟦nf(t)⟧=⟦t⟧\llbracket \mathrm{nf}(t)\rrbracket=\llbracket t\rrbracket.

Proof. (i) is initiality. (ii) By Proposition 1.13(i) it suffices that the target satisfies the equations of 1.1, and composition and tensor of Para(H)\mathbf{Para}(\mathbf{H}) are associative and unital up to the associativity and unit isomorphisms of the product of H\mathbf{H}, which are 22-cells by definition. (iii) Flattening terminates, its result is equal for terms that differ by the two laws, and the order of occurrence of the generators is preserved; this is Theorem 1.14 for a decidable congruence. ◻

Four folds out of the initial algebra of terms. Each factors through the free category (Theorem 1.3, Theorem 1.4, Theorem 1.5), and a step of an optimizer is assembled from them and from a configuration read at run time (1.7).

Forward and reverse mode

Theorem 1.4 (Tangent and transpose). At regular points:

  1. T⟦t⟧T\llbracket t\rrbracket is the value at tt of the fold with generators T⟦σ⟧T\llbracket \sigma\rrbracket. Since TT preserves products and TRn≃Rn×RnTR^n\simeq R^n\times R^n, it is a map of pairs of a value and a tangent, the arithmetic of dual numbers.

  2. Let ⟦t⟧∗\llbracket t\rrbracket^* be the fold in which a generator is sent to the fibrewise transpose of T⟦σ⟧T\llbracket \sigma\rrbracket, a composite to the composite in the opposite order, Copy to the sum and Add to the diagonal. Then for all tangent vectors (θ˙,x˙)(\dot\theta,\dot x) and all cotangent vectors yˉ\bar y, ⟨T⟦t⟧(θ˙,x˙), yˉ⟩=⟨(θ˙,x˙), ⟦t⟧∗(yˉ)⟩.\bigl\langle T\llbracket t\rrbracket(\dot\theta,\dot x),\,\bar y\bigr\rangle=\bigl\langle(\dot\theta,\dot x),\,\llbracket t\rrbracket^*(\bar y)\bigr\rangle .

  3. For ℓ ⁣:B→R\ell\colon B\to R and L=ℓ∘⟦t⟧(−,x)L=\ell\circ\llbracket t\rrbracket(-,x), the gradient ∇L(θ)\nabla L(\theta) is the component along Θt\Theta_t of ⟦t⟧∗(∇ℓ)\llbracket t\rrbracket^*(\nabla\ell), and it is computed by one evaluation of each generator and one of each transpose.

Proof. (i) TT is a functor that preserves finite products (Lemma 1.6(i)), so t↦T⟦t⟧t\mapsto T\llbracket t\rrbracket takes composition and tensor of terms to composition and tensor; it is a homomorphism that agrees with the tangent fold on generators, and homomorphisms out of WW are unique. The identification TRn≃Rn×RnTR^n\simeq R^n\times R^n is the Kock–Lawvere property. (ii) Transposition is a contravariant functor on linear maps of Euclidean spaces that preserves products, the transpose of the diagonal is the sum, and the identity holds for generators by definition; both sides are homomorphisms. (iii) is (ii) with yˉ=∇ℓ\bar y=\nabla\ell and the chain rule. ◻

Part (i) is forward-mode and part (iii) reverse-mode differentiation. The argument is that of [26], and in axiomatic form of reverse derivative categories [21]; the lens form of (ii), with the parameter object, is in [23]. For a higher-order language with algebraic data types, forward-mode differentiation is characterised in [42] as the unique structure-preserving macro for a choice of derivatives of the basic operations, and its correctness is proved by a gluing construction over diffeological spaces, the category of Volume I, with a sketch of the extension to a continuation-based method. Part (i) is that characterisation for the first-order signature of 1.1; in the present chapter the language is first-order and the 22-cells are added.

Symmetries as 22-cells

Three local patterns of a term give automorphisms of its denotation (1.1). In each, LL and L′L' are linear generators, Dense or Conv.

The symmetry families read off a term, with the functions QQ of their symmetric generators. For the pair (Q,K)(Q,K) the matrix M2M_2 is the transpose of the key projection.
pattern in a composition group action QQ
L ;h1;… ;hm;L′L\,;h_1;\dots;h_m;L', the hih_i among Act, pooling, Flatten, one of them Act; also with a normalisation for LL (R>0)k⋊Sk(\mathbb{R}_{>0})^k\rtimes S_k channel jj of LL, weights and bias, times sjs_j; the weights of L′L' on channel jj times sj−1s_j^{-1} 12(∣wjin∣2+bj2−∣wjout∣2)\tfrac12\bigl(\lvert w^{\mathrm{in}}_j\rvert^2+b_j^2-\lvert w^{\mathrm{out}}_j\rvert^2\bigr)
L ;BatchNormL\,;\texttt{BatchNorm}, L ;LayerNormL\,;\texttt{LayerNorm} (R>0)k(\mathbb{R}_{>0})^k, R>0\mathbb{R}_{>0} channel cc of LL times scs_c; all of LL times ss 12∣Wc∣2\tfrac12\lvert W_c\rvert^2
Dense ;Dense; the pairs (Q,K)(Q,K) and (V,O)(V,O) of each head of Attention GL⁡k\operatorname{GL}_k M1↦M1gM_1\mapsto M_1g, M2↦g−1M2M_2\mapsto g^{-1}M_2 12(M1TM1−M2M2T)\tfrac12\bigl(M_1^{\mathsf{T}}M_1-M_2M_2^{\mathsf{T}}\bigr)

Theorem 1.5 (The symmetry fold). Let tt be a term and GtG_t the group generated by the families of 1.1 at all their occurrences in tt, with Lie algebra gt\mathfrak{g}_t and infinitesimal action aa.

  1. Gt⊆Aut⁡(Θt,⟦t⟧)G_t\subseteq\operatorname{Aut}(\Theta_t,\llbracket t\rrbracket), for every value α≤1\alpha\le1 of the slope of Act. The assignment t↦(Gt,a)t\mapsto(G_t,a) is defined by recursion on terms.

  2. For every ℓ\ell and every batch, L=ℓ∘⟦t⟧L=\ell\circ\llbracket t\rrbracket is GtG_t-invariant. Hence the output of the reverse fold is a section of Ht=a(gt)⊥H_t=a(\mathfrak{g}_t)^\perp, the functions QQ of 1.1 are constant along gradient flow, and a step θ+=θ−h∇L\theta^+=\theta-h\nabla L changes QAQ_A by h22⟨∇L,A∇L⟩\tfrac{h^2}2\langle\nabla L,A\nabla L\rangle.

  3. T⟦t⟧ (a(ξ,θ),0)=0T\llbracket t\rrbracket\,(a(\xi,\theta),0)=0 for ξ∈gt\xi\in\mathfrak{g}_t. Two updates uu, u′u' with u′−u=a(ψ,θ)u'-u=a(\psi,\theta) have the same image under T⟦t⟧T\llbracket t\rrbracket; in particular uu and its projection PHuP_Hu to HtH_t.

  4. The permutations ∏Sk\prod S_k are coreduced: they have no generator and no function QQ, and they are part of the formally étale map ε\varepsilon of Theorem 1.8.

Proof. (i) In the first pattern every hih_i acts on each channel separately and commutes with multiplication by a positive number, so the factor sjs_j passes from LL to the input of L′L', where it is cancelled; a permutation of the channels is cancelled in the same way. In the second, a normalisation is invariant under positive rescaling of each of its channels, respectively of its whole input. In the third the pair enters through the product M1M2M_1M_2; for the attention scores, (xMQ)(xMK)T=xMQg g−1MKTxT(xM_Q)(xM_K)^{\mathsf{T}}=xM_Qg\,g^{-1}M_K^{\mathsf{T}}x^{\mathsf{T}}. An automorphism of a factor of a composite or of a tensor is an automorphism of the whole, by the functoriality of whiskering in Para(H)\mathbf{Para}(\mathbf{H}), and the search for the patterns is a recursion on subterms. (ii) Invariance follows from (i), and the three consequences are Theorem 1.10(a),(b) and Theorem 1.2(c); the generators of the first two patterns and the symmetric elements of glk\mathfrak{gl}_k act by symmetric matrices. (iii) Differentiate ⟦t⟧(exp⁡(sξ)θ,x)=⟦t⟧(θ,x)\llbracket t\rrbracket(\exp(s\xi)\theta,x)=\llbracket t\rrbracket(\theta,x) at s=0s=0; the second statement follows by linearity, and u−PHuu-P_Hu lies in a(gt,θ)a(\mathfrak{g}_t,\theta), the orthogonal complement of HtH_t at θ\theta. (iv) A finite group is coreduced, and Theorem 1.8(v) and Theorem 1.10(d) apply. ◻

The group GtG_t is a subgroup of Aut⁡(Θt,⟦t⟧)\operatorname{Aut}(\Theta_t,\llbracket t\rrbracket) and in general a proper one: the permutations of the heads of an attention layer and the translations of the bias before a normalisation are further automorphisms. The hypothesis stack of the chapter is Xt=Θt/ ⁣ ⁣/GtX_t=\Theta_t/\!\!/G_t.

A training step as a position

Definition 1.6 (Configuration and step). Let b(θ)∈Gtb(\theta)\in G_t be a balancing element: b(θ)θb(\theta)\theta lies on the slice StS_t defined by Q=0Q=0 for the first and third patterns and ∣Wc∣=1\lvert W_c\rvert=1 for the second. A configuration cc consists of the slope α\alpha; a gauge exponent τ∈[0,1]\tau\in[0,1] and a return flag ρ∈[0,1]\rho\in[0,1]; a backward algebra, the transpose of 1.4 or the tangent fold along random directions [10], with weights for two substitutions in the transpose, fixed random matrices in place of transposed weights [57] and the identity in place of the transpose of Act [11]; a projection weight π∈[0,1]\pi\in[0,1]; and a rule, among gradient descent, heavy ball and Adam, with its constants and the step hh. The step UcU_c is θτ=b(θ)τθ,u=rule(backwardc(θτ)),u′=(1−π) u+π PHu,θτ+=θτ−h u′,Uc(θ)=b(θ)−τρ θτ+.\begin{aligned} \theta_\tau&=b(\theta)^\tau\theta, & u&=\text{rule}\bigl(\text{backward}_c(\theta_\tau)\bigr), & u'&=(1-\pi)\,u+\pi\,P_Hu,\\ \theta_\tau^+&=\theta_\tau-h\,u', & U_c(\theta)&=b(\theta)^{-\tau\rho}\,\theta_\tau^+ . \end{aligned}

Theorem 1.7 (Positions of the compiled step).

  1. Projection. For π=1\pi=1, every backward algebra and every rule, QA(θτ+)=QA(θτ)+h22⟨u′,Au′⟩Q_A(\theta_\tau^+)=Q_A(\theta_\tau)+\tfrac{h^2}2\langle u',Au'\rangle for the symmetric generators AA, and T⟦t⟧(u′,0)=T⟦t⟧(u,0)T\llbracket t\rrbracket(u',0)=T\llbracket t\rrbracket(u,0): the conserved quantities are preserved to first order in hh, and the first-order change of the function is that of the unprojected update.

  2. Slice. For τ=1\tau=1, ρ=0\rho=0, the forward pass is evaluated on the slice, and ⟦t⟧(θτ,−)=⟦t⟧(θ,−)\llbracket t\rrbracket(\theta_\tau,-)=\llbracket t\rrbracket(\theta,-).

  3. Invariant metric. Let τ=ρ=1\tau=\rho=1, with the transpose as backward algebra and gradient descent as rule, and let the slice intersect every orbit of GtG_t in one orbit of the subgroup KtK_t of the elements of GtG_t that are orthogonal. Then Uc(gθ)=g Uc(θ)U_c(g\theta)=g\,U_c(\theta) for g∈Gtg\in G_t at the points with trivial stabiliser, the step descends to an endomorphism of XtX_t, and the functions ⟦t⟧(Ucn(θ),−)\llbracket t\rrbracket(U_c^n(\theta),-) depend only on the class of θ\theta in XtX_t. They are the functions obtained in position (b).

  4. Run-time family. Theorem 1.3, Theorem 1.4, Theorem 1.5 hold for every configuration, and (c,θ)↦Uc(θ)(c,\theta)\mapsto U_c(\theta) is one map; the weights τ\tau, ρ\rho, π\pi and those of the substitutions interpolate between the positions.

Proof. (a) QA(θ−hu′)=QA(θ)−h⟨Aθ,u′⟩+h22⟨u′,Au′⟩Q_A(\theta-hu')=Q_A(\theta)-h\langle A\theta,u'\rangle+\tfrac{h^2}2\langle u',Au'\rangle and ⟨Aθ,u′⟩=aA(u′)=0\langle A\theta,u'\rangle=a_A(u')=0 on HtH_t; the second statement is 1.5(iii). (b) b(θ)∈Gtb(\theta)\in G_t and 1.5(i). (c) Let β(θ)=b(θ)θ\beta(\theta)=b(\theta)\theta and EE the Euclidean step, so that Uc(θ)=b(θ)−1E(β(θ))U_c(\theta)=b(\theta)^{-1}E(\beta(\theta)). By hypothesis β(gθ)=k β(θ)\beta(g\theta)=k\,\beta(\theta) with k∈Ktk\in K_t, that is, b(gθ) g=k b(θ)b(g\theta)\,g=k\,b(\theta), the stabiliser of θ\theta being trivial. The elements of KtK_t are isometries that preserve LL, so EE commutes with them (Theorem 1.10(c)), and Uc(gθ)=b(gθ)−1E(kβ(θ))=b(gθ)−1k E(β(θ))=g b(θ)−1E(β(θ))U_c(g\theta)=b(g\theta)^{-1}E(k\beta(\theta))=b(g\theta)^{-1}k\,E(\beta(\theta))=g\,b(\theta)^{-1}E(\beta(\theta)). The rest is Proposition 1.4(ii) and 1.5(i), and in position (b) the point is β(Ucn(θ))\beta(U_c^n(\theta)) up to KtK_t. (d) The slope enters 1.5(i) only through positive homogeneity, and the other entries of cc do not enter the forward fold. ◻

The step UcU_c of 1.6. The gauge move and its inverse are 22-cells and leave the denotation unchanged; under the projection an update is replaced by an isomorphic section in the sense of Proposition 1.12.

The compiler and its measurements

Definition 1.1, Definition 1.6 are implemented in JAX [14] in the package dprog, in the source of this volume. Terms are immutable records; nf is the flattening of 1.3(iii); fold is the homomorphism out of the terms, applied to three algebras, Primal, Tangent and Reverse, whose values on a generator are the JAX expression of the layer, its jvp and its vjp; families is the recursion of 1.5; in Symmetry are computed aa, the forms aξa_\xi by linear transposition, the projection PHP_H by conjugate gradients on the Gram operator of aa, the functions QQ, and the balancing elements, in closed form for each family and by alternating sweeps over the families; the value of compile is the step UcU_c as one traced function of the state, the batch and the configuration. Selections between algebras and rules are lax.switch on entries of cc, and all weights are traced numbers, so a change of configuration is not a new compilation.

def basic_block(c, stride):                       # He et al., CIFAR-10, shortcut option A
    body = Seq((Conv(c, 3, stride, bias=False), BatchNorm(), Act(),
                Conv(c, 3, bias=False), BatchNorm()))
    return Seq((Residual(body, Id() if stride == 1 else Downsample(c)), Act()))

def transformer_layer(d=512, heads=8, ff=2048):   # Vaswani et al., encoder layer
    return Seq((Residual(Attention(heads)), LayerNorm(),
                Residual(Seq((Dense(ff), Act(), Dense(d)))), LayerNorm()))

model = compile(transformer_layer(), (16, 512), loss="mse")          # one traced step
state = model.init(key)
cfg = default_cfg                                # every entry is read at run time
state, m = model.step(state, batch, cfg(lr=5e-4))                    # transpose, SGD
state, m = model.step(state, batch, cfg(lr=5e-4, tau=1.0, ret=1.0))  # invariant metric
state, m = model.step(state, batch, cfg(lr=5e-4, fa=1.0, proj=1.0))  # feedback alignment
state, m = model.step(state, batch, cfg(lr=1e-4, rule=2, bmode=1))   # tangent algebra, Adam
assert model.traces == 1
Two specifications and a compiled optimizer whose forward and backward passes are changed between steps.
Five published architectures as terms, with the dimension of the Lie algebra of the symmetries found by the fold of 1.5. The parameter counts follow from the published layer sizes.
specification input parameters rescaling normalisation GL⁡k\operatorname{GL}_k dim⁡gt\dim\mathfrak{g}_t
deep linear [6] 3232 448 0 0 128 128
LeNet-300-100 [56] 1×28×281\times 28\times 28 266 610 400 0 0 400
LeNet-5 [56] 1×32×321\times 32\times 32 61 706 226 0 0 226
ResNet-20 [38] 3×32×323\times 32\times 32 269 722 336 688 0 1 024
Transformer layer [81] 16×51216\times 512 3 152 384 2 048 0 65 536 67 584

The specifications are the deep linear network of [6], LeNet-300-100 and LeNet-5 [56] with rectified activations, ResNet-20 for CIFAR-10 [38] with batch normalisation [45] on batch statistics and the parameter-free shortcut, and the encoder layer of the base Transformer [81] with layer normalisation [8] (1.2). No data set is used: inputs are standard normal, and targets are produced by a fixed random network of the same architecture, labels for the classifiers and outputs for the two regressions. Arithmetic is in double precision.

Measured defects of the statements of this chapter, relative, one random point and batch of four per specification. Rows 1 to 4: 1.3(iii) and 1.4, the differences being central with step 10−610^{-6} in a random unit direction. Rows 5 to 10: 1.5. Rows 11 to 13: 1.7(b),(c); the last two rows compare the functions after one step from θ\theta and from gθg\theta for a random g∈Gtg\in G_t.
quantity deep linear LeNet-300-100 LeNet-5 ResNet-20 Transformer
⟦t⟧\llbracket t\rrbracket against ⟦t′⟧\llbracket t'\rrbracket, t′≈tt'\approx t 0 0 0 0 0
tangent algebra against differences 9.4e−109.4\mathrm{e}{-10} 1.6e−101.6\mathrm{e}{-10} 1.2e−91.2\mathrm{e}{-9} 4.0e−84.0\mathrm{e}{-8} 9.5e−79.5\mathrm{e}{-7}
reverse algebra against differences 9.4e−109.4\mathrm{e}{-10} 1.6e−101.6\mathrm{e}{-10} 1.2e−91.2\mathrm{e}{-9} 4.0e−84.0\mathrm{e}{-8} 9.5e−79.5\mathrm{e}{-7}
transposition, 1.4(ii) 1.4e−151.4\mathrm{e}{-15} 1.9e−161.9\mathrm{e}{-16} 1.9e−161.9\mathrm{e}{-16} 2.5e−152.5\mathrm{e}{-15} 1.3e−161.3\mathrm{e}{-16}
invariance under GtG_t 6.1e−166.1\mathrm{e}{-16} 6.2e−166.2\mathrm{e}{-16} 1.9e−151.9\mathrm{e}{-15} 1.1e−151.1\mathrm{e}{-15} 8.6e−168.6\mathrm{e}{-16}
invariance under permutations 0 4.4e−164.4\mathrm{e}{-16} 1.8e−151.8\mathrm{e}{-15} 5.4e−165.4\mathrm{e}{-16} 7.6e−167.6\mathrm{e}{-16}
∇L\nabla L in HH, Theorem 1.10(a) 1.2e−161.2\mathrm{e}{-16} 2.2e−172.2\mathrm{e}{-17} 3.0e−173.0\mathrm{e}{-17} 9.2e−179.2\mathrm{e}{-17} 6.2e−176.2\mathrm{e}{-17}
T⟦t⟧ a(ξ,θ)=0T\llbracket t\rrbracket\,a(\xi,\theta)=0 3.9e−163.9\mathrm{e}{-16} 1.1e−151.1\mathrm{e}{-15} 5.1e−165.1\mathrm{e}{-16} 8.1e−168.1\mathrm{e}{-16} 5.5e−165.5\mathrm{e}{-16}
aξ(PHu)a_\xi(P_Hu) relative to aξ(u)a_\xi(u) 3.5e−123.5\mathrm{e}{-12} 3.2e−123.2\mathrm{e}{-12} 1.5e−121.5\mathrm{e}{-12} 9.2e−129.2\mathrm{e}{-12} 4.2e−114.2\mathrm{e}{-11}
T⟦t⟧ uT\llbracket t\rrbracket\,u against T⟦t⟧ PHuT\llbracket t\rrbracket\,P_Hu 3.8e−163.8\mathrm{e}{-16} 1.5e−151.5\mathrm{e}{-15} 1.4e−151.4\mathrm{e}{-15} 1.9e−151.9\mathrm{e}{-15} 1.1e−151.1\mathrm{e}{-15}
QQ after the gauge move, relative 5.9e−85.9\mathrm{e}{-8} 8.4e−88.4\mathrm{e}{-8} 4.1e−44.1\mathrm{e}{-4} 1.1e−41.1\mathrm{e}{-4} 5.2e−155.2\mathrm{e}{-15}
step at gθg\theta against step at θ\theta: plain 3.4e−13.4\mathrm{e}{-1} 1.6e01.6\mathrm{e}{0} 8.0e−18.0\mathrm{e}{-1} 5.5e−25.5\mathrm{e}{-2} 6.5e−16.5\mathrm{e}{-1}
the same: invariant metric 7.4e−97.4\mathrm{e}{-9} 2.1e−82.1\mathrm{e}{-8} 5.3e−45.3\mathrm{e}{-4} 1.4e−71.4\mathrm{e}{-7} 5.5e−145.5\mathrm{e}{-14}

The verification is in 1.3. The reverse and tangent algebras agree with central differences to the accuracy of the differences, and with each other through the transposition identity to rounding. Invariance, the orthogonality of the gradient to the generators, and the vanishing of T⟦t⟧T\llbracket t\rrbracket on vertical vectors hold to rounding for all five terms. The balancing is exact when the families do not share parameter blocks, as in the Transformer layer, and is otherwise limited by the twelve alternating sweeps; the equivariance of the invariant-metric step has the same accuracy, against a defect of order one for the plain step.

Relative drift of the functions QQ over a fixed training time with step hh, and its ratio to the drift with step h/2h/2. A drift of order h2h^2 per step gives the ratio 22; a drift of order hh per step gives the ratio 11.
transpose feedback alignment the same, projected
specification drift ratio drift ratio drift ratio
deep linear 5.3e−35.3\mathrm{e}{-3} 2.3 5.0e−15.0\mathrm{e}{-1} 1.0 1.3e−21.3\mathrm{e}{-2} 2.0
LeNet-300-100 5.3e−55.3\mathrm{e}{-5} 2.1 2.3e−22.3\mathrm{e}{-2} 1.0 3.4e−43.4\mathrm{e}{-4} 2.0
LeNet-5 1.3e−41.3\mathrm{e}{-4} 2.6 4.6e−34.6\mathrm{e}{-3} 1.0 3.9e−43.9\mathrm{e}{-4} 2.1
ResNet-20 2.1e−52.1\mathrm{e}{-5} 2.2 6.3e−36.3\mathrm{e}{-3} 1.0 5.8e−55.8\mathrm{e}{-5} 2.0
Transformer layer 1.0e−31.0\mathrm{e}{-3} 2.2 8.5e−38.5\mathrm{e}{-3} 1.0 1.1e−31.1\mathrm{e}{-3} 2.2

[tab:drift] is 1.5(ii) and 1.7(a). For the transpose the drift is of second order per step. Feedback alignment is not a gradient, its update has a component along the orbits, and the drift is of first order; after projection it is again of second order.

Each specification compiled once and trained under eleven configurations given at run time. Within a column the transpose, feedback alignment and straight-through have one step size, the heavy ball a tenth of it, Adam its own, and the tangent algebra the first multiplied by four times the ratio of the number of directions to the number of parameters; the values are in demo.py.
configuration deep linear LeNet-300-100 LeNet-5 ResNet-20 Transformer
final loss, relative to the initial loss
reverse, SGD 0.0980 0.0662 0.0087 0.0371 0.0631
the same, slope 0.20.2 0.0980 0.0483 0.0089 0.0497 0.0561
on the slice (τ=1\tau=1) 0.126 0.0187 0.0046 0.0191 0.0812
invariant metric (τ=1\tau=1, returned) 0.126 0.0187 0.0046 0.0191 0.0812
projected, heavy ball 0.122 0.0689 0.0222 0.0826 0.302
Adam 0.409 3.2e−53.2\mathrm{e}{-5} 1.5e−41.5\mathrm{e}{-4} 3.4e−43.4\mathrm{e}{-4} 0.395
Adam, projected 0.408 3.1e−53.1\mathrm{e}{-5} 1.5e−41.5\mathrm{e}{-4} 3.3e−43.3\mathrm{e}{-4} 0.395
feedback alignment 0.189 0.522 0.0182 0.408 0.143
feedback alignment, projected 0.593 0.523 0.0183 0.406 0.144
straight-through 0.0980 0.0431 0.0107 0.0529 0.0655
tangent algebra, 88 directions 0.594 0.999 0.896 0.999 1.000
pairing of the update with the generators, ∣(aξ(u))ξ∣/∣u∣\lvert (a_\xi(u))_\xi\rvert/\lvert u\rvert, mean over the steps
reverse, SGD 3.5e−163.5\mathrm{e}{-16} 3.4e−173.4\mathrm{e}{-17} 2.9e−162.9\mathrm{e}{-16} 2.5e−162.5\mathrm{e}{-16} 1.1e−161.1\mathrm{e}{-16}
Adam 7.7e−17.7\mathrm{e}{-1} 1.5e−11.5\mathrm{e}{-1} 2.2e−12.2\mathrm{e}{-1} 9.9e−29.9\mathrm{e}{-2} 1.2e−11.2\mathrm{e}{-1}
Adam, projected 1.8e−111.8\mathrm{e}{-11} 7.6e−137.6\mathrm{e}{-13} 2.4e−132.4\mathrm{e}{-13} 8.1e−138.1\mathrm{e}{-13} 5.1e−125.1\mathrm{e}{-12}
feedback alignment 1.7e01.7\mathrm{e}{0} 9.5e−29.5\mathrm{e}{-2} 1.8e−11.8\mathrm{e}{-1} 8.5e−28.5\mathrm{e}{-2} 4.3e−24.3\mathrm{e}{-2}
feedback alignment, projected 1.9e−121.9\mathrm{e}{-12} 3.8e−133.8\mathrm{e}{-13} 2.6e−132.6\mathrm{e}{-13} 9.7e−139.7\mathrm{e}{-13} 1.4e−121.4\mathrm{e}{-12}
straight-through 3.5e−163.5\mathrm{e}{-16} 6.7e−26.7\mathrm{e}{-2} 6.0e−26.0\mathrm{e}{-2} 8.3e−28.3\mathrm{e}{-2} 2.6e−22.6\mathrm{e}{-2}
tangent algebra 1.1e01.1\mathrm{e}{0} 6.2e−26.2\mathrm{e}{-2} 1.2e−11.2\mathrm{e}{-1} 9.5e−29.5\mathrm{e}{-2} 2.1e−12.1\mathrm{e}{-1}
batch 64 32 128 8 4
steps 60 60 60 12 18
traces of the step 1 1 1 1 1
The same function at two points θ\theta and gθg\theta of a fibre. Under plain gradient descent the two losses separate; in the invariant-metric configuration they coincide (1.7(c)).
The configuration is changed twice during training, without a new trace: transpose with gradient descent, then feedback alignment with projection, then Adam with projection.

Four observations on 1.5 and fig:gauge, fig:switch. First, the rows of the slice and of the invariant metric are equal: the two configurations differ by a gauge transformation at every step (1.7(c)), and the loss is a function on XtX_t. Second, the update of Adam pairs with the generators at about a tenth of its norm or more, since the rule is not equivariant, and the removal of that part changes the final loss by a few percent at most, in agreement with 1.5(iii) to first order. Third, the same holds for feedback alignment except on the deep linear network, where the projected run is slower: the alignment of the forward weights with the feedback weights is a motion along the orbits of GL⁡k\operatorname{GL}_k, and it is removed by the projection. Fourth, the tangent algebra with eight random directions gives an unbiased estimate of the gradient whose variance is proportional to the number of parameters, and in these runs it reduces the loss of the network with 448448 parameters by two fifths, that of LeNet-5 by a tenth, and that of the three others by a thousandth or less.

Composition of the two modes

The tangent and the transpose are two homomorphisms. A derivative of a term, its Jacobian, a product with it, a second derivative, is a composite of both, and the composites with one value differ in cost. The choice among them is a choice of a term in a fibre of a quotient map, as in The general structure: descent along an atlas: the value is a function on the classes, the cost is a function on the terms. In the compiler the choice is made by a cost model, and by measurement where the model is indifferent.

Definition 1.8 (Linearisation and plans). The linearisation fold sends a term to a triple (y,push,pull)(y,\mathrm{push},\mathrm{pull}) at a point: one evaluation of the denotation, the linear map T⟦t⟧T\llbracket t\rrbracket at the point, and its transpose, obtained by transposition of the linear map. Let t=ℓ1;… ;ℓnt=\ell_1;\dots;\ell_n be a composition of links with interfaces of dimensions d0,…,dnd_0,\dots,d_n, linear maps LiL_i after linearisation, and costs cic_i of one application of a link, of its push or of its pull, and let Cij=ci+1+⋯+cjC_{ij}=c_{i+1}+\dots+c_j. An accumulation plan is a binary tree whose leaves are segments (i,j](i,j] marked F\mathrm F, the pushes of the did_i basis vectors, or R\mathrm R, the pulls of the djd_j basis covectors, and whose nodes are matrix products.

Theorem 1.9 (Accumulation plans).

  1. Every plan has the value Ln⋯L1L_n\cdots L_1.

  2. In the cost model F(i,j]↦diCij\mathrm F(i,j]\mapsto d_iC_{ij}, R(i,j]↦djCij\mathrm R(i,j]\mapsto d_jC_{ij}, product ↦μ djdkdi\mapsto\mu\,d_jd_kd_i, a plan of least cost is found by dynamic programming over the segments, in O(n3)O(n^3) operations.

  3. A product yˉTLn⋯L1\bar y^{\mathsf{T}}L_n\cdots L_1 with one covector costs at least C0nC_{0n}, and the reverse sweep attains it; a product Ln⋯L1vL_n\cdots L_1v with one vector costs at least C0nC_{0n}, and the forward sweep attains it. The transpose is optimal for the gradient of a loss and the tangent for a directional derivative.

  4. If dk≤min⁡(d0,dn)d_k\le\min(d_0,d_n) for an interior kk, the plan F(k,n]⋅R(0,k]\mathrm F(k,n]\cdot\mathrm R(0,k] costs dk C0n+μ dndkd0d_k\,C_{0n}+\mu\,d_nd_kd_0, and the cheaper pure plan costs min⁡(d0,dn) C0n\min(d_0,d_n)\,C_{0n}.

Proof. (i) By 1.4 a leaf is the matrix of the composite of its links, computed by columns or by rows, and the matrix product is associative. (ii) The least cost b(i,j)b(i,j) of a segment satisfies b(i,j)=min⁡(diCij, djCij, min⁡i<k<jb(i,k)+b(k,j)+μ djdkdi)b(i,j)=\min\bigl(d_iC_{ij},\,d_jC_{ij},\,\min_{i<k<j}b(i,k)+b(k,j)+\mu\,d_jd_kd_i\bigr). (iii) Every link is applied at least once, and each sweep applies every link once. (iv) The reverse sweep of the first kk links has dkd_k seeds, the forward sweep of the others has dkd_k seeds, and one product remains. ◻

The links are the factors of the top-level composition of the normal form. Inside a link, and for a term with shared subterms, the same question is the elimination problem on the graph of the generators, which is NP-complete [70]; the general theory is in [34].

Proposition 1.10 (Composites on one linearisation). Let JJ be the parameter part of the push at (θ,x)(\theta,x) for a batch xx, and HℓH_\ell the Hessian of the loss in the outputs, positive semidefinite with ∇ℓ\nabla\ell in its range, as for the two losses of this chapter.

  1. JTHℓJ=pull∘Hℓ∘pushJ^{\mathsf{T}}H_\ell J=\mathrm{pull}\circ H_\ell\circ\mathrm{push}. The gradient is one pull, and KK iterations of conjugate gradients for (JTHℓJ+λ) d=∇L(J^{\mathsf{T}}H_\ell J+\lambda)\,d=\nabla L use one evaluation of the denotation, KK pushes and K+1K+1 pulls.

  2. The Hessian-vector product is the tangent of the reverse fold, and it is also the transpose of the reverse fold paired with the vector.

  3. The iterates of (i) lie in HtH_t: the Gauss–Newton direction is a section of HtH_t, without projection.

  4. For λ→0\lambda\to0 and the limit dd of the iteration, HℓJdH_\ell Jd is the same at θ\theta and at gθg\theta for g∈Gtg\in G_t. For positive definite HℓH_\ell the first-order change of the outputs on the batch is a function on XtX_t.

Proof. (i) and (ii) are the definitions, the equality of pull and transposed push, and the symmetry of second derivatives. (iii) J a(ξ,θ)=0J\,a(\xi,\theta)=0 by 1.5(iii), so the symmetric operator M=JTHℓJ+λM=J^{\mathsf{T}}H_\ell J+\lambda maps a(gt,θ)a(\mathfrak{g}_t,\theta) to itself and its orthogonal complement HtH_t to itself; ∇L\nabla L is in HtH_t, and the iterates are in the span of the vectors Mm∇LM^m\nabla L. (iv) The action of gg is linear and ⟦t⟧(gθ,x)=⟦t⟧(θ,x)\llbracket t\rrbracket(g\theta,x)=\llbracket t\rrbracket(\theta,x), so J(gθ)∘g=J(θ)J(g\theta)\circ g=J(\theta), and J(gθ)J(g\theta) and J(θ)J(\theta) have the same range. With A=Hℓ1/2JA=H_\ell^{1/2}J and ∇ℓ=Hℓ1/2r\nabla\ell=H_\ell^{1/2}r, the limit dd is the solution of least norm of ATA d=ATrA^{\mathsf{T}}A\,d=A^{\mathsf{T}}r, so AdAd is the orthogonal projection of rr to the range of AA, which is the same at θ\theta and gθg\theta, and HℓJd=Hℓ1/2AdH_\ell Jd=H_\ell^{1/2}Ad. ◻

The interface dimensions of the fourteen links of the deep autoencoder and the plan of least cost for its Jacobian: reverse on the encoder, forward on the decoder (1.9(iv)).
Accumulation of the Jacobian of the denotation in its input, for one example (two for ResNet-20, whose normalisation couples the examples; an input of 2×5122\times512 for the Transformer layer). The three plans agree to rounding where they are evaluated; the forward plan of ResNet-20 is not evaluated.
dimensions cost in the model milliseconds
specification d0d_0 least dnd_n least-cost plan F\mathrm F R\mathrm R plan F\mathrm F R\mathrm R plan
deep linear 32 8 16 R(1..3) 1.4e41.4\mathrm{e}{4} 7.2e37.2\mathrm{e}{3} 7.2e37.2\mathrm{e}{3} 0.0644 0.146 0.157
LeNet-300-100 784 10 10 R(1..6) 2.1e82.1\mathrm{e}{8} 2.7e62.7\mathrm{e}{6} 2.7e62.7\mathrm{e}{6} 4.3 0.634 0.408
LeNet-5 1 024 10 10 R(1..12) 4.4e84.4\mathrm{e}{8} 4.3e64.3\mathrm{e}{6} 4.3e64.3\mathrm{e}{6} 153 2.75 2.73
ResNet-20 6 144 20 20 R(1..41) 5.1e115.1\mathrm{e}{11} 1.7e91.7\mathrm{e}{9} 1.7e91.7\mathrm{e}{9} – 292 301
Transformer layer 1 024 1 024 1 024 R(1..8) 6.5e96.5\mathrm{e}{9} 6.5e96.5\mathrm{e}{9} 6.5e96.5\mathrm{e}{9} 136 133 135
autoencoder 784 30 784 F(8..14) ⋅\cdot R(1..7) 2.2e92.2\mathrm{e}{9} 2.2e92.2\mathrm{e}{9} 1.0e81.0\mathrm{e}{8} 37.9 42.4 3.97
Composites of the two modes, medians of five evaluations on two processor cores, with the batches of 1.5 and 3232 examples for the autoencoder. The Gauss–Newton direction has K=10K=10 iterations.
milliseconds linear LeNet-300 LeNet-5 ResNet-20 Transf. autoenc.
gradient, the transpose 0.0761 0.841 43.9 205 12.4 11.8
Gauss–Newton direction, one linearisation 0.303 12.7 914 6 707 272 201
the same, the two folds inside the iteration 0.294 13.2 994 7 022 286 204
Hessian-vector product, tangent of the transpose 0.0834 1.54 93.5 513 30.7 19
the same, transpose of the transpose 0.0725 0.976 127 633 30.4 17.7
step, all branches evaluated 1.7 6.37 111 659 255 79.4
step, branches selected at run time 0.359 4.33 83.3 492 48.1 38.4
Gauss–Newton step 0.465 17.7 976 7 352 330 207
pairing of the Gauss–Newton direction with the generators 1.1e−141.1\mathrm{e}{-14} 1.4e−161.4\mathrm{e}{-16} 3.0e−153.0\mathrm{e}{-15} 2.2e−152.2\mathrm{e}{-15} 5.3e−165.3\mathrm{e}{-16} 5.9e−165.9\mathrm{e}{-16}
largest eigenvalue of the Hessian 128 33.3 608 46.8 2 040 68 000

The package contains the linearisation fold, the dynamic programme of 1.9(ii), the evaluation of plans, the Gauss–Newton direction as a third backward algebra of the step, selected at run time like the others, and both composites for the Hessian-vector product. A sixth specification is used here, the deep autoencoder 784784-10001000-500500-250250-3030 and back of [41], with the activation of the signature and a linear code layer; its bottleneck has the symmetry GL⁡30\operatorname{GL}_{30} of the third pattern.

Three measurements (tab:jac, tab:modes). First, for the autoencoder the plan of least cost is the mixed plan of 1.6; in the model the factor over the pure plans is 2121 and the measured factor is about ten, the matrix product being cheaper per multiplication than a sweep. For the classifiers the plan is the reverse sweep, and the forward sweep is slower by factors of about ten and fifty for the two LeNets; for the Transformer layer, of constant width, there is no difference in the model or in the measurement. Second, the step with branches selected at run time, in which the gauge move, its inverse and the substituted transpose are evaluated only when their weights are positive, is 1.31.3 to 5.35.3 times faster than the step of 1.5, in which they were always evaluated; the values are equal to rounding. Third, two choices are not separated by the model. The Gauss–Newton direction on one linearisation and the same iteration with both folds inside it take the same time within ten percent: the evaluations of the denotation inside the iteration do not depend on the iterate. The two composites for the Hessian-vector product differ by up to a factor 1.61.6, in either direction, and the choice between them is made by measurement (tune).

The Gauss–Newton direction pairs with the generators at rounding level, as in 1.10(iii). For 1.10(iv), on batches of four with 400400 iterations and damping 10−1010^{-10} of the largest eigenvalue, the defect of HℓJdH_\ell Jd between θ\theta and a random gθg\theta is 2.7e−92.7\mathrm{e}{-9} and 3.1e−93.1\mathrm{e}{-9} for the deep linear network and LeNet-300-100, against 2.2e−12.2\mathrm{e}{-1} and 1.4e01.4\mathrm{e}{0} for the gradient in place of dd. One step of length one in this direction reduces the loss of the five specifications without batch normalisation and increases that of ResNet-20 at the damping used.

Sources. Parametrised maps and their 22-cells are those of [29, 23], the two modes of differentiation as homomorphisms are in [26, 21], and forward mode as the unique structure-preserving macro, with semantics in diffeological spaces, is in [42]. The symmetries of 1.1 are known separately [54, 86, 24]. They are combined here with Differential cohesion: the symmetries are the 22-cells of the free construction, a backward pass is a position with respect to the atlas they define, and the configurations are one family of algebras over the same terms. The accumulation of Jacobians by mixed plans and its complexity are in [34, 70], the Hessian-vector product by composition of the modes in [71], and the Gauss–Newton direction by conjugate gradients in [66]; parts (iii) and (iv) of 1.10 relate it to the symmetries.

Solved exercises

Ratings: warm-up, computation, argument, proof-level. Every exercise is followed by a complete solution.

1 Write LeNet-300-100 as a term, compute its type and its number of parameters, and give the normal form of (Flatten ;(Dense(300) ;Id)) ;((Act ;Dense(100)) ;(Act ;Dense(10))).(\texttt{Flatten}\,;(\texttt{Dense}(300)\,;\texttt{Id}))\,;((\texttt{Act}\,;\texttt{Dense}(100))\,;(\texttt{Act}\,;\texttt{Dense}(10))).

Solution.  The term is Flatten ;Dense(300) ;Act ;Dense(100) ;Act ;Dense(10)\texttt{Flatten}\,;\texttt{Dense}(300)\,;\texttt{Act}\,;\texttt{Dense}(100)\,;\texttt{Act}\,;\texttt{Dense}(10), from the type ((1,28,28))((1,28,28)) to ((10))((10)), through the shapes (784)(784), (300)(300), (300)(300), (100)(100), (100)(100). The parameter blocks have 784⋅300+300784\cdot300+300, 300⋅100+100300\cdot100+100 and 100⋅10+10100\cdot10+10 entries, in total 266 610266\,610. The given term differs from it by the associativity and unit laws, so its normal form is the flat composition above, with the same three blocks in the same order. ◀\blacktriangleleft

2 Compute the tangent and the transpose of the residual block Res(t,Id)\mathrm{Res}(t,\texttt{Id}) from those of tt.

Solution.  ⟦Res(t,Id)⟧(θ,x)=⟦t⟧(θ,x)+x\llbracket \mathrm{Res}(t,\texttt{Id})\rrbracket(\theta,x)=\llbracket t\rrbracket(\theta,x)+x. The tangent fold gives (θ˙,x˙)↦T⟦t⟧(θ˙,x˙)+x˙(\dot\theta,\dot x)\mapsto T\llbracket t\rrbracket(\dot\theta,\dot x)+\dot x: the pair is copied by the diagonal and the tangents are added by the sum. In the transpose the order is reversed and the two structural generators are exchanged (1.4(ii)): a cotangent yˉ\bar y is copied by the transpose of the sum, the two copies are transported by ⟦t⟧∗\llbracket t\rrbracket^* and by the identity, and the results are added by the transpose of the diagonal: θˉ=⟦t⟧Θ∗(yˉ)\bar\theta=\llbracket t\rrbracket^*_\Theta(\bar y) and xˉ=⟦t⟧A∗(yˉ)+yˉ\bar x=\llbracket t\rrbracket^*_A(\bar y)+\bar y. ◀\blacktriangleleft

2 For the term Dense(k) ;Act ;Dense(m)\texttt{Dense}(k)\,;\texttt{Act}\,;\texttt{Dense}(m) verify the invariance of 1.5(i) directly, and show that it fails when Act is replaced by x↦log⁡(1+ex)x\mapsto\log(1+e^x).

Solution.  y=ϕ(xW1+b1)W2+b2y=\phi(xW_1+b_1)W_2+b_2 with ϕ(z)=max⁡(z,αz)\phi(z)=\max(z,\alpha z) applied to each coordinate. For a positive diagonal matrix ss, ϕ(zs)=ϕ(z)s\phi(zs)=\phi(z)s, so ϕ(xW1s+b1s) s−1W2=ϕ(xW1+b1)W2\phi(xW_1s+b_1s)\,s^{-1}W_2=\phi(xW_1+b_1)W_2. For ϕ=log⁡(1+ez)\phi=\log(1+e^z) and one hidden unit with x=0x=0, b1=0b_1=0: ϕ(0)=log⁡2\phi(0)=\log2 before and after the rescaling, and the output changes from w2log⁡2w_2\log2 to s−1w2log⁡2s^{-1}w_2\log2. No positively homogeneous function of degree one on R\mathbb{R} other than max⁡(c+z,c−z)\max(c_+z,c_-z) and min⁡(c+z,c−z)\min(c_+z,c_-z) exists, and it is smooth only when it is linear: the symmetry and the locus of non-differentiability come together. ◀\blacktriangleleft

2 A chain has two links of cost 10410^4 each and dimensions (d0,d1,d2)=(1000,10,1000)(d_0,d_1,d_2)=(1000,10,1000). Compute the costs of the three plans for its Jacobian with μ=1\mu=1, and of the product of the Jacobian with five vectors.

Solution.  F(0,2]\mathrm F(0,2] costs 1000⋅2⋅104=2⋅1071000\cdot2\cdot10^4=2\cdot10^7 and R(0,2]\mathrm R(0,2] the same. The mixed plan F(1,2]⋅R(0,1]\mathrm F(1,2]\cdot\mathrm R(0,1] costs 10⋅104+10⋅104+1000⋅10⋅1000=1.02⋅10710\cdot10^4+10\cdot10^4+1000\cdot10\cdot1000=1.02\cdot10^7, of which the matrix product is all but two percent: the sweeps are cheaper by a factor 100100, and the product is the remaining cost. For five vectors the forward sweep costs 5⋅2⋅104=1055\cdot2\cdot10^4=10^5 and no Jacobian is formed: with seeds of small rank at one end the pure sweep from that end is optimal, as in 1.9(iii). ◀\blacktriangleleft

3 Let L(W)L(W) be invariant under W↦sWW\mapsto sW, s>0s>0. Prove that ∇L(sW)=s−1∇L(W)\nabla L(sW)=s^{-1}\nabla L(W) and ⟨W,∇L(W)⟩=0\langle W,\nabla L(W)\rangle=0, that a step of gradient descent increases ∣W∣2\lvert W\rvert^2 by h2∣∇L∣2h^2\lvert \nabla L\rvert^2, and that the step of 1.7(c) is W+=W−h ∣W∣2 ∇L(W)W^+=W-h\,\lvert W\rvert^2\,\nabla L(W).

Solution.  Differentiating L(sW)=L(W)L(sW)=L(W) in WW gives s ∇L(sW)=∇L(W)s\,\nabla L(sW)=\nabla L(W), and in ss at s=1s=1 gives ⟨W,∇L(W)⟩=0\langle W,\nabla L(W)\rangle=0, which is Theorem 1.10(a) for the generator A=idA=\mathrm{id}. Then ∣W−h∇L∣2=∣W∣2+h2∣∇L∣2\lvert W-h\nabla L\rvert^2=\lvert W\rvert^2+h^2\lvert \nabla L\rvert^2, the drift of 1.5(ii) for Q=12∣W∣2Q=\tfrac12\lvert W\rvert^2. The balancing element is b=1/∣W∣b=1/\lvert W\rvert, the point on the slice is W/∣W∣W/\lvert W\rvert, the Euclidean step there is W/∣W∣−h ∇L(W/∣W∣)=W/∣W∣−h∣W∣ ∇L(W)W/\lvert W\rvert-h\,\nabla L(W/\lvert W\rvert)=W/\lvert W\rvert-h\lvert W\rvert\,\nabla L(W), and its transport by b−1=∣W∣b^{-1}=\lvert W\rvert is W−h∣W∣2∇L(W)W-h\lvert W\rvert^2\nabla L(W). This is the gradient step for the invariant metric ∣dW∣2/∣W∣2\lvert \mathrm{d}W\rvert^2/\lvert W\rvert^2. ◀\blacktriangleleft

3 For M1∈Rm×kM_1\in\mathbb{R}^{m\times k} and M2∈Rk×nM_2\in\mathbb{R}^{k\times n} of rank kk, let A=M1TM1A=M_1^{\mathsf{T}}M_1 and B=M2M2TB=M_2M_2^{\mathsf{T}}. Prove that there is a unique symmetric positive definite gg such that (M1g, g−1M2)(M_1g,\,g^{-1}M_2) is balanced, and that g2=A−1/2(A1/2BA1/2)1/2A−1/2g^2=A^{-1/2}\bigl(A^{1/2}BA^{1/2}\bigr)^{1/2}A^{-1/2}.

Solution.  The pair (M1g,g−1M2)(M_1g,g^{-1}M_2) is balanced when gAg=g−1Bg−1gAg=g^{-1}Bg^{-1}, that is, PAP=BPAP=B with P=g2P=g^2. Put Y=A1/2PA1/2Y=A^{1/2}PA^{1/2}; then PAP=BPAP=B is Y2=A1/2BA1/2Y^2=A^{1/2}BA^{1/2}. The right-hand side is symmetric positive definite and has a unique symmetric positive definite square root, so YY and P=A−1/2YA−1/2P=A^{-1/2}YA^{-1/2} are determined, and gg is the positive square root of PP. The matrix PP is the geometric mean of A−1A^{-1} and BB. This is the balancing element used by the compiler for the third pattern, and the uniqueness is the hypothesis of 1.7(c) for Kt=O⁡(k)K_t=\operatorname{O}(k). ◀\blacktriangleleft

4 Let uu be an update direction with aA(u)=⟨Aθ,u⟩≠0a_A(u)=\langle A\theta,u\rangle\neq0 for a symmetric generator AA at some point of a trajectory. Prove that over a fixed training time the drift of QAQ_A under θ+=θ−hu\theta^+=\theta-hu does not tend to 00 with hh in general, and that it is O(h)O(h) after projection, as in 1.4.

Solution.  One step changes QAQ_A by −h aA(u)+h22⟨u,Au⟩-h\,a_A(u)+\tfrac{h^2}2\langle u,Au\rangle. Over n=T/hn=T/h steps the first terms sum to −h∑iaA(ui)-h\sum_ia_A(u_i), a Riemann sum for −∫0TaA(u(θ(s))) ds-\int_0^Ta_A(u(\theta(s)))\,\mathrm{d}s along the limiting trajectory θ˙=−u(θ)\dot\theta=-u(\theta), which is non-zero unless the integral vanishes; this is the ratio 11 of the table. After projection aA(u′)=0a_A(u')=0 at every step by 1.7(a), and the drift is h22∑i⟨ui′,Aui′⟩≤h2 T ∥A∥ sup⁡∣u′∣2\tfrac{h^2}2\sum_i\langle u'_i,Au'_i\rangle\le\tfrac h2\,T\,\lVert A\rVert\,\sup\lvert u'\rvert^2, of order hh: the ratio 22. For the transpose u=∇Lu=\nabla L lies in HtH_t without projection (1.5(ii)), with the same bound. ◀\blacktriangleleft

4 Prove 1.7(c) for a single Dense ;Dense pair without the hypothesis on the slice, by proving the hypothesis.

Solution.  Let θ=(M1,M2)\theta=(M_1,M_2) of rank kk and h⋅θ=(M1h,h−1M2)h\cdot\theta=(M_1h,h^{-1}M_2) for h∈GL⁡kh\in\operatorname{GL}_k. The balanced points of the orbit are the points (M1g,g−1M2)(M_1g,g^{-1}M_2) with gT(M1TM1)g=g−1(M2M2T)g−Tg^{\mathsf{T}}(M_1^{\mathsf{T}}M_1)g=g^{-1}(M_2M_2^{\mathsf{T}})g^{-\mathsf T}. If gg is a solution then so is gkgk for k∈O⁡(k)k\in\operatorname{O}(k), and by the polar decomposition g=pkg=pk every solution is of this form with pp symmetric positive definite, which is unique by [exo:geomean]. So the slice intersects the orbit in one orbit of Kt=O⁡(k)K_t=\operatorname{O}(k), which is the hypothesis. For h∈GL⁡kh\in\operatorname{GL}_k the balancing element of h⋅θh\cdot\theta is the symmetric positive definite p′p' with hp′=b(θ)khp'=b(\theta)k for some k∈O⁡(k)k\in\operatorname{O}(k), by the same uniqueness applied to the orbit, so β(h⋅θ)\beta(h\cdot\theta) is the image of β(θ)\beta(\theta) under the element kk of KtK_t, the stabilisers are trivial because M1M_1 has rank kk, and the computation in the proof of 1.7 applies. The Euclidean step commutes with O⁡(k)\operatorname{O}(k) because the action of O⁡(k)\operatorname{O}(k) on pairs is orthogonal and the loss is invariant. ◀\blacktriangleleft

4 Prove that the direction of a damped Newton iteration, (∇2L+λ) d=∇L(\nabla^2L+\lambda)\,d=\nabla L solved by conjugate gradients, is not a section of HtH_t in general, in contrast with 1.10(iii).

Solution.  Differentiating ⟨∇L(θ),Aθ⟩=0\langle\nabla L(\theta),A\theta\rangle=0 in the direction uu gives ⟨∇2L u,Aθ⟩+⟨∇L,Au⟩=0\langle\nabla^2L\,u,A\theta\rangle+\langle\nabla L,Au\rangle=0, so ∇2L (Aθ)=−AT∇L\nabla^2L\,(A\theta)=-A^{\mathsf{T}}\nabla L for every generator AA: the Hessian maps the vertical vector AθA\theta to −AT∇L-A^{\mathsf{T}}\nabla L, which vanishes only when AT∇L=0A^{\mathsf{T}}\nabla L=0. So the vertical space is not invariant under ∇2L+λ\nabla^2L+\lambda, its orthogonal complement is not invariant either, and the second iterate, a combination of ∇L\nabla L and ∇2L ∇L\nabla^2L\,\nabla L, pairs with AθA\theta through ⟨∇2L ∇L,Aθ⟩=−⟨∇L,A∇L⟩\langle\nabla^2L\,\nabla L,A\theta\rangle=-\langle\nabla L,A\nabla L\rangle. For the rescaling generator this is ∣∇outL∣2−∣∇inL∣2\lvert \nabla_{\mathrm{out}}L\rvert^2-\lvert \nabla_{\mathrm{in}}L\rvert^2, the drift coefficient of 1.5(ii), non-zero in general. The Gauss–Newton operator differs from the Hessian by the term in the second derivative of the denotation, and it is that term that does not vanish on vertical vectors. ◀\blacktriangleleft

Coda

The argument in one page

A closed 22-form on a diffeological space is a map to the sheaf Ωcl2\Omega^{2}_{\mathrm{cl}}, and the symplectic diffeology of [1] is the study of the slice over that sheaf (Proposition 1.2). The moment map of [1] is defined for every group of automorphisms by transgression along orbits (Theorem 1.3, Theorem 1.4); for an invariant primitive it is the component along the group of the difference of the two pullbacks to G×XG\times X, that is, the obstruction to descent to the homotopy quotient (Proposition 1.6). A homogeneous space is fibred by its moment map over a coadjoint orbit, whose diffeology is a coimage (Theorem 1.2, Remark 1.3), and non-degeneracy is the injectivity of the universal moment map (Theorem 1.6).

One level up, Ωcl2\Omega^{2}_{\mathrm{cl}} is replaced by the stack B(TP)conn\mathbf{B}(T_{P})_{\mathrm{conn}} of bundles with connection for a torus of periods. The same three statements hold with the connection form λ\lambda in the place of the primitive: the moment map is the pullback of λ\lambda along orbits and is equivariant (Theorem 1.2); it vanishes exactly when the bundle descends to X/ ⁣ ⁣/GX/\!\!/G (Theorem 1.4); and on the zero level of a principal action everything descends to the quotient (Theorem 1.2). The proofs use one lemma, on 11-forms on a product (Lemma 1.11), and the description of principal actions of [I, Theorem 7.2]. No dimension, regularity or compactness enters, and the structure group may be an irrational torus (Theorem 1.5).

The applications use these statements at three levels of generality. For quasi-tori everything is explicit, and the invariants are arithmetic: ideals as groups of periods, Hilbert modular groups, Heisenberg quasi-nilmanifolds, the Weil pairing as a commutator (Theorem 1.2, Theorem 1.4, Theorem 1.1, Theorem 1.2). For manifolds with symmetry the statements are conservation laws and their discrete and reduced forms (Theorem 1.1, Theorem 1.2, Theorem 1.5, Theorem 1.1). And for composition the relevant fact is the existence of fibre products and quotients in Diff\mathsf{Diff} (Theorem 1.2, Theorem 1.6). In each chapter the content is concentrated in one example whose quotient is not a manifold: the torus of periods R/ab\mathbb{R}/\mathfrak{a}\mathfrak{b}, the prequantum bundle (S3×S3)/R(S^3\times S^3)/\mathbb{R}, the parameter quotient Θ/GL⁡k\Theta/\operatorname{GL}_k, the leaf space of the two-body system, the composite of non-transverse relations.

What these have in common is stated in The general structure: descent along an atlas. An objective on a quotient is a Lagrangian submanifold of the zero level of a moment map (Theorem 1.1); a dynamics on an atlas of the quotient is defined by a metric, whose exact part gives the conserved quantities and whose non-closed part gives the phases (Theorem 1.2); and the uses of a symmetry in optimisation are four positions with respect to the quotient map (Theorem 1.3, Acceleration). The part that uses no metric holds for every atlas in an ∞\infty-topos and, for the syntax of a theory, is the theory of normal forms (Proposition 1.4, Theorem 1.14). In a differentially cohesive ∞\infty-topos the atlas of a quotient is the composite of the quotient by a formal group, in which the tangent directions, the connection and the conserved quantities are located, and a formally étale map; the four positions hold there for every group object acting on a Riemannian manifold (Theorem 1.8, Theorem 1.10). The terms of an architecture are an initial algebra whose homomorphisms are the denotation, the two modes of differentiation and the symmetries; they are realised by a compiler to JAX, with the positions as run-time configurations of one optimizer (Theorem 1.3, Theorem 1.4, Theorem 1.5, Theorem 1.7). Composites of the two modes are evaluated by plans of least cost, and the Gauss–Newton direction is a section of the connection (Theorem 1.9, Proposition 1.10).

The sequence of structures of Part II and the three theorems.

Open questions

  1. Prequantisation of non-simply-connected spaces. Theorem 1.5 assumes π1(X)=0\pi_1(X)=0, and the general case is left open in [IZ, art. 8.42]. Theorem 1.4 is an example with π1=Z2d\pi_1=\mathbb{Z}^{2d}. Determine the set of lifts of ω ⁣:X→Ωcl2\omega\colon X\to\Omega^{2}_{\mathrm{cl}} to B(TP)conn\mathbf{B}(T_{P})_{\mathrm{conn}} for a diffeological space XX in terms of PωP_\omega, the toric periods and Hom⁡(π1(X),TP)\operatorname{Hom}(\pi_1(X),T_P).

  2. Quantisation without line bundles. By Proposition 1.11 a torus of periods with dense PP has no unitary character. Which representations of TPT_P on diffeological vector spaces produce a space of sections of a prequantum TPT_P-bundle on which Aut⁡(Y,λ)\operatorname{Aut}(Y,\lambda) acts and which for cyclic PP is the classical prequantum Hilbert space?

  3. Symplectic spaces that are not homogeneous. Transitivity of Diff⁡(X,ω)\operatorname{Diff}(X,\omega) is required in Definition 1.4 and fails for the cone orbifold. Formulate non-degeneracy for orbifolds and quasifolds so that the reduced spaces of Corollary 1.8 satisfy it.

  4. Shifted structures. The pair (Z/ ⁣ ⁣/G,ω∣Z)(Z/\!\!/G,\omega|_Z) of Theorem 1.6 is a stack with a closed 22-form. Compare it with the 00-shifted symplectic structure on the corresponding derived quotient, and extend Theorem 1.2, Theorem 1.4 to bundle gerbes with connection and closed 33-forms.

  5. Theta functions for real multiplication. The pairing ene_n of Theorem 1.4 has values in O/n\mathcal{O}/n. Construct the representation of the group GnG_n that corresponds to the space of theta functions of level nn, and relate it to the real multiplication programme of [62].

  6. Stochastic dynamics. Theorem 1.2(c) gives the drift of the gradient-flow invariants for full-batch descent. Compute the stationary distribution of QQ under stochastic gradient descent in terms of the covariance of the gradient noise restricted to the directions A∇LA\nabla L.

  7. Diophantine controllability. For the system of Theorem 1.3 the cost of approximate control is governed by the continued fraction of the inertia ratio. Classify the mechanical systems with flat mechanical connection whose leaf space is a quasifold, and bound the control cost by the Diophantine type of the holonomy group.

  8. Metrics on tangent stacks. In Theorem 1.10 the parameter space is a Riemannian manifold, and the cometric of Theorem 1.3(a) is defined on Θ×XTX\Theta\times_XTX for a locally free action. Define it for the complex g×Θ→TΘ\mathfrak{g}\times\Theta\to T\Theta of Proposition 1.9 when the rank of the infinitesimal action varies and when Θ\Theta is a microlinear object in place of a manifold, prove the statement of Kempf and Ness for the level set Q−1(0)Q^{-1}(0) in that generality, and determine which syntactic sites have an object DD that satisfies (DC2), so that the quantitative statements of Acceleration have analogues for inductive theories.

  9. Programs with recursion and higher order. The signature of Definition 1.1 is first-order and has no iteration. Extend Theorem 1.5, Theorem 1.7 to terms with weight sharing, iteration and recursion, where a parameter block occurs several times and the symmetry group of a composite is smaller than the product of those of its factors, and to the higher-order language of [42], with 22-cells in the gluing construction.

Formalisation

The statements of this volume fall into the three strata of [I, Chapter 14], by the infrastructure required (1.1). Stratum A requires sets, plots, real analysis and linear algebra. Stratum B requires sheaves and stacks on the site of Cartesian spaces. Stratum C requires the ∞\infty-topos H\mathbf{H}, and in practice the cohesive homotopy type theory of [78], in which the homotopy quotient and the classifying types are primitive; Differential cohesion requires in addition a modality ℑ\Im with the properties of Definition 1.5, and the theory of formally étale maps for a modality is developed in homotopy type theory in [20].

Most of the volume lies in stratum A: Theorem 1.2, Theorem 1.2 are statements about plots and forms whose proofs are finite computations with Lemma 1.11, and the application chapters are linear algebra over R\mathbb{R}, over number rings and over finite fields. The numerical claims of the examples are reproduced by checks.py, and the measurements of Semantics of differentiable programs by the test-suite of the package dprog. In a proof assistant the terms of Definition 1.1 are an inductive type and the four folds are definitions by recursion, so that Theorem 1.3, Theorem 1.4 are statements about a recursor and the compiler is a target of extraction.

A dictionary

In the first table the vocabulary of Chapters 7–9 of [1] is set beside the categorical vocabulary used here; the book is cited by article in the left column. Notation is listed in the second table.

here where
closed 22-form (9.1) map X→Ωcl2X\to\Omega^{2}_{\mathrm{cl}}; object of SmoothSet/Ωcl2\mathsf{SmoothSet}/\Omega^{2}_{\mathrm{cl}} Proposition 1.2
Diff⁡(X,ω)\operatorname{Diff}(X,\omega) (9.14) automorphism group in the slice Proposition 1.2
chain-homotopy operator KK (6.83) transgression to Paths⁡(X)\operatorname{Paths}(X) Theorem 1.8
momenta G∗\mathcal{G}^{*} (7.12) left-invariant maps G→Ω1G\to\Omega^1 Definition 1.1
paths moment map Ψ\Psi (9.1) transgression of ω\omega along G×[0,1]→XG\times[0,1]\to X Theorem 1.3
holonomy Γ\Gamma (9.7) obstruction to a G∗\mathcal{G}^{*}-valued moment map Theorem 1.4
moment map, exact case (9.11) component along GG of a∗α−pr∗αa^*\alpha-\mathrm{pr}^*\alpha Proposition 1.6
Souriau cocycle θ\theta (9.10) coadjoint action of the prequantum extension Example 1.6
(Γ,θ)(\Gamma,\theta)-coadjoint orbit (7.16, 9.18) coimage of the affine orbit map Remark 1.3
homogeneous symplectic space (9.19) μω\mu_\omega injective, Diff⁡(X,ω)\operatorname{Diff}(X,\omega) transitive Definition 1.4
torus T=R/ΓT=\mathbb{R}/\Gamma, form θ\theta (8.37) torus of periods TPT_P Definition 1.1
connection form on a TT-bundle (8.37) map X→B(TP)connX\to\mathbf{B}(T_{P})_{\mathrm{conn}} Proposition 1.3
integration bundle (8.42) lift of ω\omega through F ⁣:B(TP)conn→Ωcl2F\colon\mathbf{B}(T_{P})_{\mathrm{conn}}\to\Omega^{2}_{\mathrm{cl}} Theorem 1.5
symplectic irrational torus (9.30) (TΓ,ωΩ)(T_\Gamma,\omega_\Omega); Xa,bX_{\mathfrak{a},\mathfrak{b}} Theorem 1.2
— equivariant prequantisation; μ=y^∗λ\mu=\hat y^*\lambda Theorem 1.2
— descent to X/ ⁣ ⁣/GX/\!\!/G Theorem 1.4
— reduced space and bundle Theorem 1.2

Notation

symbol meaning
Diff\mathsf{Diff}, SmoothSet\mathsf{SmoothSet}, H\mathbf{H} diffeological spaces, sheaves on Cart\mathsf{Cart}, smooth ∞\infty-groupoids
Ωk\Omega^k, Ωcl2\Omega^{2}_{\mathrm{cl}} sheaf of kk-forms; sheaf of closed 22-forms
PSymp\mathsf{PSymp}, Corr\mathsf{Corr} parasymplectic spaces with form-preserving maps; with isotropic correspondences
X×ωX′X\times_\omega X', ⊞\boxplus, X‾\overline X product over Ωcl2\Omega^{2}_{\mathrm{cl}}; monoidal sum; opposite form
G∗\mathcal{G}^{*}, Ad⁡∗\operatorname{Ad}_* momenta of GG; coadjoint action
Ψ\Psi, ψ\psi, μ\mu, θ\theta, σ\sigma paths, two-points and one-point moment maps; Souriau cocycle and class
TP=R/PT_P=\mathbb{R}/P, θ\theta torus of periods and its canonical 11-form
B(TP)conn\mathbf{B}(T_{P})_{\mathrm{conn}}, FF stack of TPT_P-bundles with connection; curvature map
(Y,λ)(Y,\lambda), Aut⁡(Y,λ)\operatorname{Aut}(Y,\lambda) prequantum bundle; its automorphism group
x^\hat x, y^\hat y, p^\hat p orbit maps of a point of XX, of YY, of a path
X/ ⁣ ⁣/GX/\!\!/G, X/GX/G homotopy quotient in H\mathbf{H}; diffeological quotient
ZZ, X0X_0, Y0Y_0 zero level of μ\mu; reduced space; reduced bundle
TΓT_\Gamma, ωΩ\omega_\Omega quasi-torus Rn/Γ\mathbb{R}^n/\Gamma; the form induced by a constant form Ω\Omega
Xa,bX_{\mathfrak{a},\mathfrak{b}}, HB\mathsf{H}_B, Na,bN_{\mathfrak{a},\mathfrak{b}} R/a×R/b\mathbb{R}/\mathfrak{a}\times\mathbb{R}/\mathfrak{b}; Heisenberg group; its arithmetic subgroup
Λ#\Lambda^{\#}, ee, eNe_N symplectic dual lattice; commutator pairing; Weil pairing
bi∗b_i^*, JJ, RnR_n Gram–Schmidt vectors; antidiagonal symplectic matrix; reversal matrix
k\mathfrak{k}, s\mathfrak{s}, QAQ_A, μA\mu_A antisymmetric and symmetric parts of g\mathfrak{g}; gradient-flow invariant; momentum
aAa_A, CθC_\theta the 11-form ⟨Aθ,dθ⟩\langle A\theta,\mathrm{d}\theta\rangle; the cometric induced on the quotient from a point of the fibre
ℜ\Re, ℑ\Im, &\&; DD, TT reduction, infinitesimal shape and infinitesimal flat modalities; first-order infinitesimals; tangent functor [D,−][D,-]
X^\hat X, G^\hat G, aa, HH formal completion of a quotient along its atlas; formal group of GG; infinitesimal action; its orthogonal complement
WW, FF, nf\mathrm{nf} terms of a signature; free algebra of a theory; a choice of normal forms
⟦t⟧\llbracket t\rrbracket, ⟦t⟧∗\llbracket t\rrbracket^*, GtG_t, UcU_c denotation of a term; transposed tangent map; symmetries read off the term; step in the configuration cc
[I, …], [IZ, …] references to Volume I [2] and to [1]

References

  1. P. Iglesias-Zemmour, Diffeology, Mathematical Surveys and Monographs 185, American Mathematical Society, Providence, 2013.

  2. Diffeology in Higher Categories: concrete sheaves, cohesive shape, and stacks behind Iglesias-Zemmour’s Diffeology, Volume I of this series, Higher Categorical Semantics, 2026.

  3. R. Abraham and J. E. Marsden, Foundations of Mechanics, 2nd ed., Benjamin/Cummings, 1978.

  4. P.-A. Absil, R. Mahony and R. Sepulchre, Optimization Algorithms on Matrix Manifolds, Princeton University Press, 2008.

  5. J.-M. Andreoli, Logic programming with focusing proofs in linear logic, J. Logic Comput. 2 (1992), 297–347.

  6. S. Arora, N. Cohen and E. Hazan, On the optimization of deep networks: implicit acceleration by overparameterization, Proc. ICML 2018, PMLR 80, 244–253.

  7. S. Awodey and H. Forssell, First-order logical duality, Ann. Pure Appl. Logic 164 (2013), 319–348.

  8. J. L. Ba, J. R. Kiros and G. E. Hinton, Layer normalization, arXiv:1607.06450.

  9. J. C. Baez and B. Fong, A compositional framework for passive linear networks, Theory Appl. Categ. 33 (2018), 1158–1222.

  10. A. G. Baydin, B. A. Pearlmutter, D. Syme, F. Wood and P. Torr, Gradients without backpropagation, arXiv:2202.08587.

  11. Y. Bengio, N. Léonard and A. Courville, Estimating or propagating gradients through stochastic neurons for conditional computation, arXiv:1308.3432.

  12. U. Berger and H. Schwichtenberg, An inverse of the evaluation functional for typed λ\lambda-calculus, in Proc. LICS 1991, IEEE, 203–211.

  13. D. Berwick-Evans and E. Lerman, Lie 2-algebras of vector fields, Pacific J. Math. 309 (2020), no. 1, doi:10.2140/pjm.2020.309.1; arXiv:1609.03944.

  14. J. Bradbury, R. Frostig, P. Hawkins, M. J. Johnson, C. Leary, D. Maclaurin, G. Necula, A. Paszke, J. VanderPlas, S. Wanderman-Milne and Q. Zhang, JAX: composable transformations of Python+NumPy programs, software; version 0.12.1 is used here.

  15. C. Butz and I. Moerdijk, Representing topoi by topological groupoids, J. Pure Appl. Algebra 130 (1998), 223–235.

  16. O. Caramello, Theories, Sites, Toposes, Oxford University Press, 2017.

  17. W. Castryck and T. Decru, An efficient key recovery attack on SIDH, in EUROCRYPT 2023, LNCS 14008, Springer, 2023, 423–447.

  18. W. Castryck, T. Lange, C. Martindale, L. Panny and J. Renes, CSIDH: an efficient post-quantum commutative group action, in ASIACRYPT 2018, LNCS 11274, Springer, 2018, 395–427.

  19. J. Cervera, A. J. van der Schaft and A. Baños, Interconnection of port-Hamiltonian systems and composition of Dirac structures, Automatica 43 (2007), 212–225.

  20. F. Cherubini and E. Rijke, Modal descent, Math. Structures Comput. Sci. 31 (2021), 363–391; arXiv:2003.09713.

  21. R. Cockett, G. Cruttwell, J. Gallagher, J.-S. P. Lemay, B. MacAdam, G. Plotkin and D. Pronk, Reverse derivative categories, arXiv:1910.07065.

  22. G. J. Cooper, Stability of Runge–Kutta methods for trajectory problems, IMA J. Numer. Anal. 7 (1987), 1–13.

  23. G. S. H. Cruttwell, B. Gavranović, N. Ghani, P. Wilson and F. Zanasi, Categorical foundations of gradient-based learning, arXiv:2103.01931.

  24. S. S. Du, W. Hu and J. D. Lee, Algorithmic regularization in learning deep homogeneous models: layers are automatically balanced, in Advances in Neural Information Processing Systems 31 (2018).

  25. E. J. Dubuc, Sur les modèles de la géométrie différentielle synthétique, Cahiers Topologie Géom. Différentielle 20 (1979), 231–279; numdam:CTGDC_1979__20_3_231_0.

  26. C. Elliott, The simple essence of automatic differentiation, arXiv:1804.00746.

  27. D. Fiorenza, C. L. Rogers and U. Schreiber, L∞L_\infty-algebras of local observables from higher prequantum bundles, Homology Homotopy Appl. 16 (2014), 107–142.

  28. D. Fiorenza, C. L. Rogers and U. Schreiber, Higher U(1)U(1)-gerbe connections in geometric prequantization, Rev. Math. Phys. 28 (2016), 1650012.

  29. B. Fong, D. I. Spivak and R. Tuyéras, Backprop as functor: a compositional perspective on supervised learning, arXiv:1711.10455.

  30. P.-A. Fouque, J. Hoffstein, P. Kirchner, V. Lyubashevsky, T. Pornin, T. Prest, T. Ricosset, G. Seiler, W. Whyte and Z. Zhang, Falcon: Fast-Fourier lattice-based compact signatures over NTRU, specification v1.2, submission to the NIST post-quantum cryptography standardisation process, 2020.

  31. D. Gaitsgory and N. Rozenblyum, A Study in Derived Algebraic Geometry, Volume II: Deformations, Lie Theory and Formal Geometry, Mathematical Surveys and Monographs 221, American Mathematical Society, 2017.

  32. N. Gama, N. Howgrave-Graham and P. Q. Nguyen, Symplectic lattice reduction and NTRU, in EUROCRYPT 2006, LNCS 4004, Springer, 2006, 233–253.

  33. S. Greydanus, M. Dzamba and J. Yosinski, Hamiltonian neural networks, in Advances in Neural Information Processing Systems 32 (2019).

  34. A. Griewank and A. Walther, Evaluating Derivatives: Principles and Techniques of Algorithmic Differentiation, 2nd ed., SIAM, 2008.

  35. V. Guillemin and S. Sternberg, Some problems in integral geometry and some related problems in micro-local analysis, Amer. J. Math. 101 (1979), 915–955.

  36. G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 6th ed., Oxford University Press, 2008.

  37. S. Hayou, N. Ghosh and B. Yu, LoRA+: efficient low rank adaptation of large models, in Proc. ICML 2024.

  38. K. He, X. Zhang, S. Ren and J. Sun, Deep residual learning for image recognition, arXiv:1512.03385.

  39. B. Heo, S. Chun, S. J. Oh, D. Han, S. Yun, G. Kim, Y. Uh and J.-W. Ha, AdamP: slowing down the slowdown for momentum optimizers on scale-invariant weights, in Proc. ICLR 2021.

  40. R. Hepworth, Vector fields and flows on differentiable stacks, Theory Appl. Categ. 22 (2009), 542–587; arXiv:0810.0979.

  41. G. E. Hinton and R. R. Salakhutdinov, Reducing the dimensionality of data with neural networks, Science 313 (2006), 504–507; doi:10.1126/science.1127647.

  42. M. Huot, S. Staton and M. Vákár, Correctness of automatic differentiation via diffeologies and categorical gluing, arXiv:2001.02209.

  43. P. Iglesias-Zemmour, Example of singular reduction in symplectic diffeology, Proc. Amer. Math. Soc. 144 (2016), 1309–1324.

  44. P. Iglesias-Zemmour, The moment maps in diffeology, Mem. Amer. Math. Soc. 207 (2010), no. 972.

  45. S. Ioffe and C. Szegedy, Batch normalization: accelerating deep network training by reducing internal covariate shift, arXiv:1502.03167.

  46. G. Jeffreys and S.-C. Lau, Kähler geometry of quiver varieties and machine learning, preprint.

  47. A. Joyal and M. Tierney, An extension of the Galois theory of Grothendieck, Mem. Amer. Math. Soc. 51 (1984), no. 309.

  48. Y. Karshon and J. Watts, Basic forms and orbit spaces: a diffeological approach, SIGMA 12 (2016), 026.

  49. G. Kempf and L. Ness, The length of vectors in representation spaces, in Algebraic Geometry (Copenhagen 1978), Lecture Notes in Math. 732, Springer, 1979, 233–243.

  50. I. Khavkine and U. Schreiber, Synthetic geometry of differential equations: I. Jets and comonad structure, arXiv:1701.06238.

  51. S. Klajbor-Goderich, Nonlinear stability of relative equilibria and isomorphic vector fields, SIGMA 14 (2018), 021; arXiv:1707.02828.

  52. A. Kock, Synthetic Differential Geometry, 2nd ed., London Mathematical Society Lecture Note Series 333, Cambridge University Press, 2006; doi:10.1017/CBO9780511550812.

  53. B. Kostant, Quantization and unitary representations, in Lectures in Modern Analysis and Applications III, Lecture Notes in Math. 170, Springer, 1970, 87–208.

  54. D. Kunin, J. Sagastuy-Brena, S. Ganguli, D. L. K. Yamins and H. Tanaka, Neural mechanics: symmetry and broken conservation laws in deep learning dynamics, in Proc. ICLR 2021.

  55. T. van Laarhoven, L2 regularization versus batch and weight normalization, preprint, arXiv:1706.05350.

  56. Y. LeCun, L. Bottou, Y. Bengio and P. Haffner, Gradient-based learning applied to document recognition, Proc. IEEE 86 (1998), 2278–2324.

  57. T. P. Lillicrap, D. Cownden, D. B. Tweed and C. J. Akerman, Random feedback weights support learning in deep neural networks, arXiv:1411.0247.

  58. K. Lindsey and G. Menon, Regularization implies balancedness in the deep linear network, preprint, arXiv:2511.01137.

  59. E. G. K. Lopez-Escobar, An interpolation theorem for denumerably long formulas, Fund. Math. 57 (1965), 253–272.

  60. J. Lurie, Higher Topos Theory, Annals of Mathematics Studies 170, Princeton University Press, 2009.

  61. L. Maino, C. Martindale, L. Panny, G. Pope and B. Wesolowski, A direct key recovery attack on SIDH, in EUROCRYPT 2023, LNCS 14008, Springer, 2023, 448–471.

  62. Yu. I. Manin, Real multiplication and noncommutative geometry, in The Legacy of Niels Henrik Abel, Springer, 2004, 685–727.

  63. S. Marcotte, R. Gribonval and G. Peyré, Abide by the law and follow the flow: conservation laws for gradient flows, in Advances in Neural Information Processing Systems 36 (2023); arXiv:2307.00144.

  64. J. E. Marsden and A. Weinstein, Reduction of symplectic manifolds with symmetry, Rep. Math. Phys. 5 (1974), 121–130.

  65. J. E. Marsden, R. Montgomery and T. Ratiu, Reduction, symmetry, and phases in mechanics, Mem. Amer. Math. Soc. 88 (1990), no. 436.

  66. J. Martens, Deep learning via Hessian-free optimization, in Proceedings of the 27th International Conference on Machine Learning, 2010.

  67. J. Milnor, Introduction to Algebraic K-Theory, Annals of Mathematics Studies 72, Princeton University Press, 1971.

  68. R. Montgomery, Gauge theory of the falling cat, in Dynamics and Control of Mechanical Systems, Fields Inst. Commun. 1, Amer. Math. Soc., 1993, 193–218.

  69. D. Mumford, On the equations defining abelian varieties I, Invent. Math. 1 (1966), 287–354.

  70. U. Naumann, Optimal Jacobian accumulation is NP-complete, Math. Program. 112 (2008), 427–441; doi:10.1007/s10107-006-0042-z.

  71. B. A. Pearlmutter, Fast exact multiplication by the Hessian, Neural Comput. 6 (1994), 147–160.

  72. A. M. Pitts, Nominal Sets: Names and Symmetry in Computer Science, Cambridge University Press, 2013.

  73. R. W. Richardson and P. J. Slodowy, Minimum vectors for real reductive algebraic groups, J. London Math. Soc. 42 (1990), 409–429.

  74. D. Robert, Breaking SIDH in polynomial time, in EUROCRYPT 2023, LNCS 14008, Springer, 2023, 472–503.

  75. A. van der Schaft and D. Jeltsema, Port-Hamiltonian systems theory: an introductory overview, Found. Trends Syst. Control 1 (2014), 173–378.

  76. U. Schreiber, Differential cohomology in a cohesive ∞\infty-topos, arXiv:1310.7930.

  77. A. Shapere and F. Wilczek, Geometry of self-propulsion at low Reynolds number, J. Fluid Mech. 198 (1989), 557–585.

  78. M. Shulman, Brouwer’s fixed-point theorem in real-cohesive homotopy type theory, Math. Structures Comput. Sci. 28 (2018), 856–941.

  79. J.-M. Souriau, Structure des systèmes dynamiques, Dunod, Paris, 1970.

  80. T. Tong, C. Ma and Y. Chi, Accelerating ill-conditioned low-rank matrix estimation via scaled gradient descent, J. Mach. Learn. Res. 22 (2021), no. 150.

  81. A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser and I. Polosukhin, Attention is all you need, arXiv:1706.03762.

  82. A. Weinstein, The symplectic “category”, in Differential Geometric Methods in Mathematical Physics, Lecture Notes in Math. 905, Springer, 1982, 45–51.

  83. M. Willsey, C. Nandi, Y. R. Wang, O. Flatt, Z. Tatlock and P. Panchekha, egg: fast and extensible equality saturation, Proc. ACM Program. Lang. 5 (2021), POPL, article 23.

  84. B. Zhao, I. Ganev, R. Walters, R. Yu and N. Dehmamy, Symmetries, flat minima, and the conserved quantities of gradient flow, in Proc. ICLR 2023, arXiv:2210.17216.

  85. B. Zhao, N. Dehmamy, R. Walters and R. Yu, Symmetry teleportation for accelerated optimization, in Advances in Neural Information Processing Systems 35 (2022).

  86. B. Zhao, R. Walters and R. Yu, Symmetry in neural network parameter spaces, preprint, arXiv:2506.13018.

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{\VolI}[1]{\textup{[I,\,#1]}}
\newcommand{\Gs}{\mathcal{G}^{*}}
\newcommand{\Hs}{\mathcal{H}^{*}}
\newcommand{\Omcl}{\Om^{2}_{\mathrm{cl}}}
\newcommand{\BTc}{\B(T_{P})_{\mathrm{conn}}}
\newcommand{\Symp}{\operatorname{Symp}}
\newcommand{\Ham}{\operatorname{Ham}}
\newcommand{\Sp}{\operatorname{Sp}}
\newcommand{\Ad}{\operatorname{Ad}}
\newcommand{\Heis}{\mathsf{H}}
\newcommand{\Norm}{\operatorname{Norm}}
\newcommand{\Cl}{\operatorname{Cl}}
\newcommand{\tr}{\operatorname{tr}}
\newcommand{\OK}{\mathcal{O}}
\newcommand{\fa}{\mathfrak{a}}
\newcommand{\fb}{\mathfrak{b}}
\newcommand{\fc}{\mathfrak{c}}
\newcommand{\fp}{\mathfrak{p}}
\newcommand{\fq}{\mathfrak{q}}
\newcommand{\fg}{\mathfrak{g}}
\newcommand{\fk}{\mathfrak{k}}
\newcommand{\fpp}{\mathfrak{s}}
\newcommand{\red}{\mathrm{red}}
\newcommand{\transp}{^{\mathsf{T}}}
\newcommand{\ParaSymp}{\cat{PSymp}}
\newcommand{\rel}{\nrightarrow}
\newcommand{\sem}[1]{\llbracket #1\rrbracket}
\newcommand{\Para}{\mathbf{Para}}



\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 \textperiodcentered\ Volume II}\par
\vspace{2.0cm}
{\fontsize{32}{38}\selectfont\bfseries\color{hcsteal} Symplectic Diffeology in\\[0.35ex] Higher Categories\par}
\vspace{0.9cm}
{\Large\color{hcsink} Moment maps, prequantisation, and reduction\\[0.3ex]
behind Chapter~9 of 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.2cm}
\begin{tikzpicture}[x={(1cm,0cm)},y={(0.45cm,0.32cm)},z={(0cm,1cm)},scale=2.15]
    \fill[hcsmist] (0,0,0)--(3.2,0,0)--(3.2,3.2,0)--(0,3.2,0)--cycle;
  \foreach \i in {0,0.8,...,3.21}{\draw[hcsteal!35,line width=0.3pt] (\i,0,0)--(\i,3.2,0); \draw[hcsteal!35,line width=0.3pt] (0,\i,0)--(3.2,\i,0);}
    \fill[hcsgold!45] (0.8,0.8,0)--(2.4,0.8,0)--(2.4,2.4,0)--(0.8,2.4,0)--cycle;
  \draw[hcsink,line width=0.9pt,->] (0.8,0.8,0)--(2.4,0.8,0);
  \draw[hcsink,line width=0.9pt,->] (2.4,0.8,0)--(2.4,2.4,0);
  \draw[hcsink,line width=0.9pt,->] (2.4,2.4,0)--(0.8,2.4,0);
  \draw[hcsink,line width=0.9pt,->] (0.8,2.4,0)--(0.8,0.8,0);
  \node[hcsink,font=\small] at (1.6,1.6,0) {$\int\omega$};
    \draw[hcsrust,line width=1.1pt] (0.8,0.8,1.6)--(2.4,0.8,1.6);
  \draw[hcsrust,line width=1.1pt] (2.4,0.8,1.6)--(2.4,2.4,0.9);
  \draw[hcsrust,line width=1.1pt] (2.4,2.4,0.9)--(0.8,2.4,0.9);
  \draw[hcsrust,line width=1.1pt,->] (0.8,2.4,0.9)--(0.8,0.8,1.15);
  \draw[hcsgrey,dashed,line width=0.5pt] (0.8,0.8,0)--(0.8,0.8,1.6);
  \draw[hcsgrey,dashed,line width=0.5pt] (2.4,0.8,0)--(2.4,0.8,1.6);
  \draw[hcsgrey,dashed,line width=0.5pt] (2.4,2.4,0)--(2.4,2.4,0.9);
  \draw[hcsgrey,dashed,line width=0.5pt] (0.8,2.4,0)--(0.8,2.4,0.9);
  \draw[hcsgold,line width=1.6pt,<->] (0.8,0.8,1.15)--(0.8,0.8,1.6);
  \fill[hcsrust] (0.8,0.8,1.6) circle (1.1pt);
\end{tikzpicture}\par
\vspace{0.35cm}
{\footnotesize\color{hcsgrey} A horizontal lift of a closed path to the Heisenberg group, for the connection form $\lambda=\dd z+x\,\dd y$.\\
The lift closes up to a vertical translation equal to the enclosed area: curvature, holonomy, and the Weil pairing in one picture.\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}
Chapter~9 of Patrick Iglesias-Zemmour's \emph{Diffeology} \cite{IZ} builds symplectic geometry on arbitrary diffeological spaces:
for every closed $2$-form $\omega$ on a space $X$ and every diffeological group $G$ of automorphisms of $(X,\omega)$ there is a
moment map, with values in a quotient of the space $\Gs$ of invariant $1$-forms on $G$, with no hypothesis of dimension,
non-degeneracy or smoothness of orbits. Volume~I of this series \cite{DHC} placed Chapters~1--8 of \cite{IZ} in the cohesive
$\infty$-topos $\Hh$ of smooth $\infty$-groupoids. This volume does the same for Chapter~9 and continues to prequantisation and
reduction.

\medskip\noindent
\textbf{Part I.} A closed $2$-form is a map $X\to\Omcl$ to a classifying sheaf with one point, and the category of
parasymplectic spaces is a slice of the topos of smooth sets. The moment map of \cite{IZ} is the transgression of $\omega$
along the orbits of $G$; for an invariant primitive $\alpha$ it is the obstruction to the descent of $\alpha$ to the homotopy
quotient $X\hquot G$. The coadjoint orbit attached to a homogeneous space is the coimage of an orbit map, in the sense of
the two factorisation systems of \VolI{Theorem~3.2}.

\medskip\noindent
\textbf{Part II.} A prequantisation is a lift of $\omega\colon X\to\Omcl$ to the stack $\BTc$ of principal bundles with
connection for a torus of periods $T_P=\R/P$, where $P\subset\R$ is any proper subgroup. Three theorems are proved for
arbitrary diffeological spaces and groups. \emph{(A)} An equivariant prequantum bundle $(Y,\lambda)$ has a canonical
equivariant moment map, $\mu(x)=\hat y^*\lambda$, the pullback of the connection form along an orbit map; the holonomy and
the Souriau class of \cite{IZ} vanish. \emph{(B)} The equivariant bundle is a map $X\hquot G\to\BTc$ exactly when $\mu=0$.
\emph{(C)} If $G$ acts principally on $\mu^{-1}(0)$ then the quotient $\mu^{-1}(0)/G$ carries a reduced closed $2$-form
and a reduced prequantum bundle with the same structure group, with no regularity hypothesis on the level set. Reduction
of $\C^2\times\C^2$ at an irrational level produces the prequantum bundle of $S^2\times S^2$ as the leaf space
$(S^3\times S^3)/\R$ of an irrational flow, with structure group an irrational torus.

\medskip\noindent
\textbf{Part III} consists of applications. In number theory, products $\R/\fa\times\R/\fb$ of one-dimensional tori attached to
ideals of a number field are classified up to diffeomorphism by the Steinitz class $[\fa\fb]$ and up to symplectomorphism
by the ideal $\fa\fb$, which is the group of periods; their symplectic mapping class groups are Hilbert modular groups, and
their prequantum bundles are Heisenberg quasi-nilmanifolds. In cryptography, the theta group of a polarised torus is the
group of automorphisms of its prequantum bundle over the translations, the Weil pairing is its commutator, isogenies that
preserve the polarisation are the quotients by isotropic subgroups, and the Gram--Schmidt profile of a symplectic lattice
basis, including the NTRU bases of the signature scheme Falcon, is symmetric. In machine learning, Noether's theorem holds
for actions of arbitrary diffeological groups, compact symmetries of a loss give conserved momenta of Hamiltonian
dynamics, non-compact symmetries give conserved quadratic forms of gradient flow, splitting integrators conserve
the momenta exactly, and the symmetry accelerates training in four ways, by the choice of a level, by motion along orbits,
by equivariant updates and by projection. In artificial intelligence, the momentum is a reachability invariant, the net motion produced by a cycle of
shape changes is a holonomy, and a two-body system with irrational inertia ratio has a first integral with values in an
irrational torus and none with values in a manifold. In system design, linear Lagrangian and Dirac relations compose,
isotropic correspondences of diffeological spaces compose with no transversality hypothesis, and reduction commutes with
interconnection. The common structure is stated in a final chapter: an objective on a quotient, a dynamics on an atlas, and
a connection whose exact part gives conserved quantities and whose non-closed part gives phases; without the metric it
holds in every $\infty$-topos, with it in a differentially cohesive $\infty$-topos, where the atlas of a quotient is a quotient by a formal group
followed by a formally \'etale map, and for the syntax of an algebraic theory it is the theory of normal forms. In a last chapter the
structure is made executable: architectures are terms of an initial algebra, the denotation, the two modes of differentiation and the
parameter symmetries are its homomorphisms, and by a compiler to JAX the specifications of five published networks become optimizers whose
forward and backward passes are selected at run time, and derivatives that are composites of the two modes are evaluated by plans of least
cost.

\medskip\noindent
The volume contains 31 numbered figures and a frontispiece, 19 tables, 79 numbered results and 79 solved exercises graded from
warm-up to proof.

\medskip\noindent
{\small\color{hcsgrey}\textbf{Keywords.} Diffeological space; closed $2$-form; moment map; Souriau cocycle; coadjoint orbit;
prequantisation; torus of periods; symplectic reduction; Heisenberg group; Weil pairing; symplectic lattice; Noether's theorem;
geometric phase; port-Hamiltonian system.\\
\textbf{MSC 2020.} 58A40, 53D20, 53D50, 18F10, 18N60, 11R29, 14K25, 94A60, 68T07, 93B27.}

\tableofcontents

\chapter*{Preface}
\addcontentsline{toc}{chapter}{Preface}
\markboth{Preface}{}

\section*{What this is}
The second volume of a categorical companion to \cite{IZ}. Volume~I \cite{DHC} is devoted to Chapters~1--8 of the book: plots,
the quasitopos $\Diff$, cohesion, shape, differential forms, fibre bundles and stacks. The present volume covers
Chapter~9, \emph{Symplectic Diffeology}, and to two subjects that follow it: prequantisation, for which
the integration bundles of art.~8.42 are the starting point, and symplectic reduction.

The method is the one of Volume~I. Each construction of the book is first stated in its own terms, with the article
number; it is then identified with a universal construction in the quasitopos $\Diff$, the topos $\SmSet$ of smooth sets
or the $\infty$-topos $\Hh=\Sh_\infty(\Cart)$; and the identification is used to prove something further. In Part~II the
further results are the three theorems (A), (B), (C) of the abstract, proved by elementary arguments with plots and valid
for every diffeological space and every diffeological group.

\section*{What is used from Volume I}
The reader needs the following, cited as \VolI{\dots}.
\begin{itemize}
\item A diffeological space is a concrete sheaf on the site $\Cart$ of Cartesian spaces; $\Diff\into\SmSet\into\Hh$ are full
embeddings \VolI{Theorems~2.2, 4.5}. Limits, colimits and function spaces exist in $\Diff$ \VolI{Theorems~1.6, 1.9}.
\item A differential $k$-form on $X$ is a map $X\to\Om^k$ in $\SmSet$. A form descends along a subduction $\pi\colon X\to B$ if and
only if it takes equal values on plots with equal projections, and $\pi^*$ is injective \VolI{Proposition~6.4}.
\item An action of a diffeological group $G$ on $X$ is \emph{principal} if $(g,x)\mapsto(x,gx)$ is an induction; this holds if
and only if the diffeological quotient is the homotopy quotient, $X/G\simeq X\hquot G$ \VolI{Theorem~7.2}. Principal bundles
are classified by maps to the stack $\B G$ \VolI{Theorem~7.5}; over a Cartesian space they are trivial \VolI{Lemma~7.4}.
\item For any action there are three quotients $X\hquot G\to\pi_0(X\hquot G)\to X/G$: stack, smooth set, diffeological space
\VolI{Theorem~7.8}.
\item A quasi-torus is a quotient $T_\Gamma=\R^n/\Gamma$ by a countable subgroup. Smooth maps between quasi-tori with dense
$\Gamma$ lift to affine maps \VolI{Theorem~9.1}.
\end{itemize}

\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 Closed $2$-forms};
  \node[hcsnode] (c2) at (3.6,0) {2 Moment maps};
  \node[hcsnode] (c3) at (7.2,0) {3 Coadjoint orbits};
  \node[hcsnode] (c4) at (0,-1.25) {4 Prequantisation};
  \node[hcsnode] (c5) at (3.6,-1.25) {5 Equivariance};
  \node[hcsnode] (c6) at (7.2,-1.25) {6 Reduction};
  \draw[->] (c1)--(c2); \draw[->] (c2)--(c3);
  \draw[->,rounded corners=3pt] (c3.south) -- ++(0,-0.3) -| (c4.north);
  \draw[->] (c4)--(c5); \draw[->] (c5)--(c6);
\end{tikzpicture}

\medskip
{\small
\begin{tabular}{@{}ll@{}}\toprule
application chapter & uses\\\midrule
7 Number theory & 1, 2, 4; \VolI{Chapters~9, 10}\\
8 Cryptography & 4, 5; \cref{ch:number-theory}\\
9 Machine learning & 2, 5, 6\\
10 Artificial intelligence & 2, 5, 6; \cref{ch:ml}\\
11 System design & 1, 6\\
12 The general structure & 5, 6; \cref{ch:ml,ch:ai,ch:systems}\\
13 Differentiable programs & \cref{ch:ml,ch:structure}; the package \texttt{dprog}\\\bottomrule
\end{tabular}}
\end{center}

\noindent Every chapter ends with solved exercises. Their level is marked by one to four stars: warm-up, computation,
argument, proof. Exercises of the fourth level are propositions of the text whose proofs were deferred.

\section*{Conventions}
Domains are open subsets of some $\R^n$; plots are defined on domains, or equivalently on Cartesian spaces. Manifolds are
finite-dimensional, Hausdorff and paracompact. Groups act on the left. For a diffeological group $G$, the space $\Gs$ of
momenta is the space of left-invariant $1$-forms on $G$ \IZ{art.~7.12}. A \emph{torus of periods} is a quotient $T_P=\R/P$ by a
subgroup $P\subsetneq\R$; its canonical $1$-form $\theta$ is the image of $\dd t$. The Heisenberg group of a bilinear form $B$
on a vector space $V$ is $\Heis_B=V\times\R$ with $(v,z)(v',z')=(v+v',\,z+z'-B(v,v'))$. References of the form
\IZ{art.~9.1} are to articles of \cite{IZ}.


\mainmatter
\part{Symplectic diffeology}

\chapter{Closed 2-forms}\label{ch:closed}
\chaptermark{Closed 2-forms}

\begin{chapabstract}
A parasymplectic space is a diffeological space with a closed $2$-form, that is, a map to the classifying sheaf $\Omcl$. The category
of parasymplectic spaces is a slice of the topos of smooth sets. We list the examples used throughout, compute the forms on
quasi-tori, recall the chain-homotopy operator $K$ that transgresses forms to path spaces, and prove a lemma on $1$-forms on
products that carries most of the proofs of Part~II.
\end{chapabstract}

\section{Parasymplectic spaces}

A differential $k$-form on a diffeological space $X$ assigns to every plot $P\colon U\to X$ a form $\omega(P)\in\Om^k(U)$, compatibly with
smooth reparametrisation \IZ{art.~6.28}. Equivalently it is a map $X\to\Om^k$ in $\SmSet$, where $\Om^k$ is the sheaf $U\mapsto\Om^k(U)$ on
$\Cart$ \VolI{\S6.1}. The exterior derivative is a map of sheaves $\dd\colon\Om^k\to\Om^{k+1}$, and its kernel in degree $2$ is the sheaf
$\Omcl$ of closed $2$-forms. The sheaf $\Omcl$ has exactly one point, since a $2$-form on $\R^0$ vanishes.

\begin{definition}\label{def:parasymplectic}
A \defn{parasymplectic space} is a pair $(X,\omega)$ of a diffeological space and a closed $2$-form $\omega\in\Om^2(X)$, $\dd\omega=0$.
A morphism $(X,\omega)\to(X',\omega')$ is a smooth map $f$ with $f^*\omega'=\omega$. The category is denoted $\ParaSymp$, and the group of
automorphisms of $(X,\omega)$, with the functional diffeology, is $\Dif(X,\omega)$.
\end{definition}

No condition of non-degeneracy is imposed. A diffeological space has no tangent spaces on which to state one, and in \cite{IZ} its role is
taken by a property of the universal moment map (\cref{ch:orbits}). The term parasymplectic is that of \cite{IZred}.

\begin{proposition}[The slice]\label{prop:slice}
\begin{enumerate}[label=\textup{(\roman*)}]
\item $\ParaSymp$ is the full subcategory of the slice topos $\SmSet/\Omcl$ on the objects $\omega\colon X\to\Omcl$ with $X$ diffeological, and
$\Dif(X,\omega)$ is the automorphism group of $\omega$ in the slice.
\item $\ParaSymp$ has pullbacks and equalisers, computed in $\Diff$. The product of $(X,\omega)$ and $(X',\omega')$ in $\ParaSymp$ is the
diffeological space
\[
X\times_\omega X'\;=\;X\times_{\Omcl}X',
\]
whose underlying set is $X\times X'$ and whose plots are the pairs of plots $(P,P')$ with $\omega(P)=\omega'(P')$.
\item The addition of forms $+\colon\Omcl\times\Omcl\to\Omcl$ induces a symmetric monoidal structure
$(X,\omega)\boxplus(X',\omega')=(X\times X',\ \pr_1^*\omega+\pr_2^*\omega')$ with unit the point, and $(X,\omega)\mapsto\overline{X}=(X,-\omega)$ is an
involution.
\end{enumerate}
\end{proposition}
\begin{proof}
(i) A map $X\to\Omcl$ is a closed $2$-form, and a map over $\Omcl$ is a smooth map compatible with the forms. (ii) Limits of connected diagrams
in a slice are computed in the ambient category, and $\Diff\into\SmSet$ preserves limits \VolI{Theorem~4.5}. The product in a slice is the fibre
product over the base. The fibre product $X\times_{\Omcl}X'$ is a subsheaf of the concrete sheaf $X\times X'$, hence concrete; its sections over
$U$ are the pairs $(P,P')$ with equal images in $\Omcl(U)$; and its points are all pairs $(x,x')$, because $\Omcl$ has one point. (iii) The sheaf
$\Omcl$ is an abelian group object, and the stated product is the composite $X\times X'\to\Omcl\times\Omcl\to\Omcl$.
\end{proof}

The space $X\times_\omega X'$ has the points of the product and fewer plots. It is used in \cref{ch:systems} as the universal isotropic
correspondence: a smooth map $(s,t)\colon L\to X\times X'$ factors through $X\times_\omega X'$ if and only if $s^*\omega=t^*\omega'$.

\begin{figure}[t]
\centering
\begin{tikzcd}[column sep=2.2em,row sep=2.6em]
X \arrow[rr,"f"] \arrow[dr,"\omega"'] && X' \arrow[dl,"\omega'"] & & X\times_\omega X' \arrow[r] \arrow[d] \arrow[dr,phantom,"\lrcorner",very near start] & X' \arrow[d,"\omega'"] & X\times X' \arrow[r,"\omega\times\omega'"] \arrow[dr,"\omega\boxplus\omega'"'] & \Omcl\times\Omcl \arrow[d,"+"]\\
& \Omcl & & & X \arrow[r,"\omega"'] & \Omcl & & \Omcl
\end{tikzcd}
\caption{Parasymplectic spaces as objects over $\Omcl$: a morphism, the product in the slice, and the monoidal sum.}\label{fig:slice}
\end{figure}

\section{Examples}

\begin{example}[Manifolds]\label{ex:manifolds}
A manifold with a closed $2$-form is a parasymplectic space, and $\ParaSymp$ contains the category of presymplectic manifolds and
form-preserving maps as a full subcategory. Symplectic manifolds are characterised inside $\ParaSymp$ by \cref{thm:coadjoint}.
\end{example}

\begin{example}[Dimension one]\label{ex:dim1}
Every $2$-form on the irrational torus $\Tal=\R/(\Z+\alpha\Z)$ vanishes: its pullback to $\R$ is a $2$-form on a $1$-manifold, and pullback
along a subduction is injective. The same holds for every quotient of a $1$-manifold.
\end{example}

\begin{proposition}[Forms on quasi-tori]\label{prop:forms-quasitori}
Let $\Gamma\subset\R^n$ be a dense subgroup and $q\colon\R^n\to T_\Gamma=\R^n/\Gamma$ the projection. Then $q^*$ identifies $\Om^k(T_\Gamma)$ with the
space $\Lambda^k(\R^n)^*$ of constant $k$-forms. Every form on $T_\Gamma$ is closed, and $(T_\Gamma,\omega_\Omega)$ is a parasymplectic space for every
alternating bilinear form $\Omega$ on $\R^n$.
\end{proposition}
\noindent The proof is \cref{exo:forms-quasitori}. For $n=2$ and $\Gamma$ of rank at least $3$ these are the \emph{symplectic irrational tori} of
\IZ{art.~9.30}; their arithmetic is the subject of \cref{ch:number-theory}.

\begin{example}[The cone orbifold]\label{ex:cone}
Let $Q_m=\C/\Z_m$ be the quotient of the plane by the rotations of order $m$, identified with $\C$ by $z\mapsto w=z^m$. The form
$\dd x\wedge\dd y$ is invariant under rotations and descends to a closed $2$-form $\omega_m$ on $Q_m$, and every $2$-form on $Q_m$ is
$f\,\omega_m$ for a smooth function $f$ \IZ{art.~9.32}. In the coordinate $w=u+iv$ of the regular stratum, $\omega_m=m^{-2}\abs w^{2/m-2}\,\dd u\wedge\dd v$
(\cref{exo:cone-form}): a smooth form on $Q_m$ whose coefficient in the coordinate $w$ is singular at the origin.
\end{example}

\begin{example}[Infinite dimensions]\label{ex:infinite}
On the Hilbert space $\mathcal H$ of square-summable complex sequences with the fine diffeology, $\alpha=\tfrac1{2i}\sum_k(\bar z_k\,\dd z_k-z_k\,\dd\bar z_k)$
is a $1$-form, $\omega=\dd\alpha$ is a closed $2$-form, and both restrict to the unit sphere and descend to the infinite projective space
\IZ{art.~9.33}. The spaces of this example are diffeological vector spaces and their quotients; none is a Banach manifold with its usual
structure.
\end{example}

\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
  \begin{scope}
  \fill[hcsmist] (0,0) rectangle (2.6,2.6);
  \draw[hcsteal] (0,0) rectangle (2.6,2.6);
  \foreach \k in {1,...,34}{
    \pgfmathsetmacro{\a}{2.6*(\k*0.6180339-floor(\k*0.6180339))}
    \pgfmathsetmacro{\b}{2.6*(\k*0.4142135-floor(\k*0.4142135))}
    \fill[hcsrust] (\a,\b) circle (0.9pt);}
  \fill[hcsgold,opacity=0.5] (0.4,0.5)--(1.3,0.6)--(1.5,1.4)--(0.6,1.3)--cycle;
  \node at (0.95,0.95) {$\Omega$};
  \node[below,align=center] at (1.3,-0.1) {$\R^2/\Gamma$, $\Gamma$ dense:\\ constant forms};
 \end{scope}
  \begin{scope}[xshift=4.6cm,yshift=1.3cm]
  \fill[hcsmist] (0,0) -- (0:1.3) arc (0:72:1.3) -- cycle;
  \draw[hcsteal] (0,0) -- (0:1.3); \draw[hcsteal] (0,0)--(72:1.3);
  \draw[hcsteal,dashed] (0:1.3) arc (0:72:1.3);
  \draw[->,hcsrust] (0:0.8) arc (0:72:0.8);
  \node[hcsrust] at (36:1.05) {$\zeta$};
  \fill (0,0) circle (1.3pt) node[below left] {$0$};
  \node[below,align=center] at (0.65,-1.4) {$Q_m=\C/\Z_m$:\\ $\dd x\wedge\dd y$ descends};
 \end{scope}
  \begin{scope}[xshift=8.3cm,yshift=1.3cm]
  \shade[ball color=hcsmist] (0,0) circle (0.85);
  \shade[ball color=hcssand] (2.0,0) circle (0.6);
  \node at (1.05,0) {$\times$};
  \node at (0,-1.05) {$2\pi c_1$};
  \node at (2.0,-0.82) {$2\pi c_2$};
  \node[below,align=center] at (1.0,-1.4) {$S^2\times S^2$:\\ periods $2\pi(c_1\Z+c_2\Z)$};
 \end{scope}
\end{tikzpicture}
\caption{Three parasymplectic spaces used throughout: a symplectic quasi-torus, the cone orbifold, and a product of spheres with
incommensurable areas.}\label{fig:examples}
\end{figure}

\section{Transgression to paths}

The space $\Paths(X)=\cinf(\R,X)$ carries the functional diffeology, and $\hat0,\hat1\colon\Paths(X)\to X$ are the evaluations at $0$ and $1$.

\begin{theorem}[The chain-homotopy operator, \IZ{art.~6.83--6.86}]\label{thm:K}
For every diffeological space $X$ and every $k\ge1$ there is a linear operator $K\colon\Om^k(X)\to\Om^{k-1}(\Paths(X))$ such that
\begin{equation}\label{eq:K}
K\circ\dd+\dd\circ K=\hat1^*-\hat0^* ,
\end{equation}
natural in $X$: for a smooth $f\colon X\to X'$ with induced $f_*\colon\Paths(X)\to\Paths(X')$, one has $K\circ f^*=(f_*)^*\circ K$. For a plot
$\Phi\colon U\to\Paths(X)$ with adjunct $\tilde\Phi\colon U\times\R\to X$,
\[
(K\omega)(\Phi)=\int_0^1\bigl(\iota_{\partial_t}\tilde\Phi^*\omega\bigr)\big|_{U\times\{t\}}\,\dd t .
\]
For $k=1$, $K\alpha$ is the function $p\mapsto\int_p\alpha$.
\end{theorem}

The operator is integration along the fibres of $\Paths(X)\times[0,1]\to\Paths(X)$ of the pullback of $\omega$ by the evaluation map, and
\eqref{eq:K} is Stokes' formula for that fibre. If $\omega$ is closed then by \eqref{eq:K} the restriction of $K\omega$ to $\Loops(X)$ is closed.

\begin{definition}[\IZ{art.~8.42}]\label{def:periods}
Let $(X,\omega)$ be parasymplectic. The \defn{group of periods} $P_\omega\subset\R$ is the group of the integrals of $K\omega$ over the loops in
$\Loops(X)$. A smooth map $S\colon T^2\to X$ has the \emph{toric period} $\int_{T^2}S^*\omega\in P_\omega$.
\end{definition}

\begin{example}\label{ex:periods}
For the quasi-torus $(T_\Gamma,\omega_\Omega)$ and $\gamma,\gamma'\in\Gamma$, the map $(s,t)\mapsto q(s\gamma+t\gamma')$ is defined on $T^2$ and has toric
period $\Omega(\gamma,\gamma')$. So $P_\omega\supseteq\Omega(\Gamma\wedge\Gamma)$, the subgroup generated by the values of $\Omega$ on $\Gamma$. For
$S^2\times S^2$ with the form $c_1\omega_1+c_2\omega_2$, where $\int_{S^2}\omega_i=2\pi$, the group of periods is $2\pi(c_1\Z+c_2\Z)$: it is dense in
$\R$ when $c_1/c_2$ is irrational.
\end{example}

\section{One-forms on products}

The following lemma replaces, for $1$-forms, the decomposition of a tangent vector to a product into its two components.

\begin{lemma}[Slices]\label{lem:slices}
Let $A$ and $B$ be diffeological spaces. A $1$-form $\beta$ on $A\times B$ is determined by its restrictions to the slices $A\times\{b\}$ and
$\{a\}\times B$. Precisely, for plots $P\colon U\to A$ and $Q\colon U\to B$ let $\beta_1,\beta_2$ be the components of $\beta(P\times Q)\in\Om^1(U\times U)$
along the two factors; then
\begin{equation}\label{eq:slices}
\beta(P,Q)=\Delta^*\beta(P\times Q),\quad \beta_1|_{U\times\{s\}}=\beta\bigl(P,\mathrm{const}_{Q(s)}\bigr),\quad \beta_2|_{\{r\}\times U}=\beta\bigl(\mathrm{const}_{P(r)},Q\bigr),
\end{equation}
where $\Delta\colon U\to U\times U$ is the diagonal.
\end{lemma}
\noindent The proof is \cref{exo:slices}. The statement is false for $2$-forms: $\dd x\wedge\dd y$ on $\R\times\R$ restricts to zero on every slice.

\begin{corollary}\label{cor:product-momenta}
Let $G$ act smoothly on $Y$, with action map $\Phi\colon G\times Y\to Y$, and let $\lambda\in\Om^1(Y)$. Then $\Phi^*\lambda=\pr_Y^*\lambda$ on $G\times Y$ if and only
if $g_Y^*\lambda=\lambda$ for every $g\in G$ and $\hat y^*\lambda=0$ for every $y\in Y$, where $\hat y\colon G\to Y$ is the orbit map $g\mapsto g\cdot y$.
\end{corollary}
\begin{proof}
Apply \cref{lem:slices} to $\beta=\Phi^*\lambda-\pr_Y^*\lambda$. Its restriction to $\{g\}\times Y$ is $g_Y^*\lambda-\lambda$, and its restriction to
$G\times\{y\}$ is $\hat y^*\lambda$, because $\pr_Y$ is constant on that slice.
\end{proof}

\exercisesheading

\begin{exercise}[label=exo:dim1]{1}
Show that a closed $2$-form on a quotient $M/{\sim}$ of a surface $M$ by an equivalence relation is determined by a closed $2$-form on $M$, and that
on a quotient of a curve it vanishes.
\end{exercise}
\begin{solution}
The projection $q\colon M\to M/{\sim}$ is a subduction, so $q^*$ is injective on forms \VolI{Proposition~6.4}. A form $\omega$ on the quotient is therefore
determined by $q^*\omega\in\Om^2(M)$, which is closed. If $M$ is a curve then $\Om^2(M)=0$.
\end{solution}

\begin{exercise}[label=exo:cone-form]{2}
Verify the formula $\omega_m=m^{-2}\abs w^{2/m-2}\,\dd u\wedge\dd v$ of \cref{ex:cone} on the regular stratum of $Q_m$, and show that the form
$\dd u\wedge\dd v$ in the coordinate $w$ is also a smooth $2$-form on $Q_m$. Which function $f$ gives $\dd u\wedge\dd v=f\,\omega_m$?
\end{exercise}
\begin{solution}
The projection is $\pi_m(z)=z^m=w$. For a holomorphic map, $\pi_m^*(\dd u\wedge\dd v)=\abs{\pi_m'(z)}^2\dd x\wedge\dd y=m^2\abs z^{2m-2}\dd x\wedge\dd y$. Since
$\abs z=\abs w^{1/m}$, on the regular stratum $\dd x\wedge\dd y=\pi_m^*\bigl(m^{-2}\abs w^{2/m-2}\dd u\wedge\dd v\bigr)$, which is the formula. For the second
statement, the plots of $Q_m$ are locally of the form $\varphi^m$ with $\varphi$ a smooth parametrisation in $\C$ \IZ{art.~9.32}, so they are
smooth parametrisations in $\C$ and every form on the manifold $\C$ restricts to a form on $Q_m$. By the first computation
$\dd u\wedge\dd v=f\omega_m$ with $f(w)=m^2\abs w^{2-2/m}$, and $f\circ\pi_m=m^2\abs z^{2m-2}$ is smooth, so $f$ is a smooth function on $Q_m$.
\end{solution}

\begin{exercise}[label=exo:graph]{2}
Let $f\colon X\to X'$ be a smooth map between parasymplectic spaces. Show that the following are equivalent: \textup{(a)} $f^*\omega'=\omega$;
\textup{(b)} the graph $(\id,f)\colon X\to\overline X\boxplus X'$ pulls the form back to zero; \textup{(c)} the graph is a smooth map
$X\to X\times_\omega X'$.
\end{exercise}
\begin{solution}
The form of $\overline X\boxplus X'$ is $\pr_2^*\omega'-\pr_1^*\omega$, and its pullback by $(\id,f)$ is $f^*\omega'-\omega$; so (a)$\iff$(b). For a plot $P$ of
$X$, the pair $(P,f\circ P)$ is a plot of $X\times_\omega X'$ if and only if $\omega(P)=\omega'(f\circ P)=(f^*\omega')(P)$; so (a)$\iff$(c).
\end{solution}

\begin{exercise}[label=exo:forms-quasitori]{3}
Prove \cref{prop:forms-quasitori}.
\end{exercise}
\begin{solution}
Let $\omega\in\Om^k(T_\Gamma)$ and $\tilde\omega=q^*\omega\in\Om^k(\R^n)$. For $\gamma\in\Gamma$ the translation $t_\gamma$ satisfies $q\circ t_\gamma=q$, so
$t_\gamma^*\tilde\omega=\tilde\omega$: the coefficients of $\tilde\omega$ are smooth functions invariant under a dense group of translations, hence constant.
Conversely let $\tilde\omega$ be a constant form, and let $P,P'$ be plots of $\R^n$ with $q\circ P=q\circ P'$. Then $P'-P$ is continuous with values in the
countable set $\Gamma$, so it is locally constant, $P'=t_\gamma\circ P$ locally, and $\tilde\omega(P')=\tilde\omega(P)$. By the descent criterion
\VolI{Proposition~6.4} there is a unique $\omega$ with $q^*\omega=\tilde\omega$. Since $q^*$ is injective and commutes with $\dd$, and constant forms are closed,
every form on $T_\Gamma$ is closed.
\end{solution}

\begin{exercise}[label=exo:slices]{4}
Prove \cref{lem:slices}.
\end{exercise}
\begin{solution}
The plot $(P,Q)\colon U\to A\times B$ is the composite of the diagonal $\Delta$ with the plot $P\times Q\colon U\times U\to A\times B$, $(r,s)\mapsto(P(r),Q(s))$,
so $\beta(P,Q)=\Delta^*\beta(P\times Q)$ by the compatibility of a form with reparametrisation. Write $\beta(P\times Q)=\beta_1+\beta_2$, where $\beta_1$ is a
combination of the $\dd r_i$ and $\beta_2$ of the $\dd s_j$, with coefficients smooth in $(r,s)$. The restriction of $\beta(P\times Q)$ to
$U\times\{s\}$ is the value of $\beta$ on the plot $r\mapsto(P(r),Q(s))$, which is the plot $(P,\mathrm{const}_{Q(s)})$ of the slice $A\times\{Q(s)\}$; and
that restriction is $\beta_1|_{U\times\{s\}}$, because the $\dd s_j$ vanish on the slice. The same argument gives $\beta_2$. Hence the restrictions of
$\beta$ to the slices determine $\beta_1$ and $\beta_2$ for every pair of plots, and so determine $\beta(P,Q)$. Every plot of $A\times B$ is of the form
$(P,Q)$, so $\beta$ is determined.
\end{solution}



\chapter{Moment maps}\label{ch:moment}
\chaptermark{Moment maps}

\begin{chapabstract}
For a diffeological group $G$ acting on a parasymplectic space, a moment map is constructed in \cite{IZ,IZmoment} with values in a quotient of the space of
momenta of $G$. We state the construction and its properties with the article numbers, compute the examples, and identify the moment map in
the exact case as the obstruction to the descent of a primitive to the homotopy quotient.
\end{chapabstract}

\section{Momenta}

\begin{definition}[\IZ{art.~7.12, 7.15}]\label{def:momenta}
Let $G$ be a diffeological group, with left and right multiplications $L(g)\colon k\mapsto gk$ and $R(g)\colon k\mapsto kg$. The space of
\defn{momenta} of $G$ is the vector space
\[
\Gs=\set{\alpha\in\Om^1(G)\mid L(g)^*\alpha=\alpha\ \text{for all }g\in G},
\]
with the functional diffeology. The \defn{coadjoint action} of $G$ on $\Gs$ is $\Ad_*(g)(\alpha)=\Ad(g^{-1})^*\alpha=R(g)^*\alpha$.
\end{definition}

The notation recalls the dual of a Lie algebra, and for a Lie group $\Gs$ is that dual, a left-invariant $1$-form being determined by its value
at the identity. In general $\Gs$ is defined by invariance and by no duality.

\begin{example}\label{ex:momenta}
\begin{enumerate}[label=\textup{(\alph*)}]
\item If $G$ is discrete, every form of positive degree on $G$ vanishes and $\Gs=0$.
\item For a torus of periods $T_P=\R/P$, the pullback of a momentum to $\R$ is a translation-invariant $1$-form, so $\Gs=\R\,\theta$. For a
quasi-torus $\R^n/\Gamma$, and for the vector group $\R^n$ itself, $\Gs=(\R^n)^*$, and the coadjoint action is trivial.
\item For $G=\Dif(X,\omega)$ the space $\Gs_\omega$ is infinite-dimensional in general; it is the target of the universal moment map of
\cref{ch:orbits}.
\end{enumerate}
\end{example}

\section{The paths moment map}

Let $(X,\omega)$ be a parasymplectic space and $\rho\colon G\to\Dif(X,\omega)$ a smooth action, written $g\cdot x$. For a path $p\in\Paths(X)$ let
$\hat p\colon G\to\Paths(X)$ be the orbit map $g\mapsto g\circ p$.

\begin{theorem}[The paths moment map, \IZ{art.~9.1--9.6}]\label{thm:paths-moment}
The $1$-form $\Psi(p)=\hat p^*(K\omega)$ on $G$ is left-invariant, and the \defn{paths moment map} $\Psi\colon\Paths(X)\to\Gs$ is smooth. Moreover:
\begin{enumerate}[label=\textup{(\roman*)}]
\item $\Psi(p\vee p')=\Psi(p)+\Psi(p')$ for composable stationary paths;
\item $\Psi(g\circ p)=\Ad_*(g)\bigl(\Psi(p)\bigr)$;
\item $\dd\,\Psi(p)=\hat x_1^*\omega-\hat x_0^*\omega$, where $x_i=p(i)$ and $\hat x\colon G\to X$ is the orbit map of a point;
\item $\Psi(p)=\Psi(p')$ if $p$ and $p'$ are homotopic with fixed ends.
\end{enumerate}
For a plot $P\colon U\to G$, with $\tilde a\colon U\times\R\to X$, $\tilde a(r,t)=P(r)\cdot p(t)$,
\begin{equation}\label{eq:Psi}
\Psi(p)(P)=\int_0^1\bigl(\iota_{\partial_t}\tilde a^*\omega\bigr)\big|_{U\times\{t\}}\,\dd t .
\end{equation}
\end{theorem}
\noindent Left-invariance follows from the naturality of $K$ and the invariance of $\omega$, and \eqref{eq:Psi} is the formula of \cref{thm:K};
for a manifold it is the formula $\Psi(p)(P)_r(\delta r)=\int_0^1\omega\bigl(\dot p(t),\delta p(t)\bigr)\dd t$ of \IZ{art.~9.20}. Parts (ii) and (iii) are
\cref{exo:Psi}.

Formula \eqref{eq:Psi} has a geometric content (\cref{fig:strip}). A plot of $G$ moves the path $p$ and sweeps a strip in $X$; the moment
$\Psi(p)$ evaluated on the plot is the integral of $\omega$ over the strip, in the direction of the path. In the language of \cref{ch:closed}:
$\Psi(p)$ is the transgression of $\omega$ along the map $G\times[0,1]\to X$, $(g,t)\mapsto g\cdot p(t)$.

\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
 \begin{scope}
  \fill[hcsgold!35] (0,0) .. controls (1.2,0.9) and (2.4,-0.3) .. (3.6,0.5) -- (3.9,1.7) .. controls (2.7,0.9) and (1.5,2.1) .. (0.3,1.2) -- cycle;
  \draw[hcsink,line width=0.9pt,->] (0,0) .. controls (1.2,0.9) and (2.4,-0.3) .. (3.6,0.5) node[right]{$p$};
  \draw[hcsteal,line width=0.9pt,->] (0.3,1.2) .. controls (1.5,2.1) and (2.7,0.9) .. (3.9,1.7) node[right]{$g\circ p$};
  \draw[hcsrust,->] (0,0)--(0.3,1.2); \draw[hcsrust,->] (3.6,0.5)--(3.9,1.7);
  \node[hcsrust,left] at (0.1,0.65) {$\hat x_0$}; \node[hcsrust,right] at (3.8,1.05) {$\hat x_1$};
  \node at (1.95,0.85) {$\int\omega$};
  \fill (0,0) circle (1.2pt) node[below]{$x_0$}; \fill (3.6,0.5) circle (1.2pt) node[below]{$x_1$};
 \end{scope}
 \begin{scope}[xshift=6.6cm,yshift=0.2cm]
  \node (P) at (0,1.6) {$\Paths(X)$}; \node (G) at (3.2,1.6) {$\Gs$};
  \node (XX) at (0,0) {$X\times X$}; \node (GG) at (3.2,0) {$\Gs/\Gamma$};
  \node (X) at (0,-1.4) {$X$};
  \draw[->] (P)--node[above]{$\Psi$}(G); \draw[->] (XX)--node[above]{$\psi$}(GG);
  \draw[->] (P)--node[left]{ends}(XX); \draw[->] (G)--node[right]{class}(GG);
  \draw[->] (X)--node[below right]{$\mu$}(GG);
  \draw[->,dashed] (XX)--node[left]{$\mu(x')-\mu(x)$}(X);
 \end{scope}
\end{tikzpicture}
\caption{Left: the paths moment map integrates $\omega$ over the strip swept by a path under a plot of $G$; its differential is carried by the two
ends. Right: the passage from the paths moment map to the two-points moment map and to a moment map.}\label{fig:strip}
\end{figure}

\section{Holonomy, moment maps, and the Souriau class}

From now on $X$ is connected.

\begin{theorem}[\IZ{art.~9.7--9.10}]\label{thm:moment}
Let $G$ act on the connected parasymplectic space $(X,\omega)$.
\begin{enumerate}[label=\textup{(\roman*)}]
\item \emph{Holonomy.} $\Gamma=\Psi(\Loops(X))$ is a subgroup of $\Gs$, the image of a homomorphism $\pi_1(X)\to\Gs$. Its elements are closed and
invariant under the coadjoint action.
\item \emph{Two-points moment map.} There is a unique smooth $\psi\colon X\times X\to\Gs/\Gamma$ with $\psi(p(0),p(1))=\mathrm{class}\,\Psi(p)$. It satisfies
$\psi(x,x'')=\psi(x,x')+\psi(x',x'')$ and $\psi(g x,g x')=\Ad_*^\Gamma(g)\,\psi(x,x')$.
\item \emph{Moment maps.} There is a smooth $\mu\colon X\to\Gs/\Gamma$ with $\psi(x,x')=\mu(x')-\mu(x)$, unique up to an additive constant.
\item \emph{Souriau cocycle.} The map $\theta(g)=\mu(g x)-\Ad_*^\Gamma(g)\,\mu(x)$ is independent of $x$ and satisfies
$\theta(gg')=\Ad_*^\Gamma(g)\,\theta(g')+\theta(g)$. Its class $\sigma\in H^1(G,\Gs/\Gamma)$ is independent of the choice of $\mu$.
\end{enumerate}
The action is called \defn{Hamiltonian} if $\Gamma=0$ and \defn{exact} if $\sigma=0$, that is, if some moment map is equivariant.
\end{theorem}

Two features distinguish this from the classical definition. The moment map exists for every action that preserves $\omega$; the obstructions
appear in its target $\Gs/\Gamma$ and in the class $\sigma$. And the target is in general a diffeological space that is not a vector space: for the
translations of a quasi-torus it is again a quasi-torus (\cref{prop:dual-torus}).

\begin{theorem}[The exact case, \IZ{art.~9.11}]\label{thm:exact}
Suppose $\omega=\dd\alpha$ with $\alpha$ invariant under $G$. Then $\Psi(p)=\hat x_1^*\alpha-\hat x_0^*\alpha$, the action is Hamiltonian and exact, and
\[
\mu\colon X\to\Gs,\qquad\mu(x)=\hat x^*\alpha,
\]
is an equivariant moment map.
\end{theorem}
\begin{proof}
By \eqref{eq:K}, $K\omega=K\dd\alpha=\hat1^*\alpha-\hat0^*\alpha-\dd(K\alpha)$. The function $K\alpha\circ\hat p$ is $g\mapsto\int_{g\circ p}\alpha=\int_pg^*\alpha=\int_p\alpha$, a
constant; so $\hat p^*\dd(K\alpha)=0$ and $\Psi(p)=(\hat1\circ\hat p)^*\alpha-(\hat0\circ\hat p)^*\alpha$, with $\hat\imath\circ\hat p=\hat x_i$. For a loop this
vanishes. Equivariance: $\widehat{g x}=\hat x\circ R(g)$, so $\mu(gx)=R(g)^*\mu(x)=\Ad_*(g)\mu(x)$.
\end{proof}

\section{The moment map as an obstruction to descent}

For an action with action map $a\colon G\times X\to X$, the homotopy quotient $X\hquot G$ is the colimit in $\Hh$ of the simplicial object
$\cdots G\times G\times X\to G\times X\rightrightarrows X$ \VolI{\S7.2}. Since $\Om^k$ is a sheaf of sets, a map $X\hquot G\to\Om^k$ is a form on $X$ whose
two pullbacks to $G\times X$ coincide:
\begin{equation}\label{eq:basic}
\Om^k(X\hquot G)=\set{\beta\in\Om^k(X)\mid a^*\beta=\pr_X^*\beta}.
\end{equation}

\begin{proposition}[Basic forms]\label{prop:basic}
\begin{enumerate}[label=\textup{(\roman*)}]
\item If the action is principal, $\pi^*$ identifies $\Om^k(X/G)$ with the space \eqref{eq:basic}.
\item For $k=1$ the condition $a^*\beta=\pr_X^*\beta$ holds if and only if $\beta$ is invariant and $\hat x^*\beta=0$ for every $x\in X$.
\item If $\alpha$ is an invariant $1$-form with $\dd\alpha=\omega$ and $\mu$ is the moment map of \cref{thm:exact}, then $a^*\alpha-\pr_X^*\alpha$ is the
$1$-form on $G\times X$ whose restriction to $G\times\{x\}$ is $\mu(x)$ and whose restriction to $\{g\}\times X$ is zero. In particular $\alpha$ is a
$1$-form on $X\hquot G$ if and only if $\mu=0$.
\end{enumerate}
\end{proposition}
\noindent The proof is \cref{exo:basic}. Part (iii) is the first appearance of the theme of Part~II: \emph{the moment map is the component along
$G$ of the difference of the two pullbacks to $G\times X$.} Invariance is a condition on each slice $\{g\}\times X$; the moment map is the
remaining condition on the slices $G\times\{x\}$.

\section{Examples}

\begin{example}[Rotations]\label{ex:rotations}
On $\C$ with $\omega=\dd x\wedge\dd y=\dd\alpha$, $\alpha=\tfrac12(x\,\dd y-y\,\dd x)$, the circle $S^1=\R/2\pi\Z$ acts by rotations and preserves $\alpha$. The
orbit map of $z$ is $\varphi\mapsto e^{i\varphi}z$, and $\hat z^*\alpha=\tfrac12\abs z^2\dd\varphi$: the moment map is $\mu(z)=\tfrac12\abs z^2$ in the basis
$\dd\varphi$ of $\Gs$. On the cone orbifold $Q_m$ the moment map of the residual circle is $\mu_m(w)=\tfrac1{2m}\abs w^{2/m}$
(\cref{exo:cone-moment}).
\end{example}

\begin{example}[Translations, \IZ{art.~9.30}]\label{ex:translations}
The group $G=\R^n$ acts on itself by translations and preserves every constant $2$-form $\Omega$. By \eqref{eq:Psi}, for a path from $x$ to $y$,
$\Psi(p)=\Omega(y-x,\cdot)\in(\R^n)^*$. The holonomy is trivial, the moment maps are $\mu(x)=\Omega(x,\cdot)+c$, and the Souriau cocycle is
$\theta(u)=\Omega(u,\cdot)$, because the coadjoint action is trivial. The class $\sigma$ is not zero unless $\Omega=0$: no moment map is equivariant.
In \cref{ch:equivariant} the class $\sigma$ is identified with the commutator of the Heisenberg group.
\end{example}

\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
 \begin{scope}
  \foreach \r in {0.4,0.8,1.2} \draw[hcsteal,line width=0.6pt] (0,0) circle (\r);
  \fill (0,0) circle (1.2pt);
  \draw[->,hcsrust,line width=0.7pt] (20:1.2) arc (20:70:1.2);
  \draw[->,line width=0.6pt] (1.7,0)--node[above]{$\mu$}(2.7,0);
  \draw[hcsink,line width=1pt,->] (3.2,-1.2)--(3.2,1.3) node[right]{$\tfrac12\abs z^2$};
  \foreach \y in {-0.95,-0.45,0.4} \fill[hcsteal] (3.2,\y) circle (1.4pt);
  \fill (3.2,-1.2) circle (1.2pt);
  \node[below,align=center] at (1.6,-1.45) {rotations of $\C$ and of $Q_m$:\\ levels are circles};
 \end{scope}
 \begin{scope}[xshift=6.4cm,yshift=-1.1cm]
  \fill[hcsmist] (0,0) rectangle (2.2,2.2); \draw[hcsteal] (0,0) rectangle (2.2,2.2);
  \foreach \k in {1,...,21}{
    \pgfmathsetmacro{\a}{2.2*(\k*0.6180339-floor(\k*0.6180339))}
    \pgfmathsetmacro{\b}{2.2*(\k*0.4142135-floor(\k*0.4142135))}
    \fill[hcsrust] (\a,\b) circle (0.8pt);}
  \draw[->,hcsink,line width=0.9pt] (0.4,0.4)--(1.5,0.8) node[right]{$x$};
  \draw[->,line width=0.6pt] (2.6,1.1)--node[above]{$\mu$}node[below]{$\cong$}(3.6,1.1);
  \fill[hcssand] (4.0,0) rectangle (6.2,2.2); \draw[hcsgold] (4.0,0) rectangle (6.2,2.2);
  \foreach \k in {1,...,21}{
    \pgfmathsetmacro{\a}{2.2*(\k*0.6180339-floor(\k*0.6180339))}
    \pgfmathsetmacro{\b}{2.2*(\k*0.4142135-floor(\k*0.4142135))}
    \fill[hcsrust] (6.2-\b,\a) circle (0.8pt);}
  \draw[->,hcsink,line width=0.9pt] (5.8,0.4)--(5.4,1.5) node[above]{$\Omega(x,\cdot)$};
  \node[below,align=center] at (3.1,-0.35) {translations of $\R^n/\Gamma$: the moment map is a\\ diffeomorphism onto $(\R^n)^*/\Omega(\Gamma,\cdot)$};
 \end{scope}
\end{tikzpicture}
\caption{Two moment maps. For rotations the target is the line $\Gs$ and the levels are the orbits. For the translations of a symplectic
quasi-torus the target is a quotient of $\Gs$ by the holonomy, and the moment map is an isomorphism.}\label{fig:moment-examples}
\end{figure}

\begin{proposition}[The moment map of a quasi-torus]\label{prop:dual-torus}
Let $\Gamma\subset\R^n$ be a subgroup and $\Omega$ a non-degenerate alternating form. For the action of $\R^n$ on $(T_\Gamma,\omega_\Omega)$ by translations, the
holonomy is $\Omega(\Gamma,\cdot)\subset(\R^n)^*$, and the moment map
\[
\mu\colon T_\Gamma=\R^n/\Gamma\longrightarrow(\R^n)^*/\Omega(\Gamma,\cdot),\qquad[x]\mapsto[\Omega(x,\cdot)]
\]
is a diffeomorphism onto a quasi-torus. The action is Hamiltonian only if $\Gamma=0$.
\end{proposition}
\begin{proof}
A loop in $T_\Gamma$ lifts to a path in $\R^n$ from $x$ to $x+\gamma$, and the paths moment maps of $T_\Gamma$ and $\R^n$ correspond under the
projection, by naturality of $K$; so $\Gamma_{\mathrm{hol}}=\Omega(\Gamma,\cdot)$ by \cref{ex:translations}. The linear isomorphism $x\mapsto\Omega(x,\cdot)$ maps $\Gamma$
onto $\Omega(\Gamma,\cdot)$ and induces a diffeomorphism of the quotients, which is a moment map by the same naturality.
\end{proof}

So a symplectic quasi-torus is identified by its own moment map with a quotient of the space of momenta of its group of translations. This is
the first instance of the statement of \cref{ch:orbits} that homogeneous symplectic spaces are coadjoint orbits.

\exercisesheading

\begin{exercise}[label=exo:momenta]{1}
Compute the momenta and the coadjoint action for \textup{(a)} the group $\Z+\alpha\Z\subset\R$ with the subspace diffeology, \textup{(b)} the irrational torus
$\Tal$, \textup{(c)} the affine group of the line.
\end{exercise}
\begin{solution}
(a) The plots of a countable subgroup of $\R$ with the subspace diffeology are locally constant, so the group is discrete and $\Gs=0$. (b)
$\Gs=\R\theta$ by \cref{ex:momenta}(b), with trivial coadjoint action since the group is abelian. (c) $G=\set{x\mapsto ax+b}$ is a Lie group with
coordinates $(a,b)$, $a>0$ on the identity component. The left-invariant forms are spanned by $\dd a/a$ and $\dd b/a$. Right multiplication by
$(a_0,b_0)$ is $(a,b)\mapsto(aa_0,ab_0+b)$, so $\Ad_*(a_0,b_0)$ fixes $\dd a/a$ and maps $\dd b/a$ to $a_0^{-1}(b_0\,\dd a/a+\dd b/a)$.
\end{solution}

\begin{exercise}[label=exo:cone-moment]{2}
Compute the moment map of the circle acting on the cone orbifold $Q_m$ by $w\mapsto e^{i\varphi}w$.
\end{exercise}
\begin{solution}
The form $\alpha=\tfrac12(x\,\dd y-y\,\dd x)$ is invariant under rotations, so it descends to a $1$-form $\alpha_m$ on $Q_m$ with
$\dd\alpha_m=\omega_m$ (\cref{ex:cone}). The rotation $w\mapsto e^{i\varphi}w$ of $Q_m$ is covered by $z\mapsto e^{i\varphi/m}z$. By \cref{thm:exact},
$\mu_m(w)=\hat w^*\alpha_m$, and with $w=\pi_m(z)$ the orbit map of $w$ is $\varphi\mapsto\pi_m(e^{i\varphi/m}z)$; hence
$\hat w^*\alpha_m=\tfrac12\abs z^2\,\dd(\varphi/m)=\tfrac1{2m}\abs w^{2/m}\dd\varphi$. The image of the moment map is the half-line, as for the plane, and
its level sets are the circles $\abs w=\mathrm{const}$.
\end{solution}

\begin{exercise}[label=exo:torus-moment]{2}
For the ordinary torus $T^2=\R^2/\Z^2$ with $\omega=\dd x\wedge\dd y$ and the action of $\R^2$ by translations, compute the holonomy, a moment map and the
Souriau cocycle.
\end{exercise}
\begin{solution}
By \cref{prop:dual-torus} with $\Gamma=\Z^2$ and $\Omega\bigl((x,y),(x',y')\bigr)=xy'-x'y$: the holonomy is $\Omega(\Z^2,\cdot)$, the lattice of linear forms
with integer coefficients, $\Gs/\Gamma_{\mathrm{hol}}=\R^2/\Z^2$, and $\mu[x,y]=[-y,x]$ in the basis dual to the coordinates: a rotation of the torus by a
quarter turn. The Souriau cocycle is $\theta(u)=[\Omega(u,\cdot)]$. The action is neither Hamiltonian nor exact; in the classical theory it has no
moment map.
\end{solution}

\begin{exercise}[label=exo:basic]{3}
Prove \cref{prop:basic}.
\end{exercise}
\begin{solution}
(i) If $\beta=\pi^*\beta_0$ then $a^*\beta=(\pi\circ a)^*\beta_0=(\pi\circ\pr_X)^*\beta_0=\pr_X^*\beta$. Conversely let $a^*\beta=\pr_X^*\beta$ and let $P,P'$ be plots
of $X$ with $\pi\circ P=\pi\circ P'$. Since the action is principal, $P'=g\cdot P$ for a plot $g$ of $G$ \VolI{Theorem~7.2}, that is,
$P'=a\circ(g,P)$. Then $\beta(P')=(g,P)^*a^*\beta=(g,P)^*\pr_X^*\beta=\beta(P)$, and $\beta$ descends by \VolI{Proposition~6.4}; $\pi^*$ is injective. (ii) is
\cref{cor:product-momenta} with $Y=X$. (iii) The form $\beta=a^*\alpha-\pr_X^*\alpha$ restricts to $g^*\alpha-\alpha=0$ on $\{g\}\times X$ and to
$\hat x^*\alpha=\mu(x)$ on $G\times\{x\}$; by \cref{lem:slices} these restrictions determine it, and it vanishes if and only if $\mu=0$.
\end{solution}

\begin{exercise}[label=exo:Psi]{4}
Prove parts \textup{(ii)} and \textup{(iii)} of \cref{thm:paths-moment}, and deduce that the holonomy consists of closed momenta.
\end{exercise}
\begin{solution}
(ii) For $g,k\in G$, $\widehat{g\circ p}(k)=k\circ g\circ p=\hat p(kg)$, so $\widehat{g\circ p}=\hat p\circ R(g)$ and
$\Psi(g\circ p)=R(g)^*\hat p^*(K\omega)=\Ad_*(g)\Psi(p)$. (iii) $\dd\Psi(p)=\hat p^*\dd(K\omega)=\hat p^*(\hat1^*\omega-\hat0^*\omega-K\dd\omega)$ by \eqref{eq:K}, and
$\dd\omega=0$. The composite $\hat1\circ\hat p$ is $g\mapsto g\cdot p(1)$, the orbit map of $x_1$; likewise for $\hat0$. For a loop, $x_0=x_1$ and
$\dd\Psi(\ell)=0$.
\end{solution}



\chapter{Coadjoint orbits}\label{ch:orbits}
\chaptermark{Coadjoint orbits}

\begin{chapabstract}
Every parasymplectic space has a universal moment map, for the action of its whole group of automorphisms. When that group acts transitively,
the moment map is a fibration onto an affine coadjoint orbit; when in addition its fibres are discrete, the space is called symplectic. For
manifolds this recovers non-degeneracy. The diffeology of the orbit is a coimage, in the sense of the two factorisation systems of $\Diff$.
\end{chapabstract}

\section{The universal moment map}

Let $(X,\omega)$ be a connected parasymplectic space and $G_\omega=\Dif(X,\omega)$, the automorphism group of $\omega\colon X\to\Omcl$ in the slice
(\cref{prop:slice}). All the constructions of \cref{thm:moment} apply to $G_\omega$; they are written $\Psi_\omega$, $\Gamma_\omega$, $\psi_\omega$,
$\mu_\omega$, $\theta_\omega$, $\sigma_\omega$ and depend only on $(X,\omega)$.

\begin{proposition}[Functoriality, \IZ{art.~9.12--9.14}]\label{prop:universal}
Let $\rho\colon G\to G_\omega$ be a smooth action and $\rho^*\colon\Gs_\omega\to\Gs$ the pullback of momenta. Then
\[
\Psi=\rho^*\circ\Psi_\omega,\qquad\Gamma=\rho^*(\Gamma_\omega),\qquad\psi=\rho^*_\Gamma\circ\psi_\omega,\qquad\mu=\rho^*_\Gamma\circ\mu_\omega+\mathrm{const},
\]
where $\rho^*_\Gamma\colon\Gs_\omega/\Gamma_\omega\to\Gs/\Gamma$ is induced by $\rho^*$.
\end{proposition}
\begin{proof}
The orbit maps satisfy $\hat p^{G}=\hat p^{G_\omega}\circ\rho$, so $\Psi(p)=\rho^*\hat p^*(K\omega)=\rho^*\Psi_\omega(p)$. The other identities follow from the
definitions in \cref{thm:moment}.
\end{proof}

So every moment map of every symmetry group of $(X,\omega)$ is a quotient of one map, which depends on the form alone. The group $G_\omega$ contains a
largest connected subgroup with trivial holonomy, the group $\Ham(X,\omega)$ of \emph{Hamiltonian diffeomorphisms} \IZ{art.~9.15}; for a symplectic
manifold it is the classical group of that name \IZ{art.~9.22}.

\section{Homogeneous spaces}

Let $\theta$ be the Souriau cocycle of a moment map $\mu$. The \defn{affine coadjoint action} of $G$ on $\Gs/\Gamma$ is
$\Ad_*^{\Gamma,\theta}(g)(m)=\Ad_*^\Gamma(g)(m)+\theta(g)$ \IZ{art.~7.16}; it is an action by the cocycle identity, and $\mu$ is equivariant for it by
the definition of $\theta$. Its orbits are the \defn{$(\Gamma,\theta)$-coadjoint orbits}.

Recall that $X$ is \emph{homogeneous} under $G$ if the orbit map $\hat x_0\colon G\to X$ is a subduction for one, hence every, point $x_0$
\IZ{art.~7.8}.

\begin{theorem}[The homogeneous case, \IZ{art.~9.18}]\label{thm:homogeneous}
Let $X$ be homogeneous under an action of $G$ preserving $\omega$, let $\mu$ be a moment map with cocycle $\theta$, and let $\mu_0=\mu(x_0)$. Then
$O=\mu(X)$ is a $(\Gamma,\theta)$-coadjoint orbit, and $\operatorname{St}(x_0)\subseteq\operatorname{St}(\mu_0)$. Give $O$ the pushforward of the diffeology of $G$ by the
orbit map $\hat\mu_0\colon g\mapsto\Ad_*^{\Gamma,\theta}(g)(\mu_0)$. Then in the commutative triangle
\[
\begin{tikzcd}[column sep=3.2em,row sep=2.2em]
& G \arrow[dl,"\hat x_0"'] \arrow[dr,"\hat\mu_0"] & \\
X \arrow[rr,"\mu"'] && O
\end{tikzcd}
\]
$\hat x_0$ and $\hat\mu_0$ are principal bundles with groups $\operatorname{St}(x_0)$ and $\operatorname{St}(\mu_0)$, and $\mu$ is a fibre bundle with fibre the
homogeneous space $\operatorname{St}(\mu_0)/\operatorname{St}(x_0)$.
\end{theorem}
\noindent For the first assertions see \cref{exo:homogeneous}. By \VolI{Corollary~7.3} the two orbit maps are principal bundles.

\begin{remark}[The orbit is a coimage]\label{rem:coimage}
The orbit map $\hat\mu_0\colon G\to\Gs/\Gamma$ has two factorisations in $\Diff$ \VolI{Theorem~3.2}: through its coimage, the set $O$ with the quotient
diffeology of $G$, and through its image, the set $O$ with the subspace diffeology of $\Gs/\Gamma$. The diffeology chosen in \cref{thm:homogeneous}
is the coimage. The two coincide when $\hat\mu_0$ is strict, and the fibration statements of the theorem are statements about the coimage. The same
choice occurs in \VolI{Theorem~11.1} for hypothesis spaces and in \VolI{Theorem~13.1} for minimal realisations.
\end{remark}

\section{Symplectic spaces}

\begin{definition}[\IZ{art.~9.17, 9.19}]\label{def:symplectic}
The \defn{characteristics} of a moment map $\mu$ are the connected components of its fibres. A connected parasymplectic space $(X,\omega)$ is a
\defn{homogeneous symplectic space} if it is homogeneous under $\Dif(X,\omega)$ and the characteristics of the universal moment map $\mu_\omega$ are
points.
\end{definition}

The definition is justified by two theorems on manifolds.

\begin{theorem}[Souriau--Noether, \IZ{art.~9.25}]\label{thm:souriau-noether}
Let $\omega$ be a closed $2$-form on a manifold $M$. If two points are joined by a path $p$ with $\dot p(t)\in\ker\omega_{p(t)}$ for all $t$, then
$\mu_\omega$ takes the same value at both. Consequently every moment map of every action preserving $\omega$ is constant along the characteristic
distribution $\ker\omega$.
\end{theorem}
\begin{proof}
By \eqref{eq:Psi}, $\Psi_\omega(p)$ evaluated on a plot is $\int_0^1\omega(\dot p(t),\delta p(t))\,\dd t$, which vanishes when $\dot p\in\ker\omega$. So
$\mu_\omega(p(1))-\mu_\omega(p(0))=0$, and the consequence follows from \cref{prop:universal}.
\end{proof}

\begin{theorem}[Symplectic manifolds are coadjoint orbits, \IZ{art.~9.23}]\label{thm:coadjoint}
Let $\omega$ be a closed $2$-form on a connected manifold $M$. Then $\omega$ is non-degenerate if and only if
\begin{enumerate}[label=\textup{(\Alph*)}]
\item $M$ is homogeneous under $\Dif(M,\omega)$, and
\item the universal moment map $\mu_\omega\colon M\to\Gs_\omega/\Gamma_\omega$ is injective.
\end{enumerate}
In that case $\mu_\omega$ identifies $M$ with a $(\Gamma_\omega,\theta_\omega)$-coadjoint orbit of $\Dif(M,\omega)$.
\end{theorem}

So non-degeneracy, a pointwise condition on tangent vectors, is equivalent to a condition on maps: transitivity of the automorphism group and
injectivity of one map out of $M$. The second form is available on every diffeological space. By \cref{thm:souriau-noether} condition (B)
fails when $\ker\omega\ne0$; for a homogeneous presymplectic manifold the fibres of $\mu_\omega$ are exactly the leaves of the characteristic foliation
\IZ{art.~9.26}.

\begin{proposition}[Symplectic quasi-tori]\label{prop:quasitori-symplectic}
Let $\Gamma\subset\R^n$ be a dense subgroup and $\Omega$ a non-degenerate alternating form on $\R^n$. Then $(T_\Gamma,\omega_\Omega)$ is a homogeneous symplectic
space, and its moment map for the translations identifies it with the affine coadjoint orbit $(\R^n)^*/\Omega(\Gamma,\cdot)$ of the group $\R^n$.
\end{proposition}
\noindent The proof is \cref{exo:quasitori-symplectic}.

\begin{table}[t]\centering\small
\begin{tabular}{@{}p{4.3cm}p{2.4cm}p{2.6cm}p{3.7cm}@{}}\toprule
$(X,\omega)$ & homogeneous & characteristics & conclusion\\\midrule
symplectic manifold & yes & points & coadjoint orbit\\
$(M,0)$ & yes & $M$ & $\mu_\omega$ constant\\
contact form $\dd\alpha$ on $S^3$ & yes & Hopf circles & $\mu_\omega$ factors through $S^2$\\
$(\R^n/\Gamma,\omega_\Omega)$, $\Omega$ non-degenerate & yes & points & affine orbit, a quasi-torus\\
cone orbifold $(Q_m,\omega_m)$ & no: $0$ is fixed & --- & two strata\\\bottomrule
\end{tabular}
\caption{Parasymplectic spaces and the two conditions of \cref{def:symplectic}: homogeneity under $\Dif(X,\omega)$ and the characteristics of $\mu_\omega$. The third row is an instance of \IZ{art.~9.26}; the last is
\IZ{art.~9.32}.}\label{tab:symplectic}
\end{table}

\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
 \begin{scope}
  \draw[hcsteal] (0,0) rectangle (3.2,2.2);
  \foreach \y in {0.3,0.65,...,2.1} \draw[hcsrust,line width=0.6pt] (0.1,\y) .. controls (1.1,\y+0.18) and (2.1,\y-0.18) .. (3.1,\y);
  \node[above] at (1.6,2.2) {$(X,\omega)$, $\ker\omega\neq0$};
  \draw[->>,line width=0.6pt] (3.5,1.1)--node[above]{$\mu_\omega$}(4.7,1.1);
  \draw[hcsink,line width=1pt] (5.1,0.2)--(5.1,2.0);
  \foreach \y in {0.3,0.65,...,2.1} \fill[hcsrust] (5.1,\y) circle (1.2pt);
  \node[right] at (5.2,1.1) {$O$};
  \node[below,align=center] at (2.6,-0.1) {characteristics are collapsed};
 \end{scope}
 \begin{scope}[xshift=7.6cm]
  \draw[hcsteal] (0,0) rectangle (2.2,2.2);
  \foreach \i in {0.37,0.73,...,2.0} \foreach \j in {0.37,0.73,...,2.0} \fill[hcsteal] (\i,\j) circle (0.8pt);
  \node[above] at (1.1,2.2) {$(X,\omega)$ symplectic};
  \draw[->,line width=0.6pt] (2.5,1.1)--node[above]{$\mu_\omega$}node[below]{$\cong$}(3.7,1.1);
  \draw[hcsink] (4.0,0) rectangle (6.2,2.2);
  \foreach \i in {0.37,0.73,...,2.0} \foreach \j in {0.37,0.73,...,2.0} \fill[hcsteal] (4.0+\i,\j) circle (0.8pt);
  \node[above] at (5.1,2.2) {$O\subset\Gs_\omega/\Gamma_\omega$};
  \node[below,align=center] at (3.1,-0.1) {the space is its own orbit};
 \end{scope}
\end{tikzpicture}
\caption{The universal moment map of a homogeneous parasymplectic space is a fibration onto a coadjoint orbit. Its fibres are unions of
characteristics; the space is symplectic when they are points.}\label{fig:characteristics}
\end{figure}

\exercisesheading

\begin{exercise}[label=exo:plane-orbit]{1}
Show that the plane $(\R^2,\dd x\wedge\dd y)$ is a single affine coadjoint orbit of its group of translations.
\end{exercise}
\begin{solution}
By \cref{ex:translations}, $\Gs=(\R^2)^*$, $\Gamma=0$, the coadjoint action is trivial, $\mu(x)=\Omega(x,\cdot)$ and $\theta(u)=\Omega(u,\cdot)$. The affine action is
$m\mapsto m+\Omega(u,\cdot)$, which is simply transitive on $(\R^2)^*$ because $\Omega$ is non-degenerate. So $O=(\R^2)^*$, both stabilisers are trivial, and
$\mu$ is the diffeomorphism $x\mapsto\Omega(x,\cdot)$. For the linear coadjoint action every orbit is a point: the cocycle is what makes the orbit
two-dimensional.
\end{solution}

\begin{exercise}[label=exo:zero-form]{2}
Let $M$ be a connected manifold with $\omega=0$. Compute $\Dif(M,\omega)$, the universal moment map and its characteristics.
\end{exercise}
\begin{solution}
Every diffeomorphism preserves $0$, so $\Dif(M,0)=\Dif(M)$, which is transitive. Since $K0=0$, the paths moment map vanishes, $\Gamma_\omega=0$, and
$\mu_\omega$ is constant. The unique characteristic is $M$, the orbit is a point, and the fibration of \cref{thm:homogeneous} is $M\to\ast$.
\end{solution}

\begin{exercise}[label=exo:cylinder]{2}
On the cylinder $X=\R\times S^1$ with $\omega=\dd r\wedge\dd\varphi$, compute the moment maps of \textup{(a)} the rotations $\varphi\mapsto\varphi+s$ and \textup{(b)} the
translations $r\mapsto r+s$.
\end{exercise}
\begin{solution}
(a) $\omega=\dd(r\,\dd\varphi)$ with $r\,\dd\varphi$ invariant, so by \cref{thm:exact} $\mu(r,\varphi)=r$ in the basis $\dd s$ of $\Gs$: the height. (b) The form
$-\varphi\,\dd r$ is not defined on $X$, and \cref{thm:exact} does not apply. By \eqref{eq:Psi}, for a path $p=(r(t),\varphi(t))$ with a continuous
determination of the angle, $\Psi(p)=\int_0^1\omega(\dot p,\partial_r)\,\dd t\;\dd s=-(\varphi(1)-\varphi(0))\,\dd s$. A loop winding once gives $-2\pi\,\dd s$, so
$\Gamma=2\pi\Z\,\dd s$, the action is not Hamiltonian, and the moment map is $\mu(r,\varphi)=-\varphi\in\R/2\pi\Z$: the angle is a moment map with values in
a circle.
\end{solution}

\begin{exercise}[label=exo:homogeneous]{3}
In the situation of \cref{thm:homogeneous}, prove that $\mu(X)$ is a $(\Gamma,\theta)$-orbit, that $\operatorname{St}(x_0)\subseteq\operatorname{St}(\mu_0)$, and that
$\mu\colon X\to O$ is a subduction when $O$ carries the pushforward diffeology of $G$.
\end{exercise}
\begin{solution}
Equivariance of $\mu$ for the affine action gives $\mu(g x_0)=\Ad_*^{\Gamma,\theta}(g)(\mu_0)$, that is, $\mu\circ\hat x_0=\hat\mu_0$. Since $\hat x_0$ is
surjective, $\mu(X)=\hat\mu_0(G)$ is the orbit of $\mu_0$, and $g x_0=x_0$ implies $\Ad_*^{\Gamma,\theta}(g)(\mu_0)=\mu_0$. The orbit map $\hat x_0$ is a
subduction by homogeneity, so $\mu$ is smooth into $O$ if and only if $\mu\circ\hat x_0=\hat\mu_0$ is, which holds by the definition of the pushforward
diffeology. A plot of $O$ lifts locally along $\hat\mu_0$ to a plot of $G$, whose image under $\hat x_0$ is a local lift along $\mu$; so $\mu$ is a
subduction.
\end{solution}

\begin{exercise}[label=exo:quasitori-symplectic]{4}
Prove \cref{prop:quasitori-symplectic}.
\end{exercise}
\begin{solution}
\emph{Homogeneity.} Translations preserve $\omega_\Omega$, so there is a smooth homomorphism $\rho\colon\R^n\to\Dif(T_\Gamma,\omega_\Omega)$. Let $P$ be a plot of
$T_\Gamma$ and $x_0=q(\tilde x_0)$. Locally $P=q\circ\tilde P$ with $\tilde P$ smooth in $\R^n$, and $r\mapsto\rho(\tilde P(r)-\tilde x_0)$ is a plot of
$\Dif(T_\Gamma,\omega_\Omega)$ whose image under the orbit map of $x_0$ is $P$. So the orbit map is a subduction.
\emph{Characteristics.} By \cref{prop:universal}, the moment map $\mu$ of the translations is $\rho^*_\Gamma\circ\mu_\omega$ up to a constant. By
\cref{prop:dual-torus}, $\mu$ is injective; hence $\mu_\omega$ is injective and its fibres are points. \emph{The orbit.} For $G=\R^n$ the coadjoint
action is trivial and $\theta(u)=[\Omega(u,\cdot)]$, so the affine action on $(\R^n)^*/\Omega(\Gamma,\cdot)$ is by translations and is transitive; $\mu$ is the
diffeomorphism of \cref{prop:dual-torus}.
\end{solution}


\part{One level up}

\chapter{Prequantisation}\label{ch:prequantum}
\chaptermark{Prequantisation}

\begin{chapabstract}
A prequantisation of a parasymplectic space is a principal bundle with connection whose curvature is the given form; its structure group
is a torus of periods $\R/P$, and $P$ need not be cyclic. In $\Hh$ it is a lift of $\omega\colon X\to\Omcl$ to the stack $\BTc$. We describe
that stack, bound the periods, compute the examples, and determine the automorphisms of a prequantum bundle that cover the identity.
\end{chapabstract}

\section{Tori of periods and bundles with connection}

Let $P\subsetneq\R$ be a subgroup. A proper subgroup of $\R$ contains no interval, so its plots for the subspace diffeology are locally
constant: $P$ is discrete as a diffeological group, countable or not, and $\R\to T_P=\R/P$ is a covering \IZ{art.~8.37}. The form $\dd t$ descends
to the canonical form $\theta\in\Om^1(T_P)$. For $P=\Z$ this is the circle; for $P=\Z+\alpha\Z$ it is the irrational torus.

\begin{definition}[\IZ{art.~8.37}]\label{def:connection}
Let $\pi\colon Y\to X$ be a principal $T_P$-bundle of diffeological spaces, with action $(\tau,y)\mapsto\tau\cdot y$ and orbit maps
$\hat y\colon T_P\to Y$. A \defn{connection form} is a $1$-form $\lambda$ on $Y$ which is \emph{invariant}, $\tau_Y^*\lambda=\lambda$ for all $\tau$, and
\emph{calibrated}, $\hat y^*\lambda=\theta$ for all $y$.
\end{definition}

\begin{lemma}\label{lem:connection}
Let $\lambda$ be a connection form on $\pi\colon Y\to X$, and $\Phi_T\colon T_P\times Y\to Y$ the action map.
\begin{enumerate}[label=\textup{(\roman*)}]
\item $\Phi_T^*\lambda=\pr_T^*\theta+\pr_Y^*\lambda$. For a plot $s$ of $Y$ and a plot $g$ of $T_P$ on the same domain, $(g\cdot s)^*\lambda=s^*\lambda+g^*\theta$.
\item There is a unique closed $2$-form $\omega$ on $X$, the \defn{curvature}, with $\pi^*\omega=\dd\lambda$.
\item For a smooth $\tau\colon X\to T_P$, the gauge transformation $y\mapsto\tau(\pi(y))\cdot y$ maps $\lambda$ to $\lambda+\pi^*\tau^*\theta$.
\end{enumerate}
\end{lemma}
\begin{proof}
(i) Both sides are $1$-forms on a product with the same restrictions to the slices: $\tau_Y^*\lambda=\lambda$ on $\{\tau\}\times Y$ and
$\hat y^*\lambda=\theta$ on $T_P\times\{y\}$. They coincide by \cref{lem:slices}. The second formula is the pullback of the first by $(g,s)$. (ii) By
(i), $\Phi_T^*\dd\lambda=\pr_Y^*\dd\lambda$, since $\dd\theta=0$. The action is principal, so $\dd\lambda$ descends by \cref{prop:basic}(i); the descended form is
closed because $\pi^*$ is injective. (iii) The gauge transformation is $\Phi_T\circ(\tau\circ\pi,\id_Y)$; pull back (i).
\end{proof}

The stack $\BTc$ is defined on Cartesian spaces by the groupoids
\[
\BTc(U)=\Bigl\{\ \text{objects } A\in\Om^1(U);\quad\text{morphisms } g\colon A\to A+g^*\theta,\ g\in\cinf(U,T_P)\ \Bigr\},
\]
the groupoid of connection forms on the trivial bundle $U\times T_P$ and gauge transformations \VolI{\S6.5}. There are maps
\begin{equation}\label{eq:tower}
\begin{tikzcd}[column sep=3em]
\Om^1 \arrow[r] \arrow[dr,"\dd"'] & \BTc \arrow[r] \arrow[d,"F"] & \B T_P\\
& \Omcl &
\end{tikzcd}
\end{equation}
where $F(A)=\dd A$ is the curvature, the horizontal maps send a form to the trivial bundle with that connection and a bundle with connection
to its underlying bundle, and the row is a fibre sequence.

\begin{proposition}\label{prop:BTconn}
For a diffeological space $X$, the groupoid $\Map(X,\BTc)$ is equivalent to the groupoid of principal $T_P$-bundles over $X$ with a connection
form and their connection-preserving isomorphisms. Under this equivalence, composition with $F$ is the curvature of \cref{lem:connection}.
\end{proposition}
\begin{proof}
As in \VolI{Theorem~7.5}, $X$ is the colimit in $\Hh$ of its plots and $\Map(X,\BTc)\simeq\lim_{(U\to X)}\BTc(U)$. Given $(Y,\lambda)$ and a plot
$P\colon U\to X$, the pullback $P^*Y$ is trivial \VolI{Lemma~7.4}; a section $s$ gives the object $A_s=s^*\lambda$, and by \cref{lem:connection}(i)
another section $g\cdot s$ gives $A_s+g^*\theta$, an isomorphic object. This defines a point of the limit. Conversely a point of the limit has an
underlying map $X\to\B T_P$, which is a principal bundle $Y$ \VolI{Theorem~7.5}, together with a connection form $\lambda_P$ on each $P^*Y$,
compatible with reparametrisation. For a plot $R$ of $Y$ let $P=\pi\circ R$; then $R$ is a section of $P^*Y$ and $\lambda(R)=R^*\lambda_P$ defines a
$1$-form on $Y$, invariant and calibrated because each $\lambda_P$ is. The two constructions are inverse, and $\dd A_s=s^*\dd\lambda=P^*\omega$.
\end{proof}

\section{Prequantum bundles}

\begin{definition}\label{def:prequantum}
A \defn{prequantisation} of a parasymplectic space $(X,\omega)$ with group of periods $P$ is a principal $T_P$-bundle with connection $(Y,\lambda)$
over $X$ with curvature $\omega$; equivalently, a lift
\[
\begin{tikzcd}[column sep=3em,row sep=2em]
& \BTc \arrow[d,"F"]\\
X \arrow[r,"\omega"'] \arrow[ur,dashed,"\nabla"] & \Omcl
\end{tikzcd}
\]
\end{definition}

\begin{theorem}[Integration bundles, \IZ{art.~8.42}; \VolI{Theorem~6.11}]\label{thm:integration2}
Let $(X,\omega)$ be connected and simply connected, with group of periods $P_\omega\neq\R$. Then $(X,\omega)$ has a prequantisation with structure
group $T_{P_\omega}=\R/P_\omega$.
\end{theorem}

The classical condition that the periods be integral, up to a common factor, is the condition that $P_\omega$ be cyclic, so that $T_{P_\omega}$ is a
circle. No such condition appears in the theorem: for $S^2\times S^2$ with incommensurable areas the structure group is an irrational torus
(\cref{ex:periods}), and the bundle is constructed in \cref{thm:S2S2}. Conversely the periods bound the structure group from below.

\begin{proposition}[Periods lie in $P$]\label{prop:periods-bound}
If $(X,\omega)$ has a prequantisation with structure group $T_P$, then for every smooth map $S$ from $T^2$ or $S^2$ to $X$ the period
$\int S^*\omega$ belongs to $P$.
\end{proposition}
\begin{proof}
For the torus, pull $(Y,\lambda)$ back along $\R^2\to T^2\xrightarrow{S}X$. Over $\R^2$ the bundle is trivial, with connection $A\in\Om^1(\R^2)$,
$\dd A=\tilde S^*\omega$. The translations $\tau_1,\tau_2$ by the basis vectors act on the pulled-back bundle; in the trivialisation they are gauge
transformations $g_i\colon\R^2\to T_P$ with $\tau_i^*A=A+g_i^*\theta$, and $g_i$ lifts to $\hat g_i\colon\R^2\to\R$. Stokes' formula on the unit square
(\cref{fig:square}) gives
\[
\int_{[0,1]^2}\dd A=\bigl(\hat g_1(e_2)-\hat g_1(0)\bigr)-\bigl(\hat g_2(e_1)-\hat g_2(0)\bigr).
\]
The two translations commute, so $g_2(x+e_1)+g_1(x)=g_1(x+e_2)+g_2(x)$ in $T_P$, and the right-hand side is the value at $0$ of a function
with values in $P$. The sphere is \cref{exo:sphere-periods}.
\end{proof}

\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small,scale=1.0]
 \begin{scope}
  \fill[hcsgold!30] (0,0) rectangle (2.4,2.4);
  \draw[hcsink,line width=0.9pt,->] (0,0)--(2.4,0); \draw[hcsink,line width=0.9pt,->] (2.4,0)--(2.4,2.4);
  \draw[hcsink,line width=0.9pt,->] (2.4,2.4)--(0,2.4); \draw[hcsink,line width=0.9pt,->] (0,2.4)--(0,0);
  \node at (0.65,1.75) {$\int\dd A$};
  \draw[hcsrust,<->] (1.7,0.08)--(1.7,2.32);
  \node[hcsrust,right] at (2.5,1.6) {$\tau_2$: $+\dd\hat g_2$};
  \draw[hcsteal,<->] (0.08,0.6)--(2.32,0.6);
  \node[hcsteal,right] at (2.5,0.6) {$\tau_1$: $+\dd\hat g_1$};
  \node[below] at (1.2,-0.1) {a period is a mismatch of gauges};
 \end{scope}
 \begin{scope}[xshift=6.6cm,yshift=0.2cm]
  \node (O1) at (0,2) {$\Om^1$}; \node (BC) at (2.4,2) {$\BTc$}; \node (BT) at (4.8,2) {$\B T_P$};
  \node (O2) at (2.4,0) {$\Omcl$}; \node (X) at (0,0) {$X$};
  \draw[->] (O1)--(BC); \draw[->] (BC)--(BT); \draw[->] (BC)--node[right]{$F$}(O2);
  \draw[->] (X)--node[below]{$\omega$}(O2); \draw[->,dashed] (X)--node[above left,pos=0.6]{$\nabla$}(BC);
  \draw[->,hcsrust,dashed] (X)--node[left]{$\alpha$}(O1);
  \node[below,align=center] at (2.4,-0.45) {a primitive $\alpha$ is a prequantisation\\ with a trivialisation of the bundle};
 \end{scope}
\end{tikzpicture}
\caption{Left: the proof of \cref{prop:periods-bound}. Right: the three ways of presenting a closed $2$-form, as a form, as a curvature, and
as an exact form.}\label{fig:square}
\end{figure}

\section{Examples}

\begin{example}[Exact forms]\label{ex:exact-prequantum}
If $\omega=\dd\alpha$, then for every $P$ the trivial bundle $Y=X\times T_P$ with $\lambda=\pr_X^*\alpha+\pr_T^*\theta$ is a prequantisation. Two primitives that
differ by $\dd h$ give isomorphic prequantisations (\cref{exo:exact-prequantum}).
\end{example}

\begin{example}[The Heisenberg bundle]\label{ex:heisenberg}
On $\R^2$ with $\omega=\dd x\wedge\dd y=\dd(x\,\dd y)$, the previous example with $P=0$ is $Y=\R^3$ with $\lambda=\dd z+x\,\dd y$. The group structure
$(x,y,z)(x',y',z')=(x+x',y+y',z+z'-xy')$ on $Y$ makes it the Heisenberg group $\Heis$; left multiplications preserve $\lambda$ and cover the
translations of the plane. The subgroup $N=\Z^3$ acts on the left, $\lambda$ descends to $N\backslash\Heis$, and $N\backslash\Heis\to\R^2/\Z^2$ is a prequantisation of the
torus of area $1$ with $P=\Z$. In \cref{ch:number-theory} $\Z$ is replaced by the ring of integers of a number field.
\end{example}

\begin{example}[The cone]\label{ex:cone-prequantum}
The form $\omega_m$ of the cone orbifold is exact, $\omega_m=\dd\alpha_m$ (\cref{exo:cone-moment}), so $Q_m\times T_P$ is a prequantisation for every $P$.
It is the quotient of the trivial bundle $\C\times T_P$ by $\Z_m$ acting on the first factor.
\end{example}

\section{Automorphisms}

An automorphism of a prequantum bundle $(Y,\lambda)$ is a diffeomorphism $\phi$ of $Y$ that commutes with the action of $T_P$ and satisfies
$\phi^*\lambda=\lambda$. It covers a diffeomorphism of $X$, which preserves $\omega$ because $\pi^*$ is injective. The group $\Aut(Y,\lambda)$ has the
functional diffeology.

\begin{theorem}[The Kostant--Souriau sequence]\label{thm:KS}
Let $(Y,\lambda)$ be a prequantisation of a connected parasymplectic space $(X,\omega)$. The sequence of diffeological groups
\[
1\longrightarrow T_P\longrightarrow\Aut(Y,\lambda)\longrightarrow\Dif(X,\omega)
\]
is exact, and $T_P$ is central. If $X=\R^{2n}$ with a constant symplectic form and $P=0$, the last map is surjective, and the preimage of the
group of translations is the Heisenberg group.
\end{theorem}
\begin{proof}
An automorphism covering the identity is a gauge transformation by some $\tau\colon X\to T_P$. By \cref{lem:connection}(iii) it preserves
$\lambda$ if and only if $\pi^*\tau^*\theta=0$, that is, $\tau^*\theta=0$. For a plot $Q$ of $X$, the map $\tau\circ Q$ lifts locally to a real function $f$ with
$\dd f=(\tau\circ Q)^*\theta=0$, so $\tau\circ Q$ is locally constant; since $X$ is connected, $\tau$ is constant. Constants are central because
automorphisms commute with the action of $T_P$. For $\R^{2n}$ with $\omega=\dd\alpha$ and $Y=\R^{2n}\times\R$, $\lambda=\dd z+\alpha$: if $f^*\omega=\omega$ then
$f^*\alpha-\alpha=\dd h$ for a function $h$, and $(v,z)\mapsto(f(v),z-h(v))$ is an automorphism covering $f$. For translations, with $\alpha=B(v,\dd v)$
and $B$ bilinear, these are the left multiplications of $\Heis_B$.
\end{proof}

\begin{figure}[t]
\centering
\begin{tikzcd}[column sep=2.6em,row sep=2.2em]
1 \arrow[r] & T_P \arrow[r] & \Aut(Y,\lambda) \arrow[r] & \Dif(X,\omega) & & \Hh/\BTc \arrow[d,"F_!"]\\
1 \arrow[r] & \R \arrow[r] \arrow[u,equal] & \Heis_B \arrow[r] \arrow[u,hook] & \R^{2n} \arrow[r] \arrow[u,hook] & 1 & \Hh/\Omcl
\end{tikzcd}
\caption{The Kostant--Souriau sequence of \cref{thm:KS} and, for $X=\R^{2n}$ and $P=0$, its restriction to the translations. Both groups
are automorphism groups in slices of $\Hh$, and the sequence is induced by the curvature map $F$.}\label{fig:KS}
\end{figure}

In the language of \cite{FRS1,FRS2}: $\Aut(Y,\lambda)$ is the automorphism group of $\nabla\colon X\to\BTc$ in the slice $\Hh/\BTc$, as $\Dif(X,\omega)$ is
the automorphism group of $\omega$ in the slice over $\Omcl$ (\cref{prop:slice}), and the sequence is induced by $F$. The kernel $T_P$ is the
group of automorphisms of the trivial flat bundle over a connected space.

\begin{proposition}[Characters]\label{prop:characters}
The smooth homomorphisms $T_P\to U(1)$ are $[t]\mapsto e^{2\pi ikt}$ with $k\in\R$, $kP\subseteq\Z$. If $P$ contains two elements with irrational
ratio, the only one is trivial.
\end{proposition}
\begin{proof}
A smooth homomorphism $T_P\to\R/\Z$ composed with $\R\to T_P$ lifts to a smooth homomorphism $\R\to\R$, $t\mapsto kt$, which maps $P$ into $\Z$. If
$a,b\in P$ and $ka,kb\in\Z$ with $k\neq0$ then $a/b\in\Q$.
\end{proof}

So a prequantum bundle with a dense group of periods has no associated Hermitian line bundle, and the usual passage from the principal
bundle to a space of sections is not available. The three presentations of a closed $2$-form are compared in \cref{tab:levels}.

\begin{table}[h]\centering\small
\begin{tabular}{@{}p{2.9cm}p{3.2cm}p{3.3cm}p{3.4cm}@{}}\toprule
datum on $X$ & classifying object & automorphisms & exists when\\\midrule
closed $2$-form $\omega$ & $\Omcl$, a sheaf & $\Dif(X,\omega)$ & ---\\
prequantisation $\nabla$ & $\BTc$, a stack & $\Aut(Y,\lambda)$, an extension by $T_P$ & periods in $P$; \cref{thm:integration2}\\
primitive $\alpha$ & $\Om^1$, a sheaf & $\Dif(X,\alpha)$ & $\omega$ exact\\\bottomrule
\end{tabular}
\caption{Three levels of structure and their classifying objects.}\label{tab:levels}
\end{table}

\exercisesheading

\begin{exercise}[label=exo:exact-prequantum]{1}
Verify that $\lambda=\pr_X^*\alpha+\pr_T^*\theta$ is a connection form on $X\times T_P$ with curvature $\dd\alpha$, and that the prequantisations defined by
$\alpha$ and $\alpha+\dd h$ are isomorphic.
\end{exercise}
\begin{solution}
The action of $T_P$ is by translation of the second factor; $\theta$ is translation-invariant and $\pr_X$ is invariant, so $\lambda$ is invariant. The
orbit map of $(x,\tau)$ is $\sigma\mapsto(x,\sigma+\tau)$, which pulls $\lambda$ back to $\theta$. $\dd\lambda=\pr_X^*\dd\alpha$. The gauge transformation by
$\tau=[h]\colon X\to T_P$ maps $\lambda$ to $\lambda+\pr_X^*\dd h$ by \cref{lem:connection}(iii), since $[h]^*\theta=\dd h$.
\end{solution}

\begin{exercise}[label=exo:heis-holonomy]{2}
In the Heisenberg bundle $(\R^3,\dd z+x\,\dd y)$, compute the horizontal lift of the boundary of the rectangle $[x_0,x_0+a]\times[y_0,y_0+b]$,
traversed counter-clockwise from $(x_0,y_0,z_0)$.
\end{exercise}
\begin{solution}
A curve is horizontal if $\dot z=-x\dot y$. Along the bottom edge $\dot y=0$ and $z=z_0$. Along the right edge $x=x_0+a$ and $z$ decreases by
$(x_0+a)b$. Along the top edge $z$ is constant. Along the left edge $x=x_0$, $y$ decreases by $b$, and $z$ increases by $x_0b$. The lift ends at
$z_0-ab$: the holonomy is minus the area, as in the frontispiece, in accordance with $\int\dd\lambda=\int\omega$ and \cref{lem:connection}(ii).
\end{solution}

\begin{exercise}[label=exo:characters]{2}
Compute the smooth characters of $T_P$ for $P=\Z$, $P=\Z+\sqrt2\,\Z$ and $P=\Q$.
\end{exercise}
\begin{solution}
By \cref{prop:characters} the characters are indexed by $\set{k\in\R\mid kP\subseteq\Z}$. For $P=\Z$ this is $\Z$. For $P=\Z+\sqrt2\Z$, $k\in\Z$ and
$k\sqrt2\in\Z$ force $k=0$. For $P=\Q$, $k/n\in\Z$ for all $n$ forces $k=0$. In the last two cases the group $T_P$ has no non-trivial smooth
unitary character, although $\R/\Q$ has many discontinuous ones.
\end{solution}

\begin{exercise}[label=exo:sphere-periods]{3}
Prove \cref{prop:periods-bound} for the sphere.
\end{exercise}
\begin{solution}
Pull the bundle back to $S^2$ by $S$. Let $U_N,U_S$ be the complements of the south and north poles; they are diffeomorphic to $\R^2$, so the
bundle is trivial over each, with connections $A_N,A_S$, $\dd A_N=S^*\omega$, $\dd A_S=S^*\omega$. On $U_N\cap U_S$ the trivialisations differ by
$g\colon U_N\cap U_S\to T_P$ and $A_N=A_S+g^*\theta$ by \cref{lem:connection}(i). Stokes' formula on the two closed hemispheres, whose common boundary is
the equator $E$ with opposite orientations, gives $\int_{S^2}S^*\omega=\int_E(A_N-A_S)=\int_Eg^*\theta$. The map $g|_E\colon S^1\to\R/P$ lifts along the
covering $\R\to S^1$ to $\hat g\colon\R\to\R$ with $\hat g(t+1)-\hat g(t)\in P$, and $\int_Eg^*\theta=\hat g(1)-\hat g(0)\in P$.
\end{solution}

\begin{exercise}[label=exo:quantomorphisms]{4}
Let $X=\R^2$, $\omega=\dd x\wedge\dd y$, $(Y,\lambda)=(\R^3,\dd z+x\,\dd y)$. Determine the automorphisms of $(Y,\lambda)$ covering the linear symplectic maps
$A\in\SL_2(\R)$, and show that $A\mapsto\hat A$ can be chosen to be a homomorphism.
\end{exercise}
\begin{solution}
By the proof of \cref{thm:KS}, the lifts of $A$ are $(v,z)\mapsto(Av,z-h(v)+c)$ with $\dd h=A^*\alpha-\alpha$, $\alpha=x\,\dd y$. Put $\beta=\tfrac12(x\,\dd y-y\,\dd x)$,
which is invariant under $\SL_2(\R)$, and note $\alpha=\beta+\dd(\tfrac12xy)$. Then $A^*\alpha-\alpha=\dd\bigl(\tfrac12(xy)\circ A-\tfrac12xy\bigr)$, so
$h=q_A$ with $q_A(v)=\tfrac12\bigl((xy)(Av)-xy\bigr)$, a quadratic form. The choice $\hat A(v,z)=(Av,z-q_A(v))$ is a homomorphism: in the coordinate
$\zeta=z+\tfrac12xy$ it is $(v,\zeta)\mapsto(Av,\zeta)$, and $\lambda=\dd\zeta+\beta$. So $\SL_2(\R)$ acts on the Heisenberg bundle by automorphisms, and
$\Aut(Y,\lambda)$ contains the semidirect product of $\SL_2(\R)$ with the Heisenberg group.
\end{solution}



\chapter{Equivariance and the moment map}\label{ch:equivariant}
\chaptermark{Equivariance}

\begin{chapabstract}
When the action of a group lifts to a prequantum bundle, the moment map is the pullback of the connection form along the orbits upstairs.
It is equivariant, and it vanishes exactly when the bundle with its connection descends to the homotopy quotient. When the action does not
lift, it lifts for a central extension of the group, and the Souriau cocycle is the coadjoint action of the extension on its central
momentum.
\end{chapabstract}

\section{The moment map of an equivariant prequantum bundle}

Throughout, $(X,\omega)$ is a connected parasymplectic space with a prequantisation $(Y,\lambda)$, $\pi\colon Y\to X$, with group of periods $P$, and
$\rho\colon G\to\Dif(X,\omega)$ is a smooth action of a diffeological group.

\begin{definition}\label{def:equivariant}
An \defn{equivariant prequantisation} is a smooth action $\Phi\colon G\times Y\to Y$ by automorphisms of $(Y,\lambda)$ covering $\rho$; equivalently, a smooth
homomorphism $G\to\Aut(Y,\lambda)$ lifting $\rho$ through the sequence of \cref{thm:KS}.
\end{definition}

\begin{theorem}[A: the prequantum moment map]\label{thm:A}
Let $(Y,\lambda)$ be an equivariant prequantisation. For $x\in X$ choose $y\in\pi^{-1}(x)$ and put
\[
\mu(x)=\hat y^*\lambda\in\Om^1(G),\qquad\hat y\colon G\to Y,\ g\mapsto g\cdot y .
\]
\begin{enumerate}[label=\textup{(\roman*)}]
\item $\mu(x)$ is independent of $y$ and is left-invariant; $\mu\colon X\to\Gs$ is smooth.
\item $\mu(g\cdot x)=\Ad_*(g)\,\mu(x)$.
\item For every path $p$ in $X$, the paths moment map of \cref{thm:paths-moment} is $\Psi(p)=\mu(p(1))-\mu(p(0))$.
\end{enumerate}
Consequently the holonomy $\Gamma$ and the Souriau class $\sigma$ of the action vanish, and $\mu$ is an equivariant moment map in the sense of
\cref{thm:moment}.
\end{theorem}
\begin{proof}
(i) For $\tau\in T_P$, $\widehat{\tau y}=\tau_Y\circ\hat y$ because the two actions commute, and $\tau_Y^*\lambda=\lambda$. For $h\in G$,
$\hat y\circ L(h)=h_Y\circ\hat y$ and $h_Y^*\lambda=\lambda$, so $L(h)^*\mu(x)=\mu(x)$. Smoothness: over a plot of $X$ with Cartesian domain $U$ the bundle has a
section $s$, and $r\mapsto\mu(Q(r))$ is the family of restrictions to the slices $G\times\{r\}$ of the form $(\Phi\circ(\id\times s))^*\lambda$ on $G\times U$.
(ii) $\widehat{g y}=\hat y\circ R(g)$, and $gy$ lies over $gx$.
(iii) The pullback $p^*Y$ is a principal bundle over $\R$, hence trivial, so $p$ has a smooth lift $\tilde p\in\Paths(Y)$. Let
$\pi_*\colon\Paths(Y)\to\Paths(X)$ be induced by $\pi$; then $\pi_*\circ\hat{\tilde p}=\hat p$, where $\hat{\tilde p}(g)=g_Y\circ\tilde p$. By naturality of
$K$ and \eqref{eq:K},
\[
\Psi(p)=\hat{\tilde p}^{\,*}(\pi_*)^*K\omega=\hat{\tilde p}^{\,*}K(\pi^*\omega)=\hat{\tilde p}^{\,*}K(\dd\lambda)
=\hat{\tilde p}^{\,*}\bigl(\hat1^*\lambda-\hat0^*\lambda-\dd(K\lambda)\bigr).
\]
The function $K\lambda\circ\hat{\tilde p}$ is $g\mapsto\int_{g_Y\circ\tilde p}\lambda=\int_{\tilde p}g_Y^*\lambda=\int_{\tilde p}\lambda$, a constant, so the last
term vanishes. The composite $\hat1\circ\hat{\tilde p}$ is the orbit map of $\tilde p(1)$, which lies over $p(1)$; so the first term is $\mu(p(1))$,
and the second is $\mu(p(0))$. For a loop $\Psi=0$; hence $\Gamma=0$, $\psi(x,x')=\mu(x')-\mu(x)$, and $\theta=0$ by (ii).
\end{proof}

For the trivial bundle of an invariant primitive $\alpha$ (\cref{ex:exact-prequantum}), with $G$ acting on the first factor, $\mu(x)=\hat x^*\alpha$:
\cref{thm:A} contains \cref{thm:exact}. The classical formula $\langle\mu,\xi\rangle=\lambda(\xi_Y)$ for the moment map of a prequantised Hamiltonian
action of a Lie group, due to Kostant and Souriau \cite{Kostant,Souriau}, is the value of $\hat y^*\lambda$ at the identity.

\begin{proposition}[Characters and levels]\label{prop:levels}
The equivariant structures on $(Y,\lambda)$ covering $\rho$ form a torsor under the group $\Hom^\infty(G,T_P)$ of smooth characters, or are absent.
Twisting by a character $\chi$, $g\star y=\chi(g)\cdot(g\cdot y)$, changes the moment map to $\mu+\chi^*\theta$. For $G=S^1=\R/2\pi\Z$ the moment maps of
the equivariant structures are $\mu_0+c$ with $2\pi c\in P$.
\end{proposition}
\noindent The proof is \cref{exo:levels}. So the constant of \cref{thm:moment}(iii), which is arbitrary for the form $\omega$, is quantised for the
bundle: the admissible levels are $c\in\tfrac1{2\pi}P$. If the level is prescribed, the group of periods must contain $2\pi c$. This is the
origin of the integrality condition in the reduction of \cref{ch:reduction}.

\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
 \begin{scope}
  \fill[hcsmist] (0,0) rectangle (4.2,2.6);
  \draw[hcsteal] (0,0) rectangle (4.2,2.6);
  \draw[hcsrust,line width=1pt] (0,1.5)--(4.2,1.5);
  \draw[hcsgold,line width=1.2pt] (2.6,0)--(2.6,2.6);
  \node[hcsrust,above] at (1.2,1.5) {$\{g\}\times Y$};
  \node[hcsgold!70!black,right] at (2.6,0.5) {$G\times\{y\}$};
  \node[left] at (0,1.3) {$G$}; \node[below] at (2.1,0) {$Y$};
  \node[below,align=left] at (2.1,-0.5) {on $\{g\}\times Y$:\quad $g_Y^*\lambda-\lambda=0$\quad (invariance)\\ on $G\times\{y\}$:\quad $\hat y^*\lambda=\mu(x)$\quad (moment)};
 \end{scope}
 \begin{scope}[xshift=6.3cm,yshift=1.3cm]
  \node (A) at (0,1.1) {$X\hquot G^{\delta}$}; \node (B) at (2.6,1.1) {$X\hquot G$}; \node (C) at (5.0,1.1) {$X/G$};
  \node (T) at (2.6,-0.7) {$\BTc$};
  \draw[->] (A)--(B); \draw[->] (B)--(C);
  \draw[->] (A)--node[below left]{invariance}(T);
  \draw[->,dashed] (B)--node[right]{$\mu=0$}(T);
  \draw[->,dashed] (C)--node[below right]{principal}(T);
  \node[below,align=center] at (2.6,-1.3) {successive conditions for descent};
 \end{scope}
\end{tikzpicture}
\caption{Left: the $1$-form $\Phi^*\lambda-\pr_Y^*\lambda$ on $G\times Y$ is determined by its restrictions to the two families of slices
(\cref{lem:slices}). Right: the corresponding factorisations of the prequantum bundle.}\label{fig:descent}
\end{figure}

\section{Descent to the homotopy quotient}

Let $G^\delta$ be the group $G$ with the discrete diffeology. The identity $G^\delta\to G$ induces $X\hquot G^\delta\to X\hquot G$, and there is the
projection $X\hquot G\to X/G$.

\begin{theorem}[B: descent]\label{thm:B}
\begin{enumerate}[label=\textup{(\roman*)}]
\item $\Map(X\hquot G^\delta,\BTc)$ is the groupoid of prequantum data $(Y,\lambda)$ with an action of the abstract group $G$ by automorphisms.
\item The groupoid of equivariant prequantum data is the fibre product
\[
\Map(X\hquot G,\B T_P)\times_{\Map(X\hquot G^\delta,\B T_P)}\Map(X\hquot G^\delta,\BTc),
\]
and its objects have the moment maps $\mu$ of \cref{thm:A}, which are equivariant smooth maps $X\to\Gs$.
\item $\Map(X\hquot G,\BTc)$ is the full subgroupoid of equivariant prequantum data with $\mu=0$.
\item If the action of $G$ on $X$ is principal and $\mu=0$, then $(Y,\lambda)$ is the pullback of a bundle with connection $(Y_0,\lambda_0)$ on $X/G$,
unique up to isomorphism, whose curvature $\omega_0$ satisfies $\pi_G^*\omega_0=\omega$.
\end{enumerate}
\end{theorem}
\begin{proof}
The homotopy quotient is the colimit of the simplicial object $G^{\bullet}\times X$, and $\BTc$ is $1$-truncated, so a map out of it is a descent
datum: an object over $X$, an isomorphism between its two pullbacks to $G\times X$, and a cocycle condition over $G\times G\times X$. By
\cref{prop:BTconn} the object is a pair $(Y,\lambda)$. An isomorphism $\pr_X^*Y\to a^*Y$ of principal bundles over $G\times X$ is a smooth map
$\Phi\colon G\times Y\to Y$ covering the action and commuting with $T_P$; the cocycle condition is that $\Phi$ be an action; and the isomorphism
preserves the connections if and only if
\begin{equation}\label{eq:descent}
\Phi^*\lambda=\pr_Y^*\lambda\quad\text{on }G\times Y .
\end{equation}
By \cref{cor:product-momenta}, \eqref{eq:descent} holds if and only if $g_Y^*\lambda=\lambda$ for all $g$ and $\hat y^*\lambda=0$ for all $y$, that is, if and only if
$\Phi$ is an equivariant prequantisation with $\mu=0$. This is (iii). For $G^\delta$ the plots of the first factor are locally constant, the
slices $G\times\{y\}$ contribute nothing, and smoothness in $g$ is no condition; this is (i). For (ii), the fibre product imposes that the
bundle isomorphism be smooth over $G\times X$ and preserve the connection on each slice $\{g\}\times X$. (iv) By \VolI{Theorem~7.2},
$X/G\simeq X\hquot G$, so (iii) is a map $X/G\to\BTc$, which is a bundle with connection by \cref{prop:BTconn}; its curvature pulls back to $\omega$
because $F$ is a map of stacks.
\end{proof}

Three conditions that are stated together in the classical theory are separate in the theorem. Invariance of the connection under each group element is
descent to $X\hquot G^\delta$. Smoothness of the lifted action is descent of the underlying bundle to $X\hquot G$. The vanishing of the
moment map is the remaining condition for the connection: it is the statement that the connection has no component along the group.

\section{The central extension}

Suppose only that each $\rho(g)$ lifts to an automorphism of $(Y,\lambda)$, and let
\[
\hat G=G\times_{\Dif(X,\omega)}\Aut(Y,\lambda)=\set{(g,\phi)\mid\phi\text{ covers }\rho(g)}
\]
with the subspace diffeology of the product.

\begin{theorem}[The prequantum extension]\label{thm:extension}
\begin{enumerate}[label=\textup{(\roman*)}]
\item $1\to T_P\xrightarrow{\,i\,}\hat G\to G\to1$ is a central extension of diffeological groups.
\item $\hat G$ acts on $(Y,\lambda)$ by automorphisms, so $(Y,\lambda)$ is an equivariant prequantisation for $\hat G$, with an equivariant moment map
$\hat\mu\colon X\to\hat{\mathcal G}^*$ by \cref{thm:A}.
\item $i^*\hat\mu(x)=\theta$ for every $x$: the moment map of the centre is the constant $1$.
\item The equivariant prequantisations for $G$ are the smooth homomorphic sections $s$ of $\hat G\to G$, and the moment map of $s$ is $s^*\circ\hat\mu$.
\end{enumerate}
\end{theorem}
\noindent The proof is \cref{exo:extension}. By part (iv) the obstruction to an equivariant prequantisation is the class of the extension: if $\hat G\to G$
has no homomorphic section there is no equivariant prequantisation, although every element of $G$ preserves the isomorphism class of the bundle.

\begin{example}[Translations and the Heisenberg group]\label{ex:heis-extension}
Let $X=\R^{2n}$ with a constant symplectic form $\Omega$, the antisymmetrisation of a bilinear form $B$, and $G=\R^{2n}$ acting by translations. By
\cref{thm:KS}, $\hat G$ is the Heisenberg group $\Heis_B$ acting on $Y=\Heis_B$ by left multiplication. The commutator of $(u,c)$ and $(v,c')$ is
$(0,-\Omega(u,v))$, while $G$ is abelian: there is no homomorphic section. The moment map of $\Heis_B$ is computed from the orbit map
$(a,c)\mapsto(a,c)(x,0)=(a+x,\,c-B(a,x))$:
\[
\hat\mu(x)=\lambda_{\Heis}+\Omega(x,\cdot),\qquad\lambda_{\Heis}=\dd c+B(a,\dd a),
\]
where $\lambda_{\Heis}$ is the left-invariant form dual to the centre. The coadjoint action on it is
$\Ad_*(u,c)\,\lambda_{\Heis}=\lambda_{\Heis}+\Omega(u,\cdot)$ (\cref{exo:heis-coadjoint}).
\end{example}

Comparing with \cref{ex:translations}: the non-equivariant moment map $\mu(x)=\Omega(x,\cdot)$ of the translations is the non-central part of the
equivariant moment map $\hat\mu$ of the Heisenberg group, and its Souriau cocycle $\theta(u)=\Omega(u,\cdot)$ is the coadjoint action of the extension on
the central momentum. The affine coadjoint orbit of \cref{exo:plane-orbit} is the linear coadjoint orbit of $\lambda_{\Heis}$ in $\hat{\mathcal G}^*$.

\begin{table}[h]\centering\small
\begin{tabular}{@{}p{3.3cm}p{4.6cm}p{5.2cm}@{}}\toprule
obstruction & vanishes when & example where it is non-zero\\\midrule
holonomy $\Gamma\subset\Gs$ & the action is Hamiltonian & translations of a quasi-torus (\cref{prop:dual-torus})\\
Souriau class $\sigma$ & some moment map is equivariant & translations of the plane (\cref{ex:translations})\\
class of $\hat G\to G$ & the action lifts to $(Y,\lambda)$ & translations and $\Heis$ (\cref{ex:heis-extension})\\
moment map $\mu$ & $(Y,\lambda)$ descends to $X\hquot G$ & rotations of the plane (\cref{ex:rotations})\\\bottomrule
\end{tabular}
\caption{Four successive obstructions for a group acting on a prequantised space.}\label{tab:obstructions}
\end{table}

\exercisesheading

\begin{exercise}[label=exo:rot-levels]{1}
For the rotations of $\C$ and the trivial bundle $\C\times T_P$ with $\lambda=\alpha+\theta$, list the equivariant structures and their moment maps.
\end{exercise}
\begin{solution}
The action $e^{i\varphi}\cdot(z,t)=(e^{i\varphi}z,t)$ is an equivariant structure with $\mu_0(z)=\tfrac12\abs z^2$ (\cref{ex:rotations}). By
\cref{prop:levels} the others are $e^{i\varphi}\star(z,t)=(e^{i\varphi}z,\,t+c\varphi)$, defined when $2\pi c\in P$, with moment map $\tfrac12\abs z^2+c$. For
$P=0$ only $c=0$ occurs; for $P=2\pi\Z$ the levels are the integers; for $P=2\pi(\Z+\alpha\Z)$ they are the dense set $\Z+\alpha\Z$.
\end{solution}

\begin{exercise}[label=exo:heis-coadjoint]{2}
Verify the two formulas of \cref{ex:heis-extension}.
\end{exercise}
\begin{solution}
The form $\lambda=\dd z+B(v,\dd v)$ pulled back by $(a,c)\mapsto(a+x,c-B(a,x))$ is
$\dd c-B(\dd a,x)+B(a+x,\dd a)=\dd c+B(a,\dd a)+B(x,\dd a)-B(\dd a,x)=\lambda_{\Heis}+\Omega(x,\dd a)$. Right multiplication by $(u,c')$ is
$(a,c)\mapsto(a+u,\,c+c'-B(a,u))$, and pulls $\lambda_{\Heis}$ back to $\dd c-B(\dd a,u)+B(a+u,\dd a)=\lambda_{\Heis}+\Omega(u,\dd a)$.
\end{solution}

\begin{exercise}[label=exo:hopf-su2]{3}
Let $Y=S^3\subset\C^2$ with $\lambda=\operatorname{Im}(\bar z_1\dd z_1+\bar z_2\dd z_2)$ and the action of $U(1)$ by scalars. Show that $U(2)$ acts by
automorphisms, that the induced action on $S^2=Y/U(1)$ is that of $\mathrm{SO}(3)$, and that the extension $\hat G\to\mathrm{SO}(3)$ of
\cref{thm:extension} has no homomorphic section.
\end{exercise}
\begin{solution}
$\lambda$ is the restriction of the imaginary part of the Hermitian form $\langle z,\dd z\rangle$, which is $U(2)$-invariant, and $U(2)$ commutes with scalars.
The induced action on $\C P^1=S^2$ is by $PU(2)=U(2)/U(1)\cong\mathrm{SO}(3)$, and the kernel $U(1)$ is the structure group; by \cref{thm:KS} the
automorphisms covering a given rotation are a coset of $U(1)$, so $\hat G=U(2)$. A homomorphic section $\mathrm{SO}(3)\to U(2)$ would be a
two-dimensional unitary representation of $\mathrm{SO}(3)$ inducing the identity of $PU(2)$. The irreducible representations of
$\mathrm{SO}(3)$ have odd dimension, so a two-dimensional one is a sum of characters, hence trivial since $\mathrm{SO}(3)$ is perfect; this
contradicts the condition on $PU(2)$. So the Hopf bundle is an equivariant prequantisation for $SU(2)$ and for $U(2)$, and for no action of
$\mathrm{SO}(3)$.
\end{solution}

\begin{exercise}[label=exo:levels]{3}
Prove \cref{prop:levels}.
\end{exercise}
\begin{solution}
Let $\Phi,\Phi'$ be two equivariant structures covering $\rho$. For each $g$, $g'_Y\circ g_Y^{-1}$ is an automorphism covering the identity, hence the
action of a constant $\chi(g)\in T_P$ by \cref{thm:KS}. Since $T_P$ is central in $\Aut(Y,\lambda)$, $\chi$ is a homomorphism; it is smooth because
$\Phi$ and $\Phi'$ are. Conversely $g\star y=\chi(g)\cdot(g\cdot y)$ is an action by automorphisms. Its orbit map is $\Phi_T\circ(\chi,\hat y)$, and by
\cref{lem:connection}(i) it pulls $\lambda$ back to $\chi^*\theta+\hat y^*\lambda$. For $G=\R/2\pi\Z$, a smooth character to $\R/P$ lifts to $\varphi\mapsto c\varphi$ with
$2\pi c\in P$, and $\chi^*\theta=c\,\dd\varphi$.
\end{solution}

\begin{exercise}[label=exo:extension]{4}
Prove \cref{thm:extension}.
\end{exercise}
\begin{solution}
(i) The projection $\hat G\to G$ is a smooth homomorphism, surjective by hypothesis, with kernel the automorphisms covering the identity, which is
$T_P$ by \cref{thm:KS}, central in $\Aut(Y,\lambda)$ and hence in $\hat G$. (ii) The second projection $\hat G\to\Aut(Y,\lambda)$ is a smooth homomorphism
covering the action $\rho\circ\pr_1$ of $\hat G$ on $X$. (iii) The orbit map of $y$ restricted to the centre is the orbit map of the principal
action of $T_P$, and $\lambda$ is calibrated. (iv) A smooth homomorphic section $s$ is a smooth homomorphism $G\to\Aut(Y,\lambda)$ lifting $\rho$, and
conversely. The orbit maps satisfy $\hat y^{G}=\hat y^{\hat G}\circ s$, so the moment map is $s^*\hat\mu$.
\end{solution}



\chapter{Reduction}\label{ch:reduction}
\chaptermark{Reduction}

\begin{chapabstract}
The reduced space of an equivariantly prequantised space is the quotient of the zero level of the moment map. When the group acts principally
on the level set, the quotient is a parasymplectic space with a prequantum bundle of the same structure group, and no regularity of the level set is
required. Reduction at an irrational level produces prequantum bundles whose structure group is an irrational torus. For non-principal actions the
prequantum data are defined on the stack quotient, and reduction can be performed in stages.
\end{chapabstract}

\section{The reduction theorem}

Let $(Y,\lambda)$ be an equivariant prequantisation of $(X,\omega)$ for a diffeological group $G$, with moment map $\mu\colon X\to\Gs$ (\cref{thm:A}). Put
\[
Z=\mu^{-1}(0)\subseteq X,\qquad Y_Z=\pi^{-1}(Z)\subseteq Y,\qquad X_0=Z/G,\qquad Y_0=Y_Z/G,
\]
with subspace and quotient diffeologies. The subset $Z$ is invariant because $\mu$ is equivariant and the coadjoint action is linear. The space
$X_0$ is the \defn{reduced space}.

\begin{lemma}\label{lem:principal}
\begin{enumerate}[label=\textup{(\alph*)}]
\item If $G$ acts principally on $Z$ and $W\to Z$ is a smooth equivariant map of $G$-spaces, then $G$ acts principally on $W$.
\item If commuting actions of $H$ and $K$ on $W$ define a principal action of $H\times K$, then $K$ acts principally on $W/H$, with quotient
$W/(H\times K)$. Conversely, if $H$ acts principally on $W$ and $K$ acts principally on $W/H$, then $H\times K$ acts principally on $W$.
\item If $q\colon W\to B$ is a subduction and $A\subseteq W$ is saturated, $A=q^{-1}(q(A))$, then $q|_A\colon A\to q(A)$ is a subduction for the subspace
diffeologies.
\end{enumerate}
\end{lemma}
\noindent The proof is \cref{exo:principal}.

\begin{theorem}[C: reduction]\label{thm:reduction}
Suppose $G$ acts principally on $Z=\mu^{-1}(0)$. Then:
\begin{enumerate}[label=\textup{(\roman*)}]
\item there is a unique closed $2$-form $\omega_0$ on $X_0$ with $\pi_G^*\omega_0=\omega|_Z$;
\item $Y_0\to X_0$ is a principal $T_P$-bundle, and $\lambda|_{Y_Z}$ descends to a connection form $\lambda_0$ on $Y_0$ with curvature $\omega_0$;
\item $(Y_0,\lambda_0)$ is the bundle with connection on $Z/G\simeq Z\hquot G$ of \cref{thm:B}(iv).
\end{enumerate}
So $(X_0,\omega_0)$ is a parasymplectic space prequantised by $(Y_0,\lambda_0)$ with the same group of periods $P$.
\end{theorem}
\begin{proof}
\emph{The bundle.} The projection $Y_Z\to Z$ is equivariant, so $G$ acts principally on $Y_Z$ by \cref{lem:principal}(a). The torus $T_P$ acts
principally on $Y_Z$, the restriction of a principal bundle. The product $G\times T_P$ acts principally on $Y_Z$: if $(g,\tau)\cdot y=y$ then $g$ fixes
$\pi(y)$, so $g=1$ and then $\tau=1$; and if $r\mapsto(y_r,g_r\tau_ry_r)$ is a plot of $Y_Z\times Y_Z$ then $r\mapsto g_r$ is a plot of $G$ by principality on
$Z$, hence $r\mapsto\tau_ry_r$ is a plot, and $r\mapsto\tau_r$ is a plot of $T_P$. By \cref{lem:principal}(b), $T_P$ acts principally on $Y_0=Y_Z/G$ with quotient
$Y_Z/(G\times T_P)=(Y_Z/T_P)/G=Z/G$.

\emph{The connection.} Every $g_Y$ preserves $\lambda$, and for $y\in Y_Z$ the orbit pullback $\hat y^*\lambda=\mu(\pi(y))$ vanishes. By
\cref{cor:product-momenta}, $\Phi^*\lambda=\pr_Y^*\lambda$ on $G\times Y_Z$, and by \cref{prop:basic}(i) the form $\lambda|_{Y_Z}$ descends to a form $\lambda_0$ on $Y_0$.
It is invariant under $T_P$ because $\lambda$ is and the quotient map $q\colon Y_Z\to Y_0$ is equivariant. It is calibrated: the orbit map of $q(y)$ under
$T_P$ is $q\circ\hat y$, and $(q\circ\hat y)^*\lambda_0=\hat y^*\lambda=\theta$.

\emph{The curvature.} Let $\omega_0$ be the curvature of $\lambda_0$ (\cref{lem:connection}), so $\pi_0^*\omega_0=\dd\lambda_0$ with $\pi_0\colon Y_0\to X_0$. Then
\[
\pi^*\pi_G^*\omega_0=q^*\pi_0^*\omega_0=q^*\dd\lambda_0=\dd\lambda|_{Y_Z}=\pi^*(\omega|_Z),
\]
and $\pi^*$ is injective; so $\pi_G^*\omega_0=\omega|_Z$. Uniqueness holds because $\pi_G^*$ is injective. (iii) Both bundles pull back to $(Y_Z,\lambda)$ with
its descent datum, and descent data determine the descended object.
\end{proof}

Three features of the statement differ from the theorem of Marsden and Weinstein \cite{MarsdenWeinstein}. The level set is an arbitrary
subset with the subspace diffeology: $0$ need not be a regular value, and $Z$ need not be a manifold. The group is an arbitrary
diffeological group. And the hypothesis is the single condition that the action on $Z$ be principal, which for a Lie group acting on a
manifold $Z$ is the classical condition that the action be free and proper \VolI{\S7.1}.

\begin{corollary}[The exact case]\label{cor:exact-reduction}
Let $\alpha$ be an invariant $1$-form on $X$, $\omega=\dd\alpha$, $\mu(x)=\hat x^*\alpha$. If $G$ acts principally on $Z=\mu^{-1}(0)$, then $\alpha|_Z$ descends to a
$1$-form $\alpha_0$ on $Z/G$ and $\omega_0=\dd\alpha_0$.
\end{corollary}

\begin{figure}[t]
\centering
\begin{tikzcd}[column sep=3.6em,row sep=2.4em]
Y \arrow[d,"\pi"'] & Y_Z \arrow[l,hook'] \arrow[r,"q","/G"'] \arrow[d] & Y_0 \arrow[d,"\pi_0"] & \lambda & \lambda|_{Y_Z} \arrow[l,mapsto] \arrow[r,mapsfrom] & \lambda_0\\
X & Z=\mu^{-1}(0) \arrow[l,hook'] \arrow[r,"\pi_G","/G"'] & X_0 & \omega & \omega|_Z \arrow[l,mapsto] \arrow[r,mapsfrom] & \omega_0
\end{tikzcd}
\caption{Reduction of a prequantised space. Each column is a principal $T_P$-bundle with connection; the right-hand squares are pullbacks of
bundles with connection.}\label{fig:reduction}
\end{figure}

\section{Levels and periods}

Reduction at a non-zero level is reduction at zero for a twisted lift. By \cref{prop:levels}, a character $\chi\colon G\to T_P$ changes the moment
map to $\mu+\chi^*\theta$; so $\mu^{-1}(-\chi^*\theta)$ is the zero level of an equivariant prequantisation, and \cref{thm:reduction} applies to it. For the
circle the admissible levels are the $c$ with $2\pi c\in P$. If $\omega$ is exact, every $P$ is available for the bundle upstairs
(\cref{ex:exact-prequantum}), and the level determines the smallest one: \emph{reduction of an exact form at the level $c$ produces a
prequantum bundle whose group of periods is generated by $2\pi c$}.

\begin{example}[Projective space]\label{ex:CPn}
Let $X=\C^{n+1}$ with $\alpha=\tfrac12\sum(x_k\dd y_k-y_k\dd x_k)$, and let $S^1$ act by scalars, $\mu_0=\tfrac12\abs z^2$. Fix $c>0$, $P=2\pi c\Z$,
$Y=\C^{n+1}\times T_P$, $\lambda=\alpha+\theta$, with the lift $e^{i\varphi}\cdot(z,t)=(e^{i\varphi}z,\,t-c\varphi)$ and moment map $\tfrac12\abs z^2-c$. The zero level is the
sphere of radius $\sqrt{2c}$, on which $S^1$ acts principally, and $X_0=\C P^n$. Each orbit in $Y_Z$ intersects $\{t=0\}$ exactly once, so
$Y_0\cong S^{2n+1}$ with $\lambda_0=\alpha|_{S^{2n+1}}$: the Hopf bundle, with $\int_{\C P^1}\omega_0=2\pi c$.
\end{example}

\begin{theorem}[The prequantum bundle of $S^2\times S^2$]\label{thm:S2S2}
Let $c_1,c_2>0$, $P=2\pi(c_1\Z+c_2\Z)$, and let $T^2$ act on $X=\C^2\times\C^2$ by scalars on the two factors, lifted to $Y=X\times T_P$ by
$(\varphi_1,\varphi_2)\cdot(z,w,t)=(e^{i\varphi_1}z,\,e^{i\varphi_2}w,\,t-c_1\varphi_1-c_2\varphi_2)$. Let $K\subset\R^2$ be the line $c_1\varphi_1+c_2\varphi_2=0$ and $\bar K$ its
image in $T^2$.
\begin{enumerate}[label=\textup{(\roman*)}]
\item The reduced space is $(S^2\times S^2,\ c_1\omega_1+c_2\omega_2)$ with $\int_{S^2}\omega_i=2\pi$.
\item The reduced prequantum bundle is $Y_0\cong(S^3\times S^3)/K$, the space of orbits of the linear flow of slope $-c_1/c_2$ on the tori
$T^2\cdot(z,w)$, with structure group $T^2/\bar K\cong T_P$.
\item If $c_1/c_2$ is rational, $\bar K$ is a circle, $Y_0$ is a compact $5$-manifold and $T_P$ is a circle.
\item If $c_1/c_2$ is irrational, $T_P$ is an irrational torus, $K\cong\R$ acts principally on $S^3\times S^3$, and $Y_0$ has the shape of
$S^3\times S^3$; its D-topology is not Hausdorff.
\end{enumerate}
\end{theorem}
\begin{proof}
The lift is defined on $T^2$ because $2\pi c_i\in P$, and it preserves $\lambda=\alpha_1+\alpha_2+\theta$. By \cref{prop:levels} the moment map is
$(\tfrac12\abs z^2-c_1,\ \tfrac12\abs w^2-c_2)$, with zero level $Z=S^3\times S^3$, on which $T^2$ acts freely and properly. This gives (i) by
\cref{thm:reduction} and \cref{ex:CPn}. (ii) The map $S^3\times S^3\to Y_0$, $(z,w)\mapsto[z,w,0]$, is a subduction: a plot of $Y_0$ lifts locally to
$S^3\times S^3\times\R$, and the rotation by $\varphi_1=t/c_1$ moves it into $\{t=0\}$. Two points of $\{t=0\}$ are identified if and only if they differ by
$(\varphi_1,\varphi_2)$ with $c_1\varphi_1+c_2\varphi_2\in P$, that is, by an element of $K+(2\pi\Z)^2$. The structure group acts through
$T^2/\bar K=\R^2/(K+(2\pi\Z)^2)$, which $(\varphi_1,\varphi_2)\mapsto c_1\varphi_1+c_2\varphi_2$ maps isomorphically to $\R/P$. (iii) is clear. (iv) The map $K\to T^2$ is
the irrational winding, an induction \IZ{Exercise~31}; so a plot of $T^2$ with values in $\bar K$ is a plot of $K$, and the action of $K$ on
$S^3\times S^3$, a restriction of the principal action of $T^2$, is principal. By \VolI{Theorem~5.4} the shape of $Y_0$ is the quotient of the shape
of $S^3\times S^3$ by that of $K\cong\R$, which is contractible. The D-topology is \cref{exo:nonhausdorff}.
\end{proof}

So the prequantum bundle of a product of spheres with incommensurable areas, which exists by \cref{thm:integration2}, has the explicit model
$(S^3\times S^3)/\R$: a diffeological space of dimension $5$ with the homotopy type of $S^3\times S^3$, fibred over $S^2\times S^2$ by irrational tori.
As the ratio $c_1/c_2$ varies, the manifolds of (iii) and the spaces of (iv) alternate densely.

\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
 \begin{scope}
  \fill[hcsmist] (0,0) rectangle (2.6,2.6);
  \begin{scope}
   \clip (0,0) rectangle (2.6,2.6);
   \foreach \n in {-12,...,22}{
     \pgfmathsetmacro{\c}{\n*0.6180339*0.42}
     \draw[hcsteal,line width=0.4pt] (0,2.6+\c) -- (2.6,2.6+\c-2.6*0.6180339);}
  \end{scope}
  \draw[hcsink] (0,0) rectangle (2.6,2.6);
  \node[below] at (1.3,0) {$\varphi_1$}; \node[left] at (0,1.3) {$\varphi_2$};
  \node[above] at (1.3,2.6) {$\bar K\subset T^2$};
  \draw[->>,line width=0.6pt] (2.9,1.3)--(3.9,1.3);
  \draw[hcsrust,line width=1pt] (4.5,1.3) circle (0.55);
  \foreach \k in {0,...,16}{\pgfmathsetmacro{\an}{\k*222.49} \fill[hcsink] (4.5,1.3)++(\an:0.55) circle (0.9pt);}
  \node[above] at (4.5,1.95) {$T^2/\bar K\cong T_P$};
 \end{scope}
 \begin{scope}[xshift=6.4cm,yshift=0.1cm]
  \draw[->,line width=0.5pt] (0,0)--(5.0,0) node[right]{$\tfrac12\abs z^2$};
  \foreach \k in {0,...,4}{\draw[hcsteal,line width=1pt] (\k*1.1,-0.12)--(\k*1.1,0.12); \node[below,hcsteal] at (\k*1.1,-0.12) {\k};}
  \node[above right,hcsteal] at (0,0.12) {$P=2\pi\Z$};
  \draw[->,line width=0.5pt] (0,1.5)--(5.0,1.5) node[right]{$\tfrac12\abs z^2$};
  \foreach \m in {0,...,4}{\foreach \n in {0,...,6}{
     \pgfmathsetmacro{\v}{\m*1.1+\n*1.1*0.6180339}
     \ifdim\v pt<4.7pt \draw[hcsrust,line width=0.6pt] (\v,1.4)--(\v,1.6);\fi}}
  \node[above right,hcsrust] at (0,1.62) {$P=2\pi(\Z+\alpha\Z)$};
  \node[below,align=center] at (2.5,-0.6) {admissible levels $c$, $2\pi c\in P$};
 \end{scope}
\end{tikzpicture}
\caption{Left: the kernel of $T^2\to T_P$ in \cref{thm:S2S2} is a dense line; the structure group is its space of leaves. Right: the
levels at which a circle action can be reduced together with its prequantum bundle form the group $\tfrac1{2\pi}P$.}\label{fig:levels}
\end{figure}

\section{Non-principal actions}

When the action on $Z$ is not principal, \cref{thm:B}(iii) still applies to the $G$-space $Z$.

\begin{theorem}[Reduction to the stack]\label{thm:stack-reduction}
For every equivariant prequantisation, the restriction of $(Y,\lambda)$ to $Z=\mu^{-1}(0)$ is a map $\nabla_0\colon Z\hquot G\to\BTc$, and $\omega|_Z$ is a closed
$2$-form on $Z\hquot G$ in the sense of \eqref{eq:basic}, the curvature of $\nabla_0$.
\end{theorem}
\begin{proof}
The moment map of the $G$-space $Z$ with the restricted bundle is zero, so \cref{thm:B}(iii) gives $\nabla_0$. Composing with $F$ gives a map
$Z\hquot G\to\Omcl$ restricting to $\omega|_Z$.
\end{proof}

By \VolI{Theorem~7.8} the stack $Z\hquot G$ maps to the diffeological orbit space $Z/G$, and the question is which of the data descend
further. For the form there is a general answer when $Z$ is a manifold.

\begin{theorem}[Karshon--Watts \cite{KarshonWatts}]\label{thm:KW}
Let a Lie group $G$ act on a manifold $M$ so that its identity component acts properly. Then $\pi^*$ is an isomorphism from the diffeological
forms on $M/G$ onto the basic forms on $M$, that is, the invariant forms annihilated by the contractions with the generators of the action.
\end{theorem}

\begin{corollary}\label{cor:orbifold-reduction}
In the situation of \cref{thm:KW}, let $M=Z=\mu^{-1}(0)$ be a submanifold of a manifold $X$. Then $\omega|_Z$ descends to a closed $2$-form on the
diffeological space $Z/G$. The bundle $Y_Z/G\to Z/G$ has fibre $T_P/\chi_z(G_z)$ over the orbit of $z$, where $\chi_z\colon G_z\to T_P$ is the
character by which the stabiliser acts on the fibre of $Y$ over $z$.
\end{corollary}
\begin{proof}
$\omega|_Z$ is invariant, and $\iota_{\xi_Z}\omega|_Z=-\dd\langle\mu,\xi\rangle|_Z=0$, so it is basic. The stabiliser $G_z$ preserves the fibre $Y_z$ and commutes with
$T_P$, so it acts by translations through a homomorphism $\chi_z$, and the fibre of $Y_Z/G$ over $[z]$ is $Y_z/G_z$.
\end{proof}

\begin{table}[h]\centering\small
\begin{tabular}{@{}p{3.0cm}p{3.5cm}p{3.2cm}p{3.4cm}@{}}\toprule
quotient of $Z$ & object & reduced $2$-form & reduced prequantum bundle\\\midrule
$Z\hquot G$ & stack & always (\cref{thm:stack-reduction}) & always\\
$Z/G$, action principal & diffeological space, $\simeq Z\hquot G$ & yes (\cref{thm:reduction}) & yes\\
$Z/G$, $Z$ manifold, proper & diffeological space & yes (\cref{cor:orbifold-reduction}) & where the characters $\chi_z$ are trivial\\\bottomrule
\end{tabular}
\caption{What descends to which quotient.}\label{tab:reduced}
\end{table}

For the circle acting on $\C^2$ with weights $(1,2)$ at a positive level, $Z=S^3$, $Z/G$ is the teardrop orbifold with one point of
structure group $\Z_2$, the reduced form exists by \cref{cor:orbifold-reduction}, and the reduced bundle is a principal bundle away from that
point. An example with $X$ of infinite dimension and singular reduced space is in \cite{IZred}.

\section{Reduction in stages}

\begin{theorem}[Stages]\label{thm:stages}
Let $G$ and $H$ act on $X$ by commuting actions, and let $(Y,\lambda)$ be an equivariant prequantisation for $G\times H$, with moment map
$(\mu_G,\mu_H)\colon X\to\Gs\times\Hs$ and zero levels $Z_G$, $Z_H$.
\begin{enumerate}[label=\textup{(\roman*)}]
\item $\mu_H$ is $G$-invariant. The group $H$ acts on $X_G=Z_G/G$, and
\[
(Z_G\cap Z_H)/(G\times H)\;\cong\;\bigl((Z_G\cap Z_H)/G\bigr)/H
\]
as diffeological spaces, where $(Z_G\cap Z_H)/G$ is a subspace of $X_G$.
\item If $G$ acts principally on $Z_G$ and $H$ acts principally on $(Z_G\cap Z_H)/G$, then $G\times H$ acts principally on $Z_G\cap Z_H$, the reduced
space $X_G$ is prequantised and $H$-equivariant with moment map induced by $\mu_H$, and the reduction of $X_G$ by $H$ is the reduction of $X$ by
$G\times H$, with the same $2$-form and the same prequantum bundle.
\end{enumerate}
\end{theorem}
\noindent The proof is \cref{exo:stages}.

\exercisesheading

\begin{exercise}[label=exo:point]{1}
Reduce the plane $\C$ by the rotations at a level $c>0$, with $P=2\pi c\Z$.
\end{exercise}
\begin{solution}
With the lift of \cref{ex:CPn} for $n=0$, the zero level is the circle $\abs z^2=2c$, on which $S^1$ acts principally, and $X_0$ is a point. The
bundle $Y_Z=S^1\times T_P$ has the action $e^{i\varphi}\cdot(z,t)=(e^{i\varphi}z,t-c\varphi)$, and $Y_0\cong S^1$ by the slice $t=0$; under $T_P=\R/2\pi c\Z$ the
orbit of a point of $Y_0$ is all of $Y_0$. So $Y_0\to X_0$ is $T_P\to\ast$, the only principal bundle over a point, and $\omega_0=0$.
\end{solution}

\begin{exercise}[label=exo:rational]{2}
In \cref{thm:S2S2} let $c_1=p$ and $c_2=q$ be coprime positive integers. Describe $\bar K$, $T_P$ and $Y_0$.
\end{exercise}
\begin{solution}
$P=2\pi(p\Z+q\Z)=2\pi\Z$, so $T_P$ is the circle of length $2\pi$. The line $p\varphi_1+q\varphi_2=0$ is $\varphi=s(q,-p)$, and its image in $T^2$ is the circle
$s\in\R/2\pi\Z$, embedded because $p,q$ are coprime. So $Y_0=(S^3\times S^3)/S^1$ for the action $e^{is}\cdot(z,w)=(e^{iqs}z,e^{-ips}w)$, which is free;
$Y_0$ is a compact $5$-manifold, a circle bundle over $S^2\times S^2$ with Chern class $(p,q)$ in the basis dual to the two spheres, since the
curvature has the periods $2\pi p$ and $2\pi q$ on them.
\end{solution}

\begin{exercise}[label=exo:nonhausdorff]{3}
Show that for $c_1/c_2$ irrational the D-topology of $Y_0=(S^3\times S^3)/K$ is not Hausdorff, and determine the closure of a point.
\end{exercise}
\begin{solution}
The D-topology of a quotient is the quotient of the D-topology \IZ{art.~2.12}, here of the manifold topology of $S^3\times S^3$. The orbit of $(z,w)$
under $K$ is dense in the orbit under $T^2$, because $\bar K$ is dense in $T^2$. A saturated closed set containing $(z,w)$ therefore contains
$T^2\cdot(z,w)$, and conversely the $T^2$-orbit is closed and saturated. So the closure of the point $[z,w]\in Y_0$ is the fibre of
$Y_0\to S^2\times S^2$ through it, a copy of $T_P$, and two points of one fibre have no disjoint neighbourhoods. The quotient of $Y_0$ by the relation
of having the same closure is $S^2\times S^2$.
\end{solution}

\begin{exercise}[label=exo:principal]{3}
Prove \cref{lem:principal}.
\end{exercise}
\begin{solution}
(a) If $gw=w$ then $g$ fixes the image of $w$ in $Z$, so $g=1$. Let $r\mapsto(w_r,g_rw_r)$ be a plot of $W\times W$. Its image in $Z\times Z$ is a plot
$r\mapsto(z_r,g_rz_r)$, so $r\mapsto g_r$ is a plot of $G$, because the action map of $Z$ is an induction; then $r\mapsto(g_r,w_r)$ is a plot of $G\times W$.
(b) If $k[w]=[w]$ then $kw=hw$ for some $h$, so $(h^{-1},k)$ fixes $w$ and $k=1$. Let $r\mapsto([w_r],k_r[w_r])$ be a plot of $(W/H)^2$; locally it
lifts to a plot $r\mapsto(w_r,w'_r)$ of $W^2$ with $w'_r=h_rk_rw_r$, and $r\mapsto(h_r,k_r)$ is a plot of $H\times K$ by principality, so $r\mapsto k_r$ is a plot.
The quotient of $W/H$ by $K$ is $W/(H\times K)$ because a composite of subductions is a subduction. Conversely, if $(h,k)w=w$ then $k[w]=[w]$,
so $k=1$ and then $h=1$; and for a plot $r\mapsto(w_r,h_rk_rw_r)$ the projection to $(W/H)^2$ gives that $r\mapsto k_r$ is a plot, hence
$r\mapsto h_rw_r=k_r^{-1}w'_r$ is a plot, and $r\mapsto h_r$ is a plot.
(c) Let $Q$ be a plot of $B$ with values in $q(A)$. Locally $Q=q\circ\tilde Q$ with $\tilde Q$ a plot of $W$, and $\tilde Q$ takes its values in
$q^{-1}(q(A))=A$; so $\tilde Q$ is a plot of the subspace $A$.
\end{solution}

\begin{exercise}[label=exo:stages]{4}
Prove \cref{thm:stages}.
\end{exercise}
\begin{solution}
\emph{Momenta of a product.} A left-invariant $1$-form on $G\times H$ is determined by its restrictions to the slices (\cref{lem:slices}), which by
invariance are determined by the restrictions to $G\times\{1\}$ and $\{1\}\times H$; conversely $\pr_G^*\beta+\pr_H^*\gamma$ is left-invariant. So the
momenta of $G\times H$ are $\Gs\times\Hs$, and since the factors commute, $\Ad_*(g,1)$ is the identity on $\Hs$. Equivariance of the moment map
(\cref{thm:A}) gives $\mu_H(gx)=\mu_H(x)$.

(i) The action of $H$ preserves $Z_G$ and commutes with $G$, so it descends to $X_G$. The set $Z_G\cap Z_H$ is saturated for $Z_G\to X_G$ because
$\mu_H$ is $G$-invariant; by \cref{lem:principal}(c) its image in $X_G$, with the subspace diffeology, is the quotient $(Z_G\cap Z_H)/G$. The
displayed isomorphism holds because both sides are quotients of $Z_G\cap Z_H$ by the same equivalence relation and subductions compose.

(ii) By \cref{thm:reduction}, $X_G$ is prequantised by $Y_G=Y_{Z_G}/G$ with $\lambda_G$. The action of $H$ on $Y_{Z_G}$ commutes with $G$ and preserves
$\lambda$, so it descends to an action on $Y_G$ preserving $\lambda_G$. Its moment map at $[x]$ is the pullback of $\lambda_G$ by the orbit map
$q\circ\hat y^H$, which is $(\hat y^H)^*\lambda=\mu_H(x)$. So the zero level in $X_G$ is $(Z_G\cap Z_H)/G$. The restriction of the principal action
of $G$ to the invariant subspace $Z_G\cap Z_H$ is principal, and by \cref{lem:principal}(b) so is the action of $G\times H$. Both reductions are
therefore defined on the same space. The two reduced $2$-forms pull back to $\omega|_{Z_G\cap Z_H}$ and the two connection forms to
$\lambda|_{Y_{Z_G\cap Z_H}}$; pullback along a subduction is injective, so they coincide.
\end{solution}


\part{Applications}

\chapter{Number theory: periods, ideals, and Heisenberg quasi-nilmanifolds}\label{ch:number-theory}
\chaptermark{Number theory}

\begin{chapabstract}
Let $K\subset\R$ be a number field with ring of integers $\OK$. For fractional ideals $\fa,\fb$ the product $\R/\fa\times\R/\fb$ is a
two-dimensional symplectic quasi-torus. Its diffeomorphism type is the Steinitz class of $\fa\oplus\fb$, its symplectic type is the ideal
$\fa\fb$, which is its group of periods, its symplectic mapping class group is a Hilbert modular group, and its prequantum bundle is a quotient
of the Heisenberg group by an arithmetic subgroup, with structure group $\R/\fa\fb$.
\end{chapabstract}

\section{Symplectic rigidity}

Volume~I attached to an irrational number $\alpha$ the one-dimensional torus $\Tal$ and read the arithmetic of $\Z+\alpha\Z$ from its diffeology
\VolI{Chapter~9}. A one-dimensional space carries no non-zero $2$-form (\cref{ex:dim1}); the first symplectic examples are quotients of the
plane.

\begin{theorem}[Symplectic rigidity of quasi-tori]\label{thm:symp-rigidity}
Let $\Gamma,\Gamma'\subset\R^{2n}$ be dense subgroups and $\Omega,\Omega'$ non-degenerate alternating forms.
\begin{enumerate}[label=\textup{(\roman*)}]
\item $(T_\Gamma,\omega_\Omega)\cong(T_{\Gamma'},\omega_{\Omega'})$ in $\ParaSymp$ if and only if there is $A\in\GL_{2n}(\R)$ with $A\Gamma=\Gamma'$ and $A^*\Omega'=\Omega$.
\item $\Dif(T_\Gamma,\omega_\Omega)=\set{[x]\mapsto[Ax+b]\mid A\in\Sp(\Gamma,\Omega),\ b\in\R^{2n}}$, where $\Sp(\Gamma,\Omega)=\set{A\in\Sp(\Omega)\mid A\Gamma=\Gamma}$. Its identity
component is the group $T_\Gamma$ of translations, and its group of components is $\Sp(\Gamma,\Omega)$.
\item The group $\Omega(\Gamma\wedge\Gamma)\subset\R$ generated by the toric periods $\Omega(\gamma,\gamma')$ is an invariant of $(T_\Gamma,\omega_\Omega)$.
\end{enumerate}
\end{theorem}
\noindent The proof is \cref{exo:symp-rigidity}; it combines the linear rigidity of \VolI{Theorem~9.1} with \cref{prop:forms-quasitori}.

For a lattice $\Gamma$ in the plane the only invariant is the area of the torus. For a dense subgroup the form $\Omega$ restricted to $\Gamma$ is a
homomorphism $\Lambda^2\Gamma\to\R$ of a group of rank $\binom{\rk\Gamma}2$, and its image is a dense subgroup of $\R$ with its own arithmetic.

\section{Tori attached to ideals}

Fix a number field $K$ of degree $d\ge2$ with an embedding $K\subset\R$. A fractional ideal $\fa$ is a dense subgroup of $\R$ of rank $d$, and
$T_\fa=\R/\fa$ is a one-dimensional quasi-torus with $\End(T_\fa)=\OK$; two of them are diffeomorphic if and only if the ideals have the same
class in $\Cl(K)$ \VolI{Proposition~9.5, Theorem~10.2}. For two fractional ideals put
\[
X_{\fa,\fb}=T_\fa\times T_\fb=\R^2/(\fa\oplus\fb),\qquad\omega=\text{the image of }\dd x\wedge\dd y .
\]

\begin{theorem}[Steinitz class and periods]\label{thm:steinitz}
\begin{enumerate}[label=\textup{(\roman*)}]
\item $X_{\fa,\fb}\cong X_{\fa',\fb'}$ as diffeological spaces if and only if $[\fa\fb]=[\fa'\fb']$ in $\Cl(K)$.
\item The group of toric periods of $(X_{\fa,\fb},\omega)$ is the ideal $\fa\fb\subset\R$.
\item $(X_{\fa,\fb},\omega)\cong(X_{\fa',\fb'},\omega)$ in $\ParaSymp$ if and only if $\fa\fb=\fa'\fb'$.
\item The symplectic mapping class group $\pi_0\Dif(X_{\fa,\fb},\omega)$ is
\[
\SL(\fa\oplus\fb)=\Bigl\{\begin{pmatrix}a&b\\c&d\end{pmatrix}\ \Big|\ a,d\in\OK,\ b\in\fa\fb^{-1},\ c\in\fa^{-1}\fb,\ ad-bc=1\Bigr\},
\]
which is conjugate in $\SL_2(K)$ to the Hilbert modular group $\SL(\OK\oplus\fa\fb)$.
\end{enumerate}
\end{theorem}
\begin{proof}
Let $M=\fa\oplus\fb$ and $M'=\fa'\oplus\fb'$, dense subgroups of $\R^2$. A matrix $A\in\GL_2(\R)$ with $AM\subseteq M'$ has entries in $K$: its first
column maps $\fa$ into $\fa'$ and into $\fb'$, so $a\in\fa'\fa^{-1}$ and $c\in\fb'\fa^{-1}$, and similarly for the second column. Hence $A$ is
$K$-linear on $K^2$ and commutes with multiplication by $\OK$: it is a homomorphism of $\OK$-modules $M\to M'$.

(i) By \VolI{Theorem~9.1}, $X_{\fa,\fb}\cong X_{\fa',\fb'}$ if and only if $AM=M'$ for some $A\in\GL_2(\R)$, that is, if and only if $M\cong M'$ as
$\OK$-modules. By Steinitz's theorem \cite{Milnor} a finitely generated torsion-free module over a Dedekind domain is determined by its rank
and its Steinitz class, which for $\fa\oplus\fb$ is $[\fa\fb]$.

(ii) For $m=(x,y)$ and $m'=(x',y')$ in $M$, $\Omega(m,m')=xy'-x'y$, and these elements generate $\fa\fb$.

(iii) If the spaces are symplectomorphic the groups of periods coincide, by \cref{thm:symp-rigidity}(iii). Conversely let $\fa\fb=\fa'\fb'=\fc$. By
(i) there is $B\in\GL_2(K)$ with $B(\OK\oplus\fc)=M$. For $m,m'\in K^2$, $\Omega(Bm,Bm')=\det B\cdot\Omega(m,m')$, so by (ii) $\fa\fb=\det B\cdot\fc$, and
$\det B$ is a unit of $\OK$. Then $B\cdot\mathrm{diag}((\det B)^{-1},1)$ has determinant $1$ and maps $\OK\oplus\fc$ onto $M$. The same holds for $M'$, and
the composite $M\to\OK\oplus\fc\to M'$ has determinant $1$; apply \cref{thm:symp-rigidity}(i).

(iv) By \cref{thm:symp-rigidity}(ii) the group is $\set{A\in\SL_2(\R)\mid AM=M}$. The inclusions $a\fa\subseteq\fa$, $b\fb\subseteq\fa$, $c\fa\subseteq\fb$, $d\fb\subseteq\fb$
give the stated conditions, which are stable under inversion in $\SL_2$. Conjugation by the matrix of (iii) carries it to $\SL(\OK\oplus\fc)$.
\end{proof}

\begin{corollary}\label{cor:class-group-law}
$T_\fa\times T_\fb\cong T_{\OK}\times T_{\fa\fb}$, and $T_\fa\times T_{\fa^{-1}}\cong T_{\OK}\times T_{\OK}$. The diffeomorphism classes of the spaces $X_{\fa,\fb}$
are in bijection with $\Cl(K)$, and under this bijection the product of tori is the multiplication of ideal classes.
\end{corollary}

So the class group, which in \VolI{Theorem~10.2} acted on the set of tori with real multiplication, is here the set of diffeomorphism types
of their pairwise products, with its group law. The finer invariant of (iii) is not a class: it is the ideal itself, as a subgroup of
$\R$. Rescaling the form multiplies it: $(X_{\OK,\fc},\lambda\omega)\cong(X_{\OK,\lambda\fc},\omega)$ for $\lambda\in K$, $\lambda>0$.

\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
 \begin{scope}
  \draw[->,line width=0.4pt] (0,1.4)--(9.4,1.4);
  \draw[->,line width=0.4pt] (0,0)--(9.4,0);
  \foreach \a in {-12,...,12}{\foreach \b in {-4,...,4}{
     \pgfmathsetmacro{\v}{\a+\b*3.16228}
     \pgfmathparse{(\v>0 && \v<4.5) ? 1 : 0}
     \ifnum\pgfmathresult=1 \draw[hcsteal,line width=0.5pt] (2*\v,1.28)--(2*\v,1.52);\fi}}
  \foreach \a in {-12,-10,...,12}{\foreach \b in {-4,...,4}{
     \pgfmathsetmacro{\v}{\a+\b*3.16228}
     \pgfmathparse{(\v>0 && \v<4.5) ? 1 : 0}
     \ifnum\pgfmathresult=1 \draw[hcsrust,line width=0.5pt] (2*\v,-0.12)--(2*\v,0.12);\fi}}
  \node[left] at (0,1.4) {$\OK$}; \node[left] at (0,0) {$\fp$};
  \foreach \k in {0,1,2,3,4} \node[below,hcsgrey,font=\scriptsize] at (2*\k,-0.15) {\k};
  \node[below,align=center] at (4.6,-0.6) {$\OK=\Z[\sqrt{10}]$ and $\fp=(2,\sqrt{10})$ in the interval $(0,4.5)$, coefficients bounded by $12$ and $4$};
 \end{scope}
\end{tikzpicture}
\caption{The groups of periods of $(X_{\OK,\OK},\omega)$ and of $(X_{\OK,\fp},\omega)$ for $K=\Q(\sqrt{10})$: two dense subgroups of $\R$, one of index $2$
in the other, and not related by any rescaling since $\fp$ is not principal.}\label{fig:periods}
\end{figure}

\section{Heisenberg quasi-nilmanifolds}

Let $\Heis=\R^3$ with $(x,y,z)(x',y',z')=(x+x',y+y',z+z'-xy')$ and $\lambda=\dd z+x\,\dd y$ (\cref{ex:heisenberg}), and for an integer $n\ge1$ let
$\Heis_n$ be the same with $-nxy'$ and $\lambda_n=\dd z+nx\,\dd y$. Put $\fc=\fa\fb$ and
\[
N_{\fa,\fb}=\set{(a,b,c)\mid a\in\fa,\ b\in\fb,\ c\in\fc},\qquad Y^{(n)}_{\fa,\fb}=N_{\fa,\fb}\backslash\Heis_n .
\]
The set $N_{\fa,\fb}$ is a subgroup of $\Heis_n$ because $n\,\fa\fb\subseteq\fc$. It is dense in $\Heis_n$, and $Y^{(n)}_{\fa,\fb}$ is a diffeological
space of dimension $3$: a \emph{Heisenberg quasi-nilmanifold}.

\begin{theorem}[Arithmetic prequantisation]\label{thm:heis-prequantum}
\begin{enumerate}[label=\textup{(\roman*)}]
\item $Y^{(n)}_{\fa,\fb}\to X_{\fa,\fb}$ is a principal $T_\fc$-bundle, $\lambda_n$ descends to a connection form, and the curvature is $n\omega$. For $n=1$
the structure group is the smallest possible: $\fc$ is the group of toric periods.
\item A translation of $X_{\fa,\fb}$ lifts to an automorphism of $(Y^{(n)}_{\fa,\fb},\lambda_n)$ if and only if it is a translation by a point of
$X_{\fa,\fb}[n]=\tfrac1n(\fa\oplus\fb)/(\fa\oplus\fb)\cong(\OK/n)^2$. The lifts form a central extension
\[
1\longrightarrow T_\fc\longrightarrow G_n\longrightarrow X_{\fa,\fb}[n]\longrightarrow1,
\]
whose commutator is the pairing $e_n(v,w)=n\,\Omega(\tilde v,\tilde w)\bmod\fc$ with values in $\tfrac1n\fc/\fc\cong\OK/n$; it is $\OK$-bilinear,
alternating and perfect.
\item Every $A\in\SL(\fa\oplus\fb)$ with $A\equiv1\bmod2$ lifts to an automorphism of $(Y^{(n)}_{\fa,\fb},\lambda_n)$.
\end{enumerate}
\end{theorem}
\begin{proof}
(i) Let $Z_{\Heis}=\set{(0,0,z)}$ be the centre and $L=N_{\fa,\fb}Z_{\Heis}=\fa\times\fb\times\R$. Then $N_{\fa,\fb}$ is normal in $L$,
$L/N_{\fa,\fb}\cong\R/\fc$ by $(a,b,z)\mapsto[z]$, and $L\backslash\Heis_n=\R^2/(\fa\oplus\fb)$. By \cref{exo:tower}, $N\backslash\Heis_n\to L\backslash\Heis_n$ is a
principal $L/N$-bundle. Left multiplication by $(a,b,c)$ maps $(x,y,z)$ to $(a+x,b+y,c+z-nay)$, and
$\dd(z-nay)+n(a+x)\,\dd y=\lambda_n$: the form is left-invariant, and it descends to the quotient by the discrete group $N_{\fa,\fb}$. The centre
acts by translation of $z$, so the descended form is invariant and calibrated, and $\dd\lambda_n=n\,\dd x\wedge\dd y$. Minimality for $n=1$ is
\cref{prop:periods-bound} with \cref{thm:steinitz}(ii).

(ii) Left multiplication by $h\in\Heis_n$ descends to $N\backslash\Heis_n$ if and only if $h$ normalises $N$. Conjugation by $h=(v,z)$ maps $(m,c)$ to
$(m,c-n\Omega(v,m))$, so the normaliser is $\set{(v,z)\mid n\Omega(v,\fa\oplus\fb)\subseteq\fc}=\tfrac1n(\fa\oplus\fb)\times\R$; here $\Omega(v,\fa\oplus\fb)\subseteq\tfrac1n\fc$ if and only if
$v\in\tfrac1n(\fa\oplus\fb)$ because the ideals are invertible. These automorphisms preserve $\lambda_n$, commute with the centre and cover the
translations by $v$; the group they form is $G_n=\Norm(N)/N$. By \cref{thm:KS} every lift of a translation that has one is of this form.
A translation by $v\notin\tfrac1n(\fa\oplus\fb)$ has no lift: it changes the holonomy of the loop $t\mapsto[t\gamma]$, $\gamma\in\fa\oplus\fb$, by $n\Omega(v,\gamma)\bmod\fc$. The
commutator in $\Heis_n$ is $[(v,z),(w,z')]=(0,-n\Omega(v,w))$. Bilinearity over $\OK$ and the alternating property are clear, and the pairing is
perfect because $\Omega$ identifies $\tfrac1n\fa\oplus\tfrac1n\fb$ with the dual of $\fa\oplus\fb$ into $\tfrac1n\fc$.

(iii) In the coordinate $\zeta=z+\tfrac n2xy$ the group law is $\zeta+\zeta'-\tfrac n2\Omega(v,v')$ and $\lambda_n=\dd\zeta+\tfrac n2(x\,\dd y-y\,\dd x)$, both invariant
under $\SL_2(\R)$ acting on $v$ (\cref{exo:quantomorphisms}). So $\hat A(v,z)=(Av,z-nq_A(v))$, with
$q_A(x,y)=\tfrac12ac\,x^2+\tfrac12bd\,y^2+bc\,xy$, is an automorphism of $\Heis_n$ preserving $\lambda_n$. It preserves $N_{\fa,\fb}$ if
$q_A(\fa\oplus\fb)\subseteq\fc$. For $x\in\fa$, $y\in\fb$: $bc\,xy\in\fc$ always, and if $b\in2\fa\fb^{-1}$, $c\in2\fa^{-1}\fb$ then $\tfrac12ac\,x^2\in\fc$ and
$\tfrac12bd\,y^2\in\fc$.
\end{proof}

For $n=1$ part (ii) is the statement that no translation of $X_{\fa,\fb}$ other than the identity lifts: in the classical terminology the
polarisation is principal, for every pair of ideals. For general $n$ the group $G_n$ is the theta group of \cref{ch:crypto}, and $e_n$ is a
Weil pairing with values in the $n$-torsion of the torus of periods $T_\fc$, an $\OK$-module of rank one. The restriction to the congruence
subgroup in (iii) is the classical phenomenon of theta characteristics.

\begin{figure}[t]
\centering
\begin{tikzcd}[column sep=2.4em,row sep=2.0em]
\fc \arrow[r,hook] & \R \arrow[r,two heads] \arrow[d,hook] & T_\fc \arrow[d,hook] & & T_\fa\times T_\fb \arrow[r,"\cong"] \arrow[d,"\text{class}"'] & T_{\OK}\times T_{\fa\fb} \arrow[d,"\text{class}"]\\
N_{\fa,\fb} \arrow[r,hook] \arrow[u,two heads] \arrow[d,two heads] & \Heis \arrow[r,two heads] \arrow[d,two heads] & N_{\fa,\fb}\backslash\Heis \arrow[d,two heads] & & {[\fa]\cdot[\fb]} \arrow[r,equal] & {[\OK]\cdot[\fa\fb]}\\
\fa\oplus\fb \arrow[r,hook] & \R^2 \arrow[r,two heads] & X_{\fa,\fb} & & &
\end{tikzcd}
\caption{Left: the Heisenberg quasi-nilmanifold as a principal $T_\fc$-bundle over $X_{\fa,\fb}$, $\fc=\fa\fb$; rows are quotients by dense subgroups,
columns are central extensions. Right: the product of tori attached to ideals realises the multiplication of ideal classes
(\cref{cor:class-group-law}).}\label{fig:heis-tower}
\end{figure}

\begin{proposition}[Duality]\label{prop:duality}
The moment map of the translations identifies $X_{\fa,\fb}$ with $X_{\fb,\fa}$, by $[x,y]\mapsto[-y,x]$ in the coordinates dual to $(x,y)$.
\end{proposition}
\begin{proof}
\Cref{prop:dual-torus}: the holonomy $\Omega(\fa\oplus\fb,\cdot)$ is the set of linear forms $(x',y')\mapsto xy'-x'y$, with coefficients $(-y,x)\in\fb\oplus\fa$.
\end{proof}

\begin{table}[h]\centering\small
\begin{tabular}{@{}p{4.4cm}p{4.0cm}p{4.6cm}@{}}\toprule
invariant of $(X_{\fa,\fb},\omega)$ & value & arithmetic\\\midrule
shape & $\B\Z^{2d}$ & degree $d=[K:\Q]$\\
diffeomorphism type & $[\fa\fb]\in\Cl(K)$ & Steinitz class\\
group of periods & $\fa\fb\subset\R$ & an ideal, not only its class\\
$\pi_0\Dif(X,\omega)$ & $\SL(\OK\oplus\fa\fb)$ & Hilbert modular group\\
prequantum bundle & $N_{\fa,\fb}\backslash\Heis$, group $T_{\fa\fb}$ & arithmetic subgroup of $\Heis$\\
lifts of translations to $n\omega$ & extension of $(\OK/n)^2$ by $T_{\fa\fb}$ & theta group, Weil pairing in $\OK/n$\\\bottomrule
\end{tabular}
\caption{The symplectic quasi-torus $X_{\fa,\fb}$ as an arithmetic object.}\label{tab:arith}
\end{table}

\exercisesheading

\begin{exercise}[label=exo:periods-sqrt2]{1}
For $K=\Q(\sqrt2)$ and $\fa=\fb=\OK$, compute the group of periods of $(X_{\OK,\OK},\omega)$, the shape of $X_{\OK,\OK}$, and the rank of $\Lambda^2\Gamma$.
\end{exercise}
\begin{solution}
$\Gamma=\Z[\sqrt2]^2$ has rank $4$, so the shape is $\B\Z^4$, the homotopy type of a $4$-torus, and $\Lambda^2\Gamma$ has rank $6$. The periods
$xy'-x'y$ with $x,y,x',y'\in\Z[\sqrt2]$ generate $\Z[\sqrt2]$, of rank $2$. So the period homomorphism $\Lambda^2\Gamma\to\R$ has a kernel of rank $4$: a
two-dimensional space with a closed $2$-form, the homotopy type of a $4$-torus, and two independent periods.
\end{solution}

\begin{exercise}[label=exo:steinitz-10]{2}
Let $K=\Q(\sqrt{10})$, $\fp=(2,\sqrt{10})$, $\fq=(3,1+\sqrt{10})$. Find $A\in\SL_2(K)$ with $A(\OK\oplus\fp\fq)=\fp\oplus\fq$, and deduce the symplectic type of
$X_{\fp,\fq}$.
\end{exercise}
\begin{solution}
The ideals have norms $2$ and $3$, so $\fp+\fq=\OK$; indeed $a=-2\in\fp$, $b=3\in\fq$, $a+b=1$. The map $(s,t)\mapsto(as-t,\ bs+t)$ has matrix
$A=\bigl(\begin{smallmatrix}-2&-1\\3&1\end{smallmatrix}\bigr)$ of determinant $1$. It maps $\OK\oplus\fp\fq$ into $\fp\oplus\fq$ because $\fp\fq\subseteq\fp\cap\fq$, and
onto: for $(x,y)\in\fp\oplus\fq$ take $s=x+y$ and $t=ay-bx\in\fp\fq$. The ideal $\fp\fq$ has norm $6$ and contains $4+\sqrt{10}$ of norm $6$, so
$\fp\fq=(4+\sqrt{10})$. By \cref{thm:steinitz}, $(X_{\fp,\fq},\omega)\cong(X_{\OK,(4+\sqrt{10})},\omega)\cong(X_{\OK,\OK},(4+\sqrt{10})\,\omega)$. Neither $\fp$ nor $\fq$ is
principal, since $x^2-10y^2=\pm2,\pm3$ have no solutions modulo $5$; their product is. The computation is verified in \texttt{checks.py}.
\end{solution}

\begin{exercise}[label=exo:hilbert-modular]{2}
For $K=\Q(\sqrt2)$ exhibit an element of infinite order in $\pi_0\Dif(X_{\OK,\OK},\omega)$ that is diagonal, and one that is not conjugate to a
diagonal element over $K$.
\end{exercise}
\begin{solution}
The group is $\SL_2(\Z[\sqrt2])$. With $\varepsilon=1+\sqrt2$, a unit, $\mathrm{diag}(\varepsilon,\varepsilon^{-1})$ acts on $T_{\OK}\times T_{\OK}$ by the unit $\varepsilon$ on one
factor and its inverse on the other; each factor is the hyperbolic symmetry of \VolI{Theorem~9.3}, and the product preserves $\omega$ because
the determinant is $1$. The matrix $\bigl(\begin{smallmatrix}1&1\\0&1\end{smallmatrix}\bigr)$ is unipotent, of infinite order, and not
diagonalisable. So the symplectic mapping class group contains hyperbolic and parabolic elements, as the modular group of an ordinary torus
does, and in addition the diagonal units, which have no analogue for a lattice.
\end{solution}

\begin{exercise}[label=exo:symp-rigidity]{3}
Prove \cref{thm:symp-rigidity}.
\end{exercise}
\begin{solution}
(i) Let $f$ be a diffeomorphism with $f^*\omega_{\Omega'}=\omega_\Omega$. By \VolI{Theorem~9.1}, $f$ lifts to $F(x)=Ax+b$ with $A\in\GL_{2n}(\R)$ and $A\Gamma=\Gamma'$.
Then $q^*f^*\omega_{\Omega'}=F^*q'^*\omega_{\Omega'}=F^*\Omega'=A^*\Omega'$, and $q^*\omega_\Omega=\Omega$; since $q^*$ is injective, $A^*\Omega'=\Omega$. The converse is the same
computation. (ii) Take $\Gamma'=\Gamma$, $\Omega'=\Omega$ in (i); translations preserve every $\omega_\Omega$. Let $r\mapsto f_r$ be a plot of $\Dif(T_\Gamma,\omega_\Omega)$, so that
$(r,x)\mapsto f_r(q(x))$ is smooth and lifts locally to $F_r(x)=A_rx+b_r$, smooth in $(r,x)$. For $\gamma\in\Gamma$, $A_r\gamma=F_r(x+\gamma)-F_r(x)$ is continuous in
$r$ with values in the countable set $\Gamma$, hence locally constant; as $\Gamma$ spans, $A_r$ is locally constant. So the linear part is constant
on components, and the translations, a quotient of $\R^{2n}$, are connected. (iii) If $A\Gamma=\Gamma'$ and $A^*\Omega'=\Omega$ then
$\Omega'(A\gamma,A\gamma')=\Omega(\gamma,\gamma')$.
\end{solution}

\begin{exercise}[label=exo:pairing-2]{3}
For $K=\Q(\sqrt2)$, $\fa=\fb=\OK$ and $n=2$, describe $X[2]$, the pairing $e_2$, and the number of its Lagrangian $\OK$-submodules.
\end{exercise}
\begin{solution}
$X[2]=(\OK/2)^2$ with $\OK/2=\mathbb F_2[\epsilon]/(\epsilon^2)$, $\epsilon=\sqrt2$; it has $16$ elements, and $e_2(v,w)=v_1w_2-v_2w_1\in\OK/2$. A
Lagrangian submodule is a submodule $L$ equal to its orthogonal; since the pairing is perfect over the ring $\OK/2$ of length $2$, $L$ has
$4$ elements. The free submodules generated by one element $v$ with a unit coordinate are isotropic and have $4$ elements: there are
$\abs{\mathbb P^1(\OK/2)}=6$ of them. The submodule $\epsilon X[2]$ has $4$ elements and is isotropic because $\epsilon^2=0$. A submodule with $4$
elements is either free of rank one or annihilated by $\epsilon$, and in the second case it is $\epsilon X[2]$, which has exactly $4$ elements. So
there are $7$ Lagrangian submodules. They are the analogues for $X_{\OK,\OK}$ of the Lagrangian kernels of \cref{thm:isotropic}, with the
additional condition of stability under $\OK$.
\end{solution}

\begin{exercise}[label=exo:tower]{4}
Let $N\subseteq L$ be subgroups of a diffeological group $H$, with $N$ normal in $L$. Prove that $N\backslash H\to L\backslash H$ is a principal bundle with
group $L/N$.
\end{exercise}
\begin{solution}
The group $L/N$ acts on $N\backslash H$ by $[l]\cdot Nh=Nlh$, well defined because $Nlnh=N(lnl^{-1})lh=Nlh$ for $n\in N$. The orbits are the fibres of
$N\backslash H\to L\backslash H$, and the action is free: $Nlh=Nh$ implies $l\in N$. Let $r\mapsto(Nh_r,Nh'_r)$ be a plot of pairs in the same fibre. The projection
$H\to N\backslash H$ is a subduction, so locally $h_r$ and $h'_r$ are plots of $H$, and $h'_rh_r^{-1}$ is a plot of $H$ with values in $L$, hence a
plot of the subgroup $L$. Its class in $L/N$ is the unique element carrying $Nh_r$ to $Nh'_r$, and it is a plot of $L/N$. So the action map
is an induction, the action is principal, and its quotient is $L\backslash H$ because subductions compose \VolI{Theorem~7.2, Corollary~7.3}.
\end{solution}



\chapter{Cryptography: pairings, isotropic kernels, symplectic lattices}\label{ch:crypto}
\chaptermark{Cryptography}

\begin{chapabstract}
Three objects of public-key cryptography are parts of the prequantum geometry of a torus. The theta group is the group of automorphisms of the
prequantum bundle over the translations, and the Weil pairing is its commutator. The isogenies that preserve a polarisation are the quotients
by isotropic subgroups, because those are the subgroups along which the prequantum bundle descends. And the Gram--Schmidt profile of a
symplectic basis of a lattice is symmetric, which applies to the NTRU bases of the signature scheme Falcon.
\end{chapabstract}

\section{The theta group and the Weil pairing}

A \defn{polarised torus} is a triple $(V,\Lam,\Omega)$: a real vector space of dimension $2n$, a lattice, and a non-degenerate alternating form with
$\Omega(\Lam,\Lam)\subseteq\Z$. Put $T=V/\Lam$ and
\[
\Lam^{\#}=\set{v\in V\mid\Omega(v,\Lam)\subseteq\Z}\supseteq\Lam .
\]
The polarisation is \emph{principal} if $\Lam^{\#}=\Lam$. Choose a bilinear form $B$ on $V$ with $B(v,w)-B(w,v)=\Omega(v,w)$ and $B(\Lam,\Lam)\subseteq\Z$, which
exists by the normal form of an integral alternating form, and let $\Heis_B=V\times\R$ with $(v,z)(v',z')=(v+v',z+z'-B(v,v'))$, $\lambda=\dd z+B(v,\dd v)$,
$N=\Lam\times\Z$. As in \cref{thm:heis-prequantum}, $Y=N\backslash\Heis_B\to T$ is a prequantisation of $(T,\omega_\Omega)$ with $P=\Z$: a circle bundle with connection of
curvature $\Omega$. Over $\C$, when $V$ has a complex structure compatible with $\Omega$, it is the unit circle bundle of the line bundle of the
polarisation.

\begin{theorem}[Theta group; Mumford \cite{Mumford}]\label{thm:theta}
\begin{enumerate}[label=\textup{(\roman*)}]
\item The translation of $T$ by $[v]$ lifts to an automorphism of $(Y,\lambda)$ if and only if $v\in\Lam^{\#}$.
\item The lifts of translations form the group $G(\Omega)=\Norm(N)/N$, a central extension
\[
1\longrightarrow\R/\Z\longrightarrow G(\Omega)\longrightarrow\Lam^{\#}/\Lam\longrightarrow1 .
\]
\item The commutator of two lifts is $e(v,w)=\Omega(\tilde v,\tilde w)\bmod\Z$, up to sign. The pairing $e$ on $\Lam^{\#}/\Lam$ is alternating and
non-degenerate.
\item If $\Omega$ is principal and $N\ge1$, then for the polarisation $N\Omega$ the group $(\Lam^{\#})_{N\Omega}/\Lam$ is the $N$-torsion subgroup
$T[N]=\tfrac1N\Lam/\Lam$, and $e_N(x,y)=N\,\Omega(\tilde x,\tilde y)\bmod\Z$ takes its values in $\tfrac1N\Z/\Z$.
\end{enumerate}
\end{theorem}
\begin{proof}
The argument of \cref{thm:heis-prequantum}(ii) applies with $\fa\oplus\fb$ replaced by $\Lam$ and $\fc$ by $\Z$: conjugation by $(v,z)$ maps $(m,c)\in N$ to
$(m,c-\Omega(v,m))$, the normaliser is $\Lam^{\#}\times\R$, left multiplications by its elements descend to automorphisms of $(Y,\lambda)$, any two lifts of one
translation differ by a constant by \cref{thm:KS}, and a translation by $v\notin\Lam^{\#}$ changes holonomies. The commutator in $\Heis_B$ is
$(0,-\Omega(v,w))$. If $\Omega(v,w)\in\Z$ for all $w\in\Lam^{\#}$ then $v\in(\Lam^{\#})^{\#}=\Lam$. For (iv), $N\Omega(v,\Lam)\subseteq\Z$ if and only if $Nv\in\Lam^{\#}=\Lam$.
\end{proof}

The group $G(N\Omega)$ is the theta group of the $N$-th power of a principal polarisation, and $e_N$ is the Weil pairing on the $N$-torsion points,
in its complex-analytic form. For an elliptic curve $\C/(\Z+\tau\Z)$ with $\Omega(1,\tau)=1$ it is
$e_N\bigl(\tfrac{a+b\tau}N,\tfrac{c+d\tau}N\bigr)=\tfrac{ad-bc}N\bmod\Z$. In the present terms the pairing is a holonomy: the translations by $x$ and $y$ commute
on $T$, their lifts to the prequantum bundle do not, and the defect is the integral of the curvature $N\Omega$ over the parallelogram spanned
by the lifts of $x$ and $y$ (\cref{fig:pairing}). Bilinearity and the alternating property are properties of area.

\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
 \begin{scope}
  \draw[hcsgrey,line width=0.3pt] (0,0) grid[step=0.8] (3.2,3.2);
  \draw[hcsink,line width=0.8pt] (0,0) rectangle (3.2,3.2);
  \fill[hcsgold,opacity=0.55] (0,0)--(1.6,0.8)--(2.4,2.4)--(0.8,1.6)--cycle;
  \draw[hcsteal,line width=1pt,->] (0,0)--(1.6,0.8) node[below right]{$\tilde x$};
  \draw[hcsrust,line width=1pt,->] (0,0)--(0.8,1.6) node[left]{$\tilde y$};
  \node at (1.2,1.2) {$N\Omega$};
  \node[below,align=center] at (1.6,-0.1) {$e_N(x,y)=N\cdot\text{area}\bmod\Z$};
 \end{scope}
 \begin{scope}[xshift=5.3cm,yshift=0.2cm]
  \foreach \i in {0,1,2}{\foreach \j in {0,1,2}{\fill[hcsink] (\i*0.9,\j*0.9) circle (2pt);}}
  \draw[hcsteal,line width=0.9pt] (0,0)--(1.8,0);
  \draw[hcsrust,line width=0.9pt] (0,0)--(0,1.8);
  \draw[hcsgold,line width=0.9pt] (0,0)--(1.8,1.8);
  \draw[hcsplum,line width=0.9pt] (0,0)--(0.9,1.8); \draw[hcsplum,line width=0.9pt,dashed] (0.9,1.8) .. controls (1.5,2.3) and (2.2,1.5) .. (1.8,0.9); \draw[hcsplum,line width=0.9pt] (0,0)--(1.8,0.9);
  \node[below,align=center] at (0.9,-0.3) {$T[3]=\mathbb F_3^2$:\\ $4$ Lagrangian lines};
 \end{scope}
 \begin{scope}[xshift=10.3cm,yshift=1.1cm]
  \node[hcsnode] (T) at (0,0) {$T$};
  \foreach \an/\c in {45/hcsteal,135/hcsrust,225/hcsgold,315/hcsplum}{
    \node[draw=\c,circle,inner sep=1.5pt,font=\scriptsize] (K\an) at (\an:1.5) {$T/K$};
    \draw[->,\c,line width=0.8pt] (T)--(K\an);}
  \node[below,align=center] at (0,-1.6) {$p+1$ isogenies of degree $p$};
 \end{scope}
\end{tikzpicture}
\caption{Left: the Weil pairing as the integral of the curvature over a parallelogram. Centre and right: for an elliptic curve and $p=3$,
the Lagrangian subgroups of $T[3]$ are its four lines, and each is the kernel of an isogeny along which the polarisation descends.}\label{fig:pairing}
\end{figure}

\section{Isotropic kernels}

Let $K\subseteq\Lam^{\#}/\Lam$ be a subgroup, $\Lam_K\subseteq\Lam^{\#}$ its preimage, and $f\colon T\to T'=V/\Lam_K$ the quotient map, an isogeny with kernel $K$.

\begin{theorem}[Descent of the polarisation]\label{thm:isotropic}
The following are equivalent:
\begin{enumerate}[label=\textup{(\alph*)}]
\item $K$ is isotropic for the pairing $e$;
\item $\Omega(\Lam_K,\Lam_K)\subseteq\Z$, that is, $(V,\Lam_K,\Omega)$ is a polarised torus;
\item there is a prequantisation $(Y',\lambda')$ of $(T',\omega_\Omega)$ with $f^*(Y',\lambda')\cong(Y,\lambda)$.
\end{enumerate}
In that case the descents $(Y',\lambda')$ of $(Y,\lambda)$ correspond to the homomorphic lifts $K\to G(\Omega)$, a torsor under $\Hom(K,\R/\Z)$; the
group $\Lam_K^{\#}/\Lam_K$ of the quotient is $K^\perp/K$, of order $\abs{\Lam^{\#}/\Lam}/\abs K^2$; and the quotient is principally polarised if and only if $K$ is
Lagrangian, $K=K^\perp$.
\end{theorem}
\begin{proof}
(a)$\iff$(b) by the definition of $e$. (a)$\Rightarrow$(c): the preimage $G_K$ of $K$ in $G(\Omega)$ is a central extension of the finite abelian group $K$ by
$\R/\Z$ with trivial commutator pairing, hence abelian, and it splits because $\R/\Z$ is divisible. A splitting is a group $\tilde K\cong K$ of
automorphisms of $(Y,\lambda)$ covering the translations by $K$. It acts freely on $Y$, commutes with the circle, and $Y'=Y/\tilde K\to T/K$ is a principal
circle bundle to which the invariant form $\lambda$ descends; its pullback to $T$ is $Y$. (c)$\Rightarrow$(a): the deck transformations of
$f^*Y'\to Y'$ are automorphisms of $(Y,\lambda)$ covering the translations by $K$ and forming a group isomorphic to $K$, so commutators of lifts of
elements of $K$ are trivial. Two splittings differ by a character of $K$. Finally $v\in\Lam_K^{\#}$ if and only if $\Omega(v,\Lam_K)\subseteq\Z$, that is,
$[v]\in K^\perp$; and $\abs{K^\perp}=\abs{\Lam^{\#}/\Lam}/\abs K$ because $e$ is non-degenerate.
\end{proof}

\begin{corollary}[$N$-isogenies]\label{cor:N-isogenies}
Let $(V,\Lam,\Omega)$ be principally polarised. The quotients $T\to T/K$ for which $N\Omega$ descends to a principal polarisation are those with
$K\subseteq T[N]$ Lagrangian for $e_N$; then $\abs K=N^n$. For $N=p$ prime their number is $\prod_{i=1}^n(p^i+1)$.
\end{corollary}
\noindent The count is \cref{exo:lagrangian-count}; the values $3,4,6$ for $n=1$ and $15,40$ for $n=2$, $p=2,3$ are confirmed by enumeration in
\texttt{checks.py}.

For $n=1$ every cyclic subgroup of order $N$ is Lagrangian, and the $p+1$ quotients are the edges of the isogeny graphs on which the
protocols of \cite{CSIDH} and their predecessors operate. For $n=2$ and $p=2$ the $15$ quotients are the Richelot isogenies. The
polynomial-time attacks on the SIDH protocol \cite{CastryckDecru,MainoMartindale,Robert} compute isogenies from products of elliptic curves, in
dimensions $2$, $4$ and $8$, whose kernels are maximal isotropic for a Weil pairing; isotropy is the condition under which the quotient is
again principally polarised. \Cref{thm:isotropic} is the statement over $\C$; over a finite field the same statement holds with
the algebraic theta group \cite{Mumford}. Its geometric form is that of \cref{thm:B}: a bundle with connection descends along a quotient
exactly when the group acts on it, and for a finite group of translations the obstruction is the commutator.

\section{Symplectic lattices}

Let $R_n$ be the $n\times n$ matrix with ones on the antidiagonal, and
\[
J=\begin{pmatrix}0&R_n\\-R_n&0\end{pmatrix},\qquad J\transp=-J=J^{-1} .
\]
For a basis $b_1,\dots,b_m$ of $\R^m$, written as the rows of a matrix $B$, let $b_1^*,\dots,b_m^*$ be its Gram--Schmidt orthogonalisation.

\begin{theorem}[Duality of the Gram--Schmidt profile]\label{thm:gso}
Let $B\in\GL_{2n}(\R)$ satisfy $BJB\transp=cJ$ with $c>0$. Then
\[
\norm{b_i^*}\cdot\norm{b^*_{2n+1-i}}=c\qquad(1\le i\le 2n).
\]
\end{theorem}
\begin{proof}
Replacing $B$ by $c^{-1/2}B$ we may take $c=1$. Then $B^{-\mathsf T}=JBJ\transp$. Row $i$ of $JB$ is $\pm b_{2n+1-i}$, so the dual basis is
$d_i=\pm b_{2n+1-i}J\transp$, and the dual basis in reversed order is $(\pm b_1J\transp,\dots,\pm b_{2n}J\transp)$: the image of the basis $B$ under an
orthogonal map and changes of sign, with the same Gram--Schmidt norms as $B$. By \cref{exo:reversed-dual} the reversed dual basis has
Gram--Schmidt norms $\norm{b^*_{2n}}^{-1},\dots,\norm{b_1^*}^{-1}$. Comparing, $\norm{b_j^*}=\norm{b^*_{2n+1-j}}^{-1}$.
\end{proof}

\begin{corollary}[NTRU bases; Gama--Howgrave-Graham--Nguyen \cite{GHN}]\label{cor:ntru}
Let $\mathcal R=\Z[x]/(x^n+1)$ and let $u=(g,-f)$, $u'=(G,-F)$ in $\mathcal R^2$ satisfy $fG-gF=q$. Then the basis
$u,xu,\dots,x^{n-1}u,u',xu',\dots,x^{n-1}u'$ of the NTRU lattice, written in coefficients, satisfies $BJB\transp=qJ$, and
$\norm{b_i^*}\,\norm{b^*_{2n+1-i}}=q$. The same holds for the public basis $\bigl(\begin{smallmatrix}1&h\\0&q\end{smallmatrix}\bigr)$.
\end{corollary}
\begin{proof}
The form $\omega_{\mathcal R}(v,w)=v_1w_2-v_2w_1$ on $\mathcal R^2$ is $\mathcal R$-bilinear and alternating. Its value on $(u,u')$ is $q$, and
its value on the public basis $(1,h)$, $(0,q)$ is also $q$. Let $\ell\colon\mathcal R\to\Z$ be the coefficient of $x^{n-1}$. For $0\le i,j<n$, $\ell(x^{i+j})=1$ if $i+j=n-1$ and $0$ otherwise, since
$x^{i+j}=-x^{i+j-n}$ for $i+j\ge n$ has degree at most $n-2$. So $\ell\circ\omega_{\mathcal R}$ has the matrix $J$ in the coefficient basis of $\mathcal R^2$, and
\[
\ell\,\omega_{\mathcal R}(x^iu,x^ju')=q\,\ell(x^{i+j}),\qquad\ell\,\omega_{\mathcal R}(x^iu,x^ju)=0 .
\]
That is $BJB\transp=qJ$; apply \cref{thm:gso}.
\end{proof}

So the second half of the Gram--Schmidt profile of an NTRU basis is determined by the first. The key generation of Falcon \cite{Falcon} must
bound $\max_i\norm{b_i^*}$ for the secret basis, and by the corollary it suffices to bound $\norm{b_i^*}$ and $q/\norm{b_i^*}$ for $i\le n$; the
symmetry is also the reason that the profile of such a basis is centred at $\sqrt q$ (\cref{fig:gso}). In the terms of this monograph, an
NTRU lattice is a polarised torus $(\R^{2n},\Lam,q^{-1}\ell\omega_{\mathcal R})$ whose polarisation is principal, the ring $\mathcal R$ acts on it by
endomorphisms, as $\OK$ does on $X_{\fa,\fb}$, and the symmetry of the profile is the self-duality $\Lam^{\#}=\Lam$ in metric form. The moduli of
principally polarised tori with a compatible metric is the Siegel orbifold $\Sp_{2n}(\Z)\backslash\Sp_{2n}(\R)/U(n)$, a diffeological orbifold by
the argument of \VolI{Theorem~10.6}; the isomorphism problem for symplectic lattices is the search problem on its stack.

\begin{figure}[t]
\centering
\begin{tikzpicture}
\begin{axis}[width=10.5cm,height=5.2cm,xlabel={$i$},ylabel={$\log_2\norm{b_i^*}$},xmin=0.5,xmax=16.5,ymin=-1,ymax=9,
  xtick={1,4,8,9,12,16},grid=major,grid style={hcsgrey!25},tick label style={font=\small},label style={font=\small},
  legend style={font=\small,at={(0.5,-0.3)},anchor=north,legend columns=2,draw=none,fill=none,/tikz/every even column/.append style={column sep=1em}}]
\addplot[only marks,mark=*,mark size=1.8pt,hcsteal] coordinates {(1,8.399) (2,8.209) (3,7.778) (4,7.778) (5,7.377) (6,7.362) (7,7.334) (8,7.293) (9,0.712) (10,0.671) (11,0.643) (12,0.629) (13,0.228) (14,0.228) (15,-0.203) (16,-0.394)};
\addlegendentry{public NTRU basis, $n=8$, $q=257$}
\addplot[hcsrust,dashed,domain=0.5:16.5,samples=2] {4.0028};
\addlegendentry{$\tfrac12\log_2q$}
\draw[hcsgold,line width=0.6pt,<->] (axis cs:1,8.399)--(axis cs:16,-0.394);
\draw[hcsgold,line width=0.6pt,<->] (axis cs:4,7.778)--(axis cs:13,0.228);
\draw[hcsgold,line width=0.6pt,<->] (axis cs:8,7.293)--(axis cs:9,0.712);
\end{axis}
\end{tikzpicture}
\caption{The Gram--Schmidt profile of a symplectic basis is symmetric about $\tfrac12\log c$: the pairs $(i,2n+1-i)$ joined by arrows have
product $q$. Data computed in \texttt{checks.py}.}\label{fig:gso}
\end{figure}

\exercisesheading

\begin{exercise}[label=exo:weil-elliptic]{1}
For $\Lam=\Z+\tau\Z\subset\C$ with $\Omega(1,\tau)=1$, derive the formula for $e_N$ and check that $e_N(x,x)=0$ and that $e_N(x,\cdot)=0$ implies $x=0$.
\end{exercise}
\begin{solution}
$\Omega(a+b\tau,c+d\tau)=ad-bc$ by bilinearity, so $e_N\bigl(\tfrac{a+b\tau}N,\tfrac{c+d\tau}N\bigr)=N\cdot\tfrac{ad-bc}{N^2}=\tfrac{ad-bc}N\bmod\Z$. It vanishes on the
diagonal. If $ad-bc\equiv0\bmod N$ for all $(c,d)$, take $(c,d)=(0,1)$ and $(1,0)$: $a\equiv b\equiv0$.
\end{solution}

\begin{exercise}[label=exo:theta-2]{2}
For $T=\R^2/\Z^2$ with $\Omega=\dd x\wedge\dd y$ and $N=2$, write the lifts of the translations by $(\tfrac12,0)$ and $(0,\tfrac12)$ to the prequantum bundle of
$2\Omega$, and compute their commutator.
\end{exercise}
\begin{solution}
In $\Heis_2$, with law $z+z'-2xy'$, the lifts are the left multiplications by $h_1=(\tfrac12,0,0)$ and $h_2=(0,\tfrac12,0)$, which normalise
$N=\Z^3$. Then $h_1h_2=(\tfrac12,\tfrac12,-\tfrac12)$ and $h_2h_1=(\tfrac12,\tfrac12,0)$, so $h_1h_2=(0,0,-\tfrac12)\,h_2h_1$: the two lifts commute up to the
element $-\tfrac12\in\R/\Z$ of the centre, which acts on the associated line bundle by $-1$. The squares $h_1^2=(1,0,0)$ and $h_2^2=(0,1,0)$ lie in
$N$, so the lifts have order $2$ on $Y$ and generate, with the centre, the Heisenberg group of level $2$.
\end{solution}

\begin{exercise}[label=exo:lagrangian-count]{2}
Count the Lagrangian subspaces of a symplectic vector space of dimension $4$ over $\mathbb F_p$, and state the general formula.
\end{exercise}
\begin{solution}
Count ordered bases $(v,w)$ of Lagrangian planes: $v\neq0$ gives $p^4-1$ choices, and $w\in v^\perp\smallsetminus\langle v\rangle$ gives $p^3-p$. Each plane has
$(p^2-1)(p^2-p)$ ordered bases. The quotient is $\frac{(p^2-1)(p^2+1)\,p(p^2-1)}{(p^2-1)\,p(p-1)}=(p^2+1)(p+1)$: $15$ for $p=2$, $40$ for $p=3$. In dimension
$2n$ the same count, or induction through $v^\perp/\langle v\rangle$, gives $\prod_{i=1}^n(p^i+1)$.
\end{solution}

\begin{exercise}[label=exo:dual-isogeny]{3}
Let $K\subseteq T[N]$ be Lagrangian for $e_N$ and $f\colon T\to T'=T/K$. Show that $f(T[N])\subseteq T'[N]$ is Lagrangian for $e'_N$, and that the quotient of $T'$ by it
is $T$ again.
\end{exercise}
\begin{solution}
$T'=V/\Lam_K$ with the principal polarisation $\Omega'=N\Omega$, and $e'_N(x,y)=N\Omega'(\tilde x,\tilde y)=N^2\Omega(\tilde x,\tilde y)$ on $\tfrac1N\Lam_K/\Lam_K$. The image of $T[N]$ is
$K'=\tfrac1N\Lam/\Lam_K$, and for $\tilde x,\tilde y\in\tfrac1N\Lam$, $N^2\Omega(\tilde x,\tilde y)\in\Z$: $K'$ is isotropic. Its order is $[\tfrac1N\Lam:\Lam_K]=N^{2n}/N^n=N^n$, so it is
Lagrangian. The quotient $T'/K'=V/\tfrac1N\Lam$ is identified with $T=V/\Lam$ by multiplication by $N$, and the composite $T\to T'\to T$ is multiplication
by $N$: the second map is the dual isogeny.
\end{solution}

\begin{exercise}[label=exo:reversed-dual]{3}
Let $B$ have rows $b_1,\dots,b_m$ with Gram--Schmidt norms $d_1,\dots,d_m$. Show that the dual basis in reversed order has Gram--Schmidt norms
$d_m^{-1},\dots,d_1^{-1}$.
\end{exercise}
\begin{solution}
Gram--Schmidt orthogonalisation is the factorisation $B=LDQ$ with $L$ lower triangular with unit diagonal, $D=\mathrm{diag}(d_i)$ and $Q$
orthogonal, and it is unique. The dual basis is $B^{-\mathsf T}=L^{-\mathsf T}D^{-1}Q$, with $L^{-\mathsf T}$ upper unitriangular. Let $R$ be the
permutation matrix reversing the order. Then $RB^{-\mathsf T}=(RL^{-\mathsf T}R)(RD^{-1}R)(RQ)$, where $RL^{-\mathsf T}R$ is lower unitriangular,
$RD^{-1}R=\mathrm{diag}(d_m^{-1},\dots,d_1^{-1})$ and $RQ$ is orthogonal. By uniqueness this is the Gram--Schmidt factorisation of the reversed dual
basis.
\end{solution}

\begin{exercise}[label=exo:J-rows]{4}
Complete the proof of \cref{thm:gso}: show that $BJB\transp=J$ implies $B^{-\mathsf T}=JBJ\transp$, that row $i$ of $JB$ is $\pm b_{2n+1-i}$, and that the
operations used preserve Gram--Schmidt norms.
\end{exercise}
\begin{solution}
From $BJB\transp=J$, $B^{-1}=JB\transp J^{-1}$ and $B^{-\mathsf T}=J^{-\mathsf T}BJ\transp=JBJ\transp$, since $J^{-\mathsf T}=(-J)^{-1}=J$. For $i\le n$, row $i$ of $J$ has
its only non-zero entry, $1$, in column $n+(n+1-i)=2n+1-i$; for $i=n+k$ it has $-1$ in column $n+1-k=2n+1-i$. So row $i$ of $JB$ is
$\pm b_{2n+1-i}$. Multiplying all vectors of a basis on the right by an orthogonal matrix replaces $Q$ by $QJ\transp$ in the factorisation $LDQ$
and leaves $D$ unchanged. Changing the sign of a basis vector $b_i$ changes the sign of $b_i^*$ and of the coefficients $\mu_{ji}$,
$\mu_{ij}$, and leaves every norm unchanged. Hence the reversed dual basis $(\pm b_jJ\transp)_j$ has the Gram--Schmidt norms of $B$, which is what
the proof uses.
\end{solution}



\chapter{Machine learning: conservation laws of learning dynamics}\label{ch:ml}
\chaptermark{Machine learning}

\begin{chapabstract}
A symmetry of a loss function constrains the dynamics of training, and the form of the constraint depends on the dynamics. Noether's theorem
holds for every diffeological group of symmetries of an exact symplectic manifold. For a linear symmetry group stable under transposition,
the compact directions give conserved momenta of Hamiltonian and momentum dynamics, the non-compact directions give conserved quadratic
forms of gradient flow, and splitting integrators conserve the former exactly. The zero level of the gradient-flow invariants of a linear
network is a slice for its non-compact symmetry.
\end{chapabstract}

\section{Noether's theorem for diffeological groups}

\begin{theorem}[Noether]\label{thm:noether}
Let $M$ be a manifold with a $1$-form $\alpha$ such that $\omega=\dd\alpha$ is symplectic, and let $H_t$ be a smooth time-dependent Hamiltonian with vector
field $\iota_{X_t}\omega=-\dd H_t$. Let a diffeological group $G$ act smoothly on $M$, preserving $\alpha$ and every $H_t$. Then the moment map
$\mu\colon M\to\Gs$, $\mu(x)=\hat x^*\alpha$, of \cref{thm:exact} is constant along every integral curve of $X_t$.
\end{theorem}
\begin{proof}
Let $P\colon U\to G$ be a plot, $r\in U$, $\delta r$ a tangent vector at $r$, and $k_s=P(r+s\,\delta r)P(r)^{-1}$, a smooth path in $G$ with $k_0=1$. Let
$\eta$ be the vector field $\eta_y=\frac{\dd}{\dd s}\big|_0k_s\cdot y$ on $M$, and $f=\alpha(\eta)$. By the definition of the pullback,
\[
\mu(x)(P)_r(\delta r)=\alpha\Bigl(\tfrac{\dd}{\dd s}\big|_0P(r+s\,\delta r)\cdot x\Bigr)=f\bigl(P(r)\cdot x\bigr).
\]
Since $k_s^*\alpha=\alpha$ and $k_0=\id$, $\mathcal L_\eta\alpha=0$, so $\dd f=\dd\iota_\eta\alpha=-\iota_\eta\omega$; and since $H_t\circ k_s=H_t$, $\eta(H_t)=0$. Hence
$X_t(f)=-\omega(\eta,X_t)=-\dd H_t(\eta)=0$. Each $g\in G$ preserves $\omega$ and $H_t$, so it commutes with the flow, and $f(P(r)\cdot x(t))$ is the value of
$f$ along the integral curve through $P(r)\cdot x(0)$, which is constant.
\end{proof}

The classical statement is the case of a Lie group, where $\Gs$ is the dual of the Lie algebra. No such assumption is made in the theorem. For a
discrete group $\Gs=0$ and there is no conserved momentum: a permutation symmetry of the units of a network constrains gradient flow to
fixed-point sets \VolI{Proposition~11.2} and gives no conservation law. For a group of gauge transformations $\Gs$ is infinite-dimensional and
the theorem gives one conserved quantity for each momentum.

For learning, the relevant phase space is $M=T^*\Theta=\Theta\times\Theta^*$ for a parameter space $\Theta=\R^d$, with $\alpha=\langle p,\dd\theta\rangle$. A subgroup $G\subseteq\GL(\Theta)$ acts by
$g\cdot(\theta,p)=(g\theta,g^{-\mathsf T}p)$ and preserves $\alpha$; for a one-parameter subgroup $e^{sA}$ the momentum is
\begin{equation}\label{eq:mu-A}
\mu_A(\theta,p)=\langle p,A\theta\rangle .
\end{equation}
A Hamiltonian neural network \cite{Greydanus} is a parametrised family $H_w$ of Hamiltonians fitted to observed trajectories. If the
architecture makes every $H_w$ invariant under $G$, then by \cref{thm:noether} every predicted trajectory conserves every $\mu_A$, for
every value of the weights: the conservation law is a property of the hypothesis class and is independent of the quality of the fit.

\section{Two conservation laws for a symmetric loss}

Let $L\colon\Theta\to\R$ be a smooth loss, invariant under a group $G\subseteq\GL(\Theta)$: $L(g\theta)=L(\theta)$. Differentiating along $e^{sA}$,
\begin{equation}\label{eq:orth}
\langle\nabla L(\theta),A\theta\rangle=0\qquad\text{for all }A\in\fg .
\end{equation}

\begin{theorem}[Momentum and gradient flow]\label{thm:two-noether}
Let $A\in\fg$.
\begin{enumerate}[label=\textup{(\alph*)}]
\item \emph{Momentum dynamics.} If $A\transp=-A$, then along every solution of $\ddot\theta+\gamma\dot\theta=-\nabla L(\theta)$ the momentum $J_A=\langle\dot\theta,A\theta\rangle$ satisfies
$J_A(t)=e^{-\gamma t}J_A(0)$. It is conserved for $\gamma=0$.
\item \emph{Gradient flow.} If $A\transp=A$, then $Q_A(\theta)=\tfrac12\langle\theta,A\theta\rangle$ is constant along every solution of $\dot\theta=-\nabla L(\theta)$.
\item \emph{Gradient descent.} If $A\transp=A$ and $\theta^+=\theta-h\nabla L(\theta)$, then $Q_A(\theta^+)=Q_A(\theta)+\tfrac{h^2}2\langle\nabla L(\theta),A\nabla L(\theta)\rangle$.
\item If $A\transp=-A$, every solution of gradient flow satisfies $\langle\dot\theta,A\theta\rangle=0$: the velocity is orthogonal to the orbits of the compact
directions.
\end{enumerate}
\end{theorem}
\begin{proof}
(a) $\dot J_A=\langle\ddot\theta,A\theta\rangle+\langle\dot\theta,A\dot\theta\rangle=-\langle\nabla L,A\theta\rangle-\gamma\langle\dot\theta,A\theta\rangle+0=-\gamma J_A$ by \eqref{eq:orth} and antisymmetry. (b)
$\dot Q_A=\langle\dot\theta,A\theta\rangle=-\langle\nabla L,A\theta\rangle=0$, using symmetry in the first step. (c) Expand
$\tfrac12\langle\theta-h\nabla L,A(\theta-h\nabla L)\rangle$; the term of order $h$ is $-h\langle\nabla L,A\theta\rangle=0$. (d) is \eqref{eq:orth}.
\end{proof}

If $\fg$ is stable under transposition it decomposes as $\fg=\fk\oplus\fpp$ into antisymmetric and symmetric parts, the Cartan decomposition of a
reductive group. The two halves are compared in \cref{tab:cartan}. Part (a) is \cref{thm:noether} for the Hamiltonian
$\tfrac12\abs p^2+L(\theta)$ and the momentum \eqref{eq:mu-A}. Part (b) is not an instance of Noether's theorem: gradient flow is not Hamiltonian, and
the conserved quantity is quadratic in $\theta$ alone. Special cases of (b) and (c) are the balancedness of linear and homogeneous networks
\cite{Arora,DuHuLee} and the conservation laws catalogued in \cite{Kunin}.

\begin{table}[h]\centering\small
\begin{tabular}{@{}p{3.3cm}p{4.6cm}p{5.1cm}@{}}\toprule
& compact: $\fk$, $A\transp=-A$ & non-compact: $\fpp$, $A\transp=A$\\\midrule
example & rotations of a layer & rescaling of a unit; $\GL_k$ between linear layers\\
momentum dynamics & $\langle\dot\theta,A\theta\rangle$ conserved, or decaying as $e^{-\gamma t}$ & ---\\
gradient flow & $\langle\dot\theta,A\theta\rangle=0$ identically & $\tfrac12\langle\theta,A\theta\rangle$ conserved\\
gradient descent, step $h$ & --- & drift $\tfrac{h^2}2\langle\nabla L,A\nabla L\rangle$ per step\\
geometric meaning & moment map of the cotangent lift & derivative of $\tfrac12\abs\theta^2$ along the orbit\\\bottomrule
\end{tabular}
\caption{The two halves of a reductive symmetry algebra and the corresponding conservation laws.}\label{tab:cartan}
\end{table}

\begin{example}[Three symmetric directions]\label{ex:symmetric-directions}
\textup{(i)} For a unit with positively homogeneous activation, the rescaling $(w_{\mathrm{in}},w_{\mathrm{out}})\mapsto(sw_{\mathrm{in}},s^{-1}w_{\mathrm{out}})$ preserves the
loss; $A$ is $+1$ on the incoming and $-1$ on the outgoing weights, and $Q_A=\tfrac12(\abs{w_{\mathrm{in}}}^2-\abs{w_{\mathrm{out}}}^2)$.
\textup{(ii)} For a linear network $W_2W_1$, the group $\GL_k$ acts by $(W_2g^{-1},gW_1)$, and the symmetric generators give the conserved matrix
$W_1W_1\transp-W_2\transp W_2$. \textup{(iii)} After a normalisation layer the loss is invariant under $\theta\mapsto s\theta$; $A=1$ and $Q_A=\tfrac12\abs\theta^2$: the norm is constant
under gradient flow, and by (c) its square increases by $h^2\abs{\nabla L}^2$ at each step of gradient descent.
\end{example}

\begin{figure}[t]
\centering
\begin{tikzpicture}
\begin{axis}[width=6.6cm,height=6.2cm,xmin=0,xmax=2.5,ymin=0,ymax=2.5,xlabel={$a$},ylabel={$w$},axis equal image,
  tick label style={font=\small},label style={font=\small},title style={font=\small},title={gradient flow of $\tfrac12(aw-1)^2$}]
\pgfplotsinvokeforeach{0.2,0.6,1.2,2.0}{
  \addplot[hcsteal,domain=0:2.5,samples=60,line width=0.5pt] {sqrt(x^2+2*#1)};
  \addplot[hcsteal,domain={sqrt(2*#1)}:2.5,samples=60,line width=0.5pt] {sqrt(abs(x^2-2*#1))};}
\addplot[hcsgold,domain=0:2.5,samples=2,line width=0.9pt] {x};
\addplot[hcsrust,domain=0.4:2.5,samples=80,line width=1.1pt] {1/x};
\addplot[->,hcsink,line width=0.7pt,domain=0.25:0.62,samples=20] {sqrt(x^2+1.2)};
\addplot[->,hcsink,line width=0.7pt,domain=2.3:1.62,samples=20] {sqrt(x^2-1.2)};
\addplot[->,hcsink,line width=0.7pt,domain=0.3:0.8,samples=2] {x};
\node[hcsrust,font=\small] at (axis cs:2.05,0.68) {$aw=1$};
\node[hcsgold!70!black,font=\small] at (axis cs:2.05,2.25) {$Q=0$};
\end{axis}
\end{tikzpicture}\hspace{0.4cm}
\begin{tikzpicture}
\begin{axis}[width=7.2cm,height=6.2cm,xlabel={time},ylabel={angular momentum},xmin=0,xmax=20,ymin=0.7,ymax=1.35,
  tick label style={font=\small},label style={font=\small},title style={font=\small},title={Kepler problem, step $h=0.05$},
  legend style={font=\small,at={(0.03,0.97)},anchor=north west,draw=none,fill=none}]
\addplot[hcsrust,mark=*,mark size=1.5pt,line width=0.7pt] coordinates {(0.0,0.8000) (2.0,0.9676) (4.0,1.1017) (6.0,1.1158) (8.0,1.1218) (10.0,1.1260) (12.0,1.1301) (14.0,1.1352) (16.0,1.1444) (18.0,1.1809) (20.0,1.2981)};
\addlegendentry{explicit Euler}
\addplot[hcsteal,mark=square*,mark size=1.5pt,line width=0.7pt] coordinates {(0.0,0.8000) (2.0,0.8000) (4.0,0.8000) (6.0,0.8000) (8.0,0.8000) (10.0,0.8000) (12.0,0.8000) (14.0,0.8000) (16.0,0.8000) (18.0,0.8000) (20.0,0.8000)};
\addlegendentry{leapfrog}
\end{axis}
\end{tikzpicture}
\caption{Left: gradient flow of a two-parameter network moves along the hyperbolas $w^2-a^2=\mathrm{const}$ of \cref{thm:two-noether}(b) to
the curve of minima; the balanced line $Q=0$ is invariant. Right: \cref{thm:discrete-noether}; the leapfrog scheme conserves the angular
momentum to rounding error and explicit Euler does not. Data from \texttt{checks.py}.}\label{fig:conservation}
\end{figure}

\section{The balanced slice}

The function $Q\colon\Theta\to\fpp^*$, $Q(\theta)(A)=Q_A(\theta)$, is equivariant for the compact part of $G$, and
$\frac{\dd}{\dd s}\big|_0\tfrac12\abs{e^{sA}\theta}^2=2Q_A(\theta)$. So $Q(\theta)=0$ if and only if $\theta$ is a critical point of the norm on its orbit under the
non-compact directions. For a real reductive group the zeros of $Q$ are the vectors of minimal norm in the closed orbits, and each closed
orbit intersects $Q^{-1}(0)$ in one orbit of the maximal compact subgroup \cite{KempfNess,RichardsonSlodowy}. For the deep linear network the
identification of the invariants with a moment map, and the resulting decomposition of training into a flow along the fibres and a flow on the
balanced manifold, are in \cite{LindseyMenon}; quiver moduli as hypothesis spaces are in \cite{JeffreysLau}, and \cite{ZhaoSurvey} is a survey of
parameter symmetries. For linear networks the statement is
elementary.

\begin{theorem}[Balanced factorisations; compare \cite{LindseyMenon,ZhaoFlat}]\label{thm:balanced}
Let $\Theta=\R^{m\times k}\times\R^{k\times n}\ni(W_2,W_1)$ with $G=\GL_k$, and $Q(W_2,W_1)=W_1W_1\transp-W_2\transp W_2$.
\begin{enumerate}[label=\textup{(\roman*)}]
\item $Q$ is constant along gradient flow of every loss of the form $\ell(W_2W_1)$; in particular the balanced set $Q^{-1}(0)$ is invariant.
\item The map $(W_2,W_1)\mapsto W_2W_1$ induces a bijection from $Q^{-1}(0)/\Ort(k)$ onto the set of $m\times n$ matrices of rank at most $k$.
\item The composite $Q^{-1}(0)/\Ort(k)\to\Theta/\GL_k$ is injective, and its image is the set of closed orbits.
\end{enumerate}
\end{theorem}
\noindent Parts (i) and (ii) are \cref{exo:balanced}; (iii) follows from (ii) and the theorem of \cite{RichardsonSlodowy}.

In \VolI{Theorem~11.1} the hypothesis space of a model had two diffeologies, the quotient $\Theta/G$ and the image in the space of functions.
For a linear network the quotient by $\GL_k$ is not Hausdorff, because of the non-closed orbits. A third description follows from \cref{thm:balanced}:
 gradient flow from a balanced initialisation is a flow on $Q^{-1}(0)/\Ort(k)$, the quotient of a real algebraic set by a
compact group, whose points are exactly the hypotheses. The reduction from $\GL_k$ to $\Ort(k)$ is the passage from $\fg$ to $\fk$ in
\cref{tab:cartan}: the non-compact directions are fixed by the conservation law and the compact ones remain as a symmetry. By
\cref{thm:two-noether}(d) the flow is orthogonal to the orbits of $\Ort(k)$.

\begin{figure}[t]
\centering
\begin{tikzpicture}
\begin{axis}[width=7.0cm,height=7.0cm,xmin=-2.2,xmax=2.2,ymin=-2.2,ymax=2.2,axis lines=middle,xlabel={$a$},ylabel={$w$},
  axis equal image,ticks=none,label style={font=\small}]
\pgfplotsinvokeforeach{0.5,1.3}{
  \addplot[hcsteal,domain=0.2:2.2,samples=70,line width=0.6pt] {#1/x};
  \addplot[hcsteal,domain=-2.2:-0.2,samples=70,line width=0.6pt] {#1/x};
  \addplot[hcsteal,domain=0.2:2.2,samples=70,line width=0.6pt,dashed] {-#1/x};
  \addplot[hcsteal,domain=-2.2:-0.2,samples=70,line width=0.6pt,dashed] {-#1/x};}
\addplot[hcsgold,domain=-2.2:2.2,samples=2,line width=1pt] {x};
\addplot[hcsgold,domain=-2.2:2.2,samples=2,line width=1pt] {-x};
\addplot[hcsrust,domain=0:360,samples=90,line width=0.7pt] ({cos(x)},{sin(x)});
\addplot[only marks,mark=*,mark size=2pt,hcsrust] coordinates {(0.7071,0.7071) (-0.7071,-0.7071) (0.7071,-0.7071) (-0.7071,0.7071)};
\node[hcsgold!70!black,font=\small,fill=white,inner sep=1pt] at (axis cs:1.55,1.95) {$Q=0$};
\node[hcsteal,font=\small,fill=white,inner sep=1pt] at (axis cs:1.45,0.25) {$aw=\mathrm{const}$};
\node[hcsrust,font=\small,fill=white,inner sep=1pt] at (axis cs:-1.5,0.3) {$\abs\theta=1$};
\end{axis}
\end{tikzpicture}
\caption{The balanced slice for the scalar two-layer network. The orbits of the rescaling group are the hyperbolas $aw=\mathrm{const}$; on
each, the points of minimal norm are the points where the orbit is tangent to a circle, and they lie on $Q=0$, that is, $w=\pm a$. The
residual symmetry $\Ort(1)=\{\pm1\}$ exchanges the two points of each orbit.}\label{fig:kempf-ness}
\end{figure}

\section{Discrete conservation}

\begin{theorem}[Integrators]\label{thm:discrete-noether}
Let $H(q,p)=T(p)+V(q)$ on $\R^d\times\R^d$ with $V(gq)=V(q)$ and $T(g^{-\mathsf T}p)=T(p)$ for $g$ in a group $G\subseteq\GL_d$, and let $A\in\fg$.
\begin{enumerate}[label=\textup{(\alph*)}]
\item The maps $(q,p)\mapsto(q,p-h\nabla V(q))$ and $(q,p)\mapsto(q+h\nabla T(p),p)$ preserve $\mu_A=\langle p,Aq\rangle$. Hence so do symplectic Euler, the leapfrog
scheme and every composition of these two maps.
\item \emph{(Cooper \cite{Cooper})} The implicit midpoint rule $z^+=z+hf\bigl(\tfrac{z+z^+}2\bigr)$ for $\dot z=f(z)$ conserves every quadratic first
integral.
\item Explicit Euler changes $\mu_A$ by $-h^2\langle\nabla V(q),A\nabla T(p)\rangle$ at each step.
\end{enumerate}
\end{theorem}
\begin{proof}
Invariance gives $\langle\nabla V(q),Aq\rangle=0$ and $\langle p,A\nabla T(p)\rangle=0$. (a) The first map changes $\mu_A$ by $-h\langle\nabla V(q),Aq\rangle$ and the second by
$h\langle p,A\nabla T(p)\rangle$. (b) is \cref{exo:midpoint}. (c) $\langle p-h\nabla V,A(q+h\nabla T)\rangle=\mu_A+h\langle p,A\nabla T\rangle-h\langle\nabla V,Aq\rangle-h^2\langle\nabla V,A\nabla T\rangle$.
\end{proof}

Part (a) is the discrete form of \cref{thm:noether} for the integrators used in Hamiltonian Monte Carlo and in the rollout of Hamiltonian
networks: with an invariant potential and kinetic energy, every leapfrog trajectory stays on a level set of the moment map, exactly and for
every step size. For a posterior with a continuous symmetry, a sampler of this kind explores within one trajectory only the level set
$\mu^{-1}(c)$, and the refreshment of the momentum is the only mechanism that changes the level. The reduced dynamics is a Hamiltonian flow on
the reduced space $\mu^{-1}(c)/G_c$, which by \cref{thm:reduction} and \cref{cor:exact-reduction} is a parasymplectic diffeological space
whenever the action on the level set is principal, without any assumption that the level be regular.

\section{Acceleration}\label{sec:acceleration}

A conservation law by itself changes no convergence rate, as the two-parameter network already shows.

\begin{proposition}[Rate and sharpness]\label{prop:rate}
Let $L(a,w)=\tfrac12(aw-1)^2$, $m=aw$, $Q=\tfrac12(w^2-a^2)$.
\begin{enumerate}[label=\textup{(\roman*)}]
\item Along gradient flow, $\dot m=-2\sqrt{Q^2+m^2}\,(m-1)$.
\item At a minimum the Hessian has the eigenvalues $0$ and $\lambda_Q=2\sqrt{Q^2+1}$.
\item Gradient descent linearised at the minimum multiplies the error in $m$ by $1-h\lambda_Q$ at each step. The contraction factors attained by the
stable steps $0<h<2/\lambda_Q$ form the interval $(-1,1)$ for every $Q$.
\end{enumerate}
\end{proposition}
\begin{proof}
With $\rho=m-1$, $\dot m=\dot aw+a\dot w=-\rho\,(a^2+w^2)$, and $(a^2+w^2)^2=(w^2-a^2)^2+4a^2w^2=4Q^2+4m^2$. At a minimum the Hessian is
$\nabla\rho\,\nabla\rho\transp$ with $\nabla\rho=(w,a)$, of norm squared $a^2+w^2$. (iii) follows from (ii).
\end{proof}

So for a single unit the level of $Q$ rescales the speed of the flow and the largest stable step by the same factor. A gain is available when
several blocks with different levels share one step size: the block with the largest $\lambda_Q$ bounds $h$, and every other block converges at
the rate $h\lambda_{Q'}$. The symmetry can be used in four ways to remove this mismatch, and the next three propositions make them explicit.

\begin{proposition}[The induced dynamics on the product]\label{prop:induced}
Let $(B,A)\in\R^{m\times r}\times\R^{r\times n}$ have rank $r$, $X=BA$, and let $G=\nabla\ell(X)$ for a loss $\ell(X)$.
\begin{enumerate}[label=\textup{(\roman*)}]
\item Gradient descent on $(B,A)$ with step $\eta$ gives $X^+=X-\eta\,(BB\transp G+GA\transp A)+\eta^2\,GX\transp G$. On the balanced slice of \cref{thm:balanced},
$BB\transp=(XX\transp)^{1/2}$ and $A\transp A=(X\transp X)^{1/2}$.
\item The \emph{scaled} update $B^+=B-\eta\,GA\transp(AA\transp)^{-1}$, $A^+=A-\eta\,(B\transp B)^{-1}B\transp G$ commutes with the action of $\GL_r$, and
\[
X^+=X-\eta\,(P_cG+GP_r)+\eta^2\,GX^{\dagger}G,
\]
where $P_c$ and $P_r$ are the orthogonal projectors onto the column and row spaces of $X$ and $X^\dagger$ is the Moore--Penrose inverse.
\item Let $\ell(X)=\tfrac12\norm{X-M}^2$ with $M$ of rank $r$ and singular values $\sigma_1\ge\dots\ge\sigma_r$. Linearised at $X=M$, the component of the
error along the singular vectors $u_i,v_j$ is multiplied by $1-\eta(\sigma_i+\sigma_j)$ in case \textup{(i)} on the balanced slice, with $\sigma_i=0$ for $i>r$,
and by $1-2\eta$ or $1-\eta$ in case \textup{(ii)}.
\end{enumerate}
\end{proposition}
\noindent Parts (i) and (ii) are \cref{exo:induced}. For (iii), $G$ is the error $E$ to first order, the preconditioners are evaluated at $M$, and
$(MM\transp)^{1/2}$, $(M\transp M)^{1/2}$, $P_c$, $P_r$ are diagonal in the singular bases. In case (i) the stable steps satisfy $\eta<1/\sigma_1$ and the slowest
tangent direction contracts by $1-\eta\sigma_r$: the number of steps grows as the condition number $\sigma_1/\sigma_r$. In case (ii) the rates do not involve
the singular values. Part (i) on the balanced slice is the preconditioned end-to-end dynamics of \cite{Arora}; part (ii) is the scaled
gradient descent of \cite{TongMaChi}, where convergence at a rate independent of the condition number is proved for several low-rank
estimation problems. In the terms of this chapter, the update of (ii) is defined on the quotient $\Theta/\GL_r$: it is independent of the
level of $Q$. Low-rank adapters $W_0+BA$ have this symmetry, and so do the key--query and value--output pairs of an attention head, whose
output depends on the products only; the usual initialisation of an adapter, $B=0$ and $A$ random, lies at the level $Q=AA\transp$, far from the
balanced slice \cite{LoRAplus}.

\begin{figure}[t]
\centering
\begin{tikzpicture}
\begin{semilogyaxis}[width=6.9cm,height=5.4cm,xlabel={iteration},ylabel={$\norm{BA-M}$},xmin=0,xmax=900,ymin=1e-16,ymax=2,
  tick label style={font=\small},label style={font=\small},title style={font=\small},title={gradient descent, $\eta=0.4$}]
\addplot[hcsrust,mark=*,mark size=1.5pt,line width=0.7pt] coordinates {(0,5.938e-01) (100,1.450e-03) (200,3.654e-05) (300,9.273e-07) (400,2.354e-08) (500,5.975e-10) (600,1.517e-11) (700,3.850e-13) (800,9.766e-15) (900,3.002e-16)};
\end{semilogyaxis}
\end{tikzpicture}\hspace{0.3cm}
\begin{tikzpicture}
\begin{semilogyaxis}[width=6.9cm,height=5.4cm,xlabel={iteration},xmin=0,xmax=9,ymin=1e-16,ymax=2,
  tick label style={font=\small},label style={font=\small},title style={font=\small},title={scaled update, $\eta=0.5$}]
\addplot[hcsteal,mark=square*,mark size=1.5pt,line width=0.7pt] coordinates {(0,5.938e-01) (1,1.045e-01) (2,1.527e-02) (3,1.866e-03) (4,4.691e-05) (5,3.286e-08) (6,1.616e-14) (7,1.665e-16) (8,1.594e-16)};
\end{semilogyaxis}
\end{tikzpicture}
\caption{Factorisation of a $2\times2$ matrix with singular values $1$ and $10^{-2}$ from the same initial point. The update that commutes with
$\GL_2$ reaches rounding error in $7$ iterations; gradient descent on the factors takes about $800$. Data from \texttt{checks.py}.}\label{fig:scaled}
\end{figure}

\begin{proposition}[Weight decay on scale-invariant weights]\label{prop:weight-decay}
Let $L(s\theta)=L(\theta)$ for $s>0$, and $\theta^+=(1-h\lambda)\theta-h\nabla L(\theta)$. Then
\[
\abs{\theta^+}^2=(1-h\lambda)^2\abs\theta^2+\frac{h^2\,\abs{\hat g}^2}{\abs\theta^2},\qquad\hat g=\nabla L(\theta/\abs\theta),
\]
the norm is stationary at $\abs\theta^4=h\abs{\hat g}^2/\lambda(2-h\lambda)$, and there the effective step size $h/\abs\theta^2$ on the unit sphere is
$\sqrt{h\lambda(2-h\lambda)}\,/\abs{\hat g}$, so that each step has angular length $\sqrt{h\lambda(2-h\lambda)}$.
\end{proposition}
\noindent The proof is \cref{exo:weight-decay}. The stationary effective step depends on $h$ and $\lambda$ through the product $h\lambda$ alone, to first order
\cite{vanLaarhoven}: the drift of \cref{thm:two-noether}(c) balances the decay, and the two hyperparameters act through their product.

\begin{proposition}[Horizontal projection]\label{prop:horizontal}
Let $A\in\fpp$ and let $\theta^+=\theta+u$ be any update. Then $Q_A(\theta^+)-Q_A(\theta)=\langle u,A\theta\rangle+\tfrac12\langle u,Au\rangle$. For $u=-h\nabla L(\theta)$ the first term vanishes.
For $u=-hD\nabla L(\theta)$ with a positive diagonal matrix $D$, as in adaptive methods, it is $-h\langle D\nabla L,A\theta\rangle$, of first order in $h$. For the
projected update
\[
u_\perp=u-\sum_j\frac{\langle u,A_j\theta\rangle}{\abs{A_j\theta}^2}\,A_j\theta ,
\]
over generators $A_j$ with mutually orthogonal $A_j\theta$, the first term vanishes again.
\end{proposition}
\begin{proof}
Expand $\tfrac12\langle\theta+u,A(\theta+u)\rangle$ with $A$ symmetric, and use \eqref{eq:orth}.
\end{proof}

For the sign update $u=-h\,\mathrm{sign}(\nabla L)$ on the two-parameter network, the invariant $Q$ changes over a unit of time by $0.31$ for
$h=10^{-2}$ and by $0.32$ for $h=10^{-3}$; with the projection the changes are $6.2\cdot10^{-3}$ and $6.2\cdot10^{-4}$ (\texttt{checks.py}). For the scale
symmetry, $A=1$, the projection removes the radial part of the update, which is the method of \cite{AdamP}.

The four uses are therefore: \emph{to choose the level} of $Q$ at initialisation, which by \cref{prop:induced}(i) is a choice of
preconditioner; \emph{to move along the orbit} during training, at no cost in loss, either back to the balanced slice or to the point of the
orbit with the largest gradient \cite{ZhaoTeleport}; \emph{to make the update equivariant}, so that it is defined on the quotient
(\cref{prop:induced}(ii), \cite{Absil}); and \emph{to project} a non-gradient update onto the directions orthogonal to the orbits
(\cref{prop:horizontal}). All four are instances of one geometric statement, \cref{thm:positions} of \cref{ch:structure}.

\exercisesheading

\begin{exercise}[label=exo:so2]{1}
Compute the momentum \eqref{eq:mu-A} for the rotations of $\Theta=\R^2$, and for the scalings.
\end{exercise}
\begin{solution}
For $A=\bigl(\begin{smallmatrix}0&-1\\1&0\end{smallmatrix}\bigr)$, $A\theta=(-\theta_2,\theta_1)$ and $\mu_A=p_2\theta_1-p_1\theta_2$, the angular momentum. For $A=1$, $\mu_A=\langle p,\theta\rangle$,
the generator of dilations. The first is antisymmetric and governed by \cref{thm:two-noether}(a); the second is symmetric, and under gradient
flow of a scale-invariant loss the conserved quantity is $\tfrac12\abs\theta^2$ by (b).
\end{solution}

\begin{exercise}[label=exo:hyperbola]{2}
For $L(a,w)=\tfrac12(aw-1)^2$ verify \cref{thm:two-noether}(b),(c) directly, and solve gradient flow on the balanced line.
\end{exercise}
\begin{solution}
The symmetry is $(a,w)\mapsto(s^{-1}a,sw)$, $A=\mathrm{diag}(-1,1)$, $Q=\tfrac12(w^2-a^2)$. With $\rho=aw-1$, $\dot a=-\rho w$, $\dot w=-\rho a$, so
$\frac{\dd}{\dd t}(w^2-a^2)=-2\rho aw+2\rho aw=0$. One step of gradient descent gives $w^{+2}-a^{+2}=(w^2-a^2)(1-h^2\rho^2)$, that is,
$Q^+=Q+\tfrac{h^2}2\rho^2(a^2-w^2)$, which is (c) with $\nabla L=\rho(w,a)$. On the line $a=w=s$ the flow is $\dot s=-(s^2-1)s$, with the stable equilibrium
$s=1$: the balanced solution of $aw=1$. In \texttt{checks.py} the drift of $Q$ over a fixed time is proportional to $h$, as (c) predicts.
\end{solution}

\begin{exercise}[label=exo:batchnorm]{2}
Let $L$ be invariant under $\theta\mapsto s\theta$, $s>0$. Show that under gradient descent $\abs{\theta_k}$ is non-decreasing and that the tangent of the angular step is
$h\abs{\nabla L(\theta_k/\abs{\theta_k})}/\abs{\theta_k}^2$.
\end{exercise}
\begin{solution}
By \cref{thm:two-noether}(c) with $A=1$, $\abs{\theta_{k+1}}^2=\abs{\theta_k}^2+h^2\abs{\nabla L(\theta_k)}^2$. Scale invariance gives
$\nabla L(s\theta)=s^{-1}\nabla L(\theta)$ and $\langle\nabla L,\theta\rangle=0$, so the step $h\nabla L(\theta_k)$ is tangent to the sphere of radius $\abs{\theta_k}$, of length
$h\abs{\nabla L(\theta_k/\abs{\theta_k})}/\abs{\theta_k}$, and the tangent of the angle it subtends is the stated quantity. The effective step size on the unit sphere is $h/\abs{\theta_k}^2$ and decreases
along training.
\end{solution}

\begin{exercise}[label=exo:relu]{3}
Let $f(x)=\sum_iv_i\,\sigma(\langle w_i,x\rangle)$ with $\sigma$ positively homogeneous of degree $1$. Derive the conserved quantities of gradient flow for a loss
depending on $f$ alone, at parameters where the loss is differentiable.
\end{exercise}
\begin{solution}
For each $i$ and $s>0$, $(w_i,v_i)\mapsto(sw_i,s^{-1}v_i)$ leaves $f$ unchanged. The generator is $A_i=\mathrm{diag}(+1\text{ on }w_i,\ -1\text{ on }v_i)$, a
symmetric matrix, and \eqref{eq:orth} holds wherever $L$ is differentiable. By \cref{thm:two-noether}(b),
$Q_i=\tfrac12(\abs{w_i}^2-v_i^2)$ is conserved for every unit. These are the balancedness conditions of \cite{DuHuLee}; the group is
$(\R_{>0})^k$, all of whose directions are non-compact, so no momentum of type (a) arises from it.
\end{solution}

\begin{exercise}[label=exo:midpoint]{3}
Prove \cref{thm:discrete-noether}(b).
\end{exercise}
\begin{solution}
Let $I(z)=\langle z,Cz\rangle+\langle c,z\rangle$ with $C$ symmetric be a first integral: $\langle2Cz+c,f(z)\rangle=0$ for all $z$. With $m=\tfrac12(z+z^+)$ and $z^+-z=hf(m)$,
\[
I(z^+)-I(z)=\langle z^+-z,\ C(z^++z)\rangle+\langle c,z^+-z\rangle=h\,\langle f(m),\,2Cm+c\rangle=0 .
\]
\end{solution}

\begin{exercise}[label=exo:balanced]{4}
Prove parts \textup{(i)} and \textup{(ii)} of \cref{thm:balanced}.
\end{exercise}
\begin{solution}
(i) The loss is invariant under $(W_2g^{-1},gW_1)$. For a symmetric $S$ the generator maps $(W_2,W_1)$ to $(-W_2S,SW_1)$, a symmetric
operator for the Frobenius inner product, and $Q_S=\tfrac12\tr(SW_1W_1\transp)-\tfrac12\tr(W_2SW_2\transp)=\tfrac12\tr\bigl(S(W_1W_1\transp-W_2\transp W_2)\bigr)$. By
\cref{thm:two-noether}(b) this is conserved for every $S$, so the matrix is conserved.

(ii) \emph{Surjectivity.} Let $M=U\Sigma V\transp$ be a singular value decomposition with $\Sigma$ of size $k\times k$. Then $W_2=U\Sigma^{1/2}$, $W_1=\Sigma^{1/2}V\transp$ is
balanced and $W_2W_1=M$. \emph{Injectivity.} Let $(W_2,W_1)$ and $(W_2',W_1')$ be balanced with the same product $M$. Then
$MM\transp=W_2(W_1W_1\transp)W_2\transp=(W_2W_2\transp)^2$, so $W_2W_2\transp=(MM\transp)^{1/2}=W_2'W_2'^{\mathsf T}$, and two $m\times k$ matrices with the same Gram matrix of
rows differ by an orthogonal matrix: $W_2'=W_2R$, $R\in\Ort(k)$. Put $D=RW_1'-W_1$. Then $W_2D=W_2'W_1'-W_2W_1=0$, so the columns of $D$ lie in
$\ker W_2=\ker W_2\transp W_2=\ker W_1W_1\transp$, the orthogonal complement of the column space of $W_1$; hence $W_1\transp D=0$. Balancedness of both pairs gives
$(RW_1')(RW_1')\transp=RW_2'^{\mathsf T}W_2'R\transp=W_2\transp W_2=W_1W_1\transp$, and taking traces,
$\tr(W_1W_1\transp)=\tr\bigl((W_1+D)(W_1+D)\transp\bigr)=\tr(W_1W_1\transp)+2\tr(W_1\transp D)+\tr(DD\transp)$. So $\tr(DD\transp)=0$, $D=0$, and
$(W_2',W_1')=(W_2R,R\transp W_1)$.
\end{solution}

\begin{exercise}[label=exo:weight-decay]{2}
Prove \cref{prop:weight-decay}, and compute the stationary norm and the angular step for $h=0.05$, $\lambda=0.1$, $\abs{\hat g}=1$.
\end{exercise}
\begin{solution}
Scale invariance gives $\langle\nabla L(\theta),\theta\rangle=0$ and $\nabla L(\theta)=\hat g/\abs\theta$, so the two terms of $\theta^+$ are orthogonal and
$\abs{\theta^+}^2=(1-h\lambda)^2\abs\theta^2+h^2\abs{\hat g}^2/\abs\theta^2$. The norm is stationary when $\bigl(1-(1-h\lambda)^2\bigr)\abs\theta^4=h^2\abs{\hat g}^2$, that is,
$\abs\theta^4=h\abs{\hat g}^2/\lambda(2-h\lambda)$. The step on the unit sphere is $h\abs{\nabla L(\theta)}/\abs\theta=h\abs{\hat g}/\abs\theta^2$; substituting, the effective
step size is $\sqrt{h\lambda(2-h\lambda)}/\abs{\hat g}$ and the angular length is $\sqrt{h\lambda(2-h\lambda)}$. For the given values $\abs\theta^4=0.2506$, $\abs\theta=0.7075$,
and the angular step is $0.0999$; the simulation in \texttt{checks.py} gives $\abs\theta^4=0.250627$.
\end{solution}

\begin{exercise}[label=exo:induced]{3}
Prove parts \textup{(i)} and \textup{(ii)} of \cref{prop:induced}.
\end{exercise}
\begin{solution}
The gradients of $\ell(BA)$ are $GA\transp$ and $B\transp G$. (i) $(B-\eta GA\transp)(A-\eta B\transp G)=X-\eta\,GA\transp A-\eta\,BB\transp G+\eta^2GA\transp B\transp G$. For a balanced pair,
$XX\transp=B(AA\transp)B\transp=B(B\transp B)B\transp=(BB\transp)^2$, and likewise $X\transp X=(A\transp A)^2$. (ii) Under $(B,A)\mapsto(Bg^{-1},gA)$ the product and $G$ are unchanged,
$GA\transp g\transp(gAA\transp g\transp)^{-1}=GA\transp(AA\transp)^{-1}g^{-1}$ and $(g^{-\mathsf T}B\transp Bg^{-1})^{-1}g^{-\mathsf T}B\transp G=g(B\transp B)^{-1}B\transp G$; so
$(B^+,A^+)\mapsto(B^+g^{-1},gA^+)$. The product is
\[
X-\eta\,B(B\transp B)^{-1}B\transp G-\eta\,GA\transp(AA\transp)^{-1}A+\eta^2\,GA\transp(AA\transp)^{-1}(B\transp B)^{-1}B\transp G .
\]
The matrices $P_c=B(B\transp B)^{-1}B\transp$ and $P_r=A\transp(AA\transp)^{-1}A$ are the orthogonal projectors onto the column space of $B$ and the row space of
$A$, which are those of $X$ because the rank is $r$. The matrix $X^\dagger=A\transp(AA\transp)^{-1}(B\transp B)^{-1}B\transp$ satisfies $XX^\dagger=P_c$, $X^\dagger X=P_r$,
$XX^\dagger X=X$ and $X^\dagger XX^\dagger=X^\dagger$, the four conditions that characterise the Moore--Penrose inverse.
\end{solution}



\chapter{Artificial intelligence: invariants, phases, and reachability}\label{ch:ai}
\chaptermark{Artificial intelligence}

\begin{chapabstract}
For an agent whose dynamics has a symmetry, the moment map is an invariant of every admissible trajectory, and it bounds the reachable set
for every controller. At zero momentum the motion of the agent along the symmetry directions is the holonomy of a connection on the bundle of
configurations over shapes. For the simplest two-body system the connection is flat, its holonomy is a rotation by an angle fixed by the ratio
of inertias, and when the ratio is irrational the universal first integral takes its values in an irrational torus.
\end{chapabstract}

\section{Momentum as a reachability invariant}

A controlled Hamiltonian system is a family $H_u$, $u\in\mathcal U$, of Hamiltonians on an exact symplectic manifold $(M,\dd\alpha)$; a control is a
piecewise smooth map $t\mapsto u(t)$, and the trajectory follows the Hamiltonian vector field of $H_{u(t)}$.

\begin{theorem}[Invariance of the reachable set]\label{thm:reachable}
Let a diffeological group $G$ act on $M$ preserving $\alpha$ and every $H_u$, with moment map $\mu\colon M\to\Gs$. Then for every control the
trajectory from $x$ stays in $\mu^{-1}(\mu(x))$. Consequently:
\begin{enumerate}[label=\textup{(\roman*)}]
\item a set $B\subseteq M$ with $\mu(x)\notin\mu(B)$ is unreachable from $x$ under every controller of the class;
\item the system induces a controlled system on the quotient $\mu^{-1}(c)/G_c$ of each level by the stabiliser of $c$, and when $G_c$ acts
principally on the level this quotient is a parasymplectic diffeological space.
\end{enumerate}
\end{theorem}
\begin{proof}
On each interval where the control is smooth, \cref{thm:noether} applies to the time-dependent Hamiltonian $H_{u(t)}$; $\mu$ is continuous
along the trajectory, so its value is the same on all intervals. (i) is immediate. (ii) The flows commute with $G$ and preserve the level, which
$G_c$ preserves by equivariance. For $c=0$ the quotient is the reduced space of \cref{cor:exact-reduction}; a level $c$ fixed by the
coadjoint action is brought to zero by \cref{prop:levels} when $c=-\chi^*\theta$ for a character $\chi$.
\end{proof}

Part (i) is a certificate of safety of the strongest kind: it is exact, it requires no simulation, and it holds for every policy,
learned or not, as long as the actuation preserves the symmetry. A free-floating robot whose actuators exert only internal forces cannot
change its angular momentum; a learned controller for it cannot reach a state of different momentum, whatever its training. Part (ii) is the
statement that planning and learning for such a system take place on the reduced space, of dimension smaller by twice the dimension of the
group at regular points.

\section{The geometric phase}

At a fixed momentum the remaining freedom of the agent is its shape, and the symmetry variables are determined by the history of the shape.

Let $Q$ be a configuration manifold with a free and proper action of $G=\R$ or $S^1$, generated by a vector field $\xi_Q$, and let $S=Q/G$ be the
\emph{shape space}. Let $g$ be a $G$-invariant Riemannian metric, the kinetic energy. The momentum of a velocity $\dot q$ is
$J(q,\dot q)=g(\dot q,\xi_Q(q))$, which is the moment map \eqref{eq:mu-A} of the cotangent lift under the Legendre transform. The
\defn{mechanical connection} is the $1$-form
\[
A=\frac{g(\cdot,\xi_Q)}{g(\xi_Q,\xi_Q)}\in\Om^1(Q) .
\]

\begin{theorem}[Holonomy of zero-momentum motion; \cite{MMR,Montgomery}]\label{thm:phase}
\begin{enumerate}[label=\textup{(\roman*)}]
\item $A$ is a connection form on the principal bundle $Q\to S$ in the sense of \cref{def:connection}, and a curve in $Q$ has zero momentum
if and only if it is horizontal for $A$. Every shape curve has a unique zero-momentum lift through each point of the fibre over its origin.
\item Let $F\in\Om^2(S)$ be the curvature. If a closed shape curve $c$ bounds a disc $D$, its zero-momentum lift ends at
$\exp(\Delta\,\xi)\cdot q(0)$ with $\Delta=-\int_DF$.
\item If $F=0$, the displacement of a loop depends only on its homotopy class, and the displacements form the image of a homomorphism
$\pi_1(S)\to G$.
\end{enumerate}
\end{theorem}
\begin{proof}
(i) $A$ is invariant because $g$ and $\xi_Q$ are, and $A(\xi_Q)=1$, which is calibration. $J(q,\dot q)=0$ if and only if $A(\dot q)=0$. In a
local trivialisation $Q|_V\cong V\times G$ with fibre coordinate $\varphi$, $A=\dd\varphi+a$ with $a\in\Om^1(V)$, and the horizontal lift of $c$ solves
$\dot\varphi=-a(\dot c)$. (ii) Over the disc the bundle is trivial, $F=\dd a$, and $\Delta=\varphi(1)-\varphi(0)=-\oint_ca=-\int_D\dd a$. (iii) A flat connection has
locally constant horizontal sections, so the lift of a contractible loop closes, and concatenation of loops adds displacements.
\end{proof}

The theorem is the abelian case of the gauge theory of locomotion: a body that changes its shape cyclically, with no external force and no
momentum, is displaced by the holonomy of the cycle \cite{ShapereWilczek,Montgomery}. For a planner the consequence is a division of the
problem: the shape variables are controlled directly, and motion in the group direction is obtained from the area enclosed in shape space,
weighted by the curvature (\cref{fig:phase}). If the curvature does not vanish, every displacement is the holonomy of some loop
(\cref{exo:variable-beanie}).

\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
 \begin{scope}
  \draw[hcsteal,line width=0.5pt] (0,0) rectangle (3.4,2.6);
  \fill[hcsgold!45] (0.7,0.6) .. controls (1.2,2.4) and (2.6,2.3) .. (2.8,1.3) .. controls (2.9,0.3) and (1.2,0.1) .. (0.7,0.6);
  \draw[hcsink,line width=0.9pt,->] (0.7,0.6) .. controls (1.2,2.4) and (2.6,2.3) .. (2.8,1.3);
  \draw[hcsink,line width=0.9pt] (2.8,1.3) .. controls (2.9,0.3) and (1.2,0.1) .. (0.7,0.6);
  \node at (1.8,1.2) {$\int_DF$};
  \node[below] at (1.7,0) {shape space $S$};
  \draw[->,line width=0.6pt] (3.7,1.3)--node[above]{lift}(4.7,1.3);
  \draw[hcsrust,line width=1pt] (5.4,0.3)--(5.4,2.3);
  \fill[hcsink] (5.4,0.8) circle (1.4pt) node[left]{$q(0)$};
  \fill[hcsink] (5.4,1.7) circle (1.4pt) node[left]{$q(1)$};
  \draw[hcsgold,line width=1.2pt,<->] (5.55,0.8)--node[right]{$\Delta$}(5.55,1.7);
  \node[below] at (5.4,0.25) {fibre $G$};
 \end{scope}
 \begin{scope}[xshift=8.3cm]
  \fill[hcsmist] (0,0) rectangle (2.6,2.6);
  \begin{scope}
   \clip (0,0) rectangle (2.6,2.6);
   \foreach \n in {-3,...,7}{
     \pgfmathsetmacro{\c}{\n*0.52}
     \draw[hcsteal!45,line width=0.4pt] (0,\c) -- (2.6,\c-2.6*0.6180339);}
   \draw[hcsrust,line width=1.1pt,->] (0,2.2)--(2.6,2.2-2.6*0.6180339);
  \end{scope}
  \draw[hcsink] (0,0) rectangle (2.6,2.6);
  \node[below] at (1.3,0) {joint angle $\psi$}; \node[left,align=right] at (0,1.3) {$\theta$};
  \draw[hcsgold,line width=1.2pt,<->] (2.75,2.2)--node[right]{$2\pi\alpha$}(2.75,2.2-2.6*0.6180339);
 \end{scope}
\end{tikzpicture}
\caption{Left: the displacement produced by a cycle of shape changes is minus the integral of the curvature over the enclosed region.
Right: for the two-body system of \cref{thm:beanie} the connection is flat and the zero-momentum motions are the leaves of a linear
foliation of the torus; one turn of the joint rotates the body by $-2\pi\alpha$.}\label{fig:phase}
\end{figure}

\section{A first integral with values in an irrational torus}

Two planar rigid bodies with moments of inertia $I_1,I_2$ are joined at their common centre of mass by a motor. The configuration is
$(\theta,\psi)\in T^2=(\R/2\pi\Z)^2$, where $\theta$ is the orientation of the first body and $\psi$ the joint angle; the kinetic energy is
$\tfrac12I_1\dot\theta^2+\tfrac12I_2(\dot\theta+\dot\psi)^2$, the rotations act on $\theta$, and the momentum is $J=I_1\dot\theta+I_2(\dot\theta+\dot\psi)$. With
\[
\alpha=\frac{I_2}{I_1+I_2}\in(0,1),
\]
the mechanical connection is $A=\dd\theta+\alpha\,\dd\psi$. The shape space is the circle of joint angles.

\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
 \begin{scope}
  \draw[hcsteal,line width=1pt,fill=hcsmist] (0,0) circle (1.3);
  \draw[hcsgold,line width=1pt,fill=hcssand] (0,0) circle (0.65);
  \fill (0,0) circle (1.3pt);
  \draw[hcsteal,line width=1pt] (0,0)++(25:0.65)--(25:1.3);
  \draw[hcsgold!70!black,line width=1pt] (0,0)--(95:0.65);
  \draw[hcsgrey,dashed] (0,0)--(1.6,0);
  \draw[->,hcsteal] (0:1.45) arc (0:25:1.45) node[right,pos=0.6]{$\theta$};
  \draw[->,hcsgold!70!black] (25:0.42) arc (25:95:0.42); \node[hcsgold!70!black] at (60:0.27) {\scriptsize$\psi$};
  \node[below,align=center] at (0,-1.45) {bodies $I_1$ (outer) and $I_2$ (inner),\\ joined by a motor};
 \end{scope}
 \begin{scope}[xshift=5.0cm]
  \draw[hcsink] (0,0) circle (1.0);
  \foreach \k in {0,...,4}{\fill[hcsrust] ({-144*\k}:1.0) circle (1.6pt);}
  \node[below,align=center] at (0,-1.2) {$\alpha=\tfrac25$:\\ $5$ orientations};
 \end{scope}
 \begin{scope}[xshift=8.4cm]
  \draw[hcsink] (0,0) circle (1.0);
  \foreach \k in {0,...,33}{\pgfmathsetmacro{\an}{-222.4922*\k} \fill[hcsrust] (\an:1.0) circle (1.1pt);}
  \node[below,align=center] at (0,-1.2) {$\alpha=\tfrac{\sqrt5-1}2$:\\ first $34$ of a dense set};
 \end{scope}
\end{tikzpicture}
\caption{The two-body system and the orientations $\theta_0-2\pi k\alpha$ reachable at zero momentum with the joint returned to its initial angle.}\label{fig:beanie}
\end{figure}

\begin{theorem}[The two-body system]\label{thm:beanie}
Consider the zero-momentum motions of the system, the curves in $T^2$ with $\dd\theta+\alpha\,\dd\psi=0$.
\begin{enumerate}[label=\textup{(\roman*)}]
\item The connection is flat. The set reachable from $(\theta_0,\psi_0)$ is the leaf $\set{(\theta_0-\alpha s,\psi_0+s)\mid s\in\R}$. The orientations reachable with the
joint returned to $\psi_0$ are $\theta_0-2\pi\alpha\Z$.
\item The map $c\colon T^2\to\R/2\pi(\Z+\alpha\Z)$, $c(\theta,\psi)=[\theta+\alpha\psi]$, is a smooth first integral and a subduction whose fibres are the reachable sets. It is
universal: every smooth map from $T^2$ to a diffeological space that is constant on zero-momentum curves factors uniquely and smoothly
through $c$.
\item If $\alpha=p/q$ in lowest terms, the reachable sets are circles, the target of $c$ is a circle, and the reachable orientations at a fixed joint
angle are $q$ points.
\item If $\alpha$ is irrational, the target of $c$ is the irrational torus $\Tal$; every reachable set is dense and, with the subspace diffeology,
diffeomorphic to $\R$; every first integral with values in a manifold is constant; and for each convergent $p_j/q_j$ of $\alpha$, every
orientation is reached within $3\pi/q_j$ by fewer than $q_j$ turns of the joint.
\end{enumerate}
\end{theorem}
\begin{proof}
(i) $\dd A=0$. The lift of the shape curve $\psi_0+s$ is $\theta_0-\alpha s$, and one turn of the joint is $s=2\pi$. (ii) The linear map
$(\theta,\psi)\mapsto\theta+\alpha\psi$ from $\R^2$ to $\R$ is a subduction, it maps $(2\pi\Z)^2$ into $2\pi(\Z+\alpha\Z)$, and two points have the same image in the quotient if and only if
they lie on one leaf. So $c$ is a subduction with the leaves as fibres, and the universal property is that of a quotient diffeology. (iii) The
group $2\pi(\Z+\tfrac pq\Z)=\tfrac{2\pi}q\Z$ is discrete. (iv) The target is $\R/2\pi(\Z+\alpha\Z)\cong\Tal$. The leaf is the image of the irrational winding
$\R\to T^2$, which is an induction \IZ{Exercise~31}. A first integral $f\colon T^2\to N$ is continuous and constant on a dense leaf, hence constant on
$T^2$ when $N$ is Hausdorff. The bound is \cref{exo:approx}.
\end{proof}

\begin{table}[h]\centering\small
\begin{tabular}{@{}p{4.3cm}p{4.0cm}p{4.7cm}@{}}\toprule
& $\alpha=p/q$ & $\alpha$ irrational\\\midrule
holonomy group & cyclic of order $q$ & $2\pi\alpha\Z$, dense in the circle\\
reachable set & a closed curve & a dense leaf, $\cong\R$\\
universal first integral & circle-valued & $\Tal$-valued\\
real-valued first integrals & functions on a circle & constants\\
exact controllability of $\theta$ & no & no\\
approximate controllability & no & yes, at a cost set by the convergents of $\alpha$\\\bottomrule
\end{tabular}
\caption{Zero-momentum reachability of the two-body system as a function of the inertia ratio.}\label{tab:beanie}
\end{table}

For an analysis based on real-valued invariants the irrational system has no conserved quantity on the zero-momentum level and its orbits
are dense, the usual indications of controllability. It is not controllable: each reachable set is a single leaf, of measure zero. The
invariant that separates the reachable sets exists, is smooth, and is unique up to diffeomorphisms of its target; its target is a
diffeological space that is not a manifold. This is the situation of \VolI{Theorem~12.4}: the smooth real functions on $\Tal$ are the constants,
and the structure of $\Tal$ is carried by its plots. Along a leaf, planning is elementary, since the leaf is a line and has a smooth planner
\VolI{Theorem~12.1}; between leaves no motion exists. By the last clause of (iv) the cost of approximate control is bounded in terms of the continued
fraction of the inertia ratio, the invariant that classifies $\Tal$ up to diffeomorphism \VolI{Corollary~9.2}.

\exercisesheading

\begin{exercise}[label=exo:equal-inertia]{1}
For $I_1=I_2$ compute the rotation of the first body produced by one turn of the joint at zero momentum, and the reachable orientations.
\end{exercise}
\begin{solution}
$\alpha=\tfrac12$, so one turn of the joint rotates the first body by $-\pi$ and the second by $+\pi$ relative to the frame: the system returns to its
shape with both bodies reversed. Two turns restore the configuration. The reachable orientations at a fixed joint angle are $\theta_0$ and
$\theta_0+\pi$, and $c=[\theta+\tfrac12\psi]\in\R/\pi\Z$ is a circle-valued first integral.
\end{solution}

\begin{exercise}[label=exo:flat-holonomy]{2}
For $\alpha=p/q$ in lowest terms, show that the leaf through $(\theta_0,\psi_0)$ closes after $q$ turns of the joint, and describe the leaf as a curve on the torus.
\end{exercise}
\begin{solution}
After $k$ turns the orientation is $\theta_0-2\pi kp/q$, equal to $\theta_0$ modulo $2\pi$ exactly when $q$ divides $k$, since $p$ and $q$ are coprime. The leaf
is the closed curve $s\mapsto(\theta_0-\tfrac pqs,\psi_0+s)$, $s\in[0,2\pi q]$, winding $q$ times in the direction of $\psi$ and $-p$ times in the direction of $\theta$: a torus knot
of type $(q,-p)$ when the torus is embedded in space. The orientations visited at the joint angle $\psi_0$ are the $q$ points $\theta_0-2\pi k/q$.
\end{solution}

\begin{exercise}[label=exo:variable-beanie]{3}
Suppose the second body can also change its moment of inertia, $I_2=I_2(r)$ with $r$ in an interval and $I_2'\neq0$. Show that every orientation is
reachable at zero momentum with the shape returned to its initial value.
\end{exercise}
\begin{solution}
The shape space is the cylinder of $(r,\psi)$ and $A=\dd\theta+\alpha(r)\,\dd\psi$ with $\alpha(r)=I_2(r)/(I_1+I_2(r))$, so $F=\alpha'(r)\,\dd r\wedge\dd\psi\neq0$. Consider the shape
loop: turn the joint once at $r_1$, change $r$ from $r_1$ to $r_2$, turn the joint once backwards, return to $r_1$. Changes of $r$ at fixed $\psi$
do not move $\theta$. The displacement is $-2\pi\alpha(r_1)+2\pi\alpha(r_2)$, a continuous function of $r_2$ vanishing at $r_2=r_1$ and not locally constant. So an
interval of rotations around $0$ is reachable by one such loop, and every rotation by repeating it. The loop is contractible in the cylinder and
its displacement is $-\int_DF$ over the annulus it bounds, in accordance with \cref{thm:phase}(ii).
\end{solution}

\begin{exercise}[label=exo:no-invariant]{3}
Let $\alpha$ be irrational. Show that the D-topology of the target of $c$ is trivial, and deduce directly that a first integral with values in a
space whose D-topology is Hausdorff is constant. Which smooth first integral is not constant?
\end{exercise}
\begin{solution}
The D-topology of $\R/2\pi(\Z+\alpha\Z)$ is the quotient topology, and a saturated open set of $\R$ is invariant under a dense group of translations, so it is
empty or $\R$. A first integral $f$ factors as $\bar f\circ c$ with $\bar f$ smooth, hence D-continuous; a continuous map from an indiscrete space to
a Hausdorff space is constant. The map $c$ itself is a non-constant smooth first integral, with values in $\Tal$, whose D-topology is not
Hausdorff.
\end{solution}

\begin{exercise}[label=exo:approx]{4}
Let $\alpha$ be irrational with convergents $p_j/q_j$. Prove that every point of $\R/\Z$ is within $\tfrac3{2q_j}$ of one of the points $k\alpha$,
$0\le k<q_j$, and deduce the last clause of \cref{thm:beanie}(iv).
\end{exercise}
\begin{solution}
The convergents satisfy $\abs{q_j\alpha-p_j}<1/q_{j+1}$ \cite{HardyWright}. For $0\le k<q_j$,
$\abs{k\alpha-kp_j/q_j}=\tfrac k{q_j}\abs{q_j\alpha-p_j}<1/q_{j+1}$. Since $p_j$ and $q_j$ are coprime, the points $kp_j/q_j\bmod1$, $0\le k<q_j$, are all the
multiples of $1/q_j$, and every point of the circle is within $\tfrac1{2q_j}$ of one of them. So every point is within
$\tfrac1{2q_j}+\tfrac1{q_{j+1}}\le\tfrac3{2q_j}$ of some $k\alpha$. In the system, $k$ turns of the joint rotate the body by $-2\pi k\alpha$; multiplying by $2\pi$, every
orientation is within $3\pi/q_j$ of one reached by fewer than $q_j$ turns.
\end{solution}



\chapter{System design: composition, ports, and reduction}\label{ch:systems}
\chaptermark{System design}

\begin{chapabstract}
Open physical systems are composed along shared ports, and the composite of energy-conserving systems should be energy-conserving. For
linear systems this is the theorem that Lagrangian and Dirac relations compose. For non-linear systems the composite of two correspondences
is a fibre product, which exists in $\Diff$ without transversality hypotheses. Port-Hamiltonian systems are closed under interconnection, and
the reduction of a symmetric component commutes with its interconnection to the rest of a design.
\end{chapabstract}

\section{Correspondences}

A design assembles components by identifying variables at their interfaces. In Hamiltonian terms an interface is a parasymplectic space of
port variables, and a component is a relation between its ports that is compatible with the forms.

\begin{definition}\label{def:correspondence}
An \defn{isotropic correspondence} from $(X,\omega)$ to $(X',\omega')$ is a diffeological space $L$ with smooth maps $s\colon L\to X$, $t\colon L\to X'$ such that
$s^*\omega=t^*\omega'$; equivalently a span $X\leftarrow L\to X'$ in the slice $\SmSet/\Omcl$; equivalently a smooth map $L\to X\times_\omega X'$ to the product
of \cref{prop:slice}; equivalently a smooth map $L\to\overline X\boxplus X'$ that pulls the form back to zero.
\end{definition}

\begin{theorem}[Composition]\label{thm:corr}
Isotropic correspondences compose by fibre product,
\[
(X'\xleftarrow{s'}L'\xrightarrow{t'}X'')\circ(X\xleftarrow{s}L\xrightarrow{t}X')=\bigl(X\xleftarrow{s\circ\pr}L\times_{X'}L'\xrightarrow{t'\circ\pr'}X''\bigr),
\]
and with this composition the parasymplectic spaces are the objects of a bicategory $\cat{Corr}$. The graph of a morphism of $\ParaSymp$ is a
correspondence, and composition of graphs is composition of maps. The sum $\boxplus$ is a symmetric monoidal structure on $\cat{Corr}$, and
correspondences $X\rel X'$ are the correspondences $\ast\rel\overline X\boxplus X'$.
\end{theorem}
\begin{proof}
The fibre product exists in $\Diff$ \VolI{Theorem~1.6}, and
$(s\circ\pr)^*\omega=\pr^*t^*\omega'=(t\circ\pr)^*\omega'=(s'\circ\pr')^*\omega'=(t'\circ\pr')^*\omega''$, because $t\circ\pr=s'\circ\pr'$ on the fibre product. Associativity and units hold up
to the canonical isomorphisms of iterated fibre products, as for spans in any category with pullbacks. For a morphism $f$ the graph is
$X\xleftarrow{\id}X\xrightarrow{f}X'$ (\cref{exo:graph}), and $X\times_{X'}X'\cong X$. The last statement is the last clause of \cref{def:correspondence}.
\end{proof}

In the category of manifolds the fibre product $L\times_{X'}L'$ exists only under a transversality condition, and the composition of
Lagrangian correspondences is for that reason only partially defined \cite{Weinstein}. In $\Diff$ the composite always exists; when
transversality fails it is a diffeological space that is not a manifold, with its forms, its plots and its homotopy type. The condition
of being \emph{Lagrangian}, isotropic of half dimension, is pointwise and is available when the tangent spaces are; the linear case is next.

\begin{figure}[t]
\centering
\begin{tikzcd}[column sep=2.2em,row sep=2.0em]
&& L\times_{X'}L' \arrow[dl,"\pr"'] \arrow[dr,"\pr'"] \arrow[dd,phantom,"\lrcorner"{rotate=-45},very near start] && & & Z \arrow[dl,hook'] \arrow[dr,"\pi_G"] &\\
& L \arrow[dl,"s"'] \arrow[dr,"t"] && L' \arrow[dl,"s'"'] \arrow[dr,"t'"] & & X && X_0\\
X \arrow[drr,"\omega"'] && X' \arrow[d,"\omega'"] && X'' \arrow[dll,"\omega''"] & & \Omcl \arrow[from=ul,"\omega"'] \arrow[from=ur,"\omega_0"] &\\
&& \Omcl && & & &
\end{tikzcd}
\caption{Left: composition of isotropic correspondences is composition of spans over $\Omcl$. Right: symplectic reduction is a
correspondence from a space to its reduced space.}\label{fig:spans}
\end{figure}

\section{Linear relations}

Let $V$ be a finite-dimensional real vector space with a non-degenerate bilinear form $\langle\ ,\ \rangle$, symmetric or antisymmetric, and $\overline V$ the same
space with the opposite form. A subspace $L$ is \defn{Lagrangian} if $L=L^\perp$. A \defn{Lagrangian relation} $V_1\rel V_2$ is a Lagrangian subspace of
$\overline V_1\oplus V_2$, and the composite of relations is $L_2\circ L_1=\set{(v_1,v_3)\mid\exists\,v_2:\ (v_1,v_2)\in L_1,\ (v_2,v_3)\in L_2}$.

\begin{theorem}[Lagrangian relations compose]\label{thm:lagrel}
\begin{enumerate}[label=\textup{(\roman*)}]
\item \emph{Reduction.} If $C\subseteq V$ is coisotropic, $C^\perp\subseteq C$, and $L\subseteq V$ is Lagrangian, then $L_C=(L\cap C+C^\perp)/C^\perp$ is Lagrangian in $C/C^\perp$.
\item The composite of two Lagrangian relations is a Lagrangian relation, with no hypothesis of transversality.
\end{enumerate}
The statement holds for forms of either symmetry type.
\end{theorem}
\begin{proof}
(i) The form of $V$ induces a non-degenerate form on $C/C^\perp$, for which $L_C$ is isotropic. Since $(L\cap C)^\perp=L^\perp+C^\perp=L+C^\perp$,
\[
\dim(L\cap C)=\dim V-\dim L-\dim C^\perp+\dim(L\cap C^\perp),
\]
and with $\dim L=\tfrac12\dim V$ and $\dim C=\dim V-\dim C^\perp$ this gives $\dim L_C=\dim(L\cap C)-\dim(L\cap C^\perp)=\tfrac12(\dim C-\dim C^\perp)$. An isotropic subspace
of half dimension is equal to its orthogonal. (ii) In $V=\overline V_1\oplus V_2\oplus\overline V_2\oplus V_3$ the subspace $L=L_1\oplus L_2$ is Lagrangian and
$C=V_1\oplus\Delta_{V_2}\oplus V_3$ is coisotropic with $C^\perp=0\oplus\Delta_{V_2}\oplus0$, because the diagonal of $V_2\oplus\overline V_2$ is Lagrangian. Then
$C/C^\perp=\overline V_1\oplus V_3$ and $L_C=L_2\circ L_1$.
\end{proof}

For antisymmetric forms this is the linear symplectic category \cite{GuilleminSternberg}. For the symmetric pairing
$\langle(f,e),(f',e')\rangle=e(f')+e'(f)$ on a space $F\oplus F^*$ of \emph{flows} and \emph{efforts}, a Lagrangian subspace is a \defn{Dirac structure}: the
constitutive relation of a lossless interconnection, on which the power $e(f)$ vanishes.

\begin{corollary}[Cervera--van der Schaft--Ba\~nos \cite{Cervera}]\label{cor:dirac}
The interconnection of two Dirac structures on $F_1\oplus F_2$ and on $F_2\oplus F_3$ through the shared port, with $f_2=-f_2'$ and $e_2=e_2'$, is a Dirac
structure on $F_1\oplus F_3$.
\end{corollary}
\noindent The proof is \cref{exo:dirac}. Kirchhoff's laws, ideal transformers and rigid kinematic constraints are Dirac structures, and the
corollary is the statement that a network of lossless interconnections is a lossless interconnection. In the passive linear case the
composition of circuits is of this kind \cite{BaezFong}; eliminating an internal node is a composition of relations, and no
non-degeneracy of the eliminated block is needed (\cref{exo:schur}).

\section{Port-Hamiltonian systems}

A \defn{port-Hamiltonian system} on a manifold $X$ with energy $H$ is
\begin{equation}\label{eq:pH}
\dot x=\bigl(J(x)-R(x)\bigr)\nabla H(x)+g(x)\,u,\qquad y=g(x)\transp\nabla H(x),
\end{equation}
with $J$ antisymmetric, $R$ symmetric positive semi-definite, input $u$ and output $y$ \cite{vdSJ}.

\begin{theorem}[Interconnection]\label{thm:pH}
\begin{enumerate}[label=\textup{(\roman*)}]
\item Along every trajectory of \eqref{eq:pH}, $\dot H=-\nabla H\transp R\,\nabla H+y\transp u\le y\transp u$.
\item The feedback interconnection $u_1=-y_2+e_1$, $u_2=y_1+e_2$ of two port-Hamiltonian systems is port-Hamiltonian on $X_1\times X_2$ with
\[
H=H_1+H_2,\quad J=\begin{pmatrix}J_1&-g_1g_2\transp\\ g_2g_1\transp&J_2\end{pmatrix},\quad R=\begin{pmatrix}R_1&0\\0&R_2\end{pmatrix},\quad g=\begin{pmatrix}g_1&0\\0&g_2\end{pmatrix}.
\]
\item Hence $H(x(t))-H(x(0))\le\int_0^t(y_1\transp e_1+y_2\transp e_2)\,\dd\tau$: the composite is passive with storage function $H_1+H_2$.
\end{enumerate}
\end{theorem}
\begin{proof}
(i) $\dot H=\nabla H\transp\dot x=\nabla H\transp J\nabla H-\nabla H\transp R\nabla H+\nabla H\transp gu$, and the first term vanishes. (ii) Substituting,
$\dot x_1=(J_1-R_1)\nabla H_1-g_1g_2\transp\nabla H_2+g_1e_1$ and $\dot x_2=(J_2-R_2)\nabla H_2+g_2g_1\transp\nabla H_1+g_2e_2$; the off-diagonal blocks are negative transposes of
each other. (iii) Integrate (i) for the composite.
\end{proof}

The feedback law of (ii) is a Dirac structure on the port variables, $y_1\transp u_1+y_2\transp u_2=y_1\transp e_1+y_2\transp e_2$, and the theorem is the
non-linear, dissipative counterpart of \cref{cor:dirac}. The state space of a design assembled in this way is a product of the state
spaces of the components, cut down by the constraints of the interconnection and divided by its symmetries. By \VolI{Theorem~13.1} such
state spaces are diffeological spaces in general, and the two operations of cutting down and dividing are the two steps of reduction.

\begin{table}[h]\centering\small
\begin{tabular}{@{}p{3.1cm}p{3.3cm}p{3.2cm}p{3.4cm}@{}}\toprule
setting & interface & component & composition\\\midrule
$\ParaSymp$ & space with closed $2$-form & form-preserving map & of maps\\
$\cat{Corr}$ & the same & isotropic span & fibre product (\cref{thm:corr})\\
linear symplectic & symplectic vector space & Lagrangian relation & of relations (\cref{thm:lagrel})\\
power ports & $F\oplus F^*$ & Dirac structure & shared port (\cref{cor:dirac})\\
port-Hamiltonian & inputs and outputs & system \eqref{eq:pH} & feedback (\cref{thm:pH})\\\bottomrule
\end{tabular}
\caption{Five compositional settings for open Hamiltonian systems.}\label{tab:composition}
\end{table}

\section{Reduction commutes with interconnection}

\begin{theorem}[Modular reduction]\label{thm:modular}
Let $(X_1,\omega_1)$ be equivariantly prequantised for a group $G$ acting principally on $Z_1=\mu_1^{-1}(0)$, with reduced space $(X_{1,0},\omega_{1,0})$.
\begin{enumerate}[label=\textup{(\roman*)}]
\item The span $X_1\hookleftarrow Z_1\xrightarrow{\pi_G}X_{1,0}$ is an isotropic correspondence $\mathcal R\colon X_1\rel X_{1,0}$. For every isotropic
$L\to X_1$ the composite $\mathcal R\circ L=L\times_{X_1}Z_1\to X_{1,0}$ is isotropic.
\item For every parasymplectic space $(X_2,\omega_2)$, with $G$ acting on $X_1\boxplus X_2$ through the first factor,
\[
(Z_1\times X_2)/G\;\cong\;X_{1,0}\times X_2,\qquad\text{with reduced form }\omega_{1,0}\boxplus\omega_2 .
\]
A function $H_1+H_2+H_c$ on $X_1\times X_2$ with $H_1$ and the coupling $H_c$ invariant under $G$ descends to $X_{1,0}\times X_2$.
\item If a second group $H$ acts on $X_2$ in the same way, the reductions by $G$, by $H$ and by $G\times H$ are related as in \cref{thm:stages}, and
the reduced space is $X_{1,0}\times X_{2,0}$.
\end{enumerate}
\end{theorem}
\noindent The proof is \cref{exo:modular}. In design terms: a component with a symmetry can be replaced by its reduced model inside any larger
design whose coupling to it is invariant, and the result is the reduced model of the whole. The reduced component is an object of the same
kind, a parasymplectic diffeological space, also when it is singular. This is the Hamiltonian form of the lossless symmetry reduction of
\VolI{Theorem~13.3}, and the cases in which the quotient must be taken as a stack are listed in \cref{tab:reduced}.

\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
 \begin{scope}
  \node[hcsnode,minimum width=1.9cm,minimum height=0.9cm] (S1) at (0,1.2) {$\Sigma_1$: $H_1$};
  \node[hcsnodeb,minimum width=1.9cm,minimum height=0.9cm] (S2) at (0,-0.6) {$\Sigma_2$: $H_2$};
  \node[draw,circle,inner sep=1.5pt] (m1) at (-2.2,1.2) {$+$};
  \node[draw,circle,inner sep=1.5pt] (m2) at (2.2,-0.6) {$+$};
  \draw[->] (-3.0,1.2)--node[above]{$e_1$}(m1); \draw[->] (m1)--node[above]{$u_1$}(S1);
  \draw[->] (S1)--node[above,pos=0.3]{$y_1$}(3.0,1.2);
  \draw[->] (2.2,1.2)--(m2);
  \draw[->] (3.0,-0.6)--node[above]{$e_2$}(m2); \draw[->] (m2)--node[above]{$u_2$}(S2);
  \draw[->] (S2)--node[above,pos=0.3]{$y_2$}(-3.0,-0.6);
  \draw[->] (-2.2,-0.6)--node[left]{$-$}(m1);
  \node[below] at (0,-1.3) {$\dot H\le y_1\transp e_1+y_2\transp e_2$,\quad $H=H_1+H_2$};
 \end{scope}
 \begin{scope}[xshift=6.3cm,yshift=0.3cm]
  \node (A) at (0,1.5) {$X_1\boxplus X_2$}; \node (B) at (3.0,1.5) {$X_{1,0}\boxplus X_2$};
  \node (C) at (0,-0.5) {$X_1$}; \node (D) at (3.0,-0.5) {$X_{1,0}$};
  \draw[->,dashed] (A)--node[above]{reduce}(B);
  \draw[->,dashed] (C)--node[below]{reduce}(D);
  \draw[->] (C)--node[left]{$\boxplus X_2$}(A); \draw[->] (D)--node[right]{$\boxplus X_2$}(B);
 \end{scope}
\end{tikzpicture}
\caption{Left: the feedback interconnection of \cref{thm:pH}. Right: \cref{thm:modular}(ii); coupling and reduction commute.}\label{fig:interconnect}
\end{figure}

\exercisesheading

\begin{exercise}[label=exo:graph-compose]{1}
Show that for morphisms $f\colon X\to X'$ and $f'\colon X'\to X''$ of $\ParaSymp$ the composite of the graphs is the graph of $f'\circ f$.
\end{exercise}
\begin{solution}
The graph of $f$ is $L=X$ with $(s,t)=(\id,f)$, and that of $f'$ is $L'=X'$ with $(\id,f')$. The fibre product $L\times_{X'}L'=\set{(x,x')\mid f(x)=x'}$ is
identified with $X$ by the first projection, and under this identification the two legs are $\id$ and $f'\circ f$.
\end{solution}

\begin{exercise}[label=exo:schur]{2}
In $V=\R^4$ with coordinates $(q_1,q_2,p_1,p_2)$ and the standard symplectic form, let $\Lambda=\set{p=\nabla S(q)}$ with
$S=\tfrac12aq_1^2+bq_1q_2+\tfrac12cq_2^2$, and let $C=\set{p_1=0}$. Compute $\Lambda_C\subseteq\R^2$ for $a\neq0$ and for $a=0\neq b$.
\end{exercise}
\begin{solution}
$C^\perp$ is spanned by $\partial_{q_1}$, and $C/C^\perp=\R^2$ with coordinates $(q_2,p_2)$. On $\Lambda\cap C$: $p_1=aq_1+bq_2=0$ and $p_2=bq_1+cq_2$. If $a\neq0$ then
$q_1=-bq_2/a$ and $\Lambda_C=\set{p_2=(c-b^2/a)\,q_2}$, the graph of the Schur complement: the generating function of the reduced relation is $S$
with the internal variable eliminated. If $a=0$ and $b\neq0$ then $q_2=0$ and $p_2=bq_1$ is arbitrary: $\Lambda_C$ is the vertical line $\set{q_2=0}$. It is
Lagrangian, in accordance with \cref{thm:lagrel}(i), and it is not the graph of a function: elimination of an internal variable with a degenerate
block produces a constraint in place of a constitutive law.
\end{solution}

\begin{exercise}[label=exo:oscillators]{2}
Write a mass--spring system with force input and velocity output as a port-Hamiltonian system, and compute the feedback interconnection
of two of them.
\end{exercise}
\begin{solution}
$x=(q,p)$, $H=\tfrac1{2m}p^2+\tfrac k2q^2$, $J=\bigl(\begin{smallmatrix}0&1\\-1&0\end{smallmatrix}\bigr)$, $R=0$, $g=(0,1)\transp$: $\dot q=p/m$, $\dot p=-kq+u$, $y=p/m$, the
velocity, and $\dot H=yu$, force times velocity. For two such systems, $g_1g_2\transp$ is the matrix unit coupling the two momenta, and
\cref{thm:pH}(ii) gives $\dot p_1=-k_1q_1-p_2/m_2+e_1$, $\dot p_2=-k_2q_2+p_1/m_1+e_2$: a gyroscopic coupling. The total energy $H_1+H_2$ satisfies
$\dot H=y_1e_1+y_2e_2$ and is conserved for $e=0$.
\end{solution}

\begin{exercise}[label=exo:dirac]{3}
Deduce \cref{cor:dirac} from \cref{thm:lagrel}.
\end{exercise}
\begin{solution}
Let $W_i=F_i\oplus F_i^*$ with the symmetric pairing. The map $\sigma(f,e)=(-f,e)$ satisfies $\langle\sigma w,\sigma w'\rangle=-\langle w,w'\rangle$, so it is an isometry
$W_i\to\overline W_i$. A Dirac structure $D_A$ on $F_1\oplus F_2$ is a Lagrangian subspace of $W_1\oplus W_2$; applying $\sigma$ to the first factor makes it a
Lagrangian relation $W_1\rel W_2$, and similarly $D_B$ becomes a relation $W_2\rel W_3$ after applying $\sigma$ to its $W_2$-component. The composite
of the two relations identifies $(f_2,e_2)$ in the first with $\sigma(f_2',e_2')=(-f_2',e_2')$ in the second, which is the interconnection
constraint. By \cref{thm:lagrel}(ii) the composite is Lagrangian in $\overline W_1\oplus W_3$, and applying $\sigma$ to the first factor again gives a Dirac
structure on $F_1\oplus F_3$.
\end{solution}

\begin{exercise}[label=exo:modular]{4}
Prove \cref{thm:modular}.
\end{exercise}
\begin{solution}
(i) By \cref{thm:reduction}, $\pi_G^*\omega_{1,0}=\omega_1|_{Z_1}$, which is the isotropy of the span. The second statement is \cref{thm:corr} applied to
$\ast\rel X_1\rel X_{1,0}$. (ii) The map $\pi_G\times\id\colon Z_1\times X_2\to X_{1,0}\times X_2$ is a product of subductions, hence a subduction \VolI{Proposition~1.7},
and its fibres are the orbits of $G$; so it induces a diffeomorphism from $(Z_1\times X_2)/G$. The form $\omega_1|_{Z_1}\boxplus\omega_2$ is the pullback of
$\omega_{1,0}\boxplus\omega_2$, and pullback along a subduction is injective, so the latter is the reduced form. The functions $H_1|_{Z_1}$ and $H_c|_{Z_1\times X_2}$ are
invariant, hence constant on the fibres of a subduction, and descend to smooth functions; $H_2$ is a function of the second factor. (iii) Apply
(ii) twice, or \cref{thm:stages} to the commuting actions of $G$ and $H$ on $X_1\boxplus X_2$: the zero level is $Z_1\times Z_2$ and its quotient by
$G\times H$ is $X_{1,0}\times X_{2,0}$ by the same argument.
\end{solution}



\chapter{The general structure: descent along an atlas}\label{ch:structure}
\chaptermark{Descent along an atlas}

\begin{chapabstract}
The conservation laws of \cref{ch:ml}, the geometric phases of \cref{ch:ai} and the four uses of symmetry in \cref{sec:acceleration} are
one situation: an objective defined on a quotient, and a dynamics defined on an atlas of the quotient by means of a structure that does not
descend. We state it symplectically, as a condition on a Lagrangian submanifold, and metrically, as a connection whose exact part gives the
conserved quantities and whose non-closed part gives the phases. The part of the statement that uses no tangent structure holds in every
$\infty$-topos. With tangent structure it holds in a differentially cohesive $\infty$-topos, for every group object acting on a Riemannian
manifold, where the atlas of the quotient is the composite of a quotient by a formal group and a formally \'etale map. For the syntax of an
algebraic theory it is the theory of normal forms and of invariant definitions.
\end{chapabstract}

\section{Invariance as a Lagrangian condition}

Let a Lie group $G$ act on a manifold $\Theta$. The cotangent lift of the action preserves the canonical $1$-form $\alpha=\langle p,\dd\theta\rangle$ of $T^*\Theta$, and by
\cref{thm:exact} its moment map is $\mu(\theta,p)(\xi)=\langle p,\xi_\Theta(\theta)\rangle$, where $\xi_\Theta$ is the vector field generated by $\xi\in\fg$.

\begin{theorem}[Invariant functions and the zero level]\label{thm:lagrangian}
\begin{enumerate}[label=\textup{(\roman*)}]
\item A function $L\in\cinf(\Theta)$ is invariant under the identity component of $G$ if and only if the graph of $\dd L$ is contained in $\mu^{-1}(0)$.
\item If $G$ acts freely and properly on $\Theta$, with quotient $\pi\colon\Theta\to X$, then $\mu^{-1}(0)=\pi^*T^*X$, the action of $G$ on it is principal, and the
reduced space of \cref{cor:exact-reduction} is $T^*X$ with its canonical forms.
\item In that case, for $L=\ell\circ\pi$, the image of the graph of $\dd L$ under the reduction correspondence $\mathcal R\colon T^*\Theta\rel T^*X$ of \cref{thm:modular} is
the graph of $\dd\ell$.
\end{enumerate}
\end{theorem}
\begin{proof}
(i) $\mu(\theta,\dd L_\theta)(\xi)=\dd L(\xi_\Theta)$ is the derivative of $L$ along the orbit; it vanishes for all $\xi$ if and only if $L$ is constant on the orbits
of the identity component. (ii) A covector at $\theta$ lies in $\mu^{-1}(0)$ if and only if it vanishes on the tangent space of the orbit, that is, if
and only if it is $\pi^*\beta$ for a unique $\beta\in T^*_{\pi(\theta)}X$. So $\mu^{-1}(0)=\pi^*T^*X$, and the map $(\theta,\pi^*\beta)\mapsto(\pi(\theta),\beta)$ is a principal
$G$-bundle over $T^*X$, the pullback of $\pi$; the action is principal also by \cref{lem:principal}(a). For a tangent vector $v$ at
$(\theta,\pi^*\beta)$, $\alpha(v)=\pi^*\beta(\dd\tau\,v)=\beta(\dd\pi\,\dd\tau\,v)$ with $\tau$ the projection to $\Theta$, which is the pullback of the canonical form of $T^*X$. (iii)
$\dd L=\pi^*\dd\ell$, so the graph of $\dd L$ lies in the zero level and its image is $\set{(x,\dd\ell_x)}$.
\end{proof}

\begin{figure}[t]
\centering
\begin{tikzcd}[column sep=3.0em,row sep=2.2em]
\mathrm{graph}(\dd L) \arrow[r,hook] \arrow[d,two heads] & \mu^{-1}(0)=\pi^*T^*X \arrow[r,hook] \arrow[d,two heads,"/G"] & T^*\Theta \arrow[d,"\tau"] \\
\mathrm{graph}(\dd\ell) \arrow[r,hook] & T^*X & \Theta \arrow[d,"\pi"]\\
& & X=\Theta/G
\end{tikzcd}
\caption{\Cref{thm:lagrangian}. An invariant objective is a Lagrangian submanifold of the zero level of the moment map of the cotangent lift,
and its reduction is the objective on the quotient.}\label{fig:lagrangian}
\end{figure}

The theorem contains no dynamics. For an optimisation algorithm one more datum is required, a rule that converts the covector $\dd L$ into a motion, and
on $\Theta$ that rule is a metric. If the metric is invariant under $G$ it descends with everything else. The phenomena of \cref{ch:ml} arise because
the Euclidean metric of the parameters is invariant under a compact subgroup only.

\section{The connection of a metric}

Let $\Theta\subseteq\R^d$ be open and invariant under a closed subgroup $G\subseteq\GL_d(\R)$ whose Lie algebra is stable under transposition, $\fg=\fk\oplus\fpp$, and let
$K=G\cap\Ort(d)$. For $A\in\fg$ let
\[
a_A=\langle A\theta,\dd\theta\rangle\in\Om^1(\Theta),
\]
the $1$-form dual to the generator $A\theta$ for the Euclidean metric.

\begin{theorem}[Exact part and non-closed part]\label{thm:metric-connection}
\begin{enumerate}[label=\textup{(\roman*)}]
\item A vector $v$ at $\theta$ is orthogonal to the orbit of $G$ if and only if $a_A(v)=0$ for all $A\in\fg$. The gradient of every $G$-invariant function is
orthogonal to the orbits.
\item For $A\in\fpp$ the form is exact: $a_A=\dd Q_A$ with $Q_A=\tfrac12\langle\theta,A\theta\rangle$.
\item For $A\in\fk$ the form is not closed unless $A=0$: $\dd a_A=-2\sum_{i<j}A_{ij}\,\dd\theta_i\wedge\dd\theta_j$.
\item Every curve orthogonal to the orbits lies in a level set of $Q\colon\Theta\to\fpp^*$. On the level set $Q^{-1}(0)$, which $K$ preserves, the orthogonal
complement of the $G$-orbits is the orthogonal complement of the $K$-orbits, the mechanical connection of \cref{thm:phase} for the group $K$.
\end{enumerate}
\end{theorem}
\begin{proof}
(i) The tangent space of the orbit is $\fg\theta$, and $a_A(v)=\langle A\theta,v\rangle$; the second statement is \eqref{eq:orth}. (ii) $\dd\,\tfrac12\langle\theta,A\theta\rangle=\langle A\theta,\dd\theta\rangle$ for
symmetric $A$. (iii) $a_A=\sum_{i,j}A_{ij}\theta_j\,\dd\theta_i$ and $\dd a_A=\sum_{i,j}A_{ij}\,\dd\theta_j\wedge\dd\theta_i=\sum_{i<j}(A_{ji}-A_{ij})\,\dd\theta_i\wedge\dd\theta_j$. (iv) By (i) and (ii)
the functions $Q_A$ are constant along such a curve. The tangent space of a level set of $Q$ is $(\fpp\theta)^\perp$, and
$(\fg\theta)^\perp=(\fpp\theta)^\perp\cap(\fk\theta)^\perp$. Equivariance of $Q$ under $K$ gives the invariance of the zero level.
\end{proof}

So the conservation laws of gradient flow and the geometric phases are the two parts of one object. The symmetric directions give exact
forms, hence first integrals and a foliation by slices; the antisymmetric directions give forms that are not closed, and
where $\dd a_A$ is non-zero on pairs of vectors orthogonal to the orbits the connection has curvature, with a holonomy and no first integral
(\cref{prop:dc-conserved}). \Cref{thm:two-noether}(b) and (d) are parts (ii) and (i); the two-body system of \cref{thm:beanie} is the case of a closed
form that is not exact, where the first integral exists with values in a quotient of $\R$.

\begin{theorem}[Four positions]\label{thm:positions}
In the situation above, let $G$ act freely and properly on $\Theta$, $\pi\colon\Theta\to X$, and $L=\ell\circ\pi$.
\begin{enumerate}[label=\textup{(\alph*)}]
\item \emph{Gauge dependence.} $\dd\pi_\theta\bigl(\nabla L(\theta)\bigr)=C_\theta\,\dd\ell_x$, where $C_\theta=\dd\pi_\theta\circ\dd\pi_\theta\transp\colon T^*_xX\to T_xX$ is symmetric and positive
definite. It satisfies $C_{k\theta}=C_\theta$ for $k\in K$, and it depends on the point of the fibre otherwise.
\item \emph{A slice.} If $Q^{-1}(0)$ intersects each fibre in one orbit of $K$, then $C$ restricted to $Q^{-1}(0)$ is a cometric $C^{\mathrm{bal}}$ on $X$, and gradient
flow from a balanced point projects to $\dot x=-C^{\mathrm{bal}}\dd\ell$. For the linear network, $C^{\mathrm{bal}}(G)=(XX\transp)^{1/2}G+G(X\transp X)^{1/2}$.
\item \emph{An invariant metric.} For a $G$-invariant metric $g'$ on $\Theta$ the cometric $C'$ is constant on fibres, and the $g'$-gradient flow of $L$
projects to $\dot x=-C'\dd\ell$ from every initial point. For the linear network and
$g'=\tr(\dd B\,AA\transp\dd B\transp)+\tr(\dd A\transp B\transp B\,\dd A)$, $C'(G)=P_cG+GP_r$.
\item \emph{Projection.} Every update $u\in T_\theta\Theta$ is the sum of a part orthogonal to the orbit and a part tangent to it. Only the first has an
image in $T_xX$; the second changes $Q_A$ at first order by $\langle A\theta,u\rangle$ for $A\in\fpp$, and moves $\theta$ along its $K$-orbit for $A\in\fk$.
\end{enumerate}
\end{theorem}
\begin{proof}
(a) $\dd L=\dd\ell\circ\dd\pi$, so $\nabla L=\dd\pi\transp\dd\ell$ and $\dd\pi\,\nabla L=\dd\pi\,\dd\pi\transp\dd\ell$. Since $\pi\circ k=\pi$ and $k$ is orthogonal, $\dd\pi_{k\theta}=\dd\pi_\theta\circ k^{-1}$ and
$C_{k\theta}=C_\theta$. (b) follows from (a), from the invariance of the balanced set (\cref{thm:two-noether}(b)), and for the linear network from
\cref{prop:induced}(i) and \cref{thm:balanced}(ii). (c) For an invariant metric $\pi$ is a Riemannian submersion onto $X$ with the quotient metric,
and the gradient of $\ell\circ\pi$ is the horizontal lift of the gradient of $\ell$. The $g'$-gradients are $GA\transp(AA\transp)^{-1}$ and $(B\transp B)^{-1}B\transp G$, and the
formula is \cref{prop:induced}(ii) to first order in $\eta$. (d) is \cref{thm:metric-connection}(i),(ii).
\end{proof}

\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
 \begin{scope}
  \fill[hcsmist] (0,0) rectangle (5.2,3.4);
  \draw[hcsteal] (0,0) rectangle (5.2,3.4);
  \foreach \x in {0.8,1.9,3.0,4.1} \draw[hcsgrey,line width=0.4pt] (\x,0)--(\x,3.4);
  \draw[hcsgold,line width=1.1pt] (0,0.9) .. controls (1.8,0.75) and (3.4,1.05) .. (5.2,0.9);
  \draw[hcsteal,line width=0.8pt,dashed] (0,2.5) .. controls (1.8,2.35) and (3.4,2.65) .. (5.2,2.5);
  \node[hcsgold!70!black,right] at (5.2,0.9) {$Q=0$};
  \node[hcsteal,right] at (5.2,2.5) {$Q=c$};
  \node[hcsgrey,above] at (0.8,3.4) {orbit};
  \draw[->,hcsink,line width=1pt] (1.9,0.86)--(2.6,0.9);
  \draw[->,hcsink,line width=1pt] (1.9,2.46)--(3.4,2.52);
  \draw[->,hcsrust,line width=0.9pt] (3.0,1.05)--(3.0,2.35);
  \node[hcsrust,right] at (3.0,1.7) {(2)};
  \node[hcsink,below] at (2.25,0.85) {(1)};
  \node[hcsink,above] at (2.6,2.55) {(1)};
  \draw[->,hcsplum,line width=0.9pt] (4.1,1.4)--(4.6,2.0);
  \draw[->,hcsplum,line width=0.9pt,dashed] (4.1,1.4)--(4.6,1.42);
  \node[hcsplum,right] at (4.55,1.75) {(4)};
  \draw[->>,line width=0.6pt] (2.6,-0.15)--node[right]{$\pi$}(2.6,-0.85);
  \draw[hcsink,line width=1pt] (0,-1.1)--(5.2,-1.1) node[right]{$X$};
  \foreach \x in {0.8,1.9,3.0,4.1} \fill (\x,-1.1) circle (1.2pt);
  \draw[->,hcsteal,line width=1pt] (1.9,-1.3)--(2.6,-1.3) node[midway,below]{(3)};
 \end{scope}
 \begin{scope}[xshift=7.6cm,yshift=0.5cm]
  \node[align=left,text width=6.2cm] at (2.6,1.3) {(1) the level of $Q$ fixes the speed of the projected flow;\\[0.4ex]
   (2) a move along the orbit changes the level and not the objective;\\[0.4ex]
   (3) an invariant metric gives one flow on $X$ for all levels;\\[0.4ex]
   (4) an update with a component along the orbit is projected.};
 \end{scope}
\end{tikzpicture}
\caption{The four positions of \cref{thm:positions}. Fibres are orbits of the symmetry group, the curves are level sets of the invariants of
gradient flow, and the same objective on $X$ is descended at different speeds from different levels.}\label{fig:positions}
\end{figure}

\begin{table}[h]\centering\small
\begin{tabular}{@{}p{2.6cm}p{3.6cm}p{3.5cm}p{3.3cm}@{}}\toprule
position & what is chosen & dynamics on $X$ & in the literature\\\midrule
(a) none & a point of the fibre, by the initialisation & $-C_\theta\,\dd\ell$, with $\theta$ moving in a level set & conservation laws \cite{Kunin,ZhaoSurvey}\\
(b) slice & the level $Q=0$ & $-C^{\mathrm{bal}}\dd\ell$ & \cite{Arora,LindseyMenon}\\
(b$'$) change of slice & a vertical move & $C$ changes, $\ell$ does not & teleportation \cite{ZhaoTeleport}\\
(c) invariant metric & $g'$ on $\Theta$ & $-C'\dd\ell$, for all levels & \cite{Absil,TongMaChi}\\
(d) projection & the orthogonal part of $u$ & image of $u_\perp$ & \cite{AdamP}\\\bottomrule
\end{tabular}
\caption{The uses of a parameter symmetry as positions with respect to the quotient map.}\label{tab:positions}
\end{table}

The statements of this section are classical in each of their parts: optimisation on quotient manifolds \cite{Absil}, the moment map and the
theorem of Kempf and Ness for the balanced set \cite{LindseyMenon}, and cotangent bundle reduction \cite{AbrahamMarsden}. Their placement in the present
volume is the following: \cref{thm:lagrangian} is \cref{cor:exact-reduction} for a cotangent bundle, position (b) is the reduction of
structure group of \cref{thm:balanced}, and position (d) is the connection of \cref{thm:phase}.

\section{The same structure in an \texorpdfstring{$\infty$}{infinity}-topos}

Three of the four positions use no metric. Let $\Hh$ be an $\infty$-topos and $p\colon\Theta\to X$ an effective epimorphism, an \emph{atlas} of $X$, with
\v{C}ech nerve $\check C(p)_n=\Theta\times_X\cdots\times_X\Theta$.

\begin{proposition}[Atlases]\label{prop:atlas}
\begin{enumerate}[label=\textup{(\roman*)}]
\item \emph{Descent.} $X$ is the colimit of $\check C(p)$, and $\Map(X,V)$ is the limit of $\Map(\check C(p)_\bullet,V)$ \cite{HTT}. For a $0$-truncated $V$ a map
$X\to V$ is a map $f\colon\Theta\to V$ whose two pullbacks to $\Theta\times_X\Theta$ coincide.
\item \emph{Invariant dynamics.} If $X=\Theta\hquot G$ and $u\colon\Theta\to\Theta$ is $G$-equivariant, then $u$ induces $\bar u\colon X\to X$ with $p\circ u\simeq\bar u\circ p$.
\item \emph{Slices.} If $s\colon S\to\Theta$ is a map such that $p\circ s$ is an effective epimorphism, then $X$ is the colimit of $\check C(p\circ s)$.
\item \emph{Invariants of a dynamics.} For an endomorphism $u$ of $\Theta$ let $\Theta_u$ be the coequaliser of $u$ and the identity. For a $0$-truncated $V$,
the maps $\Theta_u\to V$ are the maps $f\colon\Theta\to V$ with $f\circ u=f$.
\end{enumerate}
\end{proposition}
\begin{proof}
(i) Groupoid objects of an $\infty$-topos are effective, so an effective epimorphism is the colimit of its \v{C}ech nerve
\cite[Theorem~6.1.0.6]{HTT}; for $0$-truncated $V$ the limit is the equaliser of the first two terms. (ii) An equivariant map is a map of the
simplicial objects $G^\bullet\times\Theta$, and colimits are functorial. (iii) is (i) for $p\circ s$. (iv) is the universal property of the coequaliser, the
homotopy coherences being vacuous for a $0$-truncated target.
\end{proof}

Each part has appeared in this volume. Part (i) for $V=\Om^k$ is \eqref{eq:basic}, and for the $1$-truncated $V=\BTc$ it is \cref{thm:B}. Part
(ii) is position (c). Part (iii) with $S=Q^{-1}(0)$ is position (b): the \v{C}ech nerve of the slice is the action groupoid of the smaller
group $K$. Part (iv) for a flow in place of an endomorphism is the universal first integral of \cref{thm:beanie}(ii), whose target is the
irrational torus. The smooth statements of the previous section use one more datum, a splitting of the tangent map of $p$, which is the
connection. It is formulated in differential cohesion in \cref{sec:dc}.

\section{Differential cohesion}\label{sec:dc}

\Cref{thm:positions} was proved for a linear group acting freely and properly on an open subset of $\R^d$, by computation with matrices. Its
statements involve tangent vectors, and there are none in \cref{prop:atlas}. Two things are required for a general formulation: a tangent
functor that commutes with the formation of quotients, and a separation of the infinitesimal part of a symmetry from the rest. Both are part
of the structure of a differentially cohesive $\infty$-topos \cite{Schreiber,KhavkineSchreiber}.

\begin{definition}\label{def:dc}
A \defn{differentially cohesive $\infty$-topos with first-order infinitesimals} is an $\infty$-topos $\Hh$ with
\begin{enumerate}[label=\textup{(DC\arabic*)}]
\item an adjoint triple $\Re\dashv\Im\dashv\&$ of endofunctors, in which $\Im$ is an idempotent monad with unit $\eta$ and $\Re$ preserves finite products;
\item a $0$-truncated commutative ring object $R$ and a subobject $D\subseteq R$ containing $0$, with $\Re D\simeq\ast$, such that the functor $T=[D,-]$
preserves colimits;
\item the Kock--Lawvere property: $(a,b)\mapsto(d\mapsto a+bd)$ is an equivalence $R\times R\to[D,R]$.
\end{enumerate}
An object $A$ is \emph{coreduced} if $\eta_A$ is an equivalence, and a map $f\colon A\to B$ is \emph{formally \'etale} if the naturality square of $\eta$ is
a pullback, $A\simeq B\times_{\Im B}\Im A$. The projection $TA\to A$ is evaluation at $0$ and the zero section $A\to TA$ is restriction along $D\to\ast$. For a group
object $G$ with unit $e$, the kernel of $TG\to G$ is the group object $\fg=T_eG$, and the fibre of $\eta_G$ over the unit is the group object $\hat G$.
\end{definition}

The model, fixed from \cref{thm:dc-positions} on, is the $\infty$-topos of sheaves on the site of formal Cartesian spaces $\R^n\times\operatorname{Spec}W$,
with $W$ a Weil algebra and covers those of the factor $\R^n$. Here $R$ is the line, $D=\operatorname{Spec}\R[\varepsilon]/(\varepsilon^2)$,
$\Re(\R^n\times\operatorname{Spec}W)=\R^n$ and $(\Im A)(U)=A(\Re U)$. The functor $T$ is restriction along $U\mapsto U\times D$, under which the covers of $U$
and of $U\times D$ correspond, so $T$ has both adjoints. The $0$-truncated objects form the Cahiers topos \cite{Dubuc79,Kock}. Manifolds embed
fully faithfully, and $[D,M]$ is the tangent bundle of a manifold $M$. Smooth sets embed by a functor that preserves colimits and finite
products, and diffeological spaces embed through smooth sets. In the model $\eta_G$ is an effective epimorphism for every group object $G$,
since $\Re U$ is a retract of $U$ for every object $U$ of the site.

\begin{lemma}\label{lem:dc}
\begin{enumerate}[label=\textup{(\roman*)}]
\item $\Im$ and $T$ preserve limits and colimits.
\item $[D,\Im A]\simeq\Im A$ for every $A$: all tangent vectors of a coreduced object are zero.
\item Formally \'etale maps are stable under pullback, and every map between coreduced objects is formally \'etale.
\item If $f\colon A\to B$ is formally \'etale then $TA\simeq A\times_BTB$.
\end{enumerate}
\end{lemma}
\noindent The proof is \cref{exo:dc-lemma}.

\begin{proposition}[Tangent and infinitesimal shape of an atlas]\label{prop:dc-atlas}
Let $p\colon\Theta\to X$ be an effective epimorphism. Then $Tp$ and $\Im p$ are effective epimorphisms, with \v{C}ech nerves $T\check C(p)$ and $\Im\check C(p)$. For a
group object $G$ acting on $\Theta$,
\[
T(\Theta\hquot G)\simeq T\Theta\hquot TG,\qquad\Im(\Theta\hquot G)\simeq\Im\Theta\hquot\Im G .
\]
\end{proposition}
\begin{proof}
Both functors preserve colimits and limits (\cref{lem:dc}(i)), and the \v{C}ech nerve and the action groupoid are built from fibre products;
$TG$ and $\Im G$ are group objects because the functors preserve finite products.
\end{proof}

For a Lie group acting on a manifold, $T\Theta\hquot TG$ is the tangent stack of the quotient stack, and its sections are the vector fields on the
stack defined in \cite{Hepworth}.

\begin{theorem}[Infinitesimal and \'etale parts of a symmetry]\label{thm:dc-factorisation}
Let $G$ act on $\Theta$, $p\colon\Theta\to X=\Theta\hquot G$, and $\hat X=X\times_{\Im X}\Im\Theta$.
\begin{enumerate}[label=\textup{(\roman*)}]
\item $p$ factors as $\Theta\xrightarrow{\;e\;}\hat X\xrightarrow{\;\varepsilon\;}X$ with $\Im e$ an equivalence and $\varepsilon$ formally \'etale, and the factorisation with these properties
is unique \cite{CherubiniRijke}.
\item $\varepsilon$ is a principal bundle for the coreduced group $\Im G$: $X\simeq\hat X\hquot\Im G$, $\hat X\simeq(\Theta\times\Im G)\hquot G$ and $\hat X\times_X\Theta\simeq\Im G\times\Theta$. If
$\eta_G$ is an effective epimorphism, then $\hat X\simeq\Theta\hquot\hat G$.
\item $T\hat X\simeq\hat X\times_XTX$. Hence the relative tangent map $T\Theta\to\Theta\times_XTX$ of $p$ is the relative tangent map of $e$.
\item $\Im\hat G\simeq\ast$ and $T_e\hat G\simeq\fg$.
\item $p$ is formally \'etale if and only if $\eta_G\times\id\colon G\times\Theta\to\Im G\times\Theta$ is an equivalence. This holds when $G$ is coreduced, and then $\fg\simeq\ast$.
\end{enumerate}
\end{theorem}
\begin{proof}
(i) Let $e=(p,\eta_\Theta)$ and $\varepsilon=\pr_1$. Since $\Im$ preserves fibre products and is idempotent, $\Im\hat X\simeq\Im X\times_{\Im X}\Im\Theta\simeq\Im\Theta$, and $\Im e$ is the
identity under this equivalence. The map $\varepsilon$ is a pullback of $\Im p$, a map between coreduced objects, and is formally \'etale by
\cref{lem:dc}(iii). The $\Im$-equivalences and the formally \'etale maps are the two classes of an orthogonal factorisation system. (ii) and
(iii) are \cref{exo:dc-factorisation}. (iv) $\Im$ preserves finite products, so $\Im G$ is a group object and $\eta_G$ a homomorphism. $\Im\hat G$
is the fibre of $\Im\eta_G$, an equivalence. $T$ preserves fibres and $T\Im G\simeq\Im G$ by \cref{lem:dc}(ii), so
$T\hat G\simeq TG\times_{\Im G}\ast\simeq TG\times_G\hat G$, whose fibre over $e$ is $\fg$. (v) By uniqueness in (i), $p$ is formally \'etale if and only if $e$ is an
equivalence, which may be tested after pullback along the effective epimorphism $\hat X\times_X\Theta\to\hat X$. The pullback of $e$ is
$\Theta\times_X\Theta\simeq G\times\Theta\to\Im G\times\Theta$, the map $\eta_G\times\id$. If $G$ is coreduced, $TG\simeq[D,\Im G]\simeq\Im G\simeq G$ and the fibre of $TG\to G$ is a point.
\end{proof}

\begin{figure}[t]
\centering
\begin{tikzcd}[column sep=2.8em,row sep=2.6em]
\Theta \arrow[r,"e"] \arrow[d,"\eta"'] & \hat X \arrow[r,"\varepsilon"] \arrow[d,"\eta"'] \arrow[dr,phantom,"\lrcorner",very near start] & X \arrow[d,"\eta"]\\
\Im\Theta \arrow[r,"\simeq"'] & \Im\hat X \arrow[r,"\Im\varepsilon"'] & \Im X
\end{tikzcd}
\qquad\qquad
\begin{tikzcd}[column sep=2.8em,row sep=2.6em]
T\Theta \arrow[r,"Te"] \arrow[d] & T\hat X \arrow[r,"T\varepsilon"] \arrow[d] \arrow[dr,phantom,"\lrcorner",very near start] & TX \arrow[d]\\
\Theta \arrow[r,"e"'] & \hat X \arrow[r,"\varepsilon"'] & X
\end{tikzcd}
\caption{\Cref{thm:dc-factorisation}. The atlas of a quotient is the composite of a map inverted by $\Im$, the quotient by the formal group
$\hat G$, and a formally \'etale map, the quotient by the coreduced group $\Im G$, along which tangent objects are pulled back.}\label{fig:dc}
\end{figure}

So every statement about tangent vectors, vertical directions and connections for the atlas $p$ is a statement about $e\colon\Theta\to\hat X$, and
depends on $G$ through the formal group $\hat G$ only; the rest of the symmetry is in $\varepsilon$, along which there are no vertical tangent
directions. The object $\hat X$ is the formal completion of $X$ along $p$, and in derived algebraic geometry the maps $\Theta\to\hat X$ of this
kind are the Lie algebroids on $\Theta$ \cite{GaitsgoryRozenblyum}; here it is the action algebroid, whose anchor is the map $a$ of the next
proposition.

\begin{proposition}[The relative tangent sequence]\label{prop:dc-relative}
Let $G$ act on $\Theta$ with action map $\mathrm{act}$, $p\colon\Theta\to X=\Theta\hquot G$, and let $\fg$ act on $T\Theta$ by restriction of the action of $TG$.
\begin{enumerate}[label=\textup{(\roman*)}]
\item The relative tangent map $q\colon T\Theta\to\Theta\times_XTX$ is an effective epimorphism, and $\Theta\times_XTX\simeq T\Theta\hquot\fg$.
\item The fibre of $q$ over the zero section is $\fg\times\Theta$, with the map $a\colon\fg\times\Theta\to T\Theta$, $a(\xi,\theta)=T\mathrm{act}(\xi,0_\theta)$, the \emph{infinitesimal action}.
\item If $\Theta$ is a manifold, $\fg$ acts by translations: $\xi\cdot v=v+a(\xi,\theta)$ for $v$ over $\theta$.
\item Let $\Theta$ be a manifold with a Riemannian metric $g$, and $H\subseteq T\Theta$ the subobject of the vectors $v$ over $\theta$ with $g(a(\xi,\theta),v)=0$ for all
$\xi$. If $G$ is a Lie group and the action is locally free, then $H$ is a vector bundle and $q$ restricts to an equivalence $H\to\Theta\times_XTX$: a
splitting of the relative tangent map, by the orthogonal complement of the orbits of \cref{thm:metric-connection}\textup{(i)}.
\end{enumerate}
\end{proposition}
\begin{proof}
(i) By \cref{prop:dc-atlas}, $T\Theta\times_{TX}T\Theta\simeq T(G\times\Theta)=TG\times T\Theta$, and the fibre product of $q$ with itself is the part of it over the diagonal
$\Theta\to\Theta\times_X\Theta\simeq G\times\Theta$, $\theta\mapsto(e,\theta)$, which is $\fg\times T\Theta$: the \v{C}ech nerve of $q$ is the action groupoid of $\fg$. The pullback of $q$ along
the effective epimorphism $\Theta\times_XT\Theta\to\Theta\times_XTX$ is the map $TG\times T\Theta\to G\times T\Theta$, which has a section, so $q$ is an effective epimorphism.
(ii) is the restriction of (i) to the zero section. (iii) In a chart, by the Kock--Lawvere property, a tangent vector of $G$ at $e$ acts as
$x\mapsto x+dF_1(x)$, and a tangent vector at $\theta$ is $d\mapsto\theta+dv$; the composite is $d\mapsto\theta+d\,(v+F_1(\theta))$ since $d^2=0$, and $F_1(\theta)=a(\xi,\theta)$. (iv) The map
$a$ is linear in $\xi$ and injective on fibres, with image a subbundle $E$. The action of $\fg$ on $T\Theta$ is free, its quotient is the vector bundle
$T\Theta/E$, and $H=E^\perp$ is a complement of $E$.
\end{proof}

So the pullback to $\Theta$ of the tangent object of the quotient is the quotient of the complex $\fg\times\Theta\to T\Theta$, for every group object and
without conditions on the action. A connection is a splitting of $q$. A metric gives the subobject $H$ in every case, and $H$ is a splitting when the action is locally free. The next
theorem is \cref{thm:positions} in this generality: the group is an arbitrary group object of the model, the action need be neither free nor
proper, and the quotient is a stack.

\begin{theorem}[Positions in differential cohesion]\label{thm:dc-positions}
Let $\Hh$ be the model, $\Theta$ a manifold with a Riemannian metric $g$, $G$ a group object of $\Hh$ acting on $\Theta$, $p\colon\Theta\to X=\Theta\hquot G$, and $L\colon\Theta\to R$.
\begin{enumerate}[label=\textup{(\alph*)}]
\item \emph{Objective and connection.} $L=\ell\circ p$ for a unique $\ell\colon X\to R$ if and only if $L\circ\mathrm{act}=L\circ\pr_\Theta$. In that case
$g\bigl(\nabla L(\theta),a(\xi,\theta)\bigr)=0$ on $\fg\times\Theta$: the gradient is a section of $H$.
\item \emph{Exact part.} For a point $\xi$ of $\fg$ let $a_\xi=g(a(\xi,-),-)$, a $1$-form on $\Theta$. If $a_\xi=\dd Q_\xi$, then $Q_\xi$ is constant along the gradient
flow of every invariant $L$.
\item \emph{Invariant metric.} If $g\bigl(T\mathrm{act}(0_h,v),T\mathrm{act}(0_h,w)\bigr)=g(v,w)$ on $G\times(T\Theta\times_\Theta T\Theta)$ and $L$ is invariant, then $\nabla L$ is equivariant, and
there is a section $\sigma$ of $TX\to X$ with $\sigma\circ p=Tp\circ\nabla L$.
\item \emph{\'Etale symmetry.} If $G$ is coreduced, then $\fg\simeq\ast$, parts \textup{(a)} and \textup{(b)} are empty, $T\Theta\simeq\Theta\times_XTX$, and a vector field on $\Theta$
induces a section of $TX\to X$ if and only if it is $G$-equivariant.
\item \emph{General symmetry.} The objects $a$, $H$, $a_\xi$ and $Q_\xi$ of \textup{(a)} and \textup{(b)} depend on $G$ through $\hat G$ only, and $X\simeq\hat X\hquot\Im G$
with $\Im G$ coreduced and $T\hat X\simeq\hat X\times_XTX$.
\end{enumerate}
\end{theorem}
\begin{proof}
(a) $R$ is $0$-truncated, so the first statement is \cref{prop:atlas}(i). The differential of $L$ is $\dd L=\pr_2\circ TL\colon T\Theta\to R\times R\to R$, by the
Kock--Lawvere property, and $g(\nabla L,v)=\dd L(v)$. Then
\[
\dd L\bigl(a(\xi,\theta)\bigr)=\pr_2T(L\circ\mathrm{act})(\xi,0_\theta)=\pr_2T(L\circ\pr_\Theta)(\xi,0_\theta)=\pr_2TL(0_\theta)=0 .
\]
(b) Along an integral curve of $-\nabla L$ the derivative of $Q_\xi$ is $-\dd Q_\xi(\nabla L)=-g(a(\xi,-),\nabla L)$, which vanishes by (a). (c) Write $h_*=T\mathrm{act}(0_h,-)$
for a generalised element $h$ of $G$. For $w$ over $h\theta$,
$g(h_*\nabla L(\theta),w)=g(\nabla L(\theta),h^{-1}_*w)=\dd(L\circ h^{-1})(w)=\dd L(w)=g(\nabla L(h\theta),w)$, so $h_*\nabla L(\theta)=\nabla L(h\theta)$ by the non-degeneracy of $g$. Let $G$
act on $T\Theta$ through the zero section $G\to TG$, a homomorphism. For $0$-truncated objects with an action of $G$, a map that commutes with the
actions is equivariant, by descent along $\ast\to\B G$; so $\nabla L$ induces $\Theta\hquot G\to T\Theta\hquot G$, and $\sigma$ is its composite with the map
$T\Theta\hquot G\to T\Theta\hquot TG\simeq TX$ induced by the zero section. The composite of $\sigma$ with $TX\to X$ is induced by the identity of $\Theta$. (d) By
\cref{thm:dc-factorisation}(v), $p$ and all the face maps of its \v{C}ech nerve are formally \'etale, so by \cref{lem:dc}(iv) the simplicial
object $T\check C(p)$ is the pullback of $TX$ along $\check C(p)\to X$. By descent \cite{HTT} the sections of $TX\to X$ are the sections of $T\Theta\to\Theta$ with
descent data. Since $TG\simeq G$, the descent isomorphism over $G\times\Theta$ is $(h,v)\mapsto(h,h_*v)$, and for the $0$-truncated objects $\Theta$ and $T\Theta$ a descent
datum for a section is the property of equivariance. (e) The fibre of $T\hat G\to\hat G$ over $e$ is $\fg$, and the rest is
\cref{thm:dc-factorisation}(ii),(iii).
\end{proof}

\begin{table}[t]\centering\small
\begin{tabular}{@{}p{3.3cm}p{1.75cm}p{0.9cm}p{2.4cm}p{4.05cm}@{}}\toprule
symmetry $G$ & coreduced & $\fg$ & $\hat X$ & the functions $Q_\xi$\\\midrule
permutations of units & yes & $0$ & $\Theta$ & none\\
$\Z+\alpha\Z$ acting on $\R$ & yes & $0$ & $\R$, with $X=\Tal$ & none\\
rescalings $(\R_{>0})^k$ & no & $\R^k$ & $\Theta\hquot\hat G$ & $\abs{w_{\mathrm{in}}}^2-\abs{w_{\mathrm{out}}}^2$ per unit\\
$\GL_k$, linear layers & no & $\mathfrak{gl}_k$ & $\Theta\hquot\hat G$ & $W_1W_1\transp-W_2\transp W_2$\\
$(\R_{>0})^k\rtimes S_k$ & no & $\R^k$ & as above & the same, permuted by $S_k$\\\bottomrule
\end{tabular}
\caption{Symmetries of a parameter space and the two parts of their atlases. For a coreduced group the Lie algebra is trivial and there is
no function $Q_\xi$; the functions $Q_\xi$ of a general group are those of its formal group.}\label{tab:dc}
\end{table}

The positions of \cref{thm:positions} are recovered as follows. For a locally free action of a Lie group the restriction of $g$ to $H$ is a
metric on the pullback $\Theta\times_XTX$ of the tangent stack. It is a descent datum when the maps induced by $G$ on $H$ are isometries, in particular
in position (c), and it depends on the point of the fibre in general, which is the gauge dependence of \cref{thm:positions}(a). The slice
of position (b) is a level set of the functions $Q_\xi$ of part (b) together with \cref{prop:atlas}(iii), and the projection of position (d)
is the splitting of \cref{prop:dc-relative}(iv).

Three consequences are recorded. First, the remark after \cref{thm:noether}, that a discrete symmetry gives no conserved quantity, is part
(d): the atlas of a discrete symmetry is formally \'etale. Second, the irrational torus is the quotient of $\R$ by the coreduced group
$\Z+\alpha\Z$, so $\R\to\Tal$ is a formally \'etale atlas, $T\Tal\simeq\Tal\times R$, and the vector fields on $\Tal$ are the constants (\cref{exo:tangent-Talpha}): the
tangent object of a space on which every real function is constant is a line bundle with a one-dimensional space of sections. Third, for
a network with rescaling and permutation symmetries the hypothesis space is reached in two steps, $\Theta\to\hat X\to X$. The first is the quotient by the
formal group of the rescalings; the conservation laws and the choice of preconditioner of \cref{sec:acceleration} are statements about it.
The second is the quotient by the coreduced group $\Im G$, of which the permutations are a subgroup, and a dynamics descends along it when
it is equivariant.

Two refinements follow: a description of all the conserved quantities, and of the vector fields with the same image under the relative
tangent map $q$.

\begin{proposition}[All conserved quantities; compare \cite{Marcotte}]\label{prop:dc-conserved}
In the situation of \cref{thm:dc-positions}, let $Q\colon\Theta\to R$.
\begin{enumerate}[label=\textup{(\roman*)}]
\item $Q$ is constant along the gradient flow of every invariant $L$ if and only if $g(\nabla Q,\nabla L)=0$ for every invariant $L$.
\item If $G$ is a Lie group acting freely and properly, this holds if and only if $\dd Q$ vanishes on $H$, that is, if and only if
$\dd Q=g(a(\psi,-),-)$ for a smooth map $\psi\colon\Theta\to\fg$, which is then unique.
\item In the case \textup{(ii)} the conserved quantities are the first integrals of the distribution $H$. Near a point where the Lie algebra of
vector fields generated by the sections of $H$ has constant rank $r$, there are $\dim\Theta-r$ functionally independent ones and no more.
\end{enumerate}
\end{proposition}
\begin{proof}
(i) The derivative of $Q$ at time $0$ along the flow of $-\nabla L$ through $\theta$ is $-g(\nabla Q,\nabla L)(\theta)$. (ii) $X$ is a manifold and $p$ a submersion, so every
covector at $p(\theta)$ is the differential of a function $\ell$, and the gradients $\nabla(\ell\circ p)(\theta)=\dd p_\theta\transp\dd\ell$ span the orthogonal complement $H_\theta$ of the kernel of
$\dd p_\theta$. So the condition of (i) is $\nabla Q(\theta)\in H_\theta^\perp=a(\fg,\theta)$ for all $\theta$, and $\psi=a^{-1}\circ\nabla Q$ is smooth because $a$ is an isomorphism of $\fg\times\Theta$ onto a
subbundle. (iii) A function is a first integral of $H$ if and only if it is one of the involutive distribution generated by $H$, whose leaves
have dimension $r$ by the theorem of Frobenius.
\end{proof}

Part (iii) is the count of \cite{Marcotte}, made there for an arbitrary parametrisation in place of a quotient map, with the span of the
gradients of its components in the place of $H$, and with algorithms for the rank. The functions $Q_\xi$ of \cref{thm:dc-positions}(b) are the
conserved quantities with constant $\psi$. The others have two sources. A function of the $Q_\xi$ has a non-constant $\psi$. And a form $a_\xi$ that is
not closed may have an integrating factor: for the rotations of the punctured plane $a_A=r^2\,\dd\varphi$, the line field $H$ is involutive, $\psi=r^{-2}A$, and
the conserved quantity is the angle $\varphi$, with values in the circle (\cref{exo:dc-angle}). For the rotations of $\R^3\setminus\{0\}$ part (i) gives the
direction $\theta/\abs\theta$, with values in the sphere. So the curvature of the connection is the restriction of the forms $\dd a_\xi$ to pairs of vectors of
$H$, and it is this restriction, not $\dd a_\xi$, that excludes a first integral and produces a holonomy.

\begin{proposition}[Vector fields with the same image; compare \cite{Hepworth}]\label{prop:dc-sections}
In the model, let a Lie group $G$ act on a manifold $\Theta$ and $X=\Theta\hquot G$. The sections of $\Theta\times_XTX\to\Theta$ form the groupoid whose objects are the vector
fields on $\Theta$ and whose morphisms $u\to u'$ are the smooth maps $\psi\colon\Theta\to\fg$ with $u'=u+a(\psi,-)$. In particular $q\circ u\simeq q\circ u'$ if and only if
$u'-u=a(\psi,-)$ for some $\psi$.
\end{proposition}
\begin{proof}
By \cref{prop:dc-relative}(i), a section is a torsor $P\to\Theta$ for the group object $\fg\times\Theta$ over $\Theta$ with an equivariant map $P\to T\Theta$ over $\Theta$. An effective
epimorphism onto a manifold has sections over the members of an open cover, so $P$ is given by a \v{C}ech cocycle of smooth maps to the
vector space $\fg$, which is a coboundary by a partition of unity. For the trivial torsor an equivariant map is determined by the image $u$ of
the unit section, and an automorphism of the trivial torsor is the translation by a map $\psi$, which replaces $u$ by $u+a(\psi,-)$ by
\cref{prop:dc-relative}(iii).
\end{proof}

Hence the part of an update that is tangent to the orbits is isomorphic to zero as a section, and for a locally free action an update and
its projection to $H$ are isomorphic sections: this is position (d) of \cref{thm:positions}. For a compact Lie group the vector fields on the
stack $X$ are the equivariant vector fields on $\Theta$ with the equivariant maps $\psi$ as morphisms \cite{Hepworth}. These are the isomorphic vector
fields of \cite{KlajborGoderich}, and they form a Lie $2$-algebra \cite{BerwickEvansLerman}.

\emph{Scope.} \Cref{lem:dc,prop:dc-atlas,thm:dc-factorisation} and \cref{prop:dc-relative}(i),(ii) hold in every $\Hh$ that satisfies
\textup{(DC1)--(DC3)}. \Cref{prop:dc-relative}(iii),(iv) and \cref{thm:dc-positions,prop:dc-conserved,prop:dc-sections} are statements in the
model, in which manifolds, tangent bundles and Riemannian metrics are available. The properties of the model that are used are the
Kock--Lawvere property, the two adjoints of $T$ and the full embedding of manifolds \cite{Dubuc79,Kock,Schreiber}. The first-order computations
for the rescaling, rotation and translation actions are reproduced in exact arithmetic with dual numbers by \texttt{checks.py}.

\emph{Sources.} The parts of this section are in the literature, in other contexts. The factorisation of \cref{thm:dc-factorisation}(i) is
the factorisation system of a modality \cite{CherubiniRijke}. The unit $\eta$, along which $\hat X$ is a pullback, is the map whose base change
is the jet comonad of \cite{KhavkineSchreiber}. The map $\Theta\to\hat X$ is a formal moduli problem under $\Theta$, that is, a Lie algebroid in the sense of
\cite{GaitsgoryRozenblyum}. The tangent stack and its sections are those of \cite{Hepworth,BerwickEvansLerman}. The conserved quantities of
gradient flows are counted in \cite{Marcotte} and attached to symmetries in \cite{Kunin,ZhaoFlat,ZhaoSurvey}. They are combined in \cref{thm:dc-positions} and
\cref{tab:dc}: a parameter symmetry is separated into a formal group, to which the connection and the conserved quantities
belong, and a coreduced group, along which a dynamics descends when it is equivariant. This combination was not found in a search of the
literature on parameter symmetries of networks and on differential cohesion made in November 2026.

\section{Inductive theories}

The same structure is present in the syntax of a theory presented by generators and relations. Let $\Sigma$ be a finitary signature, $V$ a set of
variables, and $W=T_\Sigma(V)$ the set of terms: the free $\Sigma$-algebra on $V$, that is, the initial algebra of $Y\mapsto V+\Sigma Y$, defined by induction. Let
$E$ be a set of equations, $\approx$ the congruence on $W$ that it generates, and
\[
p\colon W\longrightarrow F=W/{\approx}
\]
the quotient, the free algebra of the theory $\mathbb T=(\Sigma,E)$. The finitely generated free algebras are the objects of the syntactic
site of $\mathbb T$, whose category of models is the category of $\mathbb T$-algebras. The map $p$ is an atlas of the semantic object $F$ by the
inductively defined object $W$.

\begin{proposition}[Descent of recursive definitions]\label{prop:folds}
Let $A$ be a $\Sigma$-algebra, $\rho\colon V\to A$ a valuation, and $f_\rho\colon W\to A$ the unique homomorphism extending $\rho$.
\begin{enumerate}[label=\textup{(\roman*)}]
\item If $A$ satisfies $E$ then $f_\rho$ factors through $p$. If $V$ is infinite and $f_\rho$ factors through $p$ for every $\rho$, then $A$ satisfies $E$.
\item Let a group $\Gamma$ act on $V$, hence on $W$ by renaming, and on $A$ by automorphisms of $\Sigma$-algebras. If $\rho$ is equivariant then $f_\rho$ is
equivariant.
\end{enumerate}
\end{proposition}
\begin{proof}
(i) The kernel of $f_\rho$ is a congruence; if $A$ satisfies $E$ it contains every substitution instance of every equation, hence $\approx$.
Conversely an equation of $E$ in variables of $V$ is a pair $t\approx t'$, and $f_\rho(t)=f_\rho(t')$ for all $\rho$ is its validity in $A$. (ii) For
$\gamma\in\Gamma$ the map $\gamma_A^{-1}\circ f_\rho\circ\gamma_W$ is a homomorphism extending $\gamma_A^{-1}\circ\rho\circ\gamma_V=\rho$; by uniqueness it is $f_\rho$.
\end{proof}

So for an inductively defined object the descent condition of \cref{prop:atlas}(i) is checked one constructor at a time: the algebra must
satisfy the equations, and the factorisation follows from the uniqueness of the recursion. This is the counterpart of the fact that the gradient of each sample is orthogonal to
the orbits, so that no global verification is needed. In type theory the statement is the elimination rule of a quotient inductive
type.

A slice of $p$ is a choice of normal forms: a map $\mathrm{nf}\colon W\to W$ with $\mathrm{nf}(t)\approx t$ and $\mathrm{nf}(t)=\mathrm{nf}(t')$ whenever $t\approx t'$.
In sets a slice exists by choice. The obstruction is one of effectivity, as it was one of smoothness in \VolI{Theorem~11.4}.

\begin{theorem}[Computable slices]\label{thm:normal-forms}
Let $\Sigma$ and $V$ be countable and $E$ recursively enumerable. The quotient $p\colon W\to F$ has a computable slice if and only if the relation
$\approx$ is decidable. Consequently, for a finitely presented theory with unsolvable word problem, $p$ is an atlas with no computable slice.
\end{theorem}
\noindent The proof is \cref{exo:normal-forms}.

\begin{table}[t]\centering\small
\begin{tabular}{@{}p{4.1cm}p{9.0cm}@{}}\toprule
optimisation on a quotient & syntax of an inductive theory\\\midrule
atlas $\Theta\to\Theta\hquot G$ & terms $W\to F=W/{\approx}$; sites of one topos; coded models of one theory\\
invariant objective & function on terms that satisfies the equations; definable set (\cref{thm:galois-logic})\\
slice $Q=0$ & normal forms; normalisation by evaluation \cite{BergerSchwichtenberg}; indices in place of names\\
move along the orbit & rewriting to an equal term; extraction from an e-graph \cite{egg}; change of site \cite{Caramello}\\
invariant update & definition by the eliminator of the quotient (\cref{prop:folds}); nominal sets \cite{Pitts}\\
projection off the orbit & focused proof search, in which no step permutes inference rules \cite{Andreoli}\\
conserved quantity & invariant of the rewriting relation; the universal one is $F$\\
isotropy, no smooth slice & undecidable equality, no computable slice (\cref{thm:normal-forms})\\\bottomrule
\end{tabular}
\caption{The positions of \cref{thm:positions} for the atlas of a theory by its syntax.}\label{tab:logic}
\end{table}

For theories with relations and quantifiers the atlas is the space of models, and the quotient is the theory itself.

\begin{theorem}[Theories as quotients; \cite{JoyalTierney,ButzMoerdijk,LopezEscobar}]\label{thm:galois-logic}
\begin{enumerate}[label=\textup{(\roman*)}]
\item Every Grothendieck topos is equivalent to the topos of equivariant sheaves on a localic groupoid; if it has enough points, on a
topological groupoid of its points.
\item For a countable first-order language, a Borel set of structures on $\N$ is invariant under the permutations of $\N$ if and only if it is the set
of models of a sentence of $L_{\omega_1\omega}$.
\end{enumerate}
\end{theorem}

Part (i) is the statement that the classifying topos of a theory is $\Theta\hquot G$ for $\Theta$ a space of models and $G$ their isomorphisms; the
first-order case with its syntactic reconstruction is \cite{AwodeyForssell}. Part (ii) is \cref{prop:atlas}(i) for that atlas: a set of
models descends to the theory exactly when it is invariant. In the absence of a $2$-form the correspondence between symmetries and
invariants is therefore of Galois type, invariance against definability, where Noether's correspondence pairs a symmetry with a function.
The quantitative statements of \cref{sec:acceleration}, the preconditioner and the drift of order $h^2$, require a tangent structure on the
atlas. A syntactic site of a differential calculus has one; such a signature, the layers of a network, is the subject of \cref{ch:programs}. A bare algebraic theory has none, and there a cost on rewriting steps is an
additional datum.

\exercisesheading

\begin{exercise}[label=exo:scalar-lagrangian]{1}
Verify \cref{thm:lagrangian}(i) for $L(a,w)=\tfrac12(aw-1)^2$ and the rescaling group.
\end{exercise}
\begin{solution}
The generator is $A=\mathrm{diag}(-1,1)$, $A\theta=(-a,w)$, and $\mu_A(\theta,p)=-ap_a+wp_w$. On the graph of $\dd L$, $p=\rho\,(w,a)$ with $\rho=aw-1$, so
$\mu_A=-a\rho w+w\rho a=0$.
\end{solution}

\begin{exercise}[label=exo:forms-plane]{2}
Compute $a_A$ and $\dd a_A$ on $\R^2$ for the rescaling $A=\mathrm{diag}(-1,1)$ and for the rotation $A=\bigl(\begin{smallmatrix}0&-1\\1&0\end{smallmatrix}\bigr)$, and
describe the curves on which each vanishes.
\end{exercise}
\begin{solution}
Rescaling: $a_A=-a\,\dd a+w\,\dd w=\dd\,\tfrac12(w^2-a^2)$, closed, vanishing on the curves tangent to the hyperbolas $w^2-a^2=\mathrm{const}$. Rotation:
$A\theta=(-w,a)$, $a_A=-w\,\dd a+a\,\dd w=r^2\,\dd\varphi$ in polar coordinates, and $\dd a_A=2\,\dd a\wedge\dd w$, twice the area form. The form vanishes on radial curves.
No smooth function on the plane has the radial lines as its level sets, and the integral of $a_A$ around a closed curve is twice
the enclosed area.
\end{solution}

\begin{exercise}[label=exo:monoid]{2}
Let $W$ be the words in two letters $x,y$ and $\approx$ the congruence generated by $xy\approx yx$. Give a slice, a function that descends and one that
does not, and check \cref{prop:folds}(ii) for the exchange of the letters.
\end{exercise}
\begin{solution}
$F$ is the free commutative monoid $\N^2$. Sorting the letters, $\mathrm{nf}(t)=x^iy^j$, is a slice. The homomorphism to $(\N,+)$ with $\rho(x)=\rho(y)=1$,
the length, descends because $(\N,+)$ is commutative. The identity homomorphism to the monoid of words does not: $xy$ and $yx$ are different
words. The exchange of $x$ and $y$ acts on $W$, and $\rho$ is equivariant for the trivial action on $\N$, so the length is invariant under the
exchange; the valuation $\rho(x)=1$, $\rho(y)=2$ is not equivariant, and the weighted length is not invariant.
\end{solution}

\begin{exercise}[label=exo:dc-scalar]{2}
In the model of \cref{sec:dc}, let $\Theta=\R^2\setminus\{0\}\ni(w,v)$ with the Euclidean metric and $G=\R_{>0}$ acting by $s\cdot(w,v)=(sw,s^{-1}v)$. Compute $a$, $a_\xi$, $Q_\xi$, $H$
and $\Theta\times_XTX$. What changes for $G'=\R^\times$ acting by the same formula?
\end{exercise}
\begin{solution}
$\fg=R$ and $a(\xi,(w,v))=\xi\,(w,-v)$, so $a_\xi=\xi\,(w\,\dd w-v\,\dd v)=\dd Q_\xi$ with $Q_\xi=\tfrac\xi2(w^2-v^2)$, the invariant of \cref{thm:two-noether}(b). The map $a$
is injective on fibres since $(w,v)\neq0$, and $H=\{(\dot w,\dot v):w\dot w=v\dot v\}$ is a line bundle; by \cref{prop:dc-relative}(iv), $\Theta\times_XTX\simeq H$. The action is
free and not proper: the orbits of the points of the axes are not separated from the neighbouring hyperbolas, and $X$ is a non-Hausdorff
manifold of dimension one. No part of \cref{thm:dc-positions} is affected. For $G'=\R_{>0}\times\{\pm1\}$ the kernel of $TG'\to G'$ and the formal group are those
of $G$, so $a$, $Q_\xi$, $H$ and $\hat X$ are the same, and $\Im G'=\Im G\times\{\pm1\}$: the second map $\varepsilon$ is in addition a quotient by the sign, along which
tangent objects are pulled back, and there is no further conserved quantity.
\end{solution}

\begin{exercise}[label=exo:dc-angle]{2}
Determine all the quantities conserved by the gradient flows of the invariant functions for the rotations of $\Theta=\R^2\setminus\{0\}$, and for the rescalings
$(a,w)\mapsto(a/s,sw)$ of the quadrant $a,w>0$.
\end{exercise}
\begin{solution}
Both actions are free and proper, so \cref{prop:dc-conserved}(ii),(iii) apply, and $H$ is a line field, hence involutive, with $r=1$: there is one
independent conserved quantity. Rotations: $a_A=-y\,\dd x+x\,\dd y=r^2\,\dd\varphi$ is not closed, $H$ is the radial line field, and $\dd Q=\psi\,a_A$ holds for
$Q=F(\varphi)$ with $F$ periodic and $\psi=F'(\varphi)/r^2$. The conserved quantities are the functions of the angle, for instance $x/r$ and $y/r$, and the
universal one is $\theta/\abs\theta$ with values in the circle. Rescalings: $a_A=-a\,\dd a+w\,\dd w=\dd Q_A$ with $Q_A=\tfrac12(w^2-a^2)$, and the conserved quantities are the
functions $F(Q_A)$, with $\psi=F'(Q_A)$. In the first case no conserved quantity has constant $\psi$; in the second the generator is $Q_A$.
\end{solution}

\begin{exercise}[label=exo:cometrics]{3}
For $\pi(a,w)=aw$ on the quadrant $a,w>0$, compute the cometric $C_\theta$ of \cref{thm:positions}(a) for the Euclidean metric and for the invariant
metric $g'=(\dd a/a)^2+(\dd w/w)^2$, and the projected gradient flows of $\ell(m)$.
\end{exercise}
\begin{solution}
$\dd\pi=(w,a)$. Euclidean: $C_\theta=w^2+a^2=2\sqrt{Q^2+m^2}$, which depends on the level $Q$ of the fibre point, and $\dot m=-2\sqrt{Q^2+m^2}\,\ell'(m)$;
for $\ell=\tfrac12(m-1)^2$ this is \cref{prop:rate}(i). Invariant metric: the $g'$-gradient of $L$ is $(a^2\partial_aL,\ w^2\partial_wL)$, so
$\dot a=-a^2w\,\ell'$, $\dot w=-w^2a\,\ell'$ and $\dot m=-2m^2\,\ell'(m)$: the cometric is $C'=2m^2$, a function on $X$, and the projected flow is the same from
every point of a fibre. The metric $g'$ is invariant because $\dd a/a$ and $\dd w/w$ are invariant under $(a,w)\mapsto(a/s,sw)$.
\end{solution}

\begin{exercise}[label=exo:dc-lemma]{3}
Prove \cref{lem:dc}.
\end{exercise}
\begin{solution}
(i) $\Im$ has the left adjoint $\Re$ and the right adjoint $\&$. $T$ has the left adjoint $-\times D$ and preserves colimits by (DC2). (ii) For every
object $U$,
\[
\Map(U,[D,\Im A])\simeq\Map(U\times D,\Im A)\simeq\Map(\Re U\times\Re D,A)\simeq\Map(\Re U,A)\simeq\Map(U,\Im A),
\]
since $\Re$ preserves finite products and $\Re D\simeq\ast$. The composite is induced by the projection $U\times D\to U$, so the zero section $\Im A\to[D,\Im A]$ is an
equivalence. (iii) Let $f\colon A\to B$ be formally \'etale, $b\colon B'\to B$ and $A'=A\times_BB'$. Since $\Im$ preserves pullbacks,
\[
B'\times_{\Im B'}\Im A'\simeq B'\times_{\Im B'}(\Im B'\times_{\Im B}\Im A)\simeq B'\times_{\Im B}\Im A\simeq B'\times_B(B\times_{\Im B}\Im A)\simeq B'\times_BA=A'.
\]
For coreduced $A$ and $B$, $B\times_{\Im B}\Im A\simeq\Im A\simeq A$. (iv) $T$ preserves the pullback $A\simeq B\times_{\Im B}\Im A$, and by (ii) $T\Im A\simeq\Im A$ and $T\Im B\simeq\Im B$, compatibly
with the projections to the base. Hence $TA\simeq TB\times_{\Im B}\Im A\simeq TB\times_B(B\times_{\Im B}\Im A)\simeq TB\times_BA$.
\end{solution}

\begin{exercise}[label=exo:tangent-Talpha]{3}
In the model, let $\Gamma=\Z+\alpha\Z$ with $\alpha$ irrational act on $\R$ by translations. Prove that $\Gamma$ is coreduced, that $\R\hquot\Gamma$ is the irrational torus
$\Tal$, that $T\Tal\simeq\Tal\times R$, and that the sections of $T\Tal\to\Tal$ are the constants. Describe their flows.
\end{exercise}
\begin{solution}
$\Gamma$ is the coproduct of copies of the terminal object indexed by its elements, and $\Im$ preserves coproducts and the terminal object; so
$\Gamma$ is coreduced. The action is free, so the action groupoid is an equivalence relation and $\R\hquot\Gamma$ is the $0$-truncated quotient sheaf: a
section over $U$ is given locally by a smooth map to $\R$, up to locally constant maps to $\Gamma$. Two smooth maps $U\to\R$ whose difference has values
in the countable set $\Gamma$ differ by a locally constant map, so the quotient sheaf is concrete, and it is the diffeological quotient $\Tal$. By
\cref{prop:dc-atlas} and $T\Gamma\simeq\Gamma$, $T\Tal\simeq(\R\times R)\hquot\Gamma$ with $\gamma\cdot(x,v)=(x+\gamma,v)$, the derivative of a translation being the identity; hence
$T\Tal\simeq\Tal\times R$, in agreement with \cref{thm:dc-positions}(d). A section is a map $\Tal\to R$, that is, by \cref{prop:atlas}(i), a smooth function on
$\R$ invariant under the dense subgroup $\Gamma$, a constant $c$. The constant vector field $c$ on $\R$ is $\Gamma$-equivariant, its flow $x\mapsto x+tc$ is
equivariant, and by \cref{prop:atlas}(ii) it induces the translation by the class of $tc$ on $\Tal$.
\end{solution}

\begin{exercise}[label=exo:normal-forms]{4}
Prove \cref{thm:normal-forms}.
\end{exercise}
\begin{solution}
Fix a computable enumeration $t_0,t_1,\dots$ of $W$. If $\mathrm{nf}$ is a computable slice, then $t\approx t'$ if and only if $\mathrm{nf}(t)=\mathrm{nf}(t')$, and equality
of terms is decidable; so $\approx$ is decidable. Conversely let $\approx$ be decidable and let $\mathrm{nf}(t)$ be the first $t_k$ in the enumeration with
$t_k\approx t$. The search terminates because $t$ occurs in the enumeration, $\mathrm{nf}(t)\approx t$ by construction, and $t\approx t'$ implies that the same $t_k$ is
found for both. The hypothesis that $E$ is recursively enumerable makes $\approx$ recursively enumerable in general, so that decidability is the only
additional condition. For a finitely presented group or semigroup with unsolvable word problem $\approx$ is undecidable, and by the first part no
computable slice exists.
\end{solution}

\begin{exercise}[label=exo:dc-factorisation]{4}
Prove \cref{thm:dc-factorisation}\textup{(ii)} and \textup{(iii)}.
\end{exercise}
\begin{solution}
(ii) By \cref{prop:dc-atlas}, $\Im X\simeq\Im\Theta\hquot\Im G$, so $\Im p$ is a principal bundle for $\Im G$, and so is its pullback $\varepsilon$; hence $X\simeq\hat X\hquot\Im G$. The bundle $\Im p$ is
classified by the map $\Im X\to\B\Im G$, and $\varepsilon$ by the composite $X\to\Im X\to\B\Im G$, which by the naturality of $\eta$ is the composite of the classifying map
$X\to\B G$ of $p$ with $\B\eta_G$. So
\[
\hat X\simeq X\times_{\B\Im G}\ast\simeq(\Theta\hquot G)\times_{\B G}(\B G\times_{\B\Im G}\ast)\simeq(\Theta\hquot G)\times_{\B G}(\Im G\hquot G)\simeq(\Theta\times\Im G)\hquot G,
\]
where $G$ acts on $\Im G$ by translations through $\eta_G$. If $\eta_G$ is an effective epimorphism, this action is transitive with stabiliser
$\hat G$, so $\Im G\hquot G\simeq\B\hat G$ and $\hat X\simeq\Theta\hquot\hat G$. The object $\hat X\times_X\Theta$ is the pullback of the principal bundle $\Im p$ along the composite $\Theta\to\Im\Theta\to\Im X$, and
the pullback of $\Im p$ along itself is trivial:
\[
\hat X\times_X\Theta\simeq\Theta\times_{\Im\Theta}(\Im\Theta\times_{\Im X}\Im\Theta)\simeq\Theta\times_{\Im\Theta}(\Im G\times\Im\Theta)\simeq\Im G\times\Theta .
\]
(iii) The map $\varepsilon$ is formally \'etale by (i), so $T\hat X\simeq\hat X\times_XTX$ by \cref{lem:dc}(iv). Then $\Theta\times_{\hat X}T\hat X\simeq\Theta\times_{\hat X}(\hat X\times_XTX)\simeq\Theta\times_XTX$, and under this
equivalence the relative tangent map of $e$ is that of $p=\varepsilon\circ e$, since $T$ is a functor.
\end{solution}



\chapter{Semantics of differentiable programs}\label{ch:programs}
\chaptermark{Differentiable programs}

\def\dpSpecRows{deep linear \cite{Arora} & $32$ & 448 & 0 & 0 & 128 & 128\\
LeNet-300-100 \cite{LeCun98} & $1\times28\times28$ & 266\,610 & 400 & 0 & 0 & 400\\
LeNet-5 \cite{LeCun98} & $1\times32\times32$ & 61\,706 & 226 & 0 & 0 & 226\\
ResNet-20 \cite{ResNet} & $3\times32\times32$ & 269\,722 & 336 & 688 & 0 & 1\,024\\
Transformer layer \cite{Vaswani} & $16\times512$ & 3\,152\,384 & 2\,048 & 0 & 65\,536 & 67\,584\\}
\def\dpCheckRows{$\llbracket t\rrbracket$ against $\llbracket t'\rrbracket$, $t'\approx t$ & 0 & 0 & 0 & 0 & 0\\
tangent algebra against differences & $9.4\mathrm{e}{-10}$ & $1.6\mathrm{e}{-10}$ & $1.2\mathrm{e}{-9}$ & $4.0\mathrm{e}{-8}$ & $9.5\mathrm{e}{-7}$\\
reverse algebra against differences & $9.4\mathrm{e}{-10}$ & $1.6\mathrm{e}{-10}$ & $1.2\mathrm{e}{-9}$ & $4.0\mathrm{e}{-8}$ & $9.5\mathrm{e}{-7}$\\
transposition, \cref{thm:ad}(ii) & $1.4\mathrm{e}{-15}$ & $1.9\mathrm{e}{-16}$ & $1.9\mathrm{e}{-16}$ & $2.5\mathrm{e}{-15}$ & $1.3\mathrm{e}{-16}$\\
invariance under $G_t$ & $6.1\mathrm{e}{-16}$ & $6.2\mathrm{e}{-16}$ & $1.9\mathrm{e}{-15}$ & $1.1\mathrm{e}{-15}$ & $8.6\mathrm{e}{-16}$\\
invariance under permutations & 0 & $4.4\mathrm{e}{-16}$ & $1.8\mathrm{e}{-15}$ & $5.4\mathrm{e}{-16}$ & $7.6\mathrm{e}{-16}$\\
$\nabla L$ in $H$, \cref{thm:dc-positions}(a) & $1.2\mathrm{e}{-16}$ & $2.2\mathrm{e}{-17}$ & $3.0\mathrm{e}{-17}$ & $9.2\mathrm{e}{-17}$ & $6.2\mathrm{e}{-17}$\\
$T\llbracket t\rrbracket\,a(\xi,\theta)=0$ & $3.9\mathrm{e}{-16}$ & $1.1\mathrm{e}{-15}$ & $5.1\mathrm{e}{-16}$ & $8.1\mathrm{e}{-16}$ & $5.5\mathrm{e}{-16}$\\
$a_\xi(P_Hu)$ relative to $a_\xi(u)$ & $3.5\mathrm{e}{-12}$ & $3.2\mathrm{e}{-12}$ & $1.5\mathrm{e}{-12}$ & $9.2\mathrm{e}{-12}$ & $4.2\mathrm{e}{-11}$\\
$T\llbracket t\rrbracket\,u$ against $T\llbracket t\rrbracket\,P_Hu$ & $3.8\mathrm{e}{-16}$ & $1.5\mathrm{e}{-15}$ & $1.4\mathrm{e}{-15}$ & $1.9\mathrm{e}{-15}$ & $1.1\mathrm{e}{-15}$\\
$Q$ after the gauge move, relative & $5.9\mathrm{e}{-8}$ & $8.4\mathrm{e}{-8}$ & $4.1\mathrm{e}{-4}$ & $1.1\mathrm{e}{-4}$ & $5.2\mathrm{e}{-15}$\\
step at $g\theta$ against step at $\theta$: plain & $3.4\mathrm{e}{-1}$ & $1.6\mathrm{e}{0}$ & $8.0\mathrm{e}{-1}$ & $5.5\mathrm{e}{-2}$ & $6.5\mathrm{e}{-1}$\\
the same: invariant metric & $7.4\mathrm{e}{-9}$ & $2.1\mathrm{e}{-8}$ & $5.3\mathrm{e}{-4}$ & $1.4\mathrm{e}{-7}$ & $5.5\mathrm{e}{-14}$\\}
\def\dpDriftRows{deep linear & $5.3\mathrm{e}{-3}$ & 2.3 & $5.0\mathrm{e}{-1}$ & 1.0 & $1.3\mathrm{e}{-2}$ & 2.0\\
LeNet-300-100 & $5.3\mathrm{e}{-5}$ & 2.1 & $2.3\mathrm{e}{-2}$ & 1.0 & $3.4\mathrm{e}{-4}$ & 2.0\\
LeNet-5 & $1.3\mathrm{e}{-4}$ & 2.6 & $4.6\mathrm{e}{-3}$ & 1.0 & $3.9\mathrm{e}{-4}$ & 2.1\\
ResNet-20 & $2.1\mathrm{e}{-5}$ & 2.2 & $6.3\mathrm{e}{-3}$ & 1.0 & $5.8\mathrm{e}{-5}$ & 2.0\\
Transformer layer & $1.0\mathrm{e}{-3}$ & 2.2 & $8.5\mathrm{e}{-3}$ & 1.0 & $1.1\mathrm{e}{-3}$ & 2.2\\}
\def\dpTrainRows{reverse, SGD & 0.0980 & 0.0662 & 0.0087 & 0.0371 & 0.0631\\
the same, slope $0.2$ & 0.0980 & 0.0483 & 0.0089 & 0.0497 & 0.0561\\
on the slice ($\tau=1$) & 0.126 & 0.0187 & 0.0046 & 0.0191 & 0.0812\\
invariant metric ($\tau=1$, returned) & 0.126 & 0.0187 & 0.0046 & 0.0191 & 0.0812\\
projected, heavy ball & 0.122 & 0.0689 & 0.0222 & 0.0826 & 0.302\\
Adam & 0.409 & $3.2\mathrm{e}{-5}$ & $1.5\mathrm{e}{-4}$ & $3.4\mathrm{e}{-4}$ & 0.395\\
Adam, projected & 0.408 & $3.1\mathrm{e}{-5}$ & $1.5\mathrm{e}{-4}$ & $3.3\mathrm{e}{-4}$ & 0.395\\
feedback alignment & 0.189 & 0.522 & 0.0182 & 0.408 & 0.143\\
feedback alignment, projected & 0.593 & 0.523 & 0.0183 & 0.406 & 0.144\\
straight-through & 0.0980 & 0.0431 & 0.0107 & 0.0529 & 0.0655\\
tangent algebra, $8$ directions & 0.594 & 0.999 & 0.896 & 0.999 & 1.000\\}
\def\dpVertRows{reverse, SGD & $3.5\mathrm{e}{-16}$ & $3.4\mathrm{e}{-17}$ & $2.9\mathrm{e}{-16}$ & $2.5\mathrm{e}{-16}$ & $1.1\mathrm{e}{-16}$\\
Adam & $7.7\mathrm{e}{-1}$ & $1.5\mathrm{e}{-1}$ & $2.2\mathrm{e}{-1}$ & $9.9\mathrm{e}{-2}$ & $1.2\mathrm{e}{-1}$\\
Adam, projected & $1.8\mathrm{e}{-11}$ & $7.6\mathrm{e}{-13}$ & $2.4\mathrm{e}{-13}$ & $8.1\mathrm{e}{-13}$ & $5.1\mathrm{e}{-12}$\\
feedback alignment & $1.7\mathrm{e}{0}$ & $9.5\mathrm{e}{-2}$ & $1.8\mathrm{e}{-1}$ & $8.5\mathrm{e}{-2}$ & $4.3\mathrm{e}{-2}$\\
feedback alignment, projected & $1.9\mathrm{e}{-12}$ & $3.8\mathrm{e}{-13}$ & $2.6\mathrm{e}{-13}$ & $9.7\mathrm{e}{-13}$ & $1.4\mathrm{e}{-12}$\\
straight-through & $3.5\mathrm{e}{-16}$ & $6.7\mathrm{e}{-2}$ & $6.0\mathrm{e}{-2}$ & $8.3\mathrm{e}{-2}$ & $2.6\mathrm{e}{-2}$\\
tangent algebra & $1.1\mathrm{e}{0}$ & $6.2\mathrm{e}{-2}$ & $1.2\mathrm{e}{-1}$ & $9.5\mathrm{e}{-2}$ & $2.1\mathrm{e}{-1}$\\}
\def\dpStepsRow{steps & 60 & 60 & 60 & 12 & 18\\}
\def\dpBatchRow{batch & 64 & 32 & 128 & 8 & 4\\}
\def\dpTraceRow{traces of the step & 1 & 1 & 1 & 1 & 1\\}
\def\dpSecRow{seconds per step (SGD) & 0.002 & 0.009 & 0.105 & 0.663 & 0.344\\}
\def\dpGaugeA{\addplot[hcsrust,line width=0.9pt] coordinates {(1,1) (2,0.9082) (3,0.832) (4,0.7676) (5,0.7119) (6,0.6626) (7,0.6188) (8,0.5792) (9,0.5433) (10,0.5103) (11,0.4798) (12,0.4516) (13,0.4255) (14,0.4015) (15,0.3793) (16,0.3589) (17,0.3398) (18,0.3222) (19,0.3058) (20,0.2905) (21,0.2762) (22,0.263) (23,0.2505) (24,0.2389) (25,0.2281) (26,0.2179) (27,0.2084) (28,0.1994) (29,0.1909) (30,0.1829) (31,0.1754) (32,0.1685) (33,0.1619) (34,0.1556) (35,0.1497) (36,0.1441) (37,0.1389) (38,0.1339) (39,0.1292) (40,0.1247) (41,0.1204) (42,0.1163) (43,0.1124) (44,0.1086) (45,0.1051) (46,0.1017) (47,0.09845) (48,0.09541) (49,0.09252) (50,0.08974) (51,0.08709) (52,0.08455) (53,0.08214) (54,0.07982) (55,0.07759) (56,0.07544) (57,0.07339) (58,0.07146) (59,0.06962) (60,0.06785)};
\addplot[hcsrust,line width=0.9pt,dashed] coordinates {(1,1) (2,0.861) (3,0.7557) (4,0.6716) (5,0.6014) (6,0.5414) (7,0.4898) (8,0.4448) (9,0.4052) (10,0.3701) (11,0.3392) (12,0.3118) (13,0.2873) (14,0.2652) (15,0.2453) (16,0.2274) (17,0.2114) (18,0.1972) (19,0.1842) (20,0.1726) (21,0.1619) (22,0.1521) (23,0.1431) (24,0.1348) (25,0.1273) (26,0.1205) (27,0.1142) (28,0.1085) (29,0.1032) (30,0.09836) (31,0.09383) (32,0.08957) (33,0.08561) (34,0.08192) (35,0.07848) (36,0.07523) (37,0.07219) (38,0.06936) (39,0.06671) (40,0.06425) (41,0.06191) (42,0.05973) (43,0.05765) (44,0.0557) (45,0.05387) (46,0.05217) (47,0.05054) (48,0.04902) (49,0.04755) (50,0.04612) (51,0.04476) (52,0.04349) (53,0.04226) (54,0.04111) (55,0.04001) (56,0.03898) (57,0.03798) (58,0.03704) (59,0.03615) (60,0.0353)};
\addplot[hcsteal,line width=0.9pt] coordinates {(1,1) (2,0.791) (3,0.6369) (4,0.5193) (5,0.429) (6,0.3585) (7,0.3037) (8,0.2597) (9,0.2248) (10,0.1969) (11,0.1739) (12,0.1544) (13,0.138) (14,0.1242) (15,0.1128) (16,0.1031) (17,0.09464) (18,0.08744) (19,0.08115) (20,0.07564) (21,0.0708) (22,0.06658) (23,0.06278) (24,0.05942) (25,0.05634) (26,0.05354) (27,0.05097) (28,0.04863) (29,0.04649) (30,0.04451) (31,0.04267) (32,0.041) (33,0.03946) (34,0.03802) (35,0.03669) (36,0.03544) (37,0.0343) (38,0.03322) (39,0.0322) (40,0.03121) (41,0.0303) (42,0.02941) (43,0.02858) (44,0.02779) (45,0.02705) (46,0.02631) (47,0.02562) (48,0.02497) (49,0.02436) (50,0.02375) (51,0.02318) (52,0.02264) (53,0.02213) (54,0.02164) (55,0.02117) (56,0.02072) (57,0.0203) (58,0.01988) (59,0.01948) (60,0.0191)};
\addplot[hcsink,line width=0.9pt,dashed,mark=o,mark size=1.1pt,mark repeat=4] coordinates {(1,1) (2,0.791) (3,0.6369) (4,0.5193) (5,0.429) (6,0.3585) (7,0.3037) (8,0.2597) (9,0.2248) (10,0.1969) (11,0.1739) (12,0.1544) (13,0.138) (14,0.1242) (15,0.1128) (16,0.1031) (17,0.09464) (18,0.08744) (19,0.08115) (20,0.07564) (21,0.0708) (22,0.06658) (23,0.06278) (24,0.05942) (25,0.05634) (26,0.05354) (27,0.05097) (28,0.04863) (29,0.04649) (30,0.04451) (31,0.04267) (32,0.041) (33,0.03946) (34,0.03802) (35,0.03669) (36,0.03544) (37,0.0343) (38,0.03322) (39,0.0322) (40,0.03121) (41,0.0303) (42,0.02941) (43,0.02858) (44,0.02779) (45,0.02705) (46,0.02631) (47,0.02562) (48,0.02497) (49,0.02436) (50,0.02375) (51,0.02318) (52,0.02264) (53,0.02213) (54,0.02164) (55,0.02117) (56,0.02072) (57,0.0203) (58,0.01988) (59,0.01948) (60,0.0191)};}
\def\dpGaugeB{\addplot[hcsrust,line width=0.9pt] coordinates {(1,1) (2,0.5031) (3,0.4407) (4,0.3951) (5,0.3537) (6,0.3154) (7,0.2801) (8,0.248) (9,0.2193) (10,0.1936) (11,0.1709) (12,0.1508) (13,0.133) (14,0.1173) (15,0.1035) (16,0.09136) (17,0.08068) (18,0.0713)};
\addplot[hcsrust,line width=0.9pt,dashed] coordinates {(1,1) (2,0.4795) (3,0.4258) (4,0.3717) (5,0.3183) (6,0.2691) (7,0.2267) (8,0.1908) (9,0.1605) (10,0.1348) (11,0.1133) (12,0.09529) (13,0.08023) (14,0.06766) (15,0.05715) (16,0.04838) (17,0.04108) (18,0.03507)};
\addplot[hcsteal,line width=0.9pt] coordinates {(1,1) (2,0.5888) (3,0.4563) (4,0.3958) (5,0.3522) (6,0.3154) (7,0.2829) (8,0.2538) (9,0.2278) (10,0.2046) (11,0.1838) (12,0.1654) (13,0.1489) (14,0.1342) (15,0.1211) (16,0.1094) (17,0.09895) (18,0.08959)};
\addplot[hcsink,line width=0.9pt,dashed,mark=o,mark size=1.1pt,mark repeat=4] coordinates {(1,1) (2,0.5888) (3,0.4563) (4,0.3958) (5,0.3522) (6,0.3154) (7,0.2829) (8,0.2538) (9,0.2278) (10,0.2046) (11,0.1838) (12,0.1654) (13,0.1489) (14,0.1342) (15,0.1211) (16,0.1094) (17,0.09895) (18,0.08959)};}
\def\dpSwitch{\addplot[hcsgrey,line width=0.9pt] coordinates {(0.01667,1) (0.03333,0.7689) (0.05,0.6803) (0.06667,0.6294) (0.08333,0.5949) (0.1,0.5689) (0.1167,0.5478) (0.1333,0.5296) (0.15,0.5132) (0.1667,0.4979) (0.1833,0.4831) (0.2,0.4687) (0.2167,0.4542) (0.2333,0.4396) (0.25,0.4247) (0.2667,0.4096) (0.2833,0.3943) (0.3,0.3787) (0.3167,0.3629) (0.3333,0.3471) (0.35,0.3314) (0.3667,0.3251) (0.3833,0.3196) (0.4,0.3149) (0.4167,0.3108) (0.4333,0.3074) (0.45,0.3045) (0.4667,0.3022) (0.4833,0.3004) (0.5,0.2992) (0.5167,0.2984) (0.5333,0.2981) (0.55,0.2983) (0.5667,0.299) (0.5833,0.3002) (0.6,0.3019) (0.6167,0.3041) (0.6333,0.3068) (0.65,0.3101) (0.6667,0.3139) (0.6833,0.3182) (0.7,0.3114) (0.7167,0.3025) (0.7333,0.2925) (0.75,0.282) (0.7667,0.2716) (0.7833,0.2613) (0.8,0.2514) (0.8167,0.2419) (0.8333,0.233) (0.85,0.2246) (0.8667,0.2168) (0.8833,0.2094) (0.9,0.2026) (0.9167,0.1962) (0.9333,0.1902) (0.95,0.1846) (0.9667,0.1792) (0.9833,0.1742) (1,0.1694)}; \addlegendentry{deep linear}
\addplot[hcsteal,line width=0.9pt] coordinates {(0.01667,1) (0.03333,0.9082) (0.05,0.832) (0.06667,0.7676) (0.08333,0.7119) (0.1,0.6626) (0.1167,0.6188) (0.1333,0.5792) (0.15,0.5433) (0.1667,0.5103) (0.1833,0.4798) (0.2,0.4516) (0.2167,0.4255) (0.2333,0.4015) (0.25,0.3793) (0.2667,0.3589) (0.2833,0.3398) (0.3,0.3222) (0.3167,0.3058) (0.3333,0.2905) (0.35,0.2762) (0.3667,0.2743) (0.3833,0.2724) (0.4,0.2707) (0.4167,0.269) (0.4333,0.2675) (0.45,0.2661) (0.4667,0.2647) (0.4833,0.2634) (0.5,0.2622) (0.5167,0.261) (0.5333,0.2599) (0.55,0.2588) (0.5667,0.2577) (0.5833,0.2567) (0.6,0.2558) (0.6167,0.2549) (0.6333,0.254) (0.65,0.2532) (0.6667,0.2524) (0.6833,0.2515) (0.7,0.1166) (0.7167,0.03965) (0.7333,0.0129) (0.75,0.004503) (0.7667,0.001747) (0.7833,0.0007486) (0.8,0.0003443) (0.8167,0.0001706) (0.8333,9.024e-05) (0.85,5.038e-05) (0.8667,2.975e-05) (0.8833,1.842e-05) (0.9,1.193e-05) (0.9167,8.044e-06) (0.9333,5.625e-06) (0.95,4.073e-06) (0.9667,3.041e-06) (0.9833,2.333e-06) (1,1.837e-06)}; \addlegendentry{LeNet-300-100}
\addplot[hcsgold!80!black,line width=0.9pt] coordinates {(0.01667,1) (0.03333,0.02849) (0.05,0.02683) (0.06667,0.02569) (0.08333,0.02481) (0.1,0.02409) (0.1167,0.02345) (0.1333,0.02288) (0.15,0.02236) (0.1667,0.02187) (0.1833,0.0214) (0.2,0.02095) (0.2167,0.02051) (0.2333,0.02008) (0.25,0.01966) (0.2667,0.01926) (0.2833,0.01887) (0.3,0.0185) (0.3167,0.01814) (0.3333,0.01778) (0.35,0.01743) (0.3667,0.01739) (0.3833,0.01735) (0.4,0.0173) (0.4167,0.01726) (0.4333,0.01722) (0.45,0.01719) (0.4667,0.01716) (0.4833,0.01714) (0.5,0.01712) (0.5167,0.0171) (0.5333,0.01708) (0.55,0.01706) (0.5667,0.01704) (0.5833,0.01703) (0.6,0.01702) (0.6167,0.01701) (0.6333,0.01701) (0.65,0.017) (0.6667,0.017) (0.6833,0.01698) (0.7,0.009537) (0.7167,0.003722) (0.7333,0.001022) (0.75,0.0004648) (0.7667,0.000191) (0.7833,6.244e-05) (0.8,2.719e-05) (0.8167,1.345e-05) (0.8333,7.568e-06) (0.85,4.633e-06) (0.8667,2.953e-06) (0.8833,1.919e-06) (0.9,1.229e-06) (0.9167,7.89e-07) (0.9333,5.344e-07) (0.95,3.713e-07) (0.9667,2.904e-07) (0.9833,2.418e-07) (1,2.01e-07)}; \addlegendentry{LeNet-5}
\addplot[hcsrust,line width=0.9pt] coordinates {(0.08333,1) (0.1667,0.4816) (0.25,0.2454) (0.3333,0.1622) (0.4167,0.1215) (0.5,0.1159) (0.5833,0.1128) (0.6667,0.1112) (0.75,0.1105) (0.8333,0.04381) (0.9167,0.01415) (1,0.004548)}; \addlegendentry{ResNet-20}
\addplot[hcsplum,line width=0.9pt] coordinates {(0.05556,1) (0.1111,0.5031) (0.1667,0.4407) (0.2222,0.3951) (0.2778,0.3537) (0.3333,0.3154) (0.3889,0.2801) (0.4444,0.258) (0.5,0.2383) (0.5556,0.2203) (0.6111,0.2038) (0.6667,0.1888) (0.7222,0.175) (0.7778,0.1689) (0.8333,0.1611) (0.8889,0.1524) (0.9444,0.1435) (1,0.1345)}; \addlegendentry{Transformer layer}
}
\def\dpJacRows{deep linear & 32 & 8 & 16 & \texttt{R(1..3)} & $1.4\mathrm{e}{4}$ & $7.2\mathrm{e}{3}$ & $7.2\mathrm{e}{3}$ & 0.0644 & 0.146 & 0.157\\
LeNet-300-100 & 784 & 10 & 10 & \texttt{R(1..6)} & $2.1\mathrm{e}{8}$ & $2.7\mathrm{e}{6}$ & $2.7\mathrm{e}{6}$ & 4.3 & 0.634 & 0.408\\
LeNet-5 & 1\,024 & 10 & 10 & \texttt{R(1..12)} & $4.4\mathrm{e}{8}$ & $4.3\mathrm{e}{6}$ & $4.3\mathrm{e}{6}$ & 153 & 2.75 & 2.73\\
ResNet-20 & 6\,144 & 20 & 20 & \texttt{R(1..41)} & $5.1\mathrm{e}{11}$ & $1.7\mathrm{e}{9}$ & $1.7\mathrm{e}{9}$ & -- & 292 & 301\\
Transformer layer & 1\,024 & 1\,024 & 1\,024 & \texttt{R(1..8)} & $6.5\mathrm{e}{9}$ & $6.5\mathrm{e}{9}$ & $6.5\mathrm{e}{9}$ & 136 & 133 & 135\\
autoencoder & 784 & 30 & 784 & \texttt{F(8..14) $\cdot$ R(1..7)} & $2.2\mathrm{e}{9}$ & $2.2\mathrm{e}{9}$ & $1.0\mathrm{e}{8}$ & 37.9 & 42.4 & 3.97\\}
\def\dpModeRows{gradient, the transpose & 0.0761 & 0.841 & 43.9 & 205 & 12.4 & 11.8\\
Gauss--Newton direction, one linearisation & 0.303 & 12.7 & 914 & 6\,707 & 272 & 201\\
the same, the two folds inside the iteration & 0.294 & 13.2 & 994 & 7\,022 & 286 & 204\\
Hessian-vector product, tangent of the transpose & 0.0834 & 1.54 & 93.5 & 513 & 30.7 & 19\\
the same, transpose of the transpose & 0.0725 & 0.976 & 127 & 633 & 30.4 & 17.7\\
step, all branches evaluated & 1.7 & 6.37 & 111 & 659 & 255 & 79.4\\
step, branches selected at run time & 0.359 & 4.33 & 83.3 & 492 & 48.1 & 38.4\\
Gauss--Newton step & 0.465 & 17.7 & 976 & 7\,352 & 330 & 207\\}
\def\dpPairRow{pairing of the Gauss--Newton direction with the generators & $1.1\mathrm{e}{-14}$ & $1.4\mathrm{e}{-16}$ & $3.0\mathrm{e}{-15}$ & $2.2\mathrm{e}{-15}$ & $5.3\mathrm{e}{-16}$ & $5.9\mathrm{e}{-16}$\\}
\def\dpSharpRow{largest eigenvalue of the Hessian & 128 & 33.3 & 608 & 46.8 & 2\,040 & 68\,000\\}
\def\dpVelGrad{$2.2\mathrm{e}{-1}$ and $1.4\mathrm{e}{0}$}
\def\dpVelGN{$2.7\mathrm{e}{-9}$ and $3.1\mathrm{e}{-9}$}



\begin{chapabstract}
An architecture is a term of a signature of layers. The terms are an initial algebra, and three semantics are homomorphisms out of it: the
denotation, a parametrised map; its image under the tangent functor $T=[D,-]$ of \cref{sec:dc}; and the transposed tangent map. Forward and
reverse differentiation are the second and the third, by the uniqueness of homomorphisms. A fourth homomorphism assigns to a term the
symmetries of its parameter object, which are $2$-cells, and with them the atlas, the connection and the conserved quantities of
\cref{ch:structure}. A training step is then a position with respect to that atlas. The construction is executable: by a compiler to JAX the
specifications of five published networks become optimizers whose forward and backward passes are arguments of one traced program, and
every statement of the chapter that has a numerical form is measured on them. Derivatives that are composites of the two modes are
evaluated by a plan of least cost.
\end{chapabstract}

\section{Terms, the free category, and parametrised maps}

\begin{definition}[Signature of layers]\label{def:signature}
A \emph{shape} is a finite sequence of positive integers and a \emph{type} is a finite sequence of shapes. The signature $\Sigma$ has the
generators \texttt{Dense}$(n)$, \texttt{Conv}$(c,k)$, \texttt{Act}, \texttt{MaxPool}$(k)$, \texttt{GlobalAvgPool}, \texttt{Flatten},
\texttt{BatchNorm}, \texttt{LayerNorm}, \texttt{Attention}$(h)$, \texttt{Downsample}$(c)$ and \texttt{Id}, from one shape to one shape, the
diagonal \texttt{Copy} from $(s)$ to $(s,s)$, the sum \texttt{Add} from $(s,s)$ to $(s)$, and two constructors, composition $t\,;t'$ and tensor $t\otimes t'$. The
set $W$ of well-typed terms is the initial algebra of $\Sigma$. Let $\approx$ be the congruence generated by the associativity and unit laws of the two
constructors and the interchange law $(t\,;t')\otimes(s\,;s')\approx(t\otimes s)\,;(t'\otimes s')$, and $p\colon W\to F=W/{\approx}$ the quotient: $F$ is the set of morphisms of the free strict
monoidal category on $\Sigma$. The residual block is the derived term $\mathrm{Res}(t,s)=\texttt{Copy}\,;(t\otimes s)\,;\texttt{Add}$.
\end{definition}

\begin{definition}[Parametrised maps; \cite{FongSpivakTuyeras,Cruttwell}]\label{def:para}
Let $\Hh$ be the model of \cref{sec:dc}. A $1$-cell $A\to B$ of $\Para(\Hh)$ is a pair $(P,f)$ with $f\colon P\times A\to B$; the composite of $(P,f)$ and $(Q,g)$ is
$(P\times Q,\ (p,q,a)\mapsto g(q,f(p,a)))$, and the tensor is the product. A $2$-cell $(P,f)\Rightarrow(P',f')$ is a map $r\colon P\to P'$ with $f=f'\circ(r\times\id)$. The \emph{symmetry group}
$\Aut(P,f)$ is the group of invertible $2$-cells from $(P,f)$ to itself. For a subgroup $G$ the map $f$ is invariant, and for a $0$-truncated
$B$ it descends to $(P\hquot G)\times A\to B$ by \cref{prop:atlas}\textup{(i)}; the stack $P\hquot G$ is the \emph{hypothesis stack}.
\end{definition}

The generators \texttt{Act}, $x\mapsto\max(x,\alpha x)$ with $\alpha\le1$, and \texttt{MaxPool} are continuous and piecewise linear. A point $(\theta,x)$ is \emph{regular} for a
term if no argument of these generators lies on a locus of non-differentiability in the evaluation at $(\theta,x)$; the regular points are an
open set, invariant under all the group actions below, and dense for generic $x$. The statements about tangent maps are statements at
regular points.

\begin{theorem}[Compilation]\label{thm:compile}
Let a $1$-cell $(P_\sigma,\sem\sigma)$ of $\Para(\Hh)$ be given for every generator $\sigma$.
\begin{enumerate}[label=\textup{(\roman*)}]
\item There is a unique assignment $t\mapsto(\Theta_t,\sem t)$ on $W$ that extends it and takes composition and tensor of terms to composition and tensor of
$1$-cells. It is the fold of \cref{prop:folds}.
\item If $t\approx t'$, the reassociation of the product of the parameter objects is an invertible $2$-cell $(\Theta_t,\sem t)\cong(\Theta_{t'},\sem{t'})$. Hence the
fold induces a homomorphism of bicategories from the free monoidal category $F$, with identity $2$-cells, to $\Para(\Hh)$.
\item The flattening $\mathrm{nf}\colon W\to W$ of nested compositions and tensors, with deletion of identities, is a computable slice of $p$ for the
associativity and unit laws, and with $\Theta_t$ the list of the parameter blocks of the generators of $t$ in order of occurrence,
$\Theta_{\mathrm{nf}(t)}=\Theta_t$ and $\sem{\mathrm{nf}(t)}=\sem t$.
\end{enumerate}
\end{theorem}
\begin{proof}
(i) is initiality. (ii) By \cref{prop:folds}(i) it suffices that the target satisfies the equations of \cref{def:signature}, and
composition and tensor of $\Para(\Hh)$ are associative and unital up to the associativity and unit isomorphisms of the product of $\Hh$, which
are $2$-cells by definition. (iii) Flattening terminates, its result is equal for terms that differ by the two laws, and the order of
occurrence of the generators is preserved; this is \cref{thm:normal-forms} for a decidable congruence.
\end{proof}

\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small,>=stealth]
 \node[hcsnode,align=center] (w) at (0,0) {terms $W$\\ initial algebra};
 \node[hcsnode,align=center] (f) at (0,-1.9) {$F=W/{\approx}$\\ free category};
 \node[hcsnodeb,align=center] (d) at (4.6,0.9) {denotation\\ $\sem t\colon\Theta_t\times A\to B$};
 \node[hcsnodeb,align=center] (t) at (4.6,-0.55) {tangent\\ $T\sem t$, dual numbers};
 \node[hcsnodeb,align=center] (r) at (4.6,-2.0) {transpose\\ $\sem t^*$, cotangents};
 \node[hcsnodeb,align=center] (s) at (4.6,-3.45) {symmetries\\ $G_t$, $a$, $H_t$, $Q$};
 \node[hcsnoder,align=center] (u) at (9.6,-0.55) {step $U_c\colon\Theta_t\to\Theta_t$\\ $c$ a configuration};
 \node[hcsnoder,align=center] (j) at (9.6,-2.75) {one traced program\\ $(c,\text{state},\text{batch})\mapsto\text{state}$};
 \draw[->>] (w)--node[left]{$p$}(f);
 \draw[->] (w.east)--(d.west);
 \draw[->] (w.east)--(t.west);
 \draw[->] (w.east)--(r.west);
 \draw[->] (w.east)--(s.west);
 \draw[->,dashed] (f.east)--(3.0,-1.9);
 \draw[->] (d.east)--(u.west);
 \draw[->] (t.east)--(u.west);
 \draw[->] (r.east)--(u.west);
 \draw[->] (s.east)--(u.west);
 \draw[->] (u)--node[right]{JAX}(j);
\end{tikzpicture}
\caption{Four folds out of the initial algebra of terms. Each factors through the free category (\cref{thm:compile,thm:ad,thm:sym-fold}),
and a step of an optimizer is assembled from them and from a configuration read at run time (\cref{thm:step}).}\label{fig:folds}
\end{figure}

\section{Forward and reverse mode}

\begin{theorem}[Tangent and transpose]\label{thm:ad}
At regular points:
\begin{enumerate}[label=\textup{(\roman*)}]
\item $T\sem t$ is the value at $t$ of the fold with generators $T\sem\sigma$. Since $T$ preserves products and $TR^n\simeq R^n\times R^n$, it is a map of pairs of a value and a
tangent, the arithmetic of dual numbers.
\item Let $\sem t^*$ be the fold in which a generator is sent to the fibrewise transpose of $T\sem\sigma$, a composite to the composite in the opposite order,
\texttt{Copy} to the sum and \texttt{Add} to the diagonal. Then for all tangent vectors $(\dot\theta,\dot x)$ and all cotangent vectors $\bar y$,
\[
\bigl\langle T\sem t(\dot\theta,\dot x),\,\bar y\bigr\rangle=\bigl\langle(\dot\theta,\dot x),\,\sem t^*(\bar y)\bigr\rangle .
\]
\item For $\ell\colon B\to R$ and $L=\ell\circ\sem t(-,x)$, the gradient $\nabla L(\theta)$ is the component along $\Theta_t$ of $\sem t^*(\nabla\ell)$, and it is computed by one evaluation of each
generator and one of each transpose.
\end{enumerate}
\end{theorem}
\begin{proof}
(i) $T$ is a functor that preserves finite products (\cref{lem:dc}(i)), so $t\mapsto T\sem t$ takes composition and tensor of terms to
composition and tensor; it is a homomorphism that agrees with the tangent fold on generators, and homomorphisms out of $W$ are unique. The
identification $TR^n\simeq R^n\times R^n$ is the Kock--Lawvere property. (ii) Transposition is a contravariant functor on linear maps of Euclidean spaces
that preserves products, the transpose of the diagonal is the sum, and the identity holds for generators by definition; both sides are
homomorphisms. (iii) is (ii) with $\bar y=\nabla\ell$ and the chain rule.
\end{proof}

Part (i) is forward-mode and part (iii) reverse-mode differentiation. The argument is that of \cite{Elliott}, and in axiomatic form of
reverse derivative categories \cite{RDC}; the lens form of (ii), with the parameter object, is in \cite{Cruttwell}. For a higher-order
language with algebraic data types, forward-mode differentiation is characterised in \cite{HuotStatonVakar} as the unique
structure-preserving macro for a choice of derivatives of the basic operations, and its correctness is proved by a gluing construction
over diffeological spaces, the category of Volume~I, with a sketch of the extension to a continuation-based method. Part (i) is that
characterisation for the first-order signature of \cref{def:signature}; in the present chapter the language is first-order and the
$2$-cells are added.

\section{Symmetries as \texorpdfstring{$2$}{2}-cells}

Three local patterns of a term give automorphisms of its denotation (\cref{tab:patterns}). In each, $L$ and $L'$ are linear generators,
\texttt{Dense} or \texttt{Conv}.

\begin{table}[t]\centering\small
\begin{tabular}{@{}p{4.6cm}p{1.9cm}p{3.9cm}p{3.3cm}@{}}\toprule
pattern in a composition & group & action & $Q$\\\midrule
$L\,;h_1;\dots;h_m;L'$, the $h_i$ among \texttt{Act}, pooling, \texttt{Flatten}, one of them \texttt{Act}; also with a normalisation for $L$ &
$(\R_{>0})^k\rtimes S_k$ & channel $j$ of $L$, weights and bias, times $s_j$; the weights of $L'$ on channel $j$ times $s_j^{-1}$ &
$\tfrac12\bigl(\abs{w^{\mathrm{in}}_j}^2+b_j^2-\abs{w^{\mathrm{out}}_j}^2\bigr)$\\[0.6ex]
$L\,;\texttt{BatchNorm}$, $L\,;\texttt{LayerNorm}$ & $(\R_{>0})^k$, $\R_{>0}$ & channel $c$ of $L$ times $s_c$; all of $L$ times $s$ & $\tfrac12\abs{W_c}^2$\\[0.6ex]
\texttt{Dense}\,;\texttt{Dense}; the pairs $(Q,K)$ and $(V,O)$ of each head of \texttt{Attention} & $\GL_k$ & $M_1\mapsto M_1g$, $M_2\mapsto g^{-1}M_2$ &
$\tfrac12\bigl(M_1\transp M_1-M_2M_2\transp\bigr)$\\\bottomrule
\end{tabular}
\caption{The symmetry families read off a term, with the functions $Q$ of their symmetric generators. For the pair $(Q,K)$ the matrix $M_2$ is
the transpose of the key projection.}\label{tab:patterns}
\end{table}

\begin{theorem}[The symmetry fold]\label{thm:sym-fold}
Let $t$ be a term and $G_t$ the group generated by the families of \cref{tab:patterns} at all their occurrences in $t$, with Lie algebra
$\fg_t$ and infinitesimal action $a$.
\begin{enumerate}[label=\textup{(\roman*)}]
\item $G_t\subseteq\Aut(\Theta_t,\sem t)$, for every value $\alpha\le1$ of the slope of \texttt{Act}. The assignment $t\mapsto(G_t,a)$ is defined by recursion on terms.
\item For every $\ell$ and every batch, $L=\ell\circ\sem t$ is $G_t$-invariant. Hence the output of the reverse fold is a section of $H_t=a(\fg_t)^\perp$, the functions
$Q$ of \cref{tab:patterns} are constant along gradient flow, and a step $\theta^+=\theta-h\nabla L$ changes $Q_A$ by $\tfrac{h^2}2\langle\nabla L,A\nabla L\rangle$.
\item $T\sem t\,(a(\xi,\theta),0)=0$ for $\xi\in\fg_t$. Two updates $u$, $u'$ with $u'-u=a(\psi,\theta)$ have the same image under $T\sem t$; in particular $u$ and its projection
$P_Hu$ to $H_t$.
\item The permutations $\prod S_k$ are coreduced: they have no generator and no function $Q$, and they are part of the formally \'etale map
$\varepsilon$ of \cref{thm:dc-factorisation}.
\end{enumerate}
\end{theorem}
\begin{proof}
(i) In the first pattern every $h_i$ acts on each channel separately and commutes with multiplication by a positive number, so the factor
$s_j$ passes from $L$ to the input of $L'$, where it is cancelled; a permutation of the channels is cancelled in the same way. In the second,
a normalisation is invariant under positive rescaling of each of its channels, respectively of its whole input. In the third the pair
enters through the product $M_1M_2$; for the attention scores, $(xM_Q)(xM_K)\transp=xM_Qg\,g^{-1}M_K\transp x\transp$. An automorphism of a factor of a composite or of a tensor
is an automorphism of the whole, by the functoriality of whiskering in $\Para(\Hh)$, and the search for the patterns is a recursion on
subterms. (ii) Invariance follows from (i), and the three consequences are \cref{thm:dc-positions}(a),(b) and \cref{thm:two-noether}(c); the
generators of the first two patterns and the symmetric elements of $\mathfrak{gl}_k$ act by symmetric matrices. (iii) Differentiate
$\sem t(\exp(s\xi)\theta,x)=\sem t(\theta,x)$ at $s=0$; the second statement follows by linearity, and $u-P_Hu$ lies in $a(\fg_t,\theta)$, the orthogonal complement of $H_t$ at
$\theta$. (iv) A finite group is coreduced, and \cref{thm:dc-factorisation}(v) and \cref{thm:dc-positions}(d) apply.
\end{proof}

The group $G_t$ is a subgroup of $\Aut(\Theta_t,\sem t)$ and in general a proper one: the permutations of the heads of an attention layer and the
translations of the bias before a normalisation are further automorphisms. The hypothesis stack of the chapter is $X_t=\Theta_t\hquot G_t$.

\section{A training step as a position}

\begin{definition}[Configuration and step]\label{def:config}
Let $b(\theta)\in G_t$ be a \emph{balancing element}: $b(\theta)\theta$ lies on the slice $S_t$ defined by $Q=0$ for the first and third patterns and $\abs{W_c}=1$ for the
second. A \emph{configuration} $c$ consists of the slope $\alpha$; a gauge exponent $\tau\in[0,1]$ and a return flag $\rho\in[0,1]$; a backward algebra, the
transpose of \cref{thm:ad} or the tangent fold along random directions \cite{Baydin}, with weights for two substitutions in the
transpose, fixed random matrices in place of transposed weights \cite{Lillicrap} and the identity in place of the transpose of
\texttt{Act} \cite{BengioSTE}; a projection weight $\pi\in[0,1]$; and a rule, among gradient descent, heavy ball and Adam, with its constants and
the step $h$. The step $U_c$ is
\begin{align*}
\theta_\tau&=b(\theta)^\tau\theta, & u&=\text{rule}\bigl(\text{backward}_c(\theta_\tau)\bigr), & u'&=(1-\pi)\,u+\pi\,P_Hu,\\
\theta_\tau^+&=\theta_\tau-h\,u', & U_c(\theta)&=b(\theta)^{-\tau\rho}\,\theta_\tau^+ .
\end{align*}
\end{definition}

\begin{theorem}[Positions of the compiled step]\label{thm:step}
\begin{enumerate}[label=\textup{(\alph*)}]
\item \emph{Projection.} For $\pi=1$, every backward algebra and every rule, $Q_A(\theta_\tau^+)=Q_A(\theta_\tau)+\tfrac{h^2}2\langle u',Au'\rangle$ for the symmetric generators $A$, and
$T\sem t(u',0)=T\sem t(u,0)$: the conserved quantities are preserved to first order in $h$, and the first-order change of the function is that of the unprojected update.
\item \emph{Slice.} For $\tau=1$, $\rho=0$, the forward pass is evaluated on the slice, and $\sem t(\theta_\tau,-)=\sem t(\theta,-)$.
\item \emph{Invariant metric.} Let $\tau=\rho=1$, with the transpose as backward algebra and gradient descent as rule, and let the slice intersect
every orbit of $G_t$ in one orbit of the subgroup $K_t$ of the elements of $G_t$ that are orthogonal. Then $U_c(g\theta)=g\,U_c(\theta)$ for $g\in G_t$ at the points with trivial stabiliser, the step
descends to an endomorphism of $X_t$, and the functions $\sem t(U_c^n(\theta),-)$ depend only on the class of $\theta$ in $X_t$. They are the functions obtained in
position \textup{(b)}.
\item \emph{Run-time family.} \Cref{thm:compile,thm:ad,thm:sym-fold} hold for every configuration, and $(c,\theta)\mapsto U_c(\theta)$ is one map; the weights
$\tau$, $\rho$, $\pi$ and those of the substitutions interpolate between the positions.
\end{enumerate}
\end{theorem}
\begin{proof}
(a) $Q_A(\theta-hu')=Q_A(\theta)-h\langle A\theta,u'\rangle+\tfrac{h^2}2\langle u',Au'\rangle$ and $\langle A\theta,u'\rangle=a_A(u')=0$ on $H_t$; the second statement is \cref{thm:sym-fold}(iii). (b)
$b(\theta)\in G_t$ and \cref{thm:sym-fold}(i). (c) Let $\beta(\theta)=b(\theta)\theta$ and $E$ the Euclidean step, so that $U_c(\theta)=b(\theta)^{-1}E(\beta(\theta))$. By hypothesis
$\beta(g\theta)=k\,\beta(\theta)$ with $k\in K_t$, that is, $b(g\theta)\,g=k\,b(\theta)$, the stabiliser of $\theta$ being trivial. The elements of $K_t$ are isometries that preserve $L$, so $E$
commutes with them (\cref{thm:dc-positions}(c)), and
$U_c(g\theta)=b(g\theta)^{-1}E(k\beta(\theta))=b(g\theta)^{-1}k\,E(\beta(\theta))=g\,b(\theta)^{-1}E(\beta(\theta))$. The rest is \cref{prop:atlas}(ii) and \cref{thm:sym-fold}(i), and in position (b) the
point is $\beta(U_c^n(\theta))$ up to $K_t$. (d) The slope enters \cref{thm:sym-fold}(i) only through positive homogeneity, and the other entries of $c$ do not
enter the forward fold.
\end{proof}

\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small,>=stealth]
 \fill[hcsmist] (0,0) rectangle (7.0,3.8);
 \draw[hcsteal] (0,0) rectangle (7.0,3.8);
 \foreach \x in {1.9,4.9} \draw[hcsgrey,line width=0.4pt] (\x,0)--(\x,3.8);
 \draw[hcsgold,line width=1.1pt] (0,1.0) .. controls (2.2,0.85) and (4.8,1.15) .. (7.0,1.0);
 \node[hcsgold!70!black,right] at (7.0,1.0) {slice $S_t$};
 \node[hcsgrey,above] at (1.9,3.8) {orbit of $G_t$};
 \fill (1.9,3.1) circle (1.4pt) node[left]{$\theta$};
 \fill (1.9,0.93) circle (1.4pt) node[below left]{$\theta_\tau$};
 \draw[->,hcsplum,line width=0.9pt] (1.9,3.0)--(1.9,1.05);
 \node[hcsplum,left] at (1.85,2.05) {$b(\theta)^\tau$};
 \draw[->,hcsink,line width=1pt] (1.9,0.93)--(4.9,1.03);
 \node[hcsink,below] at (3.4,0.92) {$-h\,P_Hu$};
 \draw[->,hcsrust,line width=0.8pt,dashed] (1.9,0.93)--(4.9,2.05);
 \node[hcsrust,above] at (3.2,1.55) {$-hu$};
 \fill (4.9,1.03) circle (1.4pt);
 \draw[->,hcsplum,line width=0.9pt] (4.9,1.13)--(4.9,3.0);
 \node[hcsplum,right] at (4.95,2.5) {$b(\theta)^{-\tau\rho}$};
 \fill (4.9,3.1) circle (1.4pt) node[right]{$U_c(\theta)$};
 \draw[->>,line width=0.6pt] (3.5,-0.15)--node[right]{$p$}(3.5,-0.8);
 \draw[hcsink,line width=1pt] (0,-1.0)--(7.0,-1.0) node[right]{$X_t$};
 \fill (1.9,-1.0) circle (1.2pt); \fill (4.9,-1.0) circle (1.2pt);
 \draw[->,hcsteal,line width=1pt] (1.95,-1.2)--(4.85,-1.2);
 \node[align=left,text width=5.4cm] at (11.6,1.5) {$\tau=0$: the step is taken at $\theta$.\\[0.5ex] $\tau=1$, $\rho=0$: it is taken on the slice and
 the point remains there.\\[0.5ex] $\tau=\rho=1$: it is taken on the slice and transported back, the step of an invariant metric.\\[0.5ex] $\pi=1$: the part of the update
 along the orbit is removed; it has no image in $TX_t$.};
\end{tikzpicture}
\caption{The step $U_c$ of \cref{def:config}. The gauge move and its inverse are $2$-cells and leave the denotation unchanged; under the
projection an update is replaced by an isomorphic section in the sense of \cref{prop:dc-sections}.}\label{fig:step}
\end{figure}

\section{The compiler and its measurements}

\Cref{def:signature,def:config} are implemented in JAX \cite{JAX} in the package \texttt{dprog}, in the source of this volume. Terms are immutable
records; \texttt{nf} is the flattening of \cref{thm:compile}(iii); \texttt{fold} is the homomorphism out of the terms, applied to three
algebras, \texttt{Primal}, \texttt{Tangent} and \texttt{Reverse}, whose values on a generator are the JAX expression of the layer, its
\texttt{jvp} and its \texttt{vjp}; \texttt{families} is the recursion of \cref{thm:sym-fold}; in \texttt{Symmetry} are computed $a$, the forms $a_\xi$ by
linear transposition, the projection $P_H$ by conjugate gradients on the Gram operator of $a$, the functions $Q$, and the balancing
elements, in closed form for each family and by alternating sweeps over the families; the value of \texttt{compile} is the step $U_c$ as one
traced function of the state, the batch and the configuration. Selections between algebras and rules are \texttt{lax.switch} on entries of $c$,
and all weights are traced numbers, so a change of configuration is not a new compilation.

\begin{figure}[t]
\footnotesize
\begin{verbatim}
def basic_block(c, stride):                       # He et al., CIFAR-10, shortcut option A
    body = Seq((Conv(c, 3, stride, bias=False), BatchNorm(), Act(),
                Conv(c, 3, bias=False), BatchNorm()))
    return Seq((Residual(body, Id() if stride == 1 else Downsample(c)), Act()))

def transformer_layer(d=512, heads=8, ff=2048):   # Vaswani et al., encoder layer
    return Seq((Residual(Attention(heads)), LayerNorm(),
                Residual(Seq((Dense(ff), Act(), Dense(d)))), LayerNorm()))

model = compile(transformer_layer(), (16, 512), loss="mse")          # one traced step
state = model.init(key)
cfg = default_cfg                                # every entry is read at run time
state, m = model.step(state, batch, cfg(lr=5e-4))                    # transpose, SGD
state, m = model.step(state, batch, cfg(lr=5e-4, tau=1.0, ret=1.0))  # invariant metric
state, m = model.step(state, batch, cfg(lr=5e-4, fa=1.0, proj=1.0))  # feedback alignment
state, m = model.step(state, batch, cfg(lr=1e-4, rule=2, bmode=1))   # tangent algebra, Adam
assert model.traces == 1
\end{verbatim}
\caption{Two specifications and a compiled optimizer whose forward and backward passes are changed between steps.}\label{fig:listing}
\end{figure}

\begin{table}[t]\centering\small
\begin{tabular}{@{}lllrrrr@{}}\toprule
specification & input & parameters & rescaling & normalisation & $\GL_k$ & $\dim\fg_t$\\\midrule
\dpSpecRows
\bottomrule
\end{tabular}
\caption{Five published architectures as terms, with the dimension of the Lie algebra of the symmetries found by the fold of
\cref{thm:sym-fold}. The parameter counts follow from the published layer sizes.}\label{tab:specs}
\end{table}

The specifications are the deep linear network of \cite{Arora}, LeNet-300-100 and LeNet-5 \cite{LeCun98} with rectified activations,
ResNet-20 for CIFAR-10 \cite{ResNet} with batch normalisation \cite{BatchNorm} on batch statistics and the parameter-free shortcut, and
the encoder layer of the base Transformer \cite{Vaswani} with layer normalisation \cite{LayerNorm} (\cref{tab:specs}). No data set is
used: inputs are standard normal, and targets are produced by a fixed random network of the same architecture, labels for the classifiers
and outputs for the two regressions. Arithmetic is in double precision.

\begin{table}[t]\centering\footnotesize
\begin{tabular}{@{}p{5.1cm}lllll@{}}\toprule
quantity & deep linear & LeNet-300-100 & LeNet-5 & ResNet-20 & Transformer\\\midrule
\dpCheckRows
\bottomrule
\end{tabular}
\caption{Measured defects of the statements of this chapter, relative, one random point and batch of four per specification. Rows 1 to 4:
\cref{thm:compile}(iii) and \cref{thm:ad}, the differences being central with step $10^{-6}$ in a random unit direction. Rows 5 to 10:
\cref{thm:sym-fold}. Rows 11 to 13: \cref{thm:step}(b),(c); the last two rows compare the functions after one step from $\theta$ and from $g\theta$ for a
random $g\in G_t$.}\label{tab:checks}
\end{table}

The verification is in \cref{tab:checks}. The reverse and tangent algebras agree with central differences to the accuracy of the
differences, and with each other through the transposition identity to rounding. Invariance, the orthogonality of the gradient to the
generators, and the vanishing of $T\sem t$ on vertical vectors hold to rounding for all five terms. The balancing is exact when the families
do not share parameter blocks, as in the Transformer layer, and is otherwise limited by the twelve alternating sweeps; the equivariance of
the invariant-metric step has the same accuracy, against a defect of order one for the plain step.

\begin{table}[t]\centering\small
\begin{tabular}{@{}lllllll@{}}\toprule
 & \multicolumn{2}{c}{transpose} & \multicolumn{2}{c}{feedback alignment} & \multicolumn{2}{c}{the same, projected}\\
specification & drift & ratio & drift & ratio & drift & ratio\\\midrule
\dpDriftRows
\bottomrule
\end{tabular}
\caption{Relative drift of the functions $Q$ over a fixed training time with step $h$, and its ratio to the drift with step $h/2$. A drift
of order $h^2$ per step gives the ratio $2$; a drift of order $h$ per step gives the ratio $1$.}\label{tab:drift}
\end{table}

\Cref{tab:drift} is \cref{thm:sym-fold}(ii) and \cref{thm:step}(a). For the transpose the drift is of second order per step. Feedback
alignment is not a gradient, its update has a component along the orbits, and the drift is of first order; after projection it is again of second
order.

\begin{table}[t]\centering\footnotesize
\begin{tabular}{@{}p{5.0cm}lllll@{}}\toprule
configuration & deep linear & LeNet-300-100 & LeNet-5 & ResNet-20 & Transformer\\\midrule
\multicolumn{6}{@{}l}{\emph{final loss, relative to the initial loss}}\\
\dpTrainRows
\midrule
\multicolumn{6}{@{}l}{\emph{pairing of the update with the generators, $\abs{(a_\xi(u))_\xi}/\abs u$, mean over the steps}}\\
\dpVertRows
\midrule
\dpBatchRow
\dpStepsRow
\dpTraceRow
\bottomrule
\end{tabular}
\caption{Each specification compiled once and trained under eleven configurations given at run time. Within a column the
transpose, feedback alignment and straight-through have one step size, the heavy ball a tenth of it, Adam its own, and the tangent algebra
the first multiplied by four times the ratio of the number of directions to the number of parameters; the values are in \texttt{demo.py}.}\label{tab:train}
\end{table}

\begin{figure}[t]
\centering
\begin{tikzpicture}
\begin{axis}[name=A,width=7.3cm,height=5.6cm,ymode=log,xlabel={step},ylabel={loss / initial loss},title={LeNet-300-100},
  tick label style={font=\small},label style={font=\small},title style={font=\small}]
\dpGaugeA
\end{axis}
\begin{axis}[at={(A.east)},anchor=west,xshift=1.3cm,width=7.3cm,height=5.6cm,ymode=log,xlabel={step},title={Transformer layer},
  tick label style={font=\small},label style={font=\small},title style={font=\small},
  legend style={font=\footnotesize,at={(0.03,0.03)},anchor=south west,draw=none,fill=none,cells={anchor=west}}]
\dpGaugeB
\legend{{plain, from $\theta$},{plain, from $g\theta$},{invariant, from $\theta$},{invariant, from $g\theta$}}
\end{axis}
\end{tikzpicture}
\caption{The same function at two points $\theta$ and $g\theta$ of a fibre. Under plain gradient descent the two losses separate; in the
invariant-metric configuration they coincide (\cref{thm:step}(c)).}\label{fig:gauge}
\end{figure}

\begin{figure}[t]
\centering
\begin{tikzpicture}
\begin{axis}[width=11.5cm,height=5.6cm,ymode=log,xmin=0,xmax=1,xlabel={fraction of the run},ylabel={loss / initial loss},
  tick label style={font=\small},label style={font=\small},
  legend style={font=\footnotesize,at={(1.03,0.98)},anchor=north west,draw=none,fill=none,cells={anchor=west}}]
\dpSwitch
\draw[hcsgrey,dashed] (axis cs:0.3333,1e-9)--(axis cs:0.3333,10);
\draw[hcsgrey,dashed] (axis cs:0.6667,1e-9)--(axis cs:0.6667,10);
\end{axis}
\end{tikzpicture}
\caption{The configuration is changed twice during training, without a new trace: transpose with gradient descent, then feedback
alignment with projection, then Adam with projection.}\label{fig:switch}
\end{figure}

Four observations on \cref{tab:train} and \cref{fig:gauge,fig:switch}. First, the rows of the slice and of the invariant metric are equal:
the two configurations differ by a gauge transformation at every step (\cref{thm:step}(c)), and the loss is a function on $X_t$. Second,
the update of Adam pairs with the generators at about a tenth of its norm or more, since the rule is not equivariant, and the removal of
that part changes the final loss by a few percent at most, in agreement with \cref{thm:sym-fold}(iii) to first order. Third, the same holds for
feedback alignment except on the deep linear network, where the projected run is slower: the alignment of the forward weights with the
feedback weights is a motion along the orbits of $\GL_k$, and it is removed by the projection. Fourth, the tangent algebra with eight random
directions gives an unbiased estimate of the gradient whose variance is proportional to the number of parameters, and in these runs it
reduces the loss of the network with $448$ parameters by two fifths, that of LeNet-5 by a tenth, and that of the three others by a
thousandth or less.

\section{Composition of the two modes}\label{sec:modes}

The tangent and the transpose are two homomorphisms. A derivative of a term, its Jacobian, a product with it, a second derivative, is a
composite of both, and the composites with one value differ in cost. The choice among them is a choice of a term in a fibre of a quotient
map, as in \cref{ch:structure}: the value is a function on the classes, the cost is a function on the terms. In the compiler the choice is
made by a cost model, and by measurement where the model is indifferent.

\begin{definition}[Linearisation and plans]\label{def:plans}
The \emph{linearisation fold} sends a term to a triple $(y,\mathrm{push},\mathrm{pull})$ at a point: one evaluation of the denotation, the
linear map $T\sem t$ at the point, and its transpose, obtained by transposition of the linear map. Let $t=\ell_1;\dots;\ell_n$ be a composition of links
with interfaces of dimensions $d_0,\dots,d_n$, linear maps $L_i$ after linearisation, and costs $c_i$ of one application of a link, of its push or
of its pull, and let $C_{ij}=c_{i+1}+\dots+c_j$. An \emph{accumulation plan} is a binary tree whose leaves are segments $(i,j]$ marked $\mathrm F$, the pushes of
the $d_i$ basis vectors, or $\mathrm R$, the pulls of the $d_j$ basis covectors, and whose nodes are matrix products.
\end{definition}

\begin{theorem}[Accumulation plans]\label{thm:plans}
\begin{enumerate}[label=\textup{(\roman*)}]
\item Every plan has the value $L_n\cdots L_1$.
\item In the cost model $\mathrm F(i,j]\mapsto d_iC_{ij}$, $\mathrm R(i,j]\mapsto d_jC_{ij}$, product $\mapsto\mu\,d_jd_kd_i$, a plan of least cost is found by dynamic programming over the
segments, in $O(n^3)$ operations.
\item A product $\bar y\transp L_n\cdots L_1$ with one covector costs at least $C_{0n}$, and the reverse sweep attains it; a product $L_n\cdots L_1v$ with one vector
costs at least $C_{0n}$, and the forward sweep attains it. The transpose is optimal for the gradient of a loss and the tangent for a
directional derivative.
\item If $d_k\le\min(d_0,d_n)$ for an interior $k$, the plan $\mathrm F(k,n]\cdot\mathrm R(0,k]$ costs $d_k\,C_{0n}+\mu\,d_nd_kd_0$, and the cheaper pure plan costs
$\min(d_0,d_n)\,C_{0n}$.
\end{enumerate}
\end{theorem}
\begin{proof}
(i) By \cref{thm:ad} a leaf is the matrix of the composite of its links, computed by columns or by rows, and the matrix product is
associative. (ii) The least cost $b(i,j)$ of a segment satisfies
$b(i,j)=\min\bigl(d_iC_{ij},\,d_jC_{ij},\,\min_{i<k<j}b(i,k)+b(k,j)+\mu\,d_jd_kd_i\bigr)$. (iii) Every link is applied at least once, and each sweep
applies every link once. (iv) The reverse sweep of the first $k$ links has $d_k$ seeds, the forward sweep of the others has $d_k$ seeds, and
one product remains.
\end{proof}

The links are the factors of the top-level composition of the normal form. Inside a link, and for a term with shared subterms, the same
question is the elimination problem on the graph of the generators, which is NP-complete \cite{Naumann}; the general theory is in
\cite{GriewankWalther}.

\begin{proposition}[Composites on one linearisation]\label{prop:gn}
Let $J$ be the parameter part of the push at $(\theta,x)$ for a batch $x$, and $H_\ell$ the Hessian of the loss in the outputs, positive semidefinite
with $\nabla\ell$ in its range, as for the two losses of this chapter.
\begin{enumerate}[label=\textup{(\roman*)}]
\item $J\transp H_\ell J=\mathrm{pull}\circ H_\ell\circ\mathrm{push}$. The gradient is one pull, and $K$ iterations of conjugate gradients for $(J\transp H_\ell J+\lambda)\,d=\nabla L$ use one evaluation of
the denotation, $K$ pushes and $K+1$ pulls.
\item The Hessian-vector product is the tangent of the reverse fold, and it is also the transpose of the reverse fold paired with the
vector.
\item The iterates of \textup{(i)} lie in $H_t$: the Gauss--Newton direction is a section of $H_t$, without projection.
\item For $\lambda\to0$ and the limit $d$ of the iteration, $H_\ell Jd$ is the same at $\theta$ and at $g\theta$ for $g\in G_t$. For positive definite $H_\ell$ the first-order
change of the outputs on the batch is a function on $X_t$.
\end{enumerate}
\end{proposition}
\begin{proof}
(i) and (ii) are the definitions, the equality of pull and transposed push, and the symmetry of second derivatives. (iii) $J\,a(\xi,\theta)=0$ by
\cref{thm:sym-fold}(iii), so the symmetric operator $M=J\transp H_\ell J+\lambda$ maps $a(\fg_t,\theta)$ to itself and its orthogonal complement $H_t$ to itself;
$\nabla L$ is in $H_t$, and the iterates are in the span of the vectors $M^m\nabla L$. (iv) The action of $g$ is linear and $\sem t(g\theta,x)=\sem t(\theta,x)$, so
$J(g\theta)\circ g=J(\theta)$, and $J(g\theta)$ and $J(\theta)$ have the same range. With $A=H_\ell^{1/2}J$ and $\nabla\ell=H_\ell^{1/2}r$, the limit $d$ is the solution of least norm of
$A\transp A\,d=A\transp r$, so $Ad$ is the orthogonal projection of $r$ to the range of $A$, which is the same at $\theta$ and $g\theta$, and $H_\ell Jd=H_\ell^{1/2}Ad$.
\end{proof}

\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small,>=stealth,x=0.82cm,y=0.0032cm]
 \foreach \i/\d in {0/784,1/1000,2/1000,3/500,4/500,5/250,6/250,8/250,9/250,10/500,11/500,12/1000,13/1000,14/784}
   \fill[hcsmist,draw=hcsteal] (\i-0.3,0) rectangle (\i+0.3,\d);
 \fill[hcsgold!60,draw=hcsgold!70!black] (7-0.3,0) rectangle (7+0.3,30);
 \node[hcsgold!60!black,above] at (7,60) {$30$};
 \node[above] at (0,784) {$784$}; \node[above] at (14,784) {$784$}; \node[above] at (1.5,1000) {$1000$}; \node[above] at (12.5,1000) {$1000$};
 \draw[hcsrust,line width=1pt,<-] (-0.3,-110)--(7,-110);
 \node[hcsrust,below] at (3.4,-130) {$\mathrm R(1..7)$: $30$ pulls};
 \draw[hcsteal,line width=1pt,->] (7,-110)--(14.3,-110);
 \node[hcsteal,below] at (10.6,-130) {$\mathrm F(8..14)$: $30$ pushes};
 \node[below] at (7,-290) {one product of a $784\times30$ and a $30\times784$ matrix};
\end{tikzpicture}
\caption{The interface dimensions of the fourteen links of the deep autoencoder and the plan of least cost for its Jacobian: reverse on
the encoder, forward on the decoder (\cref{thm:plans}(iv)).}\label{fig:plan}
\end{figure}

\begin{table}[t]\centering\footnotesize\setlength{\tabcolsep}{3.6pt}
\begin{tabular}{@{}lrrrllllrrr@{}}\toprule
 & \multicolumn{3}{c}{dimensions} & & \multicolumn{3}{c}{cost in the model} & \multicolumn{3}{c}{milliseconds}\\
specification & $d_0$ & least & $d_n$ & least-cost plan & $\mathrm F$ & $\mathrm R$ & plan & $\mathrm F$ & $\mathrm R$ & plan\\\midrule
\dpJacRows
\bottomrule
\end{tabular}
\caption{Accumulation of the Jacobian of the denotation in its input, for one example (two for ResNet-20, whose normalisation couples the
examples; an input of $2\times512$ for the Transformer layer). The three plans agree to rounding where they are evaluated; the forward plan of
ResNet-20 is not evaluated.}\label{tab:jac}
\end{table}

\begin{table}[t]\centering\footnotesize\setlength{\tabcolsep}{4pt}
\begin{tabular}{@{}p{5.9cm}rrrrrr@{}}\toprule
milliseconds & linear & LeNet-300 & LeNet-5 & ResNet-20 & Transf. & autoenc.\\\midrule
\dpModeRows
\midrule
\dpPairRow
\dpSharpRow
\bottomrule
\end{tabular}
\caption{Composites of the two modes, medians of five evaluations on two processor cores, with the batches of \cref{tab:train} and $32$
examples for the autoencoder. The Gauss--Newton direction has $K=10$ iterations.}\label{tab:modes}
\end{table}

The package contains the linearisation fold, the dynamic programme of \cref{thm:plans}(ii), the evaluation of plans, the Gauss--Newton
direction as a third backward algebra of the step, selected at run time like the others, and both composites for the Hessian-vector
product. A sixth specification is used here, the deep autoencoder $784$-$1000$-$500$-$250$-$30$ and back of \cite{HintonSalakhutdinov}, with the
activation of the signature and a linear code layer; its bottleneck has the symmetry $\GL_{30}$ of the third pattern.

Three measurements (\cref{tab:jac,tab:modes}). First, for the autoencoder the plan of least cost is the mixed plan of \cref{fig:plan}; in the
model the factor over the pure plans is $21$ and the measured factor is about ten, the matrix product being cheaper per multiplication than
a sweep. For the classifiers the plan is the reverse sweep, and the forward sweep is slower by factors of about ten and fifty for the two LeNets; for the
Transformer layer, of constant width, there is no difference in the model or in the measurement. Second, the step with branches selected at run time,
in which the gauge move, its inverse and the substituted transpose are evaluated only when their weights are positive, is $1.3$ to $5.3$
times faster than the step of \cref{tab:train}, in which they were always evaluated; the values are equal to rounding. Third, two
choices are not separated by the model. The Gauss--Newton direction on one linearisation and the same iteration with both folds inside it
take the same time within ten percent: the evaluations of the denotation inside the iteration do not depend on the iterate. The two
composites for the Hessian-vector product differ by up to a factor $1.6$, in either direction, and the choice between them is made by
measurement (\texttt{tune}).

The Gauss--Newton direction pairs with the generators at rounding level, as in \cref{prop:gn}(iii). For \cref{prop:gn}(iv), on batches of
four with $400$ iterations and damping $10^{-10}$ of the largest eigenvalue, the defect of $H_\ell Jd$ between $\theta$ and a random $g\theta$ is \dpVelGN\ for
the deep linear network and LeNet-300-100, against \dpVelGrad\ for the gradient in place of $d$. One step of length one in this direction
reduces the loss of the five specifications without batch normalisation and increases that of ResNet-20 at the damping used.

\emph{Sources.} Parametrised maps and their $2$-cells are those of \cite{FongSpivakTuyeras,Cruttwell}, the two modes of
differentiation as homomorphisms are in \cite{Elliott,RDC}, and forward mode as the unique structure-preserving macro, with semantics in
diffeological spaces, is in \cite{HuotStatonVakar}. The symmetries of \cref{tab:patterns} are known separately
\cite{Kunin,ZhaoSurvey,DuHuLee}. They are combined here with \cref{sec:dc}: the symmetries are the $2$-cells of the free construction, a
backward pass is a position with respect to the atlas they define, and the configurations are one family of algebras over the same terms.
The accumulation of Jacobians by mixed plans and its complexity are in \cite{GriewankWalther,Naumann}, the Hessian-vector product by
composition of the modes in \cite{Pearlmutter}, and the Gauss--Newton direction by conjugate gradients in \cite{Martens}; parts (iii) and (iv)
of \cref{prop:gn} relate it to the symmetries.

\exercisesheading

\begin{exercise}[label=exo:term]{1}
Write LeNet-300-100 as a term, compute its type and its number of parameters, and give the normal form of
\[(\texttt{Flatten}\,;(\texttt{Dense}(300)\,;\texttt{Id}))\,;((\texttt{Act}\,;\texttt{Dense}(100))\,;(\texttt{Act}\,;\texttt{Dense}(10))).\]
\end{exercise}
\begin{solution}
The term is $\texttt{Flatten}\,;\texttt{Dense}(300)\,;\texttt{Act}\,;\texttt{Dense}(100)\,;\texttt{Act}\,;\texttt{Dense}(10)$, from the type $((1,28,28))$ to $((10))$, through the shapes
$(784)$, $(300)$, $(300)$, $(100)$, $(100)$. The parameter blocks have $784\cdot300+300$, $300\cdot100+100$ and $100\cdot10+10$ entries, in total $266\,610$. The given
term differs from it by the associativity and unit laws, so its normal form is the flat composition above, with the same three blocks in
the same order.
\end{solution}

\begin{exercise}[label=exo:residual]{2}
Compute the tangent and the transpose of the residual block $\mathrm{Res}(t,\texttt{Id})$ from those of $t$.
\end{exercise}
\begin{solution}
$\sem{\mathrm{Res}(t,\texttt{Id})}(\theta,x)=\sem t(\theta,x)+x$. The tangent fold gives $(\dot\theta,\dot x)\mapsto T\sem t(\dot\theta,\dot x)+\dot x$: the pair is copied by the diagonal and the tangents are added by the sum. In
the transpose the order is reversed and the two structural generators are exchanged (\cref{thm:ad}(ii)): a cotangent $\bar y$ is copied by the
transpose of the sum, the two copies are transported by $\sem t^*$ and by the identity, and the results are added by the transpose of the diagonal:
$\bar\theta=\sem t^*_\Theta(\bar y)$ and $\bar x=\sem t^*_A(\bar y)+\bar y$.
\end{solution}

\begin{exercise}[label=exo:act-homogeneous]{2}
For the term $\texttt{Dense}(k)\,;\texttt{Act}\,;\texttt{Dense}(m)$ verify the invariance of \cref{thm:sym-fold}(i) directly, and show that it fails when
\texttt{Act} is replaced by $x\mapsto\log(1+e^x)$.
\end{exercise}
\begin{solution}
$y=\phi(xW_1+b_1)W_2+b_2$ with $\phi(z)=\max(z,\alpha z)$ applied to each coordinate. For a positive diagonal matrix $s$, $\phi(zs)=\phi(z)s$, so
$\phi(xW_1s+b_1s)\,s^{-1}W_2=\phi(xW_1+b_1)W_2$. For $\phi=\log(1+e^z)$ and one hidden unit with $x=0$, $b_1=0$: $\phi(0)=\log2$ before and after the rescaling, and the output
changes from $w_2\log2$ to $s^{-1}w_2\log2$. No positively homogeneous function of degree one on $\R$ other than $\max(c_+z,c_-z)$ and $\min(c_+z,c_-z)$ exists, and it
is smooth only when it is linear: the symmetry and the locus of non-differentiability come together.
\end{solution}

\begin{exercise}[label=exo:plan-small]{2}
A chain has two links of cost $10^4$ each and dimensions $(d_0,d_1,d_2)=(1000,10,1000)$. Compute the costs of the three plans for its Jacobian
with $\mu=1$, and of the product of the Jacobian with five vectors.
\end{exercise}
\begin{solution}
$\mathrm F(0,2]$ costs $1000\cdot2\cdot10^4=2\cdot10^7$ and $\mathrm R(0,2]$ the same. The mixed plan $\mathrm F(1,2]\cdot\mathrm R(0,1]$ costs $10\cdot10^4+10\cdot10^4+1000\cdot10\cdot1000=1.02\cdot10^7$, of which the matrix product is all
but two percent: the sweeps are cheaper by a factor $100$, and the product is the remaining cost. For five vectors the forward sweep costs
$5\cdot2\cdot10^4=10^5$ and no Jacobian is formed: with seeds of small rank at one end the pure sweep from that end is optimal, as in
\cref{thm:plans}(iii).
\end{solution}

\begin{exercise}[label=exo:scaleinv]{3}
Let $L(W)$ be invariant under $W\mapsto sW$, $s>0$. Prove that $\nabla L(sW)=s^{-1}\nabla L(W)$ and $\langle W,\nabla L(W)\rangle=0$, that a step of gradient descent increases $\abs W^2$ by
$h^2\abs{\nabla L}^2$, and that the step of \cref{thm:step}(c) is $W^+=W-h\,\abs W^2\,\nabla L(W)$.
\end{exercise}
\begin{solution}
Differentiating $L(sW)=L(W)$ in $W$ gives $s\,\nabla L(sW)=\nabla L(W)$, and in $s$ at $s=1$ gives $\langle W,\nabla L(W)\rangle=0$, which is \cref{thm:dc-positions}(a) for the generator
$A=\id$. Then $\abs{W-h\nabla L}^2=\abs W^2+h^2\abs{\nabla L}^2$, the drift of \cref{thm:sym-fold}(ii) for $Q=\tfrac12\abs W^2$. The balancing element is $b=1/\abs W$, the point on the
slice is $W/\abs W$, the Euclidean step there is $W/\abs W-h\,\nabla L(W/\abs W)=W/\abs W-h\abs W\,\nabla L(W)$, and its transport by $b^{-1}=\abs W$ is $W-h\abs W^2\nabla L(W)$. This is the gradient
step for the invariant metric $\abs{\dd W}^2/\abs W^2$.
\end{solution}

\begin{exercise}[label=exo:geomean]{3}
For $M_1\in\R^{m\times k}$ and $M_2\in\R^{k\times n}$ of rank $k$, let $A=M_1\transp M_1$ and $B=M_2M_2\transp$. Prove that there is a unique symmetric positive definite $g$ such
that $(M_1g,\,g^{-1}M_2)$ is balanced, and that $g^2=A^{-1/2}\bigl(A^{1/2}BA^{1/2}\bigr)^{1/2}A^{-1/2}$.
\end{exercise}
\begin{solution}
The pair $(M_1g,g^{-1}M_2)$ is balanced when $gAg=g^{-1}Bg^{-1}$, that is, $PAP=B$ with $P=g^2$. Put $Y=A^{1/2}PA^{1/2}$; then $PAP=B$ is $Y^2=A^{1/2}BA^{1/2}$. The right-hand
side is symmetric positive definite and has a unique symmetric positive definite square root, so $Y$ and $P=A^{-1/2}YA^{-1/2}$ are determined, and $g$ is the
positive square root of $P$. The matrix $P$ is the geometric mean of $A^{-1}$ and $B$. This is the balancing element used by the compiler for the third
pattern, and the uniqueness is the hypothesis of \cref{thm:step}(c) for $K_t=\Ort(k)$.
\end{solution}

\begin{exercise}[label=exo:fa-drift]{4}
Let $u$ be an update direction with $a_A(u)=\langle A\theta,u\rangle\neq0$ for a symmetric generator $A$ at some point of a trajectory. Prove that over a fixed training time
the drift of $Q_A$ under $\theta^+=\theta-hu$ does not tend to $0$ with $h$ in general, and that it is $O(h)$ after projection, as in \cref{tab:drift}.
\end{exercise}
\begin{solution}
One step changes $Q_A$ by $-h\,a_A(u)+\tfrac{h^2}2\langle u,Au\rangle$. Over $n=T/h$ steps the first terms sum to $-h\sum_ia_A(u_i)$, a Riemann sum for $-\int_0^Ta_A(u(\theta(s)))\,\dd s$ along the
limiting trajectory $\dot\theta=-u(\theta)$, which is non-zero unless the integral vanishes; this is the ratio $1$ of the table. After projection $a_A(u')=0$ at every
step by \cref{thm:step}(a), and the drift is $\tfrac{h^2}2\sum_i\langle u'_i,Au'_i\rangle\le\tfrac h2\,T\,\lVert A\rVert\,\sup\abs{u'}^2$, of order $h$: the ratio $2$. For the transpose $u=\nabla L$ lies in $H_t$ without
projection (\cref{thm:sym-fold}(ii)), with the same bound.
\end{solution}

\begin{exercise}[label=exo:equivariance]{4}
Prove \cref{thm:step}(c) for a single \texttt{Dense}\,;\texttt{Dense} pair without the hypothesis on the slice, by proving the hypothesis.
\end{exercise}
\begin{solution}
Let $\theta=(M_1,M_2)$ of rank $k$ and $h\cdot\theta=(M_1h,h^{-1}M_2)$ for $h\in\GL_k$. The balanced points of the orbit are the points $(M_1g,g^{-1}M_2)$ with $g\transp(M_1\transp M_1)g=g^{-1}(M_2M_2\transp)g^{-\mathsf T}$. If $g$ is
a solution then so is $gk$ for $k\in\Ort(k)$, and by the polar decomposition $g=pk$ every solution is of this form with $p$ symmetric positive
definite, which is unique by \cref{exo:geomean}. So the slice intersects the orbit in one orbit of $K_t=\Ort(k)$, which is the hypothesis. For $h\in\GL_k$
the balancing element of $h\cdot\theta$ is the symmetric positive definite $p'$ with $hp'=b(\theta)k$ for some $k\in\Ort(k)$, by the same uniqueness applied to the orbit,
so $\beta(h\cdot\theta)$ is the image of $\beta(\theta)$ under the element $k$ of $K_t$, the stabilisers are trivial because $M_1$ has rank $k$, and the computation in the proof
of \cref{thm:step} applies. The Euclidean step commutes with $\Ort(k)$
because the action of $\Ort(k)$ on pairs is orthogonal and the loss is invariant.
\end{solution}

\begin{exercise}[label=exo:gn-horizontal]{4}
Prove that the direction of a damped Newton iteration, $(\nabla^2L+\lambda)\,d=\nabla L$ solved by conjugate gradients, is not a section of $H_t$ in general, in
contrast with \cref{prop:gn}(iii).
\end{exercise}
\begin{solution}
Differentiating $\langle\nabla L(\theta),A\theta\rangle=0$ in the direction $u$ gives $\langle\nabla^2L\,u,A\theta\rangle+\langle\nabla L,Au\rangle=0$, so $\nabla^2L\,(A\theta)=-A\transp\nabla L$ for every generator $A$: the Hessian maps the vertical
vector $A\theta$ to $-A\transp\nabla L$, which vanishes only when $A\transp\nabla L=0$. So the vertical space is not invariant under
$\nabla^2L+\lambda$, its orthogonal complement is not invariant either, and the second iterate, a combination of $\nabla L$ and $\nabla^2L\,\nabla L$, pairs with $A\theta$ through
$\langle\nabla^2L\,\nabla L,A\theta\rangle=-\langle\nabla L,A\nabla L\rangle$. For the rescaling generator this is $\abs{\nabla_{\mathrm{out}}L}^2-\abs{\nabla_{\mathrm{in}}L}^2$, the drift coefficient of \cref{thm:sym-fold}(ii), non-zero in general. The
Gauss--Newton operator differs from the Hessian by the term in the second derivative of the denotation, and it is that term that does not
vanish on vertical vectors.
\end{solution}



\chapter{Coda}\label{ch:coda}

\section{The argument in one page}

A closed $2$-form on a diffeological space is a map to the sheaf $\Omcl$, and the symplectic diffeology of \cite{IZ} is the study of the
slice over that sheaf (\cref{prop:slice}). The moment map of \cite{IZ} is defined for every group of automorphisms by transgression along
orbits (\cref{thm:paths-moment,thm:moment}); for an invariant primitive it is the component along the group of the difference of the two
pullbacks to $G\times X$, that is, the obstruction to descent to the homotopy quotient (\cref{prop:basic}). A homogeneous space is fibred by its
moment map over a coadjoint orbit, whose diffeology is a coimage (\cref{thm:homogeneous,rem:coimage}), and non-degeneracy is the
injectivity of the universal moment map (\cref{thm:coadjoint}).

One level up, $\Omcl$ is replaced by the stack $\BTc$ of bundles with connection for a torus of periods. The same three statements hold with the
connection form $\lambda$ in the place of the primitive: the moment map is the pullback of $\lambda$ along orbits and is equivariant (\cref{thm:A}); it
vanishes exactly when the bundle descends to $X\hquot G$ (\cref{thm:B}); and on the zero level of a principal action everything descends to
the quotient (\cref{thm:reduction}). The proofs use one lemma, on $1$-forms on a product (\cref{lem:slices}), and the description of
principal actions of \VolI{Theorem~7.2}. No dimension, regularity or compactness enters, and the structure group may be an irrational torus
(\cref{thm:S2S2}).

The applications use these statements at three levels of generality. For quasi-tori everything is explicit, and the invariants are
arithmetic: ideals as groups of periods, Hilbert modular groups, Heisenberg quasi-nilmanifolds, the Weil pairing as a commutator
(\cref{thm:steinitz,thm:heis-prequantum,thm:theta,thm:isotropic}). For manifolds with symmetry the statements are conservation laws and
their discrete and reduced forms (\cref{thm:noether,thm:two-noether,thm:discrete-noether,thm:reachable}). And for composition the relevant
fact is the existence of fibre products and quotients in $\Diff$ (\cref{thm:corr,thm:modular}). In each chapter the content is concentrated in one example whose quotient
is not a manifold: the torus of periods $\R/\fa\fb$, the prequantum bundle $(S^3\times S^3)/\R$, the parameter quotient
$\Theta/\GL_k$, the leaf space of the two-body system, the composite of non-transverse relations.

What these have in common is stated in \cref{ch:structure}. An objective on a quotient is a Lagrangian submanifold of the zero level of a moment map
(\cref{thm:lagrangian}); a dynamics on an atlas of the quotient is defined by a metric, whose exact part gives the conserved quantities and whose
non-closed part gives the phases (\cref{thm:metric-connection}); and the uses of a symmetry in optimisation are four positions with respect to
the quotient map (\cref{thm:positions}, \cref{sec:acceleration}). The part that uses no metric holds for every atlas in an $\infty$-topos and, for the
syntax of a theory, is the theory of normal forms (\cref{prop:atlas,thm:normal-forms}). In a differentially cohesive $\infty$-topos the atlas of
a quotient is the composite of the quotient by a formal group, in which the tangent directions, the connection and the conserved quantities
are located, and a formally \'etale map; the four positions hold there for every group object acting on a Riemannian manifold
(\cref{thm:dc-factorisation,thm:dc-positions}). The terms of an architecture are an initial algebra whose homomorphisms are the
denotation, the two modes of differentiation and the symmetries; they are realised by a compiler to JAX, with the positions as run-time
configurations of one optimizer (\cref{thm:compile,thm:ad,thm:sym-fold,thm:step}). Composites of the two modes are evaluated by plans of
least cost, and the Gauss--Newton direction is a section of the connection (\cref{thm:plans,prop:gn}).

\begin{figure}[t]
\centering
\begin{tikzpicture}[font=\small]
 \node[hcsnode,align=center] (a) at (0,0) {closed $2$-form\\ $\omega\colon X\to\Omcl$};
 \node[hcsnode,align=center] (b) at (4.9,0) {prequantisation\\ $\nabla\colon X\to\BTc$};
 \node[hcsnodeb,align=center] (c) at (10.0,0) {equivariant $(Y,\lambda)$\\ $\mu=\hat y^*\lambda$ \ (A)};
 \node[hcsnodeb,align=center] (d) at (10.0,-1.9) {$\mu=0$:\\ $X\hquot G\to\BTc$ \ (B)};
 \node[hcsnoder,align=center] (e) at (4.9,-1.9) {principal on $\mu^{-1}(0)$:\\ $(X_0,\omega_0,Y_0,\lambda_0)$ \ (C)};
 \node[hcsnoder,align=center] (f) at (0,-1.9) {compose, reduce\\ in stages};
 \draw[->] (a)--node[above,font=\scriptsize]{periods in $P$}(b);
 \draw[->] (b)--node[above,font=\scriptsize]{lift of $G$}(c);
 \draw[->] (c)--node[right,font=\scriptsize]{level set}(d);
 \draw[->] (d)--(e);
 \draw[->] (e)--(f);
\end{tikzpicture}
\caption{The sequence of structures of Part~II and the three theorems.}\label{fig:summary}
\end{figure}

\section{Open questions}

\begin{enumerate}[label=\arabic*.]
\item \emph{Prequantisation of non-simply-connected spaces.} \Cref{thm:integration2} assumes $\pi_1(X)=0$, and the general case is left open in
\IZ{art.~8.42}. \Cref{thm:heis-prequantum} is an example with $\pi_1=\Z^{2d}$. Determine the set of lifts of $\omega\colon X\to\Omcl$ to $\BTc$ for a
diffeological space $X$ in terms of $P_\omega$, the toric periods and $\Hom(\pi_1(X),T_P)$.
\item \emph{Quantisation without line bundles.} By \cref{prop:characters} a torus of periods with dense $P$ has no unitary character. Which
representations of $T_P$ on diffeological vector spaces produce a space of sections of a prequantum $T_P$-bundle on which $\Aut(Y,\lambda)$ acts
and which for cyclic $P$ is the classical prequantum Hilbert space?
\item \emph{Symplectic spaces that are not homogeneous.} Transitivity of $\Dif(X,\omega)$ is required in \cref{def:symplectic} and fails for the cone
orbifold. Formulate non-degeneracy for orbifolds and quasifolds so that the reduced spaces of \cref{cor:orbifold-reduction} satisfy it.
\item \emph{Shifted structures.} The pair $(Z\hquot G,\omega|_Z)$ of \cref{thm:stack-reduction} is a stack with a closed $2$-form. Compare it with the
$0$-shifted symplectic structure on the corresponding derived quotient, and extend \cref{thm:A,thm:B} to bundle gerbes with connection and
closed $3$-forms.
\item \emph{Theta functions for real multiplication.} The pairing $e_n$ of \cref{thm:heis-prequantum} has values in $\OK/n$. Construct the
representation of the group $G_n$ that corresponds to the space of theta functions of level $n$, and relate it to the real multiplication
programme of \cite{Manin}.
\item \emph{Stochastic dynamics.} \Cref{thm:two-noether}(c) gives the drift of the gradient-flow invariants for full-batch descent. Compute
the stationary distribution of $Q$ under stochastic gradient descent in terms of the covariance of the gradient noise restricted to the
directions $A\nabla L$.
\item \emph{Diophantine controllability.} For the system of \cref{thm:beanie} the cost of approximate control is governed by the continued
fraction of the inertia ratio. Classify the mechanical systems with flat mechanical connection whose leaf space is a quasifold, and bound
the control cost by the Diophantine type of the holonomy group.
\item \emph{Metrics on tangent stacks.} In \cref{thm:dc-positions} the parameter space is a Riemannian manifold, and the cometric of
\cref{thm:positions}(a) is defined on $\Theta\times_XTX$ for a locally free action. Define it for the complex $\fg\times\Theta\to T\Theta$ of \cref{prop:dc-relative} when the rank of the
infinitesimal action varies and when $\Theta$ is a microlinear object in place of a manifold, prove the statement of Kempf and Ness for the level
set $Q^{-1}(0)$ in that generality, and determine which syntactic sites have an object $D$ that satisfies \textup{(DC2)}, so that the quantitative
statements of \cref{sec:acceleration} have analogues for inductive theories.
\item \emph{Programs with recursion and higher order.} The signature of \cref{def:signature} is first-order and has no iteration. Extend
\cref{thm:sym-fold,thm:step} to terms with weight sharing, iteration and recursion, where a parameter block occurs several times and the
symmetry group of a composite is smaller than the product of those of its factors, and to the higher-order language of
\cite{HuotStatonVakar}, with $2$-cells in the gluing construction.
\end{enumerate}

\section{Formalisation}

The statements of this volume fall into the three strata of \VolI{Chapter~14}, by the infrastructure required (\cref{tab:formal2}). Stratum
A requires sets, plots, real analysis and linear algebra. Stratum B requires sheaves and stacks on the site of Cartesian spaces. Stratum C
requires the $\infty$-topos $\Hh$, and in practice the cohesive homotopy type theory of \cite{Shulman}, in which the homotopy quotient and the
classifying types are primitive; \cref{sec:dc} requires in addition a modality $\Im$ with the properties of \cref{def:dc}, and the theory of
formally \'etale maps for a modality is developed in homotopy type theory in \cite{CherubiniRijke}.

\begin{table}[h]\centering\small
\begin{tabular}{@{}p{1.6cm}p{4.3cm}p{7.2cm}@{}}\toprule
stratum & requires & statements\\\midrule
A & plots, forms, linear algebra & \cref{lem:slices,prop:forms-quasitori,thm:exact,prop:dual-torus}; \cref{thm:A,thm:reduction,thm:stages};
\cref{thm:symp-rigidity,thm:steinitz,thm:heis-prequantum}; \cref{thm:theta,thm:isotropic,thm:gso}; \cref{thm:two-noether,thm:balanced,thm:discrete-noether};
\cref{prop:rate,prop:induced,prop:weight-decay,prop:horizontal}; \cref{thm:beanie,thm:lagrel,thm:pH,thm:modular};
\cref{thm:lagrangian,thm:metric-connection,thm:positions,prop:folds,thm:normal-forms}; \cref{thm:compile,thm:ad,thm:sym-fold,thm:step,thm:plans,prop:gn}\\
B & sheaves, stacks on $\Cart$ & \cref{prop:slice,prop:basic,prop:BTconn,thm:KS,thm:corr}\\
C & $\Hh$, homotopy quotients, the modality $\Im$ & \cref{thm:B,thm:stack-reduction,prop:atlas}; the shape statement of \cref{thm:S2S2};
\cref{lem:dc,prop:dc-atlas,thm:dc-factorisation,prop:dc-relative,thm:dc-positions,prop:dc-conserved,prop:dc-sections}\\\bottomrule
\end{tabular}
\caption{Strata for formalisation. The quoted theorems that would be assumed or formalised separately are \cref{thm:K,thm:moment,thm:homogeneous,thm:coadjoint}
from \cite{IZ}, \cref{thm:integration2,thm:KW,thm:galois-logic}, Steinitz's theorem, and the theorem of Richardson and Slodowy.}\label{tab:formal2}
\end{table}

Most of the volume lies in stratum A: \cref{thm:A,thm:reduction} are statements about plots and forms whose proofs are finite computations
with \cref{lem:slices}, and the application chapters are linear algebra over $\R$, over number rings and over finite fields. The
numerical claims of the examples are reproduced by \texttt{checks.py}, and the measurements of \cref{ch:programs} by the test-suite of the package \texttt{dprog}. In a
proof assistant the terms of \cref{def:signature} are an inductive type and the four folds are definitions by recursion, so that
\cref{thm:compile,thm:ad} are statements about a recursor and the compiler is a target of extraction.


\appendix

\chapter{A dictionary}\label{ch:dictionary}

In the first table the vocabulary of Chapters~7--9 of \cite{IZ} is set beside the categorical vocabulary used here; the book is cited by
article in the left column. Notation is listed in the second table.

{\small
\begin{longtable}{@{}p{4.9cm}p{5.6cm}p{2.9cm}@{}}
\toprule
\cite{IZ} & here & where\\\midrule\endhead
closed $2$-form (9.1) & map $X\to\Omcl$; object of $\SmSet/\Omcl$ & \cref{prop:slice}\\
$\Dif(X,\omega)$ (9.14) & automorphism group in the slice & \cref{prop:slice}\\
chain-homotopy operator $K$ (6.83) & transgression to $\Paths(X)$ & \cref{thm:K}\\
momenta $\Gs$ (7.12) & left-invariant maps $G\to\Om^1$ & \cref{def:momenta}\\
paths moment map $\Psi$ (9.1) & transgression of $\omega$ along $G\times[0,1]\to X$ & \cref{thm:paths-moment}\\
holonomy $\Gamma$ (9.7) & obstruction to a $\Gs$-valued moment map & \cref{thm:moment}\\
moment map, exact case (9.11) & component along $G$ of $a^*\alpha-\pr^*\alpha$ & \cref{prop:basic}\\
Souriau cocycle $\theta$ (9.10) & coadjoint action of the prequantum extension & \cref{ex:heis-extension}\\
$(\Gamma,\theta)$-coadjoint orbit (7.16, 9.18) & coimage of the affine orbit map & \cref{rem:coimage}\\
homogeneous symplectic space (9.19) & $\mu_\omega$ injective, $\Dif(X,\omega)$ transitive & \cref{def:symplectic}\\
torus $T=\R/\Gamma$, form $\theta$ (8.37) & torus of periods $T_P$ & \cref{def:connection}\\
connection form on a $T$-bundle (8.37) & map $X\to\BTc$ & \cref{prop:BTconn}\\
integration bundle (8.42) & lift of $\omega$ through $F\colon\BTc\to\Omcl$ & \cref{thm:integration2}\\
symplectic irrational torus (9.30) & $(T_\Gamma,\omega_\Omega)$; $X_{\fa,\fb}$ & \cref{thm:steinitz}\\
--- & equivariant prequantisation; $\mu=\hat y^*\lambda$ & \cref{thm:A}\\
--- & descent to $X\hquot G$ & \cref{thm:B}\\
--- & reduced space and bundle & \cref{thm:reduction}\\
\bottomrule
\end{longtable}}

\section*{Notation}

{\small
\begin{longtable}{@{}p{3.4cm}p{10.0cm}@{}}
\toprule
symbol & meaning\\\midrule\endhead
$\Diff$, $\SmSet$, $\Hh$ & diffeological spaces, sheaves on $\Cart$, smooth $\infty$-groupoids\\
$\Om^k$, $\Omcl$ & sheaf of $k$-forms; sheaf of closed $2$-forms\\
$\ParaSymp$, $\cat{Corr}$ & parasymplectic spaces with form-preserving maps; with isotropic correspondences\\
$X\times_\omega X'$, $\boxplus$, $\overline X$ & product over $\Omcl$; monoidal sum; opposite form\\
$\Gs$, $\Ad_*$ & momenta of $G$; coadjoint action\\
$\Psi$, $\psi$, $\mu$, $\theta$, $\sigma$ & paths, two-points and one-point moment maps; Souriau cocycle and class\\
$T_P=\R/P$, $\theta$ & torus of periods and its canonical $1$-form\\
$\BTc$, $F$ & stack of $T_P$-bundles with connection; curvature map\\
$(Y,\lambda)$, $\Aut(Y,\lambda)$ & prequantum bundle; its automorphism group\\
$\hat x$, $\hat y$, $\hat p$ & orbit maps of a point of $X$, of $Y$, of a path\\
$X\hquot G$, $X/G$ & homotopy quotient in $\Hh$; diffeological quotient\\
$Z$, $X_0$, $Y_0$ & zero level of $\mu$; reduced space; reduced bundle\\
$T_\Gamma$, $\omega_\Omega$ & quasi-torus $\R^n/\Gamma$; the form induced by a constant form $\Omega$\\
$X_{\fa,\fb}$, $\Heis_B$, $N_{\fa,\fb}$ & $\R/\fa\times\R/\fb$; Heisenberg group; its arithmetic subgroup\\
$\Lam^{\#}$, $e$, $e_N$ & symplectic dual lattice; commutator pairing; Weil pairing\\
$b_i^*$, $J$, $R_n$ & Gram--Schmidt vectors; antidiagonal symplectic matrix; reversal matrix\\
$\fk$, $\fpp$, $Q_A$, $\mu_A$ & antisymmetric and symmetric parts of $\fg$; gradient-flow invariant; momentum\\
$a_A$, $C_\theta$ & the $1$-form $\langle A\theta,\dd\theta\rangle$; the cometric induced on the quotient from a point of the fibre\\
$\Re$, $\Im$, $\&$; $D$, $T$ & reduction, infinitesimal shape and infinitesimal flat modalities; first-order infinitesimals; tangent functor $[D,-]$\\
$\hat X$, $\hat G$, $a$, $H$ & formal completion of a quotient along its atlas; formal group of $G$; infinitesimal action; its orthogonal complement\\
$W$, $F$, $\mathrm{nf}$ & terms of a signature; free algebra of a theory; a choice of normal forms\\
$\sem t$, $\sem t^*$, $G_t$, $U_c$ & denotation of a term; transposed tangent map; symmetries read off the term; step in the configuration $c$\\
\VolI{\dots}, \IZ{\dots} & references to Volume~I \cite{DHC} and to \cite{IZ}\\
\bottomrule
\end{longtable}}


\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{DHC} \emph{Diffeology in Higher Categories: concrete sheaves, cohesive shape, and stacks behind Iglesias-Zemmour's Diffeology}, Volume~I of this series, Higher Categorical Semantics, 2026.

\bibitem{AbrahamMarsden} R. Abraham and J. E. Marsden, \emph{Foundations of Mechanics}, 2nd ed., Benjamin/Cummings, 1978.

\bibitem{Absil} P.-A. Absil, R. Mahony and R. Sepulchre, \emph{Optimization Algorithms on Matrix Manifolds}, Princeton University Press, 2008.

\bibitem{Andreoli} J.-M. Andreoli, Logic programming with focusing proofs in linear logic, \emph{J. Logic Comput.} 2 (1992), 297--347.

\bibitem{Arora} S. Arora, N. Cohen and E. Hazan, On the optimization of deep networks: implicit acceleration by overparameterization, \emph{Proc. ICML} 2018, PMLR 80, 244--253.

\bibitem{AwodeyForssell} S. Awodey and H. Forssell, First-order logical duality, \emph{Ann. Pure Appl. Logic} 164 (2013), 319--348.

\bibitem{LayerNorm} J. L. Ba, J. R. Kiros and G. E. Hinton, Layer normalization, arXiv:1607.06450.

\bibitem{BaezFong} J. C. Baez and B. Fong, A compositional framework for passive linear networks, \emph{Theory Appl. Categ.} 33 (2018), 1158--1222.

\bibitem{Baydin} A. G. Baydin, B. A. Pearlmutter, D. Syme, F. Wood and P. Torr, Gradients without backpropagation, arXiv:2202.08587.

\bibitem{BengioSTE} Y. Bengio, N. L\'eonard and A. Courville, Estimating or propagating gradients through stochastic neurons for conditional computation, arXiv:1308.3432.

\bibitem{BergerSchwichtenberg} U. Berger and H. Schwichtenberg, An inverse of the evaluation functional for typed $\lambda$-calculus, in \emph{Proc. LICS} 1991, IEEE, 203--211.

\bibitem{BerwickEvansLerman} D. Berwick-Evans and E. Lerman, Lie 2-algebras of vector fields, \emph{Pacific J. Math.} 309 (2020), no.~1, doi:10.2140/pjm.2020.309.1; arXiv:1609.03944.

\bibitem{JAX} J. Bradbury, R. Frostig, P. Hawkins, M. J. Johnson, C. Leary, D. Maclaurin, G. Necula, A. Paszke, J. VanderPlas, S. Wanderman-Milne and Q. Zhang, \emph{JAX: composable transformations of Python+NumPy programs}, software; version 0.12.1 is used here.

\bibitem{ButzMoerdijk} C. Butz and I. Moerdijk, Representing topoi by topological groupoids, \emph{J. Pure Appl. Algebra} 130 (1998), 223--235.

\bibitem{Caramello} O. Caramello, \emph{Theories, Sites, Toposes}, Oxford University Press, 2017.

\bibitem{CastryckDecru} W. Castryck and T. Decru, An efficient key recovery attack on SIDH, in \emph{EUROCRYPT 2023}, LNCS 14008, Springer, 2023, 423--447.

\bibitem{CSIDH} W. Castryck, T. Lange, C. Martindale, L. Panny and J. Renes, CSIDH: an efficient post-quantum commutative group action, in \emph{ASIACRYPT 2018}, LNCS 11274, Springer, 2018, 395--427.

\bibitem{Cervera} J. Cervera, A. J. van der Schaft and A. Ba\~nos, Interconnection of port-Hamiltonian systems and composition of Dirac structures, \emph{Automatica} 43 (2007), 212--225.

\bibitem{CherubiniRijke} F. Cherubini and E. Rijke, Modal descent, \emph{Math. Structures Comput. Sci.} 31 (2021), 363--391; arXiv:2003.09713.

\bibitem{RDC} R. Cockett, G. Cruttwell, J. Gallagher, J.-S. P. Lemay, B. MacAdam, G. Plotkin and D. Pronk, Reverse derivative categories, arXiv:1910.07065.

\bibitem{Cooper} G. J. Cooper, Stability of Runge--Kutta methods for trajectory problems, \emph{IMA J. Numer. Anal.} 7 (1987), 1--13.

\bibitem{Cruttwell} G. S. H. Cruttwell, B. Gavranovi\'c, N. Ghani, P. Wilson and F. Zanasi, Categorical foundations of gradient-based learning, arXiv:2103.01931.

\bibitem{DuHuLee} S. S. Du, W. Hu and J. D. Lee, Algorithmic regularization in learning deep homogeneous models: layers are automatically balanced, in \emph{Advances in Neural Information Processing Systems} 31 (2018).

\bibitem{Dubuc79} E. J. Dubuc, Sur les mod\`eles de la g\'eom\'etrie diff\'erentielle synth\'etique, \emph{Cahiers Topologie G\'eom. Diff\'erentielle} 20 (1979), 231--279; numdam:CTGDC\_1979\_\_20\_3\_231\_0.

\bibitem{Elliott} C. Elliott, The simple essence of automatic differentiation, arXiv:1804.00746.

\bibitem{FRS2} D. Fiorenza, C. L. Rogers and U. Schreiber, $L_\infty$-algebras of local observables from higher prequantum bundles, \emph{Homology Homotopy Appl.} 16 (2014), 107--142.

\bibitem{FRS1} D. Fiorenza, C. L. Rogers and U. Schreiber, Higher $U(1)$-gerbe connections in geometric prequantization, \emph{Rev. Math. Phys.} 28 (2016), 1650012.

\bibitem{FongSpivakTuyeras} B. Fong, D. I. Spivak and R. Tuy\'eras, Backprop as functor: a compositional perspective on supervised learning, arXiv:1711.10455.

\bibitem{Falcon} P.-A. Fouque, J. Hoffstein, P. Kirchner, V. Lyubashevsky, T. Pornin, T. Prest, T. Ricosset, G. Seiler, W. Whyte and Z. Zhang, \emph{Falcon: Fast-Fourier lattice-based compact signatures over NTRU}, specification v1.2, submission to the NIST post-quantum cryptography standardisation process, 2020.

\bibitem{GaitsgoryRozenblyum} D. Gaitsgory and N. Rozenblyum, \emph{A Study in Derived Algebraic Geometry, Volume II: Deformations, Lie Theory and Formal Geometry}, Mathematical Surveys and Monographs 221, American Mathematical Society, 2017.

\bibitem{GHN} N. Gama, N. Howgrave-Graham and P. Q. Nguyen, Symplectic lattice reduction and NTRU, in \emph{EUROCRYPT 2006}, LNCS 4004, Springer, 2006, 233--253.

\bibitem{Greydanus} S. Greydanus, M. Dzamba and J. Yosinski, Hamiltonian neural networks, in \emph{Advances in Neural Information Processing Systems} 32 (2019).

\bibitem{GriewankWalther} A. Griewank and A. Walther, \emph{Evaluating Derivatives: Principles and Techniques of Algorithmic Differentiation}, 2nd ed., SIAM, 2008.

\bibitem{GuilleminSternberg} V. Guillemin and S. Sternberg, Some problems in integral geometry and some related problems in micro-local analysis, \emph{Amer. J. Math.} 101 (1979), 915--955.

\bibitem{HardyWright} G. H. Hardy and E. M. Wright, \emph{An Introduction to the Theory of Numbers}, 6th ed., Oxford University Press, 2008.

\bibitem{LoRAplus} S. Hayou, N. Ghosh and B. Yu, LoRA+: efficient low rank adaptation of large models, in \emph{Proc. ICML} 2024.

\bibitem{ResNet} K. He, X. Zhang, S. Ren and J. Sun, Deep residual learning for image recognition, arXiv:1512.03385.

\bibitem{AdamP} B. Heo, S. Chun, S. J. Oh, D. Han, S. Yun, G. Kim, Y. Uh and J.-W. Ha, AdamP: slowing down the slowdown for momentum optimizers on scale-invariant weights, in \emph{Proc. ICLR} 2021.

\bibitem{Hepworth} R. Hepworth, Vector fields and flows on differentiable stacks, \emph{Theory Appl. Categ.} 22 (2009), 542--587; arXiv:0810.0979.

\bibitem{HintonSalakhutdinov} G. E. Hinton and R. R. Salakhutdinov, Reducing the dimensionality of data with neural networks, \emph{Science} 313 (2006), 504--507; doi:10.1126/science.1127647.

\bibitem{HuotStatonVakar} M. Huot, S. Staton and M. V\'ak\'ar, Correctness of automatic differentiation via diffeologies and categorical gluing, arXiv:2001.02209.

\bibitem{IZred} P. Iglesias-Zemmour, Example of singular reduction in symplectic diffeology, \emph{Proc. Amer. Math. Soc.} 144 (2016), 1309--1324.

\bibitem{IZmoment} P. Iglesias-Zemmour, The moment maps in diffeology, \emph{Mem. Amer. Math. Soc.} 207 (2010), no.~972.

\bibitem{BatchNorm} S. Ioffe and C. Szegedy, Batch normalization: accelerating deep network training by reducing internal covariate shift, arXiv:1502.03167.

\bibitem{JeffreysLau} G. Jeffreys and S.-C. Lau, K\"ahler geometry of quiver varieties and machine learning, preprint.

\bibitem{JoyalTierney} A. Joyal and M. Tierney, An extension of the Galois theory of Grothendieck, \emph{Mem. Amer. Math. Soc.} 51 (1984), no.~309.

\bibitem{KarshonWatts} Y. Karshon and J. Watts, Basic forms and orbit spaces: a diffeological approach, \emph{SIGMA} 12 (2016), 026.

\bibitem{KempfNess} G. Kempf and L. Ness, The length of vectors in representation spaces, in \emph{Algebraic Geometry (Copenhagen 1978)}, Lecture Notes in Math. 732, Springer, 1979, 233--243.

\bibitem{KhavkineSchreiber} I. Khavkine and U. Schreiber, Synthetic geometry of differential equations: I. Jets and comonad structure, arXiv:1701.06238.

\bibitem{KlajborGoderich} S. Klajbor-Goderich, Nonlinear stability of relative equilibria and isomorphic vector fields, \emph{SIGMA} 14 (2018), 021; arXiv:1707.02828.

\bibitem{Kock} A. Kock, \emph{Synthetic Differential Geometry}, 2nd ed., London Mathematical Society Lecture Note Series 333, Cambridge University Press, 2006; doi:10.1017/CBO9780511550812.

\bibitem{Kostant} B. Kostant, Quantization and unitary representations, in \emph{Lectures in Modern Analysis and Applications III}, Lecture Notes in Math. 170, Springer, 1970, 87--208.

\bibitem{Kunin} D. Kunin, J. Sagastuy-Brena, S. Ganguli, D. L. K. Yamins and H. Tanaka, Neural mechanics: symmetry and broken conservation laws in deep learning dynamics, in \emph{Proc. ICLR} 2021.

\bibitem{vanLaarhoven} T. van Laarhoven, L2 regularization versus batch and weight normalization, preprint, arXiv:1706.05350.

\bibitem{LeCun98} Y. LeCun, L. Bottou, Y. Bengio and P. Haffner, Gradient-based learning applied to document recognition, \emph{Proc. IEEE} 86 (1998), 2278--2324.

\bibitem{Lillicrap} T. P. Lillicrap, D. Cownden, D. B. Tweed and C. J. Akerman, Random feedback weights support learning in deep neural networks, arXiv:1411.0247.

\bibitem{LindseyMenon} K. Lindsey and G. Menon, Regularization implies balancedness in the deep linear network, preprint, arXiv:2511.01137.

\bibitem{LopezEscobar} E. G. K. Lopez-Escobar, An interpolation theorem for denumerably long formulas, \emph{Fund. Math.} 57 (1965), 253--272.

\bibitem{HTT} J. Lurie, \emph{Higher Topos Theory}, Annals of Mathematics Studies 170, Princeton University Press, 2009.

\bibitem{MainoMartindale} L. Maino, C. Martindale, L. Panny, G. Pope and B. Wesolowski, A direct key recovery attack on SIDH, in \emph{EUROCRYPT 2023}, LNCS 14008, Springer, 2023, 448--471.

\bibitem{Manin} Yu. I. Manin, Real multiplication and noncommutative geometry, in \emph{The Legacy of Niels Henrik Abel}, Springer, 2004, 685--727.

\bibitem{Marcotte} S. Marcotte, R. Gribonval and G. Peyr\'e, Abide by the law and follow the flow: conservation laws for gradient flows, in \emph{Advances in Neural Information Processing Systems} 36 (2023); arXiv:2307.00144.

\bibitem{MarsdenWeinstein} J. E. Marsden and A. Weinstein, Reduction of symplectic manifolds with symmetry, \emph{Rep. Math. Phys.} 5 (1974), 121--130.

\bibitem{MMR} J. E. Marsden, R. Montgomery and T. Ratiu, Reduction, symmetry, and phases in mechanics, \emph{Mem. Amer. Math. Soc.} 88 (1990), no.~436.

\bibitem{Martens} J. Martens, Deep learning via Hessian-free optimization, in \emph{Proceedings of the 27th International Conference on Machine Learning}, 2010.

\bibitem{Milnor} J. Milnor, \emph{Introduction to Algebraic K-Theory}, Annals of Mathematics Studies 72, Princeton University Press, 1971.

\bibitem{Montgomery} R. Montgomery, Gauge theory of the falling cat, in \emph{Dynamics and Control of Mechanical Systems}, Fields Inst. Commun. 1, Amer. Math. Soc., 1993, 193--218.

\bibitem{Mumford} D. Mumford, On the equations defining abelian varieties I, \emph{Invent. Math.} 1 (1966), 287--354.

\bibitem{Naumann} U. Naumann, Optimal Jacobian accumulation is NP-complete, \emph{Math. Program.} 112 (2008), 427--441; doi:10.1007/s10107-006-0042-z.

\bibitem{Pearlmutter} B. A. Pearlmutter, Fast exact multiplication by the Hessian, \emph{Neural Comput.} 6 (1994), 147--160.

\bibitem{Pitts} A. M. Pitts, \emph{Nominal Sets: Names and Symmetry in Computer Science}, Cambridge University Press, 2013.

\bibitem{RichardsonSlodowy} R. W. Richardson and P. J. Slodowy, Minimum vectors for real reductive algebraic groups, \emph{J. London Math. Soc.} 42 (1990), 409--429.

\bibitem{Robert} D. Robert, Breaking SIDH in polynomial time, in \emph{EUROCRYPT 2023}, LNCS 14008, Springer, 2023, 472--503.

\bibitem{vdSJ} A. van der Schaft and D. Jeltsema, Port-Hamiltonian systems theory: an introductory overview, \emph{Found. Trends Syst. Control} 1 (2014), 173--378.

\bibitem{Schreiber} U. Schreiber, Differential cohomology in a cohesive $\infty$-topos, arXiv:1310.7930.

\bibitem{ShapereWilczek} A. Shapere and F. Wilczek, Geometry of self-propulsion at low Reynolds number, \emph{J. Fluid Mech.} 198 (1989), 557--585.

\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, \emph{Structure des syst\`emes dynamiques}, Dunod, Paris, 1970.

\bibitem{TongMaChi} T. Tong, C. Ma and Y. Chi, Accelerating ill-conditioned low-rank matrix estimation via scaled gradient descent, \emph{J. Mach. Learn. Res.} 22 (2021), no.~150.

\bibitem{Vaswani} A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, {\L}. Kaiser and I. Polosukhin, Attention is all you need, arXiv:1706.03762.

\bibitem{Weinstein} A. Weinstein, The symplectic ``category'', in \emph{Differential Geometric Methods in Mathematical Physics}, Lecture Notes in Math. 905, Springer, 1982, 45--51.

\bibitem{egg} M. Willsey, C. Nandi, Y. R. Wang, O. Flatt, Z. Tatlock and P. Panchekha, egg: fast and extensible equality saturation, \emph{Proc. ACM Program. Lang.} 5 (2021), POPL, article 23.

\bibitem{ZhaoFlat} B. Zhao, I. Ganev, R. Walters, R. Yu and N. Dehmamy, Symmetries, flat minima, and the conserved quantities of gradient flow, in \emph{Proc. ICLR} 2023, arXiv:2210.17216.

\bibitem{ZhaoTeleport} B. Zhao, N. Dehmamy, R. Walters and R. Yu, Symmetry teleportation for accelerated optimization, in \emph{Advances in Neural Information Processing Systems} 35 (2022).

\bibitem{ZhaoSurvey} B. Zhao, R. Walters and R. Yu, Symmetry in neural network parameter spaces, preprint, arXiv:2506.13018.

\end{thebibliography}


\end{document}

End of manuscript · Back to top ↑