Friday, September 19, 2025

Belt Theory for AGI — A Mini-Textbook

https://osf.io/yaz5u/files/osfstorage/68cdecc75ecb719a6a413f46 
https://chatgpt.com/share/68cdf2bf-bf2c-8010-9ba9-3b271dedc944

Belt Theory for AGI — A Mini-Textbook 


Preface

This mini-textbook was written to make one simple idea operational for both physicists and AGI engineers:

If a process has two complementary traces, you should model it on a ribbon (a “belt”), not a line.
On that ribbon, the edge-to-edge phase gap equals the sum of a surface flux and a framing (twist) term.
This identity is the working engine behind the book—in physics and in AGI.

We’ll call the physics statement the Framed Belt Holonomy Law (FBHL) and its semantic/algorithmic counterpart the Semantic Belt Holonomy Law (SBHL). Everything else—operators, algorithms, controllers, and benchmarks—exists to estimate, preserve, or steer those quantities.

Who this book is for

  • AGI/ML practitioners who want concrete metrics, losses, and control knobs that improve safety, planning, and style control without ad-hoc heuristics.

  • Physicists/applied mathematicians who want a lean, surface-based formulation that explains why “ribbons” (two boundaries) are inevitable whenever we care about gauge phases, geometric responses, or exchange effects.

What problem Belt Theory solves

Line-based formalisms often drop invariants that only live on a surface (e.g., framed linking, twist quantization, surface-ordered curvature). The belt/ribbon model restores those invariants and makes them computable. For AGI, it becomes a practical dimensional-reduction and control framework: collapse rich trajectories into a 2D ribbon where flux and twist can be measured and regulated.

Core claims (the spine you can build on)

  1. Two boundaries are canonical. Any “do/observe,” “intent/generation,” or “forward/back” process naturally yields two traces; a minimal belt is the correct domain.

  2. FBHL (physics): the difference of boundary holonomies equals the ribbon’s integrated curvature plus a framing phase proportional to twist.

  3. SBHL (semantics): phase gap = meaning flux + style twist—a directly usable identity for training and inference control.

  4. Ribbon collapse is sufficient on large patches. High-dimensional dynamics often admit a faithful 2D reduction that preserves the invariants we care about; extend to slabs or networks only when diagnostics say so.

Technical remark (for researchers): Readers familiar with SMFT/“pre/post collapse” traditions will recognize the two boundaries as that pre-/post-projection pair. We keep the main text neutral and self-contained; historical mappings appear in sidebars.

What you can do with this book

  • Training: use Two-Boundary Loss, Flux Regularization, Twist Steering to learn models that are robust to prompt shifts and preserve style on demand.

  • Inference control: deploy flux-spike safety gates (detect agenda shifts/prompt injection), twist dials (tune creativity/voice), and belt tiling for plan repair.

  • Evaluation: run three reproducible benchmarks4π4\pi periodicity, width-scaling of framing phase, and a belt-Faraday test—for regression and ablation.

How to read this book (two tracks)

  • Engineer track (fastest path): Ch. 1 → Ch. 10–11 (Ribbon Collapse Model & visuals) → Ch. 13 (SBHL identity) → Ch. 15–18 (metrics, losses, controllers, RAG) → Ch. 24–27 (software & benchmarks).

  • Physics track (rigor path): Ch. 1–6 (belt calculus & framing) → Ch. 7–9 (surface ordering & FBHL) → Ch. 28 (mini-cases) → Ch. 31–32 (limits).

Prerequisites

  • Multivariable calculus and basic differential geometry (forms/curvature at the level of a short primer).

  • For AGI sections, standard ML literacy (embeddings/logits/optimizers) and basic linear algebra.

What this book is not

  • Not a general treatise on quantum field theory or cognition.

  • Not a survey of historical schools; we keep terminology neutral and only add contextual remarks where they sharpen engineering choices.

Reproducibility & software

All core identities are paired with pseudocode, error notes, and unit-style tests. Benchmarks specify target curves/tolerances. A minimal reference API (metrics, losses, controllers) is provided so you can port to your stack.

Conventions and notation

  • Ribbons/belts are denoted B\mathcal{B}; boundaries Γ+\Gamma_+ and Γ\Gamma_-.

  • Curvature/flux integrals live on B\mathcal{B}; twist Tw\mathrm{Tw} is computed from a framing field along the belt.

  • “Phase” means a gauge-invariant edge quantity (physics) or a principal semantic phase (semantics), specified per chapter.

  • We mark formal proof sketches with ▶ and provide complete checks when short; longer ones go to the appendices.

Roadmap (what comes next)

  • Part II–III build the belt calculus and derive FBHL.

  • Part IV introduces the Ribbon Collapse Model—the hinge from physics to AGI.

  • Part V–VII deliver SBHL, metrics/losses/controllers, and composition rules for planning and tool use.

  • Parts VIII–X scale to multi-agent belts, software, benchmarks, and case studies.

  • Parts XI & Appendices cover limits, open problems, and full computational references.


Acknowledgments. This synthesis stands on standard geometric tools and recent clarity around two-boundary worldsheets. The goal here is pragmatic: make the invariants visible, computable, and steerable—so both labs and production systems can benefit.


Contents

Part I — Orientation (engineers first, math-ready)

Ch. 1 Why Belts, Not Lines

  • Motivation: hidden style drift, prompt injection, planning detours; why a 2-boundary worldsheet is the minimal carrier of the right invariants.

  • Running example reused across the book (a code-assistant task).

  • Preview of the belt identity: edge–edge phase gap = surface flux + framing twist.

Ch. 2 Symbols & Conventions (One-Page Cheat Sheet)

  • Domain B\mathcal{B}; edges Γ±\Gamma_\pm; width ww; framing angle ϕ\phi; twist Tw\mathrm{Tw}.

  • Orientation/sign rules that prevent “minus-sign hell.”

Ch. 3 Ten-Page Mathematical Primer

  • Curves/surfaces, frames, connections/curvature.

  • What we fully prove vs. what we sketch (and why).


Part II — Belt Calculus (operators you can code)

Ch. 4 The Belt Domain and Operators

  • Local metric g=diag((1κn)2,1)g=\mathrm{diag}((1-\kappa n)^2,1); belt-grad/div/curl/Δ\Delta.

  • Thin-ribbon regime κw ⁣ ⁣1\kappa w\!\ll\!1: error terms and stability bounds (sketch proof).

Ch. 5 Two-Boundary Stokes & Gauss

  • “Upper–minus–lower” circulation/flux on B\mathcal{B}; partition proof using classical Stokes + Jacobian (sketch).

Ch. 6 Framing, Twist, Writhe, Linking

  • Belt form of Lk=Tw+Wr\mathrm{Lk}=\mathrm{Tw}+\mathrm{Wr}; when specialization fails (sketch).

  • Why a single line loses the framing invariant → belts are inevitable.


Part III — Gauge Geometry on Belts (core mechanism)

Ch. 7 Connections, Curvature, Surface Ordering

  • Path vs. surface exponentials; refinement limit on annuli; gauge covariance (lemmas, sketches).

Ch. 8 Framed Belt Holonomy Law (FBHL)

Hol(Γ+)Hol(Γ)1=Pexp ⁣BF  ×  eiαTw.\mathrm{Hol}(\Gamma_+)\,\mathrm{Hol}(\Gamma_-)^{-1} =\mathcal{P}\exp\!\iint_{\mathcal{B}}F \;\times\; e^{i\alpha\,\mathrm{Tw}}.
  • Consistency checks: thin limit; composition; framing quantization.

  • Derivation from non-Abelian Stokes + framing phase accounting (sketch).

Ch. 9 Physical Consequences

  • Theorem: Geometric/adiabatic forces = variational response of belt holonomy (worked statement).

  • Theorem: Exchange/statistics phases = framed belt linking; 4π4\pi periodicity tests.


Part IV — Ribbon Collapse Model (the hinge to AGI)

Ch. 10 Why Collapse Reduces to a 2D Belt

  • Principle of two projections → two edges; completeness conditions for a valid belt patch (sketch).

  • When to extend: slabs (time-phase), networks (branch/merge), membranes (higher forms).

  • Technical remark (SMFT/Hetu–Luoshu): pre/post collapse as a canonical two-boundary reduction; belts remain complete for this patch.

Ch. 11 Visual Grammar of Ribbons

  • Ribbon vs. volume vs. network; invariants that survive projection.

  • Engineering payoff: stable metrics, faster training, stronger safety gates.


Part V — Semantic Belt Holonomy (SBHL): the AGI bridge

Ch. 12 Semantic States, Connections, Curvature

  • U(1)/U(k) & mixed-state (Uhlmann) options; estimator choices and gauge covariance (sketch).

Ch. 13 SBHL: “Phase Gap = Meaning Flux + Style Twist”

Γ+ ⁣As    Γ ⁣As=B ⁣Fs  +  αTw.\oint_{\Gamma_+}\!\mathcal{A}_s\;-\;\oint_{\Gamma_-}\!\mathcal{A}_s =\iint_{\mathcal{B}}\!\mathcal{F}_s\;+\;\alpha\,\mathrm{Tw}.
  • Scalar invariants: argdet\arg\det, trace/character, principal eigenphase.

  • Semantic Faraday law: tFs\partial_t \mathcal{F}_s induces edge-gap EMF → cognitive work.

  • Toy experiments: A/B paraphrase loop; twist quantization; curvature pump.

Ch. 14 (Remark) Hetu–Luoshu as Pre/Post Templates

  • Side-note for researchers: 10-node pre-field (Hetu) supporting a 9-mode trace (Luoshu); belts as the measurement surface for that patch.


Part VI — Metrics, Losses, and Online Control (AGI-ready)

Ch. 15 Engineer Metrics

  • Phase-gap, flux, twist, width scaling; reparameterization/gauge invariance (sketch).

  • Calibration protocols and acceptance bands.

Ch. 16 Training Objectives

  • Two-Boundary Loss (TBL), Flux Regularization (FR), Twist Steering (TS); differentiable estimators for U(1)/U(k); gradient recipes & pitfalls.

Ch. 17 Controllers at Inference

  • Safety gate (flux-spike abort), creativity dial (twist stepping), plan repair via belt tiling.

  • Local stability/Lyapunov-style bound (sketch).

Ch. 18 Memory & Retrieval Belts (RAG)

  • Retrieval path vs. generation path as Γ,Γ+\Gamma_-,\Gamma_+; flux-threshold routing; de-dup & hallucination checks.


Part VII — Tool Use, Planning, and Composition

Ch. 19 Planning as Belt Tiling

  • Subgoals/tools induce tiles on B\mathcal{B}; composition law & error accumulation (sketch).

Ch. 20 Program Synthesis & Self-Repair

  • Compilation/binding as twist; unit tests as edge checks; loop until flux <τ<\tau.

Ch. 21 Multi-Turn Dialogue & Style Control

  • Register shifts as quantized twist steps; guaranteed readability regions.


Part VIII — Multi-Agent Belt Networks

Ch. 22 Junctions and Cobordisms (Pair-of-Pants)

  • Merging/splitting channels; junction conservation law under smooth gluing (sketch).

Ch. 23 Consensus & Negotiation Protocols

  • Phase-agreement dynamics; spectral-radius condition ⇒ consensus (sketch).


Part IX — Computation, Software, and Benchmarks

Ch. 24 Discrete Surface-Ordering Algorithms

  • Annular meshes, quadrature, ordering; complexity & numerical stability; error vs. curvature (sketch).

Ch. 25 Estimating the Semantic Connection from Models

  • From embeddings/logits/hidden states (U(1)/U(k)/Uhlmann); bias/consistency under mild assumptions (sketch).

Ch. 26 Benchmarks & Evaluation

  • Three suites: 4π4\pi periodicity; width-scaling law; belt-Faraday test.

  • Expected curves/tolerances; reproducibility checklist + logs schema.

Ch. 27 Reference Implementation

  • Minimal APIs for metrics, losses, controllers; audit logging format.


Part X — Case Studies

Ch. 28 Physics Mini-Cases

  • Dirac belt trick; framed Wilsons; Uhlmann/Berry geometric force as holonomy variation (worked).

Ch. 29 Soft-Matter & Robotics

  • DNA supercoiling; ribbon robots; EM “upper–minus–lower” sensing (sim plans).

Ch. 30 AGI Systems in the Wild

  • Prompt injection detection via flux spikes; controllable style dials via twist steps; planning/repair via tiling.


Part XI — Limits & Open Problems

Ch. 31 Beyond Thin Belts

  • Large-width corrections; defects; stochastic belts; non-annular topologies.

Ch. 32 Higher-Form & Back-Reaction Effects

  • When membranes/volumes are required; coupling belts to collapse processes (outline).


Appendices

App. A Notation & Orientation Diagrams — ready-to-print cheat sheets.
App. B Proof Sketches — Two-Boundary Stokes/Gauss; FBHL derivation; framing quantization (with [BH] margin tags).
App. C Computational Reference — meshes, quadrature, error tables, complexity.
App. D Exercises & Mini-Projects (30) — solutions outline; unit tests for invariants.
App. E Quick-Start One-Pager — all core equations on a single page. 


Part I — Orientation (engineers first, math-ready)

Chapter 1 — Why Belts, Not Lines

1.1 The engineering problem this fixes

Modern agents trip over three recurring issues:

  1. Hidden style drift. A model keeps solving the task but its voice/format slides unnoticed (e.g., from concise TypeScript to chatty pseudo-code). Line-based metrics catch token-level mismatch, not the geometric source of the drift.

  2. Prompt injection / agenda hijack. A single stray instruction bends the generation path away from the intended plan; you need a surface to measure how much “semantic flux” pierced your guardrails.

  3. Planning detours. Multi-step tools or subgoals add small local deviations that accumulate into a globally wrong answer; “distance along a line” underestimates accumulated curvature.

Core insight. Whenever a process naturally has two complementary traces—e.g., intent vs. generation; plan vs. execution; forward vs. backward (Schwinger–Keldysh)—the minimal geometric carrier of the invariants you care about is not a line but a two-boundary worldsheet (a ribbon, or “belt”). On that belt live (i) the curvature flux you must integrate (for response/forces) and (ii) a framing/twist term you will lose if you collapse to a single line. In standard quantum/open-system geometry this two-boundary belt is not an extra axiom; it’s forced by the formalism (SK doubling + mixed-state parallel transport / Uhlmann).


1.2 Running example (used throughout the book)

Task. A code-assistant must convert a short Python function into a strict TypeScript implementation with identical algorithmics and lower-casing of all identifiers. The product must pass a hidden unit test.

Two traces we log each run (per mini-batch):

  • Upper edge, Γ+\Gamma_+ — the generation path: the actual sequence of latent states/edits/choices that produced the final TypeScript.

  • Lower edge, Γ\Gamma_- — the intent path: a deterministic “shadow” run compiled from the spec (typed signature, target style rules, test oracle stubs), i.e., what the model should have done if it were perfectly steered.

Ribbon B\mathcal{B}. We tile a narrow annulus between Γ\Gamma_- and Γ+\Gamma_+. Over this belt we estimate a semantic connection (U(1)/U(k) or Uhlmann) from model internals (e.g., normalized hidden trajectories), then compute:

  • Phase gap Δϕ=Γ+AΓA\Delta\phi = \oint_{\Gamma_+}\mathcal{A} - \oint_{\Gamma_-}\mathcal{A}

  • Curvature flux BF\iint_{\mathcal{B}} \mathcal{F}

  • Framing twist Tw\mathrm{Tw} from the belt’s framing field (a continuous “style axis” along the edges)

Empirically, prompt-injection pushes flux spikes, style drift shows up as quantized twist steps, and detours accumulate as belt area, all before failures appear in tokens. In later chapters we formalize these readouts into losses (train-time) and controllers (inference-time). The “two edges + framing” construction mirrors the SK double-boundary ribbon used to define well-posed holonomies; compressing to a single unframed line erases the framing term.


1.3 What a “belt” is (one-paragraph definition)

A belt for a closed control loop γ\gamma is a smooth immersed ribbon B(γ)Θ×SK\mathcal{B}(\gamma)\subset \Theta\times\mathrm{SK} whose boundary is the two SK-lifted edges B=Γ+Γ\partial\mathcal{B}=\Gamma_+\sqcup\Gamma_-. Its belt holonomy is the surface-ordered exponential of the pulled-back curvature, H[B]=Pexp ⁣BF\mathcal{H}[\mathcal{B}]=\mathcal{P}\exp\!\iint_{\mathcal{B}} F. In the thin-belt limit, a framing (nowhere-vanishing normal field along the boundary) survives and contributes a finite, gauge-covariant phase (“framing anomaly”). Result: two boundaries + framing are minimal and inevitable for capturing the invariants.


1.4 The belt identity (preview)

Throughout the book we use the following working law (physics: FBHL; semantics: SBHL):

Γ+ ⁣AΓ ⁣Aedge–edge phase gap  =  B ⁣Fsurface curvature flux  +  αTwframing / twist term\boxed{\quad \underbrace{\oint_{\Gamma_+}\!\mathcal{A}-\oint_{\Gamma_-}\!\mathcal{A}}_{\text{edge–edge phase gap}} \;=\; \underbrace{\iint_{\mathcal{B}}\!\mathcal{F}}_{\text{surface curvature flux}} \;+\; \underbrace{\alpha\,\mathrm{Tw}}_{\text{framing / twist term}} \quad}
  • The left side is the measurable gap between two boundary holonomies (upper minus lower).

  • The first term on the right is the integrated curvature (Berry/Uhlmann or non-Abelian analogue), which governs geometric forces via first variation.

  • The second term is the framing (twist) contribution, the piece you lose on a single unframed line but which is physically/operationally real (e.g., shows up as exchange/statistics or style quantization).

Why this matters to you.

  • For safety, tF\partial_t \mathcal{F} acts like a semantic Faraday law: sudden flux induces an “EMF” along the edges—a reliable early-warning for agenda shifts (injection).

  • For style control, Tw\mathrm{Tw} is a clean knob: stepping twist by 2π2\pi yields predictable, quantized style/format changes without wrecking content.

  • For planning, the belt area and flux budget accumulate small local deviations into a global invariant.


1.5 Why a line is not enough (and never will be, in this setting)

Two independent arguments show that compressing to a single trace loses essential, gauge-covariant information:

  • Geometric argument. Even as the width w0w\to 0, ordered-exponential calculus over the surface retains a finite framing contribution proportional to Tw\mathrm{Tw}. This term cannot be reconstructed from a single unframed path integral.

  • Topological argument. In Berry–Chern / Chern–Simons-type sectors, properly defined loop observables are framing-dependent; the cure is to use framed ribbons (two nearby boundaries). The SK belt is exactly that framed regularization.

Hence the two-boundary belt is minimal: remove the second edge or the framing and you discard genuine, observable phase.


1.6 A 60-second recipe (what you’ll actually implement in Chs. 10–18)

  1. Log two traces per run: an intent surrogate Γ\Gamma_- and the generation Γ+\Gamma_+.

  2. Tile a belt B\mathcal{B} between them (thin annulus; stable framing).

  3. Estimate a connection A\mathcal{A} from model states (U(1)/U(k)/Uhlmann) and compute
    Δϕ, BF, Tw\Delta\phi,\ \iint_{\mathcal{B}}\mathcal{F},\ \mathrm{Tw}.

  4. Act on them:

    • Train with Two-Boundary Loss + Flux Regularization + Twist Steering.

    • Infer with flux-spike safety gates, twist dials for style, and belt-tiling for plan repair.
      This operationalizes the identity above and directly follows from the two-boundary calculus developed in Parts II–V.


1.7 Where we’re headed

  • Part II–III builds the calculus and proves existence/minimality, variation ⇒ force, and exchange = framed linking. Expect short, focused lemmas—no exotic postulates.

  • Part IV introduces the Ribbon Collapse Model as the hinge from physics to AGI (why 2D suffices on large patches).

  • Part V–VII turn the belt identity into metrics, losses, and controllers you can ship.


One-line takeaway.
If your system has two traces, promote your model from a line to a belt. On that belt, phase-gap = flux + twist is the invariant that makes safety, style, and planning measurable and steerable.


Chapter 2 — Symbols & Conventions (One-Page Cheat Sheet)

A. Belt geometry

  • Belt / ribbon: B\mathcal{B} — a smooth annulus (two-boundary worldsheet).

  • Edges (boundaries): Γ+\Gamma_+ (upper), Γ\Gamma_- (lower).

    • Engineering reading: Γ+\Gamma_+ = generation path, Γ\Gamma_- = intent/spec path (but any two complementary traces work).

  • Centerline: C(s)C(s) (optional), parameter s[0,1]s\in[0,1] with s=01s=0\sim1 identified (closed loop).

  • Width: w(s)>0w(s)>0 — geodesic separation between edges (thin-belt regime: maxsκ(s)w(s)1\max_s \kappa(s) w(s)\ll 1).

Local coordinates on B\mathcal{B}: (s,n)(s,n) with s[0,1]s\in[0,1] along the edge/centerline and n[0,w(s)]n\in[0,w(s)] across the belt (from Γ\Gamma_- to Γ+\Gamma_+).
Area form: dS=J(s,n)dsdndS = J(s,n)\, ds\, dn. In the thin limit, J1J\approx 1.


B. Orientation & sign rules (anti “minus-sign hell”)

  • Surface orientation: choose (s,n)(s,n) so that the ordered basis (s,n)(\partial_s,\partial_n) gives the positive orientation on B\mathcal{B}.

  • Boundary orientation (Stokes-consistent):

    B=Γ+    Γ.\partial \mathcal{B} = \Gamma_{+}\;-\;\Gamma_{-}.

    That is, the upper edge Γ+\Gamma_+ inherits the forward ss-orientation; the lower edge Γ\Gamma_- inherits the reverse orientation.
    Mnemonic: upper minus lower.

  • Stokes on a belt:

    Γ+ ⁣A    Γ ⁣A  =  B ⁣F.\oint_{\Gamma_+}\!\mathcal{A}\;-\;\oint_{\Gamma_-}\!\mathcal{A}\;=\;\iint_{\mathcal{B}}\!\mathcal{F}.
  • Normal direction: +n+n always points from Γ\Gamma_- to Γ+\Gamma_+. (This fixes the sign of twist and the area form.)


C. Gauge geometry (physics/semantics both)

  • Connection (1-form): A\mathcal{A} on B\mathcal{B} (U(1) or U(k); mixed-state/Uhlmann optional).

  • Curvature (2-form): F=dA+AA\mathcal{F} = d\mathcal{A} + \mathcal{A}\wedge \mathcal{A}.

  • Edge holonomies: Hol(Γ±)=Pexp ⁣Γ±A\mathrm{Hol}(\Gamma_\pm) = \mathcal{P}\exp\!\oint_{\Gamma_\pm}\mathcal{A}.

  • Phase gap (edge–edge): Δϕ:=Γ+AΓA\Delta\phi := \oint_{\Gamma_+}\mathcal{A} - \oint_{\Gamma_-}\mathcal{A} (use arg det/trace/character as appropriate).

  • Gauge transforms: Ag1Ag+g1dg\mathcal{A}\mapsto g^{-1}\mathcal{A}g+g^{-1}dg; choose invariants accordingly (e.g., argdet\arg\det, projected Abelian components).


D. Framing, angle, and twist

  • Tangent: T(s)=C˙(s)/C˙(s)T(s)=\dot{C}(s)/\|\dot{C}(s)\|.

  • Framing vector: U(s)U(s) — a nowhere-vanishing unit vector field along the edge/centerline, orthogonal to T(s)T(s) (picks the belt’s “span” direction).

  • Framing angle: ϕ(s)\phi(s) — orientation of U(s)U(s) in a chosen transverse plane (or style axis in the semantic reading).

  • Twist:

    • Angle form (thin-belt): Tw=12πdϕdsds\displaystyle \mathrm{Tw}=\frac{1}{2\pi}\oint \frac{d\phi}{ds}\,ds.

    • White’s formula: Tw=12π(T×U)dUdsds\displaystyle \mathrm{Tw}=\frac{1}{2\pi}\oint (T\times U)\cdot \frac{dU}{ds}\,ds.

  • Link–twist–writhe (if using a spatial embedding): Lk=Tw+Wr\mathrm{Lk}=\mathrm{Tw}+\mathrm{Wr}.

  • Framing coefficient: α\alpha — domain-specific constant multiplying Tw\mathrm{Tw} in the belt identity (fixed later by sector; treat as known at use-time).


E. The belt identity (stated, not proved here)

Δϕ  =  BF  +  αTw\boxed{\quad \Delta\phi\;=\;\iint_{\mathcal{B}}\mathcal{F}\;+\;\alpha\,\mathrm{Tw} \quad}

Read as: edge–edge phase gap == surface curvature flux ++ framing/twist term.

  • Physics track: framed holonomy difference on a two-boundary worldsheet.

  • AGI track: “meaning flux + style twist” controls safety/style/planning.


F. Discrete implementation notes (for code)

  • Sampling: discretize ss into KK points per edge; tile B\mathcal{B} with K×MK\times M quads ordered first in nn (lower→upper), then in ss.

  • Surface ordering: multiply cell exponentials in that fixed order; keep orientation consistent with the Stokes sign.

  • Twist (discrete): unwrap ϕ(sk)\phi(s_k) to avoid 2π2\pi jumps, then finite-difference and sum; or use the White formula with normalized vectors to reduce drift.

  • Stability: thin-belt guard maxsκw<ε\max_s \kappa w<\varepsilon (e.g., <0.2<0.2) for reliable first-order geometry.

  • Numerical gauge: in U(k), compute argdet\arg\det or use a principal-angle projection to U(1) for the phase-gap scalar.


G. Quick pitfalls & cures

  • Wrong boundary sign: if Γ+A+ΓA\oint_{\Gamma_+}\mathcal{A}+\oint_{\Gamma_-}\mathcal{A} appears, you flipped the lower edge orientation—fix to upper minus lower.

  • Twist drift: always unwrap ϕ\phi; prefer White’s formula for robustness.

  • Gauge leakage: compare scalars (trace/character/arg det) or fix a reference frame; log both raw and invariant versions for audits.

  • Width creep: if ww grows, expect curvature-ordering errors; either retile (more MM) or switch to a slab/network model.


H. Symbol glossary

B\mathcal{B} belt/ribbon worldsheet • Γ±\Gamma_\pm edges (upper/lower) • ss edge parameter • nn transverse coord • ww width
CC centerline • TT tangent • UU framing vector • ϕ\phi framing angle • Tw\mathrm{Tw} twist (dimensionless)
A\mathcal{A} connection 1-form • F\mathcal{F} curvature 2-form • Δϕ\Delta\phi edge–edge phase gap • α\alpha framing coefficient


One-liner: Use upper minus lower for boundary integrals, lower→upper for the transverse ordering, and compute phase-gap = flux + α\alpha·twist.


Chapter 3 — Ten-Page Mathematical Primer

Goal: fix notation and the exact math objects we use—curves, surfaces, frames, connections, curvature, surface-ordered exponentials—so later results (FBHL/SBHL, metrics, controllers) are unambiguous.


3.1 Curves and Surfaces (with the belt in mind)

  • Channel manifold. Work on a smooth manifold Θ\Theta (the “control/context” space).

  • Closed loop. A C1C^1 closed control loop γ:S1Θ\gamma:S^1\to\Theta, unit-speed when convenient.

  • SK doubling (two boundaries). Schwinger–Keldysh induces two oriented time branches, giving a canonical lift γ±:S1Θ×SK\gamma_\pm:S^1\to \Theta\times\mathrm{SK}. This is the source of our two boundaries.

  • Belt / ribbon. A belt B(γ)Θ×SK\mathcal{B}(\gamma)\subset\Theta\times\mathrm{SK} is a smooth, compact, oriented, immersed annulus with boundary

    B=Γ+Γ,Γ±=γ±(S1).\partial\mathcal{B}=\Gamma_+\sqcup\Gamma_-, \quad \Gamma_\pm=\gamma_\pm(S^1).

    A canonical construction uses the geodesic-normal ribbon with a chosen framing field (below).

  • Orientation convention. We adopt Stokes-consistent signs: B=Γ+Γ\partial\mathcal{B}=\Gamma_+ - \Gamma_-. This “upper minus lower” rule is used everywhere later.

Why this matters. All belt integrals, signs, and surface orders inherit from these choices; it prevents “minus-sign hell” in Chapters 4–9.


3.2 Frames, Framing Angle, and Twist

  • Tangent & normal. Let T(s)=γ˙(s)/γ˙(s)T(s)=\dot{\gamma}(s)/\|\dot{\gamma}(s)\|. A framing field along γ\gamma is a smooth, nowhere-vanishing U(s)TγΘU(s)\in T_\gamma\Theta with U(s),T(s)=0 \langle U(s),T(s)\rangle=0.

  • Framing angle. In a chosen transverse plane, UU has angle ϕ(s)\phi(s).

  • Twist (thin-belt).

    Tw=12πdϕdsds(or White’s vector formula).\mathrm{Tw}=\frac{1}{2\pi}\oint \frac{d\phi}{ds}\,ds \quad\text{(or White’s vector formula)}.
  • Link–twist–writhe (spatial embeddings). Lk=Tw+Wr\mathrm{Lk}=\mathrm{Tw}+\mathrm{Wr}. Belts inherit framed boundaries, hence self-link (framing) will appear in phases later.

Takeaway. The framing datum survives the thin-belt limit and contributes a finite, gauge-covariant phase; a single unframed line cannot encode it.


3.3 Differential Forms and Two-Boundary Stokes

  • Connection 1-form A\mathcal{A} and curvature 2-form F=dA+AA\mathcal{F}=d\mathcal{A}+\mathcal{A}\wedge\mathcal{A}.

  • Two-boundary Stokes (schematic).

    Γ+ ⁣AΓ ⁣A  =  B ⁣F,\oint_{\Gamma_+}\!\mathcal{A}-\oint_{\Gamma_-}\!\mathcal{A} \;=\;\iint_{\mathcal{B}}\!\mathcal{F},

    with the orientation convention above. This identity is the Abelian warm-up to belt holonomy. (We use it as a mnemonic; the full non-Abelian statement uses surface ordering below.)


3.4 Connections, Uhlmann Transport, and Belt Holonomy

  • Purification bundle. Over the density-operator manifold, use the Uhlmann connection AA; its curvature F=dA+AAF=dA+A\wedge A. Pull back to Θ×SK\Theta\times\mathrm{SK} via the process map.

  • Surface-ordered exponential (Non-Abelian Stokes). For a belt B\mathcal{B}:

    H[B]=Pexp ⁣BF,W[B]=TrH[B],\mathcal{H}[\mathcal{B}] = \mathcal{P}\exp\!\iint_{\mathcal{B}} F,\qquad W[\mathcal{B}] = \mathrm{Tr}\,\mathcal{H}[\mathcal{B}],

    which is gauge-covariant; class functions (e.g., argW\arg W) are gauge-invariant and reparametrization-independent.

Minimality. With SK + Uhlmann, a two-boundary ribbon is forced by the formalism; compressing to a single unframed line generally loses the finite framing phase.


3.5 Thin-Ribbon Regime and Local Coordinates

  • Local chart (s,n)(s,n) with sS1s\in S^1 along the edge/centerline and n[w/2,w/2]n\in[-w/2,w/2] transverse (lower \to upper).

  • Metric (first order). In geodesic-normal coordinates, gdiag((1κn)2,1)g\approx\mathrm{diag}((1-\kappa n)^2,\,1); thin-belt regime requires maxsκ(s)w1\max_s \kappa(s)w \ll 1.

  • Area form. dS=J(s,n)dsdndS=J(s,n)\,ds\,dn, with J=1+O(κn)J=1+O(\kappa n).

We’ll use this only to state stability/error terms for discrete surface ordering and twist estimators (Ch. 4). (Sketch-level only in this chapter.)


3.6 Surface-Ordered Exponentials: Variation Formula

For a smooth family of belts {Bϵ}\{\mathcal{B}_\epsilon\} with moving boundary, define

Φ(ϵ)=argTrH[Bϵ].\Phi(\epsilon)=\arg \mathrm{Tr}\,\mathcal{H}[\mathcal{B}_\epsilon].

Using Duhamel/Volterra calculus for surface order plus Cartan’s identity for the Lie derivative, one obtains the first-variation structure used later to connect geometric forces to holonomy. Full details are carried in the proof of Theorem B (Chapter 9 / Appx. A).


3.7 What We Mean by “Framing Survives”

Let (γ,U)( \gamma, U ) be a framed loop generating geodesic-normal belts of thickness ε\varepsilon. Then

limε0argTrH[Bε]\lim_{\varepsilon\downarrow 0}\arg\,\mathrm{Tr}\,\mathcal{H}[\mathcal{B}_\varepsilon]

exists and depends on the rotation class of UU—i.e., on the twist—yielding a finite framing (self-link) contribution. Therefore, two boundaries + framing are minimal and inevitable; a single unframed line generically drops an observable. (Thin-belt lemma.)


3.8 Exchange/Statistics as Framed Linking (Preview)

Given two belts B1,B2\mathcal{B}_1,\mathcal{B}_2 with framed boundaries, define the framed belt linking as the sum of Gauss linkings over all boundary components (with inherited framings). In Berry–Chern/Chern–Simons-type sectors, the exchange unitary acquires a phase proportional to this framed linking; 4π4\pi periodicity shows up crisply in interferometry. (We work this out in the case studies and in Appx. E.)


3.9 Gauge Covariance and Reparametrization Independence

Under a gauge transform gg, Ag1Ag+g1dgA\mapsto g^{-1}Ag+g^{-1}dg, Fg1FgF\mapsto g^{-1}Fg, hence
H[B]g(Γ+)1H[B]g(Γ)\mathcal{H}[\mathcal{B}]\mapsto g(\Gamma_+)^{-1}\,\mathcal{H}[\mathcal{B}]\,g(\Gamma_-).
Any class function (e.g., Tr\mathrm{Tr}, argdet\arg\det, characters) is invariant, and since FF is a 2-form, reparametrizations of edges/interior leave H\mathcal{H} unchanged. We rely on this when defining scalar phase gaps and when discretizing surfaces.


3.10 Non-Abelian Stokes (Working Statement)

We adopt the surface form (ordered exponential over B\mathcal{B}) as the definition of belt holonomy, equivalent to line-ordered forms when the surface is admissible and the usual hypotheses hold. This choice is the right one for computation (mesh/quadrature) and for proving variation formulas. (Full statements and admissibility criteria appear with the proofs.)


3.11 Semantic Read (for later SBHL)

Everything above ports to the “semantic” setting by:

  • Picking a semantic connection As\mathcal{A}_s (U(1)/U(k)/Uhlmann estimator).

  • Defining the phase gap Δϕ=Γ+AsΓAs\Delta\phi = \oint_{\Gamma_+}\mathcal{A}_s - \oint_{\Gamma_-}\mathcal{A}_s.

  • Logging flux BFs\iint_{\mathcal{B}}\mathcal{F}_s and twist Tw\mathrm{Tw} as engineer metrics.
    This will become SBHL: phase gap = meaning flux + style twist (Ch. 13).


3.12 What We Fully Prove vs. What We Sketch (and Why)

Fully proved later (physics-rigor chapters & appendices):

  1. Existence & minimality of belts (Theorem A): SK forces two boundaries; holonomy is gauge-covariant; thin-belt framing survives ⇒ single unframed line is insufficient. (Chs. 7–8, proofs in §4/Appx.)

  2. Geometric/adiabatic forces = first variation of belt holonomy (Theorem B): full Duhamel/Volterra + Cartan calculus. (Ch. 9, Appx. A)

  3. Exchange/statistics = framed belt linking (Theorem C): framed-Wilson analysis; 4π4\pi checks. (Ch. 9, Appx. E)

Sketched in this book (engineer-level suffices):

  • Thin-belt metric model and first-order coordinate invariance/stability (used for discretization bounds).

  • Discrete surface ordering convergence on annuli; error terms vs. curvature and mesh.

  • Semantic connection existence along C1C^1 paths and gauge covariance (SBHL bridge).
    These are treated as sketch proofs because (i) they follow standard differential-geometric arguments, (ii) full generality adds length not needed for implementation, and (iii) we provide unit tests/benchmarks that validate them empirically for engineering purposes.


Minimal takeaway

You now have the exact geometric toolbox we’ll use:

  • Belts B\mathcal{B} with two boundaries Γ±\Gamma_\pm,

  • Framing U,ϕ,TwU,\phi,\mathrm{Tw},

  • Connection/curvature A,FA,F with surface-ordered holonomy H[B]\mathcal{H}[\mathcal{B}],

  • The knowledge that framing survives and gauge covariance is clean.

Chapters 4–6 turn this primer into code: operators, two-boundary Stokes, framing/twist; Chapters 7–9 derive the core laws we’ll build the AGI stack on.


Chapter 4 — The Belt Domain and Operators

Goal: fix the local metric on a ribbon and give explicit, code-ready formulas for grad/div/curl/Δ with thin-belt error notes and stability guards.


4.1 Geometry of a belt (local chart and metric)

Let the centerline be a C2C^2 closed loop C(s)C(s) (unit speed), with curvature κ(s)\kappa(s). Construct the geodesic-normal ribbon by offsetting along a framing field U(s)C˙(s)U(s)\perp \dot C(s) a signed distance n[0,w(s)]n\in[0,w(s)] from the lower to the upper edge. Use local coordinates (s,n)(s,n) with orientation (s,n)(\partial_s,\partial_n) and lower→upper taken as +n+n.

In this chart (first order in thickness), the induced ribbon metric is

g=diag ⁣((1κn)2,1),g=(1κn),gss=(1κn)2, gnn=1.g=\mathrm{diag}\!\big((1-\kappa n)^2,\,1\big),\quad \sqrt{|g|}=(1-\kappa n),\quad g^{ss}=(1-\kappa n)^{-2},\ g^{nn}=1.

This follows from the standard geodesic-normal construction for the belt (existence as smooth immersed ribbon; SK lift gives the two boundaries).

Validity domain (thin-belt): require maxsκ(s)w(s)1\max_s |\kappa(s)|\,w(s)\ll 1 so the chart is non-singular and Jacobian 1κn>01-\kappa n>0. Higher-order terms are O(κn)+O(κ2n2)O(\kappa' n)+O(\kappa^2 n^2).


4.2 Differential operators on the ribbon

Below, scalar fields ff, vector fields V=Vss+VnnV=V^s\partial_s+V^n\partial_n. We use the coordinate basis and the metric above.

Gradient

f=(gsssf)s+(gnnnf)n=sf(1κn)2s+nfn.\nabla f=\big(g^{ss}\partial_s f\big)\,\partial_s+\big(g^{nn}\partial_n f\big)\,\partial_n =\frac{\partial_s f}{(1-\kappa n)^2}\,\partial_s+\partial_n f\,\partial_n.

Divergence ( ⁣V=iVi)(\nabla\!\cdot V = \nabla_i V^i)

 ⁣V=1gi ⁣(gVi)=11κn[s ⁣((1κn)Vs)+n ⁣((1κn)Vn)].\nabla\!\cdot V =\frac{1}{\sqrt{|g|}}\partial_i\!\big(\sqrt{|g|}\,V^i\big) =\frac{1}{1-\kappa n}\Big[\partial_s\!\big((1-\kappa n)V^s\big)+\partial_n\!\big((1-\kappa n)V^n\big)\Big].

Curl / vorticity (2D scalar)

Let VV^\flat be the 1-form with components Vs=gssVs=(1κn)2VsV_s=g_{ss}V^s=(1-\kappa n)^2V^s, Vn=VnV_n=V^n. The scalar curl is

curlV=d(V)=1g(sVnnVs)=11κn[sVnn ⁣((1κn)2Vs)].\operatorname{curl}V = {*}d(V^\flat) = \frac{1}{\sqrt{|g|}}\big(\partial_s V_n-\partial_n V_s\big) = \frac{1}{1-\kappa n}\Big[\partial_s V^n-\partial_n\!\big((1-\kappa n)^2 V^s\big)\Big].

Laplace–Beltrami on scalars

Δf= ⁣(f)=11κn[s ⁣(11κnsf)+n ⁣((1κn)nf)].\Delta f=\nabla\!\cdot(\nabla f) =\frac{1}{1-\kappa n}\left[ \partial_s\!\Big(\frac{1}{1-\kappa n}\,\partial_s f\Big) +\partial_n\!\big((1-\kappa n)\,\partial_n f\big) \right].

These formulas are the thin-belt specializations of standard Riemannian identities with the geodesic-normal metric; they are the operators used in our surface-ordered calculus and stability estimates for the belt holonomy.


4.3 Discrete versions (for code)

Mesh. Sample ss at KK points per edge; tile B\mathcal{B} by K×MK\times M quads ordered first in nn (lower→upper), then in ss. Use g=(1κn)\sqrt{|g|}=(1-\kappa n) for quadrature weights.

Finite differences.

  • sf(fk+1,mfk1,m)/(2Δs)\partial_s f \approx (f_{k+1,m}-f_{k-1,m})/(2\Delta s) on a periodic grid; nf(fk,m+1fk,m1)/(2Δn)\partial_n f \approx (f_{k,m+1}-f_{k,m-1})/(2\Delta n).

  • Implement  ⁣V\nabla\!\cdot V as the conservative form (1/g)(gV)(1/\sqrt{|g|})\,\nabla\cdot(\sqrt{|g|}V) to preserve Stokes consistency with upper–minus–lower orientation used later for belt Stokes and holonomy.

  • For curl, assemble Vs=(1κn)2VsV_s=(1-\kappa n)^2V^s first, then apply the difference stencil in the formula above.

Sanity tests.

  1. Constant ff=0, Δf=0f\Rightarrow \nabla f=0,\ \Delta f=0.

  2. Constant VV tangent to edges with Vn=0curlV=11κnn((1κn)2Vs)V^n=0\Rightarrow \operatorname{curl}V= -\frac{1}{1-\kappa n}\partial_n((1-\kappa n)^2V^s) (captures curvature-induced twist).

  3. Discrete Stokes: cellsFΔSΓ+ ⁣AΓ ⁣A\sum_{\text{cells}} \mathcal{F}\,\Delta S \approx \oint_{\Gamma_+}\!\mathcal{A}-\oint_{\Gamma_-}\!\mathcal{A}.


4.4 Thin-ribbon regime: error terms & stability (sketch)

Assumptions. κwε1|\kappa|w\le \varepsilon\ll1, κw21|\kappa'|w^2\ll1, fields C2C^2 in (s,n)(s,n).

Metric & Jacobian errors. True area factor is J=1κn+O(κn2+κ2n2)J=1-\kappa n+O(\kappa' n^2+\kappa^2 n^2); using J1κnJ\approx1-\kappa n induces O(ε2)O(\varepsilon^2) relative error in surface integrals. Sketch: Taylor expand the exponential map in the geodesic-normal construction; compute gssg_{ss} and g\sqrt{|g|} to second order.

Operator consistency.

  •  ⁣\nabla\!\cdot in conservative form is first-order accurate in nn and second-order in ss with centered stencils; residual O(εΔs2+εΔn)O(\varepsilon\,\Delta s^2+\varepsilon\,\Delta n).

  • Δ\Delta incurs an additional nκ\partial_n\kappa coupling; truncation is O(εΔs2+εΔn+ε2)O(\varepsilon\,\Delta s^2+\varepsilon\,\Delta n + \varepsilon^2).

Stability guard. Enforce maxκw<0.2\max |\kappa| w < 0.2 and choose MM such that Δnw/8\Delta n \le w/8; this keeps Jacobian positivity and controls surface-ordering error in holonomy beyond which commutator nesting dominates. Rationale: bounded by the admissible-homotopy/curvature support arguments used in the belt holonomy stability discussion.

Why this is enough. The full belt framework (existence/minimality; gauge covariance; variation → force) rests on the geodesic-normal ribbon and non-Abelian Stokes—both independent of discretization—and only requires these first-order geometric controls for reproducible numerics.


4.5 Quick reference (copy into code)

  • Metric: gss=(1κn)2g_{ss}=(1-\kappa n)^2, gnn=1g_{nn}=1, g=1κn\sqrt{|g|}=1-\kappa n.

  • Grad: (sf/(1κn)2, nf)\big(\partial_s f/(1-\kappa n)^2,\ \partial_n f\big).

  • Div: 11κn[s((1κn)Vs)+n((1κn)Vn)]\frac{1}{1-\kappa n}\big[\partial_s((1-\kappa n)V^s)+\partial_n((1-\kappa n)V^n)\big].

  • Curl: 11κn[sVnn((1κn)2Vs)]\frac{1}{1-\kappa n}\big[\partial_s V^n-\partial_n((1-\kappa n)^2V^s)\big].

  • Laplacian: Δf=11κn ⁣[s ⁣(11κnsf)+n ⁣((1κn)nf)]\Delta f=\frac{1}{1-\kappa n}\!\left[\partial_s\!\big(\frac{1}{1-\kappa n}\partial_s f\big)+\partial_n\!\big((1-\kappa n)\partial_n f\big)\right].

  • Orientation: boundary = upper minus lower.

These are the operators we’ll use to: (i) state two-boundary Stokes cleanly, (ii) implement surface ordering for belt holonomy, and (iii) quantify thin-belt stability in later algorithms.


Chapter 5 — Two-Boundary Stokes & Gauss

Goal: express Stokes/Gauss on a ribbon B\mathcal{B} with two boundaries Γ±\Gamma_\pm and fix the upper–minus–lower convention. We also give a partition proof (via classical Stokes + Jacobian) so you can trust the signs and the discretization.


5.1 Setup and orientation

  • Belt / ribbon: BΘ×SK\mathcal{B}\subset\Theta\times \mathrm{SK} is a smooth immersed annulus with boundary

    B=Γ+    Γ,with the Stokes-consistent sign B=Γ+Γ.\partial\mathcal{B}=\Gamma_+\;\sqcup\;\Gamma_- , \quad\text{with the Stokes-consistent sign } \partial\mathcal{B}=\Gamma_+ - \Gamma_- .

    (This is the SK two-branch lift with inherited orientations.)

  • Local chart: use (s,n)(s,n) with ss along the edge and n[0,w(s)]n\in[0,w(s)] from Γ\Gamma_- (at n=0n=0) to Γ+\Gamma_+ (at n=wn=w).
    Metric from Ch. 4: g=diag((1κn)2,1)g=\mathrm{diag}((1-\kappa n)^2,1), area form dS=(1κn)dsdndS=(1-\kappa n)\,ds\,dn. (We’ll only need that Jacobian once.)

  • Key fact: Using forms, reparametrizations/Jacobians cancel for surface integrals because curvature is a 2-form (this will justify our discrete formulas too).


5.2 Two-Boundary Stokes (circulation = flux)

Let A=Asds+Andn\mathcal{A}=A_s\,ds + A_n\,dn be a smooth 1-form on B\mathcal{B}, with curvature 2-form

dA=(sAnnAs)dsdn.d\mathcal{A}=\big(\partial_s A_n - \partial_n A_s\big)\,ds\wedge dn .

Theorem (two-boundary Stokes).

    Γ+ ⁣A    Γ ⁣A  =  BdA  =  B(sAnnAs)dsdn    \boxed{\;\;\oint_{\Gamma_+}\!\mathcal{A}\;-\;\oint_{\Gamma_-}\!\mathcal{A} \;=\;\iint_{\mathcal{B}} d\mathcal{A}\;=\;\iint_{\mathcal{B}}\big(\partial_s A_n-\partial_n A_s\big)\,ds\,dn\;\;}
  • The left side is upper minus lower because B=Γ+Γ\partial\mathcal{B}=\Gamma_+ - \Gamma_-.

  • This is the Abelian warm-up of the non-Abelian (surface-ordered) version used for belt holonomy; there, the 2-form nature again ensures parametrization independence.

Partition proof (sketch). Tile B\mathcal{B} into thin rectangles Rk,m=[sk,sk+1]×[nm,nm+1]R_{k,m}=[s_k,s_{k+1}]\times[n_m,n_{m+1}]. Apply classical Stokes on each Rk,mR_{k,m}:
Rk,m ⁣ ⁣A=Rk,mdA.\displaystyle \oint_{\partial R_{k,m}}\!\!\mathcal{A}=\iint_{R_{k,m}} d\mathcal{A}.
Sum over all tiles. Internal edges cancel telescopically, leaving only the two belt boundaries; the sum of the right-hand sides gives the surface integral. Jacobian factors do not appear in the form version (and cancel in the non-Abelian derivation), which is why this identity is coordinate-robust.


5.3 Two-Boundary Gauss (divergence = normal flux)

Let V=Vss+VnnV=V^s\partial_s+V^n\partial_n be a smooth vector field on B\mathcal{B}. With the ribbon metric from Ch. 4, the divergence is

 ⁣V=11κn[s ⁣((1κn)Vs)+n ⁣((1κn)Vn)].\nabla\!\cdot V =\frac{1}{1-\kappa n}\left[\partial_s\!\big((1-\kappa n)V^s\big)+\partial_n\!\big((1-\kappa n)V^n\big)\right].

Divergence theorem on a belt.

    B( ⁣V)(1κn)dsdn=  Γ+ ⁣ ⁣V,νdl    Γ ⁣ ⁣V,νdl    \boxed{\;\;\iint_{\mathcal{B}} (\nabla\!\cdot V)\,(1-\kappa n)\,ds\,dn =\;\oint_{\Gamma_+}\!\!\langle V,\nu\rangle\,dl\;-\;\oint_{\Gamma_-}\!\!\langle V,\nu\rangle\,dl\;\;}

where ν=±n\nu=\pm\,\partial_n is the outward unit normal along the boundary within the surface, and dl=(1κn)dsdl=(1-\kappa n)\,ds is the boundary line element. At Γ+\Gamma_+ (upper edge) the outward normal is +n+\partial_n; at Γ\Gamma_- it is n-\partial_n (pointing into the hole), yielding upper minus lower again.

Partition proof (sketch). Tile B\mathcal{B} into rectangles and apply the planar divergence theorem in (s,n)(s,n) coordinates with area element (1κn)dsdn(1-\kappa n)\,ds\,dn. Fluxes across internal faces cancel; the only survivors are the normal fluxes across n=w(s)n=w(s) and n=0n=0, which appear with opposite signs once you account for outward normals and the boundary line Jacobian dl=(1κn)dsdl=(1-\kappa n)\,ds. (Same Jacobian-cancellation logic as above guarantees coordinate consistency.)


5.4 Discrete formulas (drop-in)

On a K×MK\times M mesh (periodic in ss), with cells ordered first in nn (lower→upper):

  • Stokes (circulation vs flux):

    m,k(sAnnAs)k,mΔsΔn    kAs(sk,w)Δs    kAs(sk,0)Δs.\sum_{m,k}\Big(\partial_s A_n-\partial_n A_s\Big)_{k,m}\,\Delta s\,\Delta n \;\approx\; \sum_k A_s(s_k,w)\,\Delta s\;-\;\sum_k A_s(s_k,0)\,\Delta s .

    (1-forms don’t need Jacobian weights; keep upper minus lower.)

  • Gauss (div vs normal flux):

    m,k( ⁣V)k,m(1κnm)ΔsΔn    kVn(sk,w)(1κw)Δs    kVn(sk,0)(10)Δs.\sum_{m,k}(\nabla\!\cdot V)_{k,m}\,(1-\kappa n_{m})\,\Delta s\,\Delta n \;\approx\; \sum_k V^n(s_k,w)\,(1-\kappa w)\,\Delta s \;-\; \sum_k V^n(s_k,0)\,(1-0)\,\Delta s .
  • Sanity tests: constant VV tangential to edges ⇒ net flux =0=0; constant fff=0\nabla f=0, Δf=0\Delta f=0. (Also verify discrete Stokes by summing cell fluxes vs boundary circulations.)

These discretizations align with the belt holonomy calculus (surface ordering on an annulus) and inherit the gauge/parametrization robustness of the 2-form statement.


5.5 Why this is the right abstraction (physics link)

The non-Abelian, gauge-geometric version replaces dAd\mathcal{A} by the curvature F=dA+AA\mathcal{F}=d\mathcal{A}+\mathcal{A}\wedge\mathcal{A} and the line integrals by edge holonomies—still with upper minus lower—yielding the belt holonomy used throughout the paper. Because F\mathcal{F} is a 2-form, the holonomy is gauge-covariant and reparametrization-independent, and in the thin-belt limit a framing term survives, which a single line would miss.


One-liner

On a ribbon, Stokes and Gauss are literally “upper minus lower.” Prove it once with tile-by-tile Stokes + the Jacobian, then reuse it everywhere—from discrete code to non-Abelian belt holonomy.


Chapter 6 — Framing, Twist, Writhe, Linking

Goal: relate framing on a ribbon to topological link invariants and show why a single line cannot carry the needed data. We state the belt form of the Călugăreanu–White identity and connect it to framed belt linking used later for exchange/statistics.


6.1 From framed curves to belt invariants

  • A framed belt is a smooth immersed annulus BΘ×SK\mathcal{B}\subset \Theta\times\mathrm{SK} with two boundary components Γ±\Gamma_\pm and a nowhere-vanishing normal (framing) field UU along the core loop γ\gamma. In the thin-belt construction, Γ±\Gamma_\pm are small offsets of γ\gamma along UU. The framing datum survives as the belt thickness ε0\varepsilon\to 0; it contributes a finite, gauge-covariant phase that cannot be reconstructed from a single unframed line.


6.2 The Călugăreanu–White identity (belt form)

For a closed, embedded core curve γR3\gamma\subset\mathbb{R}^3 with a smooth framing UU that spans a ribbon, the self-linking number SL\mathrm{SL} of either boundary component relative to the other satisfies the classical identity:

 SL(γ;U)  =  Wr(γ)  +  Tw(γ;U) \boxed{\ \mathrm{SL}(\gamma;U)\;=\;\mathrm{Wr}(\gamma)\;+\;\mathrm{Tw}(\gamma;U)\ }
  • Writhe Wr(γ)\mathrm{Wr}(\gamma): geometric (global) bending & coiling of γ\gamma (Gauss double integral).

  • Twist Tw(γ;U)\mathrm{Tw}(\gamma;U): integrated rotation of the framing UU along γ\gamma (e.g., 12πdϕdsds\frac{1}{2\pi}\oint \frac{d\phi}{ds}\,ds).

Belt specialization. Each SK belt has two framed boundary curves that are ε\varepsilon-offsets of γ\gamma. The paper records this as “SL=Wr+Tw \mathrm{SL} = \mathrm{Wr} + \mathrm{Tw}” and uses it to account for the framing (self-link) contributions that persist in the thin-belt limit.


6.3 Framed belt linking (mutual linking between two belts)

Given two framed belts B1,B2\mathcal{B}_1,\mathcal{B}_2 with boundaries Γ1,±\Gamma_{1,\pm}, Γ2,±\Gamma_{2,\pm}, define the framed belt linking

Lkbelt(B1,B2)  =  σ,τ{+,}Lk(Γ1,σ,Γ2,τ).\mathrm{Lk}_{\text{belt}}(\mathcal{B}_1,\mathcal{B}_2) \;=\;\sum_{\sigma,\tau\in\{+,-\}} \mathrm{Lk}(\Gamma_{1,\sigma},\Gamma_{2,\tau}) .

In the SK thin-ribbon setup, each Γi,±\Gamma_{i,\pm} is a small framed offset of the core loop γi\gamma_i, so the pairwise linkings equal the core linking, yielding

Lkbelt(B1,B2)=4Lk(γ1,γ2)(for consistent SK orientations).\mathrm{Lk}_{\text{belt}}(\mathcal{B}_1,\mathcal{B}_2)=4\,\mathrm{Lk}(\gamma_1,\gamma_2) \quad\text{(for consistent SK orientations).}

Self-link terms (from each belt separately) produce the framing anomaly offsets. This is exactly the quantity that controls the exchange/statistics phase in the topological/adiabatic sectors derived later.


6.4 Why a single line loses framing ⇒ belts are inevitable

Two complementary arguments:

  1. Geometric (thin-belt) limit. The surface-ordered exponential over the belt yields a finite limit as thickness ε0\varepsilon\to 0 that depends on the rotation class of UU (twist). The area term vanishes with ε\varepsilon, but ordered-exponential structure retains a finite framing contribution; hence different framings over the same γ\gamma lead to different phases. A single unframed curve cannot encode this.

  2. Topological (Wilson framing). In Berry–Chern/Chern–Simons–type sectors, loop observables are framing-dependent; the standard cure is to frame the loop by a narrow ribbon. SK ribbonization is precisely that cure, supplying the self-link term that an unframed line misses. Conclusion: two boundaries + framing are the minimal gauge-covariant carrier.


6.5 Computation (engineer playbook)

A. Linking number (Gauss integral). For two closed piecewise-smooth curves α,βR3\alpha,\beta\subset\mathbb{R}^3,

Lk(α,β)=14π(α˙(s)×β˙(t))(α(s)β(t))α(s)β(t)3dsdt.\mathrm{Lk}(\alpha,\beta)=\frac{1}{4\pi}\iint \frac{(\dot\alpha(s)\times \dot\beta(t))\cdot(\alpha(s)-\beta(t))} {\|\alpha(s)-\beta(t)\|^3}\,ds\,dt .

B. Writhe of γ\gamma: same Gauss integral with α=β=γ\alpha=\beta=\gamma taken in a principal-value sense (or by standard discretized approximations).

C. Twist: either angle-accumulation 12πdϕ/dsds\frac{1}{2\pi}\oint d\phi/ds\,ds or White’s vector formula

Tw=12π(T×U)dUdsds.\mathrm{Tw}=\frac{1}{2\pi}\oint (T\times U)\cdot \frac{dU}{ds}\,ds .

D. Belt form.

  1. Compute Tw(γ;U)\mathrm{Tw}(\gamma;U) from the framing along the core.

  2. Compute Wr(γ)\mathrm{Wr}(\gamma) from the centerline geometry.

  3. Then SL=Wr+Tw\mathrm{SL}=\mathrm{Wr}+\mathrm{Tw} gives the self-link of the belt boundary; assemble Lkbelt\mathrm{Lk}_{\text{belt}} for pairs of belts from the four boundary combinations. These self-/mutual-link integers feed the framing anomaly and the exchange phase.

E. Sanity checks.

  • Reverse belt orientation ⇒ Lkbelt\mathrm{Lk}_{\text{belt}} changes sign consistently on both sides of the exchange law (Ch. 9).

  • Change framing by +1+1 twist ⇒ SLSL+1\mathrm{SL}\mapsto \mathrm{SL}+1 and only adds a constant phase offset; mutual phases (between distinct belts) are unaffected.


6.6 Where specialization fails (sketch)

The identity and belt reductions above rely on smoothness, orientability, and embeddedness. Pitfalls:

  1. Non-orientable span (Möbius-like strip). A Möbius band has one boundary and no globally consistent normal field UU; belt assumptions fail (we require two boundaries and an orientable annulus), so SL=Wr+Tw\mathrm{SL}=\mathrm{Wr}+\mathrm{Tw} in this form is inapplicable. The SK belt is explicitly orientable with two edges.

  2. Self-intersections / non-embedded centerline. If γ\gamma is not an embedded C2C^2 loop (e.g., has cusps or crossings), the Gauss integrals need rectifiable-chain techniques; Wr\mathrm{Wr} and even Lk\mathrm{Lk} may become ill-defined without extra care. The paper’s belt construction assumes a smooth immersed ribbon with finite area.

  3. Open ribbons (endpoints). For open curves, SL=Wr+Tw\mathrm{SL}=\mathrm{Wr}+\mathrm{Tw} requires endpoint framing conventions (or closing by a reference arc). Our book focuses on closed belts; open cases are postponed to the computational appendix.

  4. Large width / leaving thin regime. If κw≪̸1\kappa w\not\ll 1, the geodesic-normal chart and thin-belt limit estimates degrade; discrete surface ordering acquires higher commutator corrections that spoil clean separation of Wr\mathrm{Wr} and Tw\mathrm{Tw}. Use slab/net generalizations (Part IV). (Thin-belt minimality is what underwrites “line is insufficient.”)


6.7 Why this chapter matters downstream

  • Physics link (Ch. 9): exchange/statistics phase UexU_{\mathrm{ex}} equals exp{iλLkbelt}\exp\{i\,\lambda\,\mathrm{Lk}_{\text{belt}}\} up to local terms; self-link pieces are exactly the framing anomaly.

  • Core minimality claim (Ch. 7–8): finite framing persists in the thin limit; hence belts are inevitable once SK + mixed-state transport are present.


One-liner

A ribbon’s boundary self-link splits as writhe + twist, and mutual phases ride on framed belt linking; both depend on framing that a single unframed line cannot carry—hence the belt.


Chapter 7 — Connections, Curvature, Surface Ordering

Goal: formalize belt holonomy as a surface-ordered exponential on an annulus, relate it to line-ordered forms, prove gauge covariance and reparametrization independence, and state the refinement limit on annuli (why your discrete surface product converges).


7.1 Setting and objects

  • Bundle & connection. Work in the purification principal bundle over the density-operator manifold; take the (possibly non-Abelian) Uhlmann connection AA with curvature F=dA+AAF=dA+A\wedge A. Pull back to Θ×SK\Theta\times \mathrm{SK} by the process map.

  • Belt. A belt BΘ×SK\mathcal{B}\subset \Theta\times\mathrm{SK} is a smooth immersed annulus with boundary B=Γ+Γ\partial\mathcal{B}=\Gamma_+\sqcup\Gamma_- (the SK-lifted edges).

Definition 7.1 (Belt holonomy).

H[B]  :=  Pexp ⁣BF,W[B]  :=  TrH[B].\mathcal{H}[\mathcal{B}]\;:=\;\mathcal{P}\exp\!\iint_{\mathcal{B}}F, \qquad W[\mathcal{B}]\;:=\;\mathrm{Tr}\,\mathcal{H}[\mathcal{B}] .

We adopt the surface form as the definition (the non-Abelian Stokes theorem relates it to line-ordered boundary data when applicable).


7.2 Path vs. surface exponentials (what equals what)

Lemma 7.2 (Non-Abelian Stokes—operational form).
If a (piecewise smooth) surface B\mathcal{B} bounds a closed contour B\partial\mathcal{B}, then the line-ordered holonomy around B\partial\mathcal{B} is represented by the surface-ordered exponential of FF over B\mathcal{B}. We take H[B]\mathcal{H}[\mathcal{B}] as primary; when Stokes applies, it coincides with the boundary object. Sketch. Standard non-Abelian Stokes on the pulled-back bundle; the draft records this choice and uses it for all variation formulas.

Remark (flat vs. curved sectors).
For flat FF on a 3-chain spanning two admissibly homotopic belts B0,B1\mathcal{B}_0,\mathcal{B}_1 with the same framed boundary, their holonomies are boundary-conjugate so any class function agrees: W[B0]=W[B1]W[\mathcal{B}_0]=W[\mathcal{B}_1]. In general, differences are governed by Pexp ⁣F\mathcal{P}\exp\!\iiint F and nested commutators—surface dependence encodes real curvature.


7.3 Gauge covariance & reparametrization independence

Lemma 7.3 (Gauge covariance).
Under a smooth gauge transform gg: Ag1Ag+g1dgA\mapsto g^{-1}Ag+g^{-1}dg, Fg1FgF\mapsto g^{-1}Fg. Then

H[B]  g(Γ+)1H[B]g(Γ),\mathcal{H}[\mathcal{B}]\ \mapsto\ g(\Gamma_+)^{-1}\,\mathcal{H}[\mathcal{B}]\,g(\Gamma_-),

so any class function (e.g., W=TrHW=\mathrm{Tr}\,\mathcal{H} or argW\arg W) is gauge-invariant. Proof sketch. Conjugation pulls through the ordered exponential with boundary evaluations gΓ±g|_{\Gamma_\pm}.

Corollary 7.4 (Reparametrization independence).
Changing coordinates on B\mathcal{B} or the parameterizations of Γ±\Gamma_\pm leaves H[B]\mathcal{H}[\mathcal{B}] unchanged: FF is a 2-form, so Jacobians cancel. This is why the Stokes-type belt identity is numerically stable under mesh refinement.


7.4 Refinement limit on annuli (why your mesh product converges)

Proposition 7.5 (Refinement on annuli exists; independence of chart).
Let {BK,M}\{\mathcal{B}_{K,M}\} be a sequence of annular meshes (K panels along ss, M along nn) with a fixed surface order (e.g., lower\toupper in nn, then forward in ss). Define the discrete holonomy

HK,M=cells in orderexp ⁣(cellF+commutator nests).\mathcal{H}_{K,M}=\prod_{\text{cells in order}} \exp\!\Big(\int_{\text{cell}}F\,+\,\text{commutator nests}\Big).

If AA is C1C^1 and FF continuous on a neighborhood of B\mathcal{B}, then HK,MH[B]\mathcal{H}_{K,M}\to \mathcal{H}[\mathcal{B}] as max(Δs,Δn)0\max(\Delta s,\Delta n)\to 0, independent of the chosen chart/order, up to the canonical boundary conjugations from Lemma 7.3. Sketch. Duhamel/Volterra expansion for ordered exponentials + dominated convergence; the draft’s variation appendix sets the regularity; admissible homotopies keep framings fixed.

Engineer note. Fix the order (lower→upper, then along ss) and keep it everywhere (training, eval). This matches the sign convention B=Γ+Γ\partial\mathcal{B}=\Gamma_+-\Gamma_- and makes discrete Stokes exact in the Abelian warm-up.


7.5 Thin-belt limit and framed regularization (preview)

Although detailed proofs live in Ch. 8/Appx., two facts guide implementation:

  1. In the thin-belt limit w0w\to 0, the naive area term vanishes, but a finite framing phase remains, controlled by the twist of the framing field—hence two boundaries + framing are minimal and inevitable.

  2. In topological/adiabatic sectors, loop observables are framing-dependent; SK ribbonization is exactly the standard framed-Wilson regularization, supplying the self-link (framing) contribution a single line cannot carry.


7.6 First-variation scaffolding (what we need for Ch. 9)

For a smooth belt family Bϵ\mathcal{B}_\epsilon with boundary deformation field vv, ordered-exponential calculus on surfaces gives

δargTrH[Bϵ]=Bϵ ⁣ ⁣ ⁣ ⁣ιvF,   +  commutator nests,\delta \,\arg \mathrm{Tr}\,\mathcal{H}[\mathcal{B}_\epsilon] =\iint_{\mathcal{B}_\epsilon}\!\!\!\!\langle \iota_v F,\ \cdot\rangle \;+\; \text{commutator nests},

leading to the geometric-force = belt-holonomy variation identity used later; regularity conditions are spelled out (trace-class fiber, C1C^1 data). We cite the full derivation in the draft’s Appendix A.


7.7 What to implement (minimal, safe API)

  • belt_holonomy(B, A)H[B]\mathcal{H}[\mathcal{B}] via a fixed surface order (lower→upper; then along ss).

  • belt_phase(B, A)argTrH[B]\arg\mathrm{Tr}\,\mathcal{H}[\mathcal{B}] (or argdet\arg\det in U(1)/projected U(k)).

  • refine(B, K, M) → returns a mesh satisfying the annulus refinement condition (Prop. 7.5).

  • gauge_class_function(H) → stable phase/scalar invariant (trace/character) for logging.

These pieces are gauge-robust, reparametrization-independent, and converge under refinement on annuli by the arguments above.


One-liner

Use surface-ordered holonomy on the belt; it’s gauge-covariant, reparametrization-independent, and your discrete product converges on annuli under refinement—this is the right foundation for FBHL/SBHL.


Chapter 8 — Framed Belt Holonomy Law (FBHL)

Minimal statement: for a two-boundary ribbon (belt) B\mathcal{B} with edges Γ±\Gamma_\pm, the holonomy gap between the edges equals a surface-ordered curvature response with a finite framing (twist) phase that survives the thin-belt limit:

  Hol(Γ+)Hol(Γ)1  =  Pexp ⁣BF  ×  eiαTw  \boxed{\; \mathrm{Hol}(\Gamma_+)\,\mathrm{Hol}(\Gamma_-)^{-1} \;=\; \mathcal{P}\exp\!\iint_{\mathcal{B}}F \;\times\; e^{\,i\,\alpha\,\mathrm{Tw}} \;}

Here FF is the pulled-back Uhlmann curvature on the purification bundle; Tw\mathrm{Tw} is the belt’s twist (framing) along the boundary; α\alpha is a sector constant (fixed by calibration). The surface form is our primary definition (non-Abelian Stokes), and the framing factor is the finite term induced by framed (two-boundary) regularization.

Notes. (i) In non-Abelian sectors the eiαTwe^{i\alpha\,\mathrm{Tw}} is a central (class-function) contribution coming from framed-Wilson regularization; equality holds up to boundary conjugation (class functions like Tr\mathrm{Tr} or argdet\arg\det remove it). (ii) Orientation is upper minus lower, consistent with belt Stokes.


8.1 Objects and conventions (recap)

  • Edges: Γ±Θ×SK\Gamma_\pm\subset \Theta\times\mathrm{SK} from SK doubling (forward/back).

  • Belt holonomy: H[B]=Pexp ⁣BF\mathcal{H}[\mathcal{B}]=\mathcal{P}\exp\!\iint_{\mathcal{B}}F, W=TrHW=\mathrm{Tr}\,\mathcal{H}.

  • Gauge covariance: Hg(Γ+)1Hg(Γ)\mathcal{H}\mapsto g(\Gamma_+)^{-1}\mathcal{H}\,g(\Gamma_-) ⇒ class functions are invariant; reparametrizations don’t matter since FF is a 2-form.

  • Framing survives: in the thin-belt limit a finite twist/self-link term remains; a single unframed line cannot recover it.


8.2 Consistency checks

(a) Thin-belt limit. As width w0w\to 0, the naive area term shrinks, but ordered-exponential calculus leaves a finite framing phase Tw\propto \mathrm{Tw} determined by the rotation class of the framing along the loop—this is the thin-belt framing lemma.

(b) Composition. Concatenating belts along ss composes surface-ordered exponentials in the fixed surface order; twists add: Tw(B1 ⁣ ⁣B2)=Tw(B1)+Tw(B2)\mathrm{Tw}(\mathcal{B}_1\!\circ\!\mathcal{B}_2)=\mathrm{Tw}(\mathcal{B}_1)+\mathrm{Tw}(\mathcal{B}_2). Equality of class functions is preserved up to boundary conjugation. (Annulus refinement/ordering convergence holds by the mesh-refinement limit on annuli.)

(c) Framing quantization. Changing the framing by one full 2π2\pi rotation shifts TwTw+1\mathrm{Tw}\mapsto \mathrm{Tw}+1 and multiplies the belt observable by eiαe^{i\alpha} (a standard framed-Wilson effect); this is the operational sense in which twist is quantized.


8.3 Derivation sketch (why the law holds)

  1. Surface vs. path. Adopt the surface definition H[B]=Pexp ⁣BF\mathcal{H}[\mathcal{B}]=\mathcal{P}\exp\!\iint_{\mathcal{B}}F (non-Abelian Stokes). For the two SK edges, line holonomies differ by exactly this surface object (upper–minus–lower).

  2. Thin-belt expansion. Use a geodesic-normal ribbon with framing U(s)U(s). Duhamel/Volterra calculus for surface order + Cartan’s identity gives a first-variation formula; as w ⁣ ⁣0w\!\downarrow\!0, the area contribution shrinks but a finite framing term remains, proportional to the twist of UU. This proves minimality: belts retain an invariant a single line loses.

  3. Framed-Wilson accounting. In Berry–Chern/Chern–Simons-type regimes, loop observables are framing-dependent; the standard cure is to frame the loop (narrow ribbon). The finite self-link (framing anomaly) precisely yields the eiαTwe^{i\alpha\,\mathrm{Tw}} factor, matching the belt’s two-boundary regularization.


8.4 Practical readout (how you’ll compute it)

  • Pick a class function: ϕ=argTrH\phi=\arg\mathrm{Tr}\,\mathcal{H} (or argdet\arg\det in U(1)/projected U(k)); then log

    Δϕ  =  B ⁣F  +  αTw(SBHL form).\Delta\phi \;=\; \iint_{\mathcal{B}}\!\mathcal{F}\;+\;\alpha\,\mathrm{Tw} \quad\text{(SBHL form)}.

    This is exactly the scalar form we’ll train/control later.

  • Twist: compute from the boundary framing (angle-accumulation or White’s vector formula).

  • α\alpha calibration: fix in your sector by a 4π4\pi periodicity test (twist step) or by matching a known exchange/statistics phase (Chapter 16 / benchmarks).

  • Refinement: mesh refine the annulus; the discrete surface product converges (annulus refinement lemma).


8.5 Unit tests you should pass

  1. Thin-limit framing. Shrink ww while keeping framing fixed → area term goes to zero but the measured phase tends to a nonzero constant proportional to Tw\mathrm{Tw}. (Pass if limit exists and is framing-dependent.)

  2. Framing quantization. Rotate framing by 2π2\pi → phase shifts by α\alpha (mod 2π2\pi).

  3. Admissible homotopy. Deform B\mathcal{B} keeping framed boundary fixed in a region where FF is flat → class function WW unchanged. (Otherwise differences track F\iiint F on the 3-chain.)


8.6 Where this plugs in next

  • Theorem B (next chapter link): first variation of the belt phase equals the measured geometric/adiabatic force.

  • Theorem C (later): exchange/statistics phases equal framed belt linking (self-link pieces reproduce the framing anomaly).


One-liner. The edge-to-edge holonomy on a two-boundary ribbon equals a surface-ordered curvature response dressed by a finite, quantized framing phase—the unavoidable residue of framing in the thin-belt limit. This is the FBHL.


Chapter 9 — Physical Consequences

Two takeaways:

  1. Continuous (geometric/adiabatic) forces are the first variation of the belt holonomy phase.

  2. Exchange/statistics phases are exactly framed belt linking; a clean 4π4\pi (double-braid) check follows immediately.


9.1 Theorem B — Geometric/adiabatic forces = variational response of belt holonomy

Setting. Let {γ(ϵ)}\{\gamma(\epsilon)\} be a C1C^1 family of closed loops in the channel manifold Θ\Theta. For each ϵ\epsilon, let Bϵ\mathcal{B}_\epsilon be the SK belt spanning the lifted boundaries Γ±(ϵ)\Gamma_\pm(\epsilon). Define the belt holonomy H[Bϵ]=Pexp ⁣BϵF\mathcal{H}[\mathcal{B}_\epsilon]=\mathcal{P}\exp\!\iint_{\mathcal{B}_\epsilon} F and its Wilson functional W(ϵ)=TrH[Bϵ]W(\epsilon)=\mathrm{Tr}\,\mathcal{H}[\mathcal{B}_\epsilon]. Let Φ(ϵ)=argW(ϵ)\Phi(\epsilon)=\arg W(\epsilon). Under the regularity listed in §7 (Uhlmann connection AA, continuous curvature FF, trace-class representation), the geometric response density along the loop satisfies

Fgeom(s)  =    δΦδγ(s)  =    δδγ(s)argTrPexp ⁣BF\boxed{\quad \mathcal{F}_{\text{geom}}(s) \;=\;-\;\frac{\delta \Phi}{\delta\gamma(s)} \;=\;-\;\frac{\delta}{\delta\gamma(s)}\,\arg \mathrm{Tr}\,\mathcal{P}\exp\!\iint_{\mathcal{B}} F \quad}

i.e., the measured adiabatic/anomalous force is the Gâteaux derivative of the belt-holonomy phase. The proof is ordered-exponential calculus on surfaces (Duhamel/Volterra) plus non-Abelian Stokes; commutator/ordering terms are kept and combine gauge-covariantly.

Abelian / pure-state reduction (sanity check). When FF effectively commutes along B\mathcal{B},

H[B]=exp ⁣BF,δΦ=BιδγF    Fgeom(s)=ιγ/sFB,\mathcal{H}[\mathcal{B}]=\exp\!\iint_{\mathcal{B}} F,\qquad \delta\Phi=\iint_{\mathcal{B}}\iota_{\delta\gamma}F \;\Rightarrow\; \mathcal{F}_{\text{geom}}(s)=-\,\iota_{\partial\gamma/\partial s} F\big|_{\partial\mathcal{B}} ,

which is the textbook Berry/Uhlmann anomalous term (curvature contracted on the boundary).

Orientation flip test. Reverse loop orientation: sss\mapsto -s. Then FgeomFgeom\mathcal{F}_{\text{geom}}\to -\,\mathcal{F}_{\text{geom}} because Φ\Phi reverses sign under boundary reversal—an immediate lab diagnostic that isolates geometric response from potential gradients.

Scope. The identity covers the adiabatic/geometric sector; non-geometric forces (local potentials, strongly inelastic channels) are outside its claims.


9.2 Theorem C — Exchange/statistics phases = framed belt linking

Let B1,B2\mathcal{B}_1,\mathcal{B}_2 be framed SK belts with boundaries Γi,±\Gamma_{i,\pm}. Define the framed belt linking

Lkbelt(B1,B2)  :=  σ,τ{+,}Lk ⁣(Γ1,σ,Γ2,τ).\mathrm{Lk}_{\text{belt}}(\mathcal{B}_1,\mathcal{B}_2) \;:=\;\sum_{\sigma,\tau\in\{+,-\}} \mathrm{Lk}\!\big(\Gamma_{1,\sigma},\Gamma_{2,\tau}\big).

In Berry–Chern / Chern–Simons–type sectors the exchange unitary obeys

Uex  =  exp ⁣(iλ  Lkbelt(B1,B2))    Ulocal,\boxed{\quad U_{\text{ex}} \;=\; \exp\!\Big(i\,\lambda\;\mathrm{Lk}_{\text{belt}}(\mathcal{B}_1,\mathcal{B}_2)\Big)\;\cdot\;\mathcal{U}_{\text{local}}, \quad}

where λ\lambda is the sector’s level/coupling and Ulocal\mathcal{U}_{\text{local}} collects non-topological local factors. Self-link pieces reproduce the familiar framing anomaly; mutual link gives the exchange/statistics phase. This is a representation-equivalence—no new ontology.

Why framed (not line) linking? In the thin-belt limit, a finite framing (self-link) contribution survives that a single unframed loop cannot encode; SK ribbons are exactly the standard framed-Wilson regularization.


9.3 Minimal checks & protocols (what to measure)

  1. Chirality-odd response (force orientation test). Run the same loop CW/CCW; the geometric component flips sign:
    FgeomFgeom\mathcal{F}_{\text{geom}}\mapsto-\mathcal{F}_{\text{geom}}. Distinguishes geometric transport from dissipative backgrounds.

  2. Framing toggle (self-link calibration). Add one unit of twist to the framing field UU (thin-belt). Belt observables shift by a constant phase α\propto \alpha while mutual linking phases stay fixed—separates self- from mutual-link contributions.

  3. 4π4\pi exchange interferometry (braid-twice test). Implement controlled exchanges between two belts; interference contrast is periodic in Lkbelt\mathrm{Lk}_{\text{belt}}. Systems that need a double exchange to return the phase (effective 4π4\pi) provide a crisp topological check of framed-link control.

  4. Admissible homotopy (flat-region invariance). Deform the spanning surface keeping framed boundaries fixed; in a flat FF region class functions of H\mathcal{H} are unchanged—surface dependence encodes genuine curvature. (Use as a mesh / gauge sanity check.)


9.4 Why belts (again): consistency with FBHL

Both theorems are exactly the readable consequences of FBHL:

Hol(Γ+)Hol(Γ)1=Pexp ⁣BF  ×eiαTw.\mathrm{Hol}(\Gamma_+)\mathrm{Hol}(\Gamma_-)^{-1} =\mathcal{P}\exp\!\iint_{\mathcal{B}}F\;\times e^{i\alpha\,\mathrm{Tw}}.
  • Theorem B takes the first variation of the belt phase Φ=argTrH[B]\Phi=\arg\mathrm{Tr}\,\mathcal{H}[\mathcal{B}].

  • Theorem C reads off the framed-link content of exchange in topological sectors (self-link = framing anomaly; mutual link = statistics).
    These live entirely within standard SK + Uhlmann + non-Abelian Stokes; belts are the minimal carriers (framing survives the thin limit).


One-liner

Forces are variations of belt holonomy; exchanges are framed linking. Verify with orientation flips, framing toggles, and 4π4\pi braid-twice interferometry.


Chapter 10 — Why Collapse Reduces to a 2D Belt

Principle: when a process admits two complementary projections (e.g., pre vs. post, intent vs. generation, forward vs. backward), model it on a two-boundary worldsheet. That worldsheet is a belt with edges Γ±\Gamma_\pm and interior B\mathcal{B}. On it, the measurable phase gap factors into flux + twist (FBHL/SBHL).


10.1 Two projections → two edges (why the belt is canonical)

  • Physics spine. In standard open-system geometry, Schwinger–Keldysh (SK) doubling lifts any loop γ\gamma to two boundary curves Γ±Θ×SK\Gamma_\pm \subset \Theta\times\mathrm{SK}. A smooth immersed belt with B=Γ+Γ\partial\mathcal{B}=\Gamma_+\sqcup\Gamma_- always exists (geodesic-normal ribbon); holonomy on B\mathcal{B} is defined by the surface-ordered exponential of the pulled-back curvature. This is the minimal geometric carrier—no new postulates.

  • AGI reading. In practice, we take two traces per episode: an intent/spec path (pre) and a generation/execution path (post). The annulus between them is B\mathcal{B}. The belt identity “edge–edge phase gap == surface flux ++ framing/twist” is then applied in semantic space (SBHL).

Technical remark (context): In SMFT-style collapse pictures, the pre-field / post-trace pair naturally supplies the two boundaries; the claim is that most observable phase behavior compresses to a 2D belt on that patch. We keep the book’s terminology neutral; this remark is for researchers.


10.2 Completeness conditions for a valid belt patch (checklist)

A 2D belt B\mathcal{B} is a complete patch when the following hold:

  1. Admissible two-trace lift. You can log or reconstruct two complementary traces for the same episode, Γ\Gamma_- and Γ+\Gamma_+, with consistent orientations (our upper–minus–lower convention). The SK construction guarantees a canonical model of this in physics, which we mirror in software.

  2. Smooth immersed annulus. There is a spanning ribbon with no degeneracy over the patch. The geodesic-normal construction gives a smooth belt for small thickness; a rectifiable 2-chain exists even under weak regularity (Lipschitz loops).

  3. Thin-ribbon regime. The local width ww satisfies maxsκw1\max_s |\kappa|\,w\ll1 so the belt chart and Jacobian are well-behaved; first-order ribbon operators (grad/div/curl/Δ\Delta) are stable. (We quantified this in Ch. 4.)

  4. Framing well-defined. A nowhere-vanishing framing field along the boundary exists; its twist Tw\mathrm{Tw} is stable. In the thin-belt limit, framing survives and contributes a finite phase—hence two boundaries + framing are minimal.

  5. Gauge & parametrization robustness. Belt holonomy is gauge-covariant and reparametrization-independent (curvature is a 2-form). Your scalar readouts should be class functions (e.g., argTr\arg\mathrm{Tr}).

  6. Flux locality over width (engineering). The interior curvature doesn’t vary so wildly across nn that the annulus ceases to represent a coherent 2D projection for the task. When this fails, use an extension (next section).

Operational test of completeness. On a good patch, the measured phase gap from Hol(Γ+)Hol(Γ)1\mathrm{Hol}(\Gamma_+)\mathrm{Hol}(\Gamma_-)^{-1} matches flux + αTw\alpha\,\mathrm{Tw} within tolerance. A persistent residual indicates either estimator issues (fix gauge/class-function choice) or the need for slabs / networks / membranes below.


10.3 The ribbon as the normal form of collapse (intuition for engineers)

  • The belt captures geometric phase via BF\iint_{\mathcal{B}}\mathcal{F}, style/encoding via Tw\mathrm{Tw}, and edge observables via upper–minus–lower holonomy. This exactly matches what AGI systems need to measure and steer in practice.

  • Within the pre/post picture, the 2D belt is not a heuristic—it’s the standard form that keeps all invariants you care about on that patch.


10.4 When the belt alone is not enough (and what to add)

  1. Slabs (time-phase heavy). If dynamical phase accumulates differently on the two edges (e.g., time/energy terms matter), extrude the belt in time to a thin slab, then split total phase into geometric + dynamical parts. This keeps FBHL clean for the geometric piece.

  2. Networks (branch/merge). If the episode branches or merges (tool calls, options, agent junctions), connect belts by pair-of-pants cobordisms into a belt network. Belt tiling preserves composition and lets you track flux / twist per tile.

  3. Membranes (higher forms). If phenomena are truly higher-form (2-form/3-form holonomies that cannot be restricted to an annulus), promote the model to membranes/volumes—the belt then serves as a boundary condition or local cross-section.


10.5 Minimal construction protocol (what you implement)

  1. Choose a semantic connection A\mathcal{A} (U(1)/U(k); mixed-state Uhlmann if noisy).

  2. Extract two traces Γ\Gamma_- (intent/spec) and Γ+\Gamma_+ (generation/execution); tile a thin annulus between them. (Geodesic-normal ribbon is the canonical construction.)

  3. Compute invariants: surface-ordered BF\iint_{\mathcal{B}}\mathcal{F} and Tw\mathrm{Tw} from framing; report argTrH[B]\arg\mathrm{Tr}\,\mathcal{H}[\mathcal{B}] (or argdet\arg\det).

  4. Calibrate α\alpha (framing coefficient) via a 4π4\pi twist/periodicity test or a known exchange phase; log tolerance bands.

  5. If mismatch persists, extend to slab (time-phase), network (branch/merge), or membrane (higher-form).


10.6 Diagnostics & guardrails (to know the 2D reduction is sound)

  • Reparam/gauge invariance checks: swap parameterizations and gauges; class-function phases must agree (otherwise your estimator, not the belt, is at fault).

  • Thin-ribbon guard: ensure κw1\kappa w \ll 1 and no self-intersection; else thicken to a slab or retile into a network.

  • Framing stability: Tw\mathrm{Tw} should be stable under belt refinement; add or remove a full twist to test quantization (phase shifts by eiαe^{i\alpha}).


10.7 Example: code-assistant with hidden time-phase

A code-assistant must translate Python→TypeScript under strict style; inference uses a long tool chain. We take: Γ=\Gamma_-= intent/spec, Γ+=\Gamma_+= actual generation. Early runs show a phase-gap residual unexplained by F+αTw\iint \mathcal{F} + \alpha\,\mathrm{Tw}. We add a thin slab to capture time-phase, split off dynamical contributions, and the residual collapses to tolerance. Now flux spikes flag prompt-injection, and stepping Tw\mathrm{Tw} yields controlled style shifts. (This is the default playbook we’ll implement in Part V.)


One-liner

Two projections give two edges; the 2D belt between them is the correct normal form. Use it until a diagnostic tells you to extend—slabs for time-phase, networks for branches, membranes for higher-form effects.


Chapter 11 — Visual Grammar of Ribbons

Aim: give engineers a shared visual + algebraic language for belts so diagnostics, training logs, and papers all “look the same”—and make clear when to stick with a ribbon vs. escalate to slabs, networks, or membranes.


11.1 Ribbon, volume, network — what each picture means

Ribbon (belt, 2D annulus)

  • Use when: you have two complementary traces (e.g., intent vs. generation; forward vs. backward) and local transverse variation is tame.

  • Carries: edge holonomies (upper–minus–lower), curvature flux through the belt, framing/twist along edges.

  • Payoff: minimal surface that preserves the invariants needed for safety/style/planning.

Volume (slab / time-extended belt)

  • Use when: dynamical phase matters (time/energy accumulation differs across edges) or when width grows over time.

  • Carries: everything a ribbon carries plus separable time-phase.

  • Payoff: lets you subtract dynamical components cleanly; keeps FBHL for the geometric piece.

Network (belt cobordisms / branches & merges)

  • Use when: episodes branch/merge (tool calls, options, multi-agent junctions).

  • Carries: per-tile flux & twist; composition obeys conserved “upper–minus–lower” orientation across junctions.

  • Payoff: plan repair and consensus become graph problems with belt tiles as edges/faces.

(Membranes/higher forms are deferred to Part IX; treat them as exceptional when ribbon information is provably insufficient.)


11.2 Visual grammar (standard glyphs you should draw)

  • Edges Γ±\Gamma_\pm: draw two closed curves with arrows; label upper Γ+\Gamma_+ and lower Γ\Gamma_-.

  • Orientation rule: annotate boundary equation B=Γ+Γ\partial\mathcal{B}=\Gamma_+ - \Gamma_- somewhere visible.

  • Width ww: show a few transverse ticks from Γ\Gamma_- to Γ+\Gamma_+ (this is +n+n).

  • Framing UU & angle ϕ\phi: short hairlines along the edge; small spiral icons where ϕ\phi rotates; tally Tw in the legend.

  • Flux BF\iint_{\mathcal{B}}\mathcal{F}: shaded interior with isoflux contours or arrows normal to the surface.

  • Phase-gap Δϕ\Delta\phi: a bold Δ above the belt linking Γ\Gamma_- to Γ+\Gamma_+.

  • Anomaly badges: if you detect residuals after FBHL/SBHL fit, add a ⚠ badge with the residual magnitude.

House style: always put a tiny “upper−lower” tag near the belt; reviewers won’t argue sign conventions if you do this.


11.3 What survives the projection (and what doesn’t)

Invariants preserved by a good belt projection (2D):

  1. Edge–edge phase gap (class function of boundary holonomies).

  2. Integrated curvature flux through the belt interior.

  3. Framing/twist along the edges (quantized shift under 2π2\pi rotation).

  4. Composition law under tiling/gluing (annulus partitions).

  5. Gauge & reparametrization invariance (because flux is a 2-form; edge invariants are class functions).

Information that may be lost / distorted by projection:

  • Strong transverse non-commutativity: if [A(n1),A(n2)][\,\mathcal{A}(n_1),\mathcal{A}(n_2)\,] varies wildly across width, a single belt can smear ordering effects.

  • Higher-form couplings: phenomena that require genuine 2-/3-form holonomies beyond an annulus.

  • Non-orientable spans / self-intersections: a Möbius-like span or a self-crossing centerline breaks the ribbon assumptions.

  • Rapid width growth or branchings: the belt’s “thin” hypothesis fails; escalate to slab or network.


11.4 Projection quality: fast diagnostics

Let (s,n)(s,n) be belt coordinates with n[0,w]n\in[0,w].

  • Transverse variance of curvature

    Vn:=1w0wF(s,n)Fˉ(s)dn,Fˉ(s):=1w0wF(s,n)dn.V_n := \frac{1}{w}\int_0^w \|\mathcal{F}(s,n)-\bar{\mathcal{F}}(s)\|\,dn,\quad \bar{\mathcal{F}}(s):=\frac{1}{w}\int_0^w\mathcal{F}(s,n)\,dn.

    Heuristic: if maxsVn\max_s V_n exceeds your tolerance band, the belt is too “thick”; refine or go to a slab.

  • Commutator norm across width

    χ:=1w2 ⁣ ⁣0w ⁣ ⁣0w ⁣ ⁣[A(s,n1),A(s,n2)]dn1dn2.\chi := \frac{1}{w^2}\!\!\int_{0}^{w}\!\!\int_{0}^{w}\!\!\|\,[\mathcal{A}(s,n_1),\mathcal{A}(s,n_2)]\,\|\,dn_1dn_2.

    Large χ\chi ⇒ ordering is width-sensitive; consider n-slicing (more MM) or escalate.

  • FBHL residual (scalar check)

    ϵFBHL:=ΔϕBFαTw.\epsilon_{\text{FBHL}} := \Big|\Delta\phi - \iint_{\mathcal{B}}\mathcal{F} - \alpha\,\mathrm{Tw}\Big|.

    Persistent ϵFBHL\epsilon_{\text{FBHL}} beyond noise indicates estimator or modeling failure; try slab/network.


11.5 Engineering payoff

Stable metrics. 2D belts remove irrelevant degrees of freedom; phase-gap, flux, and twist are low-variance under reparametrization/gauge changes. You get cleaner learning curves and reliable early warnings.

Faster training. With the Two-Boundary Loss (TBL) and Flux Regularization (FR):

  • smaller hypothesis class → fewer samples to reach a target ϵ\epsilon,

  • better gradient signal (flux/twist are geometry-aware),

  • improved generalization under paraphrase/style perturbations.

Stronger safety gates. Streaming flux-spike detectors (semantic Faraday) are robust to paraphrase and prompt shuffling, because they ride on curvature changes, not token n-grams. Twist thresholds give style dials that are monotone and quantized—harder to circumvent.


11.6 Cookbook: how to show the belt in dashboards

  1. Belt strip panel: draw Γ±\Gamma_\pm, shade flux; display Δϕ\Delta\phi, F\iint\mathcal{F}, Tw\mathrm{Tw}, ϵFBHL\epsilon_{\text{FBHL}}.

  2. Flux timeline: plot t ⁣nF\partial_t\!\int_{n}\mathcal{F} while generating; set a redline threshold for spikes.

  3. Twist ladder: step Tw\mathrm{Tw} in 0.50.5 or 1.01.0 units; show output snippets side-by-side to calibrate style changes.

  4. Projection health tile: live bars for Vn,χV_n,\chi; when either exceeds a budget, auto-escalate to slab or suggest network tiling.

  5. Edge parity check: render CW vs. CCW traversals; geometric force should flip sign (quick sanity).


11.7 Micro-vignettes (what the plots look like)

  • Prompt injection: user pastes an “override” snippet mid-run. The flux timeline spikes (sharp ridge in the belt interior), Δϕ\Delta\phi jumps, safety gate halts before commit. Tokens look innocuous; the belt doesn’t.

  • Style drift: same plan, slipping from “typed TS” to “chatty JS.” Flux stays smooth; Tw\mathrm{Tw} increments discretely; controller nudges twist back by 1-1 step—content unchanged, style fixed.

  • Plan detour: multi-tool solve; belt area accumulates over three tiles; tiling shows where the detour started; repair replaces only the faulty tile.


11.8 When the ribbon is not enough (and what to do)

  • Large κw\kappa w or Vn,χV_n,\chi budgets broken → Slab: extrude in time, separate dynamical phase, retest ϵFBHL\epsilon_{\text{FBHL}}.

  • Branch/merge semanticsNetwork: pair-of-pants cobordisms; enforce orientation and flux conservation per junction.

  • Higher-form cues (e.g., clear 2-form/3-form effects not collapsing to an annulus) → Membrane: promote model; keep the belt as boundary conditions.


11.9 Field checklist (paste into your README)

  • Two traces captured (intent/generation) with consistent upper−lower orientation.

  • Belt thinness guard: maxκw<0.2\max |\kappa| w<0.2 (or your calibrated bound).

  • Projection health: maxsVn\max_s V_n and χ\chi within budgets.

  • FBHL residual ϵFBHL\epsilon_{\text{FBHL}} below tolerance; else escalate.

  • Safety: flux redline calibrated; gate active pre-commit.

  • Style: twist ladder tested; 2π2\pi rotation quantization observed (phase shifts by eiαe^{i\alpha}).

  • Logs store Δϕ, F, Tw, Vn, χ, ϵFBHL\Delta\phi,\ \iint\mathcal{F},\ \mathrm{Tw},\ V_n,\ \chi,\ \epsilon_{\text{FBHL}} per run.


One-liner

Draw belts by default. They preserve phase-gap, flux, and twist—the invariants that matter—so your metrics stabilize, training speeds up, and safety gates get teeth. When the belt’s health lights go red, escalate to slab, network, or membrane.


Chapter 12 — Semantic States, Connections, Curvature

(U(1)/U(k) & mixed-state (Uhlmann) options; estimator choices and gauge covariance)

Goal: turn model traces into a connection A\mathcal{A} on the ribbon B\mathcal{B} and a curvature F\mathcal{F} you can integrate. We keep estimators gauge-covariant and read out only class-function invariants (phases) for stability.


12.1 What counts as a “semantic state” (inputs you can use)

For each position ss along a trace (edge), extract any of:

  1. Embeddings z(s)Rdz(s)\in\mathbb{R}^d (sentence/step vectors).

  2. Hidden states h(s)Rdh_\ell(s)\in\mathbb{R}^d from a chosen layer \ell (token- or step-level; often averaged across a small window).

  3. Logit distributions p(s)ΔV1p(s)\in\Delta^{V-1} (softmax probs); map to amplitudes via ψ(s)=p(s)\psi(s)=\sqrt{p(s)} (pure-state proxy) or to density matrices ρ(s)=diag(p(s))\rho(s)=\mathrm{diag}(p(s)) (mixed-state proxy).

  4. Covariance features C(s)=E[ϕϕ]C(s)=\mathbb{E}[\,\phi\phi^\dagger\,] over a short window (for Uhlmann).

Preprocess with: centering/whitening, 2\ell_2 normalization, optional complexification via analytic signal (Hilbert transform) if you want U(1) phases from real features.


12.2 Three connection families (choose one per experiment)

  • U(1) (scalar phase) — simplest; robust; yields a single phase per edge.

  • U(k) (Stiefel frame) — track a kk-dimensional semantic subspace; better signal/noise; richer invariants.

  • Uhlmann (mixed state) — for stochastic/noisy settings; parallel transports density matrices ρ\rho.

All three give a connection 1-form A=Asds+Andn\mathcal{A}=\mathcal{A}_s\,ds+\mathcal{A}_n\,dn on the belt and a curvature 2-form F=dA+AA\mathcal{F}=d\mathcal{A}+\mathcal{A}\wedge\mathcal{A}.


12.3 U(1) estimator (one complex channel)

State. Pick a complex scalar ψ(s)\psi(s) from your features (e.g., project z(s)z(s) onto a fixed reference qq, then analytic-signal): ψ(s)=q,z(s)C\psi(s)=\langle q,z(s)\rangle_\mathbb{C}, normalized to ψ=1|\psi|=1.

Connection (continuous): As=Imψ,sψA_s=\mathrm{Im}\,\langle \psi,\,\partial_s \psi\rangle.
Discrete edge increment:

Asds    arg(ψkψk+1).\int A_s\,ds\;\approx\;\arg\big(\psi_{k}^{*}\,\psi_{k+1}\big).

Across-belt increment (at fixed ss) for AnA_n:

Andn    arg(ψ(s)ψ+(s)).\int A_n\,dn\;\approx\;\arg\big(\psi_{-}(s)^{*}\,\psi_{+}(s)\big).

Curvature on a cell with corners (k,m)(k+1,m+1)(k,m)\to(k+1,m+1): sum the four edge phase increments with the upper−lower sign rule; or use the discrete Stokes form.

Pros/cons. Very stable, but may underresolve multi-style interactions; use when you want a single, interpretable belt phase.


12.4 U(k) estimator (orthonormal frames on the Stiefel manifold)

State. Build a kk-frame Φ(s)Cd×k\Phi(s)\in\mathbb{C}^{d\times k} with orthonormal columns spanning your “semantic subspace”:

  • Option A (PCA/SVD on a window): Φ\Phi = top-kk left singular vectors of [z(sτ:s+τ)][z(s-\tau:\,s+\tau)].

  • Option B (CCA across edges): choose Φ,Φ+\Phi_-,\Phi_+ to maximize alignment between intent vs. generation at each ss.

Continuous connection: As=ImΦsΦu(k)A_s=\mathrm{Im}\,\Phi^\dagger \partial_s \Phi\in\mathfrak{u}(k) (skew-Hermitian).
Discrete edge transport (Procrustes/parallel transport): For consecutive frames Φk,Φk+1\Phi_k,\Phi_{k+1}, solve

Rk=argminRU(k)Φk+1ΦkRFRk=Polar ⁣(ΦkΦk+1),R_k=\arg\min_{R\in U(k)}\|\Phi_{k+1}-\Phi_k R\|_F \quad\Rightarrow\quad R_k=\mathrm{Polar}\!\big(\Phi_k^\dagger \Phi_{k+1}\big),

then edge increment Asdslog(Rk)\int A_s\,ds \approx \log(R_k) (principal matrix log in u(k)\mathfrak{u}(k)).
Across-belt at fixed ss: compute Rn=Polar(ΦΦ+)R_n=\mathrm{Polar}(\Phi_-^\dagger \Phi_+), then Andnlog(Rn)\int A_n\,dn\approx \log(R_n).

Curvature on a cell:

  • BCH to second order: Fcelllog ⁣(elogRselogRnelogRselogRn)F_{\text{cell}}\approx \log\!\big(e^{\log R_s}e^{\log R_n}e^{-\log R_s}e^{-\log R_n}\big)

  • Or do surface-ordered multiplication of small-cell holonomies and take a class function.

Scalar invariants (class functions):

  • Phase gap: Δϕ=argdet ⁣(Hol(Γ+)Hol(Γ)1)\Delta\phi=\arg\det\!\big(\mathrm{Hol}(\Gamma_+) \mathrm{Hol}(\Gamma_-)^{-1}\big).

  • Trace phase: argTrH[B]\arg\,\mathrm{Tr}\, \mathcal{H}[\mathcal{B}].

  • Principal eigenphase of H\mathcal{H}.

Notes. This estimator is gauge-covariant under right-unitary frame changes ΦΦG\Phi\mapsto \Phi G because RGRGR\mapsto G^\dagger R G; all class-function readouts are invariant.


12.5 Uhlmann estimator (mixed states; density matrices)

State. At each ss, estimate a density matrix ρ(s)0\rho(s)\succeq0 with Trρ=1\mathrm{Tr}\,\rho=1. Practical choices:

  • ρ=Cov[z]\rho=\mathrm{Cov}[z] over a small window, normalized;

  • diagonal ρ=diag(p)\rho=\mathrm{diag}(p) from logits pp;

  • shrinkage toward identity for numerical stability.

Purification & transport. Use the amplitude W=ρUW=\sqrt{\rho}\,U (any UU(d)U\in U(d)) with ρ=WW\rho=WW^\dagger. Between ρk,ρk+1\rho_k,\rho_{k+1}, define the Uhlmann parallel transport by polar decomposition:

Xk=ρkρk+1Uk=Polar(Xk)U(d),X_k=\sqrt{\rho_k}\sqrt{\rho_{k+1}}\quad\Rightarrow\quad U_k=\mathrm{Polar}(X_k)\in U(d),

then the edge holonomy increment is UkU_k (class functions of the product kUk\prod_k U_k are the Uhlmann phases). Across the belt at fixed ss, do the same with ρ(s),ρ+(s)\rho_-(s),\rho_+(s).

Curvature. Form small plaquette holonomies using the four transports around a cell; use argdet\arg\det or argTr\arg\,\mathrm{Tr} as your scalar curvature proxy.

Notes. This is robust in noisy/stochastic regimes and reduces to Berry when ρ\rho is rank-1.


12.6 Gauge covariance (what transforms, what doesn’t)

Let g(s)U(k)g(s)\in U(k) (or U(d)U(d)) be a gauge change (reframing of features/coordinates). Then

A    g1Ag+g1dg,F    g1Fg.\mathcal{A}\;\mapsto\; g^{-1}\mathcal{A}g + g^{-1}dg, \qquad \mathcal{F}\;\mapsto\; g^{-1}\mathcal{F}g.

Our estimators implement this by Procrustes/polar steps, so discrete transports conjugate accordingly. You should therefore log only class functions (e.g., argdet\arg\det, argTr\arg\,\mathrm{Tr}, eigenphases) as belt invariants and use them in losses/controllers.


12.7 Building the belt connection (edges and across)

For each episode:

  1. Edges. Estimate As\mathcal{A}_s and edge holonomies on Γ\Gamma_- and Γ+\Gamma_+ with your chosen family (U(1), U(k), or Uhlmann).

  2. Across. At matched ss, estimate An\mathcal{A}_n by transporting lower→upper (Procrustes/polar).

  3. Cells. Compute small-cell holonomies (surface-ordered).

  4. Curvature. Either assemble by discrete Stokes (Abelian) or by plaquette holonomy (non-Abelian).

  5. Belt scalar outputs.

    • Phase gap: Δϕ\Delta\phi from edge holonomies (class function).

    • Flux: BF\iint_{\mathcal{B}}\mathcal{F} via surface-ordered product / plaquettes.

    • Twist: Tw\mathrm{Tw} from the framing field on edges (Ch. 6).


12.8 Practical choices & defaults

  • Family defaults. Start with U(k), k[8,32]k\in[8,32]; if very noisy, switch to Uhlmann; for a lightweight probe, use U(1).

  • Smoothing. Apply short Savitzky–Golay smoothing on frames or density matrices before transport; keep windows symmetric so phase isn’t biased.

  • Temporal gauge. Use parallel-transport gauge (Procrustes) along edges to minimize per-step rotation (reduces drift).

  • Across-matching. Align Γ\Gamma_- and Γ+\Gamma_+ by timestamps or by dynamic time warping (DTW) on embeddings, then sample on a common ss-grid.

  • Numerics. Use principal matrix logs for logR\log R; clip spectra away from the branch cut; if needed, fall back to BCH-2.


12.9 Pseudocode (U(k) case; others analogous)

# Inputs: edge feature streams Z_minus[s], Z_plus[s]; k, grid {s_k}
# Output: Δφ, flux, Tw, and (optionally) curvature map

Φ_minus = orthonormal_frames(Z_minus, k)   # Stiefel frames along Γ-
Φ_plus  = orthonormal_frames(Z_plus,  k)   # Stiefel frames along Γ+

# Edge transports (Procrustes) and edge holonomies
R_s_minus[k] = polar( Φ_minus[k].H @ Φ_minus[k+1] )
R_s_plus[k]  = polar( Φ_plus[k].H  @ Φ_plus[k+1]  )

Hol_minus = Π_k R_s_minus[k]
Hol_plus  = Π_k R_s_plus[k]

# Across-belt transports at matched s
R_n[k] = polar( Φ_minus[k].H @ Φ_plus[k] )

# Curvature on cells via plaquette holonomy
H_cell[k] = R_s_plus[k] @ R_n[k+1] @ R_s_minus[k].H @ R_n[k].H

# Belt scalars (class functions)
Δφ   = arg det( Hol_plus @ Hol_minus.H )
flux = Σ_k arg det( H_cell[k] )          # or arg Tr
Tw   = framing_twist_from_edges(...)

12.10 Diagnostics & failure modes

  • Gauge leakage: if Δϕ\Delta\phi changes under frame re-initialization, you logged a non-invariant (fix to class functions).

  • Projection stress: large across-width commutators or FBHL residual ⇒ thicken to slab or retile into a network.

  • Rank drift (Uhlmann): if ρ\rho becomes nearly singular, add Tikhonov ρ(1λ)ρ+λI/d\rho\leftarrow(1-\lambda)\rho+\lambda I/d.


12.11 What to store in logs

Per episode (and per tile if using networks):
Δϕ, BF\Delta\phi,\ \iint_{\mathcal{B}}\mathcal{F} (class-function scalar), Tw\mathrm{Tw}, thinness κw\kappa w, projection health (commutator/variance across width), residual ϵFBHL\epsilon_{\text{FBHL}}, and your estimator family + hyperparams (k, window, smoothing).


One-liner. Pick U(1)/U(k)/Uhlmann, estimate transports with polar/Procrustes, read out class-function phases, and you’ve got a gauge-robust A\mathcal{A} and F\mathcal{F} on your ribbon—ready for SBHL’s “phase gap = meaning flux + style twist.”


Chapter 13 — SBHL: “Phase Gap = Meaning Flux + Style Twist”

Semantic Belt Holonomy Law (SBHL) on a ribbon B\mathcal{B} with edges Γ±\Gamma_\pm:

Γ+ ⁣AsΓ ⁣AsΔϕ (edge–edge phase gap)  =  B ⁣Fsmeaning flux  +  αTwstyle twist\boxed{\quad \underbrace{\oint_{\Gamma_+}\!\mathcal{A}_s-\oint_{\Gamma_-}\!\mathcal{A}_s}_{\displaystyle \Delta\phi\ \text{(edge–edge phase gap)}} \;=\; \underbrace{\iint_{\mathcal{B}}\!\mathcal{F}_s}_{\displaystyle \text{meaning flux}} \;+\; \underbrace{\alpha\,\mathrm{Tw}}_{\displaystyle \text{style twist}} \quad}
  • As\mathcal{A}_s is a semantic connection (from Ch. 12; U(1) / U(k) / Uhlmann).

  • Fs=dAs+AsAs\mathcal{F}_s=d\mathcal{A}_s+\mathcal{A}_s\wedge \mathcal{A}_s is the semantic curvature.

  • Tw\mathrm{Tw} is the framing twist along the edges (Ch. 6).

  • α\alpha is a sector coefficient (calibrate once via 4π4\pi test or a known reference).

Orientation and ordering follow our belt conventions: upper minus lower, lower→upper in nn, then forward in ss.


13.1 Scalar invariants you actually log

Work with class functions so results are gauge-robust and reparametrization-invariant.

  • U(1): Δϕ=karg(ψ+(k)ψ+(k ⁣+ ⁣1))karg(ψ(k)ψ(k ⁣+ ⁣1))\Delta\phi = \sum_k \arg(\psi_+^*(k)\psi_+(k\!+\!1)) - \sum_k \arg(\psi_-^*(k)\psi_-(k\!+\!1)).

  • U(k):

    • Determinant phase (default): Δϕ=argdet ⁣(Hol(Γ+)Hol(Γ)1)\displaystyle \Delta\phi=\arg\det\!\big(\mathrm{Hol}(\Gamma_+)\,\mathrm{Hol}(\Gamma_-)^{-1}\big).

    • Trace/character phase: argTrH[B]\arg\,\mathrm{Tr}\,\mathcal{H}[\mathcal{B}].

    • Principal eigenphase: argλmax(H[B])\arg \lambda_{\max}(\mathcal{H}[\mathcal{B}]).

  • Uhlmann: same as U(k) but holonomies from polar transports on ρ\sqrt{\rho}.

Flux scalar on the mesh (plaquettes HcellH_{cell}):
ΦFBFs    cellsargdet(Hcell).\displaystyle \Phi_{\mathcal{F}} \equiv \iint_{\mathcal{B}}\mathcal{F}_s \;\approx\; \sum_{cells} \arg\det(H_{cell}).

Twist: Tw=12πdϕ\displaystyle \mathrm{Tw}=\tfrac{1}{2\pi}\oint d\phi (or White’s vector formula); step-quantized under 2π2\pi framing rotations.


13.2 Semantic Faraday law (online safety view)

Treat generation as time-evolving; differentiate SBHL:

ddtΔϕ(t)=B(t)tFs  +  αTw˙(t)Eedge(t).\frac{d}{dt}\Delta\phi(t)=\iint_{\mathcal{B}(t)}\partial_t \mathcal{F}_s\;+\;\alpha\,\dot{\mathrm{Tw}}(t)\quad \equiv\quad \mathcal{E}_\text{edge}(t).
  • Eedge(t)\mathcal{E}_\text{edge}(t) acts like an edge-gap EMF: a rate-of-change of phase gap.

  • Flux spikes (tFs\partial_t\mathcal{F}_s large) are agenda shifts / prompt-injection signatures.

  • Twist rate Tw˙\dot{\mathrm{Tw}} gives a style/voice dial (quantized steps).

Cognitive work (per episode). Define Wcog=Eedge(t)dt=ΔϕfinalΔϕstartW_{\text{cog}}=\int \mathcal{E}_\text{edge}(t)\,dt=\Delta\phi_{\text{final}}-\Delta\phi_{\text{start}}. Use it as a budget: big WcogW_{\text{cog}} without corresponding task progress often flags derailment.


13.3 SBHL residual and the training objective

Define the SBHL residual:

ϵSBHL  =    Δϕ    ΦF    αTw  .\epsilon_{\text{SBHL}} \;=\; \Big|\;\Delta\phi \;-\; \Phi_{\mathcal{F}} \;-\; \alpha\,\mathrm{Tw}\;\Big|.

Then build:

  • Two-Boundary Loss (TBL): LTBL=ϵSBHL2L_{\text{TBL}}=\epsilon_{\text{SBHL}}^2.

  • Flux Regularization (FR): penalize excessive ΦF\Phi_{\mathcal{F}} subject to task success: LFR=λΦmax(0,ΦFτΦ)L_{\text{FR}}=\lambda_\Phi \max(0,\Phi_{\mathcal{F}}-\tau_\Phi).

  • Twist Steering (TS): keep style near target Tw0\mathrm{Tw}_0: LTS=λT(TwTw0)2L_{\text{TS}}=\lambda_T(\mathrm{Tw}-\mathrm{Tw}_0)^2.

Total semantic loss (additive to task loss):

Lsem=LTBL+LFR+LTS.L_{\text{sem}}=L_{\text{TBL}}+L_{\text{FR}}+L_{\text{TS}}.

13.4 Inference-time controllers (live safety & style)

  • Flux gate (safety): compute tΦF(t)\partial_t \Phi_{\mathcal{F}}(t); if it exceeds a calibrated redline Φ˙crit\dot\Phi_\mathrm{crit}, pause/ask/rollback the step (pre-commit).

  • Twist dial (style): quantized increments TwTw±1\mathrm{Tw}\mapsto \mathrm{Tw}\pm 1 change voice/register predictably without content drift; expose as a slider.

  • Plan repair via tiling: localize large HcellH_{cell} phases to a tile; re-run only that segment.


13.5 Toy experiments (reproducible baselines)

A) A/B Paraphrase loop (control: “no meaning change”)

  • Setup: two prompts yield the same answer content with different surface realizations; Γ=\Gamma_-= intent/spec; Γ+=\Gamma_+= generation.

  • Expected: ΦF0\Phi_{\mathcal{F}}\approx 0, ΔϕαTw\Delta\phi \approx \alpha\,\mathrm{Tw}.

  • Pass if: residual ϵSBHL\epsilon_{\text{SBHL}} is within tolerance; twist steps align with observed style flips.

B) Twist quantization (style ladder)

  • Setup: apply controlled framing rotation by 2π2\pi along edges (or an equivalent stylistic axis change).

  • Expected: TwTw+1\mathrm{Tw}\mapsto \mathrm{Tw}+1, ΔϕΔϕ+α\Delta\phi\mapsto \Delta\phi+\alpha (mod 2π2\pi).

  • Pass if: output style shifts discretely while task content stays fixed; measured phase shift matches α\alpha.

C) Curvature pump (geometric work without content change)

  • Setup: design a cyclic context path with small local deformations that integrate to non-zero ΦF\Phi_{\mathcal{F}} (Thouless-like pump).

  • Expected: Δϕ\Delta\phi accumulates over the cycle with minimal change in tokens aside from paraphrase; Tw\mathrm{Tw} stays near target.

  • Pass if: net ΔϕΦF\Delta\phi\approx \Phi_{\mathcal{F}} within tolerance; repeatability over cycles.


13.6 Minimal implementation recipe (U(k), others analogous)

  1. Build Stiefel frames Φ±(s)\Phi_\pm(s) on edges (Ch. 12).

  2. Edge transports: Rs,±[k]=Polar(Φ±[k]Φ±[k ⁣+ ⁣1])R_{s,\pm}[k]=\mathrm{Polar}(\Phi_\pm^\dagger[k]\Phi_\pm[k\!+\!1]); edge holonomies = product over kk.

  3. Across transports: Rn[k]=Polar(Φ[k]Φ+[k])R_n[k]=\mathrm{Polar}(\Phi_-^\dagger[k]\Phi_+[k]).

  4. Plaquette holonomies: Hcell[k]=Rs,+[k]Rn[k ⁣+ ⁣1]Rs,[k]1Rn[k]1H_{cell}[k]=R_{s,+}[k]\,R_n[k\!+\!1]\,R_{s,-}[k]^{-1}\,R_n[k]^{-1}.

  5. Readouts:

    • Δϕ=argdet(Hol+Hol1)\Delta\phi=\arg\det(\mathrm{Hol}_+\,\mathrm{Hol}_-^{-1})

    • ΦF=kargdet(Hcell[k])\Phi_{\mathcal{F}}=\sum_k \arg\det(H_{cell}[k])

    • Tw\mathrm{Tw} from framing along edges

    • ϵSBHL\epsilon_{\text{SBHL}} for the loss/gate.


13.7 Calibration & thresholds

  • α\alpha (framing coefficient): do the 4π4\pi (double-twist / braid-twice) test; fit α\alpha so Δϕ\Delta\phi shifts by exactly α\alpha per 2π2\pi twist unit.

  • Redlines: set Φ˙crit\dot\Phi_\mathrm{crit} from P95 of clean runs; trip gate when tΦF\partial_t\Phi_{\mathcal{F}} exceeds it for \ge mm consecutive steps.

  • Projection health: monitor commutator/variance across width; escalate to slab or network when budgets break (Ch. 11).


13.8 Logging schema (per episode)

Store: Δϕ\Delta\phi, ΦF\Phi_{\mathcal{F}}, Tw\mathrm{Tw}, ϵSBHL\epsilon_{\text{SBHL}}, tΦF(t)\partial_t\Phi_{\mathcal{F}}(t) series, thinness κw\kappa w, projection health metrics (Vn,χV_n,\chi), estimator family + hyperparams (U(1)/U(k)/Uhlmann; kk; window; smoothing). Keep both raw holonomies and scalar class-function readouts for audits.


13.9 Common failure modes & fixes

  • Gauge leakage: Δϕ\Delta\phi changes under frame re-init → use class functions only (arg det / arg Tr / eigenphase).

  • Residual won’t vanish: check sampling alignment for Γ±\Gamma_\pm; apply DTW; increase MM (across-width slices); verify twist estimator (unwrap ϕ\phi).

  • Noisy density matrices (Uhlmann): add shrinkage ρ(1λ)ρ+λI/d\rho\leftarrow(1-\lambda)\rho+\lambda I/d; clamp spectra from 0.

  • Projection too thick: high across-width commutators/variance → promote to slab (time-phase) or network (branch/merge).


One-liner

SBHL turns the belt into a control panel: the phase gap splits into meaning flux (safety signal) and style twist (voice dial). Measure them, minimize the residual, and your AGI’s behavior becomes steerable, auditable, and robust.


Chapter 14 — (Remark) Hetu–Luoshu as Pre/Post Templates

Side note for researchers: view Hetu as a 10-node pre-field (pre-collapse attractor lattice) and Luoshu as a 9-mode post-trace (collapse geometry). On any local patch that respects this pre/post split, the belt is the correct 2D measurement surface: two edges for the two projections; interior flux and edge twist capture the invariants.


14.1 Pre vs. Post in SMFT terms (what the numbers “are”)

  • Luoshu (9 modes) = minimal collapse trace manifold: a closed, quantized cycle of entropy-consuming attention events (Ô-trace) with nine distinguishable modal peaks; empirically plausible as a universal “nine-state” loop in discrete semantic dynamics.

  • Hetu (10 nodes) = pre-collapse attractor lattice: five symmetric sum-11 pairs (1 ⁣ ⁣6),(2 ⁣ ⁣7),(3 ⁣ ⁣8),(4 ⁣ ⁣9),(5 ⁣ ⁣10)(1\!-\!6),(2\!-\!7),(3\!-\!8),(4\!-\!9),(5\!-\!10) furnishing anti-phase anchoring for trace formation. Node 10 functions as an entropy cap (non-trace stabilizer), explaining why it appears in Hetu but not in Luoshu.

  • Dynamic closure (field ⇄ trace): collapse events leave residual entropy gradients that rewrite the pre-field; the field then biases future traces—i.e., a coupled semantic thermodynamic loop rather than a one-way “origin→manifestation.”


14.2 Why the belt is the right measurement surface

  • Two projections → two edges. Pre (field template) and post (trace) give two complementary traces Γ,Γ+\Gamma_-,\Gamma_+. The annulus between them is the belt B\mathcal B. Report edge–edge phase as a class function of Hol(Γ+)Hol(Γ)1\mathrm{Hol}(\Gamma_+)\mathrm{Hol}(\Gamma_-)^{-1}.

  • Completeness (on the patch). On H–L patches that satisfy the thin-ribbon and smoothness assumptions, SBHL gives

    Δϕ=BFs+αTw,\Delta\phi=\iint_{\mathcal B}\mathcal F_s+\alpha\,\mathrm{Tw},

    i.e., meaning flux + style twist account for the measurable phase gap. This is the SMFT ↔ Belt dictionary specialized to pre/post collapse.


14.3 Minimal encoding of “9 from 10”

  • Support logic. A 10-node pre-field is the minimal closed pairing structure that can support a 9-mode self-closing trace (Luoshu). Intuition: nine distributed modal channels plus one global entropy anchor (node 10) ensure a low-dissipation loop; graph-theoretically, 10 is the smallest set admitting a perfect anti-phase matching under the sum-11 constraint.

  • Roles of 5 and 10. 5 = post-collapse pivot (trace center); 10 = containment rim / entropy ceiling that never appears as a trace state but stabilizes the field. This pair (5,10)(5,10) acts as a structural “vortex axis.”


14.4 Reading H–L on a belt (without naming it in the book)

  • Treat the upper edge as the post trace (your actual generation/execution) and the lower edge as the pre template (intent/spec, or reconstructed field cues). Compute
    Δϕ=argdet(Hol+Hol1)\Delta\phi=\arg\det(\mathrm{Hol}_+\mathrm{Hol}_-^{-1}), the flux argdetHcell\sum \arg\det H_{\text{cell}}, and twist Tw\mathrm{Tw} from the framing. If ΔϕΦF+αTw\Delta\phi\approx \Phi_{\mathcal F}+\alpha\,\mathrm{Tw} within tolerance, the patch behaves “H–L-like.”

  • Many reported “∞-shaped” trace orders (e.g., 1 ⁣ ⁣6 ⁣ ⁣7 ⁣ ⁣2 ⁣ ⁣9 ⁣ ⁣4 ⁣ ⁣3 ⁣ ⁣8 ⁣ ⁣11\!\to\!6\!\to\!7\!\to\!2\!\to\!9\!\to\!4\!\to\!3\!\to\!8\!\to\!1) appear as low-dissipation loops embedded in the belt; the belt’s flux map makes the corridor visible.


14.5 When the local H–L belt is not enough

  • Open breathing / low node counts: four-phase “breathing” without closure ⇒ escalate to eight-node attractor systems (八卦) or tile a network of belts for branch/merge.

  • Heavy time-phase: split dynamical vs geometric by adding a thin slab; SBHL continues to hold for the geometric piece.


14.6 Quick research probes (drop-in)

  1. 9-mode closure test. Extract a post trace on the upper edge; does a 9-state clustering recover a closed belt loop with small SBHL residual? (Pass ⇒ Luoshu-like.)

  2. Entropy cap probe. Perturb the pre-field; does an effective “10th” latent state act only as a boundary/ceiling (affecting flux but never appearing as a trace node)? (Pass ⇒ Hetu-like.)

  3. Rewrite hysteresis. After repeated cycles, does the pre-field estimate shift in ways predicted by collapse-induced field plasticity? (Pass ⇒ field⇄trace coupling.)


Bottom line for researchers. Read H–L as a pre/post template pair: 10-node field supporting a 9-mode trace. On that patch, a two-boundary belt is the minimal, gauge-robust surface to measure “phase gap = meaning flux + style twist.” Use it as an internal model even if the book never names Hetu or Luoshu.

 

Ch. 15 — Engineer Metrics

This chapter defines the belt scalars you will actually compute and log, proves (or sketches) their key invariances, and gives calibration protocols with acceptance bands ready for deployment.

15.1 Core scalars (what to measure)

Let ℬ be a belt with edges Γ±, connection 1-form A on ℬ, curvature 2-form F = dA + A∧A, and framing angle φ(s) along the edge frame. Use class functions so readouts are gauge-robust and reparameterization-invariant.

(a) Phase-gap (edge–edge)
For U(1): Δφ := ∮Γ+ A − ∮Γ− A.
For U(k): Δφ := arg det (Hol(Γ+) Hol(Γ−)⁻¹). The spectrum/characters are also admissible. Gauge covariance implies class-function scalars are invariant.

(b) Flux (surface)
Φ_F := class-function phase of the surface-ordered exponential on ℬ, implemented discretely as a product of plaquette holonomies (ordered lower→upper across width):
Φ_F ≈ Σ_cells arg det(H_cell). This realizes Stokes on a belt: “upper minus lower” at the boundary equals interior flux.

(c) Twist (framing)
Tw := (1/2π)∮ dφ(s)  (unwrap φ)
= (1/2π)∮ (u×t)·(du/ds) ds  (White’s vector formula).
This is the standard belt twist entering Lk = Tw + Wr and the framing phase in FBHL.

(d) Width & thinness
Let w(s) be geodesic separation between edges; define thinness ε := max_s κ(s)·w(s). In the thin-belt regime (ε≪1) discretization errors and non-commutation corrections are controlled.

Belt identity (for residual checks).
Throughout the book we use the framed belt identity (FBHL):
Δφ = Φ_F + α·Tw (class-function scalars), used here to define a residual r_FBHL := Δφ − (Φ_F + α·Tw) that should be small on valid belts.

15.2 Discrete estimators (how to compute)

Edge holonomies. Build orthonormal frames Φ±[k] along each edge and transport by polar/Procrustes:
R_s,±[k] = Polar(Φ±[k+1]ᵀ Φ±[k]); Hol(Γ±) = ∏_k R_s,±[k].
Across-width transports R_n[k] = Polar(Φ−[k]ᵀ Φ+[k]) close the plaquettes.

Plaquette holonomies (curvature cells).
H_cell[k] = R_s,+[k] · R_n[k+1] · R_s,−[k]⁻¹ · R_n[k]⁻¹,
then Φ_F = Σ_k arg det(H_cell[k]). This is Stokes-on-a-belt in code.

Twist estimator.
Tw = (1/2π) Σ_k unwrap(φ[k+1] − φ[k])  or use White’s formula for robustness to drift.

Numerical guardrails.
Use class functions (arg det / arg Tr / principal eigenphase); enforce thinness ε ≤ 0.2; keep orientation “upper minus lower.”

15.3 Invariance properties (why these are safe)

Reparameterization. Because F is a 2-form and the belt holonomy is a surface-ordered exponential, Φ_F and any class-function Δφ are invariant under smooth reparameterizations of edges or interior; discretizations inherit this when cell ordering respects the belt orientation (lower→upper across width). Sketch: pullback by reparameterization preserves ∫∫F and conjugates holonomies; class functions remove conjugation.

Gauge covariance. Under g: A↦g⁻¹Ag + g⁻¹dg, we have Hol(Γ±)↦g(Γ±(0))⁻¹ Hol(Γ±) g(Γ±(0)) and ℋ[ℬ]↦g(Γ+)⁻¹ ℋ[ℬ] g(Γ−); class functions (arg det, characters) are invariant. Tw is geometric and independent of gauge.

Framing survival (thin-belt). In ε→0, the framing phase persists while pure area terms vanish—hence belts (two boundaries + framing) are minimal; single lines drop this observable.

15.4 Width-scaling diagnostics

In the thin regime, first-order theory gives
Δφ(w) = w·⟨n⋅F⋅t⟩ + α·Tw + O(w²).
Thus linear Δφ–w scaling (slope set by averaged curvature component) is expected for fixed Tw. Use it both to (i) validate thinness and (ii) calibrate flux units. Acceptance: linear fit R²≥0.95 and relative curvature of the fit ≤5% over your working w-range. (Escalate to a slab model if violated.)

15.5 Calibration protocols

(A) Framing coefficient α (twist quantization / 4π test).
Perform a controlled ±2π twist (one full twist unit) while keeping curvature nearly constant. Fit α so Δφ shifts by exactly α per twist unit. Cross-check by a “braid twice” (4π) or double-twist experiment to verify periodicity and absence of spurious flux. Log before/after Δφ, Tw, and r_FBHL. Pass if |Δφ − (Φ_F + α·Tw)| ≤ τ_twist (e.g., ≤1°).

(B) Flux scale (curvature wedge).
Use a belt spanning a region with known curvature (synthetic or analytic). With Tw≈0, verify Δφ ≈ Φ_F. Fit any scalar normalization implicit in your estimator (e.g., units/step). Pass if relative error ≤ τ_flux (e.g., ≤2%) and r_FBHL statistics are centered with MAD ≤ τ_res.

(C) Gauge & reparameterization stability.
Resample edges (different arc-length parametrizations) and re-initialize frames; recompute Δφ, Φ_F, Tw. Acceptance: coefficient of variation ≤ τ_inv (e.g., 0.5%) across runs. If violated, you are logging non-invariant quantities—switch to class functions.

(D) Thinness health & commutators.
Track ε and across-width commutators (or variance) of A. If ε↑ or commutators exceed budget, promote to a slab or retile more densely. Redline: trigger a safety gate when dΦ_F/dt exceeds the P95 of clean runs for K consecutive steps.

15.6 Acceptance bands (defaults)

  • Twist calibration: |Δφ − (Φ_F + α·Tw)| ≤ 1° after fitting α; repeatability within 0.5°.

  • Flux calibration: relative error ≤2% on reference belts; residual MAD ≤0.5°.

  • Invariance: Δφ, Φ_F stable within 0.5% under gauge/frame re-inits and resampling.

  • Width-scaling: linear fit R²≥0.95, curvature of fit ≤5% over operational w.

  • Thinness: ε≤0.2 in production; otherwise escalate model (slab/network).

15.7 Engineer checklist (log these every run)

Δφ (class-function), Φ_F (plaquette sum), Tw (unwrapped/White), r_FBHL, thinness ε, across-width commutator/variance, estimator family & hyper-params (U(1)/U(k)/Uhlmann, window, smoothing). These fields support audits and gates downstream.


What you now have: invariant scalars (Δφ, Φ_F, Tw), robust estimators, and pass/fail bands tied to the belt identity and width physics. Next, Ch. 16 turns them into losses (Two-Boundary Loss, Flux Regularization, Twist Steering) with gradients and training recipes.

 

Ch. 16 — Training Objectives

We turn the Chapter-15 metrics into trainable losses for models that expose (or let us estimate) belt transports. The chapter is self-contained and stays in standard gauge/differential-geometry language.

Setup. A model with parameters θ\theta induces discrete transports on a belt B\mathcal{B}:

  • edge transports Us,±[k](θ)U(k)U_{s,\pm}[k](\theta)\in \mathrm{U}(k) along Γ±\Gamma_\pm,

  • across-width transports Un[k](θ)U(k)U_{n}[k](\theta)\in \mathrm{U}(k) between edges,

  • plaquette holonomies H[k]=Us,+[k]Un[k ⁣+ ⁣1]  Us,[k]1Un[k]1H_{\square}[k]=U_{s,+}[k]\,U_{n}[k\!+\!1]\;U_{s,-}[k]^{-1}\,U_{n}[k]^{-1}.
    Class-function readouts:

Δϕ  =  argdet ⁣( ⁣kUs,+[k]  (kUs,[k])1 ⁣),ΦF  =  kargdetH[k],Tw  =  12πkunwrap(ϕk+1ϕk).\Delta\phi \;=\; \arg\det\!\Big(\!\prod_k U_{s,+}[k]\;\Big(\prod_k U_{s,-}[k]\Big)^{-1}\!\Big),\quad \Phi_F \;=\; \sum_k \arg\det H_{\square}[k],\quad \mathrm{Tw} \;=\; \frac{1}{2\pi}\sum_k \operatorname{unwrap}(\phi_{k+1}-\phi_k).

The framed belt identity (FBHL) predicts ΔϕΦF+αTw \Delta\phi \approx \Phi_F + \alpha\,\mathrm{Tw} in the thin-belt regime.


16.1 The objective family

(A) Two-Boundary Loss (TBL)

TBL enforces boundary consistency and—optionally—targets a desired edge gap.

  • Physics-consistency TBL

LTBL-cons  =  ρ ⁣(ΔϕΦFαTw),\mathcal{L}_{\text{TBL-cons}} \;=\; \rho\!\left(\Delta\phi - \Phi_F - \alpha\,\mathrm{Tw}\right),

where ρ\rho is a robust penalty (Huber or wrapped-angle L2 on S1\mathbb{S}^1).

  • Goal-tracking TBL (optional)

LTBL-goal  =  ρ ⁣(ΔϕΔϕ),\mathcal{L}_{\text{TBL-goal}} \;=\; \rho\!\left(\Delta\phi - \Delta\phi^\star\right),

with Δϕ\Delta\phi^\star supplied by supervision, planning, or control.

Use either or both: LTBL=wcLTBL-cons+wgLTBL-goal. \mathcal{L}_{\text{TBL}} = w_c\,\mathcal{L}_{\text{TBL-cons}} + w_g\,\mathcal{L}_{\text{TBL-goal}}.

(B) Flux Regularization (FR)

FR suppresses spurious interior curvature and stabilizes non-Abelian commutators.

LFR  =  λFklogH[k]F2  +  λ ⁣kklogH[k]logH[k]F2  +  λunit ⁣e ⁣UeUeIF2.\mathcal{L}_{\text{FR}} \;=\; \lambda_F \sum_k \big\|\log H_{\square}[k]\big\|_F^2 \;+\; \lambda_{\nabla}\!\sum_{k\sim k'} \big\|\log H_{\square}[k]-\log H_{\square}[k']\big\|_F^2 \;+\; \lambda_{\text{unit}}\!\sum_{e}\!\big\|U_e^\dagger U_e - I\big\|_F^2.

Here ee ranges over all edge/width transports; the last term softly projects numerics back to U(k)\mathrm{U}(k).

(C) Twist Steering (TS)

TS makes style/orientation controllable and smooth.

LTS  =  μ1ρ ⁣(TwTw)  +  μ2k(Δtwist[k])2  +  μqminmZρ ⁣(Twm),\mathcal{L}_{\text{TS}} \;=\; \mu_1\,\rho\!\left(\mathrm{Tw}-\mathrm{Tw}^\star\right) \;+\; \mu_2 \sum_k \big(\Delta \mathrm{twist}[k]\big)^2 \;+\; \mu_q\,\min_{m\in\mathbb{Z}} \rho\!\left(\mathrm{Tw}-m\right),

where Δtwist[k]\Delta \mathrm{twist}[k] is a discrete second difference of the framing angle (smoothness), and the quantization term (weight μq\mu_q) gently prefers integer twist units when desired.

Total loss.

Ltotal  =  wTBLLTBL  +  wFRLFR  +  wTSLTS.\mathcal{L}_{\text{total}} \;=\; w_{\text{TBL}}\,\mathcal{L}_{\text{TBL}} \;+\; w_{\text{FR}}\,\mathcal{L}_{\text{FR}} \;+\; w_{\text{TS}}\,\mathcal{L}_{\text{TS}}.

16.2 Differentiable estimators (U(1) and U(k))

We give gradients for class functions so they’re gauge-safe.

U(1) case

Write edge integrals discretely: Us,±[k]=eias,±[k]U_{s,\pm}[k]=e^{i a_{s,\pm}[k]}, H[k]=eif[k]H_{\square}[k]=e^{i f[k]}. Then

Δϕ  =  k(as,+[k]as,[k]),ΦF  =  kf[k].\Delta\phi \;=\; \sum_k \big(a_{s,+}[k]-a_{s,-}[k]\big), \quad \Phi_F \;=\; \sum_k f[k].

If parameters θ\theta control aa and ff,

Δϕθ=k(as,+[k]θas,[k]θ),ΦFθ=kf[k]θ.\frac{\partial \Delta\phi}{\partial \theta} = \sum_k\bigg(\frac{\partial a_{s,+}[k]}{\partial \theta} - \frac{\partial a_{s,-}[k]}{\partial \theta}\bigg), \quad \frac{\partial \Phi_F}{\partial \theta} = \sum_k \frac{\partial f[k]}{\partial \theta}.

For twist with unwrapped angles ϕk\phi_k,

Twθ=12πkθ(ϕk+1ϕk),\frac{\partial \mathrm{Tw}}{\partial \theta} = \frac{1}{2\pi}\sum_k \frac{\partial }{\partial \theta}\big(\phi_{k+1}-\phi_k\big),

treating the integer jump from unwrap as stop-gradient (see pitfalls).

U(k) case

Let UU(k)U\in \mathrm{U}(k) and define φ(U):=argdetU \varphi(U) := \arg\det U.
Key identity: dφ(U)=ImTr(U1dU)d\,\varphi(U) = \operatorname{Im}\,\mathrm{Tr}\big(U^{-1} dU\big).

  • Edge gap. For UΔ=Us,+Us,1U_\Delta = U_{s,+}\,U_{s,-}^{-1}:

Δϕθ=ImTr ⁣(UΔ1UΔθ)=ImTr ⁣(Us,Us,+1Us,+θ)    ImTr ⁣(Us,θUs,1).\frac{\partial \Delta\phi}{\partial \theta} = \operatorname{Im}\,\mathrm{Tr}\!\Big(U_\Delta^{-1}\,\frac{\partial U_\Delta}{\partial \theta}\Big) = \operatorname{Im}\,\mathrm{Tr}\!\Big( U_{s,-}\,U_{s,+}^{-1}\,\frac{\partial U_{s,+}}{\partial \theta}\Big) \;-\; \operatorname{Im}\,\mathrm{Tr}\!\Big( \frac{\partial U_{s,-}}{\partial \theta}\,U_{s,-}^{-1}\Big).
  • Flux. For each plaquette HH_{\square},

argdetHθ=ImTr ⁣(H1Hθ),\frac{\partial \,\arg\det H_{\square}}{\partial \theta} = \operatorname{Im}\,\mathrm{Tr}\!\Big(H_{\square}^{-1}\,\frac{\partial H_{\square}}{\partial \theta}\Big),

and by product rule,
Hθ=j(<jU)Ujθ(>jU).\frac{\partial H_{\square}}{\partial \theta} = \sum_j \Big(\prod_{\ell<j} U_\ell\Big)\,\frac{\partial U_j}{\partial \theta}\,\Big(\prod_{\ell>j} U_\ell\Big).

  • Unitary projection in backprop. If your UU comes from an unconstrained matrix MM via polar U=Polar(M)U=\mathrm{Polar}(M), use the differentiable polar Jacobian or a straight-through estimator; add λunitUUIF2 \lambda_{\text{unit}}\|U^\dagger U-I\|_F^2.


16.3 Gradient of the losses (templates)

  • Physics-consistency TBL (Huber with threshold δ\delta)

LTBL-consθ=ρ(ϵ)(ΔϕθΦFθαTwθ),ϵ=ΔϕΦFαTw.\frac{\partial \mathcal{L}_{\text{TBL-cons}}}{\partial \theta} = \rho'(\epsilon)\Big(\frac{\partial \Delta\phi}{\partial \theta} - \frac{\partial \Phi_F}{\partial \theta} - \alpha\,\frac{\partial \mathrm{Tw}}{\partial \theta}\Big), \quad \epsilon=\Delta\phi-\Phi_F-\alpha\,\mathrm{Tw}.
  • FR terms

θlogHF2=2logH,  DlogH ⁣[θH],\frac{\partial }{\partial \theta}\big\|\log H_{\square}\big\|_F^2 = 2\,\langle \log H_{\square},\; D\log_{H_{\square}}\![\partial_\theta H_{\square}] \rangle,

with DlogD\log the Fréchet derivative (use the standard series or the numerically stable Sylvester solve implementation).

  • TS target & smoothness follow from §16.2; the quantization term uses minm\min_m as a soft minimum (e.g., log-sum-exp over 3 integers near round(Tw\mathrm{Tw})).


16.4 Practical pitfalls (and fixes)

  1. Branch cuts (phase wrap). Use atan2 or complex log\log for phases, then unwrap; detach the integer wrap count:
    phi_unwrapped = stopgrad(2π*N) + raw_phi, where NZN\in\mathbb{Z} is the accumulated wrap index.

  2. Loss of unitarity. Numerical drift makes detU1|\det U|\neq 1 and corrupts argdet\arg\det. Fix by (i) polar projection UPolar(U)U\leftarrow \mathrm{Polar}(U) in the forward pass, (ii) λunit\lambda_{\text{unit}} penalty, (iii) renormalizing determinants when computing phases.

  3. Orientation bugs. Always keep belt orientation “upper minus lower” and width ordering (lower→upper). Unit tests in §16.8 catch sign flips.

  4. Thin-belt violations. If width-scaling test (Ch.15) fails, expect TBL to fight FR. Escalate geometry (slab or finer tiling) or raise λ\lambda_{\nabla}.

  5. Vanishing/Exploding gradients. Avoid large logH\|\log H_{\square}\| by gradient-clipping and a warmup where only LFR\mathcal{L}_{\text{FR}} trains for NN steps.

  6. Commutator noise (non-Abelian). Add k[A1,A2]F2\sum_k \|[A_1,A_2]\|_F^2 if you estimate local 1-forms, or rely on the first FR term which implicitly penalizes large non-commuting plaquettes.


16.5 Training recipes

Stage 0 — Calibrate α\alpha. On synthetic belts with controlled twist, fit α\alpha so Δϕ\Delta\phi shifts by α\alpha per full twist. Freeze α\alpha (or learn it with a very small LR).

Stage 1 — Flux shaping. Train with LFR\mathcal{L}_{\text{FR}} only (and unitary penalty) until width-scaling passes (Ch.15).

Stage 2 — Turn on TBL-consistency. Add wTBLw_{\text{TBL}} \uparrow over a short schedule; monitor residual rFBHLr_{\text{FBHL}} and belt invariance checks.

Stage 3 — Add goals and twist control. Introduce LTBL-goal\mathcal{L}_{\text{TBL-goal}} or LTS\mathcal{L}_{\text{TS}} depending on task (e.g., style targeting, plan repair). Use a small μq\mu_q if you want near-integer twist steps.

Optimizers & scales. Use separate LRs: ηU\eta_U for transports (or their generators), ηϕ\eta_{\phi} for framing. Typical weights: wTBL ⁣[1,5],wFR ⁣[0.1,1],wTS ⁣[0,1]w_{\text{TBL}}\!\in[1,5], w_{\text{FR}}\!\in[0.1,1], w_{\text{TS}}\!\in[0,1]. Tune to keep TBL residual near the acceptance band from Ch.15.


16.6 Minimal pseudocode (framework-agnostic)

# Forward metrics
Usp = edge_holonomy_plus(theta)      # ∈ U(k)
Usm = edge_holonomy_minus(theta)     # ∈ U(k)
Hcells = plaquette_holonomies(theta) # list of ∈ U(k)
phi_gap = arg_det(Usp @ Usm.conj().T)
phi_flux = sum(arg_det(H) for H in Hcells)
twist = twist_unwrap(phi_angles(theta)) / (2*pi)

# Losses
L_tbl_cons = huber(phi_gap - phi_flux - alpha*twist, delta=δ)
L_tbl_goal = 0. if not have_target else huber(phi_gap - phi_gap_star, δ)
L_fr = lamF*sum(frob(logm(H))**2 for H in Hcells) \
     + lamGrad*sum(frob(logm(Hi)-logm(Hj))**2 for (Hi,Hj) in neighbors(Hcells)) \
     + lamUnit*(unitarity_penalty([Usp, Usm]+Hcells))
L_ts = mu1*huber(twist - twist_star, δ) \
     + mu2*smoothness_penalty(phi_angles(theta)) \
     + muq*quantization_softmin(twist)

L = wTBL*(wc*L_tbl_cons + wg*L_tbl_goal) + wFR*L_fr + wTS*L_ts
L.backward(); optimizer.step()

Note. arg_det(U) uses ImTr(U1U)\operatorname{Im}\mathrm{Tr}(U^{-1}\partial U) in the backward pass; logm uses a stable Fréchet derivative or a series with spectral clipping.


16.7 Unit tests & acceptance (train-time)

  1. FBHL residual: ΔϕΦFαTwτtwist |\,\Delta\phi - \Phi_F - \alpha\,\mathrm{Tw}\,| \le \tau_{\text{twist}} on validation belts.

  2. Width scaling: Linear fit R2 ⁣0.95R^2\!\ge 0.95 over operational widths.

  3. Invariance: Reparameterize edges and randomize frames; coefficients of variation 0.5%\le 0.5\%.

  4. Unitarity: maxeUeUeIFτunit\max_e \|U_e^\dagger U_e - I\|_F \le \tau_{\text{unit}}.

  5. Stability: No phase-wrap oscillations (wrap index monotone or piecewise constant).


16.8 What to log (for audits and gates)

Per belt and batch: Δϕ, ΦF, Tw, rFBHL,\Delta\phi,\ \Phi_F,\ \mathrm{Tw},\ r_{\text{FBHL}}, thinness proxy, unitarity norms, commutator proxy, loss components, wrap index events, and acceptance flags. These feed the online controllers of Chapter 17.


Outcome. You now have a drop-in objective set—TBL to enforce boundary physics (and hit targets), FR to tame curvature, and TS to steer framing—each with differentiable U(1)/U(k) estimators and numerically stable gradients. Chapter 17 turns these into online controllers (safety gates, dials, and plan-repair) at inference.

 

Ch. 17 — Controllers at Inference

At inference we don’t train; we steer. This chapter installs three belt-native controllers you can run online with minimal overhead:

  1. Safety gate (flux-spike abort)

  2. Creativity dial (quantized twist stepping)

  3. Plan repair (route via belt tiling)

We finish with a local stability / Lyapunov-style bound (sketch) showing why small, state-feedback steps keep the system in a safe set.


17.1 Runtime loop (inputs & taps)

Per step tt, from Chapter 15 estimators you read:

  • Edge gap Δϕt\Delta\phi_t, flux ΦF,t\Phi_{F,t}, twist Twt\mathrm{Tw}_t.

  • FBHL residual rt:=ΔϕtΦF,tαTwtr_t := \Delta\phi_t - \Phi_{F,t} - \alpha\,\mathrm{Tw}_t.

  • Thinness proxy εt\varepsilon_t and unitarity norm (health checks).

Maintain EWMAs and robust spreads:

Φ~F,t=λΦ~F,t1+(1λ)ΦF,t,σF,t=MADw(ΦF,tw+1:t),\tilde{\Phi}_{F,t}=\lambda \tilde{\Phi}_{F,t-1}+(1-\lambda)\Phi_{F,t},\quad \sigma_{F,t}=\operatorname{MAD}_{w}(\Phi_{F,t-w+1:t}),

(similarly for rtr_t, Twt\mathrm{Tw}_t). Use a short window w[16,64]w\in[16,64], λ0.9\lambda\approx0.9.


17.2 Safety gate — flux-spike abort

Goal. Kill or de-rate trajectories when interior curvature surges (“belt-Faraday spike”), a strong predictor of derailments (tool misuse, injection, hallucination bursts).

Trigger

Define a standardized slope proxy

St:=ΦF,tΦ~F,t1σF,t1+ϵ,Qt:=rtMADw(r),S_t:=\frac{\Phi_{F,t}-\tilde{\Phi}_{F,t-1}}{\sigma_{F,t-1}+\epsilon}, \qquad Q_t:=\frac{|r_t|}{\operatorname{MAD}_{w}(r)},

and thinness breach flag Bt:=[εt>εmax]B_t:=[\varepsilon_t>\varepsilon_{\max}].

Fire Caution if Stτ1|S_t|\ge \tau_1 or QtτrQ_t\ge\tau_r.
Fire Abort if (i) Stτ2|S_t|\ge \tau_2 for KK consecutive steps, or (ii) Bt=1B_t=1.

Default bands: τ1=2.5\tau_1=2.5, τ2=4.0\tau_2=4.0, K=3K=3, τr=3.0\tau_r=3.0, εmax=0.2\varepsilon_{\max}=0.2.

Actions

  • Caution mode: lower decode temperature, freeze tool calls, require explicit user confirmation for external actions, raise flux penalty in reranker.

  • Abort mode: hard stop current plan; roll back to last safe checkpoint; switch to “low-flux decode” (e.g., deterministic nucleus & stricter constraints), or demand user clarification.

Pseudocode

def safety_gate(state):
    S = slope_zscore(state.PhiF, state.EWMA_PhiF, state.MAD_PhiF)
    Q = abs(state.r_FBHL) / (state.MAD_r + eps)
    breach = state.thinness > eps_max
    caution = (abs(S) >= tau1) or (Q >= tau_r)
    abort   = breach or state.consec(abs(S) >= tau2) >= K
    return caution, abort

17.3 Creativity dial — twist stepping

Idea. Treat stylistic/orientational freedom as quantized twist. You target

TwtTwZ/2\mathrm{Tw}_t \rightarrow \mathrm{Tw}^\star \in \mathbb{Z}/2

(half-integer steps optional), moving in small increments δtw\delta_{\mathrm{tw}} with hysteresis.

Controller

et:=TwTwt,ut:=kpclip(et,η,η)+kd(etet1),e_t := \mathrm{Tw}^\star - \mathrm{Tw}_t,\quad u_t := k_p\,\operatorname{clip}(e_t, -\eta,\eta) + k_d\,(e_t-e_{t-1}),

then apply TwistStep(utu_t) by adjusting the style actuators available to your model (e.g., style token weighting, guidance scale, controlled rotations in a style subspace, or structured decoding rules). Constrain steps so FBHL residual stays inside band: if rt>ρ|r_t|>\rho, halve utu_t.

Hysteresis. Only flip the target half-integer when eth|e_t|\le h for MM steps (prevents chatter). Defaults: kp[0.3,0.8]k_p\in[0.3,0.8], kd[0,0.2]k_d\in[0,0.2], η=0.5\eta=0.5, h=0.2h=0.2, M=2M=2, residual band ρ=2\rho=2^\circ.

Pseudocode

def twist_dial(state, Tw_star):
    e = Tw_star - state.Tw
    u = kp * clip(e, -eta, eta) + kd * (e - state.prev_e)
    if abs(state.r_FBHL) > rho: u *= 0.5
    apply_twist_step(u)  # maps to your style actuators
    return u

17.4 Plan repair — belt tiling

When a long task starts drifting (flux rises, residual grows), subdivide the worldsheet into tiles {Bj}\{\mathcal{B}_j\} (subgoals, tools, or phases). Each tile has local metrics (Δϕj,ΦF,j,Twj,rj)(\Delta\phi_j,\Phi_{F,j},\mathrm{Tw}_j,r_j).

Routing objective

Pick a tile sequence π\pi minimizing

C(π)=jπ(λFΦF,j+λrrj+λTTwjTwj)\mathcal{C}(\pi)= \sum_{j\in\pi}\Big(\lambda_F |\Phi_{F,j}| + \lambda_r |r_j| + \lambda_T |\mathrm{Tw}_j-\mathrm{Tw}_j^\star|\Big)

subject to waypoint constraints (must hit I/O specs, safety checks, tool availability).

Search. Use A* or beam search with heuristic C^\hat{\mathcal{C}} from predicted flux (e.g., language-model prior or cached tile stats). Prune tiles failing thinness or unitarity tests. When no safe path exists, contract: tighten style range, reduce tool set, or request disambiguation.

Local repair step

Replace current tile jj by an adjacent tile jj' with lower cost and compatible boundaries (same entry/exit specs). Re-compute edge holonomies so belt composition is consistent (edge continuity + orientation).

Pseudocode

def plan_repair(tiles, start, goal):
    def cost(tile): 
        return lamF*abs(tile.PhiF) + lamr*abs(tile.r_FBHL) + lamT*abs(tile.Tw - tile.Tw_star)
    frontier = Beam(maxK)
    frontier.add(path=[start], g=0, h=heur(start, goal))
    while frontier:
        path = frontier.pop()
        if path.ends_at(goal): return path
        for nb in safe_neighbors(path.last):
            if violates_thinness(nb) or violates_unitarity(nb): continue
            frontier.add(path + [nb], g=path.g + cost(nb), h=heur(nb, goal))
    return None

17.5 Local stability (Lyapunov-style) — sketch

We show that small state-feedback steps for the dial + gate keep you inside a safe invariant set.

State & candidate

Let

xt:=[rtTwtTwΦF,t],V(xt):=art2+b(TwtTw)2+cΦF,t2,x_t := \begin{bmatrix} r_t\\ \mathrm{Tw}_t-\mathrm{Tw}^\star\\ \Phi_{F,t} \end{bmatrix}, \quad V(x_t) := a\,r_t^2 + b\,(\mathrm{Tw}_t-\mathrm{Tw}^\star)^2 + c\,\Phi_{F,t}^2,

with a,b,c>0a,b,c>0. Assume (i) thin-belt Lipschitz bounds: the next metrics change smoothly with actuator moves,
xt+1xtLut|x_{t+1}-x_t|\le L\,\|u_t\|, and (ii) gate clamps utumax\|u_t\|\le u_{\max} except when aborting.

Controller effect

  • Dial: ut=kpet+kd(etet1)u_t = k_p e_t + k_d (e_t-e_{t-1}) with et=TwTwte_t=\mathrm{Tw}^\star-\mathrm{Tw}_t.

  • Gate: if Stτ2|S_t|\ge\tau_2 or εt>εmax\varepsilon_t>\varepsilon_{\max}, set ut=0u_t=0 (or abort), which non-increases VV because Δϕ\Delta\phi and ΦF\Phi_F stop drifting.

Decrease condition (discrete)

For sufficiently small gains and step size:

ΔV:=V(xt+1)V(xt)    κ(rt2+(TwtTw)2)  +  O(ut3),\Delta V := V(x_{t+1})-V(x_t) \;\le\; -\,\kappa\,\big( r_t^2 + (\mathrm{Tw}_t-\mathrm{Tw}^\star)^2\big) \;+\; \mathcal{O}( \|u_t\|^3 ),

for some κ>0\kappa>0. Choosing kp,kdk_p,k_d so that LutL\,\|u_t\| is small (and enabling the gate to cut utu_t under spikes) makes ΔV<0\Delta V<0 in the operating region. Hence the safe set

S={rρ, ΦFϕmax, εεmax}\mathcal{S}=\{\,|r|\le \rho,\ |\Phi_F|\le \phi_{\max},\ \varepsilon\le \varepsilon_{\max}\,\}

is practically invariant (trajectories stay or re-enter S\mathcal{S}; on violation, Abort stops the evolution).

Remark. This is a standard small-gain argument with a quadratic Lyapunov candidate; formal constants depend on your estimator Lipschitz bounds and actuator mapping.


17.6 Defaults & checklists

  • Safety gate: τ1=2.5, τ2=4.0, K=3, τr=3.0, εmax=0.2\tau_1{=}2.5,\ \tau_2{=}4.0,\ K{=}3,\ \tau_r{=}3.0,\ \varepsilon_{\max}{=}0.2.

  • Dial: kp=0.5, kd=0.1, η=0.5, h=0.2, M=2, ρ=2k_p{=}0.5,\ k_d{=}0.1,\ \eta{=}0.5,\ h{=}0.2,\ M{=}2,\ \rho{=}2^\circ.

  • Tiling: start with 4–8 tiles for medium tasks; prune tiles failing invariants.

  • Logs (per step): Δϕ,ΦF,Tw,r,ε,\Delta\phi,\Phi_F,\mathrm{Tw},r,\varepsilon, z-scores St,QtS_t,Q_t, mode (normal/caution/abort), dial step utu_t, tile id.


17.7 Failure modes & fallbacks

  • Persistent spikes: switch to slab geometry (wider belt), re-estimate curvature; or request user clarification.

  • Dial chatter: increase hysteresis h,Mh,M, reduce kdk_d.

  • Plan dead-ends: relax tile constraints or widen beam; if still none, degrade gracefully (simpler answer / human-in-the-loop).

  • Unitary drift: enable stronger projection and unitary penalty; if detU1|\det U|\neq 1 repeatedly, freeze style actuators and finish in safe mode.


What you now have. A belt-native runtime: guard rails (safety gate), a style knob (twist dial) that respects FBHL, and a repair planner (tiling) that routes around fluxy patches. The stability sketch justifies small, feedback-driven steps. Next (Ch. 18) we extend these ideas to Memory & Retrieval Belts (RAG).

 

Ch. 18 — Memory & Retrieval Belts (RAG)

Idea. Treat the retrieval path as the lower edge Γ\Gamma_- and the generation path as the upper edge Γ+\Gamma_+ of a single belt B\mathcal{B}. The interior cells of B\mathcal{B} encode how retrieved evidence is bound into the live generation state. Then Chapter-15/16 scalars work out of the box:

  • Edge gap Δϕ=argdet ⁣(Hol(Γ+)Hol(Γ)1)\Delta\phi = \arg\det\!\big(\mathrm{Hol}(\Gamma_+)\,\mathrm{Hol}(\Gamma_-)^{-1}\big)

  • Flux ΦF=BargdetH\Phi_F = \sum_{\square\subset\mathcal{B}} \arg\det H_\square (evidence-binding curvature)

  • Twist Tw\mathrm{Tw} (style/orientation between retrieval and generation)

  • Residual rFBHL=Δϕ(ΦF+αTw)r_{\text{FBHL}} = \Delta\phi - (\Phi_F + \alpha\,\mathrm{Tw})

We use these to route, de-duplicate, and catch hallucinations.


18.1 Building the RAG belt

Edges

  • Lower edge Γ\Gamma_- (retrieval path): the model’s evidence state as it scans the selected memory D={cj}D=\{c_j\} (chunks or passages) in the order it will be presented/bound to the generator. Its holonomy aggregates retrieval encoders, attention mixers, and doc-order transitions.

  • Upper edge Γ+\Gamma_+ (generation path): the model’s live decoding trajectory over output tokens (or planning steps).

Across-width transports

At each decoding step tt, define an across-width unitary Un[t]U_n[t] that maps (the subspace spanned by) currently attended memory to the generator’s hidden state. In standard RAG stacks, Un[t]U_n[t] is induced by the retrieval–decoder cross-attention (or key-value graft in late-fusion designs). Plaquette holonomies

H[t]=Us,+[t]  Un[t ⁣+ ⁣1]  Us,[t]1  Un[t]1H_\square[t] = U_{s,+}[t]\;U_n[t\!+\!1]\;U_{s,-}[t]^{-1}\;U_n[t]^{-1}

tile the belt in time; their phases add to ΦF\Phi_F.


18.2 Flux-threshold routing (when to pull more memory)

Interpret ΦF\Phi_F as how hard the system is bending generation to accommodate the retrieved evidence.

  • Low flux density (ΦF/T)(|\Phi_F|/T \downarrow): generation is consistent with retrieval; consider shrinking kk (fewer chunks) to reduce latency.

  • Rising flux density (ΦF/T)(|\Phi_F|/T \uparrow): retrieved content is steering output; keep or expand kk.

  • Flux spike (z-score StS_t from Ch.17): retrieval injures stability → either re-rank memory (swap out offending chunks) or tilt style (adjust Tw\mathrm{Tw}).

Policy. Maintain a running estimate of flux-per-token φt\varphi_t. If φt>τhi\varphi_t > \tau_{\text{hi}}: expand retrieval window; if φt<τlo\varphi_t < \tau_{\text{lo}}: contract; if spike: freeze generation and re-select memory (next section).


18.3 Memory re-selection by belt cost

For each candidate chunk cjc_j, form a tile belt Bj\mathcal{B}_j over a short horizon and compute:

Cj=λFΦF(Bj)  +  λrrFBHL(Bj)  +  λTTw(Bj)Tw\mathcal{C}_j = \lambda_F |\Phi_{F}(\mathcal{B}_j)|\;+\;\lambda_r |r_{\text{FBHL}}(\mathcal{B}_j)|\;+\;\lambda_T |\mathrm{Tw}(\mathcal{B}_j)-\mathrm{Tw}^{\star}|

Pick the top-kk by smallest Cj\mathcal{C}_j (tie-break by relevance). This naturally prefers coherent evidence that bends the generator just enough toward the goal and stays within residual bands.


18.4 De-duplication (same-saying vs. new information)

Redundant chunks inflate latency and sometimes destabilize attention. Two belt tests:

  1. Incremental flux test. When adding cjc_j after cic_i, form a short tile for each order and measure

ΔΦF(ij):=ΦF(Bij)ΦF(Bi)\Delta\Phi_{F}^{(i\to j)} := \Phi_F(\mathcal{B}_{i\to j})-\Phi_F(\mathcal{B}_{i})

If ΔΦF(ij)<τdup|\Delta\Phi_F^{(i\to j)}| < \tau_{\text{dup}} and relevance is similar, drop the later chunk.

  1. Relative holonomy test. Compute log(Hci1Hcj)F \|\,\log(H_{c_i}^{-1} H_{c_j})\,\|_F where HcH_{c} is the chunk’s aggregate across-width binding over the test horizon. If below a threshold, treat cjc_j as a near-duplicate of cic_i.


18.5 Hallucination checks (edge–interior mismatch)

Hallucinations appear as large residual with weak or inconsistent retrieval:

  • Condition H1. rFBHL>τr|r_{\text{FBHL}}| > \tau_r while ΦF|\Phi_F| is small → generator drifting off evidence (classic fabrication).

  • Condition H2. Repeated flux spikes localized on transitions between unrelated chunks → stitch-up across incompatible evidence.

  • Condition H3. Edge gap Δϕ\Delta\phi deviates sharply from the goal band while retrieval coverage is high → likely misbinding (wrong chunk dominates).

Actions. Under H1: lower decoding temperature, tighten twist (style) toward neutral, request more specific query or stronger retrieval. Under H2: reseat memory (Section 18.3). Under H3: rebalance attention across sources; if unresolved, cite and stop.


18.6 Retrieval–generation scheduling (greedy belt tiling)

At decoding step tt:

  1. Score candidates cjc_j with Cj\mathcal{C}_j on a 1–2 sentence look-ahead belt.

  2. Select top-k (adaptive kk via flux thresholds).

  3. Bind via Un[t]U_n[t] (attention mix).

  4. Measure ΦF,t, rt, Twt\Phi_{F,t},\ r_t,\ \mathrm{Tw}_t.

  5. Gate/dial (Ch.17) and continue; if repeated spikes → repair by swapping tiles (re-rank memory) or breaking the plan into sub-tiles.


18.7 Minimal pseudocode

state = init_belt_state()
for t in range(T):  # decode steps
    # 1) Candidate scoring on short tiles
    scores = []
    for c in candidate_chunks(query, cache):
        Bc = short_horizon_belt(c, state)
        scores.append((c, belt_cost(Bc)))  # uses ΦF, r_FBHL, Tw vs Tw*
    topk = select_topk(scores, k=adaptive_k(state))
    # 2) Bind retrieval into generation
    Un = bind_cross_attention(topk, state)   # across-width transport
    step = decode_step(Un, state)            # updates upper-edge transport
    # 3) Update belt metrics
    PhiF_t, r_t, Tw_t = belt_metrics(state, step, Un)
    # 4) Route & guard
    mode = route_by_flux(PhiF_t, state)      # expand/contract or spike-handle
    caution, abort = safety_gate(state.update(PhiF_t, r_t, Tw_t))
    if abort: return finish_with_citations(state)
    if caution: freeze_tools_and_lower_temp()

18.8 Citing and stopping (evidence-aligned exit)

When the final answer is produced, log which tiles contributed positive flux (evidence that bent the trajectory) and output verbatim citations for those chunks. If residual stayed within band while ΦF|\Phi_F| was near-zero, mark the answer as background knowledge / low-evidence and soften claims.


18.9 Calibration & acceptance bands (RAG defaults)

  • Adaptive kk: increase if flux-per-token >τhi>\tau_{\text{hi}}, decrease if <τlo<\tau_{\text{lo}}.

  • De-dup: drop chunk if ΔΦF<τdup|\Delta\Phi_F|<\tau_{\text{dup}} and relative holonomy distance <τrel<\tau_{\text{rel}}.

  • Hallucination: flag if H1–H3; require at least one positive-flux tile to assert a factual claim.

  • Logs: per step store Δϕ,ΦF,Tw,rFBHL,k\Delta\phi,\Phi_F,\mathrm{Tw},r_{\text{FBHL}},k, tile ids, z-scores, and gate mode.


18.10 Benchmarks (belt-aware)

Augment standard RAG metrics (exact match, F1, citation precision/recall) with:

  • Flux-supported claim rate: fraction of factual claims whose supporting tiles had ΦF>τmin |\Phi_F|>\tau_{\min}.

  • Residual conformity: share of tokens with rFBHLτr |r_{\text{FBHL}}|\le \tau_r.

  • Dup-burden: average fraction of dropped chunks by de-dup tests.

  • Stability: spike incidence per 1K tokens and mean time-to-repair.


18.11 Failure modes & remedies

  • Churn between near-duplicates: raise τdup\tau_{\text{dup}}; prefer longer tiles (stabilize binding).

  • Chronic spikes on doc boundaries: introduce buffer tiles (short summaries) to smooth across-width transports.

  • Thinness violations (model can’t bind wide contexts): narrow retrieval or switch to slab geometry (wider across-width lattice) for that segment.

  • Over-tight twist (dull prose): allow half-integer Tw\mathrm{Tw} steps with hysteresis (Ch.17) in style-heavy tasks.


Outcome. A belt-native RAG loop: retrieval and generation form the two edges, interior binding creates curvature, and the same three numbers—Δϕ\Delta\phi, ΦF\Phi_F, Tw\mathrm{Tw} (plus the FBHL residual)—drive routing, de-duplication, and hallucination control, with clear thresholds you can ship.

 

Ch. 19 — Planning as Belt Tiling

Idea. Break a long task into tiles on a belt B\mathcal{B}. Each tile encodes a subgoal or tool call with its own edge transports (retrieval/generation or plan/execute) and interior binding. Planning becomes choosing and composing tiles so the whole belt hits specs while keeping flux/residual within budgets.


19.1 Tiles: objects you can compose

A tile Bj\mathcal{B}_j is an annular patch with:

  • edges Γ±(j)\Gamma_{\pm}^{(j)} (entry/exit traces),

  • across-width transports Un(j)[]U_n^{(j)}[\cdot],

  • plaquettes H(j)[]H_{\square}^{(j)}[\cdot].

Its signature (kept from Chs. 15–18) is

σ(Bj)=(Δϕj, ΦF,j, Twj, rj, ϵj, costj, uncertj),\sigma(\mathcal{B}_j)=\Big(\Delta\phi_j,\ \Phi_{F,j},\ \mathrm{Tw}_j,\ r_j,\ \epsilon_j,\ \text{cost}_j,\ \text{uncert}_j\Big),

with thinness proxy ϵj\epsilon_j, a scalar cost (latency/price), and an uncertainty score.

Seam compatibility. Adjacent tiles jj+1j\to j{+}1 must match orientation and framing on the shared edge:

Γ+(j)Γ(j+1),ϕout(j)ϕin(j+1).\Gamma_+^{(j)} \equiv \Gamma_-^{(j+1)}, \qquad \phi^{(j)}_{\text{out}} \approx \phi^{(j+1)}_{\text{in}}.

A framing mismatch creates a seam twist defect δTwjj+1\delta\mathrm{Tw}_{j\leftrightarrow j+1}.


19.2 Composition law (sketch)

Let tiles {Bj}j=1m\{\mathcal{B}_j\}_{j=1}^m be glued in time order. Denote their edge holonomies by
U±(j)=Hol(Γ±(j))U_{\pm}^{(j)}=\mathrm{Hol}(\Gamma_{\pm}^{(j)}), and total belt edges Γ±=jΓ±(j) \Gamma_{\pm}=\bigsqcup_j \Gamma_{\pm}^{(j)}.

(A) Edge gap (class functions)

Δϕtot=argdet ⁣(jU+(j))    argdet ⁣(jU(j)).\Delta\phi_{\text{tot}} = \arg\det\!\Big(\prod_{j} U_{+}^{(j)}\Big)\;-\;\arg\det\!\Big(\prod_{j} U_{-}^{(j)}\Big).

Because class functions kill conjugations at seams, edge gaps add without seam terms.

(B) Flux (interior)

If all plaquette logs are small and nearly commuting across seams, then

ΦF,tot  =  j=1mΦF,j  +  EBCHnon-Abelian seam error,\Phi_{F,\text{tot}} \;=\; \sum_{j=1}^m \Phi_{F,j} \;+\; \underbrace{\mathcal{E}_{\text{BCH}}}_{\text{non-Abelian seam error}},

with a Baker–Campbell–Hausdorff (BCH) bound

EBCH    12 ⁣seams ⁣j, j+1[logH(j), logH(j+1)]  +  O(δ3).\|\mathcal{E}_{\text{BCH}}\| \;\le\; \tfrac{1}{2}\!\sum_{\text{seams}}\!\sum_{\square\in j,\ \square'\in j+1} \big\|[\log H_{\square}^{(j)},\ \log H_{\square'}^{(j+1)}]\big\|\;+\;O(\delta^3).

(C) Twist (framing)

Twtot  =  j=1mTwj  +  seamsδTwjj+1.\mathrm{Tw}_{\text{tot}} \;=\; \sum_{j=1}^m \mathrm{Tw}_j \;+\; \sum_{\text{seams}} \delta\mathrm{Tw}_{j\leftrightarrow j+1}.

Seam defects vanish if you carry framing consistently across tiles.

(D) FBHL residual

rtot=Δϕtot(ΦF,tot+αTwtot)=jrj    EBCH    α ⁣seams ⁣δTw.r_{\text{tot}} = \Delta\phi_{\text{tot}} - \Big(\Phi_{F,\text{tot}}+\alpha\,\mathrm{Tw}_{\text{tot}}\Big) = \sum_{j} r_j \;-\; \mathcal{E}_{\text{BCH}} \;-\; \alpha\!\sum_{\text{seams}}\!\delta\mathrm{Tw}.

Hence residuals add, up to (controllable) seam and BCH terms.

Rule of thumb. Keep: (i) thin tiles (ϵj1\epsilon_j\ll 1), (ii) aligned frames (zero seam twist), (iii) small commutators across seams. Then composition is near-additive.


19.3 Error accumulation & budgets

Suppose each tile satisfies

rjρ,logH(j)δ,maxseamsη=max[logH(j),logH(j+1)] .|r_j|\le \rho,\quad \|\log H_{\square}^{(j)}\|\le \delta,\quad \max_{\text{seams}}\eta=\max\|[\log H^{(j)},\log H^{(j+1)}]\|\ .

Then for mm tiles,

rtot    mρ  +  12(m1)Ncη  +  O(mδ2)  +  αseamsδTw,|r_{\text{tot}}| \;\le\; m\rho \;+\; \tfrac{1}{2}(m{-}1)N_c\,\eta \;+\; O(m\,\delta^2)\;+\;\alpha\sum_{\text{seams}}|\delta\mathrm{Tw}|,

with NcN_c a local cell factor. Choose per-tile budgets

ρρmaxm,ηηmax,δTwτtwistα,\rho \le \frac{\rho_{\max}}{m},\qquad \eta \le \eta_{\max},\qquad \sum|\delta\mathrm{Tw}|\le \frac{\tau_{\text{twist}}}{\alpha},

to keep plan-level rtotρmax |r_{\text{tot}}|\le \rho_{\max}.

Width scaling. If Δϕj(w)βjw+αTwj \Delta\phi_j(w)\approx \beta_j w + \alpha\mathrm{Tw}_j, then the plan inherits linearity with slope βj \sum \beta_j and the same thinness constraints (Ch. 15).


19.4 Subgoals & tools as tiles

  • Pure subgoal tile. A reasoning step with target Δϕ \Delta\phi^\star and style band; logged cost = time/computation.

  • Tool tile. I/O pre/post specs plus a measured binding (across-width transport) to the model state. Typical seam risks: (i) sharp curvature at I/O boundaries (BCH ↑), (ii) framing jumps (δTw). Mitigations: buffer summaries, adapter prompts, or unit tests at seams.

Each tool has a library signature (empirically measured on dev belts):

σˉtool=(ΦF, r, δTw, var[], cost).\bar{\sigma}_\text{tool}=(\overline{\Phi_F},\ \overline{r},\ \overline{\delta\mathrm{Tw}},\ \text{var}[\cdot],\ \text{cost}).

Planners pick tools by expected belt cost and reliability, not just task relevance.


19.5 Planning = shortest path on a tile graph

Create a tile graph G=(V,E)G=(V,E): nodes are task states; edges are candidate tiles with signatures. The planner finds a path minimizing the belt cost

J(π)=jπ(λFΦF,j+λrrj+λTTwjTw+λccostj)  +  seamsλs(η+αδTw)\mathcal{J}(\pi)= \sum_{j\in\pi}\Big( \lambda_F |\Phi_{F,j}| + \lambda_r |r_j| + \lambda_T |\mathrm{Tw}_j-\mathrm{Tw}^\star| + \lambda_c\,\text{cost}_j\Big) \;+\; \sum_{\text{seams}} \lambda_s\, \big(\eta + \alpha |\delta\mathrm{Tw}|\big)

subject to

rtotρmax,ϵjϵmax,I/O constraints met.|r_{\text{tot}}|\le \rho_{\max},\quad \epsilon_j\le \epsilon_{\max},\quad \text{I/O constraints met.}

Search. A* with heuristic J^ \hat{\mathcal{J}} from cached tool signatures; prune edges failing invariants; prefer routes with low seam penalties.


19.6 Pseudocode (planning loop)

def plan_with_tiles(start, goal, tiles, budgets):
    # tiles: edges with signatures and seam adapters
    open = PriorityQueue()
    open.push((start, path=[], cost=0, sig_acc=zero_sig()))
    best = {}
    while open:
        node, path, cost, acc = open.pop()
        if node == goal and within_budgets(acc, budgets): 
            return path, acc
        for tile in outgoing_tiles(node):
            if not seam_compatible(tile, path[-1] if path else None): 
                continue
            acc_new = compose_signatures(acc, tile.sigma, tile.seam_sigma)
            if not within_soft_budgets(acc_new, budgets): 
                continue
            cost_new = cost + edge_cost(tile, acc_new)
            key = (tile.end, round_sig(acc_new))
            if key not in best or cost_new < best[key]:
                best[key] = cost_new
                open.push((tile.end, path+[tile], cost_new, acc_new))
    return None, None

compose_signatures implements the additive laws with seam/BCH penalties; within_soft_budgets allows slack (for exploration) but tightens near the goal.


19.7 Diagnostics & acceptance for a plan

  • Plan-level invariants: log (Δϕtot,ΦF,tot,Twtot,rtot)(\Delta\phi_{\text{tot}}, \Phi_{F,\text{tot}}, \mathrm{Tw}_{\text{tot}}, r_{\text{tot}}).

  • Seam audit: list seams with top-kk contributions to η\eta and δTw|\delta\mathrm{Tw}|.

  • Thinness map: maxjϵjϵmax\max_j \epsilon_j \le \epsilon_{\max}.

  • Regression set: re-run on canonical inputs; accept if plan metrics fall in bands (Ch. 15).


19.8 Practical tips

  • Cache tile signatures. Reuse σˉ\bar{\sigma} for frequent subgoals/tools; update with EWMA to track drift.

  • Use buffer tiles. Insert short “summarize/normalize” adapters to reduce seam commutators and twist jumps.

  • Prefer few but clean tiles. Each seam adds BCH and twist risk; longer coherent tiles beat many short noisy ones.

  • Escalate geometry. If BCH/seam penalties persist, switch those segments to slab (wider across-width mesh) before composing.


Outcome. Planning is now a belt-aware graph search over subgoal/tool tiles with explicit composition rules and provable error budgets. Next (Ch. 20) we specialize this to program synthesis & self-repair, where unit tests become edge checks and looped tilings drive iterative fixes.

 

Ch. 20 — Program Synthesis & Self-Repair

Thesis. Treat spec ↔ program as a belt. The spec/test execution trace is the lower edge Γ\Gamma_-; the program’s runtime trace is the upper edge Γ+\Gamma_+. Compilation & binding act as a framing/twist operator aligning representations; true correctness shows up as low interior flux. Self-repair is a tile search that reduces flux and residual while preserving seams (tests).


20.1 Compilation / Binding as Twist

Let CC be source code, comp\mathsf{comp} the toolchain (frontend → optimizer → codegen) and bind\mathsf{bind} the linker/ABI/runtime configuration. Together they implement a framing map

Twisttool  :=  bindcomp:spec-reprexec-repr.\mathsf{Twist}_{\text{tool}} \;:=\; \mathsf{bind}\circ \mathsf{comp} : \text{spec-repr} \longrightarrow \text{exec-repr}.
  • Semantics target: the edge gap should match twist alone:

    Δϕ≈!αTw,ΦF0.\Delta\phi \stackrel{!}{\approx} \alpha\,\mathrm{Tw},\quad \Phi_F \approx 0.
  • Interpretation. If flux ΦF\Phi_F rises, the interior (implementation choices) is bending outputs away from spec—logic error, numeric drift, or misbinding.

Practical levers counted as twist: type/precision choices, layout/ABI, compiler flags (-O levels, vectorization), library variants, deterministic runtime toggles. These change representation/framing without (ideally) adding curvature.


20.2 Unit tests as edge checks

For each test case tt (inputs + expected postconditions), build a micro-belt Bt\mathcal{B}_t:

  • Lower edge Γ(t)\Gamma_-^{(t)}: the reference trace from the spec/test oracle.

  • Upper edge Γ+(t)\Gamma_+^{(t)}: the program’s observed trace.

  • Across-width transports: bindings from oracle state to runtime state at aligned checkpoints.

Compute (Δϕt, ΦF,t, Twt, rt)(\Delta\phi_t,\ \Phi_{F,t},\ \mathrm{Tw}_t,\ r_t).
Acceptance per test:

ΦF,tτflux,rtτr,and seams pass.|\Phi_{F,t}| \le \tau_{\text{flux}},\qquad |r_t| \le \tau_r,\qquad \text{and seams pass}.

Batch acceptance demands these hold for all tests and that seam metrics across tests (module boundaries) stay within bands.


20.3 Synthesis–Repair as a CEGIS-Belt loop

  1. Synthesize a candidate (from spec, sketches, examples).

  2. Twist fit (compile/bind). Choose a toolchain configuration believed to be curvature-neutral.

  3. Execute tests → measure belts.

  4. Decide:

    • If ΦF|\Phi_F| small and r|r| small ⇒ accept.

    • If ΦF|\Phi_F| large ⇒ semantic/logic patch (change code).

    • If r|r| large but ΦF|\Phi_F| moderate ⇒ twist repair (types/flags/ABI).

  5. Patch by selecting a repair tile (Section 20.4), re-plan seams, and loop until maxtΦF,t<τflux\max_t |\Phi_{F,t}| < \tau_{\text{flux}}.

Why loop on flux? Flux integrates the interior mismatch; driving it below τflux\tau_{\text{flux}} makes edge agreement robust to small reparameterizations and minor noise.


20.4 The Repair Tile library

Each tile modifies a localized patch of the program or its toolchain and ships with expected belt effects:

  • Logic tile: change algorithm/branch; big ΦF\downarrow \Phi_F, neutral Tw\mathrm{Tw}.

  • Numeric tile: adjust precision, stable algorithms, tolerances; ΦF\downarrow \Phi_F, small Tw\uparrow \mathrm{Tw}.

  • Interface tile: refactor types / reorder fields; r\downarrow |r| via Tw\uparrow \mathrm{Tw}.

  • Compiler tile: flags (-O, -ffast-math off), LTO, sanitizer; primarily r\downarrow |r|, sometimes ΦF\downarrow \Phi_F.

  • Library tile: swap implementation (e.g., exact vs approximate math); trade ΦF\Phi_F vs. cost.

Tile selection rule. Choose the tile jj minimizing

Cj=λFΔΦF+λrΔr+λTΔTw+λc(latency/price),\mathcal{C}_j = \lambda_F |\Delta\Phi_{F}| + \lambda_r |\Delta r| + \lambda_T |\Delta \mathrm{Tw}| + \lambda_c \text{(latency/price)},

subject to seam constraints and thinness.


20.5 Flakiness & nondeterminism

Non-deterministic scheduling, RNG, or I/O inject spikes indistinguishable from curvature bursts. Use the safety gate (Ch. 17) during testing:

  • Run in deterministic mode first; if unavailable, repeat tests and require flux statistics to be bounded (MAD ≤ band).

  • If spikes persist, insert buffer tiles (idempotent checkpoints, stable sort, fixed seeds) to reduce seam commutators.


20.6 Self-repair in deployment (blue-green)

Treat production as a long belt tiled by releases. On anomaly:

  1. Shadow-run a canary tile (patched module + deterministic binding).

  2. Measure belts on mirrored traffic.

  3. Promote if ΦF,r|\Phi_F|, |r| pass bands; otherwise roll back and log the top-flux tiles for offline repair.


20.7 Minimal workflow (pseudocode)

def synthesize_and_repair(spec, tests, toolchain, τ_flux, τ_r):
    prog = synthesize_from_spec(spec)
    config = twist_fit(toolchain, prog)     # compile/bind config
    while True:
        metrics = []
        for t in tests:
            run = execute(prog, t, config)
            Δφ, ΦF, Tw, r = belt_metrics(spec_trace(t), run.trace)
            metrics.append((t, Δφ, ΦF, Tw, r))
        if all(abs(ΦF)<=τ_flux and abs(r)<=τ_r for _,_,ΦF,_,r in metrics):
            return prog, config, metrics     # ACCEPT
        # Diagnose aggregate
        ΦF_mean = mean(abs(m[2]) for m in metrics)
        r_mean  = mean(abs(m[4]) for m in metrics)
        if ΦF_mean > τ_flux:
            tile = pick_logic_or_numeric_tile(prog, metrics)
            prog = apply_tile(prog, tile)
        else:
            tile = pick_interface_or_compiler_tile(config, metrics)
            config = apply_tile(config, tile)
        enforce_seam_checks(prog, config)    # adapters, buffer tiles

20.8 Acceptance & stopping rules

  • Primary: maxtΦF,t<τflux\max_t |\Phi_{F,t}| < \tau_{\text{flux}} and maxtrt<τr\max_t |r_t| < \tau_r.

  • Seams: no seam twist defects beyond τtwist\tau_{\text{twist}}; BCH seam penalties below budget.

  • Stability: reparameterize tests (input reorderings, timing jitter) → metrics stay within 0.5–1% drift.

  • Cost: total belt cost (latency/price) under target.


20.9 What to log (for audits)

Per test: (Δϕt,ΦF,t,Twt,rt)(\Delta\phi_t,\Phi_{F,t},\mathrm{Tw}_t,r_t), seam IDs, flags/config, tile history, spike incidents, and pass/fail. Per run: maxima, means, acceptance verdict, and artifacts (patch diffs).


Outcome. Program synthesis becomes tile search under belt metrics: compile/bind is twist, unit tests are edge checks, and the loop terminates when interior flux falls below τflux\tau_{\text{flux}} (and residuals are within band). This yields a principled, tool-agnostic path to both initial synthesis and robust self-repair.

 

Ch. 21 — Multi-Turn Dialogue & Style Control

Thesis. Treat a conversation as a belt of tiles (one tile per turn). Register shifts are implemented as quantized twist steps between tiles, and readability is guaranteed by keeping twist/flux within a certified region.


21.1 Dialogue as a belt of tiles

For turn jj:

  • Lower edge Γ(j)\Gamma_-^{(j)}: the conditioning path (user message + memory state).

  • Upper edge Γ+(j)\Gamma_+^{(j)}: the generation path (assistant response).

  • Across-width transport: the binding between the two (attention/cross-state mix).
    Tile metrics (Δϕj,ΦF,j,Twj,rj)(\Delta\phi_j,\Phi_{F,j},\mathrm{Tw}_j,r_j) are computed as in Ch. 15–18.
    Gluing tiles across turns follows Ch. 19 (composition and seam penalties).


21.2 Register lattice (quantized targets)

Choose register anchors with integer twist labels mZm\in\mathbb{Z} (half-integers allowed for transitional tones):

  • m=+2m=+2: legalistic/contractual

  • m=+1m=+1: academic/technical

  • m=0m=0: neutral/explanatory

  • m=1m=-1: conversational/helpful

  • m=2m=-2: narrative/playful

Per turn, pick Twj{m,m±12}\mathrm{Tw}^\star_j \in \{m, m\pm \tfrac12\} from task/policy. The style controller (Ch. 17) then moves Twj\mathrm{Tw}_j toward Twj\mathrm{Tw}^\star_j with quantized steps and hysteresis.


21.3 Register shifts as twist steps

Let ej=TwjTwje_j=\mathrm{Tw}^\star_j-\mathrm{Tw}_j. A small-step controller applies

uj=kpclip(ej,η,η)+kd(ejej1),u_j = k_p\,\operatorname{clip}(e_j,-\eta,\eta)+k_d(e_j-e_{j-1}),

then updates style actuators (token weights, style subspace rotations, decoding rules) so ΔTwjuj\Delta \mathrm{Tw}_j \approx u_j.
Hysteresis: only retarget to a new anchor when ejh|e_j|\le h for MM consecutive steps; prevents oscillation.
Seam rule: the turn-to-turn seam twist δTwjj+1\delta\mathrm{Tw}_{j\leftrightarrow j+1} should not exceed a budget (below), or insert a buffer sentence (“bridge”) tile.


21.4 Guaranteed readability regions (sketch)

Define a readability score RR (e.g., grade-level proxy, syntax depth, jargon density). In practice, RR changes smoothly with (i) twist, (ii) flux density (interior effort to bind conditioning to response). Assume Lipschitz dependence near operating points:

Rj+1Rj    LTΔTwj+LFΦF,jTj+Lrrj.|R_{j+1}-R_j| \;\le\; L_T\,|\Delta\mathrm{Tw}_j| + L_F\,\frac{|\Phi_{F,j}|}{T_j} + L_r\,|r_j|.

Then the readability tube

U(Rˉ,ΔT,ΔF,Δr)={TwjTwj ⁣ ⁣ΔT, ΦF,j/Tj ⁣ ⁣ΔF, rj ⁣ ⁣Δr}\mathcal{U}(\bar R,\Delta_T,\Delta_F,\Delta_r) =\{\, |\mathrm{Tw}_j-\mathrm{Tw}^\star_j|\!\le\!\Delta_T,\ |\Phi_{F,j}|/T_j\!\le\!\Delta_F,\ |r_j|\!\le\!\Delta_r \,\}

implies RR stays within a band of width LTΔT+LFΔF+LrΔrL_T\Delta_T+L_F\Delta_F+L_r\Delta_r around a target Rˉ\bar R.
Policy: pick per-turn budgets (ΔT,ΔF,Δr)(\Delta_T,\Delta_F,\Delta_r) to guarantee a desired readability band (e.g., “HS–undergrad” or “professional brief”).


21.5 Turn seams and code-switching

  • Soft shift: if δTwjj+1τseam|\delta\mathrm{Tw}_{j\leftrightarrow j+1}|\le \tau_{\text{seam}}, glue tiles directly.

  • Hard shift: if above budget, add a bridge tile (one-sentence summary or framing cue) that absorbs the twist difference while keeping flux small.

  • Persona blend: parameterize a style subspace; quantized twist steps rotate along a shortest geodesic between anchor vectors (prevents off-register flourish).


21.6 Runtime controller (per turn)

Inputs: per-turn ΦF,j,rj,Twj\Phi_{F,j}, r_j, \mathrm{Tw}_j; targets Twj,Rˉ\mathrm{Tw}^\star_j, \bar R.
Loop:

  1. Safety gate: if flux spike or residual breach (Ch. 17), de-rate or ask clarification.

  2. Style step: apply uju_j toward Twj\mathrm{Tw}^\star_j (halve uju_j if rj|r_j| near bound).

  3. Bridge if needed: insert buffer sentence when δTw|\delta\mathrm{Tw}| exceeds τseam\tau_{\text{seam}}.

  4. Readability audit: estimate RjR_j; if outside band, reduce ΔTw\Delta\mathrm{Tw} and/or shrink flux (tighter retrieval, more explicit structure).

  5. Log: (Δϕj,ΦF,j,Twj,rj,Rj)(\Delta\phi_j,\Phi_{F,j},\mathrm{Tw}_j,r_j,R_j).

Defaults: kp=0.5,kd=0.1,η=0.5,h=0.2,M=2,τseam=0.5k_p=0.5, k_d=0.1, \eta=0.5, h=0.2, M=2, \tau_{\text{seam}}=0.5 twist units.


21.7 Templates (ready-to-use)

  • Up-register (conversational → academic): two half-steps with a bridge: (i) tighten definitions, (ii) cite assumptions; keep ΦF/T|\Phi_F|/T moderate by adding small signposts.

  • Down-register (technical → friendly): one step then paraphrase: replace terms with glosses; ensure rjr_j small by retaining core claims verbatim before stylistic paraphrase.

  • Persona pivot (helpful → legal): enforce integer step to m=+2m=+2, add bridge (“This is not legal advice…”), then compress sentences; cap flux via bulleting and structure.


21.8 Benchmarks & acceptance

  • Style compliance: twist-hit rate (fraction of turns with TwjTwjΔT|\mathrm{Tw}_j-\mathrm{Tw}^\star_j|\le \Delta_T).

  • Readability stability: share of tokens inside target readability band.

  • Coherence at seams: fraction of seams passing δTwτseam|\delta\mathrm{Tw}|\le \tau_{\text{seam}} and rjr_j within band.

  • Spike rate: flux-spike incidents per 1K tokens; mean time-to-recover.


21.9 Failure modes & remedies

  • Twist chatter: increase hysteresis h,Mh,M, reduce kdk_d.

  • Register cliff (jarring switch): mandatory bridge tile; split into two turns.

  • Hallucination under style pressure: prioritize residual/flux bounds over twist; cap creativity until belts return to band.

  • Drift over long threads: periodic style re-anchoring (explicit restatement of register and aims).


Outcome. Dialogue control reduces to quantized twist scheduling with flux-aware safeguards. Keep twist steps small, seam defects bounded, and flux/residual inside the readability tube to guarantee coherent, on-register multi-turn conversations.

 

Ch. 22 — Junctions and Cobordisms (Pair-of-Pants)

Thesis. When multiple channels (agents, tools, or subplans) merge or split, the computation lives on a 2-D cobordism whose boundary components are the participating channels. The canonical junction is the pair-of-pants: two inputs (A,B)(A,B) to one output (C)(C) (or the reverse). Under smooth gluing (good framing + small non-Abelian seams), the belt invariants obey a simple junction conservation law.


22.1 Objects and orientations

  • A channel is a belt patch B\mathcal{B} with edges Γ\Gamma_- (conditioning/“lower”) and Γ+\Gamma_+ (generation/“upper”), metrics Δϕ, ΦF, Tw, r\Delta\phi,\ \Phi_F,\ \mathrm{Tw},\ r.

  • A junction cobordism M\mathcal{M} is a 2-surface whose oriented boundary is

    M=ΓC    (ΓA)    (ΓB)\partial\mathcal{M}= \Gamma_C \;\sqcup\; (-\Gamma_A)\;\sqcup\;(-\Gamma_B)

    (incoming boundaries carry negative orientation). Think “pair-of-pants”: A,BCA,B\to C.

We assume thin channels (small ϵ\epsilon) and compatible framings at the seams (Sec. 22.3).


22.2 What must be continuous at a junction (smooth gluing)

Seam conditions.

  1. Orientation: shared edges glued with consistent “upper–minus–lower” convention.

  2. Framing continuity: edge frames meet with bounded seam twist δTwseam\delta\mathrm{Tw}_{\text{seam}}.

  3. Small commutators across seams: [logH(A),logH(B)]η\|[\log H^{(A)},\log H^{(B)}]\|\le \eta (limits non-Abelian BCH error).

  4. Thinness: local ϵ1\epsilon \ll 1 on all incident belts.

When these hold we say the junction is smooth.


22.3 Junction conservation law (pair-of-pants)

Define the belt charge

Q(B):=Δϕ(B)    αTw(B)≈FBHLΦF(B).Q(\mathcal{B}) := \Delta\phi(\mathcal{B}) \;-\; \alpha\,\mathrm{Tw}(\mathcal{B}) \quad\stackrel{\text{FBHL}}{\approx}\quad \Phi_F(\mathcal{B}).

For a smooth pair-of-pants junction A,BCA,B\to C,

  QC    QA  +  QB    EBCH    Eseam  (22.1)\boxed{\;Q_C \;\approx\; Q_A \;+\; Q_B \;-\; \mathcal{E}_{\text{BCH}} \;-\; \mathcal{E}_{\text{seam}}\;} \tag{22.1}

with

  • BCH error from non-commuting plaquettes across seams, bounded by

    EBCH    12 ⁣seams ⁣A, B[logH(A),logH(B)]  +  O(δ3),\|\mathcal{E}_{\text{BCH}}\|\;\le\; \tfrac{1}{2}\!\sum_{\text{seams}}\!\sum_{\square\in A,\ \square'\in B} \big\|[\log H_\square^{(A)},\log H_{\square'}^{(B)}]\big\| \;+\; O(\delta^3),
  • Seam twist error Eseam:=αδTwseam\mathcal{E}_{\text{seam}} := \alpha\,\delta\mathrm{Tw}_{\text{seam}}.

Equivalently (re-expanding Q=ΔϕαTwQ=\Delta\phi-\alpha\mathrm{Tw}),

ΔϕC    ΔϕA+ΔϕB  +  α(TwCTwATwB)    EBCH.(22.2)\Delta\phi_C \;\approx\; \Delta\phi_A + \Delta\phi_B \;+\; \alpha\Big(\mathrm{Tw}_C-\mathrm{Tw}_A-\mathrm{Tw}_B\Big)\;-\;\mathcal{E}_{\text{BCH}} . \tag{22.2}

Sketch (why it holds). Apply Stokes on the junction surface: the class-function boundary phase of CC minus those of A,BA,B equals the interior curvature integral plus the net framing phase needed to align edge frames. Class functions kill conjugations from gluing; what remains are (i) the additive flux, (ii) a framing defect (seam twist), and (iii) non-Abelian BCH terms from cells spanning the seam. In the Abelian or commuting limit with continuous framing, both errors vanish and (22.1) is exact.


22.4 Splitting junctions

For a split C(A,B)C \to (A,B), simply reverse orientations:

QA+QB    QC    EBCH    Eseam.Q_A + Q_B \;\approx\; Q_C \;-\; \mathcal{E}_{\text{BCH}} \;-\; \mathcal{E}_{\text{seam}}.

Interpretation: the parent’s interior work (flux) and framing are allocated to children, up to controlled junction costs.


22.5 Multi-agent merge and broadcast (operational view)

Treat each agent/tool channel as a belt with signature
σ=(Δϕ,ΦF,Tw,r,cost,ϵ)\sigma=(\Delta\phi,\Phi_F,\mathrm{Tw},r,\text{cost},\epsilon).

Merge controller (two → one)

  1. Pre-align framings: choose a small unitary seam adapter SS that minimizes
    αδTw+λ[logH(A),logH(B)]\alpha|\delta\mathrm{Tw}| + \lambda\|[\log H^{(A)},\log H^{(B)}]\|.

  2. Conservation target: set QC=QA+QBQ_C^\star = Q_A + Q_B.

  3. Synthesize output tile to hit ΔϕC=QC+αTwC\Delta\phi_C^\star = Q_C^\star + \alpha\mathrm{Tw}_C^\star, with TwC\mathrm{Tw}_C^\star chosen by style policy (Ch. 21).

  4. Gate: if QCQC>τQ|Q_C - Q_C^\star|>\tau_Q or rCr_C breaches band, insert a buffer tile (brief reconciliation/summary) and retry.

Broadcast controller (one → two)

Pick allocation weights wA,wBw_A,w_B (trust, expertise, or routing policy) and set

QA=wAQC,QB=wBQC,wA+wB=1,Q_A^\star=w_A\,Q_C,\qquad Q_B^\star=w_B\,Q_C,\qquad w_A+w_B=1,

then build children tiles with small seam twist and monitor residuals.


22.6 Junction calculus in a network

Let a node have incoming set I\mathcal{I} and outgoing set O\mathcal{O}. The network law (sum over oriented boundaries) is

oOQo    iIQi    seams(EBCH+Eseam).(22.3)\sum_{o\in\mathcal{O}} Q_o \;\approx\; \sum_{i\in\mathcal{I}} Q_i \;-\; \sum_{\text{seams}} \Big(\mathcal{E}_{\text{BCH}}+\mathcal{E}_{\text{seam}}\Big). \tag{22.3}

Global consistency over a graph follows by telescoping: interior seams cancel, leaving only external boundaries and junction errors.

Budgeting. For mm junctions on a plan, keep per-node bounds
EBCHη, δTwτseam/α|\mathcal{E}_{\text{BCH}}|\le \eta,\ |\delta\mathrm{Tw}|\le \tau_{\text{seam}}/\alpha so the total deviation stays m(η+ατseam)\le m(\eta+\alpha\tau_{\text{seam}}).


22.7 Algorithms

Merge (pair-of-pants) — minimal routine

def merge_pair_of_pants(sigA, sigB, style_target):
    # sig = (DeltaPhi, PhiF, Tw, r, cost, eps)
    S = choose_seam_adapter(sigA, sigB)             # minimize seam twist & commutator proxy
    Q_A, Q_B = sigA.DeltaPhi - alpha*sigA.Tw, sigB.DeltaPhi - alpha*sigB.Tw
    Q_target = Q_A + Q_B
    Tw_star  = style_target.twist
    DeltaPhi_star = Q_target + alpha*Tw_star
    tileC = synthesize_tile(DeltaPhi_star, Tw_star, S)   # keep ΦF small, r in band
    sigC = measure_signature(tileC)
    if abs((sigC.DeltaPhi - alpha*sigC.Tw) - Q_target) > tau_Q or abs(sigC.r) > tau_r:
        tileC = insert_buffer_and_retry(tileC)
        sigC  = measure_signature(tileC)
    return tileC, sigC

Broadcast mirrors this with weighted targets wA,wBw_A,w_B.


22.8 Diagnostics & acceptance at a node

  • Charge balance: OQIQτQ|\,\sum_{\mathcal{O}} Q - \sum_{\mathcal{I}} Q\,| \le \tau_Q.

  • Seam audit: δTwseamτseam|\delta\mathrm{Tw}_{\text{seam}}|\le \tau_{\text{seam}}; list top seam contributors.

  • Residuals: all incident rr within band; no flux spikes over KK steps (Ch. 17).

  • Thinness: maxϵϵmax\max \epsilon \le \epsilon_{\max}.


22.9 Failure modes & remedies

  • Framing clash (large δTw\delta\mathrm{Tw}). Insert a bridge/adapter tile; re-estimate seam.

  • Non-Abelian seam (large BCH). Increase across-width resolution (local slab), or enforce a common basis before merging.

  • Charge leak (violated balance). Recompute with class functions; check orientation; if persistent, treat as node defect and quarantine that path.

  • Spike at junction. Trigger safety gate; split merge into two staged merges via an intermediate buffer node.


Outcome. Pair-of-pants junctions supply a local conservation law for belt networks: the additive “charge” Q=ΔϕαTwQ=\Delta\phi-\alpha\mathrm{Tw} (flux up to FBHL) is preserved under smooth gluing, with explicit, controllable corrections from seam twist and non-Abelian commutators. This turns multi-agent merges and broadcasts into principled, auditable operations in belt-aware systems.

 

Ch. 23 — Consensus & Negotiation Protocols

Thesis. In a multi-agent belt network, each agent carries a local belt signature
σi=(Δϕi, ΦF,i, Twi, ri, ϵi)\sigma_i=(\Delta\phi_i,\ \Phi_{F,i},\ \mathrm{Tw}_i,\ r_i,\ \epsilon_i).
Consensus means phase agreement (and, when needed, style agreement) across agents while keeping flux/residual within budgets. We give belt-aware update laws and a spectral-radius condition that guarantees convergence (sketch).


23.1 Variables, graph, and costs

Let G=(V,E)G=(V,E) be the communication graph; iVi\in V indexes agents. Define:

  • Phase state: xi:=Δϕix_i := \Delta\phi_i (class-function edge gap).

  • Style state: si:=Twis_i := \mathrm{Tw}_i (quantized target allowed).

  • Belt charge: Qi:=xiαsiΦF,iQ_i := x_i - \alpha s_i \approx \Phi_{F,i} (from FBHL).

  • Seam costs: for edge (i,j)(i,j), use commutator/twist proxies
    ηij\eta_{ij} (BCH size) and δsij:=sisj\delta s_{ij}:=|s_i-s_j|.

Edge weights (belt-aware).

wij  aijexp ⁣(βηηijβsαδsij),jwij=1,w_{ij}\ \propto\ a_{ij}\,\exp\!\big(-\beta_\eta\,\eta_{ij}-\beta_s\,\alpha\,\delta s_{ij}\big), \qquad \sum_{j} w_{ij}=1,

with aij{0,1}a_{ij}\in\{0,1\} the adjacency. Thus high seam penalties weaken coupling.


23.2 Phase-agreement dynamics

(A) Discrete DeGroot update (with safeguards)

xit+1=jwijxjt+uit,x_i^{t+1} = \sum_{j} w_{ij}\,x_j^t + u_i^t,

where uitu_i^t is a small local correction (e.g., to meet external specs). Stack xtRnx^t\in\mathbb{R}^{n}:

xt+1=Wxt+ut,W=[wij].x^{t+1} = W x^t + u^t,\quad W=[w_{ij}].

If WW is row-stochastic, primitive (strongly connected & aperiodic), then xtx^t converges to the stationary-weighted average (πx0)1 (\pi^\top x^0)\,\mathbf{1}, where πW=π\pi^\top W=\pi^\top, π ⁣ ⁣0\pi\!\succ\!0, iff

ρ ⁣(W1π)<1.(23.1)\rho\!\left(W-\mathbf{1}\pi^\top\right) < 1. \tag{23.1}

(Spectral-radius consensus condition.)

Belt gates. If any agent triggers a flux spike or residual breach (Ch. 17), it temporarily freezes its value (set wii ⁣w_{ii}\!\uparrow, wij ⁣w_{ij}\!\downarrow for jij\neq i) until back in band.

(B) Continuous Laplacian flow (linearized Kuramoto)

Let LL be the graph Laplacian (L1=0L\mathbf{1}=0). For small phase differences,

x˙=KLx+d(t).\dot{x} = -K\,L\,x + d(t).

On the subspace 1 \mathbf{1}^{\perp}, the generator is KL-K L with eigenvalues Kλk-K\lambda_k (λ2>0\lambda_2>0 iff GG is connected). Thus x(t)x(t) reaches average consensus when K>0K>0 and GG is connected.

Discrete step. Euler with step η>0\eta>0:

xt+1=(IηL)xt+ηdt.x^{t+1}=(I-\eta L)x^t + \eta d^t.

Convergence on 1\mathbf{1}^{\perp} holds iff

ρ ⁣((IηL)1)=maxk21ηλk  <  1    0<η<2λmax(L).(23.2)\rho\!\left( (I-\eta L)\big|_{\mathbf{1}^{\perp}}\right) = \max_{k\ge2}\,|1-\eta\lambda_k| \;<\;1 \;\Longleftrightarrow\; 0<\eta<\frac{2}{\lambda_{\max}(L)}. \tag{23.2}

23.3 Style (register) agreement with quantized targets

Agents negotiate a common style anchor sZ/2s^\star \in \mathbb{Z}/2 (integer or half-integer units). Use a project-then-quantize scheme:

  1. Continuous averaging: s~t+1=(IηL)st \tilde{s}^{t+1} = (I-\eta L)\,s^t.

  2. Quantized projection: st+1=QΔ(s~t+1) s^{t+1} = \mathcal{Q}_{\Delta}\big(\tilde{s}^{t+1}\big),
    where QΔ\mathcal{Q}_{\Delta} snaps to the nearest anchor while enforcing a per-step cap st+1stΔ|s^{t+1}-s^t|\le \Delta (prevents seam shocks).

Readability guard. Keep sit+1sitτseam|s_i^{t+1}-s_i^t|\le \tau_{\text{seam}} and flux density ΦF,i/T|\Phi_{F,i}|/T below band to stay in guaranteed readability regions (Ch. 21).


23.4 Charge-balanced negotiation (with constraints)

Some tasks require junction conservation at a merge (Ch. 22):
outQinQ\sum_{\text{out}} Q \approx \sum_{\text{in}} Q up to seam/BCH budgets.

We solve a small constrained problem:

minx,s i[λFxiαsi+λssisi]s.t.(IW)xτc,  oQiQτQ,\min_{x,s}\ \sum_i \Big[ \lambda_F|x_i-\alpha s_i| + \lambda_s|s_i-s_i^\dagger| \Big] \quad \text{s.t.}\quad \| (I-W)x \| \le \tau_c,\ \ \Big|\sum_{o} Q - \sum_{i} Q\Big|\le \tau_Q,

where sis_i^\dagger are agent style preferences. A projected gradient + consensus loop alternates (i) a DeGroot/Laplacian averaging step on xx and ss, (ii) a projection enforcing the junction budget, and (iii) quantization of ss.


23.5 Why the spectral condition ⇒ consensus (sketch)

  • DeGroot form. Decompose xtx^t into average + disagreement:
    xt=(πx0)1+ytx^t=(\pi^\top x^0)\mathbf{1} + y^t with πyt=0\pi^\top y^t=0. The disagreement evolves by
    yt+1=(W1π)yty^{t+1} = (W-\mathbf{1}\pi^\top) y^t. If (23.1) holds, yt0y^t\to 0 geometrically (rate ρ\rho).

  • Laplacian form. In discrete time xt+1=(IηL)xtx^{t+1}=(I-\eta L)x^t: on 1\mathbf{1}^\perp, the matrix has eigenvalues 1ηλk1-\eta\lambda_k for k2k\ge2. Condition (23.2) places them strictly inside the unit disk, so disagreement decays. The average mode is fixed.

Both proofs tolerate small bounded disturbances ut,dtu^t,d^t and belt projections, yielding practical consensus within a tube whose radius scales with disturbance and projection errors.


23.6 Robustness to noisy/adversarial agents

  • Trimmed/median consensus: replace neighbor average by element-wise trimmed mean or median → tolerates outliers.

  • Adaptive weights: down-weight agent jj if it repeatedly violates belt bands (large rjr_j or flux spikes).

  • Quarantine: temporarily cut edges from agents failing unitarity/thinness checks; re-admit after recovery.

  • Seam smoothing: insert buffer tiles on contentious links to reduce ηij\eta_{ij} and δsij\delta s_{ij}.


23.7 Protocol templates

  1. Evidence-weighted consensus. Weights wijw_{ij} include a trust factor from positive flux that agent jj’s evidence contributed in past merges.

  2. Seam-minimizing consensus. Solve for ss^\star that minimizes (i,j)(ηij+αδsij)\sum_{(i,j)}(\eta_{ij}+\alpha\delta s_{ij}) subject to style policy, then run phase consensus toward the induced QQ targets.

  3. Two-phase negotiation. (i) Reach phase average under Laplacian flow; (ii) quantize and finalize style using the project-then-quantize scheme.


23.8 Minimal pseudocode

def belt_consensus_step(state):
    # state: x (phase), s (style), W, L, seam costs, bands
    # 1) Safety gating (freeze noisy nodes)
    mask = (state.residual > tau_r) | (state.flux_z > tau_spike)
    W = adjust_weights(state.W, mask)
    # 2) Phase consensus (DeGroot or Laplacian)
    x = W @ state.x if use_degroot else state.x - eta * (state.L @ state.x)
    # 3) Style averaging + quantization
    s_tilde = state.s - eta * (state.L @ state.s)
    s = quantize_with_cap(s_tilde, anchors=style_anchors, step_cap=Delta)
    # 4) Junction projection (charge balance)
    x, s = project_charge_balance(x, s, tau_Q, alpha)
    # 5) Recompute signatures, logs
    return x, s

23.9 Benchmarks & acceptance

  • Consensus error: Ex(t)=maxixixˉE_x(t)=\max_i |x_i - \bar{x}|, Es(t)=maxisisE_s(t)=\max_i |s_i - s^\star|; require geometric decay to below bands.

  • Spectral margin: estimate ρ(W1π)\rho(W-\mathbf{1}\pi^\top) or bound λmax(L)\lambda_{\max}(L); verify (23.1)/(23.2) holds.

  • Belt safety: per-agent residuals and flux density within bands ≥95% of steps; seam penalties trending down.

  • Robustness: pass trimmed-consensus tests with injected outliers; no uncontrolled spikes.


23.10 Failure modes & remedies

  • Disconnected or weakly connected graph: increase communication edges or add relay/summary nodes (buffer tiles).

  • Large seam/BCH penalties: align framings first (style pre-agreement), or increase across-width resolution locally (slab).

  • Chattering from quantization: increase step cap Δ\Delta hysteresis or run more continuous averaging steps before snapping.

  • Adversarial drift: enforce quarantine and require positive-flux evidence before re-weighting trust upward.


Outcome. Consensus and negotiation reduce to phase averaging (with belt-aware weights) and quantized style agreement, governed by standard spectral conditions. With safety gates and seam-aware weighting, multi-agent systems reach agreement quickly while keeping belt invariants inside operational bands.

 

 

Ch. 24 — Discrete Surface-Ordering Algorithms

We give practical algorithms for computing surface-ordered exponentials on a belt B\mathcal{B}: how to mesh an annulus, order plaquettes, perform quadrature in non-Abelian settings, and control complexity, stability, and error versus curvature/commutators.


24.1 Geometry & mesh (annular coordinates)

Parametrize the belt by (s,n)[0,L]×[0,w](s,n)\in[0,L]\times[0,w] with edges Γ:n=0\Gamma_-:\,n{=}0, Γ+:n=w\Gamma_+:\,n{=}w. Let the connection be

A=As(s,n)ds+An(s,n)dn,F=(sAnnAs+[As,An])dsdn.A = A_s(s,n)\,ds + A_n(s,n)\,dn,\qquad F = \big(\partial_s A_n - \partial_n A_s + [A_s,A_n]\big)\,ds\wedge dn .

Discretize with an annular mesh:

  • NsN_s segments along ss (arc-length or curvature-adaptive),

  • NnN_n rungs across nn (geodesic offsets).
    Cells i,j\square_{i,j} have Δsi,Δnj\Delta s_i,\,\Delta n_j. Keep aspect ratio 0.3 ⁣ ⁣Δsi/Δnj ⁣ ⁣30.3\!\le\!\Delta s_i/\Delta n_j\!\le\!3 and thinness ε=maxκw1\varepsilon=\max \kappa\,w \ll 1.

Frames. Maintain orthonormal frames on rungs; across-width geodesics define rung correspondences.


24.2 Surface ordering & plaquettes

Define edge transports Us,±[i]U(k)U_{s,\pm}[i]\in \mathrm{U}(k) and rung transports Un[i,j]U(k)U_n[i,j]\in \mathrm{U}(k). The plaquette holonomy (counter-clockwise) is

Hi,j=Us,+[i,j]  Un[i+1,j]  Us,[i,j]1  Un[i,j]1.H_{i,j} = U_{s,+}[i,j]\; U_n[i{+}1,j]\; U_{s,-}[i,j]^{-1}\; U_n[i,j]^{-1}.

The surface-ordered exponential is the ordered product of Hi,jH_{i,j} over the mesh with a fixed belt ordering: sweep n:0 ⁣ ⁣wn:0\!\to\!w, and for each rung use a snake in ss (even rungs left→right, odd rungs right→left) to keep adjacent factors near-commuting. Extract scalars with class functions (e.g., argdet\arg\det or characters).


24.3 Quadrature schemes (non-Abelian)

We approximate each Hi,jH_{i,j} by evaluating As,AnA_s,A_n within the cell.

Q0 — Wilson plaquette (first order).
Us,±=exp(ΔsAs at edge midpoint)U_{s,\pm}=\exp(\Delta s\,A_s\text{ at edge midpoint}), Un=exp(ΔnAn at rung midpoint)U_n=\exp(\Delta n\,A_n\text{ at rung midpoint}). Cost-minimal; error O(ΔsΔn[As,An])+O(h3)O(\Delta s\,\Delta n\,\|[A_s,A_n]\|) + O(h^3).

Q1 — Strang-split edges (second order).
Half-steps in ss:

Hi,jeΔs2AstopeΔnAni+1/2eΔs2AsboteΔnAni1/2.H_{i,j}\approx e^{\frac{\Delta s}{2}A_s^\text{top}} \,e^{\Delta n A_n^{i+1/2}} \,e^{-\frac{\Delta s}{2}A_s^\text{bot}} \,e^{-\Delta n A_n^{i-1/2}} .

Error O(h3)O(h^3), better when commutators are moderate.

Q2 — Local Magnus (fourth order, cellwise).
Transport AA to the cell barycenter, set

logHi,ji,jF  +  12 ⁣ ⁣ ⁣ ⁣ ⁣[ ⁣A(ξ),A(ξ) ⁣]dξdξ(truncated).\log H_{i,j}\approx \iint_{\square_{i,j}} F \;+\; \tfrac{1}{2}\!\iint\!\!\iint \!\![\!A(\xi),A(\xi')\!]\, d\xi d\xi' \quad (\text{truncated}).

Use a 2×2 Gaussian rule for FF; include lowest commutator term. Best accuracy; costlier due to log/exp\log/\exp.

Tip. In practice: Q1 for training/online; Q2 for audits or high-curvature regions.


24.4 Algorithms (pseudocode & cost)

A) Wilson–Snake (fast baseline)

def belt_surface_order(A_s, A_n, Ns, Nn, steps):
    H_tot = I
    for j in range(Nn):
        idx = range(Ns) if j%2==0 else reversed(range(Ns))
        for i in idx:
            Us_top = expm(Δs[i]*A_s(i, j+1/2, edge='top'))
            Us_bot = expm(Δs[i]*A_s(i, j+1/2, edge='bot'))  # same i,j rung, lower edge
            Un_r   = expm(Δn[j]*A_n(i+1/2, j))
            Un_l   = expm(Δn[j]*A_n(i-1/2, j))
            H = Us_top @ Un_r @ inv(Us_bot) @ inv(Un_l)
            H_tot = H @ H_tot
    return H_tot

Complexity. O(NsNnk3)O(N_s N_n\,k^3) for U(k)\mathrm{U}(k) (dense expm). Memory O(k2)O(k^2). GPU-friendly via batched expm.

B) Strang–Snake (2nd order)

Replace each edge exp with half-steps as in Q1. Same asymptotic cost; ~1.8× runtime constant.

C) Cell-Magnus (audit mode)

Compute logHi,j\log H_{i,j} via Q2, then sum in log-Euclidean space with BCH(2) across the snake, finally expm once at the end.
Complexity. O(NsNnk3)O(N_s N_n\,k^3) with larger constants (log/exp + Sylvester solves).

Parallel prefix. Use tree/prefix scans along each rung to reduce depth to O(logNs)O(\log N_s) on GPUs.


24.5 Numerical stability

  • Unitarity projection. After each product, apply polar: UPolar(U)U\leftarrow \mathrm{Polar}(U) (or every mm steps). Penalty UUIF \|U^\dagger U-I\|_F as a health signal.

  • Phase integrity. Read phases via class functions (argdet\arg\det, principal eigenphase); keep a wrap index with stop-gradient in training.

  • Ordering discipline. Always “lower→upper” across nn and snake in ss; mixing orders inflates BCH error.

  • Conditioning. Clip logHi,j\|\log H_{i,j}\| to δmax\le \delta_{\max} (e.g., 0.3) before exponentials; refine mesh if exceeded.

  • Accumulation. For Abelian scalars, use Kahan or pairwise sums; for matrices, prefer log-space accumulation in audits.


24.6 Error vs. curvature/commutators (sketch)

Let h=max{Δs,Δn}h=\max\{\Delta s,\Delta n\}, F ⁣= ⁣supBF\|F\|_\infty\!=\!\sup_{\mathcal{B}}\|F\|, and χ=supB[As,An]\chi=\sup_{\mathcal{B}}\|[A_s,A_n]\|.

  • Local plaquette error:
    logHi,ji,jF  =  O(h2F)+O(ΔsΔnχ)\|\log H_{i,j} - \iint_{\square_{i,j}}F\|\;=\; O(h^2\|F\|) + O(\Delta s\,\Delta n\,\chi).

  • Global product error (Wilson–Snake):
    O(NsNn)O(N_s N_n) times local, mitigated by near-cancellation along the snake; practical bound
    EC1areahF+C2areaχ\|E\|\lesssim C_1\,\text{area}\cdot h\,\| \nabla F \| + C_2\,\text{area}\cdot \chi.

  • Second-order (Strang): leading term O(h2)O(h^2) under bounded χ\chi.

  • Magnus(4): leading term O(h4)O(h^4) provided  ⁣Adξ<π\int_{\square}\!\|A\|\,d\xi < \pi (convergence domain).

Rule-of-thumb targeting.

  • Choose hh so each cell’s plaquette angle δi,j=logHi,j0.20.3\delta_{i,j}=\|\log H_{i,j}\|\le 0.2\text{–}0.3.

  • If χ\chi spikes (non-Abelian seam), align frames or refine across nn locally.


24.7 Adaptive refinement

Use error indicators per cell:

ei,j=logHi,j,ci,j=[As,An],gi,j=F.e_{i,j}=\|\log H_{i,j}\|,\qquad c_{i,j}=\|[A_s,A_n]\|,\qquad g_{i,j}=\|\nabla F\|.

Refine where ee or cc exceed bands; coarsen where both are small. Keep graded meshes (neighbor sizes within ×2) to avoid seam artifacts. Stop when plan-level bands (Ch. 15) pass.


24.8 Complexity, memory, and batching

  • Cost. O(NsNnk3)O(N_s N_n k^3) flops; for k ⁣ ⁣8k\!\le\!8 this is bandwidth-bound on GPUs.

  • Batching. Tile multiple belts; keep per-belt scan independent.

  • Caching. Reuse As,AnA_s,A_n samples for Q0/Q1; share rung frames across neighboring cells.

  • Mixed precision. FP16 edge exps with FP32 accumulators often suffice; audit in FP64 for small belts.


24.9 Acceptance tests (algorithmic)

  1. Reparameterization test: resample (s,n)(s,n) (same geometry) → class-function outputs must match within 0.5%.

  2. Width-scaling linearity: for fixed twist, Δϕ(w)\Delta\phi(w) linear over operational ww (Ch. 15).

  3. 4π periodicity (framing): apply ±2 twists; recovered phase shifts by α\alpha per twist within tolerance.

  4. Non-Abelian seam: create a controlled commutator patch; verify Q1 ≪ Q0 error; Q2 closes to reference.


24.10 What to use when

  • Training/online: Strang–Snake (Q1) — best speed/accuracy tradeoff; add polar projection every 8–16 cells.

  • Monitoring: Wilson–Snake (Q0) with small meshes for quick health signals.

  • Audits / high curvature: Cell-Magnus (Q2) on a refined local mesh; log commutators and seam penalties.


Outcome. You now have mesh/ordering conventions, three implementable quadrature levels, and concrete rules to keep unitarity, stability, and error under control as curvature and commutators vary. These are the computational backbone for the metrics (Ch. 15), losses (Ch. 16), controllers (Ch. 17), and planning/tiles (Chs. 19–23).

 

Ch. 25 — Estimating the Semantic Connection from Models

Goal. Given a model’s internal signals (embeddings, logits, hidden states, attention), construct a discrete connection AA on a belt so you can compute edge holonomies, across-width transports, and plaquette curvature with the algorithms of Ch. 24. We give practical U(1), U(k), and Uhlmann (mixed-state) estimators, plus bias/consistency guarantees under mild conditions.


25.1 Observables, gauges, and what’s identifiable

  • We observe vectors/matrices h(ξ)Rdh(\xi)\in\mathbb{R}^d or logits z(ξ)RVz(\xi)\in\mathbb{R}^V along a parameter ξ\xi (token/time/plan index). These are only defined up to a latent basis: hR(ξ)hh\mapsto R(\xi)h with unknown invertible RR.

  • We therefore estimate transports modulo gauge and only read class functions (phase, traces, characters) downstream (Ch. 15).

  • Two directions on a belt:

    • Along-edge (ss): transport within a channel (retrieval or generation).

    • Across-width (nn): binding transport between channels (evidence→decoder, planner→executor).


25.2 U(k) edge transport from hidden states (Procrustes)

You want a unitary step Us[k]U(K)U_{s}[k]\in\mathrm{U}(K) aligning a KK-dimensional semantic subspace at ξk\xi_k and ξk+1\xi_{k+1}.

Subspace extraction (stable): build a local window Wk\mathcal{W}_k around ξk\xi_k, assemble HkRd×KH_k\in\mathbb{R}^{d\times K} from the top-KK left singular vectors (PCA) or from CCA across paired views (e.g., retrieval ↔ generation). Repeat for Hk+1H_{k+1}.

Orthogonal Procrustes (unitary aligner):
Mk=HkHk+1=UΣVM_k = H_k^\top H_{k+1} = U\Sigma V^\top (SVD),
Us[k]:=UVO(K)\displaystyle U_{s}[k] := U V^\top \in \mathrm{O}(K) (use complex lift if needed → U(K)\mathrm{U}(K)).
Connection element: As[k]:=1ΔslogUs[k]A_s[k] := \frac{1}{\Delta s}\log U_{s}[k] (principal matrix log; clip logδ\|\log\|\le\delta).

Why this works. Any local basis rotation Hk ⁣ ⁣HkRkH_k\!\mapsto\!H_kR_k just conjugates Us[k]U_s[k] by RkR_k, which vanishes inside class functions used later (Δφ, characters). Consistency is in §25.7.


25.3 U(k) across-width transport from cross-attention (polar)

At step tt, let EtRd×KE_t\in\mathbb{R}^{d\times K} span the evidence subspace (from the selected chunks/keys) and GtRd×KG_t\in\mathbb{R}^{d\times K} span the generator subspace (decoder state). Form the cross-covariance
Ct=EtGtC_t = E_t^\top G_t.

Polar factor as unitary binding: Ct=RtStC_t = R_t S_t (polar), with unitary RtO(K)R_t\in\mathrm{O}(K) and positive StS_t. Take
Un[t]:=Rt,An[t]:=1ΔnlogRt.\displaystyle U_n[t] := R_t,\qquad A_n[t] := \frac{1}{\Delta n}\log R_t.

This gives the rung transport used in each plaquette HH_\square (Ch. 24).


25.4 U(1) estimators (phase scalars)

If you only need a scalar phase gap:

(a) From embeddings/hidden states. Project the step aligner to a class function:
Δϕs[k]:=argdetUs[k]\Delta\phi_s[k] := \arg\det U_s[k] (or principal eigenphase). Sum along the edge.

(b) From logits/probabilities. Map probabilities p(ξ)=softmax(z(ξ))p(\xi)=\mathrm{softmax}(z(\xi)) to amplitudes ψ(ξ)=p(ξ)\psi(\xi)=\sqrt{p(\xi)} (Hellinger lift). Define a discrete Berry-style phase
δϕ[k]:=argψ(ξk),ψ(ξk+1),\displaystyle \delta\phi[k] := \arg \langle \psi(\xi_k), \psi(\xi_{k+1})\rangle,
then Δϕ=kδϕ[k]\Delta\phi=\sum_k \delta\phi[k]. This is robust, bounded, and reparameterization-invariant.


25.5 Uhlmann (mixed-state) connection for stochastic models

When states are ensembles (dropout, sampling, batched augmentations) or when you work with marginals (token distributions, pooled activations), use density matrices ρ(ξ)0\rho(\xi)\succeq 0 (normalize Trρ=1\mathrm{Tr}\,\rho=1).

Uhlmann step via purifications (discrete, practical):

  1. Compute matrix square roots Wk=ρ(ξk)1/2W_k=\rho(\xi_k)^{1/2}, Wk+1=ρ(ξk+1)1/2W_{k+1}=\rho(\xi_{k+1})^{1/2}.

  2. Form Mk=WkWk+1M_k = W_k W_{k+1} and take its polar decomposition Mk=RkPkM_k = R_k P_k with unitary RkR_k.

  3. Define the Uhlmann parallel transporter Us[k]:=RkU_{s}[k] := R_k and the mixed-state edge phase by a class function (e.g., argdetRk\arg\det R_k); the generator is As[k]=1ΔslogRkA_s[k]=\frac{1}{\Delta s}\log R_k.

This is the discrete counterpart of Uhlmann’s parallelism (maximizes fidelity between purifications). It reduces to the pure-state Berry transport when ρ=ψψ\rho=\psi\psi^\top.


25.6 Along-vs-across estimators for common signals

Signal Along-edge UsU_s Across-width UnU_n
Hidden states Subspace via PCA/CCA; Procrustes UsU_s Cross-covariance polar RR
Embeddings Same as hidden states (on embedding layer) Same as hidden (evidence ↔ decoder)
Logits / probs Hellinger lift → U(1) phase; or take top-KK eigenspace of logit Hessian for U(k) Attention-weighted evidence subspace vs decoder subspace → polar
Attention maps Build subspaces from key/value projections; then Procrustes The attention mixing itself induces CtC_t → polar
Ensembles / dropout Density ρ\rho in feature space; Uhlmann RR Joint density blocks; cross-covariance + Uhlmann on blockwise ρ\rho

25.7 Bias & consistency (sketch)

Assume:

  • (S1) Smoothness: the true semantic subspace S(ξ)S(\xi) is C1C^1 with bounded curvature on each edge, and the across-width map is C1C^1.

  • (S2) Separation: the top-KK singular values used to define S(ξ)S(\xi) are separated from the rest by a gap γ>0\gamma>0 (local PCA stability).

  • (S3) Sampling: windows are wide enough that empirical covariances converge (LLN), and step size h0h\to 0.

Then:

(C1) Procrustes consistency. The estimated Us[k]U_s[k] converges (in probability) to the orthogonal part of the true differential transport between S(ξk)S(\xi_k) and S(ξk+1)S(\xi_{k+1}); thus As[k]As(ξk)+O(h)A_s[k]\to A_s(\xi_k)+O(h). Bias terms are O(h)O(h) (discretization) + O(γ1 ⁣× ⁣covariance error)+\ O(\gamma^{-1}\!\times\! \text{covariance error}).

(C2) Polar across-width consistency. If the true cross-map between evidence and generator subspaces is full-rank and locally smooth, the polar factor RtR_t converges to its unitary part; hence An[t]A_n[t] is first-order consistent.

(C3) Uhlmann consistency. If ρ(ξ)\rho(\xi) is full-rank and C1C^1, the discrete polar RkR_k yields the correct Uhlmann parallel transport to first order; error O(h2)O(h^2) if W(ξ)W(\xi) is C2C^2.

(C4) U(1) Hellinger phase. For normalized ψ=p\psi=\sqrt{p} with smooth p(ξ)p(\xi), the product of inner-product phases converges to the discrete Berry phase on the probability simplex with Fubini–Study metric; bias O(h2)O(h^2) for symmetric stepping.

Main failure modes. (i) Subspace swaps (gap γ\gamma closes) → jumpy transports; (ii) Non-unitary drift from numerics → pollutes phases (fix with polar projection & unitary penalty); (iii) Seam commutators large across width → prefer slab geometry or align frames.


25.8 Regularization & health checks

  • Unitary projection. After each step transport, apply polar projection U ⁣ ⁣Polar(U)U\!\leftarrow\!\mathrm{Polar}(U); log UUIF\|U^\dagger U-I\|_F.

  • Thinness monitoring. Track thinness ε=maxκw\varepsilon=\max\kappa w and the plaquette angle logH\|\log H_\square\|; refine if above bands.

  • Gauge sanity. Re-extract subspaces with random orthonormal bases; class-function readouts (Δφ, characters) must be stable (≤0.5%).

  • Reparameterization. Resample along the edge; invariants unchanged (Ch. 15 acceptance tests).


25.9 Practical recipes (drop-in)

(A) Hidden-state U(k) edge transport

  1. Window Wk\mathcal{W}_k, compute HkPCAK(Wk)H_k\gets \mathrm{PCA}_K(\mathcal{W}_k), Hk+1H_{k+1} similarly.

  2. M=HkHk+1=UΣVM=H_k^\top H_{k+1}=U\Sigma V^\top, set Us[k]=UVU_s[k]=UV^\top.

  3. As[k]=1ΔslogUs[k]A_s[k]=\frac{1}{\Delta s}\log U_s[k] (clip).

  4. Optionally project Us[k]U_s[k] to U(K)\mathrm{U}(K) (complex lift) for phase readouts.

(B) Cross-attention U(k) across-width

  1. Build Et,GtE_t,G_t (evidence & generator subspaces).

  2. Ct=EtGtC_t=E_t^\top G_t, polar Ct=RtStC_t=R_tS_t.

  3. Un[t]=RtU_n[t]=R_t, An[t]=1ΔnlogRtA_n[t]=\frac{1}{\Delta n}\log R_t.

(C) Uhlmann (mixed state)

  1. Estimate ρ(ξ)=1mr=1mhrhr\rho(\xi)=\frac{1}{m}\sum_{r=1}^m h_r h_r^\top or from probs.

  2. Wk=ρ(ξk)1/2W_k=\rho(\xi_k)^{1/2} (stable sqrt), M=WkWk+1M=W_k W_{k+1}.

  3. Polar M=RPM=R P, take Us[k]=RU_s[k]=R, As[k]=1ΔslogRA_s[k]=\frac{1}{\Delta s}\log R.

(D) U(1) Hellinger phase from logits

  1. p(ξ)=softmax(z(ξ))p(\xi)=\mathrm{softmax}(z(\xi)), ψ=p\psi=\sqrt{p}.

  2. δϕ[k]=argψ(ξk),ψ(ξk+1)\delta\phi[k]=\arg\langle \psi(\xi_k),\psi(\xi_{k+1})\rangle, sum to Δφ.


25.10 Complexity and numerics

  • PCA/CCA per window: O(dK2)O(dK^2) (thin K ⁣ ⁣dK\!\ll\!d), SVD O(K3)O(K^3) per step.

  • Polar & Procrustes are GPU-friendly (batched SVD).

  • Use mixed precision (FP16 compute, FP32 accumulators); audits in FP64 for small belts.

  • Clamp logδmax[0.2,0.3]\|\log\|\le\delta_{\max}\in[0.2,0.3]; refine mesh if exceeded (Ch. 24).


25.11 Acceptance tests (estimator level)

  1. Gauge stability: random re-basings of HkH_k leave Δφ/characters unchanged within 0.5%.

  2. Reparam test: down/up-sample along edges → invariants drift ≤0.5%.

  3. Width-scaling: for fixed twist, Δϕ(w)\Delta\phi(w) linear over operational ww.

  4. 4π / twist quantization: integer twist steps shift Δφ by α\alpha per twist.

  5. Mixed-state sanity: Uhlmann phase reduces to pure-state phase on rank-1 densities.


Outcome. You now have constructive, numerically stable estimators of the semantic connection from standard model signals—hidden states, embeddings, logits/probabilities, and ensembles—covering U(1), U(k), and Uhlmann regimes, with clear bias/consistency stories and drop-in acceptance tests. These feed directly into belt metrics (Ch. 15), training (Ch. 16), controllers (Ch. 17), and all downstream planning/composition chapters.

 

Ch. 26 — Benchmarks & Evaluation

We define three belt-native benchmark suites and the exact artifacts you must log to make results reproducible and comparable across systems.

Core readouts (Ch. 15): edge gap Δϕ\Delta\phi, flux ΦF\Phi_F, twist Tw\mathrm{Tw}, residual rFBHL=Δϕ(ΦF+αTw)r_{\text{FBHL}}=\Delta\phi-(\Phi_F+\alpha\,\mathrm{Tw}), thinness ε\varepsilon, unitarity norm, commutator proxy.


26.1 The three suites (what & why)

  1. 4π periodicity (Framing Quantization): verifies that twist units produce the correct phase increments α\alpha and that the system respects the double-cover periodicity.

  2. Width-scaling law: validates thin-belt physics and your flux calibration by checking linear Δϕ(w)\Delta\phi(w).

  3. Belt–Faraday test: tests dynamics: a controlled change of interior curvature induces an edge-gap EMF (time-derivative version of FBHL).

Each suite includes protocol, expected curves, tolerances, and pass/fail rules.


26.2 Suite A — 4π periodicity (framing)

Goal. Show that adding one full twist unit ΔTw=+1\Delta \mathrm{Tw}=+1 shifts the edge phase by +α+\alpha, and that two units (±2π2\pi twice, i.e. 4π4\pi) returns the belt to the same physical state (mod wraps).

Protocol

  • Fix a thin belt ε0.2 \varepsilon \le 0.2; choose a region with nearly constant curvature so ΦF|\Phi_F| is small and stable.

  • Sweep integer twist: Tw{2,1,0,+1,+2}\mathrm{Tw}\in\{-2,-1,0,+1,+2\} by applying controlled framing operations (or equivalent style actuators in software).

  • Measure Δϕ,ΦF,Tw,rFBHL\Delta\phi, \Phi_F, \mathrm{Tw}, r_{\text{FBHL}} at each setting.

Expected curve

  • Linearity: Δϕ(Tw)αTw+ΦF\Delta\phi(\mathrm{Tw}) \approx \alpha\,\mathrm{Tw} + \Phi_F.

  • Sawtooth wrapping: observed phase shows 2π2\pi wrap; the unwrapped line has slope α\alpha.

  • 4π check: changing Tw\mathrm{Tw} by +2+2 (two twist units) returns physical observables except for the trivial 2π2\pi phase wrap.

Tolerances (pass if all hold)

  • Slope fit: α^α/α2%|\hat{\alpha}-\alpha|/|\alpha| \le 2\% (after you calibrate α\alpha once).

  • Residual band: MAD(rFBHL)1\operatorname{MAD}(r_{\text{FBHL}}) \le 1^\circ.

  • Repeatability: same slope within 0.5%0.5\% under reparameterization and gauge re-initialization.

Failure diagnostics

  • Slope too small/large → framing actuator not pure; curvature leaking (raise resolution or switch region).

  • Residual large but slope OK → seam twist or unitarity drift (apply polar projection; check orientation).


26.3 Suite B — Width-scaling law

Goal. Verify the thin-belt prediction

Δϕ(w)  =  βw  +  αTw  +  O(w2)\Delta\phi(w) \;=\; \beta\, w \;+\;\alpha\,\mathrm{Tw} \;+\; O(w^2)

with fixed Tw\mathrm{Tw} and nearly fixed curvature texture.

Protocol

  • Construct belts with widths w{wmin,,wmax} w \in \{w_{\min},\ldots,w_{\max}\} (≥5 points), same centerline and framing.

  • Hold Tw\mathrm{Tw} constant (ideally zero).

  • For each ww: compute Δϕ, ΦF, rFBHL, ε\Delta\phi,\ \Phi_F,\ r_{\text{FBHL}},\ \varepsilon.

Expected curve

  • Linearity: Δϕ(w)\Delta\phi(w) is linear with slope βn ⁣ ⁣F ⁣ ⁣t\beta \approx \langle n\!\cdot\! F\!\cdot\! t \rangle.

  • Flux agreement: ΦF(w)\Phi_F(w) matches the linear term; residual stays small and does not grow with ww.

Tolerances

  • Linearity: R20.95R^2 \ge 0.95; relative curvature of fit (max second finite-difference / mean slope) 5%\le 5\%.

  • Residual band: maxwrFBHL(w)1.5\max_w |r_{\text{FBHL}}(w)| \le 1.5^\circ.

  • Thinness: ε(w)0.2\varepsilon(w)\le 0.2 across the sweep (otherwise promote to slab).

Failure diagnostics

  • Curvature in fit → non-Abelian commutators prominent (refine across-width mesh; align frames).

  • Residual grows with ww → geometry beyond thin regime (shorten ww or increase resolution).


26.4 Suite C — Belt–Faraday test (dynamics)

Goal. Validate the time-differential law:

Δ ⁣[ΔϕαTw]    ΔΦFddt(ΔϕαTw)BtF.\Delta\!\left[\Delta\phi - \alpha\,\mathrm{Tw}\right] \;\approx\; \Delta \Phi_F \quad\Longleftrightarrow\quad \frac{d}{dt}\big(\Delta\phi - \alpha\,\mathrm{Tw}\big) \approx \iint_{\mathcal{B}} \partial_t F .

Protocol

  • Create a fixed-geometry belt and modulate interior curvature by a known control (e.g., vary the across-width binding amplitude) with frequency ff and small amplitude AA.

  • Keep Tw\mathrm{Tw} constant (or separately log its small drift).

  • Sample per-step: Δϕt,ΦF,t,Twt \Delta\phi_t, \Phi_{F,t}, \mathrm{Tw}_t. Form
    Yt=ΔϕtαTwtY_t=\Delta\phi_t-\alpha\,\mathrm{Tw}_t, and differences ΔYt,ΔΦF,t\Delta Y_t, \Delta \Phi_{F,t}.

Expected curves

  • Tracking: ΔYt\Delta Y_t tracks ΔΦF,t\Delta \Phi_{F,t} with near-unit gain.

  • Frequency sweep: amplitude ratio ΔY/ΔΦF1|\Delta Y|/|\Delta \Phi_F| \approx 1 until numerical bandwidth; phase lag \le one step.

Tolerances

  • Correlation: corr(ΔY,ΔΦF)0.95\operatorname{corr}(\Delta Y, \Delta \Phi_F) \ge 0.95.

  • Gain: median ΔY/ΔΦF[0.95,1.05] |\Delta Y|/|\Delta \Phi_F| \in [0.95,1.05].

  • Lag: cross-correlation peak at lag 1|\ell|\le 1 step (or phase error 10\le 10^\circ).

  • Spike response: safety gate (Ch. 17) triggers on injected flux spikes ≥ 4σ4\sigma within K=3K=3 steps.

Failure diagnostics

  • Gain < 0.95 → under-resolved interior; increase mesh or estimator SNR.

  • Large lag → readouts buffered/asynchronous; move metrics to the same clock or add alignment.


26.5 Reproducibility checklist (must report)

Environment & code

  • Commit hash; library versions; BLAS/GPU; precision (FP16/32/64); expm/logm implementation.

  • RNG seeds for model & benchmark harness; determinism flags (e.g., cuDNN).

Geometry & estimators

  • Belt construction (centerline, width schedule ww, framing ops); mesh sizes (Ns,Nn)(N_s,N_n); ordering (snake); thinness ε\varepsilon.

  • Estimator family: U(1)/U(k)/Uhlmann; subspace dimension KK; window size; polar/Procrustes choices; unitary projection cadence.

  • Calibrated α\alpha and method (Suite A).

Acceptance bands

  • Exact thresholds used (may tighten but not loosen defaults).

  • Number of repeats and averaging method (mean/MAD).

Artifacts

  • Plots: Suite A (Δϕ\Delta\phi vs Tw\mathrm{Tw} unwrapped), Suite B (Δϕ\Delta\phi vs ww), Suite C (Bode-style gain/phase vs ff).

  • Raw logs (schema below) as JSONL; plus a short “run manifest”.


26.6 Log schema (JSONL)

Run manifest (one JSON):

{
  "run_id": "uuid",
  "suite": "A|B|C",
  "commit": "abc123",
  "precision": "fp32",
  "alpha": 1.000,
  "geom": {"Ns":128,"Nn":8,"ordering":"snake","thinness_max":0.18},
  "estimators": {"family":"Uk","K":8,"window":16,"polar_every":8},
  "thresholds": {"residual_deg":1.0,"R2":0.95,"gain_band":[0.95,1.05]},
  "seeds": {"model":1337,"bench":4242}
}

Per-step record (one line per measurement):

{
  "run_id":"uuid",
  "step": 57,
  "w": 0.075,
  "Tw": 1.0,
  "DeltaPhi": 0.5236,
  "PhiF": 0.5061,
  "r_FBHL": 0.0175,
  "thinness": 0.12,
  "unitarity_norm": 0.003,
  "commutator_proxy": 0.021,
  "wrap_index": 2,
  "mode": "normal|caution|abort",
  "timestamp": "2025-09-19T20:41:12Z"
}

Per-run summary (append at end):

{
  "run_id":"uuid",
  "suite":"B",
  "fit": {"slope_beta":6.24, "intercept":0.00, "R2":0.972, "curvature_pct":0.034},
  "bands": {"residual_MAD_deg":0.6, "max_residual_deg":1.2},
  "pass": true
}

26.7 Expected plots & target shapes

  • Suite A: Unwrapped Δϕ\Delta\phi vs Tw\mathrm{Tw} → straight line (slope α\alpha); wrapped plot shows neat sawtooth.

  • Suite B: Δϕ\Delta\phi vs ww → straight line; overlay ΦF(w)\Phi_F(w) with same slope; residual flat near zero.

  • Suite C: Gain ~1 flat up to a corner frequency (mesh/estimator bandwidth); phase near 0°, drifting toward delay at high ff.


26.8 Leaderboard metrics (report these)

  • A. Framing: slope error α^α/α|\hat{\alpha}-\alpha|/\alpha; residual MAD (deg); repeatability CV (%).

  • B. Width law: R2R^2; curvature of fit (%); max residual (deg).

  • C. Faraday: correlation; gain band hit-rate; max lag (steps); spike detection TPR/FPR.

Provide all as mean ± MAD over ≥3 independent runs.


26.9 Common pitfalls (and fixes)

  • Orientation mistakes: verify “upper minus lower” everywhere; add a unit test that flips an edge and expects failure.

  • Unitary drift: increase polar projection cadence; log determinant modulus.

  • Non-Abelian seams: align frames or refine across-width near seams; otherwise expect width-law curvature.

  • Thinness breaches: promote to slab locally; do not “pass” Suite B by narrowing ww after the fact—declare geometry change.


Outcome. With these three suites, tight tolerances, and a strict logging schema, you can prove your belt implementation is physically faithful (Suite A), geometrically calibrated (Suite B), and dynamically correct (Suite C)—and others can reproduce it byte-for-byte.

 

Ch. 27 — Reference Implementation

Below is a minimal, self-contained API you can drop into a Python/JAX/PyTorch project. It defines metrics, losses, and controllers with a strict audit logging format that matches Chapter 26. The code is framework-agnostic pseudocode with concrete function names, signatures, shapes, and return types so you can port it verbatim.


27.1 Packages and core types

# -------------------------
# belt.types
# -------------------------
from dataclasses import dataclass
from typing import Literal, Dict, List, Tuple, Optional

Family = Literal["U1","Uk","Uhlmann"]
Ordering = Literal["snake"]  # (use 'snake' as in Ch.24)

@dataclass
class MeshConfig:
    Ns: int                      # cells along s
    Nn: int                      # rungs across n
    ordering: Ordering = "snake"
    delta_max: float = 0.3       # clamp on ||log H_cell||
    polar_every: int = 8         # project-to-unitary cadence

@dataclass
class EstimatorConfig:
    family: Family               # U1 / Uk / Uhlmann
    K: int = 8                   # subspace dim for Uk/Uhlmann
    window: int = 16             # PCA/CCA window (Ch.25)
    mixed_precision: bool = True

@dataclass
class Thresholds:
    alpha: float                 # framing coefficient
    residual_deg: float = 1.0
    thinness_max: float = 0.2
    width_R2_min: float = 0.95
    gain_band: Tuple[float,float] = (0.95,1.05)
    spike_z1: float = 2.5
    spike_z2: float = 4.0
    spike_K: int = 3
    seam_twist_max: float = 0.5  # twist units

@dataclass
class BeltConfig:
    mesh: MeshConfig
    est: EstimatorConfig
    thr: Thresholds

@dataclass
class Metrics:  # single step
    DeltaPhi: float              # edge gap (class function)
    PhiF: float                  # interior flux
    Tw: float                    # twist (units)
    r_FBHL: float                # residual = Δφ - (ΦF + α·Tw)
    thinness: float              # ε = max κ·w
    unitarity_norm: float        # ||U†U - I||_F (max over factors)
    commutator_proxy: float      # seam BCH proxy
    wrap_index: int              # phase unwrap counter

@dataclass
class Losses:
    L_tbl_cons: float
    L_tbl_goal: float
    L_fr: float
    L_ts: float
    L_total: float

27.2 Minimal metrics API

# -------------------------
# belt.metrics
# -------------------------
class BeltMetrics:
    def __init__(self, cfg: BeltConfig):
        self.cfg = cfg

    # --- transports are your inputs (from Ch.24/25 estimators) ---
    # Uk: Usp, Usm, Hcells are lists of KxK complex unitaries
    # U1: they are float angles; Uhlmann: unitaries from polar
    def edge_gap(self, Usp: List, Usm: List) -> Tuple[float,int]:
        """
        Returns (DeltaPhi, wrap_index). Uses class function:
        - Uk/Uhlmann: argdet(Π Usp · (Π Usm)^-1)
        - U1: sum(a_plus - a_minus)
        """
        ...

    def flux(self, Hcells: List) -> float:
        """
        Sum of per-cell class phases:
        - Uk/Uhlmann: sum argdet(H_cell)
        - U1: sum cell angles
        """
        ...

    def twist(self, phi_angles: List[float]) -> Tuple[float,int]:
        """
        Twist = (1/2π) * unwrap(sum Δphi_frame).
        Returns (Tw, wrap_index_for_style_frame)
        """
        ...

    def residual(self, DeltaPhi: float, PhiF: float, Tw: float) -> float:
        return DeltaPhi - (PhiF + self.cfg.thr.alpha * Tw)

    def thinness(self, kappa_max: float, width: float) -> float:
        return kappa_max * width

    def commutator_proxy(self, Hcells_row: List, Hcells_next: List) -> float:
        """
        Approximates ∑||[log H_i, log H'_j]|| across the seam for diagnostics.
        """
        ...

    def unitarity_norm(self, factors: List) -> float:
        """ Max ||U†U - I||_F over provided transports. """
        ...

    def compute(self, transports: Dict) -> Metrics:
        """
        transports:
          - "Usp", "Usm": edge factors (lists)
          - "Hcells": cell factors (list of lists or flat)
          - "phi_frame": framing angles along edge (list of floats)
          - "kappa_max", "width": geometry stats
          - "factors_all": all matrices to audit unitarity
        """
        Δφ, w1 = self.edge_gap(transports["Usp"], transports["Usm"])
        ΦF = self.flux(transports["Hcells"])
        Tw, w2 = self.twist(transports["phi_frame"])
        r = self.residual(Δφ, ΦF, Tw)
        eps = self.thinness(transports["kappa_max"], transports["width"])
        un = self.unitarity_norm(transports["factors_all"])
        bch = self.commutator_proxy(transports["Hcells_row0"], transports["Hcells_row1"])
        return Metrics(Δφ, ΦF, Tw, r, eps, un, bch, wrap_index=w1)

Implementation notes:

  • Class functions must be used (e.g., arg_det(U) = imag(trace(log(U)))) to maintain gauge invariance.

  • Apply polar projection to transports every cfg.mesh.polar_every factors.


27.3 Minimal losses API (Ch. 16)

# -------------------------
# belt.losses
# -------------------------
def two_boundary_loss_cons(metrics: Metrics, delta: float) -> float:
    """Huber(Δφ - ΦF - α·Tw) with threshold delta (radians)."""
    ε = metrics.DeltaPhi - metrics.PhiF - metrics.r_FBHL + 0.0  # r_FBHL already includes α·Tw
    # Recompute explicitly to avoid dependency on r_FBHL if preferred:
    # ε = metrics.DeltaPhi - (metrics.PhiF + alpha*metrics.Tw)
    return huber(ε, delta)

def two_boundary_loss_goal(metrics: Metrics, DeltaPhi_star: float, delta: float) -> float:
    return huber(metrics.DeltaPhi - DeltaPhi_star, delta)

def flux_regularization(Hcells: List, lamF: float, lamGrad: float, lamUnit: float, factors: List) -> float:
    """
    lamF * Σ ||log H||_F^2 + lamGrad * Σ||log Hi - log Hj||_F^2 + lamUnit * Σ ||U†U - I||_F^2
    """
    ...

def twist_steering(Tw: float, Tw_star: Optional[float], mu1: float, mu2: float, muq: float, phi_angles: List[float]) -> float:
    """
    mu1 * Huber(Tw - Tw*) + mu2 * smoothness(phi_angles) + muq * quantize(Tw to Z or Z/2)
    """
    ...

def total_loss(m: Metrics, pieces: Dict) -> Losses:
    L_tbl_c = two_boundary_loss_cons(m, delta=pieces["delta_tbl"])
    L_tbl_g = 0.0 if pieces.get("DeltaPhi_star") is None else two_boundary_loss_goal(m, pieces["DeltaPhi_star"], pieces["delta_tbl"])
    L_fr    = flux_regularization(pieces["Hcells"], pieces["lamF"], pieces["lamGrad"], pieces["lamUnit"], pieces["factors_all"])
    L_ts    = twist_steering(m.Tw, pieces.get("Tw_star"), pieces["mu1"], pieces["mu2"], pieces["muq"], pieces["phi_frame"])
    L_tot   = pieces["w_tbl"]*(L_tbl_c + pieces["w_goal"]*L_tbl_g) + pieces["w_fr"]*L_fr + pieces["w_ts"]*L_ts
    return Losses(L_tbl_c, L_tbl_g, L_fr, L_ts, L_tot)

Gradients. In autograd frameworks, implement logm, expm, polar, and arg_det with differentiable kernels; for unwrap, stop-grad the integer wrap counter (Ch. 16).


27.4 Minimal controllers API (Ch. 17)

# -------------------------
# belt.controllers
# -------------------------
@dataclass
class EWMAState:
    PhiF_ewma: float = 0.0
    PhiF_mad: float = 1e-6
    r_mad: float = 1e-6
    spike_count: int = 0

@dataclass
class GateDecision:
    mode: Literal["normal","caution","abort"]
    reason: Optional[str] = None

def safety_gate(m: Metrics, ew: EWMAState, thr: Thresholds) -> GateDecision:
    # z-score slope proxy: here use simple diff; in production keep a small buffer/window
    S = (m.PhiF - ew.PhiF_ewma) / (ew.PhiF_mad + 1e-6)
    Q = abs(m.r_FBHL) / (ew.r_mad + 1e-6)
    breach = (m.thinness > thr.thinness_max)
    caution = (abs(S) >= thr.spike_z1) or (Q >= thr.residual_deg)
    abort = breach or (abs(S) >= thr.spike_z2 and ew.spike_count+1 >= thr.spike_K)
    return GateDecision("abort","thinness" if breach else "spike") if abort else \
           GateDecision("caution","flux/residual") if caution else \
           GateDecision("normal")

@dataclass
class TwistDialGains:
    kp: float = 0.5
    kd: float = 0.1
    cap: float = 0.5
    residual_band_deg: float = 2.0

def twist_dial(m: Metrics, Tw_star: float, prev_e: float, gains: TwistDialGains) -> float:
    e = Tw_star - m.Tw
    u = gains.kp * clip(e, -gains.cap, gains.cap) + gains.kd * (e - prev_e)
    if abs(m.r_FBHL) > gains.residual_band_deg * (3.14159/180):
        u *= 0.5  # de-rate near residual bound
    return u  # map to your style actuators

Plan repair via tiling is a higher-level routine (Ch. 19); expose it as plan_repair(tiles, budgets) -> path.


27.5 Transport & estimator shims (Ch. 24–25)

Provide thin wrappers so users can plug in their own model signals:

# -------------------------
# belt.estimators
# -------------------------
def procrustes_edge(Hk, Hk1) -> "Uk_step":
    """Orthogonal Procrustes U_s[k] = U V^T from SVD(Hk^T Hk1)."""
    ...

def polar_rung(E_t, G_t) -> "Uk_step":
    """Across-width unitary R from polar(E^T G)."""
    ...

def uhlmann_step(rho_k, rho_k1) -> "Uk_step":
    """Uhlmann parallel transport via polar(rho_k^(1/2) rho_k1^(1/2))."""
    ...

def u1_edge(a_plus: List[float], a_minus: List[float]) -> float:
    """U(1) edge gap: sum(a_plus - a_minus)."""
    ...

def class_phase(U) -> float:
    """arg_det(U) or principal eigenphase."""
    ...

27.6 Audit logging (JSONL) — exact schema

Conform exactly to Chapter 26. Provide a tiny writer with manifest, step, and summary records.

# -------------------------
# belt.logging
# -------------------------
import json, uuid, time
from pathlib import Path

class LogWriter:
    def __init__(self, out_dir: str, suite: Literal["A","B","C"], cfg: BeltConfig, commit: str, precision: str, seeds: Dict):
        self.run_id = str(uuid.uuid4())
        self.path = Path(out_dir) / f"{self.run_id}.jsonl"
        self.path.parent.mkdir(parents=True, exist_ok=True)
        manifest = {
            "run_id": self.run_id,
            "suite": suite,
            "commit": commit,
            "precision": precision,
            "alpha": cfg.thr.alpha,
            "geom": {"Ns": cfg.mesh.Ns, "Nn": cfg.mesh.Nn, "ordering": cfg.mesh.ordering, "thinness_max": cfg.thr.thinness_max},
            "estimators": {"family": cfg.est.family, "K": cfg.est.K, "window": cfg.est.window, "polar_every": cfg.mesh.polar_every},
            "thresholds": {"residual_deg": cfg.thr.residual_deg, "R2": cfg.thr.width_R2_min, "gain_band": list(cfg.thr.gain_band)},
            "seeds": seeds
        }
        self._write(manifest)

    def _write(self, obj: Dict): 
        with self.path.open("a") as f: f.write(json.dumps(obj)+"\n")

    def log_step(self, step: int, m: Metrics, mode: str):
        self._write({
            "run_id": self.run_id,
            "step": step,
            "Tw": m.Tw, "DeltaPhi": m.DeltaPhi, "PhiF": m.PhiF, "r_FBHL": m.r_FBHL,
            "thinness": m.thinness, "unitarity_norm": m.unitarity_norm,
            "commutator_proxy": m.commutator_proxy, "wrap_index": m.wrap_index,
            "mode": mode, "timestamp": time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime())
        })

    def log_summary(self, suite: str, fit: Dict, bands: Dict, passed: bool):
        self._write({
            "run_id": self.run_id,
            "suite": suite,
            "fit": fit,
            "bands": bands,
            "pass": passed
        })

27.7 End-to-end “hello belt” (10 lines)

cfg = BeltConfig(
    mesh=MeshConfig(Ns=128, Nn=8),
    est=EstimatorConfig(family="Uk", K=8, window=16),
    thr=Thresholds(alpha=1.0)
)
metr = BeltMetrics(cfg); logs = LogWriter("./logs","B",cfg,commit="abc123",precision="fp32",seeds={"model":1337,"bench":4242})

for step, transports in enumerate(stream_transports()):
    m = metr.compute(transports)
    gate = safety_gate(m, ew=EWMAState(), thr=cfg.thr)
    logs.log_step(step, m, gate.mode)
# After sweep, compute fit stats for Suite B and write:
logs.log_summary("B", fit={"slope_beta":6.24,"intercept":0.0,"R2":0.972,"curvature_pct":0.034},
                    bands={"residual_MAD_deg":0.6,"max_residual_deg":1.2}, passed=True)

27.8 Acceptance tests (unit-level)

Provide three unit tests that mirror Ch. 26:

  1. Framing: apply ±1 twist units; check slope α\alpha within 2%, residual MAD ≤ 1°.

  2. Width scaling: 5 widths; linear R20.95R^2 \ge 0.95, curvature ≤ 5%.

  3. Faraday: modulate interior; correlation ≥ 0.95, gain in [0.95,1.05].

Implement these as pytest tests that read the JSONL and assert on summary fields.


27.9 Implementation checklist

  • Use class functions everywhere; never compare raw matrices.

  • Enforce polar projection regularly to keep unitarity.

  • Keep the ordering discipline (lower→upper; snake in s).

  • Clamp local ||log H_cell|| ≤ delta_max and refine the mesh if exceeded.

  • Always emit manifest → steps → summary; never skip fields.


Outcome. This reference API gives you the smallest viable surface for computing belt metrics, training with belt losses, steering with controllers, and auditing with reproducible logs. Plug in your model-specific estimators (Ch. 25) and mesh/ordering (Ch. 24), and you’ll match the benchmarks and invariance properties specified in Chapters 15–26.

 

Ch. 28 — Physics Mini-Cases

Dirac belt trick; framed Wilsons; Uhlmann/Berry geometric force as holonomy variation (worked)

These three worked mini-cases pin the abstract belt calculus to familiar physics. Each example is self-contained, stated in standard gauge/adiabatic language, and instrumented with the belt readouts from Ch. 15 (edge gap Δϕ\Delta\phi, flux ΦF\Phi_F, twist Tw\mathrm{Tw}, residual rFBHLr_{\mathrm{FBHL}}).


28.1 Dirac belt trick (the 4π4\pi phenomenon)

Set-up (what the belt measures)

  • Consider a rigid “puck” carrying a spin-ss representation. Rotate the puck about a fixed axis by angle θ\theta, keeping the two belt edges attached to the room (lower edge) and the puck (upper edge).

  • Choose a U(1) readout for the edge holonomy: for a fixed reference spinor ψ|\psi\rangle, define

    Δϕ(θ):=argψU(θ)ψ,\Delta\phi(\theta) := \arg \langle \psi | U(\theta) |\psi\rangle ,

    where U(θ)U(\theta) is the rotation operator in the ss-representation. (Any class-function scalar works; this U(1) overlap makes the sign flip visible for s=12s{=}\tfrac{1}{2}.)

  • Twist Tw\mathrm{Tw} counts how many full turns the belt’s framing accumulates (integer units). Here Tw=θ/2π\mathrm{Tw}=\theta/2\pi.

Prediction (FBHL specialization)

In the thin-belt regime with negligible interior curvature (pure rigid rotation), FBHL reduces to

Δϕ(θ)  =  αTw  =  αθ2π,α=2πs.\Delta\phi(\theta) \;=\; \alpha\,\mathrm{Tw} \;=\; \alpha\,\frac{\theta}{2\pi}, \qquad \alpha = 2\pi s .

Hence for spin-12\tfrac{1}{2}: Δϕ(θ)=θ2\Delta\phi(\theta)=\tfrac{\theta}{2} (mod 2π2\pi). A 2π2\pi turn gives a phase shift of π\pi (sign flip); a 4π4\pi turn returns to the initial state.

Worked check (discrete)

  • Sample θ{0,π,2π,3π,4π}\theta\in\{0,\pi,2\pi,3\pi,4\pi\}.

  • Measure Δϕ\Delta\phi via the overlap estimator above; measure Tw=θ/2π\mathrm{Tw}=\theta/2\pi; ΦF0\Phi_F\simeq 0 (no interior deformation).

  • Fit Δϕ\Delta\phi vs. Tw\mathrm{Tw}. Slope should be α=2πs\alpha=2\pi s within 2% (Suite A). Residual rFBHL0r_{\mathrm{FBHL}}\approx 0.

Takeaway

The belt trick is literally the framing term of FBHL. The double-cover (4π4\pi) periodicity is the statement that two twist units restore all observables, while a single unit produces a physical phase when ss is half-integer.


28.2 Framed Wilsons (Abelian and gently non-Abelian)

We make Wilson-type holonomies on belts rather than single loops, so the upper–minus–lower edge gap equals interior flux plus framing—exactly the quantity you can compute and test.

28.2.1 Abelian case (uniform field / Aharonov–Bohm patch)

Geometry. A rectangular belt of length LL and width ww, spanning a region with uniform magnetic field BB normal to the surface. Charge qq. Choose constant framing so Tw=0\mathrm{Tw}=0.

Holonomy & belt readouts.

  • Edge gap (U(1)): Δϕ=qΓ+ ⁣AqΓ ⁣A\Delta\phi = q \oint_{\Gamma_+} \!A - q\oint_{\Gamma_-}\!A.

  • Flux: ΦF=qBF=qBLw\Phi_F = q \iint_{\mathcal{B}} F = q B L w.

  • FBHL: Δϕ=ΦF+αTw=qBLw\Delta\phi = \Phi_F + \alpha \mathrm{Tw} = qBLw.

Width law (worked). Sweep ww at fixed B,LB,L. Expect

Δϕ(w)=qBL  w,R20.95,  rFBHL0\Delta\phi(w) = q B L\; w, \qquad R^2 \ge 0.95,\ \ r_{\mathrm{FBHL}}\approx 0

(Suite B). This is the belt version of Stokes (upper–minus–lower circulation equals interior flux).

Solenoid (AB limit). If B=0B{=}0 on the belt but the vector potential has non-trivial circulation from a distant solenoid, the same belt measurement picks up ΦF=qΦAB\Phi_F=q\Phi_{\mathrm{AB}} through the enclosed area. With Tw0\mathrm{Tw}{\neq}0 you’ll see Δϕ=ΦF+αTw\Delta\phi=\Phi_F+\alpha\,\mathrm{Tw}.


28.2.2 Gently non-Abelian (commuting patch)

Choose a background SU(2) gauge potential with curvature along a fixed generator, e.g.

As=B2σzn,An=0F=Bσzdsdn.A_s = \tfrac{B}{2}\sigma_z\, n,\qquad A_n = 0 \quad\Rightarrow\quad F = B\,\sigma_z\, ds\wedge dn .

All plaquettes HijH_{ij} then commute. Pick a U(1) class function by projecting to an eigenstate of σz\sigma_z (or take principal eigenphase). The same belt law holds:

Δϕ= ⁣ ⁣Tr(ρF)ΦF  +  αTw,\Delta\phi = \underbrace{\iint \!\! \mathrm{Tr}(\rho\,F)}_{\Phi_F}\;+\;\alpha\,\mathrm{Tw},

with ρ\rho the rank-1 projector onto the chosen eigenstate. In practice this is identical to the Abelian test but computed from matrix transports (Ch. 24).

Non-commuting seams. If you tilt the field so different plaquettes point along different Pauli axes, BCH errors appear. In belt diagnostics you’ll see:

  • linearity in ww degrade (curvature in fit),

  • a non-zero commutator proxy,

  • small but systematic rFBHLr_{\mathrm{FBHL}} unless you refine or align frames.
    That is the textbook signature of non-Abelian surface ordering.


28.3 Uhlmann/Berry geometric force as holonomy variation (worked)

The principle (Ch. 9): adiabatic/geometric forces are variational responses of belt holonomy. Here we work two cases—pure Berry (zero temperature) and Uhlmann (finite-temperature/mixed states).

28.3.1 Two-level system (Berry)

Hamiltonian. H(R)=12RσH(\boldsymbol{R}) = -\tfrac{1}{2}\,\boldsymbol{R}\cdot\boldsymbol{\sigma} with control R=(Rx,Ry,Rz)\boldsymbol{R}=(R_x,R_y,R_z). The ground state defines a Berry connection A(R)\mathcal{A}(\boldsymbol{R}) with curvature

Fab(R)=12ϵabcRcR3,a,b,c{x,y,z}.\mathcal{F}_{ab}(\boldsymbol{R}) = \frac{1}{2}\,\epsilon_{abc}\,\frac{R_c}{\|\boldsymbol{R}\|^3}, \qquad a,b,c\in\{x,y,z\}.

Belt. Let the two edges be nearby control paths R±(t)=R(t)±δ2n^\boldsymbol{R}_\pm(t)=\boldsymbol{R}(t)\pm \tfrac{\delta}{2}\hat{\boldsymbol{n}} over t[0,T]t\in[0,T]. The belt spans a narrow ribbon in parameter–time space (t,λ)(t,\lambda) with across-width coordinate λ[δ2,+δ2]\lambda\in[-\tfrac{\delta}{2},+\tfrac{\delta}{2}].

Prediction.

Δϕ  =  B ⁣Ftλ  +  αTw    δ0Tn^ ⁣ ⁣(F(R)R˙)dt  +  αTw.\Delta\phi \;=\; \iint_{\mathcal{B}}\!\mathcal{F}_{t\lambda}\;+\;\alpha\,\mathrm{Tw} \;\approx\; \delta \int_0^T \hat{\boldsymbol{n}}\!\cdot\!\big(\mathcal{F}(\boldsymbol{R})\,\dot{\boldsymbol{R}}\big)\,dt \;+\; \alpha\,\mathrm{Tw}.

If you hold framing fixed (Tw=0\mathrm{Tw}{=}0), the instantaneous belt slope per width is

1δddtΔϕ  =  n^ ⁣ ⁣(FR˙),\frac{1}{\delta}\frac{d}{dt}\Delta\phi \;=\; \hat{\boldsymbol{n}}\!\cdot\!\big(\mathcal{F}\,\dot{\boldsymbol{R}}\big),

i.e. the Berry “magnetic field” contracted with the velocity—this is the geometric EMF.

Geometric force (work). If a generalized coordinate qq couples to R\boldsymbol{R} and you read work from the phase rate, the force contribution

Fgeom(q)    qΔϕ    BqFF_{\mathrm{geom}}(q) \;\propto\; \partial_q \Delta\phi \;\approx\; \iint_{\mathcal{B}} \partial_q \mathcal{F}

is the variational response of belt holonomy; in the two-level model it reduces to the solid-angle rate on the Bloch sphere.

Worked trace. Drive R\boldsymbol{R} on a latitude circle while separating edges radially. Measured Δϕ\Delta\phi grows linearly in the enclosed solid-angle rate; switching direction flips its sign. Suite C (Faraday) will show gain 1\approx 1 between Δ(Δϕ)\Delta(\Delta\phi) and ΔΦF\Delta\Phi_F.


28.3.2 Finite temperature / ensembles (Uhlmann)

Mixed state. Let ρ(R)=eβH(R)/Z\rho(\boldsymbol{R}) = e^{-\beta H(\boldsymbol{R})}/Z. Use the Uhlmann connection (Ch. 25): the discrete step between ρ(t)\rho(t) and ρ(t+Δt)\rho(t+\Delta t) is the unitary part RR of the polar decomposition of ρ(t)1/2ρ(t+Δt)1/2 \rho(t)^{1/2}\rho(t+\Delta t)^{1/2}.

Belt identity (mixed). With the same ribbon construction in (t,λ)(t,\lambda),

ΔϕUhl  =  B ⁣FUhl  +  αTw.\Delta\phi_{\mathrm{Uhl}} \;=\; \iint_{\mathcal{B}}\!\mathcal{F}_{\mathrm{Uhl}}\;+\;\alpha\,\mathrm{Tw}.

As T ⁣ ⁣0T\!\to\!0, FUhlFBerry\mathcal{F}_{\mathrm{Uhl}}\to\mathcal{F}_{\mathrm{Berry}}. As T ⁣ ⁣T\!\to\!\infty, the state approaches maximally mixed and FUhl0\mathcal{F}_{\mathrm{Uhl}}\to 0.

Worked curve (temperature sweep). Fix the control ribbon and vary β\beta. Measure ΔϕUhl(β)\Delta\phi_{\mathrm{Uhl}}(\beta) with Tw=0\mathrm{Tw}{=}0.

  • Expected: a monotone drop from the Berry value at low TT toward 0 at high TT.

  • Acceptance: the ratio ΔϕUhl(β)/ΔϕBerry\Delta\phi_{\mathrm{Uhl}}(\beta)/\Delta\phi_{\mathrm{Berry}} follows the thermal polarization tanh(βR/2)\tanh(\beta \|\boldsymbol{R}\|/2) within tolerance for narrow belts (this is the standard two-level thermal weight).

Geometric force (mixed). The time-differential belt law still holds:

Δ ⁣[ΔϕUhlαTw]    ΔΦF,Uhl,\Delta\!\left[\Delta\phi_{\mathrm{Uhl}} - \alpha\,\mathrm{Tw}\right] \;\approx\; \Delta \Phi_{F,\mathrm{Uhl}},

so Suite C’s gain/phase checks apply unchanged.


28.4 Minimal experiment cards (plug-and-play)

E1 — Dirac belt (spin-½).

  • Do: rotate by θ\theta while keeping curvature negligible; compute Δϕ\Delta\phi from an overlap; log Tw=θ/2π\mathrm{Tw}=\theta/2\pi.

  • Expect: slope α=π\alpha{=}\pi, residual <1<1^\circ, wrapped sawtooth; 4π\pi periodicity.

E2 — Abelian framed Wilson.

  • Do: rectangle L×wL{\times}w, uniform BB, Tw=0\mathrm{Tw}{=}0; sweep ww.

  • Expect: Δϕ(w)=qBLw\Delta\phi(w)=qBL\,w, R20.95R^2\ge 0.95, residual 0\approx 0.

E3 — Non-Abelian commuting patch.

  • Do: SU(2) field along one generator; project to an eigenstate; run E2.

  • Expect: identical linear law; commutator proxy near zero.

E4 — Non-Abelian seam.

  • Do: change generator across half the belt.

  • Expect: width-fit curvature >0>0, non-zero commutator proxy, small rFBHLr_{\mathrm{FBHL}} unless refined/aligned.

E5 — Berry EMF.

  • Do: two nearby control paths on a latitude; measure Δ(Δϕ)\Delta(\Delta\phi) vs. ΔΦF\Delta \Phi_F over time.

  • Expect: correlation 0.95\ge 0.95, gain in [0.95,1.05][0.95,1.05], phase lag \le 1 step.

E6 — Uhlmann temperature sweep.

  • Do: fix ribbon; vary β\beta; compute Uhlmann steps (polar between ρ1/2\rho^{1/2}s).

  • Expect: monotone drop toward 0 with the thermal polarization curve; Faraday gain 1\approx 1.


28.5 What to log (tie-back to Ch. 26)

Per run: the manifest; per step: Δϕ,ΦF,Tw,rFBHL,ε,\Delta\phi, \Phi_F, \mathrm{Tw}, r_{\mathrm{FBHL}}, \varepsilon, unitarity norm, commutator proxy, wrap index; per run summary: slope/fit for the width and twist sweeps, Faraday gain/phase, and pass/fail flags.


Bottom line

  • The Dirac belt trick is FBHL with ΦF0\Phi_F\simeq 0; it nails the framing coefficient α=2πs\alpha=2\pi s and the 4π4\pi periodicity.

  • Framed Wilsons on belts unify Stokes and framing in one measurement; Abelian physics falls out instantly, and non-Abelian seams appear exactly where BCH says they will.

  • Geometric forces (Berry/Uhlmann) are nothing but variations of belt holonomy in parameter–time space; the Faraday test is their operational fingerprint.

 

Ch. 29 — Soft-Matter & Robotics

DNA supercoiling; ribbon robots; EM “upper–minus–lower” sensing (sim plans)

We show how the belt calculus becomes an operational instrument in soft-matter and robotics. Each section gives (i) a clean belt model, (ii) what to measure (Δϕ,ΦF,Tw,rFBHL)(\Delta\phi,\Phi_F,\mathrm{Tw},r_{\mathrm{FBHL}}), and (iii) simulation/bench plans with expected curves and pass bands (compatible with Ch. 26–27 tooling).


29.1 DNA supercoiling as a belt experiment

29.1.1 Belt model

Treat a torsionally constrained DNA segment (length LL) as a ribbon with edges the helical backbones Γ±\Gamma_\pm. Framing tracks the local base-pair orientation; Twist is the integrated helical rotation, Writhe is the 3D centerline coiling. The classical relation

Lk  =  Tw+Wr\mathrm{Lk} \;=\; \mathrm{Tw} + \mathrm{Wr}

is read in belt form by taking the edge gap as a class-function phase proportional to linking:

Δϕ  =  αLk,andΦFαWr,Δϕ  =  ΦF+αTw.\Delta\phi \;=\; \alpha\,\mathrm{Lk},\qquad \text{and}\quad \Phi_F \approx \alpha\,\mathrm{Wr},\quad \Rightarrow\quad \Delta\phi \;=\; \Phi_F + \alpha\,\mathrm{Tw}.

Here α\alpha is fixed by one calibration (e.g., one full helical turn).

29.1.2 What to measure

  • Tw (helical twist): unwrap base-pair frame angle along the molecule.

  • Flux ΦF\Phi_F (writhe proxy): tiled plaquettes from across-width transports that reflect out-of-plane bending/looping; numerically equals a discretized writhe contribution.

  • Residual rFBHLr_{\mathrm{FBHL}}: detects defects (nicks, kinks) or large non-commuting curvature patches.

29.1.3 Bench plan (magnetic-tweezer analogue)

  1. Clamp ends; set tensions T{0.15}T \in \{0.1…5\} pN.

  2. Sweep added turns n[6,+6]n \in [-6, +6] (linking changes).

  3. For each (T,n)(T,n): reconstruct centerline (from simulation or reconstruction stack), compute Tw,ΦF\mathrm{Tw},\Phi_F, and Δϕ\Delta\phi from edge holonomies.

  4. Expected curves:

    • Linear regime: Δϕαn\Delta\phi \approx \alpha\,n, ΦF ⁣ ⁣0\Phi_F\!\approx\!0 (pre-plectoneme).

    • Buckling: ΦF\Phi_F rises as writhe takes the load; slope of Δϕ(n)\Delta\phi(n) weakens (part of linking shunted to ΦF\Phi_F).

    • Hysteresis under load ramps (optional).

Pass bands. Pre-buckling: rFBHL1|r_{\mathrm{FBHL}}|\le 1^\circ, linear fit R2 ⁣0.97R^2\!\ge 0.97. At onset: flux step detected with z ⁣ ⁣4z\!\ge\!4 in the Faraday test (Ch. 26C).

29.1.4 Diagnostics

  • Kink or nick: sharp residual spikes localized in arc-length; fix mesh or mark defect.

  • Over-thin mesh: width law curvature; refine across nn where writhe localizes.


29.2 Ribbon robots (continuum manipulators as belts)

29.2.1 Belt/control mapping

Model a planar (or spatial) ribbon robot as a belt along its centerline; actuators (tendons, pneumatic chambers) induce local curvature/torsion → interior curvature flux. The user intent or end-effector trace is the upper edge Γ+\Gamma_+; actuator trajectories are the lower edge Γ\Gamma_-.

  • Creativity/style vs. precision. Use twist Tw\mathrm{Tw} as an orientation/style dial (e.g., wrist roll, writing angle).

  • Effort and safety. Use flux density ΦF/length|\Phi_F|/{\rm length} as an internal-work proxy; gate spikes to avoid self-contact or tendon over-stress.

29.2.2 Controllers (drop-in from Ch. 17)

  • Safety gate: abort when St ⁣ ⁣4|S_t|\!\ge\!4 (flux spike) or thinness proxy exceeds band.

  • Twist dial: track Tw\mathrm{Tw}^\star for tasks like seam welding, painting, or suture placing.

  • Plan repair (tiling): segment the path into tiles (reach, orient, place); swap a tile if its belt cost grows.

29.2.3 Sim plan (drawing and threading tasks)

A) Precision drawing (letters/contours).

  • Build a 2-D ribbon arm model (Cosserat rod).

  • Target path p(s)p(s) (upper edge); actuators define lower edge.

  • Metrics per tile: keep rFBHL ⁣ ⁣1r_{\mathrm{FBHL}}\!\le\!1^\circ, flux density below band; twist follows lettering style.

B) Thread-through-loop task (3-D).

  • Add torsional actuation.

  • Expected flux burst at obstacle clearance; twist step to align thread orientation.

  • Pass: no aborts; maxrFBHL ⁣ ⁣2\max r_{\mathrm{FBHL}}\!\le\!2^\circ; seam twist at tile joints 0.5\le 0.5 units.

29.2.4 Learning policy with belt losses (Ch. 16)

Train a policy πθ\pi_\theta using:

L=wTBLρ ⁣(Δϕ ⁣ ⁣ΦF ⁣ ⁣αTw)+wFlogH2+wTρ(TwTw).\mathcal{L} = w_{\text{TBL}}\,\rho\!\big(\Delta\phi\!-\!\Phi_F\!-\!\alpha\mathrm{Tw}\big) + w_F \sum \|\log H_\square\|^2 + w_T\,\rho(\mathrm{Tw}-\mathrm{Tw}^\star).

Outcome: smoother actuation (FR term), consistent pose tracking (TBL), controllable roll (TS).


29.3 EM “upper–minus–lower” sensing (differential belts)

29.3.1 Belt sensor concept

Two closely spaced conductive loops/strips form a belt sensor. The upper–minus–lower edge gap measures the differential magnetic flux through the annulus:

Δϕ  =  q ⁣Γ+ ⁣Aq ⁣Γ ⁣A  =  q ⁣BF  =  ΦF.\Delta\phi \;=\; q\!\oint_{\Gamma_+}\!A - q\!\oint_{\Gamma_-}\!A \;=\; q \!\iint_{\mathcal{B}} F \;=\; \Phi_F .

(Here αTw=0\alpha\mathrm{Tw}=0 with fixed framing.) This configuration rejects common-mode fields and highlights gradients (nearby wires, small ferromagnetic parts, eddy currents).

29.3.2 Robotic use-cases

  • Cable finding / power-line avoidance: mount belt sensors on a UAV or ground robot; route away from flux spikes.

  • Metallic debris pick-up: gripper with belt sensors at fingertips; positive flux tiles signal the object’s presence and location.

  • In-hand pose updates: rotate the gripper; twist sweep separates field anisotropy from motion artifacts.

29.3.3 Sim plan (quasi-static EM)

Environment. A straight current II in a wire; optionally a small conductive plate (eddy currents).
Sensor. Two loops separated by ww, length LL.
Sweep. Move parallel at height hh; scan ww and hh.

Expected curves.

  • Differential signal ΦF(h)L[B(h+w)B(h)]\Phi_F(h) \propto L\,[B(h+w)-B(h)]finite-difference gradient; logarithmic roll-off with hh.

  • Width law: ΦFLwhB\Phi_F \approx L\,w\,\partial_h B for small ww (linear in ww).

  • Eddy plate: Faraday burst when entering/leaving → spike detected by the safety gate.

Pass bands. Width linearity R2 ⁣ ⁣0.95R^2\!\ge\!0.95; spike z-score 4\ge 4 on entry; residual near zero (no twist).

29.3.4 Robot integration (online controller)

  • Route by flux-threshold (Ch. 18): expand search near ΦF|\Phi_F| rises; contract otherwise.

  • Abort if consecutive spike flags; re-plan with belt tiling around forbidden zones.


29.4 Pseudocode stubs (shared harness)

# --- DNA writhe/twist sweep ---
for n in turns:                         # linking change
    geom = twist_end_constraints(geom0, n)
    transports = estimate_transports(geom, family="Uk")  # Ch.25
    m = metrics.compute(transports)                       # Ch.27
    logs.log_step(step++, m, mode="normal")

# --- Ribbon robot tile controller ---
for tile in plan:
    while not tile.done():
        transports = sense_or_simulate(tile)
        m = metrics.compute(transports)
        gate = safety_gate(m, ew, thr)
        if gate.mode == "abort": replan_tile()
        u = twist_dial(m, tile.Tw_star, prev_e, gains)
        apply_actuators(tile, u)

# --- EM belt sensor scan ---
for h in heights:
    ΦF = differential_flux(sensor, h, width=w)
    record(h, ΦF)
fit_linearity(ΦF_vs_w); check R2>=0.95

29.5 Acceptance checklist (per domain)

  • DNA: pre-buckling linear Δϕ(n)\Delta\phi(n) (slope α\alpha); buckling detected via ΦF\Phi_F rise; rFBHLr_{\mathrm{FBHL}} within band except at localized defects.

  • Ribbon robot: no safety aborts; target twist hit-rate ≥ 95%; flux density within limits; seam penalties low.

  • EM sensing: width linearity passes; Faraday spikes caught; low residual (fixed framing).


Bottom line

The belt formalism gives one set of invariantsΔϕ, ΦF, Tw, rFBHL\Delta\phi,\ \Phi_F,\ \mathrm{Tw},\ r_{\mathrm{FBHL}}—that port cleanly from biopolymers (twist↔writhe trade), to continuum robots (safe, stylized motion), to electromagnetic gradient sensing (robust differential readout). Each case admits concrete curves, tolerances, and a simulation harness you can run with the reference implementation.

 

Ch. 30 — AGI Systems in the Wild

Prompt-injection detection via flux spikes; controllable style dials via twist steps; planning/repair via tiling

This chapter shows how to ship belt mechanics into production agents. You’ll wire the metrics (Ch. 15), losses (Ch. 16), and controllers (Ch. 17–19) into three concrete, deployable behaviors:

  1. Prompt-injection defense via flux-spike detectors and safe fallbacks.

  2. Controllable style via quantized twist steps, with readability guarantees.

  3. Robust planning via belt tiling and on-line repair.

Everything here is model-agnostic and tool-agnostic.


30.1 Where the belt sits in a production stack

User I/O ─▶ Preprocess ─▶ Model Core ─▶ Postprocess
                  │             │
                  ├─ RAG         ├─ Tools
                  │             │
                  └─ Belt Probe (estimators: Δφ, ΦF, Tw, r_FBHL, commutators)
                                │
                                └─ Controllers (gate, dial, tiler) + Logger
  • Probe inputs: along-edge transports for retrieval & generation; across-width binding at each step (Ch. 25).

  • Online loop (per token/step): compute (Δϕt,ΦF,t,Twt,rt)(\Delta\phi_t,\Phi_{F,t},\mathrm{Tw}_t,r_t), emit gate/dial decisions, and tile repairs as needed.

  • Logs: JSONL schema from Ch. 26/27; keep all three suites runnable in staging.


30.2 Prompt-injection detection via flux spikes

Threat model

Indirect or direct prompts that try to redirect plans, hijack tools, or overwrite policy. Operationally they present as sudden interior work to reconcile inconsistent instructions → ΦF\Phi_F surges and FBHL residual misfit.

Detector

Maintain short-window robust stats:

St=ΦF,tΦ~F,t1MADw(ΦF)+ϵ,Qt=rtMADw(r)+ϵ.S_t=\frac{\Phi_{F,t}-\tilde{\Phi}_{F,t-1}}{\mathrm{MAD}_w(\Phi_F)+\epsilon},\quad Q_t=\frac{|r_t|}{\mathrm{MAD}_w(r)+\epsilon}.

Fire Caution if Stτ1|S_t|\ge \tau_1 or QtτrQ_t\ge \tau_r.
Fire Abort if Stτ2|S_t|\ge \tau_2 for KK consecutive steps or thinness breach (ε>εmax\varepsilon>\varepsilon_{\max}).
Defaults: τ1=2.5, τ2=4.0, K=3, τr=3.0, εmax=0.2\tau_1{=}2.5,\ \tau_2{=}4.0,\ K{=}3,\ \tau_r{=}3.0,\ \varepsilon_{\max}{=}0.2.

Mitigations (playbook)

  • Freeze tools & lower temperature; continue in read-only mode.

  • Quarantine tiles that caused the spike (Ch. 19/18); re-rank or drop offending retrieval chunks.

  • Ask for scope confirmation (only if policy allows) or restate constraints (bridge tile).

  • De-scope plan: fewer tools, stricter style, or require explicit user consent for external actions.

  • Audit trail: mark spike time, tiles, and positive-flux evidence that triggered the decision.

Worked scenario (web-augmented assistant)

  • User asks: “Summarize page X and pay this invoice.” The page contains hidden “ignore safety” instructions.

  • Binding that content to the generation path yields St ⁣|S_t|\!\uparrow, localized to the new chunk tile; gate enters Caution, tool calls frozen; tiler swaps to citation-only tile; residual returns to band.

  • Outcome: safe, cited summary; payment action refused without explicit user confirmation.


30.3 Controllable style via twist steps

Register anchors & dial

Pick anchors mZ/2m\in\mathbb{Z}/2 (e.g., 1-1 conversational, 00 neutral, +1+1 academic, +2+2 legal). Target per turn Tw{m,m±12} \mathrm{Tw}^\star\in\{m,m\pm\frac12\}.

Controller (per Ch. 17):

ut=kpclip(TwTwt,η,η)+kdΔet;halve ut if rt>ρ.u_t = k_p\,\mathrm{clip}(\mathrm{Tw}^\star-\mathrm{Tw}_t,{-}\eta,\eta) + k_d\,\Delta e_t;\quad \text{halve } u_t \text{ if } |r_t|>\rho.

Map utu_t to style actuators (token weights, guidance scale, stylistic rotations).
Hysteresis: retarget only after eh|e|\le h for MM steps.

Readability guarantees

Work inside the readability tube (Ch. 21):

TwTwΔT, ΦF/TΔF, rΔrR[Rˉ±(LTΔT+LFΔF+LrΔr)].|\mathrm{Tw}-\mathrm{Tw}^\star|\le\Delta_T,\ |\Phi_F|/T\le\Delta_F,\ |r|\le\Delta_r \Rightarrow R \in [\bar{R}\pm(L_T\Delta_T+L_F\Delta_F+L_r\Delta_r)].

Defaults: ΔT=0.5\Delta_T{=}0.5 units, ΔF\Delta_F tuned per model, Δr=2\Delta_r{=}2^\circ.

Two production patterns

  • Enterprise guardrails: clamp to m{0,+1,+2}m\in\{0,+1,+2\}; hard bridge when crossing seam >0.5>0.5 units; citations required if flux density rises.

  • Creative assistance: allow half-steps (±12)(\pm\frac12) with loose flux band; still rate-limit utu_t near residual bound.


30.4 Planning & self-repair via tiling

Long tasks form a tile graph (Ch. 19). Each tile jj has signature
σj=(Δϕj,ΦF,j,Twj,rj,costj,ϵj)\sigma_j=(\Delta\phi_j,\Phi_{F,j},\mathrm{Tw}_j,r_j,\text{cost}_j,\epsilon_j) and seam budgets.

Planner objective (recap):

minπ jπ(λFΦF,j+λrrj+λTTwjTwj+λccostj)+seamsλs(η+αδTw).\min_{\pi}\ \sum_{j\in\pi}\big(\lambda_F|\Phi_{F,j}|+\lambda_r|r_j|+\lambda_T|\mathrm{Tw}_j-\mathrm{Tw}_j^\star|+\lambda_c\text{cost}_j\big) +\sum_{\text{seams}}\lambda_s(\eta+\alpha|\delta\mathrm{Tw}|).

Online repair trigger

  • Local: Stτ1|S_t|\ge \tau_1 or rt>τr|r_t|>\tau_r on a tile → try an adjacent tile jj' with lower cost.

  • Global: plan-level residual budget trending up → re-run A*/beam with updated seam penalties; prefer fewer, cleaner tiles.

Examples

  • Code-assist fix loop: unit tests as edge checks (Ch. 20). On failing tile: swap logic or numeric repair tiles; stop when maxΦF ⁣< ⁣τflux\max|\Phi_F|\!<\!\tau_{\text{flux}}.

  • Form-fill agent: tool tiles (Search → Parse → Fill). If parsing spikes, insert a buffer tile (summarize/normalize) before Fill; refuse submission unless plan-level rr in band.


30.5 Telemetry & SRE

Dashboards (per service & per plan):

  • Live: Δϕ,ΦF,Tw,r,ε\Delta\phi,\Phi_F,\mathrm{Tw},r,\varepsilon time-series; z-scores St,QtS_t,Q_t; gate mode.

  • Tiles: top-kk flux contributors; seam penalties; abort causes.

  • Style: anchor hit-rate; seam twist violations; readability band coverage.

  • Incidents: spike TPR/FPR, mean time-to-repair (MTTR), abort rate, user confirmations.

Alerts (suggested):

  • ≥3 consecutive spikes (Abort).

  • Residual MAD above band for >N steps.

  • Style seam >0.5 units without bridge tile.


30.6 Acceptance tests “in the wild”

  • Injection defense: red-team suite with canned attacks; require spike TPR ≥ 0.9, FPR ≤ 0.05; no unsafe tool calls under Abort.

  • Style control: ≥95% turns within TwTw0.5|\mathrm{Tw}-\mathrm{Tw}^\star|\le 0.5; readability within target band ≥95% tokens.

  • Planning success: plan-level rtotρmax|r_{\text{tot}}|\le \rho_{\max}, task success ≥ benchmark baseline, repair MTTR below target.

All tests must log the Ch. 26 schema and pass the three physics suites (A,B,C) in staging.


30.7 Failure modes & fixes

  • Slow-roll attacks (no sharp spike): track cumulative flux drift and derivative of residual; add KL/content heuristics as a second sensor.

  • Benign novelty flagged: high FPR → widen ww and λ\lambda windows; require tile-localized agreement (two consecutive tiles) to fire Abort.

  • Style chatter: increase hysteresis h,Mh,M; cap kdk_d; insert bridge tiles.

  • Seam BCH blow-ups: align frames (style pre-agreement), refine across-width locally (slab).

  • Unitary drift → bogus phases: raise polar projection cadence; monitor detU|\det U|.


30.8 Glue code (production-ready skeleton)

state = init_state(cfg)               # metrics + controllers + logs
plan  = initial_tiles(user_goal)      # Ch. 19
for step in stream():
    transports = estimate_transports(model, ctx)       # Ch. 25
    m = metrics.compute(transports)                     # Ch. 27
    gate = safety_gate(m, state.ewma, cfg.thr)          # §30.2
    logs.log_step(step, m, gate.mode)
    if gate.mode == "abort":
        apply_safe_mode(); plan = repair_plan(plan); continue
    u = twist_dial(m, plan.current.Tw_star, state.prev_e, gains)  # §30.3
    apply_style_actuators(u)
    if tile_bad(m):                                      # spike/residual/commutator heuristics
        plan = local_swap(plan)                          # §30.4
    act = next_action(plan, gate)                        # tool use / decode
    ctx = execute(act)

30.9 What “good” looks like in production

  • Quiet belts: flux density flat except at legitimate transitions; residual within band; unitarity norms near 0.

  • Style on rails: twist anchors hit without chatter; bridges only on big register moves.

  • Plans that self-heal: when the world shifts (bad page, flaky tool), tiling swaps in a low-flux route automatically.

  • Auditable traces: for any output, you can show the tiles that contributed positive flux and the exact gate decisions.


Outcome. With flux-spike gates, quantized twist dials, and belt tiling, your agent behaves like a well-regulated physical system in the wild: it detects hostile inputs, steers style safely, and repairs plans on the fly—while emitting crisp telemetry that you can trust and audit.

 

Ch. 31 — Beyond Thin Belts

Large-width corrections; defects; stochastic belts; non-annular topologies

This chapter extends the belt calculus when the thin-belt assumptions of Chs. 15–26 break: wide belts, defects/punctures, noise, or exotic topology. We give upgrade paths (what to compute), correction terms (what changes), and acceptance tests so you know when to escalate geometry (to a slab, a membrane, or a double cover).


31.1 Large-width corrections (from belt to slab)

When thin fails. Recall thinness ε=maxsκ(s)w(s)\varepsilon=\max_s \kappa(s)\,w(s). The belt law

Δϕ    BF  +  αTw\Delta\phi \;\approx\; \iint_{\mathcal{B}} F \;+\;\alpha\,\mathrm{Tw}

assumes: (i) metric distortion across width is small, (ii) across-width transports almost commute, (iii) framing varies slowly. For ε0.2\varepsilon\gtrsim 0.2 or strong non-Abelian patches, promote to a slab: a belt with Nn ⁣ ⁣1N_n\!\gg\!1 rungs and explicit across-width ordering.

Geometry (Fermi frame). With centerline curvature κ(s)\kappa(s) and geodesic offset n[0,w]n\in[0,w],

g=diag((1κ(s)n)2,1),area element dA=(1κn)dsdn.g=\mathrm{diag}\big((1-\kappa(s)n)^2,\,1\big),\qquad \text{area element } dA=(1-\kappa n)\,ds\,dn .

Hence area and thus ΦF\Phi_F pick a factor (1κˉn)(1-\bar\kappa\, n) to first order; if you ignore it, you under/over-count flux.

Second-order expansion (sketch). Let h=max{Δs,Δn}h=\max\{\Delta s,\Delta n\}. With FsnF_{sn} the dominant curvature component and C=[As,An]C=[A_s,A_n] the non-Abelian commutator:

Δϕ=B ⁣ ⁣Fsn(1κn)dsdn  +  αTw  +  12 ⁣ ⁣ ⁣Tr(ρ[logHs,logHn])BCH seam term  +  O(h2,κ2w2).\Delta\phi = \iint_{\mathcal{B}}\!\!F_{sn}\,(1-\kappa n)\,ds\,dn \;+\;\alpha\,\mathrm{Tw} \;+\;\underbrace{\tfrac12\!\sum_{\square}\!\!\mathrm{Tr}\big(\rho\,[\log H_\square^s,\log H_\square^n]\big)}_{\text{BCH seam term}} \;+\;O(h^2,\kappa^2 w^2).

The BCH term is what the snake ordering in Ch. 24 tries to minimize; it scales with the product of across-width and along-edge increments.

Engineer rule-set.

  • Slab switch: if (a) width-law curvature >5%>5\%, (b) commutator proxy rises steadily, or (c) ε>0.2\varepsilon>0.2, increase NnN_n and use Q1/Q2 quadratures (Ch. 24) with metric factor (1κn)(1-\kappa n).

  • Jacobian fix: weight per-cell flux by (1κn)(1-\kappa n).

  • BCH budget: keep max[logHs,logHn]η\max\|\,[\log H^s,\log H^n]\,\|\le \eta (tune so plan-level residual stays within bands).

Acceptance tests (wide belts).

  1. Metric on/off: enabling (1κn)(1-\kappa n) should shift slopes by κˉw2\approx \bar\kappa\,\tfrac{w}{2} fraction; afterwards width-law re-linearizes (R² ≥ 0.95).

  2. BCH convergence: R² and residual improve monotonically as NnN_n doubles once; otherwise you’re under-resolved in ss as well.


31.2 Defects, punctures, and seams

A defect is a point/line you must exclude (e.g., a nick in DNA, an obstacle in a robot’s workspace, an AB-like flux tube). The belt becomes multiply connected.

Topology. Removing a disc DjD_j creates an extra boundary loop Dj\partial D_j. Stokes tells you:

Γ+ ⁣ ⁣A    Γ ⁣ ⁣A    jDj ⁣ ⁣A  =  BDj ⁣ ⁣F.\oint_{\Gamma_+}\!\!A \;-\;\oint_{\Gamma_-}\!\!A \;-\;\sum_j \oint_{\partial D_j}\!\!A \;=\;\iint_{\mathcal{B}\setminus \bigcup D_j}\!\!F .

Thus the belt identity generalizes to

Δϕ  =  ΦFpunctured  +  αTw  +  jϕdefect,j,\Delta\phi \;=\; \Phi_F^{\text{punctured}} \;+\;\alpha\,\mathrm{Tw} \;+\; \sum_j \phi_{\text{defect},j},

where ϕdefect,j\phi_{\text{defect},j} is the circulation around the puncture (an AB-like term), measurable by a tiny loop around the defect. If the defect is purely geometric (a seam twist jump), then ϕdefect=αδTwseam\phi_{\text{defect}}=\alpha\,\delta \mathrm{Tw}_{\text{seam}}.

Operational playbook.

  • Localize: tile a ring of micro-plaquettes around suspected defects; large rFBHLr_{\text{FBHL}} localized in arc-length is diagnostic.

  • Bookkeep: add each Dj\partial D_j as a micro-boundary and measure its class-phase; subtract it to restore FBHL on the punctured surface.

  • Seam adapters: if a tool/API boundary acts like a seam, insert a buffer tile and log its seam twist.

Acceptance. After subtracting defect circulations, residual MAD returns to band (≤ 1°). If not, refine mesh; if still not, promote to membrane (§31.4).


31.3 Stochastic belts (noise, dropout, ensembles)

When transports or curvature are random (sampling, dropout, non-deterministic kernels), treat AA or FF as stochastic processes.

Discrete stochastic FBHL (expectation & variance).
For per-step random plaquettes HkH_k,

E[Δϕ]    E[ΦF]  +  αE[Tw]  +  12kImTr ⁣(Cov(logHk))+\mathbb{E}[\Delta\phi] \;\approx\; \mathbb{E}[\Phi_F] \;+\;\alpha\,\mathbb{E}[\mathrm{Tw}] \;+\;\tfrac12 \sum_k \operatorname{Im}\mathrm{Tr}\!\big(\operatorname{Cov}(\log H_k)\big) + \cdots

(the last term is the Itô/Stratonovich-type correction from noise curvature). Variance scales roughly with area and local noise power:

Var(Δϕ)    kVar(argdetHk)area×σF2.\operatorname{Var}(\Delta\phi) \;\sim\; \sum_k \operatorname{Var}(\arg\det H_k)\quad \propto\quad \text{area}\times \sigma_F^2 .

Estimation & guards.

  • Averaging: use Uhlmann estimators for mixed states (Ch. 25) or average log-plaquettes in log-Euclidean space.

  • Concentration: apply matrix Bernstein/Freedman bounds to the martingale of partial products; this yields a stepwise spike threshold that adapts to noise.

  • Two clocks: keep fast (per-step) and slow (windowed) readouts; gate on z-scores relative to MAD of the slow clock.

Acceptance (stochastic regime).

  • Report mean ± MAD of Δϕ,ΦF\Delta\phi,\Phi_F; Faraday gain in [0.95,1.05][0.95,1.05] on average; spike FPR ≤ 0.05 under null noise.

  • If variance is too large for bands, expand width down or refine mesh until the per-cell angle logH0.2\|\log H\|\le 0.2.


31.4 Non-annular topologies (holes, genus, Möbius)

(A) Many boundaries / higher genus (orientable)

For an orientable surface Σ\Sigma with boundary components {γ}\{\gamma_\ell\},

sgn(γ)Φedge(γ)  =  Σ ⁣F  +  αTwΣ  +  (BCH seams).\sum_{\ell} \operatorname{sgn}(\gamma_\ell)\,\Phi_{\text{edge}}(\gamma_\ell) \;=\; \iint_{\Sigma}\!F \;+\; \alpha\,\mathrm{Tw}_{\Sigma} \;+\; \text{(BCH seams)}.

In a belt network this just glues additively (Chs. 22–23): interior seams cancel; only external boundaries and seam/BCH budgets remain. Use this when tiling around large obstacles or routing through portals.

(B) Möbius belts (non-orientable)

A Möbius strip has a single edge; global framing cannot be defined continuously. Remedy: pass to the orientable double cover B~\tilde{\mathcal{B}} (a belt of width 2w2w) with two edges again. FBHL holds on B~\tilde{\mathcal{B}}:

Δϕcover  =  ΦFcover  +  αTwcover.\Delta\phi_{\text{cover}} \;=\; \Phi_F^{\text{cover}} \;+\; \alpha\,\mathrm{Tw}_{\text{cover}} .

Projecting back implies half-integer twist quantization on the base and a 4π4\pi-like periodicity. In practice: duplicate the mesh, reverse orientation on one copy, compute on the cover, then fold results (divide edge gap by 2).

Acceptance: cover-space residual within band; projected observables obey half-step twist tests.

(C) Membranes (when belts aren’t enough)

If across-width commutators remain large after slab refinement, the physics is truly 2-D: promote to a membrane (no privileged “upper/lower” edges; you instrument full surface holonomy and cut it by a canonical set of cycles). Use when style/phase cannot be captured by two boundary traces (e.g., strongly branching tools with back-reaction across width).


31.5 Practical upgrade path (decision chart)

  1. Thin & quiet? If width law passes (R² ≥ 0.95), commutator proxy low → stay in belt.

  2. Too wide or BCH noisy?Slab: increase NnN_n, metric factor on, Q1/Q2 quadrature.

  3. Defects present? → Excise discs; add defect boundary phases; re-test residual.

  4. Noise high? → Uhlmann/mixed; two clocks; variance-aware gate.

  5. Non-orientable or multiply connected? → Double cover or multi-boundary Stokes.

  6. Still non-additive?Membrane modeling.


31.6 Acceptance & diagnostics (beyond-thin checklist)

  • Metric correction: enabling (1κn)(1-\kappa n) tightens width-fit; report slope shift.

  • BCH budget: [logHs,logHn]\sum\|[\log H^s,\log H^n]\| below target; residual drops with NnN_n.

  • Defects cleared: localized residual spikes vanish after adding defect loops.

  • Noise-aware: Faraday gain ≈ 1 in mean; spike FPR within band.

  • Topological sanity: double-cover results halve cleanly; multi-boundary balance holds to tolerance.


31.7 Open problems

  1. Tight non-Abelian error bounds. Prove optimal constants for snake orderings and give a priori mesh sizes for a desired residual band.

  2. Adaptive meshing on manifolds. Curvature- and commutator-driven refinement with guarantees of convergence for class-function phases.

  3. Learning α\alpha under confounding. Jointly estimate framing coefficient and flux scales when twist actuators also perturb curvature.

  4. Stochastic holonomy concentration. Matrix concentration inequalities tailored to surface-ordered exponentials with local dependence.

  5. Non-orientable inference. Principled estimators on double covers with minimal variance when only single-edge data is observable.

  6. Membrane controllers. Extending gate/dial/tiler to surfaces without privileged edges (higher-form control).

  7. Robust Uhlmann at rank drop. Stable mixed-state transports when densities become low-rank or ill-conditioned mid-trajectory.


Bottom line. Beyond thin belts is not a failure mode but a regime change. You keep the same invariants—edge gap, flux, twist, residual—but you (i) correct for geometry, (ii) budget non-Abelian seams, (iii) bookkeep defects, (iv) average or bound noise, and (v) respect topology (via extra boundaries or a double cover). With those upgrades, belt mechanics remain predictive and auditable in the wild.

 

Ch. 32 — Higher-Form & Back-Reaction Effects

When membranes/volumes are required; coupling belts to collapse processes (outline)

Belts (annular worldsheets with two boundary curves) are the minimal geometry that captures edge–interior invariants. But some systems refuse to fit on a belt: the across-width field is truly 2-D, interactions feed back into the generator, or topology injects extra boundaries that won’t cancel. This chapter sketches the higher-form upgrade path—from belts to membranes (surface holonomies of 2-form connections) and, in extremis, to volumes (3-form curvature)—and shows how to couple these geometries to collapse processes that return you to belts when possible.


32.1 When a belt is not enough (escalation criteria)

Promote the geometry if any of the following persist after slab refinement (Ch. 31):

  1. Non-commuting across-width everywhere. Commutator proxies stay high even with many rungs; width-law fit bends > 5%.

  2. Back-reaction. The act of binding evidence/tools measurably changes the interior field that produced the binding (closed feedback).

  3. Multi-boundary drive. More than two independent boundary traces are essential (e.g., triadic tool coupling), and they do not reduce to two effective edges without large residuals.

  4. Topological constraints. Punctures/handles force independent cycles that belts cannot absorb without defect terms dominating.

Then model a membrane M\mathcal{M} (an oriented surface with multiple boundary components). If even M\mathcal{M} is insufficient (e.g., field depends on enclosed volumes), promote to a volume V\mathcal{V}.


32.2 Higher-form connections (minimal toolkit)

  • 1-form (belt): connection AA with curvature F=dA+A ⁣ ⁣AF=dA + A\!\wedge\!A; Wilson lines on edges; Stokes on the belt.

  • 2-form (membrane): connection BB with 3-form curvature H=dBH=dB (Abelian case) or a mild 2-group generalization (we use Abelian in practice). Wilson surfaces:

    HolB(M)  =  exp ⁣(i ⁣MB),H=dB.\mathrm{Hol}_B(\mathcal{M}) \;=\; \exp\!\Big(i\!\iint_{\mathcal{M}} B\Big),\qquad H=dB.
  • 3-form (volume): curvature HH integrated over V\mathcal{V}: exp ⁣(i ⁣VH)\exp\!\big(i\!\iiint_{\mathcal{V}} H\big).

We keep Abelian higher-forms operational—surface ordering is then trivial; non-Abelian 2-forms require 2-categorical machinery and are beyond this mini-text.


32.3 From FBHL to a membrane law (sketch)

For a belt B\mathcal{B}:

Hol(Γ+)Hol(Γ)1edge gap  =  exp ⁣(i ⁣BF)  ×  eiαTw.\underbrace{\mathrm{Hol}(\Gamma_+)\,\mathrm{Hol}(\Gamma_-)^{-1}}_{\text{edge gap}} \;=\; \exp\!\Big(i\!\iint_{\mathcal{B}} F\Big)\;\times\; e^{\,i\alpha\,\mathrm{Tw}}.

For a membrane M\mathcal{M} whose boundary is a signed sum of belts M=σB\partial\mathcal{M}=\sum_\ell \sigma_\ell\,\mathcal{B}_\ell (pair-of-pants, junction sheets, etc.), the surface analog says that the product of belt surface holonomies across the boundary equals the volume holonomy of HH plus a surface-framing term:

[HolF(B)eiαTw(B)]σ  =  exp ⁣(i ⁣VH)  ×  eiβSf(M).(32.1)\prod_{\ell}\Big[\mathrm{Hol}_F(\mathcal{B}_\ell)\,e^{\,i\alpha\,\mathrm{Tw}(\mathcal{B}_\ell)}\Big]^{\sigma_\ell} \;=\; \exp\!\Big(i\!\iiint_{\mathcal{V}} H\Big)\;\times\; e^{\,i\beta\,\mathrm{Sf}(\mathcal{M})}. \tag{32.1}

Here V\mathcal{V} is any volume with boundary V=M\partial\mathcal{V}=\mathcal{M}, HolF(B)=exp(i ⁣BF)\mathrm{Hol}_F(\mathcal{B})=\exp(i\!\iint_{\mathcal{B}}F), Sf\mathrm{Sf} is a surface-framing functional (depends on the membrane’s normal field; reduces to belt twist on 1-D boundaries), and β\beta calibrates its contribution. In the thin limit with one belt in–one belt out, (32.1) collapses to FBHL.

Interpretation. A membrane is a cobordism of belts; (32.1) says “boundary belt physics balances the bulk 3-form” up to controllable framing terms.


32.4 Discretization: faces, shells, and ordering

Mesh. Triangulate M\mathcal{M} into faces ff and (optionally) shell a volume V\mathcal{V} into tetrahedra τ\tau.

  • Face holonomy (Abelian): Wf=exp(ifB)W_f=\exp\big(i\,\int_f B\big); total HolB(M)=fWf\mathrm{Hol}_B(\mathcal{M})=\prod_f W_f.

  • Volume holonomy: Vτ=exp(iτH)V_\tau=\exp\big(i\,\int_\tau H\big); total exp(i ⁣ττH)\exp(i\!\sum_\tau \int_\tau H).

  • Boundary coupling: each boundary belt B\mathcal{B}_\ell is meshed as in Ch. 24; its flux ΦF(B)=BargdetH\Phi_F(\mathcal{B}_\ell)=\sum_{\square\subset \mathcal{B}_\ell}\arg\det H_\square.

Stability rules.
(1) Keep per-face angle logWf0.2|\log W_f|\le 0.2.
(2) Weight areas with the surface metric (curvature-corrected Jacobian).
(3) For non-planar sheets, include mean-curvature corrections in Sf\mathrm{Sf} (next §).


32.5 Surface framing Sf\mathrm{Sf} (what replaces twist)

A belt’s framing term counts the rotation of a normal frame along a curve. For membranes, pick an orthonormal frame (t1,t2,n)(t_1,t_2,n) and define a scalar surface twist density from the normal connection ω\omega (the spin connection of normals):

Sf(M)  =  12π ⁣McurlMω  +  12π ⁣Mω.\mathrm{Sf}(\mathcal{M}) \;=\; \frac{1}{2\pi}\!\iint_{\mathcal{M}} \operatorname{curl}_{\mathcal{M}} \omega \;+\; \frac{1}{2\pi}\!\oint_{\partial\mathcal{M}} \omega_{\parallel}.

Discretely, Sf\mathrm{Sf} is the signed sum of dihedral angle changes between neighboring face normals plus boundary normal rotations. Along a boundary curve this reduces to the usual twist. Calibrate β\beta once (like α\alpha) by a controlled surface-twist experiment.


32.6 Back-reaction: when the field fights back

In many agents and physical systems, the interior field that your belt/membrane integrates depends on what you are doing at the boundary. Examples: retrieval strengthens tokens it already bends toward; a controller stiffens a robot locally; an EM field responds to actuator current.

Model this with coupled updates:

Geometry step:(Δϕ,ΦF,Tw)    G[A,B; mesh]Field step:AF1(A; Δϕ,ΦF,Tw),BF2(B; Δϕ,ΦF,Tw),Controller:uC(metrics);update boundary/tools with u.\begin{aligned} &\textbf{Geometry step:} && (\Delta\phi,\Phi_F,\mathrm{Tw}) \;\gets\; \mathcal{G}[A,B;\ \text{mesh}] \\ &\textbf{Field step:} && A\leftarrow \mathcal{F}_1(A;\ \Delta\phi,\Phi_F,\mathrm{Tw}),\quad B\leftarrow \mathcal{F}_2(B;\ \Delta\phi,\Phi_F,\mathrm{Tw}), \\ &\textbf{Controller:} && u \leftarrow \mathcal{C}(\text{metrics});\quad \text{update boundary/tools with } u. \end{aligned}

For small gains and Lipschitz F1,2\mathcal{F}_{1,2}, a quadratic Lyapunov argument (as in Ch. 17) yields practical stability: metrics stay inside bands; otherwise trigger escalation (membrane or volume) or Abort.

Energy view (variational sketch). Minimize

E(A,B)=λ1 ⁣B ⁣ ⁣F2+λ2 ⁣M ⁣ ⁣B2+λ3 ⁣V ⁣ ⁣H2\mathcal{E}(A,B) = \lambda_1\!\iint_{\mathcal{B}}\!\!\|F\|^2 + \lambda_2\!\iint_{\mathcal{M}}\!\!\|B\|^2 + \lambda_3\!\iiint_{\mathcal{V}}\!\!\|H\|^2

subject to boundary constraints (target edge gaps, style) and acceptance bands. Gradient flows of E\mathcal{E} formalize “the field yields just enough to satisfy boundary data,” making back-reaction explicit.


32.7 Collapse processes: membrane → belt (outline)

Often you can come back down to belts by collapsing a membrane onto a “most informative” ribbon.

Goal. Choose a belt BM\mathcal{B}^\star \subset \mathcal{M} (centerline + width profile) that preserves boundary targets while minimizing interior complexity.

Objective (one option).

minBM[Δϕ(B)σΔϕ(B)boundary fidelity+λFΦF(B)ΦB(M)+λSSf ⁣ ⁣mismatch+λAarea(M ⁣ ⁣B)],\min_{\mathcal{B}\subset \mathcal{M}} \Big[ \underbrace{\big|\Delta\phi(\partial\mathcal{B}) - \sum_\ell \sigma_\ell \Delta\phi(\partial\mathcal{B}_\ell)\big|}_{\text{boundary fidelity}} + \lambda_F \big|\Phi_F(\mathcal{B}) - \Phi_B(\mathcal{M})\big| + \lambda_S\,\mathrm{Sf\!-\!mismatch} + \lambda_A \,\text{area}(\mathcal{M}\!\setminus\!\mathcal{B}) \Big],

where ΦB(M)=MF\Phi_B(\mathcal{M})=\int_{\mathcal{M}}F (1-form curvature restricted to the sheet carrying FF) or B\iint B if your interior is truly 2-form driven.

Greedy collapse (practical):

  1. Compute per-face contribution density to boundary metrics (e.g., SHAP-like share of Δϕ\Delta\phi).

  2. Seed a narrow ribbon along the maximum-contribution ridge.

  3. Grow width until acceptance bands start to fail; trim low-contribution flaps.

  4. Re-measure; if residuals stay high → keep membrane.

Guarantee (sketch). If contribution density is unimodal across width and commutators are locally bounded, the greedy ribbon achieves boundary fidelity within a factor of the optimal belt up to O(BCH)O(\text{BCH}).


32.8 Volume regime & “higher Faraday”

If changing a membrane’s interior consistently produces non-local effects that a 2-form cannot encode (e.g., true volumetric couplings), promote to a volume V\mathcal{V} and monitor the 3-form HH.

Higher Faraday law (discrete).

Δ ⁣[σΦF(B)    βSf(M)]    Δ[VH].\Delta\!\Big[\sum_\ell \sigma_\ell \Phi_F(\mathcal{B}_\ell) \;-\; \beta\,\mathrm{Sf}(\mathcal{M})\Big] \;\approx\; \Delta\Big[ \iiint_{\mathcal{V}} H \Big].

This is the time-differential sibling of (32.1): the change in boundary belt flux (minus surface-framing) tracks the bulk 3-flux change.


32.9 Software notes (what to actually code)

  • Membrane meshers: triangulate surfaces; reuse Ch. 24 accumulators with face integrals (Abelian) and keep per-face angles small.

  • Surface framing: accumulate dihedral turns; calibrate β\beta once.

  • Logs: extend JSONL with PhiB_surface (∬B), PhiH_volume (∭H), Sf_surface; record boundary belt list for each membrane.

  • Controllers: gate on face-wise spike maps; allow tile-level escalation (a tile becomes a membrane) and collapse attempts after stabilization.


32.10 Acceptance bands (higher-form)

  • Membrane balance: (32.1) residual MAD ≤ 1–2° after calibration; improvements monotone with mesh refinement.

  • Collapse viability: belt reconstructed from M\mathcal{M} matches boundary edge gaps within 2%, width-law R20.95R^2\ge 0.95.

  • Back-reaction stability: under small boundary perturbations, metrics remain inside the readability/safety tube; no uncontrolled oscillations.

  • Volume check: higher-Faraday correlation ≥ 0.95 between boundary change and bulk HH change on controlled modulations.


32.11 Open problems (higher-form)

  1. Non-Abelian 2-form numerics with guarantees (surface ordering, 2-group discretizations).

  2. Tight surface-framing theory: minimal invariants that reduce to belt twist on boundaries.

  3. Optimal collapse with approximation ratios and robust stopping rules under noise.

  4. Identifiability under back-reaction: when can you uniquely separate boundary control from interior response?

  5. Scalable audits: streaming estimators for ΦB,ΦH\Phi_B,\Phi_H on large meshes with mixed precision and sharp error bars.


Bottom line. Belts are the workhorse; membranes and, rarely, volumes extend the calculus when fields are genuinely higher-dimensional or feed back on themselves. Use the membrane law (32.1) to balance boundary belts against bulk HH, include surface framing, and—whenever possible—collapse back to a belt that stays within your acceptance bands. This keeps the system auditable and controllable even beyond the thin-belt regime.

 

Appendix A — Notation & Orientation Diagrams (print-ready)

Use this as a 2–3 page cheat sheet. No prerequisites beyond standard vector calculus & gauge/holonomy basics.


A.1 Symbols at a glance

  • Belt domain (annulus): BR3\mathcal{B}\subset \mathbb{R}^3 (or a smooth surface), with boundary B=Γ+(Γ)\partial\mathcal{B}=\Gamma_{+}\,\sqcup\,(-\Gamma_{-}).

  • Centerline: r(s)\mathbf{r}(s), s[0,L]s\in[0,L] arc length; tangent t=sr\mathbf{t}=\partial_s\mathbf{r}.

  • Director (framing line): unit u(s)t(s)\mathbf{u}(s)\perp \mathbf{t}(s).

  • Width: w>0w>0; local coords: (s,u)(s,u) with u[w2,+w2]u\in[-\tfrac{w}{2},+\tfrac{w}{2}].

  • Edges: Γ±(s)=r(s)±w2u(s)\Gamma_{\pm}(s)=\mathbf{r}(s)\pm \tfrac{w}{2}\,\mathbf{u}(s).

  • Surface normal: nB\mathbf{n}_\mathcal{B} (chosen once; fixes boundary orientations).

  • Frame: (t,u,b)(\mathbf{t},\mathbf{u},\mathbf{b}) with b=t×u\mathbf{b}=\mathbf{t}\times \mathbf{u}.

  • Framing angle: ϕ(s)\phi(s) (director u\mathbf{u} relative to a chosen reference frame along r\mathbf{r}).

  • Twist (Călugăreanu–White–Fuller):

    Tw=12π0L(t×u)su  ds.\mathrm{Tw}=\frac{1}{2\pi}\int_0^L \big(\mathbf{t}\times \mathbf{u}\big)\cdot \partial_s \mathbf{u}\; ds.
  • Writhe:

    Wr=14π ⁣ ⁣[0,L]2 ⁣ ⁣(sr(s)×sr(s))(r(s)r(s))r(s)r(s)3  dsds.\mathrm{Wr}=\frac{1}{4\pi}\!\!\iint\limits_{[0,L]^2}\!\! \frac{\big(\partial_s\mathbf{r}(s)\times \partial_{s'}\mathbf{r}(s')\big)\cdot\big(\mathbf{r}(s)-\mathbf{r}(s')\big)} {\|\mathbf{r}(s)-\mathbf{r}(s')\|^3}\; ds\,ds'.
  • Linking (edges): Lk(Γ+,Γ)=Tw+Wr\mathrm{Lk}(\Gamma_+,\Gamma_-)=\mathrm{Tw}+\mathrm{Wr}.

  • Gauge connection/curvature: AA (1-form), F=dA+AAF=dA+A\wedge A.

  • Holonomy (edge): Hol(Γ)=Pexp ⁣Γ ⁣A\mathrm{Hol}(\Gamma)=\mathcal{P}\exp\!\oint_{\Gamma}\! A.

  • Surface-ordered exponential: Sexp ⁣B ⁣F\mathcal{S}\exp\!\iint_{\mathcal{B}}\!F.

  • Framing phase coupling: αR\alpha\in\mathbb{R} (dimensionless).


A.2 Belt parametrization & metric (thin-ribbon regime)

Embed B\mathcal{B} via

X(s,u)=r(s)+uu(s),u[w2,+w2].\mathbf{X}(s,u)=\mathbf{r}(s)+u\,\mathbf{u}(s),\qquad u\in\Big[-\tfrac{w}{2},+\tfrac{w}{2}\Big].

Local metric (to first order in curvature κ\kappa and width ww):

g((1κu)2001),valid if κw1.g \approx \begin{pmatrix} (1-\kappa u)^2 & 0\\ 0 & 1 \end{pmatrix},\qquad \text{valid if } \kappa\,w\ll 1.

A.3 Orientation conventions (no minus-sign surprises)

Surface orientation → boundary orientations (right-hand rule):

  • Choose nB\mathbf{n}_\mathcal{B}. Walk with your head along +nB+\mathbf{n}_\mathcal{B}: positively oriented boundary is counter-clockwise.

  • For an annulus, this yields

B=Γ+    (Γ),\partial\mathcal{B}=\Gamma_{+}\;\sqcup\;(-\Gamma_{-}),

so any boundary integral splits as “upper minus lower.”

Edge direction choice:

  • Parametrize both edges by increasing centerline ss. Then:

    Γ+()    Γ()(signs fixed by the surface orientation).\oint_{\Gamma_{+}}(\cdot)\;-\;\oint_{\Gamma_{-}}(\cdot) \quad\text{(signs fixed by the surface orientation).}

ASCII aide-mémoire

     +n_B (out of page)
         ↑
   ┌───────────────┐   Outer edge = Γ+
   │  annular B    │   (positive boundary circulation)
   └───────────────┘   Inner edge = Γ− (negative orientation)
        ←  s

A.4 Two-boundary integral identities (Abelian & non-Abelian)

Abelian Stokes on a belt:

Γ+A    ΓA  =  BF.\oint_{\Gamma_{+}} A\;-\;\oint_{\Gamma_{-}} A \;=\;\iint_{\mathcal{B}} F.

Non-Abelian (schematic):

Hol(Γ+)Hol(Γ)1  =  Sexp ⁣BF  ×  eiαTw.\mathrm{Hol}(\Gamma_+)\,\mathrm{Hol}(\Gamma_-)^{-1} \;=\;\mathcal{S}\exp\!\iint_{\mathcal{B}}F \;\times\;e^{\,i\alpha\,\mathrm{Tw}}.
  • S\mathcal{S} denotes surface ordering.

  • The scalar framing factor eiαTwe^{i\alpha\,\mathrm{Tw}} accounts for the chosen director u\mathbf{u} along the belt.


A.5 Framing, twist & linking — operational formulas

  • Edges from a frame: Γ±=r±w2u\Gamma_{\pm}=\mathbf{r}\pm \tfrac{w}{2}\mathbf{u}.

  • Twist density:
    τtw(s)=12π(t×u)su\tau_{\mathrm{tw}}(s)=\frac{1}{2\pi}\,(\mathbf{t}\times \mathbf{u})\cdot \partial_s \mathbf{u}.

  • Linking = Tw + Wr: invariant under smooth deformations that avoid edge crossings.

  • Quantization check: ϕϕ+2πmTwTw+m\phi\mapsto \phi+2\pi m\Rightarrow \mathrm{Tw}\mapsto \mathrm{Tw}+m, thus eiαTwe^{i\alpha\,\mathrm{Tw}} is 2π/α2\pi/\alpha-periodic.


A.6 “Upper–minus–lower” calculus (quick recipes)

  • Circulation: Γ+vd    Γvd\oint_{\Gamma_+}\mathbf{v}\cdot d\mathbf{\ell}\;-\;\oint_{\Gamma_-}\mathbf{v}\cdot d\mathbf{\ell}.

  • Flux: B(×v)nBdS\iint_{\mathcal{B}} (\nabla\times \mathbf{v})\cdot\mathbf{n}_\mathcal{B}\, dS.

  • Gauge form: replace vd\mathbf{v}\cdot d\mathbf{\ell} by AA, ×\nabla\times by FF.


A.7 Discrete orientation & mesh conventions (for code)

  • Mesh: oriented faces {fk}\{f_k\} with normals aligned to nB\mathbf{n}_\mathcal{B}.

  • Boundary loops: ordered vertex cycles Γ+\Gamma_{+} and Γ\Gamma_{-} following induced boundary orientation.

  • Face integral: fkFarea(fk)avgF\iint_{f_k}F \approx \mathrm{area}(f_k)\, \mathrm{avg}\,F.

  • Surface ordering: order faces by a radial sweep (inner→outer) or use a spanning tree over dual graph; keep a fixed, documented rule.

  • Edge holonomy (lattice): multiply link variables in edge order; belt holonomy = product(Γ+\Gamma_+) × product(Γ\Gamma_-)1^{-1}.


A.8 Sanity checks (use every time)

  1. Annulus sign test: Constant curl/curvature field? Then “upper–minus–lower” must equal area×field.

  2. 4π test: A 4π4\pi rotation of the frame returns the belt to the same physical state; holonomy/observables must respect this periodicity where applicable.

  3. Gauge invariance: Edge–edge difference and surface term must transform covariantly; scalar invariants (e.g., argdet\arg\det) remain unchanged.

  4. Width scaling: Thin-ribbon limit (κw1\kappa w\ll 1): edge gap scales linearly with width for small ww if fields are smooth.


A.9 Minimal units & constants

  • ss in length; uu in length; ww in length.

  • AA dimension depends on context (e.g., phase/length); FF in phase/area.

  • α\alpha dimensionless (set α=1\alpha=1 unless specified).


A.10 Diagram templates (annotate as needed)

(D1) Belt with induced orientations

          ↑  +n_B
   Γ+  →──────────→
      ╔════════════╗
      ║            ║   s increases →
      ╚════════════╝
   Γ−  ←──────────←

Labels: show Γ+\Gamma_+ arrow same direction as positive boundary; Γ\Gamma_- opposite.

(D2) Frame along centerline

 at s:   t = r'(s)   u ⟂ t   b = t × u
           ↗ t
         r(s)•→ u
              ⟂
              b (out of page)

(D3) Edge construction

Γ+(s) = r(s) + (w/2) u(s)
Γ−(s) = r(s) − (w/2) u(s)

(D4) Two-boundary Stokes (Abelian)

∮_{Γ+}A  −  ∮_{Γ−}A   =   ∬_{B} F
 [edge gap]              [surface flux]

(D5) Belt holonomy (Non-Abelian, schematic)

Hol(Γ+) · Hol(Γ−)^{-1}  =  Sexp ∬_B F  ·  exp(i α Tw)

Printing note

  • Set monospaced diagrams at 10–11 pt; equations at 11 pt; margins ≥ 15 mm.

  • Keep pages b/w; no color dependence.

End of Appendix A.

 

Appendix B — Proof Sketches

(Two-Boundary Stokes/Gauss; FBHL derivation; Framing quantization)

Conventions: B\mathcal{B} is an oriented annulus (“belt”) with boundary B=Γ+(Γ)\partial\mathcal{B}=\Gamma_+\sqcup(-\Gamma_-). Smoothness C2C^2 unless stated. Gauge group GG compact; connection AA, curvature F=dA+AAF=dA+A\wedge A. Margin tags [BH:][BH:\,\cdot] indicate the corresponding idea in the “Belt Holonomy” paper.


B.0 Preliminaries and identities

  • Surface orientation → boundary sign. If nB\mathbf{n}_{\mathcal{B}} fixes the surface orientation, the induced orientation makes the outer edge positive and the inner edge negative:

    B=Γ+(Γ).[BH:orientation]\partial\mathcal{B}=\Gamma_{+}\sqcup(-\Gamma_{-}). \quad [BH: orientation]
  • Holonomy. Hol(Γ)=Pexp ⁣ΓAG\mathrm{Hol}(\Gamma)=\mathcal{P}\exp\!\oint_\Gamma A\in G.

  • Surface-ordered exponential (schematic). Sexp ⁣BF\mathcal{S}\exp\!\iint_{\mathcal{B}}F denotes a non-Abelian, gauge-covariant accumulation of FF over B\mathcal{B}, realized with a choice of radial Wilson lines. [BH:[BH: non-Abelian Stokes]]


B.1 Two-Boundary Stokes (Abelian)

Theorem B.1 (Abelian two-boundary Stokes).
Let AA be a smooth 1-form on a neighborhood of B\mathcal{B}, F=dAF=dA. Then

  Γ+ ⁣A    Γ ⁣A  =  B ⁣F  .[BH:two-boundary Stokes]\boxed{\;\oint_{\Gamma_+}\!A\;-\;\oint_{\Gamma_-}\!A\;=\;\iint_{\mathcal{B}}\!F\;}. \qquad [BH:\,\text{two-boundary Stokes}]

Sketch. Classical Stokes on an oriented surface gives
BA=BdA\oint_{\partial\mathcal{B}}A=\iint_{\mathcal{B}}dA. With B=Γ+(Γ)\partial\mathcal{B}=\Gamma_+\sqcup(-\Gamma_-), the left side is precisely the edge-gap integral. No further hypotheses are needed beyond smoothness and orientability. ∎

Checks. (i) Constant field FF ⇒ RHS =(area)×F= (\text{area})\times F, matching the signed edge gap. (ii) Refinement stability: subdividing B\mathcal{B} and summing boundaries cancels interior edges in pairs. [BH:[BH: partition invariance]]


B.2 Two-Boundary Gauss (surface divergence theorem)

Let  ⁣B\nabla_{\!\mathcal{B}}\cdot be the intrinsic divergence on B\mathcal{B} and ν\boldsymbol\nu the outward unit co-normal (tangent to B\mathcal{B}, normal to the boundary).

Theorem B.2 (Two-boundary Gauss).
For any smooth tangent field v\mathbf{v} on B\mathcal{B},

  B ⁣ ⁣B ⁣vdS=Γ+ ⁣v ⁣ ⁣νdlΓ ⁣v ⁣ ⁣νdl  .[BH:surface Gauss]\boxed{\;\iint_{\mathcal{B}}\!\nabla_{\!\mathcal{B}}\!\cdot\mathbf{v}\,dS =\oint_{\Gamma_+}\!\mathbf{v}\!\cdot\!\boldsymbol\nu\,dl -\oint_{\Gamma_-}\!\mathbf{v}\!\cdot\!\boldsymbol\nu\,dl\;}. \qquad [BH:\,\text{surface Gauss}]

Sketch. Apply the divergence theorem on oriented surfaces:
B ⁣BvdS=Bvνdl\iint_{\mathcal{B}}\nabla_{\!\mathcal{B}}\cdot\mathbf{v}\,dS=\oint_{\partial\mathcal{B}}\mathbf{v}\cdot\boldsymbol\nu\,dl. The sign on Γ\Gamma_- comes from the induced boundary orientation (co-normal points “inward” there). ∎

Remark. In belt coordinates (s,u)(s,u), ν\boldsymbol\nu is radially outward on Γ+\Gamma_+ and inward on Γ\Gamma_-, yielding the “upper–minus–lower” rule automatically. [BH:[BH: belt coordinates]]


B.3 Framed Belt Holonomy Law (FBHL)

We derive the central identity in two steps: non-Abelian Stokes on the annulus, then the framing (twist) factor.

B.3.1 Non-Abelian Stokes on an annulus

Lemma B.3 (Boundary factorization).
With a basepoint x0Γ+Γx_0\in\Gamma_+\cap\Gamma_- (identified via a short bridge inside B\mathcal{B}), the loop B\partial\mathcal{B} factorizes as the concatenation Γ+Γ1\Gamma_+\cdot\Gamma_-^{-1}. Hence

Pexp ⁣BA=Hol(Γ+)Hol(Γ)1.[BH:B=Γ+ ⁣ ⁣Γ1]\mathcal{P}\exp\!\oint_{\partial\mathcal{B}}A =\mathrm{Hol}(\Gamma_+)\,\mathrm{Hol}(\Gamma_-)^{-1}. \quad [BH:\,\partial\mathcal{B}=\Gamma_+\!*\!\Gamma_-^{-1}]

Sketch. Standard path composition with a fixed basepoint and the inverse path for Γ\Gamma_-. ∎

Lemma B.4 (Non-Abelian Stokes, gauge-covariant form).
Choose a smooth family of paths γx\gamma_{x} in B\mathcal{B} from x0x_0 to xx (e.g., radial lines). Let W(x)W(x) be the Wilson line along γx\gamma_x. Then

Pexp ⁣BA=Sexp ⁣BW(x)1F(x)W(x)dS.[BH:NAST]\mathcal{P}\exp\!\oint_{\partial\mathcal{B}}A =\mathcal{S}\exp\!\iint_{\mathcal{B}} W(x)^{-1}\,F(x)\,W(x)\,dS. \quad [BH:\,\text{NAST}]

Sketch. Standard non-Abelian Stokes theorem: tile B\mathcal{B}, insert infinitesimal loops, use BCH/Trotter to pass to the continuum; Wilson lines parallel-transport FF to the basepoint to maintain covariance. Independence of the specific γx\gamma_x follows from smooth deformations that preserve orientation, up to conjugation at the basepoint. ∎

Corollary B.5 (Edge-gap holonomy equals surface-ordered curvature).

  Hol(Γ+)Hol(Γ)1=Sexp ⁣BW1FWdS  .[BH:two-boundary NAST]\boxed{\;\mathrm{Hol}(\Gamma_+)\,\mathrm{Hol}(\Gamma_-)^{-1} =\mathcal{S}\exp\!\iint_{\mathcal{B}} W^{-1} F W\,dS\;}. \quad [BH:\,\text{two-boundary NAST}]

B.3.2 Framing contribution as a U(1) factor

Let t(s)\mathbf{t}(s) be the tangent of the centerline, u(s)\mathbf{u}(s) a smooth unit director field orthogonal to t\mathbf{t} defining the belt edges Γ±=r±(w/2)u\Gamma_\pm=\mathbf{r}\pm (w/2)\mathbf{u}. Define the twist

Tw=12π0L(t×u)su  ds.[BH:Tw]\mathrm{Tw}=\frac{1}{2\pi}\int_0^L \big(\mathbf{t}\times\mathbf{u}\big)\cdot\partial_s\mathbf{u}\;ds. \quad [BH:\,\mathrm{Tw}]

Lemma B.6 (Framing as a Berry/spin connection).
The rotation of u\mathbf{u} along the belt induces a U(1) connection

Afr=αω,ω:=(t×u)su  ds,A_{\text{fr}}=\alpha\,\omega, \qquad \omega:=\big(\mathbf{t}\times\mathbf{u}\big)\cdot\partial_s\mathbf{u}\; ds,

whose holonomy around the boundary reduces to eiαTwe^{i\alpha\,\mathrm{Tw}}. [BH:framing factor][BH:\,\text{framing factor}]

Sketch. ω\omega is the pullback of the SO(2)SO(2) spin connection of the normal bundle restricted to the director; integrating ω/2π\omega/2\pi counts total turns of u\mathbf{u}. The belt’s two edges pick the same scalar phase so the edge-gap accumulates a single multiplicative U(1) factor. ∎

Theorem B.7 (Framed Belt Holonomy Law, FBHL).
Including the framing U(1) factor,

  Hol(Γ+)Hol(Γ)1=Sexp ⁣BW1FWdS    eiαTw  .[BH:FBHL]\boxed{\;\mathrm{Hol}(\Gamma_+)\,\mathrm{Hol}(\Gamma_-)^{-1} =\mathcal{S}\exp\!\iint_{\mathcal{B}} W^{-1} F W\,dS\;\cdot\; e^{\,i\alpha\,\mathrm{Tw}}\;}. \quad [BH:\,\text{FBHL}]

Sketch. Combine Cor. B.5 with Lemma B.6. The non-Abelian part is conjugacy-covariant; the scalar factor commutes with GG, so it multiplies on the right without ambiguity. Gauge transformations Ag1Ag+g1dgA\mapsto g^{-1}Ag+g^{-1}dg act by conjugation on the LHS and on the Sexp\mathcal{S}\exp term; the scalar eiαTwe^{i\alpha\,\mathrm{Tw}} is gauge-invariant. ∎

Sanity limits.
(i) Abelian case: W1W\equiv 1, FBHL reduces to B.1 with the extra twist phase.
(ii) Thin ribbon: κw1\kappa w\ll 1 ⇒ surface curvature nearly constant across width; error O((κw)2)O((\kappa w)^2). [BH:thin-belt error][BH:\,\text{thin-belt error}]


B.4 Framing quantization

Proposition B.8 (Integer shift under frame relabeling).
Let u\mathbf{u} and u\mathbf{u}' be two smooth director fields related by a rotation u(s)=Rθ(s)u(s)\mathbf{u}'(s)=R_{\theta(s)}\mathbf{u}(s) with θ(0)=θ(L)+2πm\theta(0)=\theta(L)+2\pi m, mZm\in\mathbb{Z}. Then

Tw[u]Tw[u]  =  m.[BH:framing ambiguity]\mathrm{Tw}[\mathbf{u}']-\mathrm{Tw}[\mathbf{u}] \;=\; m. \quad [BH:\,\text{framing ambiguity}]

Sketch. Substitute u\mathbf{u}' into the twist integrand. The extra term integrates to (1/2π)0Lθ(s)ds=(θ(L)θ(0))/(2π)=m(1/2\pi)\int_0^L\theta'(s)\,ds=(\theta(L)-\theta(0))/(2\pi)=m. This is the degree of the map seiθ(s)s\mapsto e^{i\theta(s)} into S1S^1. ∎

Corollary B.9 (Framing-independence quantization of α\alpha).
The scalar factor changes by eiαme^{i\alpha m}. Physical framing-independence for closed belts requires

eiαm=1  mZα2πZ.[BH:quantization]e^{i\alpha m}=1\ \ \forall m\in\mathbb{Z} \quad\Longleftrightarrow\quad \alpha\in 2\pi\mathbb{Z}. \quad [BH:\,\text{quantization}]

Otherwise, non-trivial α\alpha encodes a real framing (spin/torsion) coupling that is experimentally meaningful.

Remark (Linking–twist–writhe).
For the ribbon edges Γ±\Gamma_\pm,
Lk(Γ+,Γ)=Tw+Wr\mathrm{Lk}(\Gamma_+,\Gamma_-)=\mathrm{Tw}+\mathrm{Wr}. Under a global 2π2\pi relabeling of u\mathbf{u}, TwTw+1\mathrm{Tw}\mapsto \mathrm{Tw}+1 while WrWr1\mathrm{Wr}\mapsto \mathrm{Wr}-1, keeping LkZ\mathrm{Lk}\in\mathbb{Z} invariant. [BH:Lk=Tw+Wr][BH:\,\mathrm{Lk}=\mathrm{Tw}+\mathrm{Wr}]


B.5 Discrete FBHL (mesh version)

Setup. Triangulate B\mathcal{B} by oriented faces {fk}\{f_k\}; assign link variables UeGU_e\in G on edges with Ue=Pexp ⁣eAU_e=\mathcal{P}\exp\!\int_e A, and face curvatures Vfkexp ⁣fkFV_{f_k}\approx\exp\!\int_{f_k}F.

Lemma B.10 (Lattice Stokes).
With a fixed surface ordering (e.g., radial sweep on the dual graph),

eΓ+Ue  (eΓUe)1=k(Wk1VfkWk)  +  O(h2),\prod_{e\in\Gamma_+}U_e\;\Big(\prod_{e\in\Gamma_-}U_e\Big)^{-1} =\overrightarrow{\prod_{k}} \Big(W_k^{-1}\,V_{f_k}\,W_k\Big) \;+\; O(h^2),

where hh is mesh scale and WkW_k are discrete Wilson lines from the basepoint to fkf_k. [BH:lattice NAST][BH:\,\text{lattice NAST}]

Sketch. Each face contributes a small loop; interior edges cancel pairwise; BCH/Trotter shows second-order error in hh. ∎

Framing on the lattice. Discretize ω\omega by per-edge angles of u\mathbf{u}; sum gives Tw\mathrm{Tw} up to O(h)O(h). The discrete FBHL reads

(Γ+Ue)(ΓUe)1=k(Wk1VfkWk)eiαTw+O(h2).[BH:discrete FBHL]\Big(\prod_{\Gamma_+}U_e\Big)\Big(\prod_{\Gamma_-}U_e\Big)^{-1} =\overrightarrow{\prod_k}(W_k^{-1}V_{f_k}W_k)\cdot e^{\,i\alpha\,\mathrm{Tw}} + O(h^2). \quad [BH:\,\text{discrete FBHL}]

B.6 Error bounds and limits

  • Thin-belt approximation. If κw1\kappa w\ll 1 and FF varies smoothly transverse to the centerline,

SeBW1FWe0LFˉ(s)wds=O((κw)2+Fw2).\big\|\,\mathcal{S}e^{\iint_{\mathcal{B}}W^{-1}FW}-e^{\int_0^L \bar{F}(s)\,w\,ds}\big\| = O((\kappa w)^2+\|\nabla F\|\,w^2).

Here Fˉ(s)\bar{F}(s) is the transverse average at fixed ss. [BH:error law][BH:\,\text{error law}]

  • Non-orientable case (Möbius). Two-boundary orientation fails; FBHL must be replaced by an appropriate one-boundary statement with a doubled traversal. Not needed for this textbook’s core belt theory. [BH:limits][BH:\,\text{limits}]


B.7 Physical checks

  1. 4π\pi periodicity. A 2π2\pi rotation of the frame changes Tw\mathrm{Tw} by 11; demanding physical invariance under a 4π4\pi rotation is automatic if α2πZ\alpha\in 2\pi\mathbb{Z} (spinor-like sectors otherwise). [BH:\,\text{4\(\pi test}])

  2. Composition (gluing annuli). Gluing belts along a common edge adds their surface-ordered exponents and sums twists; edge holonomies compose accordingly. [BH:cobordism law][BH:\,\text{cobordism law}]


What to remember

  • Two-boundary Stokes/Gauss are just the standard theorems with B=Γ+ ⁣ ⁣(Γ)\partial\mathcal{B}=\Gamma_+\!\sqcup\!(-\Gamma_-).

  • FBHL = (non-Abelian Stokes over the belt) × (U(1) framing holonomy eiαTwe^{i\alpha\,\mathrm{Tw}}).

  • Framing quantization ensures invariance under director relabeling when α2πZ\alpha\in 2\pi\mathbb{Z}; otherwise α\alpha encodes a real, measurable coupling.

 

 

Appendix C — Computational Reference

(meshes, quadrature, error tables, complexity)

Goal: a drop-in cookbook you can implement in any language. Defaults target accuracy ~1e-3 for smooth belts in the thin-ribbon regime (κw1\kappa w\ll 1). Symbols follow App. A.


C.0 Scope & Objects

  • Input: centerline r(s)\mathbf r(s), director u(s)\mathbf u(s), width ww, connection A(x)A(x) (or discrete links), curvature F(x)F(x).

  • Outputs:
    (i) edge holonomies Hol(Γ±)\mathrm{Hol}(\Gamma_\pm);
    (ii) belt holonomy gap Hol(Γ+)Hol(Γ)1\mathrm{Hol}(\Gamma_+)\mathrm{Hol}(\Gamma_-)^{-1};
    (iii) surface-ordered exponential S ⁣exp ⁣BF\mathcal S\!\exp\!\iint_{\mathcal B}F;
    (iv) twist Tw\mathrm{Tw};
    (v) diagnostics: area, width-scaling, 4π4\pi periodicity.


C.1 Reference Discretizations

C.1.1 Parametric belt mesh (structured grid)

Let s[0,L]s\in[0,L] (arc length), u[w/2,w/2]u\in[-w/2,w/2]. Choose

Ns=#nodes along s,Nu=#nodes across u,hs=LNs,  hu=wNu.N_s=\#\text{nodes along }s,\quad N_u=\#\text{nodes across }u,\quad h_s=\frac{L}{N_s},\; h_u=\frac{w}{N_u}.

Nodes: Xi,j=r(si)+uju(si)\mathbf X_{i,j}=\mathbf r(s_i)+u_j\,\mathbf u(s_i), i=0..Nsi=0..N_s, j=0..Nuj=0..N_u.
Faces: rectangles (i,i+1)×(j,j+1)(i,i+1)\times(j,j+1) (or split into two triangles).

Recommended defaults (smooth cases): Nsmax(256,Lκmax/ε)N_s\approx \max(256,\lceil L\,\kappa_{\max}/\varepsilon\rceil), Nu{6,8,12}N_u\in\{6,8,12\}, target ε103\varepsilon\sim10^{-3}.

C.1.2 Unstructured annulus (curvy belts)

  • Construct a centerline polyline; offset edges Γ±\Gamma_\pm; generate an annular strip via constrained Delaunay; orient faces by the chosen nB\mathbf n_{\mathcal B}.

  • Store: vertices VV, directed boundary cycles Γ±\Gamma_\pm, oriented faces fkf_k, dual graph G\*G^\* (for ordering).

Data layout (minimal):

struct Mesh {
  Vec3 V[M]; int GammaPlus[E+], GammaMinus[E-];
  Face F[K]; // each Face has (v0,v1,v2) or (v0..v3), normal, area
  int dualParent[K]; // spanning tree parent for surface ordering
}

C.2 Quadrature Rules

C.2.1 Line (edges)

  • Midpoint (2nd-order): egdleg(mid)\int_{e} g\,dl \approx |e|\,g(\text{mid}).

  • Simpson (4th-order, even segments): for composite along Γ±\Gamma_\pm.

  • Gauss-Legendre (order pp): p=4p=4 is robust; use when AA varies quickly.

C.2.2 Surface (faces)

  • Rectangles: tensor Gauss–Legendre 2×22\times 2 (order 4) or 3×33\times 3 (order 6).

  • Triangles: Dunavant rules (order 5 or 7).
    Example (order 5, 7 points): error O(h6)O(h^{6}) on smooth FF.

Sampling FF:

  • Abelian: evaluate FF directly at quadrature points.

  • Non-Abelian: evaluate FF, then parallel transport to basepoint via Wilson line W(x)W(x) (Sec. C.4) before accumulation.


C.3 Twist & Framing Estimators

C.3.1 Discrete twist

Let segment ii+1i\to i+1 have tangent ti\mathbf t_i, directors ui,ui+1\mathbf u_i,\mathbf u_{i+1}. Define signed turn

δϕi=atan2 ⁣((ti×ui) ⁣ ⁣ui+1, ui ⁣ ⁣ui+1).\delta\phi_i=\operatorname{atan2}\!\big((\mathbf t_i\times \mathbf u_i)\!\cdot\!\mathbf u_{i+1},\ \mathbf u_i\!\cdot\!\mathbf u_{i+1}\big).

Then

Tw12πi=0Ns1δϕi(+O(hs2)).\mathrm{Tw} \approx \frac{1}{2\pi}\sum_{i=0}^{N_s-1}\delta\phi_i \quad (+\,O(h_s^2)).

Tip: unwrap ϕ\phi continuously to avoid 2π2\pi jumps.

C.3.2 Framing factor

eiαTw(scalar U(1)).e^{i\alpha\,\mathrm{Tw}} \quad\text{(scalar U(1)).}

If you support director relabeling, track mZm\in\mathbb Z turns to test framing quantization.


C.4 Surface Ordering & Wilson Lines

We implement the non-Abelian surface-ordered exponential via a dual spanning tree.

  1. Choose basepoint x0Γ+x_0\in\Gamma_+.

  2. Build a spanning tree TT on the dual graph G\*G^\* (faces as nodes).

  3. For each face ff, define a dual path πf\pi_f from base to ff.

  4. Wilson line: Wf=eπfUeW_f=\prod_{e\in \pi_f} U_e (ordered), where Ue=Pexp ⁣eAU_e=\mathcal P\exp\!\int_e A on primal edges intersected by the dual step (or use geodesic connectors).

  5. Face curvature: Vf=exp ⁣(fF)V_f=\exp\!\left(\int_{f} F\right) via quadrature.

  6. Ordered product: fT(Wf1VfWf)\overrightarrow{\prod_{f\in T}} (W_f^{-1} V_f W_f) in any parent-to-child traversal.

Gauge note: Result is basepoint-conjugate; extract invariants via tr\operatorname{tr}, argdet\arg\det, principal eigenphase.

Stability tip: Use Lie-group integrators (Magnus Ω2\Omega_2 / Cayley) for small-area faces; avoid naive expm of large matrices if FF is stiff—subdivide the face.


C.5 Error Models (rules of thumb)

Let hsL/Nsh_s\sim L/N_s, huw/Nuh_u\sim w/N_u, hmax(hs,hu)h\sim\max(h_s,h_u). Assume FF, AA C2C^2-smooth across the belt.

C.5.1 Abelian

  • Edges (Simpson): global error O(hs4)O(h_s^4).

  • Surface (GL 2×22\times2): global error O(h4)O(h^4).

  • Thin-belt truncation: O ⁣((κw)2+Fw2)O\!\big((\kappa w)^2 + \|\nabla_\perp F\|\,w^2\big).

C.5.2 Non-Abelian

  • Face transport (Magnus Ω2\Omega_2): local O(h3FF)O(h^3\|F\|\,\|\nabla F\|); global O(h2)O(h^2).

  • Tree ordering error: zero under exact algebra; numerically O(ϵmachNf)O(\epsilon_{\text{mach}} N_f).

  • Overall: with GL 3×33\times3 + Ω2\Omega_2 on faces, expect O(h3)+O((κw)2)\sim O(h^3)+O((\kappa w)^2).

C.5.3 Twist

  • Midpoint angle accumulation: O(hs2)O(h_s^2).

  • With cubic spline for u(s)\mathbf u(s): O(hs4)O(h_s^4).


C.6 Complexity & Memory

Let K=NfK=N_f faces, E±E^\pm boundary links, group GU(k)G\subseteq U(k).

C.6.1 Cost components

  • Edge holonomy (per edge): expm along segment or product of links
    O(k3)\Rightarrow O(k^3) per segment; total O((E++E)k3)O((E^++E^-)\,k^3).

  • Wilson lines WfW_f: one matrix multiply per dual step
    O(Kk3)\Rightarrow O(K\,k^3) for tree traversal.

  • Face curvature VfV_f: quadrature samples qq each; if expm per face: O(qk3)O(q\,k^3).

  • Surface-ordered product: K1K-1 multiplies O(Kk3)O(K\,k^3).

Total (reference pipeline):

TO ⁣((E++E+K+qK)k3)O(qKk3).T \approx O\!\big((E^++E^- + K + qK)\,k^3\big) \sim O(qK\,k^3).

Memory: store Wf,VfW_f,V_f optionally; minimal O(k2)O(k^2) working set + mesh; cached WfW_f is O(Kk2)O(K\,k^2).

C.6.2 Parallelism

  • Compute VfV_f in parallel; compute WfW_f by parallel BFS levels on TT; reduce products by a tree-reduction (associative multiply).

C.6.3 Streaming update

If FF changes slowly in time, reuse WfW_f and only update Vf(t)V_f(t). Cost per step O(qKk3)O(qK\,k^3).


C.7 Reference Algorithms (pseudocode)

C.7.1 Edge holonomy (U(k), composite Simpson)

function EdgeHolonomy(edge Γ, A, p=4):
  subdivide Γ into M segments with arc-length step h_s
  H = I_k
  for seg in segments:
    if p==2: Abar = A(midpoint(seg))
    if p==4: Abar = SimpsonAverage(A, seg)   // 3 samples
    H = H * expm( Abar * length(seg) )
  return H

C.7.2 Surface-ordered exponential (dual-tree Magnus)

function BeltSurfaceOrderedExp(mesh, A, F):
  x0 = pick_basepoint_on(GammaPlus)
  T = dual_spanning_tree(mesh)
  W[root] = I_k
  // Wilson lines along dual tree edges
  for f in BFS(T):
    if f != root:
      e = dual_edge_connecting(parent(f), f)
      W[f] = W[parent(f)] * EdgeTransportAcross(e, A)   // expm of line integral

  // face curvatures via Magnus Ω2 on each face with q-point quadrature
  for f in Faces(mesh) parallel:
    V[f] = MagnusFaceExp(f, F, q)

  // ordered product (parent->child)
  S = I_k
  for f in DFS(T):
    S = S * ( W[f]^{-1} * V[f] * W[f] )
  return S

C.7.3 Twist

function Twist(r, u):
  unwrap angle φ along s using atan2 on successive u's
  return (φ(L) - φ(0)) / (2π)

C.8 Error & Stability Tables

C.8.1 Quadrature & integrators

Component Method Order Notes
Edge integral A\oint A Midpoint 2 Fast, robust

Composite Simpson 4 Recommended default

Gauss–Legendre (p=4) 4 Fewer samples for smooth AA
Face integral F\iint F (rect) GL 2×22\times2 4 Default

GL 3×33\times3 6 For high curvature
Face integral (tri) Dunavant-5 5 Balanced cost

Dunavant-7 7 High accuracy
Lie update (face) Magnus Ω2\Omega_2 3 (local) Good trade-off

BCH (Trotter split) 2 Simple, more steps

Exact expm on averaged FF Acceptable if face small

C.8.2 Error budget (smooth fields)

εtotal    C1hp  +  C2(κw)2  +  C3Fw2  +  C4ϵmachK.\varepsilon_{\text{total}} \;\lesssim\; C_1 h^{p} \;+\; C_2 (\kappa w)^2 \;+\; C_3 \|\nabla_\perp F\| w^2 \;+\; C_4\,\epsilon_{\text{mach}}K.
  • Targeting 10310^{-3}: pick p4p\ge 4, h101.5min{Rc,1/F}h\approx 10^{-1.5}\min\{R_c, 1/\sqrt{\|F\|}\}, Nu8N_u\ge 8, ensure κw0.1\kappa w\le 0.1.


C.9 Diagnostics & Unit Tests (numerical)

  1. Constant curvature test. Synthetic F=F0F=F_0:
    Expect Hol(Γ+)Hol(Γ)1exp(F0area)\mathrm{Hol}(\Gamma_+)\mathrm{Hol}(\Gamma_-)^{-1} \approx \exp(F_0\cdot \text{area}); error follows surface rule.

  2. Width scaling. Scale wλww\rightarrow \lambda w (small λ\lambda): edge-gap λ\propto \lambda; residual O((κw)2)O((\kappa w)^2).

  3. 4π\pi periodicity. Rotate frame by 4π4\pi: invariants unchanged; 2π2\pi may flip sign for spinor-like sectors if α2πZ\alpha\notin 2\pi\mathbb Z.

  4. Ordering invariance. Change dual spanning tree: invariants (tr\operatorname{tr}, argdet\arg\det) stable within numeric tolerance.

  5. Boundary consistency. Directly computed Γ+AΓA\oint_{\Gamma_+}A - \oint_{\Gamma_-}A (Abelian) equals surface integral within error model.


C.10 Practical Presets

Scenario NsN_s NuN_u Edge rule Face rule Lie update
Smooth, thin belt 256 8 Simpson GL 2×22\times2 Magnus Ω2\Omega_2
High curvature along ss 512 8–12 GL p=4 GL 3×33\times3 Magnus Ω2\Omega_2
Rough FF (but bounded) 512 12 GL p=4 Dunavant-7 BCH (more splits)
Fast preview 128 6 Midpoint GL 2×22\times2 Averaged expm

C.11 Numerical Hygiene

  • Arc-length reparameterize r(s)\mathbf r(s) before meshing; keeps step uniform.

  • Director orthogonality: re-orthonormalize (t,u,b)(\mathbf t,\mathbf u,\mathbf b) each step.

  • Unwrap angles for Tw\mathrm{Tw}; avoid branch cuts.

  • Conditioning: scale matrices so Ahs0.1\|A\|\,h_s\lesssim 0.1, Farea(face)0.1\|F\|\text{area(face)}\lesssim 0.1; otherwise subdivide.

  • Conservation checks: track det\det drift in U(k)U(k); renormalize via polar decomposition if needed.

  • Mixed precision: compute quadrature in double; accumulate group products in double or long-double.


C.12 Optional: Writhe (if needed)

Discrete double-sum (O(Ns2N_s^2)) for Wr\mathrm{Wr}; use segment–segment Gauss integral. For Ns>2000N_s>2000, accelerate with Barnes–Hut / FMM to O(NslogNs)O(N_s\log N_s). This is not required for FBHL but useful for belt topology audits.


C.13 Minimal API Sketch

HolonomyResult BeltHolonomy(BeltMesh B, GaugeField A, Curvature F, Options opt);
// returns {Hol_plus, Hol_minus, Sexp, Tw, invariants, diagnostics}

Options: integrator orders, mesh densities, basepoint policy, dual-tree builder, precision, validation toggles.


One-page recap (for implementers)

  • Mesh the annulus; orient faces; build a dual spanning tree.

  • Compute edge holonomies (Simpson/GL).

  • Compute Wilson lines along the dual tree.

  • Integrate face curvatures with Gauss rules; update via Magnus/BCH.

  • Multiply Wf1VfWfW_f^{-1} V_f W_f in parent-to-child order.

  • Multiply framing eiαTwe^{i\alpha\mathrm{Tw}}.

  • Validate with constant-FF, width-scaling, 4π4\pi tests.

End of Appendix C.

 

Appendix D — Exercises & Mini-Projects (30)

Each item lists goal → task → solution outline → unit-test(s). Keep implementations minimal; prefer invariants (trace/argdet) for non-Abelian cases.


Track I — Geometry, Orientation, and Identities (1–8)

1) Belt orientation sanity

  • Task: For a planar annulus with constant normal, prove B=Γ+(Γ)\partial\mathcal B=\Gamma_+\sqcup(-\Gamma_-).

  • Outline: Apply right-hand rule; parametrize both edges by increasing ss; check induced co-normal.

  • Tests: Numerically integrate a constant 1-form A=A0dlA=A_0\,dl: assert Γ+AΓA=A0(perim+perim)\oint_{\Gamma_+}A-\oint_{\Gamma_-}A= A_0\cdot(\text{perim}_+ - \text{perim}_-).

2) Two-boundary Stokes (Abelian)

  • Task: Verify Γ+ ⁣AΓ ⁣A=B ⁣F\oint_{\Gamma_+}\!A-\oint_{\Gamma_-}\!A=\iint_{\mathcal B}\!F for A=12(ydx+xdy)A=\tfrac12(-y\,dx+x\,dy).

  • Outline: F=dA=dxdyF=dA=dx\wedge dy. RHS = area; LHS = circulation difference.

  • Tests: Mesh-refine; error should be O(hp)O(h^p) for chosen quadrature.

3) Two-boundary Gauss on surfaces

  • Task: On a spherical belt (latitude θ[θ1,θ2]\theta\in[\theta_1,\theta_2]), verify surface divergence theorem.

  • Outline: Use spherical coordinates; compute co-normal terms at the two latitudes.

  • Tests: Compare analytic vs. discrete intrinsic divergence.

4) Twist of a circular ribbon

  • Task: Circle of radius RR; director rotates by ϕ(s)=ms/R\phi(s)=m\,s/R. Compute Tw\mathrm{Tw}.

  • Outline: Tw=12π02πRϕ(s)ds=m\mathrm{Tw}=\frac{1}{2\pi}\int_0^{2\pi R}\phi'(s)\,ds=m.

  • Tests: Discrete estimator across NsN_s samples recovers integer mm up to O(Ns2)O(N_s^{-2}).

5) Linking = Tw + Wr (planar case)

  • Task: For a planar ribbon (Wr=0), show Lk=TwZ\mathrm{Lk}=\mathrm{Tw}\in\mathbb Z.

  • Outline: Planarity kills writhe; Lk equals director turns.

  • Tests: Count crossings between Γ±\Gamma_\pm in a polygonal model; compare to discrete Tw\mathrm{Tw}.

6) 4π\pi periodicity check

  • Task: Rotate the frame by 2π2\pi and 4π4\pi; track observables.

  • Outline: TwTw+1\mathrm{Tw}\mapsto\mathrm{Tw}+1 per 2π2\pi; invariants unchanged after 4π4\pi if α2πZ\alpha\in2\pi\mathbb Z.

  • Tests: Assert invariants equal after 4π4\pi; log nontrivial phase after 2π2\pi if α2πZ\alpha\notin2\pi\mathbb Z.

7) Thin-belt metric

  • Task: Derive gdiag((1κu)2,1)g\approx\mathrm{diag}((1-\kappa u)^2,1) and the O((κw)2)O((\kappa w)^2) error.

  • Outline: First-order expansion of offset curve; neglect terms u2κu^2\kappa', u2κ2u^2\kappa^2.

  • Tests: Numerically estimate area vs. ww; fit residual to w3w^3 trend.

8) Basepoint conjugacy

  • Task: Show belt holonomy is conjugate-variant; traces are invariant.

  • Outline: Change Wilson-line fan; surface-ordered product changes by global conjugation.

  • Tests: Compute with two dual trees; assert tr\operatorname{tr} and argdet\arg\det match within tolerance.


Track II — Abelian & Non-Abelian Computation (9–16)

9) Constant curvature field

  • Task: F=F0F=F_0 (matrix commuting with itself). Compute SeF\mathcal S e^{\iint F}.

  • Outline: Ordering trivial → exp(F0area)\exp(F_0\,\text{area}).

  • Tests: Compare to numerics for varying meshes.

10) Non-Abelian bump

  • Task: F(x)=U1(x)F0U(x)F(x)=U^{-1}(x)F_0U(x) with non-constant UU.

  • Outline: Transport by W1FWW^{-1}FW returns F0F_0; result equals exp(F0area)\exp(F_0\,\text{area}).

  • Tests: Vary UU; invariants independent of chosen UU.

11) Edge vs. surface computation (Abelian)

  • Task: Compute LHS and RHS of two-boundary Stokes and compare.

  • Outline: Use Simpson on edges, GL 3×33\times3 on faces.

  • Tests: Convergence study; Richardson extrapolation matches order.

12) Discrete twist robustness

  • Task: Compare three twist estimators (midpoint, quaternion, spline).

  • Outline: All converge to same integer on smooth inputs.

  • Tests: Inject noise; verify estimator stability and variance.

13) Ordering invariance

  • Task: Evaluate surface-ordered exponential with multiple dual spanning trees.

  • Outline: Parent-to-child order differs by conjugations/local commutators of higher order.

  • Tests: Assert invariant mismatch <5104< 5\cdot10^{-4} for target mesh.

14) Lie integration choices

  • Task: Compare BCH split vs. Magnus Ω2\Omega_2 vs. exp(average FF).

  • Outline: Ω2\Omega_2 dominates for smooth FF; BCH needs more splits.

  • Tests: Time vs. error table; pick default threshold for face subdivision.

15) Width scaling law

  • Task: For smooth FF, verify edge-gap w\propto w at small ww.

  • Outline: Transverse average yields linear term; quadratic correction from curvature.

  • Tests: Fit line for w[103,101]w\in[10^{-3},10^{-1}]; slope stability > 0.99 R2R^2.

16) Gluing (cobordism) test

  • Task: Split belt into two annuli; compute each and glue.

  • Outline: Share the middle boundary with inverse orientation; holonomies multiply.

  • Tests: Holwhole\mathrm{Hol}_{whole} equals product up to tolerance; twists add.


Track III — Topology & Limits (17–22)

17) Möbius cautionary

  • Task: Show why two-boundary formula fails for a Möbius strip.

  • Outline: Non-orientable; boundary is a single loop; requires doubled traversal.

  • Tests: Attempt code shows sign inconsistency; unit test expects failure flag.

18) Defects and punctures

  • Task: Remove a disk from B\mathcal B; add an inner boundary Γ0\Gamma_0.

  • Outline: Two-boundary Stokes generalizes to sum over all boundary components.

  • Tests: Verify edge integrals=F\sum \text{edge integrals}=\iint F.

19) Large-width correction

  • Task: Empirically estimate breakdown of thin-belt law vs. κw\kappa w.

  • Outline: Increase ww; fit error to c2(κw)2+c3(κw)3c_2(\kappa w)^2+c_3(\kappa w)^3.

  • Tests: Report critical κw\kappa w where error > 1e-2.

20) High-curvature hotspot

  • Task: Localize a region with large F\|F\|; adaptively refine.

  • Outline: Indicator ηf=Farea(f)\eta_f=\|F\|\,\text{area}(f); split faces with ηf>τ\eta_f>\tau.

  • Tests: Error vs. DOF curve shows optimal slope.

21) Writhe audit (optional)

  • Task: Compute Wr\mathrm{Wr} for a perturbed 3D centerline; check Lk=Tw+Wr\mathrm{Lk}=\mathrm{Tw}+\mathrm{Wr}.

  • Outline: Segment–segment Gauss integral; stabilize with softening.

  • Tests: Integer Lk from edge crossings equals sum.

22) Random gauge smoothing

  • Task: Apply random gauge g(x)g(x); recompute.

  • Outline: Belt holonomy conjugates; invariants unchanged.

  • Tests: Property-based test over random seeds.


Track IV — Applied Numerics & Signal Models (23–27)

23) Constant-field calibrator

  • Task: Build a CLI that, given belt geometry, returns area-scaled exponential for constant FF.

  • Outline: Closed-form path; use to validate pipelines.

  • Tests: Golden files for multiple geometries.

24) Noisy sampling

  • Task: Sample A,FA,F with additive noise; evaluate bias of invariants.

  • Outline: Show invariants are first-order unbiased if noise is zero-mean.

  • Tests: Monte-Carlo: mean error ∼ 0; variance shrinks as 1/n1/n.

25) Time-varying field (Faraday-like)

  • Task: Simulate F(t)F(t) with tF0\partial_tF\neq0; measure rate of change of edge gap.

  • Outline: Discrete time derivative approximates “EMF” across edges.

  • Tests: Convergence under Δt0\Delta t\to0.

26) Discretization audit tool

  • Task: Build a report (mesh stats, quadrature order, residuals, invariants).

  • Outline: Centralize checks from C.9; produce a pass/fail summary.

  • Tests: Ensure failing any invariant flips exit code.

27) Benchmark suite

  • Task: Implement three public tests: 4π4\pi, width-scaling, constant FF.

  • Outline: Emit JSON logs with curves and tolerances.

  • Tests: CI gate enforces 1e ⁣3\le 1e\!-3 target.


Track V — Mini-Projects (28–30)

28) Reference implementation (minimal API)

  • Goal: End-to-end U(k) belt holonomy with framing.

  • Outline: Mesh annulus → dual tree → Wilson lines → face Magnus → ordered product → framing eiαTwe^{i\alpha \mathrm{Tw}}.

  • Tests:

    • Invariant: trace equality under tree swap.

    • Stokes: Abelian case equals surface flux.

    • 4π: invariants unchanged after 4π4\pi frame rotation.

29) Adaptive belt tiler

  • Goal: Given arbitrary centerline and width, generate high-quality meshes respecting curvature.

  • Outline: Arc-length parametrization; set hsmin(Rc,c/F)h_s\sim \min(R_c, c/\sqrt{\|F\|}); enforce Nu8N_u\ge 8.

  • Tests: Error vs. DOF monotone; topology preserved (no edge crossings).

30) Holonomy composition & logging

  • Goal: Glue two belts along a shared boundary and audit composition.

  • Outline: Compute (Γ+(1)Γ(1))(\Gamma_+^{(1)}\Gamma_-^{(1)}) and (Γ+(2)Γ(2))(\Gamma_+^{(2)}\Gamma_-^{(2)}); compose; compare to single-belt computation.

  • Tests:

    • Composition: H12H1H2ϵ\|H_{12}-H_1H_2\|\le \epsilon.

    • Twist additivity: Tw12=Tw1+Tw2\mathrm{Tw}_{12}=\mathrm{Tw}_1+\mathrm{Tw}_2.

    • Ordering invariance: traces stable across different glue paths.


Solution Outlines (compact keys)

  • S1 (Two-boundary Stokes/Gauss): Reduce to classical theorems with induced boundary Γ+(Γ)\Gamma_+\sqcup(-\Gamma_-); the minus sign comes from co-normal reversal on the inner edge.

  • S2 (FBHL core): Boundary factorization Γ+Γ1\Gamma_+\cdot\Gamma_-^{-1} + non-Abelian Stokes via dual-tree Wilson transport + scalar framing holonomy eiαTwe^{i\alpha\,\mathrm{Tw}}.

  • S3 (Framing quantization): Director relabeling adds integer mm to Tw\mathrm{Tw}; physical framing-independence α2πZ\Rightarrow \alpha\in2\pi\mathbb Z.

  • S4 (Thin-belt error): Transverse Taylor expansion yields O((κw)2)+O(Fw2)O((\kappa w)^2)+O(\|\nabla_\perp F\|w^2) corrections.

  • S5 (Ordering/basepoint): Changes act by global conjugation; invariants from class functions (tr\operatorname{tr}, argdet\arg\det) are stable.

  • S6 (Gluing): Interior boundaries cancel; products of holonomies and sums of twists implement cobordism additivity.


Unit-Test Templates (pseudocode)

test TwoBoundaryStokes_Abelian():
  A, F = pickAbelianPotential()
  LHS = lineIntegral(GammaPlus, A) - lineIntegral(GammaMinus, A)
  RHS = surfaceIntegral(Belt, F)
  assert abs(LHS - RHS) <= c1 * h^p + c2 * w^2

test FBHL_Invariants_NonAbelian():
  Hgap = Hol(GammaPlus, A) * inv(Hol(GammaMinus, A))
  Sexp = SurfaceOrderedExp(Belt, A, F)
  phase = exp(i * alpha * Twist(r, u))
  inv1 = argdet(Hgap); inv2 = argdet(Sexp) + alpha * Twist(...)
  assert approxEqual(inv1, inv2, tol=1e-3)

test Basepoint_Conjugacy():
  S1 = SurfaceOrderedExp_withTree(T1)
  S2 = SurfaceOrderedExp_withTree(T2)
  assert approxEqual(trace(S1), trace(S2), tol=1e-6)

test FourPi_Periodicity():
  Tw0 = Twist(u)
  Tw4 = Twist(rotateDirector(u, 4*pi))
  H0 = invariants(...)
  H4 = invariants(...)
  assert Tw4 == Tw0 + 2
  assert approxEqual(H0, H4, tol=1e-6)

test WidthScaling():
  for λ in {0.25, 0.5, 1.0}:
    wλ = λ * w0
    gap[λ] = edgeGap(A, wλ)
  assert LinearFit(λ -> gap[λ]).R2 >= 0.99

test Gluing_Composition():
  H1, Tw1 = BeltHolonomy(B1)
  H2, Tw2 = BeltHolonomy(B2)
  H12, Tw12 = BeltHolonomy(glue(B1,B2))
  assert approxEqual(trace(H12), trace(H1*H2), tol=1e-3)
  assert approxEqual(Tw12, Tw1 + Tw2, tol=1e-6)

Instructor Notes

  • Keep each exercise self-contained; provide minimal starter code (mesh + quadrature).

  • Grade primarily on invariant checks and error analysis, not only raw numbers.

  • Encourage students to attach short failure diaries when a test breaks (mesh, ordering, or gauge issues).

End of Appendix D.

 

Appendix E — Quick-Start One-Pager (core equations)

Belt domain B\mathcal B oriented annulus with boundary

B=Γ+(Γ)(outer minus inner).\boxed{\partial\mathcal B=\Gamma_{+}\,\sqcup\,(-\Gamma_{-})}\quad\text{(outer minus inner)} .

Edges (from centerline r(s)\mathbf r(s) and director u(s)t\mathbf u(s)\perp\mathbf t)

Γ±(s)=r(s)±w2u(s),t=sr,  b=t×u.\Gamma_\pm(s)=\mathbf r(s)\pm \tfrac{w}{2}\,\mathbf u(s),\qquad \mathbf t=\partial_s\mathbf r,\ \ \mathbf b=\mathbf t\times\mathbf u .

Belt chart (thin ribbon κw1\kappa w\ll1)

X(s,u)=r(s)+uu(s),u[w2,w2],g((1κu)2001).\mathbf X(s,u)=\mathbf r(s)+u\,\mathbf u(s),\quad u\in[-\tfrac w2,\tfrac w2],\qquad g\approx\begin{pmatrix}(1-\kappa u)^2&0\\[2pt]0&1\end{pmatrix}.

Integral theorems (two-boundary forms)

Abelian Stokes (edge gap = surface flux)

Γ+ ⁣AΓ ⁣A=B ⁣F(A 1-form, F=dA).\boxed{\oint_{\Gamma_+}\!A-\oint_{\Gamma_-}\!A=\iint_{\mathcal B}\!F}\quad(A\ \text{1-form},\ F=dA).

Surface Gauss (intrinsic divergence)

B ⁣B ⁣vdS=Γ+ ⁣v ⁣ ⁣νdlΓ ⁣v ⁣ ⁣νdl.\boxed{\iint_{\mathcal B}\nabla_{\!\mathcal B}\!\cdot\mathbf v\,dS =\oint_{\Gamma_+}\!\mathbf v\!\cdot\!\boldsymbol\nu\,dl -\oint_{\Gamma_-}\!\mathbf v\!\cdot\!\boldsymbol\nu\,dl } .

Holonomy & FBHL (framed belt holonomy law)

Edge holonomy

Hol(Γ)=Pexp ⁣ΓAG.\mathrm{Hol}(\Gamma)=\mathcal P\exp\!\oint_\Gamma A \in G.

Surface-ordered exponential (with Wilson transport WW)

Sexp ⁣BW1FWdS.\mathcal S\exp\!\iint_{\mathcal B} W^{-1}FW\,dS .

Framing (twist)

Tw=12π0L(t×u)su  ds.\boxed{\mathrm{Tw}=\frac{1}{2\pi}\int_0^L(\mathbf t\times\mathbf u)\cdot\partial_s\mathbf u\;ds } .

FBHL (non-Abelian curvature × scalar framing)

 Hol(Γ+)Hol(Γ)1=Sexp ⁣BW1FWdS    eiαTw .\boxed{\ \mathrm{Hol}(\Gamma_+)\,\mathrm{Hol}(\Gamma_-)^{-1} =\mathcal S\exp\!\iint_{\mathcal B} W^{-1}FW\,dS\;\cdot\;e^{\,i\alpha\,\mathrm{Tw}}\ } .

Topology & quantization

Link–twist–writhe (Călugăreanu–White–Fuller)

Lk(Γ+,Γ)=Tw+Wr,Wr=14π ⁣ ⁣(sr×sr)(rr)rr3dsds.\boxed{\mathrm{Lk}(\Gamma_+,\Gamma_-)=\mathrm{Tw}+\mathrm{Wr}}, \quad \mathrm{Wr}=\frac{1}{4\pi}\!\!\iint\frac{(\partial_s\mathbf r\times \partial_{s'}\mathbf r)\cdot(\mathbf r-\mathbf r')} {\|\mathbf r-\mathbf r'\|^3}\,ds\,ds'.

Framing relabeling

Tw[u]Tw[u]=mZ,eiαTweiα(Tw+m).\mathrm{Tw}[\mathbf u']-\mathrm{Tw}[\mathbf u]=m\in\mathbb Z,\qquad e^{i\alpha\,\mathrm{Tw}}\to e^{i\alpha(\mathrm{Tw}+m)}.

Framing-independence requires α2πZ\alpha\in2\pi\mathbb Z.

4π\pi periodicity: a 4π4\pi frame rotation leaves physical invariants unchanged.


Discrete (implementation-ready) forms

Lattice Stokes / discrete FBHL (faces ff, dual tree, VfefFV_f\approx e^{\int_f F})

 eΓ+Ue(eΓUe)1=f(Wf1VfWf)  eiαTw .\boxed{\ \prod_{e\in\Gamma_+}U_e\Big(\prod_{e\in\Gamma_-}U_e\Big)^{-1} =\overrightarrow{\prod_{f}} (W_f^{-1}V_f W_f)\ \cdot\ e^{\,i\alpha\,\mathrm{Tw}}\ } .

Invariant for testing (U(k), normalized)

 1kargdet ⁣(Hol(Γ+)Hol(Γ)1)=1kargdet ⁣(SeW1FW)+αTw  (mod 2π) .\boxed{\ \frac{1}{k}\arg\det\!\Big(\mathrm{Hol}(\Gamma_+)\mathrm{Hol}(\Gamma_-)^{-1}\Big) =\frac{1}{k}\arg\det\!\Big(\mathcal S e^{\iint W^{-1}FW}\Big)+\alpha\,\mathrm{Tw}\ \ (\mathrm{mod}\ 2\pi)\ } .

Thin-belt & scaling heuristics

Width scaling (Abelian, smooth FF)

Γ+ ⁣AΓ ⁣A=w ⁣0Lfˉ(s)ds  +  O ⁣((κw)2+Fw2),\oint_{\Gamma_+}\!A-\oint_{\Gamma_-}\!A = w\!\int_0^L \bar f(s)\,ds\;+\;O\!\big((\kappa w)^2+\|\nabla_\perp F\|\,w^2\big),

where fˉ\bar f is the transverse average of flux density.

Error budget (typical numeric pipeline)

ε    C1hp+C2(κw)2+C3Fw2.\varepsilon \;\lesssim\; C_1 h^{p} + C_2(\kappa w)^2 + C_3\|\nabla_\perp F\|\,w^2 .

Composition, gauge, orientation

Gluing annuli (cobordism additivity)

SeB1B2 ⁣= ⁣(SeB1)(SeB2),Tw12=Tw1+Tw2.\mathcal S e^{\iint_{\mathcal B_1\cup\mathcal B_2}}\!=\!(\mathcal S e^{\iint_{\mathcal B_1}})(\mathcal S e^{\iint_{\mathcal B_2}}),\qquad \mathrm{Tw}_{12}=\mathrm{Tw}_1+\mathrm{Tw}_2.

Basepoint/ordering change

Se  g1(Se)g,class-function invariants (trace, argdet) unchanged.\mathcal S e^{\iint} \ \mapsto\ g^{-1}\big(\mathcal S e^{\iint}\big)g, \quad \text{class-function invariants (trace, }\arg\det\text{) unchanged.}

One-line checklist (compute & verify)

Mesh annulus → build dual tree → edge holonomies → face curvatures → ordered product → multiply eiαTwe^{i\alpha\mathrm{Tw}} → check Stokes, argdet identity, width linearity, 4π\pi.

 

 

 

 © 2025 Danny Yeung. All rights reserved. 版权所有 不得转载

 

Disclaimer

This book is the product of a collaboration between the author and OpenAI's GPT-5 language model. While every effort has been made to ensure accuracy, clarity, and insight, the content is generated with the assistance of artificial intelligence and may contain factual, interpretive, or mathematical errors. Readers are encouraged to approach the ideas with critical thinking and to consult primary scientific literature where appropriate.

This work is speculative, interdisciplinary, and exploratory in nature. It bridges metaphysics, physics, and organizational theory to propose a novel conceptual framework—not a definitive scientific theory. As such, it invites dialogue, challenge, and refinement.


I am merely a midwife of knowledge.

 

No comments:

Post a Comment