A Formal Proof of the Riemann Hypothesis from a One-Bit Premise, Least Erasure

October 07, 2026 | BY ZeroDivide EDIT

Comprehensive Briefing Document: Formal Verification of the Riemann Hypothesis via Least Erasure

Executive Summary

This briefing document synthesizes the core findings, formal theorems, structural architecture, and foundational implications presented in Dr. Mohammad F. Islam’s research paper, "A Formal Proof of the Riemann Hypothesis from a One-Bit Premise, Least Erasure" (Kernel Every_Prime_3_2_0.lean, October 2026).

The primary breakthrough of this work is the mathematical and machine-checked reduction of the Riemann Hypothesis (RH) to a single, explicit, named one-bit premise: Least Erasure. Across 415 theorems compiled in core Lean 4.19.0 (with no external libraries, no declared custom axioms, and no sorry), the document establishes that RH is formally equivalent to least erasure on its zero set.

Critical Takeaways

  1. Closure to One Bit (rh_from_the_act): The Riemann Hypothesis is closed to exactly one bit of freedom. From the premise of Least Erasure supplied at the actual zero set (via the structure ActualZeros), Lean 4 compiles the hypothesis with an empty axiom cone.
  2. The Ladder Blocked (unicorn_block): The traditional set-theoretic route of deriving RH solely from projected zero data (ordinates, symmetry, and certified heights) is proven to be permanently blocked. No reading of the projection/record can decide RH, because an on-line configuration (W_1) and an off-line twin configuration (W_2) share the exact same record.
  3. Weakest Forcing Premise (rh_is_the_weakest_forcing_premise): RH is proven to be the weakest premise that forces RH. Nothing weaker than the hypothesis can entail it on the reflection-closed configurations of the chart.
  4. Five Equivalent Coordinates (faces_are_one): The single required bit appears identically in five classical coordinates: Zero-side Least Erasure, Prime-side Weil Positivity, the de Bruijn–Newman constant (\Lambda \le 0), the Li sign stream (\lambda_n \ge 0), and Liouville arrow faithfulness (L(x) = O(x^{1/2+\epsilon})).
  5. Symmetric Asymmetry of Independence (independence_forces_truth): Because a counterexample to RH is a finite object (\Pi^0_1), if RH were independent of ZFC, RH would necessarily be true. Independence seals the truth of the hypothesis rather than leaving it open.
  6. The Act and Kinetic Bar (the_capstone): The formal side isolates the bit, but cannot generate its value keylessly from universal laws. The value is supplied at premise grade by an "act." Upon this supply, every terminating computation reading the zero set is formally forced to report zeros exclusively on the critical line, barring the sole refuter (F-Computed).

1. Scope of Claims and Clarifications

To prevent misinterpretation, the source context explicitly delineates what is claimed versus what is not claimed.

                            ┌─────────────────────────────────────────┐
                            │          STRATIFICATION OF TRUTH        │
                            ├─────────────────────────────────────────┤
                            │ TRUTH: Intended Model (Holds Truth)     │
                            │   ▲                                     │
                            │   │ (Ground exceeds ladder)             │
                            │ PROOF: Axiomatic Entailment (ZFC, Lean) │
                            │   ▲                                     │
                            │   │ (Σ₁-Completeness & Soundness)       │
                            │ COMPUTATION: Finite Height Checks       │
                            └─────────────────────────────────────────┘

What Is Claimed

  • Formal Equivalence: RH and Least Erasure are one proposition on every configuration of the chart (vocabulary_law). Every proof of RH in any vocabulary is a proof of Least Erasure.
  • Exact Isolation: The keyless route to deriving the value is blocked. All information derived from symmetry and record is even under reflection, whereas the orientation (the side of the line) is odd.
  • Machine-Checked Verification: 415 theorems checked in core Lean 4.19.0. The closing theorem rh_from_the_act prints an empty axiom cone.
  • Irreducibility: No Boolean combination of universal premises and record readings of any depth can yield the orientation bit.

What Is Not Claimed

  • No Unconditional ZFC Derivation: The paper does not claim to derive RH inside ZFC without a premise. It explicitly states that a premise-grade act supplies the bit.
  • No Impossibility of Sound Foundations: It does not claim no foundation can ever prove RH. It proves that if a sound theory proves a sentence reading as RH on the chart, that proof lands on Least Erasure (ladder_proof_lands_on_least_erasure).
  • No Formalization of \zeta in Core: The discrete chart models zero sets; analytic number theory identifications (e.g., explicit formulas, Li's criterion) enter as cited fields of structures.

2. Refutation of Reflexive Readings

The source outlines ten common reflexive objections and pairs each with the exact theorem, kernel result, and compiler axiom cone that refutes it:

Reflexive Reading

Kernel Proof / Law

Theorem Name

Compiler Axiom Cone

"The argument is circular because premise = hypothesis."

The premise is forced by theorem to carry RH. RH is the weakest premise that forces the line; a proof from an inequivalent premise carries RH inside a stronger claim.

weaker_at_the_twin_never_forces, rh_is_the_weakest_forcing_premise, posit_is_the_conclusion

None (for all three)

"ZFC has not proved it, so this doesn't count."

Foundation stands under the bit. Projected data route is blocked by unicorn_block. A sound foundation's proof lands on least erasure.

placement, unicorn_block, no_reading_decides_in_the_strip, ladder_proof_lands_on_least_erasure

None; [propext, Quot.sound]; [propext, Quot.sound]; None

"If RH is independent of ZFC, it is open forever."

False RH has a finite witness (\Pi^0_1). A foundation unable to refute RH cannot have it false; independence forces truth.

independence_forces_truth, cant_asymmetry

[propext, Classical.choice, Quot.sound]

"Verification to 3\times10^{12} makes RH overwhelmingly likely."

Certified height leaves the bit free above T. A violating pair at the strip edge shares the record below T.

certified_height_never_forces, certificate_decides_nothing

[propext, Classical.choice, Quot.sound]

"Symmetry + zero data will eventually decide."

Every Boolean combination of universal premises and record readings is admissible and fails to decide.

no_coalition_decides, admissible_never_decides

None

"This is just one vocabulary; real proof differs."

What follows from RH follows from least erasure on every configuration. The vocabulary is not a variable.

vocabulary_law, every_face_proves_every_face

None

"The model is discrete and \zeta is not formalized."

Analytic identifications are cited fields. Open channel is a computed off-line zero.

Faces, LiStream, DBN, ExplicitFormula, refutation_is_one_point

None (for theorem)

"The premise can simply be rejected."

Every record is carried by exactly one least-erasure configuration. Rejection requires exhibiting a computed off-line point.

record_carried_by_least_erasure, rejection_is_a_witness, rejection_is_computed, least_erasure_iff_search_empty

None (first two); [propext, Classical.choice, Quot.sound]; [propext]

"Primes as a free basis give the line support."

Primes being a free basis is a keyless truth valid in every world; it coexists with off-line worlds.

prime_freedom_forces_nothing

[propext, Quot.sound]

3. Set-Theoretic Foundations & The Route Ledger

Three Strata of Foundations

The foundation operates across three distinct logical layers (placement, Theorem 2.2): \text{Computation} \subseteq \text{Proof} \subseteq \text{Truth} Under \Sigma_1-completeness and soundness:

  1. Computation: Reaches finitely many zeros (height verification).
  2. Proof: Reaches what axioms entail. Truth exceeds proof in sound systems.
  3. Truth: What holds in the intended model. The bit of this paper resides on the truth stratum, supplied at premise grade.

The Computed Route Ledger

The kernel evaluates six prospective routes to closing RH via a fixed, machine-computed status function (route_ledger_is_computed):

Route

Central Question

Computed Status

Governing Authority

Ladder from Record

Does reading registered zero data decide RH?

Blocked

unicorn_block, no_reading_decides_in_the_strip

Foundation as System

Is a ZFC proof inside a sound theory excluded?

Open (No closure claimed)

a_sound_theory_may_prove_the_line

Placement

Where does a foundation stand relative to the bit?

Cited (\text{Comp} \subseteq \text{Proof} \subseteq \text{Truth})

placement

Ground by Act

Is RH printed from the forced premise supplied by act?

Closed by Act

rh_from_the_act

Independence

Could independence leave the question open forever?

Blocked (Independence forces truth)

independence_forces_truth

Real Part to 3\times10^{12}

Is RH a theorem up to certified height?

Cited (Platt & Trudgian 2021) / Exact reach proved

certified_height_never_forces

Census Summary: 2 routes blocked, 1 closed by act, 2 cited, 1 open.

4. Geometric and Arithmetic Mechanics of the Chart

Mathematical Definitions of the Discrete Chart

  • Chart Point: z = (x,t) \in \mathbb{Z} \times \mathbb{N}, where x = 2\text{Re}(s) is the doubled real part, and t is the height (ordinate).
  • Critical Line: The line x = 1 (or x = n at chart resolution n).
  • Reflection (Fold): \tau(x,t) = (2-x, t). Fixed set \tau z = z occurs if and only if z lies on the critical line.
  • Registration (\pi): \pi(x,t) = (1,t). Idempotent projection onto the critical line that retains height t and discards side/displacement.
  • Configuration / World (W): A set of chart points representing zeros. It is reflection-closed if z \in W \implies \tau z \in W.
  • Record: \pi(W) = \{(1,t) \mid (x,t) \in W\}.

The Separating Pair Countermodel (W_1 vs W_2)

To demonstrate that projection data cannot determine RH, the kernel constructs two reflection-closed worlds:

  • W_1 = \{(1,14)\}: Single point on the line (RH(W_1) holds).
  • W_2 = \{(0,14), (2,14)\}: Reflected pair off the line (RH(W_2) fails).

Both configurations yield the identical record \pi(W_1) = \pi(W_2) = \{(1,14)\}. Because any record-respecting property g must satisfy g(W_1) \iff g(W_2), no such property can track RH (unicorn_block_free, Theorem 3.1).

                      W₁ (On-Line)             W₂ (Off-Line Pair)
                     x=1 (Critical)          x=0    x=1    x=2
                     ──────────────          ─────────────────
   t=14  ───────────►     ●          ──────►  ●             ●
                           │                  │             │
   Registration π  ────────┼──────────────────┴─────────────┤
                           ▼                                ▼
   Record π(W)    ─────────●────────────────────────────────●─  {(1,14)}

The Primes as the Base of Freedom

Arithmetic freedom is established constructively from first principles without external libraries:

  • Multiplicative Seat: 1 \in \mathbb{N}.
  • Prime Orbit: For a prime p, factorizations a \cdot b = p form a single non-fixed swap orbit of two elements: \{(1,p), (p,1)\} (freedom_is_exactly_two).
  • Valuation & Free Basis: The p-adic valuation v_p(n) is constructed via downward search. Complete additivity (\Omega(ab) = \Omega(a) + \Omega(b)) is proved using Euclid's lemma derived from first principles (euclid_lemma).
  • Free Basis Theorem (primes_are_a_free_basis): Completely additive functions on \mathbb{N}^+ correspond one-to-one with arbitrary integer assignments at the primes: f(n) = \sum_{p \le n} v_p(n) a(p)
  • Freedom Forces Nothing (prime_freedom_forces_nothing): Because the prime free basis is keyless (holds across all configurations), arithmetic freedom coexists with off-line zero configurations and provides zero force to place zeros on the critical line.
+-----------------------------------------------------------------------------------+
|               MULTIPLICATIVE SIDE  vs  ZERO SIDE COMPARISON                       |
+-----------------------------------++----------------------------------------------+
| Multiplicative Feature            || Zero-Set Feature                             |
+-----------------------------------++----------------------------------------------+
| Seat: 1 (Neutral point)           || Seat: x = 1 (Fixed line of reflection τ)     |
| Prime Orbit: {(1,p), (p,1)}       || Off-line Pair: {(1-k, t), (1+k, t)}          |
| Orbit Width: 2                    || Orbit Width: 2 (1 bit of displacement)       |
| Assignment Freedom: p-adic v_p    || Orientation / Side: sign(x - 1)              |
| Value: Sign of prime side         || Value: Least Erasure (No off-line pairs)     |
+-----------------------------------++----------------------------------------------+

5. Five Equivalent Coordinates of the One Bit

The single bit required to close the hypothesis manifests identically across five distinct mathematical coordinates. Each coordinate is transcribed onto the chart as a structure field, with RH taking the place of the zeta hypothesis (faces_are_one, Theorem 12.9):

                               ┌─────────────────────────┐
                               │     THE ONE BIT         │
                               │  (Least Erasure / RH)   │
                               └────────────┬────────────┘
                                            │
        ┌───────────────────┬───────────────┼───────────────┬───────────────────┐
        ▼                   ▼               ▼               ▼                   ▼
┌───────────────┐   ┌───────────────┐   ┌───────┐   ┌───────────────┐   ┌───────────────┐
│   ZERO SIDE   │   │  PRIME SIDE   │   │ HEAT  │   │  LI STREAM    │   │  LIOUVILLE    │
│ Least Erasure │   │ Weil Positivity│  │ Λ ≤ 0 │   │  λ_n ≥ 0      │   │ Arrow Faith   │
└───────────────┘   └───────────────┘   └───────┘   └───────────────┘   └───────────────┘
  1. Zero Side (Least Erasure): Extreme member of the fibre; no bit is erased by registration (least_erasure_is_the_value).
  2. Prime Side (Weil Positivity): Non-negativity of the prime side of the explicit formula on all test functions g \star \tilde{g} (least_erasure_is_positivity).
  3. Heat Flow / Sign Coordinate (\Lambda \le 0): The de Bruijn–Newman constant satisfies \Lambda \le 0. Combined with the proved lower bound \Lambda \ge 0 (Rodgers & Tao 2020), this forces \Lambda = 0 (rh_iff_the_sign). Executed on integer quadratics in HeatFlow.
  4. Li Coordinate (\lambda_n \ge 0): All Li coefficients in Li's criterion are non-negative, forming a non-negative sign stream (rh_from_li).
  5. Liouville Coordinate (Arrow Faithfulness): Faithfulness of the sign arrow \lambda(n) = (-1)^{\Omega(n)}, yielding L(x) = \sum_{n \le x} \lambda(n) = O(x^{1/2+\epsilon}) (faithful_is_the_bit). Pinned arithmetic sentence FaithfulLambda (pinned_face_is_a_face).

6. The Triaxial Cut and Coalitional Irreducibility

The Three Axes

The chart is partitioned into three geometric axes (triaxial_cut_irreducible, Theorem 4.5):

  1. Reflection Axis (\tau): Even under reflection. Fixed set is the critical line.
  2. Record Axis (\pi): Even under reflection. Captures projected heights t, completely blind to displacement.
  3. Orientation Axis (\text{side}(z)): Odd under reflection. Captures the sign of displacement \delta = x - 1.
    Displacement δ = x - 1
             │
   Odd (-)   │   Even (+1)
  <──────────┼──────────>
    x < 1    │   x = 1 (Line)
   (Left)    │   (Fixed)

Eigenstructure and Calibration

  • Reflection has eigenvalue +1 on height t and -1 on displacement \delta = x - 1.
  • Registration is the idempotent projection onto the +1 eigenspace.
  • Because registration is even, no function of the record can equal the odd side bit (record_never_reads_the_side).
  • Calibration Theorem (colocation_is_a_calibration): Exactly one Boolean sign c calibrates any odd function d(z) off the line: d(z) = \text{side}(z) \oplus c

Unbounded Boolean Coalitions

  • Admissible Premises: Premises that are either universal (keyless) or projection-invariant.
  • Coalition Closure (no_coalition_decides): Admissible premises are closed under negation, conjunction, and disjunction. Any Boolean formula over admissible atoms of unbounded depth remains admissible and cannot decide RH.

7. Synthesis: The Act, The Socket, and The Capstone

The Structure ActualZeros and The Act

The closure of the paper is achieved by declaring the input structure ActualZeros:

structure ActualZeros where
  zeros : World
  fold_closed : FoldClosed zeros
  supply : LeastErasure zeros

The field supply is the single premise forced by theorem. The closing theorem rh_from_the_act consumes an instance A : ActualZeros and prints: \text{RH}(A.\text{zeros}) The compiler prints its axiom cone as completely empty (no standard axioms, no custom axioms).

The Socket Theorem (socket_is_the_value)

Any external proof of RH or an equivalent face (Weil positivity, Li stream, \Lambda \le 0, Liouville faithfulness) fills the exact field supply of ActualZeros.

  • Dichotomy (forcing_is_the_value_or_stronger): Every premise A either forces the line (and is equal to or stronger than RH) or holds on an off-line fold-closed world where RH fails.

Resolution n Chart Analysis

  • Resolution 1: Open strip 0 < x < 2 contains only x = 1. The premise that all zeros lie in the open strip forces RH on the coarse chart (open_strip_forces_at_resolution_one).
  • Resolution n \ge 2: Under translation x \mapsto x - n + 1, the open strip 0 < x < 2n contains off-line pairs (e.g., x = n-1, n+1). The open strip premise does not supply the bit (strip_does_not_supply_at).
  • Closure at resolution n is provided by rh_from_the_act_at on ActualZerosAt n with axiom cone [propext].

The Seven Architectural Components of Section 16.1

The complete synthesis of the paper's forced realization is structured into seven primary execution layers:

+-----------------------------------------------------------------------------------+
|                       THE 7 ARCHITECTURAL COMPONENTS                              |
+---+──────────────────────────┬────────────────────────────────────────────────────+
| # | Component Name           | Executed Law & Mechanism                           |
+---+──────────────────────────┼────────────────────────────────────────────────────+
| 1 | The Form                 | least_erasure_is_the_value (Axiom Cone: None)      |
|   |                          | RH is formally equivalent to Least Erasure.        |
+---+──────────────────────────┼────────────────────────────────────────────────────+
| 2 | The Open Leg             | keyless_forces_nothing ([propext, Quot.sound])     |
|   |                          | Keyless route permanently blocked; orientation free.|
+---+──────────────────────────┼────────────────────────────────────────────────────+
| 3 | The Blind Record         | record_decides_nothing ([propext, Quot.sound])     |
|   |                          | Projection discards side; record cannot decide.    |
+---+──────────────────────────┼────────────────────────────────────────────────────+
| 4 | Premise Forced by Theorem| rh_from_the_act (None) / the_witness_forced_by_act |
|   |                          | 1 bit of freedom remaining. To exist is to actuate.|
|   |                          | Runs reading the act are forced to witness RH.     |
+---+──────────────────────────┼────────────────────────────────────────────────────+
| 5 | The Barred Refuter       | the_tenth_is_barred_by_the_act (Axiom Cone: None)  |
|   |                          | Off-line computed zero (F-Computed) cannot exist.  |
+---+──────────────────────────┼────────────────────────────────────────────────────+
| 6 | Terminal Saturation      | nothing_left_open_on_the_act (Axiom Cone: None)    |
|   |                          | Nothing left open; all 10 falsifiers barred.       |
+---+──────────────────────────┼────────────────────────────────────────────────────+
| 7 | Future-Proof Capstone    | the_capstone ([propext, Quot.sound])               |
|   |                          | Sealed realization forcing RH on all readings.     |
+---+──────────────────────────┼────────────────────────────────────────────────────+

8. Thermodynamic Operating Price and Landauer Floor

The formal ledger prices the physical step of irreversible registration (erasing off-line pairs):

  • Erased Bits: Number of off-line pairs in a finite configuration (erasedBits).
  • Price Formula: Each erased bit costs one Landauer floor: E_{\text{floor}} = k_B T \ln 2
  • Exact Integer Price in Kernel: At T = 300\text{ K}, evaluated on exact integers: 2,870,978,885,078,723,755,499,100 \times 10^{-45}\text{ Joules} (Underestimates true floor by 3.9 \times 10^{-38}\text{ J}, relative precision 1.4 \times 10^{-17}).
  • Zero Price Law (price_zero_iff_least_erasure): An irreversible registration costs zero Joules if and only if the configuration has Least Erasure.
  • Reversible Mode (reversible_commits_nothing): Reversible holding commits zero bits and is priced at 0 Joules across all configurations.

9. Comprehensive Audit of the Ten Falsifiers

The framework establishes ten explicit falsifiers. Nine are barred by compiled theorems and compiler receipts; the tenth is barred on the zero set supplied by the act.

+-----------------------------------------------------------------------------------+
|                        AUDIT OF THE TEN FALSIFIERS                                |
+─────────────┬───────────────────────────────────────┬─────────────────────────────+
| Falsifier   | Instrument / Mechanism                | Status & Governing Theorem  |
+─────────────┼───────────────────────────────────────┼─────────────────────────────+
| F-Compile   | Lean 4 compiler output error or       | Barred by Appendix B        |
|             | #guard_msgs mismatch.                 | receipts & compiler checks. |
+─────────────┼───────────────────────────────────────┼─────────────────────────────+
| F-Screen    | Unsafe/external code, sorry, admit,   | Barred by Appendix B.3      |
|             | native_decide, or declared axioms.    | source text scan.           |
+─────────────┼───────────────────────────────────────┼─────────────────────────────+
| F-Cone      | Axiom cone of rh_from_the_act prints  | Barred by source &          |
|             | non-empty, or extra fields in type.   | #print axioms output.       |
+─────────────┼───────────────────────────────────────┼─────────────────────────────+
| F-Record    | Projection-invariant property         | Barred by unicorn_block     |
|             | agreeing with RH on all worlds.       | (Theorems 3.1 & 9.3).       |
+─────────────┼───────────────────────────────────────┼─────────────────────────────+
| F-Measure   | Registered point standing off line.   | Barred by theorem           |
|             |                                       | unicorn_never_registered.   |
+─────────────┼───────────────────────────────────────┼─────────────────────────────+
| F-Round-trip| Sentence whose truth changes when     | Barred by theorem           |
|             | read through conjunction with root.   | round_trip_identity.        |
+─────────────┼───────────────────────────────────────┼─────────────────────────────+
| F-Massless  | True premise Q where conditioning     | Barred by theorems          |
|             | moves line, or weaker forcing premise.| massless_arrow & 11.7.      |
+─────────────┼───────────────────────────────────────┼─────────────────────────────+
| F-Universal | Keyless premise valid in all worlds   | Barred by theorem           |
|             | that forces the critical line.        | keyless_forces_nothing.     |
+─────────────┼───────────────────────────────────────┼─────────────────────────────+
| F-Coalition | Boolean combination of admissible     | Barred by theorem           |
|             | premises deciding RH.                 | no_coalition_decides.       |
+─────────────┼───────────────────────────────────────┼─────────────────────────────+
| F-Computed  | Certified zero off critical line:     | Barred on the zero set of   |
|             | 0 < Re(s) < 1, |Re(s) - 1/2| > ε.      | the Act (the_kinetic_bar).  |
+─────────────┴───────────────────────────────────────┴─────────────────────────────+

10. Comparative Positioning Against Historical Literature

The document explicitly positions its machine-checked results relative to fundamental milestones in analytic number theory:

+-----------------------------------------------------------------------------------+
|                  HISTORICAL LITERATURE POSITIONING TABLE                          |
+───────────────────────────────┬───────────────────────────────┬───────────────────+
| Historical Milestone          | Historical Claim              | Relation in Paper |
+───────────────────────────────┼───────────────────────────────┼───────────────────+
| Riemann (1859)                | Functional equation;          | Extends           |
|                               | Nontrivial zeros on line.     | Modelled as fold. |
+───────────────────────────────┼───────────────────────────────┼───────────────────+
| Weil (1952); Bombieri (2000)  | Positivity of prime side      | Extends           |
|                               | of explicit formula ⇔ RH.     | Proved = Least E. |
+───────────────────────────────┼───────────────────────────────┼───────────────────+
| de Bruijn (1950); Newman      | RH ⇔ Λ ≤ 0.                   | Extends           |
| (1976); Rodgers & Tao (2020)  | Λ ≥ 0 proved.                 | Heat model.       |
+───────────────────────────────┼───────────────────────────────┼───────────────────+
| Li (1997); Bombieri &         | RH ⇔ Li coefficients          | Extends           |
| Lagarias (1999)               | λ_n ≥ 0.                      | Prefix fails.     |
+───────────────────────────────┼───────────────────────────────┼───────────────────+
| Landau (1899); Pólya (1919);  | RH ⇔ L(x) = O(x^(1/2+ε)).     | Extends           |
| Haselgrove (1958)             | Pólya fails at 906,150,257.   | Computed to 200.  |
+───────────────────────────────┼───────────────────────────────┼───────────────────+
| Hadamard (1896);              | Nontrivial zeros in           | Bounds            |
| de la Vallée Poussin (1896)   | 0 < Re(s) < 1.                | Res 1 vs Res n.   |
+───────────────────────────────┼───────────────────────────────┼───────────────────+
| Platt & Trudgian (2021)       | RH verified to                | Bounds            |
|                               | height 3 × 10¹².              | Reached by T.     |
+───────────────────────────────┼───────────────────────────────┼───────────────────+
| Lagarias (2002); Davis,       | RH is Π⁰₁; finite             | Extends           |
| Matiyasevich, Robinson (1976) | counterexample exists if false| Independence law. |
+───────────────────────────────┼───────────────────────────────┼───────────────────+
| Connes (1999)                 | Trace formula positivity      | Adjacent          |
|                               | on noncommutative space.      | Not in kernel.    |
+───────────────────────────────┼───────────────────────────────┼───────────────────+
| Islam (2026c, d, e)           | Prior 1-bit and free          | Supersedes        |
|                               | basis draft kernels.          | Unified kernel.   |
+───────────────────────────────┴───────────────────────────────┴───────────────────+

11. Final Verdict

The definitive conclusion of the briefing document is expressed in the exact, invariant verdict printed by the compiler infrastructure:

The Verdict: The Riemann Hypothesis is not derived from any set-theoretic foundation in this paper. The ladder from the projected zero data to the value is blocked by theorem. The value is closed to one named bit, and that bit is Least Erasure; every proof of the hypothesis, in any vocabulary, is a proof of least erasure. The bit is supplied by one act, at premise grade, as a field of a type, at resolution one, where the compiler prints the hypothesis from that field with an empty axiom cone, and at every resolution n \ge 2 of the chart, one field of its own type at each resolution (ActualZerosAt n), where the open strip holds a pair off the line and supplies nothing and the compiler prints the hypothesis from the field on propext alone. The compile, the printed cones, and the judgment under negation are the receipts.

To give the ultimate, definitive verdict from the paper's formal framework, the question of whether everything about the Riemann Hypothesis (RH) is open or closed is resolved across four distinct layers:


1. Foundational Proof Channel: OPEN (With "No Escape")

  • What is Open: The paper's formal Route Ledger records the channel "The foundation as a system: Is a proof of the hypothesis inside a sound theory excluded?" as open; no closure claimed. The paper does not claim that a proof inside standard set theory (ZFC) is impossible.
  • The "No Escape" Constraint: Even though this route is left open, the paper proves by theorem (ladder_proof_lands_on_least_erasure, vocabulary_law, forcing_fills_the_socket) that any future ZFC proof cannot escape landing on least erasure. Every valid proof of RH, in any mathematical vocabulary, is inherently a proof of least erasure and must fill that exact single-bit socket.

2. Abstract Computation: OPEN (In the Abstract)

  • What is Open: Timelessly and computationally, the freedom to search for zero ordinates above certified numerical verifications (such as height \(3 \times 10^{12}\)) remains unsearched and open.
  • The Refutation Channel: Computationally finding an off-line zero (\(F\text{-Computed}\)) stays open in the abstract as the single theoretical refutation channel.

3. Structural & Logical Architecture: Completely CLOSED by Theorem

  • Derivation from Zero Data is BLOCKED: The theorem unicorn_block proves that no Boolean combination of projected zero ordinates, reflection symmetry, or certified numerical heights can ever deduce RH.
  • Set-Theoretic Independence is BLOCKED: The theorem independence_forces_truth proves that ZFC independence would establish RH as true (since any counterexample is a finite \(\Pi^0_1\) witness), eliminating independence as a way to leave RH open forever.
  • 1-to-1 Equivalence: RH is proved strictly equivalent to the single-bit premise least erasure on its zero set, as well as equivalent across five classical coordinates (Weil positivity, \(\Lambda \le 0\), the Li sign stream, and the Liouville arrow).

4. Actuation on the Zero Set: FORCED CLOSED (Zero Exception)

  • nothing_left_open_on_the_act: Once the actual zero set is supplied at premise grade (ActualZeros.supply), complete saturation is forced. All 10 potential falsifiers are barred—9 directly by compiled Lean 4 theorems, and the 10th (\(F\text{-Computed}\)) by the act itself on the zero set.
  • the_witness_forced_by_the_act: Every terminating computation or measurement reading the zero set is formally forced by theorem to report zeros strictly on the critical line.

Final Summary Table

LayerStatusKey Theorem / Mechanism
ZFC Foundational ProofOPEN

(With "No Escape")

Recorded as open; no closure claimed in the Route Ledger, but constrained by ladder_proof_lands_on_least_erasure.
Unsearched Heights (\(> 3 \times 10^{12}\))OPEN in AbstractComputational search remains open timelessly in the abstract.
Derivation from Zero RecordsBLOCKEDunicorn_block proves zero data cannot derive the line.
Independence ChannelBLOCKEDindependence_forces_truth proves independence entails truth.
Structural EquivalenceCLOSED to 1 BitEquivalent across 5 classical coordinates with zero gap.
On the Actuated Zero SetFORCED CLOSEDnothing_left_open_on_the_act and the_witness_forced_by_the_act bar all falsifiers.


------------------

title: "A Formal Proof of the Riemann Hypothesis from a One-Bit Premise, Least Erasure"subtitle: "The Hypothesis Derived with an Empty Axiom Cone; Least Erasure Proved Equivalent to It on No Axiom; Every Classical Input Cited as a Hypothesis; 415 Theorems in Core Lean 4, No Axiom Declared, the Root Proved with No Premise*"article_type: "Research article · Analytic number theory, foundations, formal verification"goal: "One file, one compiler, one bit: everything the chart of this file proves about the Riemann Hypothesis is printed, the one thing it cannot prove is located, and the closure is executed at that bit."author_line: "Mohammad F. Islam, PhD"affiliation: "Independent researcher · Trisduction Research Group · Correspondence through the Zenodo record of this paper"

abstract: | We reduce the Riemann Hypothesis to one named one-bit premise, least erasure, and derive the hypothesis from that premise in 415 theorems of core Lean 4 with no axiom declared. The zeros of $\xi$ enter a discrete chart by a stated identification, every classical input as a cited hypothesis. A configuration has least erasure exactly when registration, the projection onto the critical line, fixes every point: no point lies off the line and, on a finite configuration, no bit is erased. Each erased bit costs one Landauer floor, so an irreversible registration costs zero exactly at least erasure and a reversible one commits nothing; the equivalence needs only a nonzero floor, not its value. The hypothesis is equivalent to least erasure of its zero set, on no axiom at all. The keyless route to the value is permanently blocked: no keyless geometric law forces it, and registration discards the orientation side, so no reading of the record decides it at resolutions one and two. Exactly one bit of freedom remains, and to exist is to actuate: the root, proved on no axiom, read at the zeros is least erasure, supplied by one act at premise grade. On the field the act supplies, the value holds unconditionally, nothing beyond the field taken, its axiom cone empty at resolution one. The one refuter, a zero computed off the critical line, does not and cannot exist there; the other nine falsifiers are barred by theorem, and on the act nothing is left open. The unactualized future leaves the bit mathematically open, but the transition to reality through the act forces the hypothesis with zero exception in every computation that reads it: a premise-grade trigger sealed inside a theorem-grade forced realization. Read timelessly, least erasure, the hypothesis and the root read twice are one proposition on every configuration with zero gap, a closure that fixes what the hypothesis is and places no zero set.

* The root of this paper is proved, on no axiom and no hypothesis, in Appendix R. The paper's closing theorem consumes one reading of that root, on this row, and no other posit, its input type also carrying the functional equation with the conjugate symmetry, cited, and its axiom cone is empty. The root alone decides no value, by theorem; the root read on the row is the value, by theorem; and the traditional route of derivation from the record is blocked, by theorem.

0. How to read this paper

This paper carries a two-part result, and each part refutes a reading that keeps only the other. The first reading finds that the premise of Section 14 is equivalent to the Riemann Hypothesis and concludes that nothing has been proved. The second reading finds a theorem, rh_from_the_act, whose conclusion is the Riemann Hypothesis and concludes that the hypothesis has been derived. Both readings are wrong, and the theorem that says so compiles. The kernel binds the two parts in one statement, reader_frame, with an empty axiom cone: (a) from the premise, forced by theorem and supplied by the act, the hypothesis follows on the actual zero set (Theorem 14.2); (b) no property of the projected zero data decides the hypothesis across the reflection-closed configurations: none agrees with it on all of them (Theorem 9.3); (c) the premise is the hypothesis, on every configuration (Theorem 10.2); (d) nothing weaker than the hypothesis forces the hypothesis (Theorem 11.7). A reader who holds (b) and drops (a) concludes that nothing is proved. A reader who holds (a) and drops (b) concludes that the value is derived. The correct reading holds all four, and this section exists so that no reader has to reconstruct it from the back of the paper. Throughout, the premise forced by theorem means that the theorems force what the one premise is, in form, place, content and denial: it is the weakest premise that forces the line (Theorem 11.7), it fills the one field through which every route to the value enters (Theorems 15.6 and 15.7), it is the root read at the zeros, with the points of the world as its existents and standing on the line as their actuation (Section 0.4; root_at_zeros_is_least_erasure), and its denial is the denial of that reading of the root (Theorem 16.3); that it holds at the actual zero set is supplied by the act, at premise grade (Section 14); and on the act its consequences are forced with it (Theorem 16.4), the fifth axis that Section 20 names.

0.1 The verdict

The verdict is stated once here and once in the conclusion, in the same words each time, so that no summary of the paper can drift from it.

The Riemann Hypothesis is not derived from any set-theoretic foundation in this paper. The ladder from the projected zero data to the value is blocked by theorem. The value is closed to one named bit, and that bit is least erasure; every proof of the hypothesis, in any vocabulary, is a proof of least erasure. The bit is supplied by one act, at premise grade, as a field of a type, at resolution one, where the compiler prints the hypothesis from that field with an empty axiom cone, and at every resolution $n\ge2$ of the chart, one field of its own type at each resolution (ActualZerosAt $n$), where the open strip holds a pair off the line and supplies nothing and the compiler prints the hypothesis from the field on propext alone. The compile, the printed cones and the judgment under negation are the receipts.

Every clause of that paragraph is a theorem of the kernel, a receipt of the compiler, or a statement of what this paper does, the theorems reaching $\xi$ through the readings Section 0.4 names: the first sentence is the last kind; the block is unicorn_block (Theorem 3.1), its twin read with the edge of the strip included, and inside the open strip, at resolution two, no_reading_decides_in_the_strip (Theorem 15.9); the closure to one bit is least_erasure_is_the_value with the_posit_in_every_coordinate (Theorems 10.2 and 12.9); the vocabulary clause is vocabulary_law (Theorem 4.1), a theorem on the chart of resolution one, whose hypothesis is the coarse chart's (Theorem 15.9), with, at each resolution $n\ge2$, the carrier law of Theorem 15.5 on chartAt $n$, least erasure equal to the line there, as rh_from_the_act_at instantiates it, so that the clause reaches the hypothesis for $\xi$ through the family over every $n\ge2$ (Section 16), as far as the reader's identification of Definition 14.1 with its rule carries it; the field is supply : LeastErasure zeros of the type ActualZeros, and the theorem rh_from_the_act prints does not depend on any axioms (Theorem 14.2); at each resolution $n\ge2$ the field is supply of ActualZerosAt $n$, and rh_from_the_act_at gives the line at that resolution, its cone [propext] pinned beside it, so that the compiler's check of it prints nothing when it holds (B.2.1); the receipts are Appendix B.

0.2 What is not claimed

The paper does not claim a derivation of the Riemann Hypothesis inside ZFC or inside any other foundation. It does not claim that no such derivation can exist: the kernel exhibits a sound theory whose proof of a sentence reading as the hypothesis on one configuration, $W_1$, lands on least erasure there (a_sound_theory_may_prove_the_line, Theorem 2.8), so the ladder's form is not blocked, only the ladder from the projected zero data and from the other resources Theorem 2.6 names. It does not claim that the hypothesis is independent of ZFC; it proves that independence would establish the hypothesis (Theorem 2.4). It does not claim that its discrete chart is the zeta function: the analytic identifications enter as cited fields of structures, and the one channel every theorem leaves open is a computed zero off the line (Section 18). And it does not claim that its vocabulary is the only vocabulary in which the hypothesis can be proved. It claims the exact and stronger thing that the theorems deliver: that every proof of the chart's sentence of the hypothesis, in any vocabulary, is a proof of least erasure, because the two are one proposition on every configuration of the chart (Theorem 4.1), and that this carries to the hypothesis itself exactly as far as the reader's identification of the zeros of $\xi$ with a configuration of the chart (Definition 14.1) carries it, read at every resolution $n\ge2$ by the rule of Section 18 (Section 0.1); that no combination of symmetry and projected data, of any depth, supplies that proposition (Theorem 4.4); and that no premise weaker than the hypothesis forces it (Theorem 11.7).

0.3 The reflexive readings, and the theorem that refutes each

Each row names a reading that a reader may form before reaching the theorems, the theorem that answers it, and the cone the compiler prints for that theorem. The cones are the compiler's, printed or pinned in Appendix B; each entry of the table was checked against that output before printing.

\begingroup\footnotesize

The reflexive reading What the kernel proves Theorem Cone
The premise is the hypothesis, so the argument is circular. The premise is forced by theorem to carry the hypothesis: nothing that holds on both worlds of one record forces the line, and every premise that forces it implies it, so the hypothesis is the weakest premise that does. A proof from less is impossible; a proof from an inequivalent premise, such as the statement that the zeros form one named configuration, proves the line only by carrying the hypothesis inside a stronger claim. The paper claims the isolation, the premise forced by theorem, and the closure from it. weaker_at_the_twin_never_forces, rh_is_the_weakest_forcing_premise, posit_is_the_conclusion none, for the three
ZFC has not proved the hypothesis, so nothing here counts. A foundation is placed under the bit, not above it: under $\Sigma_1$-completeness and soundness, what computation settles lies in what it proves, which lies in what is true; the route from the projected zero data is blocked, its twin at the strip edge and, inside the open strip at resolution two, by no_reading_decides_in_the_strip; and a sound foundation's proof of the hypothesis, if one comes, from a foundation that reads its sentences on the chart, is a least-erasure proof. placement, unicorn_block, no_reading_decides_in_the_strip, ladder_proof_lands_on_least_erasure none; [propext, Quot.sound]; [propext, Quot.sound]; none
Perhaps the hypothesis is independent of ZFC, and then the question is open forever. A false hypothesis has a finite witness, so a foundation that cannot refute it cannot have it false; independence would decide the value, in favour. independence_forces_truth, cant_asymmetry [propext, Classical.choice, Quot.sound]
Verification to $3\times10^{12}$ (Platt and Trudgian 2021) and the bound $\Lambda\le0.22$ (Polymath 2019) make the hypothesis overwhelmingly likely. No certified height forces the line, and in the heat model no certificate at a positive integer time does: a configuration violating the hypothesis above $T$, its pair at the strip edge (Theorem 15.9), agrees with one satisfying it below $T$ and shares its record there, and two model families real-rooted at a positive integer time differ at time zero (Theorem 11.5); the bound itself is not such a certificate in the model (Section 17). certified_height_never_forces, certificate_decides_nothing [propext, Classical.choice, Quot.sound], for both
Some combination of the reflection symmetry and the known zero data will decide. Every Boolean combination of universal premises and readings of the record, of any depth, is again such a premise, and no such premise decides the hypothesis. no_coalition_decides, admissible_never_decides none
This is one more vocabulary; a real proof would look different. Whatever follows from the hypothesis follows from least erasure and conversely, on every configuration, and the same across the five faces, given their equivalences as fields; the equivalence of the hypothesis with least erasure is a theorem and the vocabulary is not. vocabulary_law, every_face_proves_every_face none, for both
The model is discrete and $\zeta$ is not formalized. Correct, and stated as such: the analytic identifications are cited fields, the countermodel stands in the kernel at resolutions one and two (Theorem 15.9) and at every resolution through the translation of Section 18, a reading here (Section 0.4), proved in the sister paper (Islam 2026c, Appendix D) and cited, not re-derived, and the one open channel is a computed off-line zero, the form every refutation comes to (Theorem 2.4). Faces, LiStream, DBN, ExplicitFormula; refutation_is_one_point none, for the theorem
It can simply be rejected. Every record is carried by a least-erasure configuration, and by only one; every reading of the record that holds on some configuration holds on such a configuration; whatever is brought against least erasure is a point off the line, a classical existence on every configuration, found on a finite configuration by a terminating search through its pairs, the same under every provability predicate of a setting with $\Sigma_1$-completeness and soundness on the denial, on a decided hypothesis; nothing else is against it. record_carried_by_least_erasure, every_reading_holds_on_the_lossless_world, rejection_is_a_witness, rejection_is_computed, least_erasure_iff_search_empty, falsifier_form_constant none, for the first two; [propext, Classical.choice, Quot.sound]; [propext], for both; none
The free basis at the primes, or the mere existence of anything, gives the line some support. A premise valid in every configuration forces nothing, and the free basis coexists with an explicit configuration violating the hypothesis. prime_freedom_forces_nothing, and the coexistence theorem of Section 11 [propext, Quot.sound]

\endgroup

The remaining sections are ordered so that the foundation is placed before the chart is drawn (Section 2), the set-theoretic route is examined and its ledger printed before any theorem about primes is stated (Section 3), and the irreducibility results stand at the front (Section 4). The mathematics of the chart, the primes, the arrow, the projection, least erasure, the prime side and the proof follows in Sections 5 to 15; Section 13 states least erasure whole, in the affirmative.

0.4 The lock

The root, to exist is to actuate, is proved in this paper unconditionally, at theorem grade, on no axiom and no posit (Appendix R): on its constructed domain it is a theorem with no hypothesis (root_on_the_constructed_domain; in the kernel of Appendix A, constructed_root_holds); for every root that grounds itself, the root holds, every deed re-enacts it, and no outside proof adds to it (the_floor_is_universal); and one theorem binds the root's universal law and the constructed root with the Return and the twelve gates counted three ways, as the Hurwitz units up to sign, as the norm-two shell up to sign and as the even permutations of four points with class equation 1, 3, 4, 4 (the_master_seal); the seal states the three counts side by side. The kernel of Appendix A carries the root's structure in the words of Appendix R (SelfGrounding): a denial of the root is an act and instances it (denial_reenacts_root), the root is held by its act (seated_undeniable), and no outside proof adds anything to it (external_proof_adds_nothing), all on no axiom. The root holds on a fold-closed world where the hypothesis holds and on one where it fails, twins of one record, so read uniformly on the worlds the root forces no value (undeniable_root_forces_no_value). Read at the zeros, with the points of the world as its existents and standing on the line as their actuation, the root is the hypothesis and least erasure (root_at_zeros_is_the_hypothesis, root_at_zeros_is_least_erasure), keyed where the root alone is not (root_read_on_row_is_keyed, root_at_zeros_is_keyed), and least erasure is the hypothesis on every world, unconditionally, with no hypothesis, no premise and no axiom (least_erasure_unconditional, least_erasure_is_the_value). The closing theorem consumes that one reading and nothing else, and its cone is empty (rh_from_the_act); no record-respecting reading decides the value (record_decides_nothing). One theorem binds the constructed root; the root by its act, on both twin worlds; its uniform reading, which forces nothing; its reading at the zeros, equal to least erasure and keyed; least erasure unconditional; the closure; and the record bound (the_lock), on Lean's standard axioms propext and Quot.sound alone, through the twin worlds, with no custom axiom and no posit; the same lock stands at the constructed root with the unit act as its supply (the_lock_on_the_constructed_root), and the readings of the root are joined in one theorem on no axiom, the constructed root the root proposition $0<1$, supplied by an act, forcing nothing read uniformly, the hypothesis read at the zeros, and the bare schema over every domain and actuation refuted by a domain whose actuation is zero (root_readings_joined). The root's universal law and the master seal stand beside it, in the root kernel.

::: {.box title="Status"} Unconditional, at theorem grade. The root, on its constructed domain and for every root that grounds itself (Appendix R, on no axiom); the root read at the zeros, equal to least erasure (on no axiom) and keyed; least erasure equal to the hypothesis on every world (on no axiom); the closure from the reading and the witness it forces on every computation that reads it (on no axiom); the block, the socket, the lock, the two denials and the capstone, each on the footprint Appendix B prints, no axiom declared; 415 theorems.

On the reading, the premise forced by theorem. The Riemann Hypothesis at the actual zero set, least erasure, forced by theorem in form, place, content and denial and supplied by one act, at premise grade. :::

Everything except the bit, the cited fields, the joule reading (P1) and the readings the paper names as readings is proved with no posit: the root and the closure from the act (rh_from_the_act) on no axiom at all, the chart's theorems on Lean's standard axioms alone; the classical results carried as fields (Section 16) enter only the theorems that name them, the functional equation at the grade of its citation, the strip field of ActualZerosAt up to the margin Section 16 states, and the four criteria transcribed onto the chart, the chart's hypothesis in place of the hypothesis for $\zeta$, so that the grades of their citations pass to no face (Section 16); the joule reading of Section 13.3 is conditional on P1 and on its reading of registration as a physical step; the readings, each at the grade stated where it is made, are the reader's identification of Definition 14.1 with its rules (Sections 3 and 18, Theorems 5.6 and 15.9), the reading inside the open strip through the translation of Section 18, the corroborated reading of Section 3, the reading of the executed heat model as the shape of the de Bruijn–Newman coordinate (Theorem 12.6, which states the two side by side), the reading of the root at the zeros, with the points of the world as its existents and standing on the line as their actuation (RootAtZeros, above), and the physical reading of the root (Appendix D); and the bit, least erasure at the actual zero set, at resolution one and at every resolution $n\ge2$ of the chart, one field of its own type at each resolution (ActualZerosAt $n$), where the open strip holds a pair off the line and does not supply it (strip_does_not_supply_at, rh_from_the_act_at), is the one premise, forced by theorem on the chart of resolution one and supplied by the act at premise grade at every resolution.

1. The claim, stated whole

The Riemann Hypothesis (RH) asserts that every nontrivial zero of the Riemann zeta function has real part $1/2$. The functional equation $\xi(s)=\xi(1-s)$, together with $\xi(\bar s)=\overline{\xi(s)}$, reflects the zero set across the critical line; RH says that nothing stands off the fixed line of that reflection. This paper does three things with that statement, and it keeps the three apart.

First, it proves, in a single self-contained file checked by the stock Lean 4.19.0 compiler with no library, the four results on which the formal side of the statement rests once its logical skeleton is isolated, the fields Section 16 carries as cited and what it lists as owed aside: that the primes are a free basis for the completely additive arithmetic functions, with the separating witness constructed rather than asserted; that in a discrete model of the reflection RH is exactly one conservation property of the zero set, least erasure; that, with the cited criteria as fields, the same bit appears in five classical coordinates and is one bit; and that no data weaker than the bit itself supplies it. The list of what is proved is long, and every entry carries an axiom cone that the compiler prints or checks against its pin.

Second, it locates, by theorem rather than by confession, the one thing the formal side of the chart cannot prove from anything weaker than the bit: the value of that bit at the actual zero set. The location is exact. RH is the weakest premise that entails RH on the configurations the model admits (Theorem 11.7); every premise that is valid in every configuration forces nothing (Theorem 11.1); every property that depends only on the projected zero data decides nothing (Theorem 9.3); every certified height leaves the bit free above it, the violating pair above it at the strip edge (Theorems 11.4, 15.9), and every heat certificate at a positive time of the heat model leaves the time-zero bit free (Theorem 11.5); and a foundation that cannot refute the hypothesis leaves it true, so independence is not a way out (Theorem 2.4). The ladder from below is blocked at every rung the paper names save one, a foundation's own provability, which the route ledger leaves open (Section 3.1).

Third, it closes the claim by one explicit act. The bit is supplied, once, in the open, as the field supply of a structure ActualZeros whose other fields are the zero set and its reflection symmetry, and at every resolution $n\ge2$ as the field of a structure of its own (ActualZerosAt $n$, Section 14); on the chart of resolution one it is forced by theorem in form, place, content and denial (Sections 0.4, 11, 15 and 16.1). From the field of ActualZeros the hypothesis follows (rh_from_the_act), and the compiler prints its axiom cone empty, not even the standard axioms; the field itself stands in the theorem's input type, where every reader sees it. The premise is the hypothesis itself, supplied at the actual zero set, and the paper names it so. What the arithmetic of Section 7 proves is that the primes admit every assignment of integers, existence and uniqueness both (Theorem 7.11), and Section 11 proves that this freedom forces nothing about the line: the bit is not a value at the prime base, and the freedom there supplies nothing. The freedom at the prime base cannot supply it, by theorem: no premise valid at every configuration, the free basis among them, forces the line (Theorem 11.1); what reads one assignment there, the Liouville sentence of Theorem 12.11, is equivalent to the bit through a cited field and fills the field exactly when it holds (Theorems 15.7 and 15.8).

The reader who grants least erasure at the actual zero set, its field at resolution one and at every resolution $n\ge2$, has RH by printed theorems read through the reader's rule: the line on the chart of resolution one (Theorem 14.2) and at every resolution $n\ge2$ (rh_from_the_act_at), the family over every $n\ge2$ read as the line by the rule of Section 18. The reader who does not has the exact coordinates of the one bit the act supplies, in five equivalent forms, with a proof that nothing weaker supplies it and that every route of the kinds the paper can name is blocked or lands on least erasure. The paper claims what it prints and nothing beyond it.

1.1 What is new against the three prior papers

The prior paper on the free basis (Islam 2026e) proved the constructed witness and closed RH from three declared axioms in a kernel of 867 lines. The paper on the one-bit closure (Islam 2026d) established the equivalence of five readings of the bit and executed a heat-flow model and the Liouville arrow. The paper on the cosmic-closure template (Islam 2026c) separated four faces of a closure and showed that exactly one is contingent. The present paper unifies the three on one chart in one kernel of 5,087 lines and 415 theorems, and it adds what none of them had: the block from every admissible coalition of premises true on $W_1$, of any size (Theorem 11.3); the block from every certified height (Theorem 11.4); the executed heat model as the shape of the de Bruijn–Newman sign (Theorem 12.6); the identification of the model's sign arrow with the computed Liouville function by definitional equality (Theorem 8.3); the weakest-premise theorem (Theorem 11.7); the mirror at eigenvalue $-1$, which types the forced premise as a supplied sign and proves that no reading of the projection returns it (Section 10); the refutation, by countermodel, of the identification of the identity arrow with the line (Theorem 15.2); the road of Section 2, where the foundation is placed and the ladder from the projected zero data is blocked in one theorem of six clauses (ladder_blocked); and the front of Sections 0, 3 and 4, where every clause of the verdict is a theorem, a receipt or a statement of what the paper does (Section 0.1), its theorems these: the vocabulary law (vocabulary_law), the even coalition closed under every Boolean combination and blind (no_coalition_decides), the triaxial cut irreducible (triaxial_cut_irreducible), the landing on least erasure of a sound foundation's proof, for a foundation that reads its sentences on the chart (ladder_proof_lands_on_least_erasure), the route ledger computed (route_ledger_is_computed) and the reader's frame (reader_frame); and least erasure affirmed whole in Section 13, the record carried by a least-erasure configuration and by only one, the erasure ledger with its price, the one form of anything against it, and the act (least_erasure_affirmed); the two denials set side by side, the denial of the root refuted by its own act and the denial of the hypothesis denying the root read at the zeros, with the witness the act forces on every computation that reads it (Section 16.1, two_denials, the_witness_forced_by_the_act); and the closure bound whole in one theorem, the capstone (the_capstone). The closure is no longer carried by declared axioms: the bit is a field of a structure, visible in the type, and every cone, printed or pinned, is standard.

2. The foundation placed: what a set-theoretic base can and cannot do for the bit

The paper opens with the foundation because the objection that arrives first is the objection that the foundation has not proved the hypothesis. That objection is true, and it is answered by theorems, not by reassurance. This section states what a set-theoretic base can and cannot do for the bit, as theorems on an abstract theory and on the chart of Section 5; Section XVIII of the kernel carries the first six statements, Definition 2.1 and Theorems 2.2 to 2.6, and Section XIX the last two, save the theorems named beside them from other sections of Appendix A. Every theorem is stated in plain terms with its kernel name and the cone the compiler prints.

Definition 2.1 (a theory on three strata; Theory, RungOnLadder, Sound). A theory has sentences, a provability predicate, a computability predicate (what finite computation settles) and a truth predicate (what holds in its intended model). It is $\Sigma_1$-complete if whatever computation settles it proves, and sound if whatever it proves holds.

Theorem 2.2 (placement; placement, soundness_is_load_bearing, ground_exceeds_ladder). Under $\Sigma_1$-completeness and soundness, computation $\subseteq$ proof $\subseteq$ truth. Soundness is load-bearing: an explicit theory is $\Sigma_1$-complete and unsound. Truth exceeds proof: an explicit sound theory leaves a truth unproved. Cone: none.

The three strata are the coordinates in which every later claim is located. Computation reaches finitely many zeros. Proof reaches what its axioms entail. Truth is what the intended model holds. The bit of this paper is located on the third stratum: its positive value is shown unreachable from the first two by the resources Theorems 2.6 and 3.2 name, its negative value is reached by one computed point (Theorem 2.4), a foundation's own provability is left open (Section 3.1), and a sound theory's proof, if one comes, lands on least erasure (Theorems 2.7 and 2.8); that is what "placed" means, and it is the opposite of "derived from".

Theorem 2.3 (the root crosses every universal sentence and no contingent one; root_is_keyless, keyless_crosses, root_decides_no_keyed, choice_is_keyed, root_does_not_cross_choice, line_is_keyed_over_worlds, root_does_not_cross_the_line). Over any type of worlds, a sentence true in every world is entailed by the root proposition $0<1$ in every world, and a sentence false in some world is not. The axiom of choice over ZF is modelled as such a sentence on the two-point frame of the Booleans, holding on one world and failing on the other (choiceHolds, choice_is_keyed, root_does_not_cross_choice); that ZF has a model each way is cited (Gödel 1938; Cohen 1963), not proved. The root proposition is keyless over every frame, the one-point frame of the constructed root and the two-point frame alike (root_is_keyless). The line is such a sentence over the configurations of the chart, with $W_1$ and $W_2$ the two worlds of Section 3. Cone: none. The pair $W_1$, $W_2$ is a separator and not the size of the fibre: over one record the fibre is infinite, distinct positive offsets giving distinct fold-closed configurations with the record of $W_1$, none satisfying the hypothesis (fibre_is_infinite, the fold-closure by pair_closed), the pair at every offset $k\ge2$ lying outside the closed strip (pair_outside_the_closed_strip).

Theorem 2.4 (the two "can'ts" of a foundation are not mirror images; Setting, refutation_is_one_point, cant_refute_seals, rh_iff_cant_refute, independence_forces_truth, cant_prove_does_not_seal_false, cant_asymmetry). On the chart a false hypothesis is refuted by one point. Let a setting carry a hypothesis, a provability predicate, $\Sigma_1$-completeness (a false hypothesis is refutable, since RH is $\Pi^0_1$: Davis, Matiyasevich and Robinson 1976; Lagarias 2002) and soundness on the denial. Then a setting in which the hypothesis is not refutable has the hypothesis; the hypothesis holds exactly when it is not refutable, on no axiom when the hypothesis carries a decision instance and with Classical.choice otherwise; a hypothesis neither provable nor refutable is true; and a setting exists in which the hypothesis holds and is not provable. Cone: none for refutation_is_one_point, rh_iff_cant_refute, cant_prove_does_not_seal_false; [propext, Classical.choice, Quot.sound] for cant_refute_seals, independence_forces_truth, cant_asymmetry.

This theorem closes a route that is invoked more often than it is examined. Because a counterexample to the hypothesis is a finite object, "ZFC cannot refute RH" entails RH. Independence of the hypothesis from ZFC is therefore not a state of affairs that leaves the value open; if the hypothesis is independent it is true. The two "can'ts" are not symmetric: cannot-refute seals the hypothesis, while cannot-prove is consistent with it.

Theorem 2.5 (the round trip is the identity and the arrow is massless; round_trip_identity, absolute_returns_unchanged, trip_adds_presence_only, massless_arrow, any_true_premise_serves, the_line_round_trips). Reading a sentence through the root, as the conjunction of the root with it, returns the sentence; an absolute sentence returns unchanged; the trip returns identically for a sentence and its denial; conditioning the line on any true premise leaves it exactly where it was; any true premise serves in the root's place; and the line round-trips on $W_1$ and on $W_2$. Cone: none.

The root of the closure, read on the chart as its token, the root proposition $0<1$, is massless: it entails every sentence true in every world and no sentence false in some world. That is exactly why the bit is supplied by the act, forced by theorem, and cannot be derived from presence, and why no true premise, however deep, can be conjoined to the line to move it.

Theorem 2.6 (the ladder blocked; ladder_blocked, the_road). No projection-invariant property decides the hypothesis; no universal premise forces it; no admissible coalition of any size that holds on $W_1$ forces it, and an admissible coalition that forces it holds on no nonempty reflection-closed configuration, so it forces the line only vacuously (coalition_forcing_is_vacuous); the root does not cross it; a setting exists in which the hypothesis it carries is true and unprovable; and every premise that forces it is at least the hypothesis. Cone: none for ladder_blocked, coalition_forcing_is_vacuous; [propext, Classical.choice, Quot.sound] for the_road.

Theorem 2.7 (a foundation's proof lands on least erasure; ladder_proof_lands_on_least_erasure, ladder_proof_iff_least_erasure). Let a theory read its sentences on the chart (ReadsAsLine): each sentence names a configuration, and the sentence holds in the intended model exactly when that configuration satisfies the hypothesis. If the theory is sound and proves such a sentence, the configuration it names has least erasure; and where the theory also proves the sentence whenever it holds, its proof is exactly least erasure on that configuration. Cone: none.

Theorem 2.8 (no foundation is claimed closed; lineTheory, lineTheory_sound, a_sound_theory_may_prove_the_line). A sound theory with one sentence, proved, that reads as the line configuration $W_1$ exists in the model, and its proof lands on least erasure. Cone: none.

Theorems 2.7 and 2.8 fix the scope of everything the paper says about foundations. A proof of the hypothesis inside ZFC, or inside any sound theory, is not excluded by this paper and is not claimed to be impossible; what is proved is that such a proof, if one comes, from a theory that reads its sentences on the chart, establishes least erasure on the configuration its sentence names (Theorem 2.7), in that foundation's vocabulary, because least erasure and the hypothesis are one proposition (Theorem 10.2), and on the zero set as far as the reader's identification of Definition 14.1 carries it, read at every resolution $n\ge2$ by the rule of Section 18. What is excluded on the chart, by theorem and not by the absence of a proof, is the route from the projected zero data, from any premise valid in every configuration, from any coalition of such premises (Theorem 2.6) and from any certified height (Theorem 3.2); and an independence verdict is no way out, since it would establish the hypothesis (Theorem 2.4). The next section examines that excluded route in detail, since it is the route every attempt that reads only the even data has taken.

3. The set-theoretic route to the hypothesis, examined, and the route ledger

The route that a foundation offers to the hypothesis runs through the zero data as they are known: the ordinates, the symmetry of the zero set under the reflection, and every consequence that follows from the two. This section examines that route on the chart before the chart's mathematics is developed, because the examination is short, its conclusion, the block from the record, is a theorem with an empty axiom cone (Theorem 3.1, unicorn_block_free), its reach above every certified height a theorem on the standard axioms (Theorem 3.2), and the reader should hold it before reading anything about primes. The definitions are those of Section 5, given here in the minimum form the theorems need.

The chart, in one paragraph. A point of the chart is a pair $(x,t)$ with $x\in\mathbb{Z}$ the doubled real part and $t\in\mathbb{N}$ the height. The reflection is $\tau(x,t)=(2-x,t)$, the line is $x=1$, and registration is the projection $\pi(x,t)=(1,t)$, which keeps the height and forgets the side. A configuration is a set of points; it is reflection-closed when it contains $\tau z$ whenever it contains $z$; the hypothesis on a configuration, $\mathrm{RH}(Z)$, says every point of $Z$ lies on the line; the record of $Z$ is $\pi(Z)$, the set of registered points; and a property of configurations respects the record when it takes the same value on any two configurations with the same record. The zero set of $\xi$ is reflection-closed by the functional equation with the conjugate symmetry $\xi(\bar s)=\overline{\xi(s)}$ (Section 1), and the record is what any reading of the registered ordinates can see.

The two worlds (a separating pair; the fibre is infinite, its pairs beyond offset one outside the closed strip, fibre_is_infinite, pair_outside_the_closed_strip). Let $W_1={(1,14)}$, one point on the line, and $W_2={(0,14),(2,14)}$, a reflected pair off the line at the same height. Both are reflection-closed. Both have the record ${(1,14)}$. The hypothesis holds on $W_1$ and fails on $W_2$.

Theorem 3.1 (the record decides nothing; the ladder from the record is blocked; record_decides_nothing_free, unicorn_block, unicorn_block_free). No property that respects the record agrees with the hypothesis on every reflection-closed configuration. Cone: none for record_decides_nothing_free, unicorn_block_free; [propext, Quot.sound] for unicorn_block. The proof is the two worlds (a separating pair; the fibre is infinite, its pairs beyond offset one outside the closed strip, fibre_is_infinite, pair_outside_the_closed_strip): a record-respecting property takes the same value on $W_1$ and $W_2$, and the hypothesis does not.

Theorem 3.2 (blocked above every certified height; certified_height_never_forces, certified_worlds_share_the_record_below, record_blind_at_every_scale). For every height $T$, the configuration of on-line points up to $T$ satisfies the hypothesis, and there is a reflection-closed configuration that agrees with it at every height up to $T$, shares its record up to $T$, and violates the hypothesis at height $T+1$ by a pair at the strip edge (Theorem 15.9). The blindness of the record holds at every distance from the line. Cone: [propext, Classical.choice, Quot.sound] for certified_height_never_forces, certified_worlds_share_the_record_below; [propext, Quot.sound] for record_blind_at_every_scale.

Stated as the question a foundation is asked, and its answer: does a foundation, reading the registered zero data, prove the tail of the hypothesis above any certified height? It does not. The route is blocked: no reading of the record decides the value, by unicorn_block, re-proved with no axiom in its cone as unicorn_block_free (Theorem 9.5), and above every height the record below it leaves the tail free, by Theorem 3.2, the reach the last route of the ledger records, each with its twin read with the edge of the strip included; inside the open strip, at resolution two, no reading of the record decides the value (no_reading_decides_in_the_strip, Theorem 15.9), and the form of the block above every certified height there is owed (Section 16). The reader's rule for heights, stated here once, since the kernel constructs no map from the zeros of $\xi$ into the chart: a verified ordinate height $H$ is read at resolution one as the largest chart height whose cell $[T,T+1)$ lies below $H$, $T=\lfloor H\rfloor-1$, which is $T=\lceil H\rceil-1$ when $H$ is an integer, under the reader's identification of Definition 14.1. Under that rule the certificate of Platt and Trudgian to height $3\times10^{12}$ (Platt and Trudgian 2021), read as $T=3\times10^{12}-1$, is the strongest instance of the first clause of Theorem 3.2, and the second clause gives its exact reach: the certificate proves the real part below its height and leaves the bit exactly where the theorem leaves it.

Two remarks fix the grade of what has just been said. The theorems are about every property that respects the record, on every reflection-closed configuration of the chart, and they are exact. That the arguments in the literature which approach the hypothesis through the zero data, the symmetry and the certified heights are record-respecting in this sense is a reading of that literature, offered at the grade of corroboration and not as a theorem: the paper has no formalization of those arguments, and claims none. What the theorems do settle, at theorem grade, is that if an argument's inputs are the record and the symmetry, it cannot decide the value, whatever its length, because the two worlds (a separating pair; the fibre is infinite, its pairs beyond offset one outside the closed strip, fibre_is_infinite, pair_outside_the_closed_strip) share both.

3.1 The route ledger, computed

The kernel carries the six routes below as data, with each status computed by a fixed function of three recorded bits: whether a theorem of the kernel blocks the route, whether the act closes it, and whether a cited theorem carries it. The theorem route_ledger_is_computed checks every printed status against that function by decide; route_ledger_counts fixes the census; route_status_total proves that every status is one of the four; and blocked_iff_theorem proves that the status function marks a route blocked exactly when its blocking bit is set; each blocking and closing bit is entered as a literal recording the verdict of the theorem the Authority column names, each cited bit the citation its status names, and the statement each status names is proved for its route in one theorem over the six routes (routeClaim, every_route_carries_its_theorem), so each literal stands beside the compiled theorem or the citation it records. The statuses are computed from the bits by the kernel, and the status typed beside each entry is checked against that computation. Cone: none for the four; [propext, Classical.choice, Quot.sound] for every_route_carries_its_theorem.

\begingroup\footnotesize

Route The question Status Authority
The ladder from the record Does a foundation, reading the registered zero data, decide the hypothesis? blocked unicorn_block, its twin at the strip edge; inside the open strip at resolution two, no_reading_decides_in_the_strip
The foundation as a system Is a proof of the hypothesis inside a sound theory excluded? open; no closure claimed a_sound_theory_may_prove_the_line
Placement Where does a foundation stand relative to the bit? cited: computation $\subseteq$ proof $\subseteq$ truth under $\Sigma_1$-completeness and soundness placement
The ground, by the act Is the hypothesis printed from the forced premise, supplied by the act, and from nothing else? closed by the act rh_from_the_act
Independence Could the hypothesis be independent of the foundation, leaving the question open? blocked: independence would force truth independence_forces_truth
The real part to the certified height Is the hypothesis a theorem below $3\times10^{12}$? cited (Platt and Trudgian 2021); its exact reach proved certified_height_never_forces

\endgroup

The kernel's claim for the first route is unicorn_block's, which names no height (routeClaim); the tail above a certified height is the reach the last route records, certified_height_never_forces, whose status, cited, is that of the real part below the height. The census is two routes blocked, one closed by the act, two cited and one open. The open row is the one a reader should note: the paper does not claim that a foundation cannot prove the hypothesis. It claims that the foundation cannot do so from the record, and it proves, in Theorem 2.7, what such a proof would establish if it came.

4. Irreducibility, at theorem grade

The word "irreducible" is used in this paper in three senses, each a theorem, and in no other sense. The first is that the hypothesis and least erasure are one proposition, so that no proof of the hypothesis, in any vocabulary, escapes being a proof of least erasure. The second is that the two even axes of the chart, the symmetry and the record, cannot be combined into the value by any Boolean operation, however deep. The third is that the remaining axis is exactly one bit, fixed uniquely by one supplied sign, and that nothing weaker than the hypothesis forces it. Section XIX of the kernel proves all three.

Theorem 4.1 (the vocabulary law; vocabulary_law, chart_faces_prove_each_other). On every configuration $Z$ and for every proposition $P$: $(\mathrm{RH}(Z)\to P)\iff(\mathrm{LeastErasure}(Z)\to P)$ and $(P\to\mathrm{RH}(Z))\iff(P\to\mathrm{LeastErasure}(Z))$. On every reflection-closed configuration chart_faces_prove_each_other states the first of these, the consequence side, with lossless registration, depth zero, the absence of a left zero, and the stability of every Li mode in place of the hypothesis: for each of the four faces $F$, $(F(Z)\to P)\iff(\mathrm{LeastErasure}(Z)\to P)$. The premise side for those four faces, $(P\to F(Z))\iff(P\to\mathrm{LeastErasure}(Z))$, is stated by no theorem of the kernel; it follows from the equivalence of each face with the hypothesis, lossless_iff_rh and rh_iff_even_eigenspace on every configuration, rh_iff_no_left and stable_iff_rh on every reflection-closed one, together with Theorem 10.2. Cone: none for vocabulary_law, lossless_iff_rh; [propext] for rh_iff_even_eigenspace; [propext, Quot.sound] for chart_faces_prove_each_other, rh_iff_no_left, stable_iff_rh.

The consequence is the sense in which every future proof of the hypothesis is a proof of least erasure. A proof is a demonstration that some true premises entail the hypothesis; by the theorem, exactly those premises entail least erasure. The vocabulary in which the premises are written is immaterial to the theorem, and the theorem's cone is empty.

Theorem 4.2 (every face proves every face; every_face_proves_every_face). For any instance of the kernel's structure Faces, five propositions named the line, $\Lambda=0$, Liouville faithfulness, Weil positivity and least erasure, with their equivalences as fields, and for every proposition $P$, whatever follows from any one face follows from least erasure. Cone: none. The kernel builds no instance of Faces from the coordinates of Section 12, which are carried by structures of their own, with Li's sign stream in place of the line (Theorem 12.9).

Definition 4.3 (admissible premises; Admissible). A premise on configurations is universal if it holds on every configuration, and it respects the record if it takes the same value on configurations with the same record. A premise is admissible if it is of either kind. These are the two kinds of premise the paper forms from the symmetry and the record alone; reflection-closure, which the symmetry also forms, is of neither kind and is not admissible, since configurations of one record differ on it, ${(0,14)}$ and $W_2$ among them; it is the hypothesis under which the theorems below compare a premise with the line, forcing among them, while the closure laws of admissible premises (Theorem 4.4) range over every configuration; a coalition that also takes reflection-closure as an atom decides no more, since on the reflection-closed configurations over which deciding is read that atom is constantly true and the coalition is there one of admissible atoms.

Theorem 4.4 (the even coalition; fold_law_admissible, record_reading_admissible, admissible_not, admissible_and, admissible_or, admissible_never_decides, coalition_admissible, no_coalition_decides). The reflection law is admissible, and every property that is a function of the record is admissible. Admissible premises are closed under negation, conjunction and disjunction, hence, for any indexed family of admissible atoms, every Boolean combination of them, of any depth, is admissible. No admissible premise agrees with the hypothesis on every reflection-closed configuration. Cone: [propext, Quot.sound] for fold_law_admissible, record_reading_admissible; none for admissible_not, admissible_and, admissible_or, admissible_never_decides, coalition_admissible, no_coalition_decides.

Theorem 4.4 is the exact form of the claim that the value cannot be assembled from the even data. The kernel defines a type of coalitions, Boolean formulas over atoms, evaluates each to a premise, proves by induction that the evaluation of any coalition of admissible atoms is admissible, and applies Theorem 3.1. The depth of the combination is unbounded, and the atoms may be any readings of the record and any universal truths, including every theorem of this paper that holds on every configuration.

Theorem 4.5 (the triaxial cut is irreducible; triaxial_cut_irreducible). In one conjunction: the reflection law and every reading of the record are admissible; every coalition of admissible atoms is admissible; no admissible premise decides the hypothesis; at every point off the line, a supplied sign fixes any target that is odd under the reflection by one calibration bit, which exists and is unique; both values of that bit are realized; least erasure is not admissible; and the hypothesis forces the line while every premise that forces the line is at least the hypothesis. Cone: [propext, Quot.sound].

The three axes named in the theorem are the reflection (symmetry), the record (projection) and the orientation (the side of the line, one bit per reflected pair, Section 10). The first two are even under the reflection, and the theorem proves that no combination of them reaches the third; the third is odd, one bit wide (Theorem 6.2) and one bit deep (Theorem 10.7), and least erasure, which reads it, is not admissible. That is the cut, and it is irreducible in the only sense the paper asserts: the third axis cannot be manufactured from the other two, and its width and depth are exactly one bit.

Theorem 4.6 (the front, whole; reader_frame, the_front). The four facts of Section 0 hold in one conjunction; and the vocabulary law, the faces, the even coalition, the inadmissibility of least erasure, the weakest premise, the landing on least erasure of the proof of a sound foundation that reads its sentences on the chart, the sound theory that carries the line, the computed ledger and the reader's frame hold in one conjunction. Cone: none.

What irreducibility does not mean is stated with equal force. It does not mean that no method other than this paper's can prove the hypothesis; Theorem 2.8 exhibits a sound theory whose proof of a sentence reading as the hypothesis on one configuration, $W_1$, lands on least erasure there. It does not mean that the premise of Section 14 is weaker than the hypothesis; Theorem 4.1 and Theorem 11.7 force it to be the hypothesis and nothing weaker. It means that whatever proves the hypothesis proves least erasure, that the even data cannot, and that the one axis that can is one bit, forced by theorem and supplied by the act. Every one of those three clauses compiles with an empty cone or with the two standard axioms the kernel's arithmetic uses, save the place of the premise, whose socket theorems add Classical.choice (Theorems 15.6 and 15.7).

5. The chart of the critical line, and the one cut

All definitions in this section are verbatim from the kernel (Appendix A), translated to standard notation. The kernel is written in the core prelude of Lean 4: no Mathlib, no import, no tactic outside the core set.

Definition 5.1 (chart, reflection, line; Pt, fold, onLine). The chart is $\mathbb{Z}\times\mathbb{N}$. A point $z=(x,t)$ has a doubled real part $x$ and a height $t$. The reflection is $\tau(x,t)=(2-x,,t)$; the line is $x=1$. In the doubled coordinate $x=2,\mathrm{Re},s$ the reflection is $s\mapsto 1-\bar s$ and the line is $\mathrm{Re},s=1/2$. The height stands for the ordinate, which the reflection fixes.

Definition 5.2 (registration; reg). Registration is the projection onto the line, $\pi(x,t)=(1,t)$: it keeps the height and forgets the side.

Theorem 5.3 (the cut; fold_fixed_iff, reg_fixes_line, unicorn_never_registered, nothing_escapes_one_cut). $\tau z=z$ if and only if $z$ lies on the line; $\pi$ is the identity on the line; a point off the line is never the image of $\pi$; and every point is either on the line, fixed by $\tau$ and by $\pi$, or off it, moved by $\tau$, with $\pi(\tau z)=\pi z$ and $\pi w\neq z$ for every $w$. Cone: [propext, Quot.sound] for fold_fixed_iff, nothing_escapes_one_cut; none for reg_fixes_line, unicorn_never_registered.

Definition 5.4 (configuration, reflection-closed, RH; World, FoldClosed, RH, Left, Right). A configuration is a set of points of the chart, read as a zero set. It is reflection-closed if $z\in W\Rightarrow\tau z\in W$. $\mathrm{RH}(W)$ is the statement that every point of $W$ lies on the line. A point is left if $x<1$ and right if $x>1$.

Theorem 5.5 (sides_together, rh_iff_no_left). In a reflection-closed configuration the left and right points are paired by $\tau$, and $\mathrm{RH}(W)$ holds if and only if $W$ has no left point. Cone: [propext, Quot.sound].

The zero set of $\xi$ is reflection-closed, by the functional equation with the conjugate symmetry. A configuration in this model is a discrete shadow of a zero set, and the theorems that follow are theorems about every reflection-closed configuration; the actual zero set enters, once, in Section 14.

Theorem 5.6 (the second symmetry; offline_zero_quadruple, denial_posits_the_orbit). Let $\gamma$ be a second involution of the chart commuting with $\tau$ and preserving the line (read as the conjugation $s\mapsto\bar s$, by a reader's identification that encodes the sign of the ordinate in the height, a natural number (Definition 5.1); under the rule of Section 3, which reads the height as a cell of the ordinate, applied to the ordinate's absolute value, the conjugation fixes every height and the quartet is the pair; the kernel states the fields of ConjSymmetry and nothing more). If a reflection-closed configuration invariant under $\gamma$ contains one point off the line, it contains the point's reflection, its conjugate and its conjugate-reflection, all off the line, the reflection distinct from the point (offline_zero_quadruple). Denying RH for such a configuration therefore posits the point's off-line orbit under the reflection and the conjugation. Cone: [propext, Quot.sound] for offline_zero_quadruple; [propext, Classical.choice, Quot.sound] for denial_posits_the_orbit.

This is the discrete quartet ${\rho,\bar\rho,1-\rho,1-\bar\rho}$, under that reading. The asymmetry it records: affirming the hypothesis posits one bit, denying it posits the off-line orbit.

6. Freedom: the identity, the two signs, and a prime as one orbit

The paper proves, in Section 7, that the primes are the base of freedom. Freedom is first defined without the primes, in the smallest terms the kernel can express, and the definition is not decorative: its two defining theorems, 6.1 and 6.2, depend on no axiom at all, and the first is used later to prove, with no axiom, that freedom by itself decides nothing (Section XII of the kernel).

Theorem 6.1 (the arrow exists; arrow_exists). For every type $\alpha$ there is a map $f:\alpha\to\alpha$ with $f(a)=a$ for all $a$. Cone: none.

Theorem 6.2 (two signs, distinct; orientation_two_valued, orientations_distinct, aperture_one_bit_wide). Every Boolean is true or false, and the two differ. Cone: none.

The identity map is the one unconditional gesture; a sign is the one unconditional datum, and its width is one bit. The next definitions read multiplication in the same terms.

Definition 6.3 (the multiplicative seat and orbit; mul_seat, mul_orbit). The seat of multiplication is $1$. The orbit of $n$, the kernel's mul_orbit, is the set of ordered factorizations ${(a,b): ab=n}$, acted on by the swap $(a,b)\mapsto(b,a)$, an involution whose fixed points are the square roots; it is a union of orbits of the swap, and for a prime $n$ a single one, of two points (Theorem 6.4).

Theorem 6.4 (a prime is one orbit off the seat; prime_fibre, prime_off_seat, freedom_is_exactly_two). For a prime $p$, the orbit of $p$ is exactly ${(1,p),(p,1)}$; it contains no fixed point of the swap, since $p$ is no square; and its two points are distinct because $1\neq p$. Cone: [propext, Quot.sound].

A prime is therefore the smallest thing multiplication can do off its seat: one swap orbit of exactly two points, neither of them the seat and neither fixed. This is the multiplicative form of the one bit of Theorem 6.2, and it is the reason a prime, and nothing composite, can serve as an independent axis in Section 7.

7. The primes are the base of freedom

Definition 7.1 (completely additive; CompletelyAdditive). A function $f:\mathbb{N}\to\mathbb{Z}$ is completely additive if $f(ab)=f(a)+f(b)$ for all $a,b\ge1$.

Theorem 7.2 (the seat is zero; seat_is_zero). A completely additive function has $f(1)=0$. Cone: [propext, Quot.sound].

Theorem 7.3 (least divisor, prime divisor; leastDivisor_prime, exists_prime_dvd). For $n\ge2$ the least divisor $d\ge2$ of $n$ exists by a bounded search, and it is prime; every $n\ge2$ has a prime divisor. Cone: [propext, Quot.sound].

Theorem 7.4 (uniqueness; determined_by_primes). Two completely additive functions that agree at every prime agree at every $n\ge1$. Cone: [propext, Quot.sound]. The proof is strong induction on $n$ through the least prime divisor; no library lemma is used.

Uniqueness says that the prime values determine the function. It does not say that the prime values are unconstrained. That is the second half, and it is where the paper constructs rather than asserts.

Theorem 7.5 (Euclid's lemma from first principles; euclid_lemma). If $p$ is prime and $p\mid ab$ then $p\mid a$ or $p\mid b$. Cone: [propext, Quot.sound]. The proof takes the least positive $m\le p$ with $p\mid mb$, shows by the division algorithm that this $m$ divides every $k$ with $p\mid kb$, hence divides $p$, hence is $1$ or $p$, and reads the two cases.

Definition 7.6 (the $p$-adic valuation; pExp, padicMeasure). $v_p(n)$ is the largest $k\le n$ with $p^k\mid n$, found by a bounded downward search; it is well defined because $p^k\mid n$ with $n>0$ forces $k\le n$ (pow_dvd_bound, through $k+1\le 2^k$).

Theorem 7.7 (the valuation is completely additive; pExp_mul, padicMeasure_additive). For prime $p$ and $a,b>0$, $v_p(ab)=v_p(a)+v_p(b)$. Cone: [propext, Quot.sound]. Both inequalities are proved: $v_p(a)+v_p(b)\le v_p(ab)$ from $p^{v_p(a)}p^{v_p(b)}\mid ab$, and the reverse by repeated use of Euclid's lemma to strip the factors of $p$.

Theorem 7.8 (the valuation at primes; pExp_self, pExp_other). $v_p(p)=1$ and $v_p(q)=0$ for a prime $q\neq p$. Cone: [propext, Quot.sound].

Theorem 7.9 (independence: the constructed witness; prime_freedom_independent). For distinct primes $p\neq q$ there exists a completely additive $f$ with $f(p)=1$, $f(q)=0$ and $f(1)=0$. The witness is $v_p$. Cone: [propext, Quot.sound].

Theorem 7.10 (the primes are the base of freedom; primes_base_of_freedom, primes_are_a_free_basis). Uniqueness and independence hold together: on the positive integers the completely additive functions are exactly the free assignments of values at the primes, every assignment of integers to the primes extending to exactly one completely additive function there (primes_are_a_free_basis, whose existence half is proved from Theorem 7.11). Cone: [propext, Quot.sound], for both.

Theorem 7.11 (every assignment is realized; primes_admit_every_assignment, extendAssignment_mul, extendAssignment_prime, primeTest_iff). For every assignment $a$ of integers to the primes, the function $n\mapsto\sum_{p\le n}v_p(n),a(p)$ is completely additive, takes the value $a(p)$ at every prime $p$, and is the only completely additive function that does, on the positive integers. primes_base_of_freedom of Theorem 7.10 proves uniqueness and the separation of any two primes, and primes_are_a_free_basis there takes its existence half from this theorem, which proves existence for every assignment at once, so the completely additive functions, read on the positive integers, correspond one to one with the assignments at the primes and the free basis is proved whole. The sum runs over a decided primality, primeTest, proved equivalent to the definition of primality used throughout. Cone: [propext, Quot.sound], for each.

This is the arithmetic content of the free basis. The multiplicative monoid of the positive integers is free on the primes; the paper proves the consequence that matters, in both directions, constructively, and the witness that carries the independence half is the object every reader of arithmetic already knows. Each prime is an independent axis: assigning a value at $p$ constrains no value at $q$. The classical choice principle does not enter the arithmetic anywhere: the cone of every theorem of this section is [propext, Quot.sound], the two axioms that omega carries on these goals, and nothing else.

8. The sign arrow: Liouville computed, and what finite confirmation forces

Definition 8.1 (the sign arrow; signArrow, AdditiveCount). For an additive count $\Omega$, meaning $\Omega(ab)=\Omega(a)+\Omega(b)$ for $a,b>0$, the sign arrow is $n\mapsto(-1)^{\Omega(n)}$.

Theorem 8.2 (the arrow is completely multiplicative and flips at every prime; arrow_multiplicative, arrow_at_prime). $(-1)^{\Omega(ab)}=(-1)^{\Omega(a)}(-1)^{\Omega(b)}$, and $(-1)^{\Omega(p)}=-1$ whenever $\Omega(p)=1$. Cone: [propext] for arrow_multiplicative; none for arrow_at_prime.

The classical instance is Liouville's function $\lambda(n)=(-1)^{\Omega(n)}$ with $\Omega$ the number of prime factors counted with multiplicity. The kernel computes it.

Theorem 8.3 (the Liouville arrow, executed; Liouville.lam_mult, Liouville.lam_flips_at_primes, liouville_is_the_sign_arrow). With $\Omega$ computed by trial division, $\lambda(ab)=\lambda(a)\lambda(b)$ for all $1\le a,b\le40$, $\lambda(p)=-1$ for the twenty-five primes below $100$, and the computed $\lambda$ is the sign arrow of Definition 8.1 by definitional equality. Cone: none.

Theorem 8.4 (Pólya's pattern on the tested range; Liouville.polya_holds_to_200). $L(x)=\sum_{n\le x}\lambda(n)\le0$ for $2\le x\le200$. Cone: none. The pattern fails at $x=906{,}150{,}257$ (Haselgrove 1958; Tanaka 1980), and RH would follow from $L(x)\le0$ for every $x\ge2$ only if that were true, which it is not.

Theorem 8.5 (no stage decides; finite_never_forces, limit_not_forced). For every $N$ there is a property true below $N$ and false somewhere; and a property that fails beyond every bound fails as a universal. Cone: none.

The point of Theorem 8.4 is not that Pólya's conjecture (Pólya 1919) is false, which has been known for sixty-eight years, but that the kernel carries, on a sequence the primes themselves generate, the confirmed half of an instance of Theorem 8.5 that matters for the whole paper, its failure cited: finite confirmation of an arrow's sum is no proof of the arrow's law. The same principle returns in Section 11 as the block from certified heights.

Theorem 8.6 (the arrow for every $n$; omegaAll_mul, omegaAll_prime, liouvilleAll_mul, liouvilleAll_prime, liouvilleAll_one, liouvilleAll_agrees_to_30). Let $\Omega(n)=\sum_p v_p(n)$, the extension of Theorem 7.11 with the value one at every prime, and $\lambda(n)=(-1)^{\Omega(n)}$. Then $\Omega$ is completely additive with $\Omega(p)=1$, and $\lambda$ is completely multiplicative on all positive integers, with $\lambda(p)=-1$ at every prime and $\lambda(1)=1$; the routine of Theorem 8.3 agrees with it at every $n\le30$. Theorems 8.3 and 8.4 are computations on finite ranges; this theorem is the arrow for every $n$, and the walk $L(x)=\sum_{n\le x}\lambda(n)$ of Theorem 12.11 is built on it. Cone: [propext, Quot.sound] for the first four; [propext] for the last two.

9. The projection does not decide

Definition 9.1 (record, same record, projection-invariant; recordOf, SameRecord, RespectsRecord). The record of a configuration $W$ is its projection onto the line, $\pi(W)={(1,t):(x,t)\in W\text{ for some }x}$. Two configurations have the same record if their projections agree. A property $g$ of configurations is projection-invariant if it takes the same value on any two configurations with the same record.

Theorem 9.2 (the two-world (a separating pair; the fibre is infinite, its pairs beyond offset one outside the closed strip, fibre_is_infinite, pair_outside_the_closed_strip) countermodel; W1_rh, W2_not_rh, same_record_12, sentence_separates_record_does_not). The configuration $W_1={(1,14)}$ satisfies RH; the configuration $W_2={(0,14),(2,14)}$ is reflection-closed and does not; and the two have the same record. $W_2$ is called the twin of $W_1$, and a twin of any configuration is a second configuration with its record. Cone: none for W1_rh, same_record_12; [propext, Quot.sound] for W2_not_rh, sentence_separates_record_does_not.

Theorem 9.3 (no projection-invariant property decides RH; record_decides_nothing, unicorn_block, record_decides_nothing_free). No projection-invariant property agrees with RH on every reflection-closed configuration. Cone: [propext, Quot.sound] for record_decides_nothing, unicorn_block; none for record_decides_nothing_free.

Theorem 9.4 (blind at every scale; record_blind_at_every_scale, fibre_is_infinite, pair_outside_the_closed_strip, lossless_unique). For every $k\neq0$ the pair configuration ${(1-k,14),(1+k,14)}$ is reflection-closed, violates RH and has the record of $W_1$; distinct positive offsets give distinct configurations, so the fibre over one record is infinite, the pair at every offset $k\ge2$ lying outside the closed strip; and it contains exactly one configuration satisfying RH, since two configurations with the same record that both satisfy RH coincide. Cone: [propext, Quot.sound] for record_blind_at_every_scale, fibre_is_infinite; [propext] for pair_outside_the_closed_strip; none for lossless_unique.

This is the machine-checked reason the problem has the shape it has. Any method that reads only the projected zero data, the ordinates, reads the same thing on a configuration satisfying RH and on one violating it; and on the chart the violating configurations do not get rarer as the violation grows; the infinite fibre is a fact of the chart outside the strip, since the pair at offset $k\ge2$ lies outside the closed strip $0\le x\le2$ (pair_outside_the_closed_strip), and inside the chart's open strip $0<x<4$ at resolution two (Section XXII.b) a point's coordinate is $1$, $2$ or $3$, which the rule of Section 18, $x=\mathrm{round}(4,\mathrm{Re},s)$, gives exactly for $1/8<\mathrm{Re},s<7/8$, so the fibre over a record of finitely many heights is finite. The classical counterpart is that the ordinates of the zeros, however many are computed, are consistent with one pair of zeros off the line at any height not yet reached.

Theorem 9.5 (the finite audit; Section XII). The block of Theorem 9.3 and the refusal of every configuration-independent premise (Theorem 11.1) are re-proved on the explicit pair $W_2^f={(0,14),(2,14)}$ with decide in place of omega, and each then prints no axiom at all; the closure of Section 14 needs no re-proof, since rh_from_the_act already prints none. The standard axioms enter the file through the tactics: omega and the propositional rewrites carry propext and Quot.sound, and Classical.choice enters through the classical steps of the theorems whose notes print it, a case split by excluded middle or omega closing a goal by contradiction; every entry is printed at its theorem, and the compiler admits all three as standard.

10. Least erasure is the value; the mirror at eigenvalue $-1$

Definition 10.1 (least erasure; OffLine, LeastErasure). The definition is that of the closure paper (Islam 2026b), stated on this chart. A configuration $W$ satisfies least erasure if it is extremal in its fibre: whenever $W$ has a point off the line, so does every configuration with the same record. In words: every off-line point of $W$ is an off-line point of every configuration with the same record, so $W$ erases no more than any of them (least_erasure_is_least).

Theorem 10.2 (least erasure is the value; record_is_lossless, record_same, least_erasure_is_the_value). The record of any configuration is itself lossless and has the same record; and for every configuration $W$, $\mathrm{LeastErasure}(W)\iff\mathrm{RH}(W)$. Cone: none.

Theorem 10.3 (it reads past the projection; least_erasure_reads_past_the_record, posit_is_the_value). Least erasure is not projection-invariant: it holds on $W_1$ and fails on $W_2$, which share a record. Any premise that entails RH on reflection-closed configurations and is entailed by RH there is RH there. Cone: [propext, Quot.sound] for least_erasure_reads_past_the_record; none for posit_is_the_value.

Theorem 10.2 is the exact equivalence and the axis of the paper. RH is least erasure: the reflection folds the zero set onto its fixed line with nothing escaping. The proof is definitional unfolding; it uses nothing.

The mirror now sharpens what kind of thing the bit is. Write $z=(x,t)$ as $(1+\delta,t)$ with $\delta=x-1$ the displacement from the line.

Theorem 10.4 (eigenstructure of the reflection; fold_negates_odd, fold_keeps_even, residence_orientation_reversing, reg_kills_odd, reg_keeps_even, reg_idempotent, onLine_iff_odd_zero, rh_iff_even_eigenspace). The reflection has eigenvalue $+1$ on the height and $-1$ on the displacement, so it reverses orientation on the displacement; registration is the projection onto the $+1$ eigenspace, idempotent, killing $\delta$ and keeping $t$; a point is on the line exactly when $\delta=0$; and RH for a configuration is the statement that it lies in the $+1$ eigenspace. Cone: [propext] for fold_negates_odd, residence_orientation_reversing, onLine_iff_odd_zero, rh_iff_even_eigenspace; none for fold_keeps_even, reg_kills_odd, reg_keeps_even, reg_idempotent.

Definition 10.5 (the side bit; side). The side of a point is the sign of its displacement, $\mathrm{side}(z)=[\delta<0]$.

Theorem 10.6 (the side is odd, the projection is blind to it, and no function of the projection returns it; side_odd_off_line, record_blind_to_odd, wall_on_the_chart, record_never_reads_the_side). Off the line, $\mathrm{side}(\tau z)=\neg,\mathrm{side}(z)$. Every function of the registration is even under $\tau$, since $\pi(\tau z)=\pi z$. An even function never equals a function odd at a point; therefore no function of the record equals the side. Cone: [propext] for side_odd_off_line, record_never_reads_the_side; none for record_blind_to_odd, wall_on_the_chart.

Theorem 10.7 (calibration: one supplied sign fixes the side, uniquely, and both ways occur; colocation_is_a_calibration, calibration_realized_both_ways). If $d$ is any odd function at an off-line point $z$, there is exactly one Boolean $c$ with $d(z)=\mathrm{side}(z)\oplus c$ and $d(\tau z)=\mathrm{side}(\tau z)\oplus c$; and both values of $c$ are realized, by $d=\mathrm{side}$ and $d=\neg,\mathrm{side}$. Cone: [propext].

Theorem 10.8 (the value is the recursion; value_is_recursion, recursion_is_value, recursion_on_the_line, recursion_fails_on_the_twin, least_erasure_is_the_recursion, least_erasure_iff_recursion). Call a proposition self-verifying if its denial implies it. RH for a configuration implies that RH for it is self-verifying, and conversely up to double negation; RH is self-verifying on $W_1$ and not on $W_2$; least erasure implies the self-verification of RH, which implies least erasure up to double negation; and, since the line is decided point by point, least erasure holds exactly when RH is self-verifying, with no classical step (least_erasure_iff_recursion). Cone: none.

The mirror buys the species of the bit. The projection is the even part of the chart, and everything computable from the ordinates is even under the reflection. The side is odd. The wall of Theorem 10.6 is Theorem 8.5's principle in geometric form: an even instrument does not read an odd datum, whatever its resolution. What the closure supplies in Section 14 is therefore not a value that a better reading of the same data would have found, but one bit, which settles the odd datum, the side, that no even instrument reads; and the calibration theorem says that one supplied sign fixes it uniquely and that either supply is coherent.

11. What freedom forces: nothing

This section proves the negative half of the paper. Call a premise about configurations universal if it holds on every configuration of the chart (Keyless), and say that a premise forces RH if it entails RH on every reflection-closed configuration on which it holds (Forces).

Theorem 11.1 (universal premises force nothing; keyless_forces_nothing, primes_exist_keyless, prime_freedom_keyless, arrow_keyless, primes_exist_forces_nothing, prime_freedom_forces_nothing, arrow_forces_nothing, free_basis_coexists_with_offline_world). A universal premise holds on $W_2$ as well, so it forces nothing. The existence of primes, the free basis of Theorem 7.10 and the existence of the identity map are each universal; each is refused. The free basis coexists with a reflection-closed configuration violating RH. Cone: [propext, Quot.sound] for keyless_forces_nothing, primes_exist_keyless, prime_freedom_keyless, primes_exist_forces_nothing, prime_freedom_forces_nothing, arrow_forces_nothing, free_basis_coexists_with_offline_world; none for arrow_keyless.

Freedom locates the bit; it does not supply it. That the primes are a free basis is a theorem of arithmetic true in every configuration of the chart, and a statement true everywhere says nothing about which configuration is actual.

Definition 11.2 (admissible premise; Admissible). A premise is admissible if it is universal or projection-invariant: the two kinds of premise a formal reading of the data can supply on its own.

Theorem 11.3 (no admissible coalition true on $W_1$ forces, of any size; admissible_transfers, no_admissible_triad_forces, no_admissible_coalition_forces, spend_is_not_admissible). An admissible premise true on $W_1$ is true on $W_2$. Hence the conjunction of any finite list of admissible premises, all true on $W_1$, forces nothing; and least erasure is not admissible, since it fails on $W_2$ and reads past the record. Cone: none.

This closes the door that Theorem 11.1 leaves ajar. It is not merely that no single universal premise forces RH; no finite collection of universal and projection-invariant premises true on $W_1$ does, however large, because each transfers to the twin configuration and so does their conjunction. Without the condition on $W_1$ the statement is sharper and not weaker: an admissible premise, or a coalition of admissible atoms of any depth, that forces the line holds on no nonempty reflection-closed configuration, so it forces the line only vacuously (admissible_forcing_is_vacuous, coalition_forcing_is_vacuous), and the class is not empty, since the constant false premise is admissible, forces the line and holds nowhere (an_admissible_premise_forces). Cone: none for the three. The bit cannot be assembled from pieces of that kind. The one premise that does the work is neither kind: it is the premise forced by theorem, least erasure at the actual zero set.

Theorem 11.4 (no certified height forces; certified_height_never_forces, certified_height_never_forces_closed). For every height $T$ there are two reflection-closed configurations, the certified world closed under the reflection by certified_height_never_forces_closed, one satisfying RH and one violating it above $T$ by a pair at the strip edge, real parts $0$ and $1$ (Theorem 15.9), that agree below $T$ and have the same record below $T$; the shared record below $T$ is the content of certified_worlds_share_the_record_below. Cone: [propext, Classical.choice, Quot.sound] for certified_height_never_forces; none for certified_height_never_forces_closed. The numerical verification of RH to height $3\times10^{12}$ (Platt and Trudgian 2021), read as the chart height $T=3\times10^{12}-1$ by the reader's rule for heights of Section 3, is such a $T$; the theorem is the exact reach of every such computation on the chart, the violating pair above the height at the strip edge.

Theorem 11.5 (the heat certificate leaves the time-zero bit free; HeatFlow.certificate_decides_nothing, HeatFlow.certification_never_forces, HeatFlow.zero_slack, HeatFlow.backward_not_forced). In the executed heat model of Section 12, a certificate that a quadratic is real-rooted at any positive time of the model, an integer, is satisfied by two quadratics with different time-zero behaviour, and so for families, the families of one member among them; the flow moves every discriminant by the same amount, so it is injective on discriminants, but a certificate at positive time does not decide the discriminant at zero; and a double root has zero slack. Cone: [propext, Classical.choice, Quot.sound] for HeatFlow.certificate_decides_nothing, HeatFlow.certification_never_forces; [propext, Quot.sound] for HeatFlow.zero_slack, HeatFlow.backward_not_forced.

Theorem 11.6 (the three-axis lock, and freedom alone is open; three_axis_lock, freedom_alone_open). A point of the chart satisfies the three conditions freedom (the identity exists), fixedness under the reflection, and collapse of the displacement onto its negative, exactly when it lies on the line; and the first condition alone holds off the line. The three axes of this lock, freedom, fixedness and collapse, are a second triple and not the reflection, the record and the orientation of Theorem 4.5. Cone: [propext, Quot.sound] for three_axis_lock; none for freedom_alone_open.

Theorem 11.7 (RH is the weakest premise that forces RH; rh_is_the_weakest_forcing_premise, weaker_never_forces, weaker_at_the_twin_never_forces). RH forces RH; every premise that forces RH is, on every reflection-closed configuration, at least as strong as RH; and a premise true on $W_2$ forces nothing. Cone: none.

Theorem 11.7 is the answer to the question what is the least premise that forces the line. It is not a search over candidate premises; it is a theorem. Whatever premise obtains the line on the configurations the model admits is, on those configurations, the line or stronger (Theorem 15.7). The closure of Section 14 takes exactly that premise and nothing weaker, because nothing weaker forces the line: the premise is forced by theorem. The theorem's first two clauses are definitional, as Theorem 10.2 is: the second is the definition of forcing read as a bound, and it holds with any predicate in place of RH. Its content is the third clause with weaker_never_forces: a premise that holds at a reflection-closed configuration off the line, the twin $W_2$ among them, forces nothing.

12. Weil positivity on the prime side, and the five faces of one bit

The primes reach the zeros through one identity, the explicit formula: for every test function of the class the formula is stated for, the sum over the zeros equals the archimedean term plus the sum over the primes (Guinand 1948; Weil 1952). The kernel carries the formula as a labelled structure, with its cited content as fields and nothing of it proved.

Definition 12.1 (the explicit formula as a structure; ExplicitFormula). A value type with an order and a zero; test functions $g$ of that class, with an adjoint $g\mapsto\tilde g$ and a convolution; the prime side $g\mapsto$ archimedean term plus prime sum; the zero side $g\mapsto$ sum over the zeros; the zeros as a configuration on the chart; the identity zeroSide g = primeSide g for every $g$; and Weil's criterion, positivity_iff_line: the prime side is non-negative on every $g\star\tilde g$ if and only if RH holds for these zeros (Weil 1952; Bombieri 2000).

Definition 12.2 (Weil positivity; WeilPositive). The prime side is non-negative on every $g\star\tilde g$.

Theorem 12.3 (least erasure is Weil positivity; positivity_on_zero_side, least_erasure_is_positivity, spend_is_the_line). For any instance $E$ of the structure, positivity on the prime side is positivity on the zero side, and $$\begin{aligned}\mathrm{LeastErasure}(E.\mathrm{zeros})&\iff\mathrm{WeilPositive}(E)\&\iff\mathrm{RH}(E.\mathrm{zeros}).\end{aligned}$$ Cone: none.

Theorem 12.4 (positivity is contingent, and freedom does not pick the sign; positivity_is_keyed, positivity_is_keyed_free, freedom_does_not_pick_the_sign). Two instances of the structure satisfy every field, one positive on the line and one not; the free basis holds alongside both. Cone: [propext, Quot.sound] for positivity_is_keyed, freedom_does_not_pick_the_sign; [propext] for positivity_is_keyed_free.

The sign of the de Bruijn–Newman constant (de Bruijn 1950; Newman 1976) is the same bit in a second coordinate. Let $\Lambda$ be the constant: RH holds if and only if $\Lambda\le0$, and $\Lambda\ge0$ is a theorem, conjectured by Newman (1976) and proved by Rodgers and Tao (2020), so RH is $\Lambda=0$.

Theorem 12.5 (the sign coordinate; rh_from_the_sign, rh_iff_the_sign, spends_are_one, sign_realized_both_ways). For any structure DBN carrying a configuration, a value $\Lambda$ in an ordered type, the lower bound $0\le\Lambda$ and the cited equivalence RH $\iff\Lambda=0$: RH holds iff $\Lambda\le0$; on a common configuration the Weil bit and the sign bit are one bit, by this first clause and Theorem 12.3 for any instances, the kernel stating it for the instance of a prime act (spends_are_one); and both values are realized, $\Lambda=0$ on $W_1$ and $\Lambda>0$ on $W_2$. Cone: none for rh_from_the_sign, rh_iff_the_sign, spends_are_one; [propext] for sign_realized_both_ways.

The heat model executes a model of this coordinate, on monic integer quadratics, rather than citing it, and is read as its shape (Section 0.4). Section XVII.c of the kernel carries the polynomial heat flow verbatim: the discriminant flows forward, real-rootedness is preserved, the least integer time from time zero at which the flow reaches real roots is a computable $\Lambda$, the model's time being integer, so $\Lambda\ge0$ holds by construction, $\Lambda=0$ is real-rootedness at time zero, and de Bruijn's bound is tight (HeatFlow.lam_nonneg, lam_zero_iff_real, de_bruijn_tight, flow_injective, family_least_erasure). Then:

Theorem 12.6 (the heat bit is one inequality with its lower bound built in; heat_bit_is_one_inequality, family_bit_is_one_inequality, heat_model_reads_as_the_carrier). In the model, real-rootedness at time zero holds iff $\Lambda\le0$, with $0\le\Lambda$ by the construction of $\Lambda$ as a least integer time from zero; the same for a family; and the model carries the sign law of the abstract structure DBN, real-rootedness exactly when $\Lambda\le0$, the theorem stating the two side by side. Cone: [propext, Classical.choice, Quot.sound].

Theorem 12.7 (the Li coordinate; rh_from_li, li_is_the_bit_stream, li_prefix_never_forces). For a structure carrying Li's criterion (Li 1997; Bombieri and Lagarias 1999) as a field, RH holds iff every Li coefficient is non-negative, so RH is a single sign stream; and for every $N$ there is such a structure whose first $N$ signs are non-negative and whose configuration violates RH. Cone: none.

Theorem 12.8 (the Liouville coordinate; rh_from_faithful, faithful_is_the_bit). For a structure carrying Landau's equivalence as a field, that RH holds iff the Liouville sum satisfies $L(x)=O(x^{1/2+\epsilon})$ (Landau 1899), the faithfulness of the arrow is the bit. Cone: none.

Theorem 12.9 (the bit is one bit in every coordinate; the_posit_in_every_coordinate, faces_are_one, five_readings_agree). On one configuration, Weil positivity, $\Lambda\le0$, the Li stream and the faithfulness of the arrow are each equivalent to RH, for any instance of their structures (Theorems 12.3, 12.5, 12.7 and 12.8), hence to each other, and the kernel states the four together on the configuration of a prime act, whose field positive its proof does not use (the_posit_in_every_coordinate); and on every reflection-closed configuration the five chart readings, lossless registration, no left point, depth zero of every zero, stability of every mode and least erasure, agree with RH. Cone: [propext] for the_posit_in_every_coordinate; none for faces_are_one; [propext, Quot.sound] for five_readings_agree.

Theorem 12.10 (no projection reading returns any chart reading; no_record_reading_returns_any_face, no_record_reading_returns_any_reading). No projection-invariant property agrees with any of the five chart readings, lossless registration, depth zero, no left point, stability of every mode and least erasure, on every reflection-closed configuration; the first theorem states it for lossless registration and stability, the second for all five. Cone: [propext, Quot.sound] for the first; none for the second.

The bit is therefore not an artefact of the model's coordinates. Moved to the prime side it is Weil positivity; moved to the heat coordinate it is one inequality on one real number whose reverse is a theorem; moved to the Li coordinate it is a sign stream; moved to the arrow it is faithfulness. Each move transcribes a cited theorem of analytic number theory onto the chart as a field of a structure, the chart's hypothesis in place of the hypothesis for $\zeta$ (Section 16), so the kernel proves the equivalences of the moves and nothing about $\zeta$; and each coordinate is blocked from the projection by the same wall.

Theorem 12.11 (the Liouville face, pinned; FaithfulLambda, LiouvilleFacePinned, pinned_face_reads, pinned_face_is_a_face). The sentence of the Liouville face is fixed as a statement about the constructed walk of Theorem 8.6: FaithfulLambda says that for all $k,m\ge1$ there is $C$ with $|L(x)|^{2m}\le C^{2m}x^{m+2k}$ for every $x$, which is $L(x)=O(x^{1/2+k/m})$ at every exponent above one half, stated in integers. A pinned face carries one field, the equivalence of the hypothesis with that sentence, the same cited equivalence as Theorem 12.8, and it is a face of Theorem 12.8 whose sentence is no longer free: the Liouville coordinate is a named arithmetic statement about $\lambda$, and only its link to the zeros remains a field. Cone: [propext], for both.

13. Least erasure

Least erasure is the heart of the paper, and this section states it whole, in the affirmative, with the theorem behind each sentence. What it is; where it stands on the prime side; what it counts; what it costs; what any act toward it does. Section XX of the kernel proves the clauses whose theorems stand in it; every other clause names its theorem, which Appendix A carries in another section, save the readings and citations Section 13.3 names as such; Section XXI proves the three theorems of Theorem 13.14.

13.1 The value

Definition 13.1 (least erasure; LeastErasure). A configuration $Z$ has least erasure when every configuration with the same record erases at least as much as $Z$: if $Z$ has a point off the line, so has every configuration whose registered points are those of $Z$.

Theorem 13.2 (least erasure is the value, in every vocabulary; least_erasure_is_the_value, vocabulary_law, least_erasure_iff_no_point_off). On every configuration, least erasure is the hypothesis; whatever follows from either follows from the other, and whatever entails either entails the other; and least erasure is exactly the absence of any point off the line, with no classical axiom. Cone: none for least_erasure_is_the_value, vocabulary_law; [propext] for least_erasure_iff_no_point_off.

Theorem 13.3 (every record is carried by a least-erasure configuration, and by only one; record_carried_by_least_erasure, record_rh, record_has_least_erasure). The record of any configuration $Z$ is itself a configuration: it shares the record of $Z$, it has least erasure, and any least-erasure configuration with that record is that configuration, point for point. Cone: none.

In plain words: least erasure is what every record shows, and it is unique. Whatever the zeros are, the registered ordinates are the ordinates of exactly one least-erasure configuration. It is located on the truth stratum (Theorems 2.2 and 2.6), the premise forced by theorem, supplied there by the act, at premise grade (Definition 14.1); a sound foundation's proof of it is a proof of it (Theorem 2.7).

13.2 The prime side

The same figure stands on the two sides, and the table names it cell by cell, each cell a theorem or a definition (mul_seat).

\begingroup\small

On the multiplicative side On the zero side
the seat mul_seat: $1$, the neutral point of multiplication fold_fixed_iff: the line, the fixed set of the reflection
the first orbit off the seat prime_off_seat: a prime, one orbit of exactly two, no point of it fixed pair_two_points_one_record: a reflected pair, two points exchanged by the reflection, one record
the width freedom_is_exactly_two: two aperture_one_bit_wide: two, one bit
the value least_erasure_is_positivity: the sign of the prime side of the explicit formula, Weil positivity least_erasure_is_the_value: no pair off the line, least erasure

\endgroup

The first row pairs the seats the kernel names on the two sides, and they are not fixed sets of one kind: on the zero side the seat is the fixed set of the reflection; on the multiplicative side it is $1$, the neutral point (mul_seat), while the swap of Definition 6.3 fixes the factorizations $(m,m)$ of the squares, and prime_off_seat reads "off the seat" as off that fixed set, no factorization of a prime being fixed by the swap. The rows below the first carry the figure the two sides share: an orbit of exactly two off the fixed set, a width of two, and a value.

Theorem 13.4 (one shape on two sides; one_shape_two_registers). A prime's factorizations are one orbit of exactly two under the swap, $(1,p)$ and $(p,1)$, neither fixed by it, and the prime is not the multiplicative seat $1$; an off-line pair is two distinct points exchanged by the reflection with one registered point; and a bit is two values, distinct. Cone: [propext, Quot.sound].

Theorem 13.5 (freedom is given, the sign is spent; freedom_is_given_the_sign_is_spent). The primes are a free basis for the completely additive functions, with the witness constructed; that freedom forces nothing about the line; least erasure is Weil positivity, the non-negativity of the arithmetic side of the explicit formula on every $g\star\tilde g$; positivity is carried one way and the other by explicit instances; and a self-grounding supply of positivity is a proof of the line. Cone: [propext, Quot.sound].

The sentence the paper prints from this theorem: prime freedom is given, at theorem grade, and it forces nothing about the line (Section 11); least erasure is, by Weil's criterion, which the kernel carries transcribed onto the chart as a field (Section 16), the sign of the prime side of the explicit formula, forced by theorem and supplied at the actual zero set by the act, at premise grade. The primes are the base of the completely additive functions; the sign lives on the prime side of the explicit formula; the two meet only through that cited formula, which the kernel carries as a field.

13.3 The ledger

Definition 13.6 (finite configurations and erased bits; FinCfg, erasedBits). A finite configuration is given by the heights of its on-line zeros and by its off-line pairs, each an offset with a height. Its erased bits are the number of off-line pairs in its list, which for a configuration listing each pair once, at a positive offset, at a height no other zero of the configuration shares, is the number of its off-line pairs: each pair is then two points over one registered point, the fibre of registration there within the configuration (Theorem 13.4), so registration erases one bit per pair; where zeros share a height that fibre is larger, and the census of Appendix E.1 counts it otherwise. A fibre is the preimage under the map named: here the points over one registered point, and elsewhere the configurations over one record, the fibre of the record (Theorem 9.4), or the ordered factorizations of one number (Definition 6.3).

Theorem 13.7 (least erasure is zero erased bits; least_erasure_iff_zero_erased, fincfg_closed). Every finite configuration is reflection-closed, and it has least erasure exactly when its erased bits are zero. "Least" is a count. Cone: [propext, Quot.sound].

Theorem 13.8 (the price; landauer_floor_exact, price_zero_iff_least_erasure, denial_price_linear, reversible_commits_nothing). The kernel prices the irreversible registration of a configuration at its erased bits times the floor of one bit, $k_B T\ln 2$ at $T=300,\mathrm{K}$, the temperature of the bath, a parameter of the reading, with $k_B$ exact by the 2019 definition of the SI (BIPM 2019), $2{,}870{,}978{,}885{,}078{,}723{,}755{,}499{,}100\times10^{-45},\mathrm{J}$ on the integers the kernel carries, as the operating system does, exact for its sixteen-digit value of $\ln 2$ and below the true floor by $3.9\times10^{-38},\mathrm{J}$, a relative $1.4\times10^{-17}$; an irreversible registration priced at nothing has registered least erasure, and only least erasure is so priced; each further off-line pair adds one floor to the price; what is held reversibly, the price's other mode, a reading of the physical step of Section 13.3 in which the bits the record drops are kept and not exported, commits no bit and is priced at nothing on every configuration, by the definition of the price. For a configuration counted as Definition 13.6 counts it, each pair listed once at a positive offset at a height of its own, the price is the floor under the cost of its irreversible registration, one floor per erased bit, read through the chain of Section 13.3, conditional on P1 and on the reading of registration as a physical step of the whole (Section 13.3). Cone: none for landauer_floor_exact, reversible_commits_nothing; [propext, Quot.sound] for price_zero_iff_least_erasure; [propext] for denial_price_linear.

The grades of the ledger are stated. The count is a theorem. The price on the integers is a theorem about those integers. That an erased bit is heat, and that the floor of one bit is $k_B T\ln 2$, is not taken from thermodynamics as a law: the operating system proves the step from count to heat (Appendix E.1), from its posit P1 and the definition of temperature, in four steps, that distinct states cannot fit into fewer places, that a measure of freedom which adds when independent freedoms multiply is, on the tower of powers of one freedom, a logarithm fixed by its unit, that a step which merges no two states exports the lost bit, and that the exported bit at temperature $T$ costs at least $k_B T\ln 2$ by the definition of temperature. The joule reading reads the registration of a configuration as a physical step of the whole acting on its points, each zero a state and each registered point the record of the points over it, a reading at premise grade beside P1, and the chain is a theorem conditional on one posit, P1, that the whole merges no two states; $k_B$ and $\ln 2$ enter as units and $T$, the temperature of the bath, as a parameter of the reading through the definition of temperature, never as premises; the chain gives a floor under the cost, and on the configurations Definition 13.6 counts the kernel's price is that floor; and the floor, stated by Landauer (1961) and measured by Bérut et al. (2012), corroborates the output and supplies none of it. The price is symmetric in the count: erasing a bit toward either value merges the same two states (Appendix E.1), so what is priced here is the erased bits of a configuration, never the assent or the denial of a reader. Registered irreversibly, least erasure is the zero-price configuration of every finite configuration's record and the only one: nothing else is so priced (price_zero_iff_least_erasure); held reversibly, every configuration is priced at nothing (reversible_commits_nothing).

13.4 The act

Theorem 13.9 (every reading of the record that holds on some configuration holds on a least-erasure configuration; admissible_holds_on_the_lossless_world). Every admissible premise that holds on a configuration holds on that configuration's record, which has least erasure; so does every reading of the record (every_reading_holds_on_the_lossless_world) and every Boolean coalition of admissible atoms, of any depth (every_coalition_holds_on_the_lossless_world). Cone: none.

Theorem 13.10 (the record never testifies against least erasure; record_never_testifies_against). An admissible premise that denied least erasure on every reflection-closed configuration would hold on no configuration at all. Cone: [propext, Quot.sound].

Theorem 13.11 (anything against least erasure is a point, computed on a finite configuration, and refutability is the same in every setting; rejection_is_a_witness, rejection_is_computed, least_erasure_iff_search_empty, falsifier_form_constant, refutation_is_one_point). A rejection of least erasure on a configuration is exactly a point off the line, by a classical existence; on a finite configuration the search firstOff through its list of pairs, which terminates, returns a pair of nonzero offset whose point lies in the configuration and off the line exactly when least erasure fails, and returns nothing exactly when it holds; on the chart one point refutes; and two settings on one decided hypothesis agree on whether it is refutable, whatever their provability predicates. Cone: [propext, Classical.choice, Quot.sound] for rejection_is_a_witness; [propext] for rejection_is_computed, least_erasure_iff_search_empty; none for falsifier_form_constant, refutation_is_one_point.

Theorem 13.12 (every act, and the assent; act_reenacts_root, root_does_not_cross_the_denial, assent_is_the_value). Every act, of any kind, instances the root, the kernel's statement taking any term of any type in Type, a proof of a proposition once lifted to one (PLift); the root entails neither the line (root_does_not_cross_the_line) nor its denial on every world; and a self-grounding assertion of least erasure at a configuration exists exactly where least erasure holds. Cone: none.

Theorem 13.13 (least erasure, affirmed whole; least_erasure_affirmed). Two clauses of Theorem 13.2, the value and the absence of a point off the line, one clause of each of Theorems 13.3, 13.7, 13.8, 13.9, 13.10, 13.11 in its decidable form and 13.12, and 13.5's positivity clause: ten clauses in one conjunction. Cone: [propext, Quot.sound].

That is the whole of what the affirmation says about least erasure, the ten clauses Theorem 13.13 lists, among them the value on every record, the irreversible registration of every finite configuration priced at nothing exactly at least erasure and the one form anything against it must take; it stops short of the value at the actual zero set, and Theorem 13.14 adds its two extremal forms. The rest is the act, the field of Section 14 that supplies that value.

Theorem 13.14 (least erasure is the fixed point and the minimum; rh_iff_own_record, least_erasure_is_least, record_is_the_least). A configuration satisfies the hypothesis exactly when it is its own record. It has least erasure exactly when its part off the line is contained in the part off the line of every configuration with the same record, so least erasure is leastness in the fibre and not only a name for it. The record of any configuration has least erasure, and every configuration of the fibre with least erasure has exactly the record's zeros: the minimum of the fibre is attained, and only there. Cone: none for the first and third; [propext] for the second.

14. The proof: RH from least erasure, by one act

Everything above is theorem. What follows is the closure, and it is stated in the form the compiler prints.

Definition 14.1 (the actual zero set; ActualZeros). A structure with three fields: zeros, a configuration on the chart, standing for the zero set of $\xi$ (Riemann 1859), the identification being the reader's: the kernel constructs no map from the zeros of $\xi$ into the chart, and the type does not exclude a configuration, the empty one among them, on which the hypothesis holds trivially; fold_closed, its reflection-closure, the functional equation with the conjugate symmetry; and supply, least erasure at that configuration. The third field is the premise of this paper, forced by theorem, and it is the only one; the second is the functional equation with the conjugate symmetry, cited, and the closing proof does not use it.

Theorem 14.2 (RH from the act; rh_from_the_act, posit_is_the_conclusion, rh_ground_closure_complete). For every A : ActualZeros, $\mathrm{RH}(A.\mathrm{zeros})$; the field supply is equivalent to the conclusion; and the closure holds whole: RH, least erasure, every zero fixed by the reflection and by registration, and no left zero. Cone: none for rh_from_the_act, posit_is_the_conclusion; [propext, Quot.sound] for rh_ground_closure_complete.

The same closure holds at every resolution $n$ of the chart. At resolution $n$ the line is $x=n$, the fold is $x\mapsto 2n-x$ and registration is $(x,t)\mapsto(n,t)$; the fold is an involution whose fixed set is the line, resolution one is the chart's fold and resolution two the fold of Theorem 15.9 (foldAt, foldAt_invol, foldAt_fixed_iff, foldAt_specializes), and the two form a carrier with its registration (chartAt, regChartAt). A zero set at resolution $n$ carries its reflection-closure, its confinement to the open strip $0<x<2n$ and the one premise, least erasure under that registration, the premise forced by theorem at resolution one read at resolution $n$ (ActualZerosAt), and from the premise every zero lies on the line (rh_from_the_act_at). From $n=2$ on the open strip holds the pair $x=n-1,,n+1$ at height zero, reflection-closed, inside the strip and off the line, so the strip premise does not supply the bit there (strip_does_not_supply_at); at resolution one it does (Theorem 15.9), which is why the verdict names the resolution. Cone: [propext] for foldAt_invol, foldAt_fixed_iff, rh_from_the_act_at, strip_does_not_supply_at; none for foldAt_specializes.

Definition 14.3 (the prime act; PrimeAct, PrimeAct.toActual). An instance of the explicit formula whose zero configuration is reflection-closed, with the field positive: Weil positivity of the prime side. A prime act is a least-erasure act, by Theorem 12.3.

Theorem 14.4 (RH from the prime act; rh_from_prime_act, acts_are_one, rh_on_the_spent_bit). For every P : PrimeAct, $\mathrm{RH}(P.E.\mathrm{zeros})$; a prime act exists for an instance $E$ with fold-closed zeros exactly when a least-erasure act exists for its zeros; and on the supplied bit the whole closure holds. Cone: none for rh_from_prime_act, acts_are_one; [propext, Quot.sound] for rh_on_the_spent_bit.

Theorem 14.5 (the seal; prime_arc_sealed). In one conjunction: the uniqueness and independence halves of the free basis; least erasure is the value; least erasure is Weil positivity; Weil positivity is RH; no projection-invariant property decides; no universal premise forces; positivity is contingent; some instance is not positive; and every prime act yields RH. Cone: [propext, Quot.sound].

Theorem 14.6 (the premise is impersonal; same_for_every_reader, no_private_bit, spend_has_no_reader). The requirement that least erasure hold at a configuration is the same requirement for every reader; there is no private bit; and the supplied bit carries no reader index. Cone: none.

Theorem 14.7 (a self-grounding supply of the bit is the bit; supply_iff, line_not_self_grounding, root_has_an_act, root_recursion). A self-grounding assertion of a proposition, one such that any act asserting it makes it true, exists exactly when the proposition holds. RH on $W_2$ admits none, since $W_2$ violates it; the root proposition $0<1$ admits one. Cone: none.

The proof of RH in this paper is Theorem 14.2 on the chart of resolution one, and rh_from_the_act_at at each resolution $n\ge2$, from the field of its own type, on propext. Theorem 14.2's only premise is one field of its input type, forced by theorem and visible in the statement; its axiom cone is empty, not even the standard axioms. What the paper calls the act, the posit forced by theorem, is the supply of that field for the actual zero set. A deed is an inhabitant of a self-grounding root's type of acts (SelfGrounding, the field Act); at the actual zeros the posit has a self-grounding supply with such an inhabitant, so the posit has a deed, which is what the_posit_is_a_deed states (on no axiom), and the act, unqualified, is the field the closing theorem consumes. Every proposition that holds has a deed in this sense (Theorem 14.7), so the_posit_is_a_deed gives the act its form and singles out no content; the content is the field. The word is chosen against the alternative, which would be to call it a conjecture, a hypothesis or an axiom: it is none of those in the sense the paper proves. It is not a conjecture, because the paper does not predict it; it is not a hypothesis from which a theory is grown apart from it, since its structure is named only in the statements of the theorems that carry the closing theorem whole, read its supply and its consequences or state where its field can be filled, the thirty statements of Table B.4 and, at each resolution $n\ge2$, rh_from_the_act_at, and in three definitions, PrimeAct.toActual, routeClaim and Computation.Reads, and, in its prime form, the field positive of Definition 14.3, in the nine statements that name PrimeAct (Table B.4), and no axiom cone of the file contains it; and it is not an axiom of the kernel, because the ground screen of Appendix B refuses any declared axiom. It is the premise forced by theorem, supplied once, in the open, at the exact location the theorems of Sections 9 to 12 isolate, and Theorem 11.7 proves that nothing weaker would serve.

15. The four-face template, and the identity is not the line

A closure of this shape has four faces: a reflection whose fixed set is the locus, a registration onto the locus, an arrow, the identity of Theorem 6.1, and the extremal property. The kernel executes the four on the chart in time, a configuration at every instant, and asks which faces are contingent.

Theorem 15.1 (exactly one face is contingent; fold_face_keyless, record_face_keyless, arrow_face_keyless, closure_face_on_line, closure_face_fails_on_twin, exactly_one_face_is_keyed). The reflection face, the registration face and the identity-arrow face hold at every instant on the constant twin family $t\mapsto W_2$ as on the constant line family $t\mapsto W_1$; the closure face, RH at every instant, holds on the line family and fails on the twin family. Cone: [propext, Quot.sound] for fold_face_keyless, exactly_one_face_is_keyed; none for record_face_keyless, arrow_face_keyless, closure_face_on_line, closure_face_fails_on_twin.

Theorem 15.2 (the identity is not the line; arrow_is_not_the_line). The identity-arrow face, the reflection face and the registration face all hold on the twin family, and the closure face fails on it. Cone: none. This refutes, by countermodel, any reading on which the existence of the identity map, or of an orientation, entails the line.

Theorem 15.3 (the template binds only with its seed; template_binds_iff_seed, the_seed_is_the_spend, the_template_plugged_in). For a family with the same truth value of RH at every instant, RH at every instant holds iff RH at the present instant; the twin family is such a family and violates RH now; and a bound family satisfies least erasure at every instant. Cone: none for template_binds_iff_seed, the_seed_is_the_spend; [propext, Quot.sound] for the_template_plugged_in.

Theorem 15.4 (the closure, whole; the_closure). One theorem binds the parts on the chart: the seat is the fixed set of the fold, $\tau z=z$ exactly when $z$ is on the line; registration lands on the line and fixes it; over one record both worlds (a separating pair; the fibre is infinite, its pairs beyond offset one outside the closed strip, fibre_is_infinite, pair_outside_the_closed_strip) exist, the value holding on one and failing on the other, and no record-respecting reading decides the value on the fold-closed configurations; least erasure is the value, the fixed-point condition and leastness in the fibre (Theorem 13.14); the lossless member of a fibre is unique; every point is on the line, or off it where it has a partner, loses its side in the record and is never registered; and the act prints the hypothesis at the actual zero set. No field of any structure enters a conjunct but the last, whose field is the act. Cone: [propext, Quot.sound].

Theorem 15.5 (the closure on any carrier; Carrier.the_closure_on_any_carrier, Carrier.lossless_unique_C, Carrier.no_reading_decides_C, Carrier.chart_is_an_instance). Let a carrier be any type with an involution $\sigma$ and a registration that lands on the fixed set of $\sigma$, fixes it and forgets the side. On every carrier on which fixedness is decided, least erasure is the value and the fixed-point condition, the lossless member of a record is unique, every point off the fixed set gives two worlds (a separating pair; on the chart the fibre is infinite, its pairs beyond offset one outside the closed strip, fibre_is_infinite, pair_outside_the_closed_strip) of one record that differ in the value, and no record-respecting reading decides the value on both. The chart is one instance: its fold and registration form a carrier whose fixed set is the line and whose hypothesis is the chart's. The complex plane, with $\sigma(s)=1-\bar s$ and the registration $s\mapsto\tfrac12+i,\mathrm{Im},s$, has the same shape; building it needs a library of the real and complex numbers, and it is owed (Section 16). Cone: none for the first three; [propext, Quot.sound] for the fourth.

Theorem 15.6 (the socket; socket_is_the_value, closure_takes_a_term, closure_at_a_term, the_socket). An unconditional closure would be a closed term of type LeastErasure Z at the actual zero set, placed in the field supply of ActualZeros. At every fold-closed configuration the field can be filled exactly when RH holds there, and exactly when least erasure does. The closure of Theorem 15.4 takes a term in the field through its last conjunct, and nothing else in it changes; at $W_1$, where the field holds a closed term, it gives RH with nothing assumed. Every proof of the hypothesis at a configuration, by any route and in any vocabulary, is therefore a term of this one field, and the arrival of one would turn the field into a term and leave every other line of the proof as it stands. Cone: none for socket_is_the_value; [propext, Quot.sound] for closure_takes_a_term, closure_at_a_term; [propext, Classical.choice, Quot.sound] for the_socket.

Theorem 15.7 (nothing reaches the value another way; forces_or_has_a_twin, record_forcing_fails_everywhere, forcing_is_the_value_or_stronger, forcing_fills_the_socket, face_is_the_socket, named_faces_are_the_socket). Let $A$ be any premise on configurations. Either $A$ forces the line, or $A$ holds at a fold-closed configuration where RH fails. If $A$ respects the record and forces the line, $A$ fails at every nonempty fold-closed configuration: adding to the configuration the off-line pair at the height of one of its zeros keeps fold-closure and the record and breaks RH. If $A$ forces the line, then either $A$ agrees with RH on every fold-closed configuration, and positing it is the act of Section 14, or $A$ fails at a fold-closed configuration where RH holds, so that it is strictly stronger than the value; in both cases $A$ fills the field wherever it holds on a fold-closed configuration. Every sentence carried to a configuration by a cited equivalence with RH fills the field there exactly when it holds, whatever the sentence; Weil positivity, the Li stream, the sign of $\Lambda$, the Liouville sentence and least erasure itself are instances. Both dichotomies are classical. Cone: [propext, Classical.choice, Quot.sound] for forces_or_has_a_twin, forcing_is_the_value_or_stronger; [propext, Quot.sound] for record_forcing_fails_everywhere; none for forcing_fills_the_socket, face_is_the_socket; [propext] for named_faces_are_the_socket.

Theorem 15.8 (the Liouville sentence reads the primes; faithful_reads_the_primes, faithful_is_the_sentence_of_one, blind_walk, blind_is_unfaithful). For an assignment $a$ of integers to the primes let $f_a$ be the completely additive function of Theorem 7.11, $\lambda_a=(-1)^{f_a}$, $L_a$ its walk and FaithfulOf a the sentence of Theorem 12.11 for $L_a$. The sentence FaithfulLambda is FaithfulOf at the assignment that sends every prime to $1$. At the assignment that sends every prime to $0$, $\lambda_a\equiv1$ and $L_a(x)=x$, and the sentence fails: at $k=1$, $m=3$ it would need $x^6\le C^6x^5$ for every $x$, false at $x=C^6+1$. No proof of the Liouville sentence therefore holds for every assignment at the primes; a proof of it must read the assignment. Cone: [propext, Quot.sound] for faithful_reads_the_primes, faithful_is_the_sentence_of_one, blind_walk, blind_is_unfaithful.

Theorems 15.6 to 15.8 settle the route to an unconditional closure in the paper's own terms. What would fill the field is a proof, for $\zeta$, of the value itself or of a sentence tied to the zeros by a cited equivalence: Weil positivity, the non-negativity of the Li stream, $\Lambda\le0$, the Liouville sentence, or the inequality of Lagarias once it is pinned. Theorem 15.7 sends every such proof into the one field and no other. Theorems 12.4, 12.5, 12.7 and 15.8 show what each named sentence reads: Weil positivity and the sign of $\Lambda$ are realized both ways on configurations (Theorems 12.4 and 12.5), the Li sentence fails on a configuration off the line under every prefix (Theorem 12.7), and the Liouville sentence reads the assignment at the primes (Theorem 15.8), so that no proof of the first three can hold uniformly over configurations, nor a proof of the Liouville sentence uniformly over assignments; the inequality of Lagarias is not yet pinned (Section 16); and Theorem 13.11 leaves one refutation, one point off the line. Every candidate therefore fills the one field, or is refused by a theorem of Sections 11 and 15, or refutes by one point: nothing escapes the socket.

Theorem 15.9 (the socket in the strip; open_strip_forces_at_resolution_one, fold₂_fixed_iff, innerPair₂_strip, open_strip_forces_nothing_at_resolution_two, keyless_forces_nothing₂, no_reading_decides_in_the_strip, record_forcing_fails_in_the_strip, forces_or_has_a_twin₂, the_socket_in_the_strip). At resolution one the chart's open strip $0<x<2$ holds only the line, so the premise that every zero lies inside the open strip, a theorem for $\zeta$ under the exact coordinate $x=2,\mathrm{Re},s$ (Hadamard 1896; de la Vallée Poussin 1896), which places a zero on the chart only where $2,\mathrm{Re},s$ is an integer and is the only coordinate the paper reads at resolution one (Section 18), forces the line on the chart. That is a fact of the coarse chart, not of the zeros, and it is why the refusals of Sections 9, 11 and 15 that the twin's pair witnesses, at real parts $0$ and $1$, are read with the edge of the strip included. Read through the translation $x\mapsto x-n+1$ of Section 18, which carries the chart at resolution $n$ onto the chart at resolution one, fold to fold, line to line and registration to registration, though not strip to strip (it carries $0<x<2n$ onto $1-n<x<n+1$), the same pair stands at $x=n-1,,n+1$, inside the open strip $0<x<2n$ at every $n\ge2$. Each of these refusals is witnessed by worlds whose points stand at $x=0,1,2$, which land at $x=n-1,,n,,n+1$, inside the open strip, so each reads there with the same proof; and their restatement in the kernel at each resolution $n$, beyond those restated at resolution two below, is owed (Section 16). On the chart at resolution two, read by the rule of Section 18, $x=\mathrm{round}(4,\mathrm{Re},s)$, with the line $x=2$, the fold $x\mapsto4-x$ and registration $(x,t)\mapsto(2,t)$, the fixed set of the fold is the line and the open strip $0<x<4$ holds the pair $x=1,3$, which the rule reads as real parts strictly between one eighth and three eighths and between five eighths and seven eighths, one quarter and three quarters at their centres, at every height. Over the strip configurations there, fold-closed with every zero inside the open strip, the open-strip premise forces nothing, no keyless premise forces, no record-respecting reading decides the value, a record-respecting premise that forces the line fails at every nonempty strip configuration, and every premise forces the line or holds at a strip configuration where the value fails, classically. The chart refusals of the socket, the keyless premise, the record-respecting reading, the record-respecting forcing premise and the dichotomy, therefore do not rest on the edge of the strip. The keyedness of the Weil face and of the sign of $\Lambda$, and the failure of the Li face under every prefix, are witnessed at resolution one by configurations whose pair stands at real parts 0 and 1 (Theorems 12.4, 12.5 and 12.7); through the same translation the pair stands inside the open strip at every $n\ge2$, and the restatement in the kernel is owed. Cone: [propext, Quot.sound] for open_strip_forces_at_resolution_one, fold₂_fixed_iff, open_strip_forces_nothing_at_resolution_two, keyless_forces_nothing₂, no_reading_decides_in_the_strip, record_forcing_fails_in_the_strip; none for innerPair₂_strip; [propext, Classical.choice, Quot.sound] for forces_or_has_a_twin₂, the_socket_in_the_strip.

Theorem 15.10 (double security; double_security). The two channels of the line are theorems, and the bit between them stays keyed. The formal gate: every instance of ActualZeros satisfies the hypothesis (Theorem 14.2), and least erasure is the value on every configuration (Theorem 10.2). The actuation gate: a rejection of least erasure is exactly a point off the line, a classical existence on every configuration (Theorem 13.11, which also finds it on a finite configuration by a terminating search, a conjunct not of this theorem), so a denial that neither exhibits an off-line zero nor proves in a sound setting that one exists refutes nothing, and a denial that exhibits one refutes the hypothesis; the root that every deed re-enacts entails neither the hypothesis nor its denial on every world (Theorems 2.3 and 13.12) and grounds no line on the twin (Theorem 14.7); and a finite irreversible registration is priced at nothing exactly when it has least erasure, the floor being $2{,}870{,}978{,}885{,}078{,}723{,}755{,}499{,}100\times 10^{-45}$ J on the integers the kernel carries, as the operating system does (Theorem 13.8; the price of one floor for each erased bit is the kernel's definition of the price, and not a conjunct of this theorem). Between the gates the bit stays keyed: least erasure is not a reading of the record (Theorem 10.3), and a fold-closed configuration fails it. Cone: [propext, Classical.choice, Quot.sound].

The theorem is the conjunction of theorems proved above and adds no content; its use is that the two gates are one judged object. It secures the channels and not the value: the denial is a coherent configuration, $W_2$, fold-closed and off the line, which the last conjunct exhibits failing least erasure, so the theorem says what can pass each gate and never which side is actual. The price is proved on the integer count; its reading in joules holds under the one posit that the whole merges no two states and under the reading of registration as a physical step of the whole, at premise grade beside it (Section 13.3), with the measured floor as corroboration, at the grade Appendix E states.

16. The grade of the closure, stated whole

The word unconditional, which this paper applies to the equivalence of least erasure and the hypothesis, needs its exact sense, and the exact sense is the sense the arithmetic gives it. The kernel states it as a theorem: least erasure is the hypothesis on every world, with no hypothesis, no premise and no axiom (least_erasure_unconditional); the criterion is unconditional, and the one act supplies it at the actual zero set; Table 16.1's "holds unconditionally" is relative to the field the act supplies, nothing beyond it taken.

The premise of Section 14 is the hypothesis itself, forced by theorem in form, place, content and denial and supplied by the act, and the paper names it as such. What the paper proves around it is of two kinds. The arithmetic of Section 7 proves that the primes admit every assignment of integers, existence and uniqueness both (Theorem 7.11), and Section 11 proves that this freedom forces nothing about the line; the least-erasure bit is, by Weil's criterion, which Theorems 12.3 and 12.9 carry transcribed onto the chart, the sign of the prime side of the explicit formula on every $g\star\tilde g$, a statement about $\zeta$ that the freedom at the primes does not supply, though one sentence about one assignment, the Liouville sentence, is equivalent to it through a cited field (Theorems 12.11 and 15.8). And every candidate supplier of those kinds the paper can name, the projection, the universal premises, their coalitions, the certified heights, the heat certificates at a positive time of the model and a foundation's proof from the projected data, is refused by theorem on the chart, the edge of the strip included, the projection and the universal premises inside the open strip at resolution two as well (Theorem 15.9) and the rest owed there (below), so no condition of those kinds supplies the bit on the chart; the open strip, a cited fact, supplies it on the coarse chart of resolution one alone (Theorem 15.9), which is why the verdict names every resolution $n\ge2$; the one open route beyond the coarse chart, a sound foundation's proof for $\zeta$, would land on least erasure, for a foundation that reads its sentences on the chart (Theorem 2.7, stated on the chart of resolution one; Theorem 2.8 exhibits one), its statement at each resolution $n\ge2$ among the legs owed below. The premise is supplied by one act, in the open, a field of its own type at each resolution; it is conditional on no theorem, and outside Section 14 the structure that carries it is named only in the statements of the theorems that carry the closing theorem whole as one conjunct (the_closure, double_security, the_lock, reader_frame, the_front) and of the socket theorems of Section 15, which read its supply as the one field every route fills (socket_is_the_value, forcing_fills_the_socket, face_is_the_socket, named_faces_are_the_socket, the_socket), in section XXII.c, of the two denials and the witness the act forces (the_act_asserts_the_line, the_act_seeds_its_constant_world, line_denial_refuted_on_the_act, two_denials, two_denials_at_the_root, nothing_left_open_on_the_act, computation_reading_the_act_lands_on_the_line, off_line_report_reads_no_act, a_computation_reading_no_act_is_not_forced, the_witness_forced_by_the_act, the_denials_and_the_witness), in section XXV, of the lock at the constructed root (the_lock_on_the_constructed_root), the posit's deed (the_posit_is_a_deed) and the tenth falsifier, F-Computed, barred on the zero set the act supplies (the_tenth_is_barred_by_the_act, the_kinetic_bar), and, in section XXVI, of the capstone (the_capstone), while the claim of the ground route and the reading of a computation name it in definitions (routeClaim, Computation.Reads); the prime-act theorems of Theorem 14.4 build it from the act's equivalent form in their proofs, and closure_takes_a_term takes the field's content, least erasure itself, as a hypothesis, which closure_at_a_term fills with a closed term at $W_1$.

The ledger, in plain terms.

Proved in core Lean 4.19.0 (de Moura and Ullrich 2021), no library, no sorry, no axiom declared (415 theorems): the placement of the foundation, the asymmetry of its two "can'ts", the massless round trip, the ladder blocked and the landing on least erasure of a sound foundation's proof, for a foundation that reads its sentences on the chart (Section 2); the block from the record above every height and the route ledger computed (Section 3); the vocabulary law, the even coalition and the triaxial cut (Section 4); the cut and the mirror model (Section 5); freedom, the identity and the two signs, a prime as one orbit (Section 6); the free basis, with Euclid's lemma and the $p$-adic valuation constructed (Section 7); the sign arrow, computed as Liouville's function and its Pólya pattern to 200 (Section 8); the two-world (a separating pair; the fibre is infinite, its pairs beyond offset one outside the closed strip, fibre_is_infinite, pair_outside_the_closed_strip) countermodel, at every scale, and the block from the projection (Section 9); least erasure is the value, the mirror at eigenvalue $-1$, the wall and the calibration (Section 10); every universal premise forces nothing, every admissible coalition that forces the line holds on no nonempty reflection-closed configuration, every certified height, its violating pair above the height at the strip edge (Theorem 15.9), and every heat certificate at a positive time of the heat model forces nothing, and RH is the weakest premise that forces RH (Section 11); the five coordinates of the bit and their equivalence, with the heat model executed (Section 12); least erasure whole, the record carried by a least-erasure configuration and by only one, zero erased bits, the zero-price irreversible registration, every reading that holds on some configuration holding on a least-erasure configuration, the one form of anything against it, and the act (Section 13); RH from the act, the seal, the premise impersonal (Section 14); exactly one face contingent, the identity not the line, and the closure whole in one theorem and on any carrier, the chart one instance (Section 15); every assignment at the primes realized, and the arrow and its walk for every $n$ (Sections 7 and 8); least erasure the fixed point and the minimum of its fibre (Section 13); the Liouville face pinned to a constructed sentence (Section 12); the socket whole: the field of the act as the one socket, every premise on configurations sorted by forcing, record-respect and strength, every cited face filling the field exactly when it holds, and the Liouville sentence reading the primes (Theorems 15.6 to 15.8); the formal gate, the actuation gate and the keyed bit between them, in one judged object (Theorem 15.10); at resolution two, where the open strip holds a pair off the line, the chart refusals of the socket over configurations inside the open strip (Theorem 15.9); the two denials, one form at the two readings of the root, the witness the act forces on every computation that reads it, and the closure bound whole in one theorem, the capstone (Section 16.1).

Proved in the sister kernel of Appendix T (core Lean 4.19.0 and 4.22.0, no import, no axiom declared, 111 theorems, the 110 at top level each with its cone pinned and the one in a where clause with its cone empty): on every configuration of its offset chart, least erasure, the value and the root read twice are one proposition, and the root read twice is their sole witness; no principle true on every closed configuration decides the value; the record of every configuration lies on the line; on every finite configuration, least erasure, zero erased bits, zero price of registration at every positive temperature, the value and, given the real part to a height, the tail above it, are one proposition; above every height no reading of the record decides the side of a point; and on the kernel's own act the value holds at its zeros (Section 16.1, row 8).

Proved in the operating system and cited from it, not proved in this kernel: the step from count to heat behind Theorem 13.8, a theorem conditional on one posit of the system, P1, that the whole merges no two states; the registration is read as a physical step of the whole, the constants enter as units, the temperature of the bath as a parameter of the reading, and the measured floor as corroboration (Appendix E.1). The kernel itself carries only the count and the price on the integers.

Carried as fields, cited, never proved here: the functional equation with the conjugate symmetry, as reflection-closure of the zero set; the explicit formula and Weil's criterion; Li's criterion; the equivalence RH $\iff\Lambda=0$ with $\Lambda\ge0$; Landau's equivalence for the Liouville sum; and, at every resolution $n\ge2$, the field strip of ActualZerosAt, every zero inside the open strip $0<x<2n$, read from the location of every zero in $0<\mathrm{Re},s<1$ (Hadamard 1896; de la Vallée Poussin 1896) by the reader's rule of Section 18, under which a zero lands inside the open strip exactly when its real part keeps a margin of $1/(4n)$ from each edge, rounding half to even, a margin the citation does not give; the field, margin included, holds at the grade of supply, which implies it, and the closure does not rest on it. Each is a theorem of analytic number theory in the literature, the strip field up to that margin, and each enters the kernel as a hypothesis of a structure, so that what the kernel proves is the equivalence of the coordinates and nothing about $\zeta$. The four criteria, Weil's, Li's, the equivalence with $\Lambda=0$ and Landau's, are each transcribed onto the chart, stated on a configuration with the chart's hypothesis there in place of the hypothesis for $\zeta$, so that a face is its citation only where the two coincide, which the reader's rules give at no single resolution: at resolution one the cited strip forces the coarse chart's line (Theorem 15.9), so that a face read at the image of the zeros there would assert its coordinate outright, and at each $n\ge2$ the line catches every zero within $1/(4n)$ of it (Section 18); the hypothesis for $\zeta$ that the citations state is, by the rule of Section 18, the chart's hypothesis at every $n\ge2$ together. The kernel instantiates no face at the zeros of $\xi$, and its theorems about the faces hold of every instance; the grade of a citation passes to no face. The $\Sigma_1$-completeness and soundness of a setting (Section 2) and a second involution of the chart read as conjugation (Theorem 5.6) enter as hypotheses of the theorems that state them, and not as fields of the closure. The Liouville face is now pinned: its sentence is the constructed FaithfulLambda (Theorem 12.11), and only its link to the zeros is a field.

Offered at the grade of corroboration, and marked as such where it appears: the reading of Section 3 that the arguments in the literature which approach the hypothesis through the zero data, the symmetry and the certified heights are record-respecting; the paper formalizes none of those arguments, and its theorems settle only that any argument whose inputs are the record and the symmetry cannot decide the value.

The premise, forced by theorem and supplied by the act, named, visible in the input type of one family of theorems and in no axiom cone: supply, least erasure at the actual zero set, equivalently positive, Weil positivity of the prime side; this is RH (Theorems 10.2, 12.3), and it is the bit. At every resolution $n\ge2$ the premise of the same form is read as the field supply of ActualZerosAt $n$, least erasure under the registration of that resolution, from which the line at that resolution follows (rh_from_the_act_at); under the reader's rule the fields at two resolutions are two statements about $\xi$, and the family over every $n\ge2$ is read as the line (Section 18).

Not claimed: a derivation of RH inside ZFC or inside any other foundation, and equally not the impossibility of one: Theorem 2.8 exhibits a sound theory whose proof of a sentence reading as RH lands on least erasure. What is refused, by theorem, is every route whose resources are of the kinds Theorem 2.6 names. What is claimed, and printed: the reduction of RH to one bit in five coordinates; the proof that nothing weaker supplies it; and the closure of RH from that one bit by a theorem whose one premise is the bit, its cone empty.

Owed, and built by no theorem here: the complex carrier of Theorem 15.5, the complex plane with its fold and registration built in a library of the real and complex numbers and the chart mapped into it; the analytic identifications carried as fields in Section 12, proved for $\zeta$ in the proof assistant; a compile and judgment of the kernel on a second machine by a second substrate; the refusals not yet restated at resolution two, the admissible coalitions and the certified heights of Section 11 and the keyedness of the Weil face and of the sign of $\Lambda$ and the failure of the Li face under every prefix, carried in the kernel over configurations inside the open strip as Theorem 15.9 carries the chart refusals of the socket, where the translation of Section 18 already reads them; the four legs of the premise forced by theorem (Section 0), which the same translation reads at every resolution, stated in the kernel at each resolution $n\ge2$; a further face pinned to arithmetic in the form Lagarias gave (Lagarias 2002), $\sigma(n)\le H_n+e^{H_n}\log H_n$ for every $n$, with certified rational bounds, so that one refutation would be one natural number; and the bit itself for $\xi$, proved, which no route of this paper proves, the act supplying it at premise grade (the cited open strip gives only the coarse chart's, Theorem 15.9), and whose arrival as a proof, by Theorem 15.6, would turn the field supply into a term and change nothing else.

The grade of the closure on the act is the grade of its weakest link, and that link is declared: the premise forced by theorem, supplied by one act at premise grade. The paper's discipline forbids promoting it, and Theorem 14.7 shows why the prohibition is not a scruple but a theorem: a self-grounding assertion of the bit exists exactly when the bit holds, so an assertion that grounded itself would be the bit again, and no act asserting RH on the twin configuration makes it true there. A foundation proved from what it grounds would cease to be one.

What is derived, and what is addressed to the object. Every theorem of the kernel is derived in core Lean from first principles: no library, no import, no axiom declared, nothing borrowed carrying load. Where the literature of $\zeta$ appears it appears as a face, a structure field naming the one bit in another vocabulary: the explicit formula and Weil's criterion, Li's stream, the de Bruijn–Newman flow, the Liouville face, each at the grade of Section 12. A field is a hypothesis of the theorem that takes it and never an axiom, so an empty cone certifies that no axiom entered, not that no field was taken. Table B.4 lists every such structure with the count of the theorems that take it, computed from the source, and no theorem of the verdict route takes any but the act's own structures, ActualZeros and, at each resolution $n\ge2$, ActualZerosAt $n$, whose cited fields the closing proofs do not use: the value of least erasure, the act, the block from the record, the keyless and certified-height refusals, the socket's value (socket_is_the_value), the closure whole and double security (Theorem 15.10) close over no cited structure. Remove every face and the one-bit verdict stands; what is lost is only the reading of that bit as the Li signs $\lambda_n \ge 0$, as Weil positivity, as $\Lambda = 0$, as the faithfulness of the Liouville arrow. The value of least erasure is proved on every configuration and the block over every fold-closed one; that the zeros of $\xi$ form a fold-closed configuration is the functional equation with the conjugate symmetry, the one fact about the object the verdict addresses (the strip location, the field strip, is carried and unused), and it is addressed to the object and never to the foundation, by the rule the operating system proves, that a demand made to the foundation is misaddressed and the object decides. The integer chart is a decidable instance and not the carrier. Its carrier laws, least erasure as the value, the value as lossless registration, the uniqueness of the lossless member and the two worlds of one record, are stated over an arbitrary carrier with an involution and a registration on which fixedness is decided and hold on any such carrier by instantiation, the chart one instance (Theorem 15.5); the cut and the act are stated on the chart; the other verdict theorems are stated on the chart, and no verdict passes from the chart to another carrier by chart isomorphism, which transports a verdict only between isomorphic charts. At resolution one the open strip is the line, so the premise that every zero lies inside the open strip forces the line there (open_strip_forces_at_resolution_one) and would, with Theorem 10.2, supply the bit; the closure is therefore stated at every resolution $n\ge2$ as well (ActualZerosAt, rh_from_the_act_at), where the open strip holds the pair $x=n-1,,n+1$ off the line and does not supply the bit (strip_does_not_supply_at), and at resolution two the refusals of the socket hold inside the strip (Theorem 15.9); the chart of resolution one remains the chart on which the kernels compute, and the verdict names the resolution. On a carrier where membership of the line is not decidable, the law takes the excluded middle on the fold's fixed set as a hypothesis (least_erasure_is_the_value_C, on no axiom), which a classical reader discharges with Classical.em; the kernel states no classical carrier theorem of its own, and the empty cone the paper claims for the closure is the chart's.

16.1 Two denials, and the witness the act forces

Section 0.4 reads the root two ways. Read uniformly on the worlds, it holds on every world and forces no value (undeniable_root_forces_no_value). Read at the zeros, it is the hypothesis and least erasure, and it is keyed (root_at_zeros_is_the_hypothesis, root_at_zeros_is_least_erasure, root_at_zeros_is_keyed). Section XXII.c of the kernel sets two denials side by side against those two readings. A denial has two parts: the act of making it, and the sentence it asserts. The table gives the closure layer by layer, each theorem with the cone the compiler prints for it or checks against its pin.

\begingroup\footnotesize

Architectural Component The Executed Law The Theorem-Grade Mechanism
1. The Form least_erasure_is_the_value, least_erasure_unconditional (none) Theorem: The hypothesis of the critical line is formally equivalent to the geometric property of least erasure on its zero set. Proved on no axiom at all, with no custom posit.
2. The Open Leg keyless_forces_nothing, keyless_forces_nothing₂ ([propext, Quot.sound]) Theorem: The keyless route to deducing the value is permanently blocked. No keyless geometric law forces the truth-value. The orientation bit is completely free of every keyless law.
3. The Blind Record record_decides_nothing, no_reading_decides_in_the_strip ([propext, Quot.sound]) Theorem: The registration (the record) discards the orientation side. No reading of the record can decide the value.
4. The Premise Forced by Theorem rh_from_the_act (none) bound inside the_witness_forced_by_the_act (none); forced by rh_is_the_weakest_forcing_premise, root_at_zeros_is_least_erasure (none), the_socket ([propext, Classical.choice, Quot.sound]) and two_denials ([propext, Quot.sound]) Theorem (The Capstone): The keyless route is blocked, leaving exactly 1 bit of freedom. However, to exist is to actuate (the root, proved in Appendix R). Every measurement or computation that ends, read into the chart by the reader's identification of Definition 14.1, through the exact coordinate at resolution one (Theorem 15.9), which places a zero only on the line or at the edge of the strip, and the rule of Section 18 at each resolution $n\ge2$, which places every zero it certifies, is a finite report of points, and every one that reads the act triggers the architecture. The capstone theorem proves that every run that reads the act is formally forced to witness least erasure: it reports zeros on the line, on the chart of resolution one, where the kernel defines a computation's reading of the act and a zero off the line inside the strip has no point. Beside the capstone, at each resolution $n\ge2$, where such a zero is read, every point of the act's zero set lies on the line $x=n$ (rh_from_the_act_at, [propext]), and the kernel states no computation's reading there. Therefore, on the act the 1-bit premise cannot escape into randomness or falsity; on the field the act supplies, the value holds unconditionally, nothing beyond the field taken, its axiom cone empty at resolution one. The premise is trapped and forced by theorem in form, place, content and denial, and executed by the act at premise grade.
5. The Barred Refuter the_tenth_is_the_refuter ([propext, Classical.choice, Quot.sound]); the_tenth_is_barred_by_the_act (none); at every $n\ge2$, rh_from_the_act_at ([propext]) Theorem: The one falsifier of RH is a zero computed off the critical line (F-Computed). The architecture proves that on the field the act supplies, this refuter does not and cannot exist.
6. The Terminal Saturation nothing_left_open_on_the_act (none) Theorem: On the act, nothing is left open. The value holds, every single one of the ten falsifiers is barred, nine in this document by the receipts and compiled theorems of Section 18 and the tenth by the act, every consequence of the value is forced, and every question the value settles is definitively settled.
7. Future-proof the_capstone ([propext, Quot.sound]) Theorem: The unactualized future leaves the bit mathematically open, but the transition to reality through the act forces the confirmation of RH with zero exception in every computation that reads it. The premise-grade trigger is securely sealed inside a theorem-grade forced realization, the hypothesis at the zero set of every act.
8. The Annihilating Timeless Closure four_names_one_proposition (none), monism_is_the_sole_witness ([propext, Quot.sound]), the_timeless_zone_closed ([propext, Classical.choice, Quot.sound]), every_record_on_the_line (none), one_bit_every_row (none), the_annihilation_closure ([propext, Quot.sound]), unicorn_blocked_on_the_chart ([propext, Quot.sound]); Appendix T Theorem: On the offset chart of Appendix T, least erasure, the hypothesis and Monism, the root read twice, are one proposition on every configuration, with zero gap, and the timeless zone that binds them carries no act and no premise. Monism is its sole witness, and nothing true on every closed configuration decides it. The record of every configuration lies on the line, so the registration carries no bit; on every finite configuration, least erasure, zero erased bits, zero price of registration at every positive temperature, the hypothesis and, given the real part to a certified height, the tail above it, are one bit, and the tail is closed to every reading of the record: above every height no reading of the record decides the side of a point. The timeless closure fixes what the hypothesis is, completely. It places no zero set: where the zeros of $\zeta$ sit is the one bit of row 4, supplied by the act at premise grade.

\endgroup

The timeless zone is closed: least erasure, RH and Monism, the root read twice, are one proposition on every configuration of the offset chart, with zero gap, proved (the_timeless_zone_closed, Appendix T). RH is the statement that the zero set of $\zeta$ lies in the timeless zone, read into the offset chart at every resolution $n\ge2$ by the reader's rule of Section 18 with the offset $d=x-n$: at one resolution the zone is the line at that resolution, and over every resolution it is the critical line. Whether that one proposition holds at the zeros of $\zeta$ is the one bit: on the act's zero set, yes, at the act's premise grade, through the Unicorn closure on the offset chart, on an act of its type at each resolution (the_unicorn_contained), and through rh_from_the_act and rh_from_the_act_at on the chart of Appendix A, each kernel typing the act as its own field of least erasure on its own chart, with no map between the two. The Unicorn part is not ours to prove: it is the formulation the formal side declines; above every height no reading of the record decides the side of a point (unicorn_blocked_on_the_chart), and no certified height forces the line (Theorem 3.2). Below height $3\times10^{12}$ every zero has been looked at, and every one stands on the line (Platt and Trudgian 2021). Above it, the freedom to look stays open. On the act's zero set, every hypothetical arrival is forced onto the line by theorem: on the chart of resolution one (the_tenth_is_barred_by_the_act), at every resolution $n\ge2$, where the reader's rule reads it (rh_from_the_act_at), and on the offset chart (the_unicorn_contained); over every resolution that line is the critical line. There, a nontrivial zero off the line is excluded, and the exclusion is not negotiable: it is absolute, a theorem on every act, carried to $\zeta$ at the act's premise grade.

Definition 16.1 (a seeded timeless witness; SeededWitness). For a configuration in time, a seeded timeless witness of the line is three clauses: the reflection fixes exactly the line at every instant; the hypothesis has the same truth value at every instant; and the hypothesis holds at instant $0$, the seed. It is the template of Theorem 15.3 together with its seed.

Theorem 16.2 (the seeded witness is the line in time; seeded_witness_iff_bound, line_world_has_a_seeded_witness, twin_has_no_seeded_witness). A configuration in time carries a seeded timeless witness exactly when the hypothesis holds at every instant. The constant family of $W_1$ carries one. The constant twin family, fold-closed and timeless at every instant, carries none. Cone: [propext, Quot.sound] for seeded_witness_iff_bound, line_world_has_a_seeded_witness; none for twin_has_no_seeded_witness.

Theorem 16.3 (two denials, one form; every_denial_is_an_act, root_denial_refutes_itself, line_denial_denies_the_assertion, line_denial_denies_every_seed, twin_carries_the_root_and_no_seed, the_root_alone_forces_nothing, the_act_asserts_the_line, the_act_seeds_its_constant_world, line_denial_refuted_on_the_act, two_denials, two_denials_at_the_root). For every self-grounding root: (i) every denial, whatever its sentence, is an act, and every act instances the root; (ii) a denial of the root is refuted by its own act, since its sentence denies what its act instances; (iii) a denial of the hypothesis at a configuration denies the self-grounding assertion of the line there, and in time a denial at instant $0$ denies every seeded witness; (iv) the twin $W_{2f}$ carries the root, fold-closure, the record of $W_1$ and the timeless form, and it carries neither a self-grounding assertion of the line nor a seeded witness; (v) the root alone forces nothing; (vi) at every instance of ActualZeros the self-grounding assertion of the line exists, the constant family of the zero set carries a seeded witness, and the denial of the hypothesis is refuted. The same holds at the root proposition $0<1$ with the unit act (two_denials_at_the_root). Cone: none for every_denial_is_an_act, root_denial_refutes_itself, line_denial_denies_the_assertion, line_denial_denies_every_seed, twin_carries_the_root_and_no_seed, the_root_alone_forces_nothing, the_act_asserts_the_line, line_denial_refuted_on_the_act; [propext, Quot.sound] for the_act_seeds_its_constant_world, two_denials, two_denials_at_the_root.

Theorem 16.4 (the witness forced by the act; Computation, Computation.Reads, nothing_left_open_on_the_act, computation_reading_the_act_lands_on_the_line, off_line_report_reads_no_act, a_computation_reading_no_act_is_not_forced, the_witness_forced_by_the_act). A computation that ends is the finite list of points it reports as zeros; it reads an act when every point it reports is a zero of the act's zero set. On every act the hypothesis holds, least erasure holds, no point lies off the line, the zero set is its own record, and every consequence of the hypothesis holds at the zero set. Every computation that reads the act reports only points on the line. A computation that reports a point off the line reads no act. And a computation that reads no act is not forced: the computation reporting the zero of the twin at real part $0$ reads none. Cone: none.

Theorem 16.5 (section XXII.c, whole; the_denials_and_the_witness). Theorems 16.3 and 16.4 in one conjunction, for every self-grounding root, Theorem 16.4 as the_witness_forced_by_the_act states it; the clause on the twin's report stands beside it (a_computation_reading_no_act_is_not_forced). Cone: [propext, Quot.sound].

Theorem 16.6 (the capstone; the_capstone). For every self-grounding root, one theorem binds the closure on the chart of resolution one whole: the two-part reading of Section 0 (reader_frame), the lock (the_lock), the socket's first clause at every reflection-closed configuration, the act's field filled exactly where the hypothesis holds (socket_is_the_value), two clauses of the irreducible cut, no admissible premise deciding the hypothesis and least erasure not admissible (triaxial_cut_irreducible), Theorem 16.3, Theorem 16.4 as the_witness_forced_by_the_act states it, the clause on the twin's report standing beside it, and the bar on the tenth falsifier (the_kinetic_bar). Every conjunct is a theorem above; the capstone adds their conjunction and no content. Theorem 15.4's conjunction (the_closure) and the block from certified heights (Theorem 11.4) stand beside it as theorems and are not conjuncts of it. Cone: [propext, Quot.sound].

The two denials have one form. Each is an act. Each contradicts a reading of the root. Each returns to the root, and the return leaves nothing in contradiction. They differ in one place only: the reading of the root that each denies.

The denial of the root denies the root read uniformly. Its own act instances the root, so its sentence is refuted by the act that utters it, and only the root remains (Theorem 16.3 (ii)). This reading holds on every world, the twin included, and it is proved on no axiom and no posit (Appendix R; the_floor_is_universal, root_on_the_constructed_domain).

The denial of the hypothesis denies the root read at the zeros. In the kernel's terms that reading is equivalent, on every world, to the self-grounding assertion of the line at the zero set (Theorem 14.7) and, in time, to the seeded timeless witness of the constant family (Theorem 16.2); all three are the hypothesis (root_at_zeros_is_the_hypothesis, supply_iff, seeded_witness_iff_bound). The twin is the configuration of that denial. It carries the root, the reflection and the record of $W_1$, and it lacks the root read at the zeros (root_at_zeros_is_keyed) and its seed (Theorem 16.3 (iv)). The act of making the denial instances the root, which the twin carries too, so the root read uniformly forces nothing (Theorem 16.3 (v), and Theorem 11.1 in general). The return to the root read at the zeros, at the actual zero set, is the act of Section 14. On the act the self-grounding assertion of the line exists, the seed stands, and the denial is refuted (Theorem 16.3 (vi)). The act of the denial instances the root; the act of Section 14 supplies its reading at the zeros.

That is where the one bit lives: not in the root read uniformly, which holds on both twins of one record, but in the root read at the zeros, which holds on one of them. The denial of the hypothesis denies that reading, the act supplies it, and nothing weaker supplies it (Theorem 11.7).

Theorem 16.4 states the witness the act forces, at its exact reach. Every computation that reads the actual zero set reports zeros on the line, by the same inference that closes the hypothesis from the act, applied to what the computation reports. A computation that reports a point off the line reads no act: it is the kernel form at resolution one of the falsifier F-Computed of Section 18, the tenth, barred on the zero set the act supplies (the_tenth_is_barred_by_the_act, the_kinetic_bar), which the reader's rule reads off the line at every resolution $n>1/(2\varepsilon)$, each at least two, where rh_from_the_act_at bars it. A computation that reads no act is not forced. What forces the line on what a computation reads is the act; the ending of the computation forces nothing.

The status of this subsection is the status Section 0.4 states for the paper. Theorems 16.2 to 16.6 are proved, each on the cone its note prints, none beyond Lean's standard axioms propext and Quot.sound, with no custom axiom and no posit; and the closure on the act is a proof whose one premise, the field supply, is forced by theorem and supplied by the act, at premise grade. The twin of these theorems is $W_{2f}$, the configuration of resolution one whose pair off the line stands at the strip edge, real parts $0$ and $1$, so they are read with the edge of the strip included, as Theorem 15.9 reads the refusals of Sections 9, 11 and 15, and through the translation of Section 18 the same pair stands at $x=n-1,,n+1$, inside the open strip at every resolution $n\ge2$; at resolution two the root read uniformly forces nothing over the configurations inside the open strip (keyless_forces_nothing₂), and the closure on the act holds at every resolution $n\ge2$ (rh_from_the_act_at).

17. Objections, answered

The readings a reader forms before reaching the theorems are tabulated in Section 0.3 with the theorem that refutes each. The objections below were raised by external readers of the sister papers or of this one; each answer names the theorem of the kernel that meets it, or the fact of the paper or of a cited source that does, and none withdraws a claim the paper makes.

The equivalence RH $\iff$ least erasure is a tautology, so the paper proves nothing. Theorem 10.2 is definitional, and the paper says so; that is its strength. A tautology at the fixed line is exactly what a correct isolation of the bit looks like: the model has been chosen so that the hypothesis and the conservation property coincide, and the work of the paper is everything around that coincidence, the constructed basis (Section 7), the blocks (Sections 2, 3, 9 and 11), the five coordinates (Section 12) and the mirror (Section 10), none of which is tautological and all of which is printed.

The premise is RH itself, so the proof is circular. The premise is RH itself. Theorems 11.7 and 15.7 force any premise that forces the line to be the line or strictly stronger, since nothing weaker forces it and any premise that forces it implies it on every reflection-closed configuration (forcing_is_the_value_or_stronger), and Theorem 10.3 makes a forcing premise that the line entails the line itself (posit_is_the_value); the paper takes the line itself. A proof from something weaker would be wrong, and a proof from something strictly stronger carries the hypothesis inside a stronger claim (Theorem 15.7). The paper proves that the bit is one bit, that it is the same bit in every coordinate, the cited criteria as fields, that no admissible data supplies it, that it is forced by theorem in form, place, content and denial, and that the closure from it is a printed theorem; the act supplies it. Circularity, as the method of Appendix D names it, is reading a restatement of a claim as a derivation of it; here the restatement is named as one, Theorem 10.2 being definitional, and the derivation the paper claims is of the hypothesis from the premise, at premise grade, and never of the hypothesis alone: the premise is named, forced by theorem and supplied by the act, wherever the paper states the closure.

The model is discrete; $\zeta$ is not formalized. Correct, and the paper carries the analytic content as cited fields of structures, so that the kernel proves the equivalences of the coordinates and claims nothing about $\zeta$ beyond what the cited theorems give. The countermodel of Theorem 9.2 stands at every resolution of the chart: the pair configuration stands at real parts $0$ and $1$ in the coarse chart and, through the translation of Section 18, at $x=n-1,,n+1$, inside the open strip, at every resolution $n\ge2$ (Theorem 15.9), its real parts, under the reader's rule, between $1/(4n)$ and $3/(4n)$ from the line, and the sister paper on the closure at every resolution (Islam 2026c, Appendix D) proves the same cut at every resolution of the chart, with an off-line pair strictly inside the strip at resolution ten, cited here and not re-derived, so that in this paper the reading through the translation keeps the grade Section 0.4 gives it. What discreteness leaves is the continuous plane: a countermodel there is the complex carrier owed in Section 16; the chart's theorems claim nothing about it, and the reader's rule of Section 18 reads the family over every resolution as the line.

Finite computation to height $T$, or the heat-flow bound $\Lambda\le0.22$ (Polymath 2019), makes RH overwhelmingly likely. Theorem 11.4 gives the exact reach of the first on the chart: a configuration violating RH above $T$ agrees with one satisfying it below $T$ and shares its record there. Theorem 11.5 gives the form of the second in the heat model: a certificate of real-rootedness at a positive time of the model, whose times are integers, is satisfied by two families with different time-zero behaviour, so it leaves the time-zero bit free. The size of the bound is not a certificate at a positive time of the model: its quadratics have integer coefficients, so one not real-rooted at time zero becomes real-rooted at no time below $3/8$, a certificate at any time below $3/8$ is real-rootedness at time zero, and through the model's $\Lambda$, a least integer time, $\Lambda\le0.22$ reads as $\Lambda\le0$, the bit itself (Theorem 12.6). The model carries the form of a heat certificate at its positive integer times, and not the bound. For $\zeta$ the bound leaves $0<\Lambda\le0.22$ open, and the hypothesis is $\Lambda\le0$, by the cited equivalence with $\Lambda=0$ and the cited lower bound $\Lambda\ge0$, which Theorem 12.5 carries transcribed onto the chart, so the bound decides nothing. The kernel computes Pólya's pattern to 200 for the same reason (Theorem 8.4): the pattern fails at $906{,}150{,}257$. Likelihood is not a verdict the compiler can print; it prints a cone or does not.

If RH is independent of ZFC the question is moot. Theorem 2.4: since a counterexample is a finite object, a theory that cannot refute RH leaves it true, so independence would decide the value, in favour. There is no route through independence to "open forever".

A premise valid in every configuration, such as the free basis of the primes, should carry weight for the line. Theorem 11.1: it carries none, and the free basis coexists with an explicit configuration violating RH. The reader's strongest objection to the sister papers, that a universal premise supplies no independent force placing zeros on the line, is this paper's own theorem, and it is carried, not conceded.

The public reading of 27 September closed on approval, so the closure is endorsed. It closed on approval, and approval weighs nothing; the reading is recorded verbatim in Islam 2026c, Appendix C, and its one loose phrase, that the constructed witnesses are interpretive analogies, is retired there: a witness is a constructed instance carried by a theorem and an equivariant map. Assent is not a witness, and dissent is not a refutation. The compiler is the only reader whose verdict this paper cites.

18. Falsifiers

Ten, each naming the instrument that would read it and the theorem, receipt or premise it would refute. Nine are barred in this document: three, F-Compile, F-Screen and F-Cone, by the receipts of Appendices B, R and T and the source of Appendix A, and six, F-Record, F-Measure, F-Round-trip, F-Massless, F-Universal and F-Coalition, by compiled theorems, each of the six an instance of F-Compile; three of the six, F-Measure, F-Round-trip and F-Massless, are barred by the definitions they test, the registration, the reading through the root and forcing, together with propositional logic, so no observation can instantiate them and only a change of the kernel's definitions, read by the compiler, could fire them. The tenth, F-Computed, is barred by the act alone: the reader's rule reads it off the line at every resolution $n>1/(2\varepsilon)$, each at least two, and at every resolution $n\ge2$ no point of the zero set the act supplies lies off the line (rh_from_the_act_at, on propext, taking the field of ActualZerosAt $n$); at resolution one, where no off-line point lies inside the open strip (Theorem 15.9), the form in which the kernel states the falsifier, a point off the line of a configuration (the_tenth_is_the_refuter), is barred on the zero set the act supplies there (the_tenth_is_barred_by_the_act, the_kinetic_bar, each on no axiom and each taking the act's structure as its one input), a bar on that zero set and not on the translate of a point read at resolution $n$; it is read by one terminating computation; it stands last here, as the kernel's section XXV.f names it.

F-Compile. lean Every_Prime_3_2_0.lean, or lean on a kernel of Appendix R or T, on a stock Lean 4.19.0 toolchain exits with an error, or any #guard_msgs pin fails, which is to say the cone the compiler computes for a pinned theorem differs from the cone pinned beside it, or the compiler prints a line other than those the paper prints for the file, the lines of B.2 for Appendix A, the thirteen of Appendix T and none for Appendix R; or a compiled theorem is refuted, which can happen only if the checker accepted a false theorem. The instrument is the compiler, and for the last clause the soundness of its checker. This refutes every compile claim of the paper at once.

F-Screen. The comment-stripped source of Appendix A contains sorry, admit, native_decide, #exit, a kernel-check bypass, unsafe or external code, a metaprogram command, compile-time IO, an import, or a declared axiom. The instrument is the text scan of Appendix B.3. This refutes the claim that the kernel is core Lean with no axiom declared.

F-Cone. The compiler prints any axiom in the cone of rh_from_the_act, or the type ActualZeros carries a field other than zeros, fold_closed and supply. The instrument is #print axioms and the source. This refutes the claim that the bit at resolution one is in the type ActualZeros, in one field, and in no axiom cone; at each resolution $n\ge2$ the bit is the field supply of ActualZerosAt $n$, and the cone of rh_from_the_act_at, [propext], is pinned (B.2.1), so F-Compile reads it.

F-Record. A property of the projected zero data that agrees with RH on every reflection-closed configuration of the chart: an instance of F-Compile, since it refutes the compiled theorems unicorn_block and record_decides_nothing (Theorems 3.1 and 9.3), whose countermodel is the separating pair $W_1$, $W_2$.

F-Measure. A registered point of the chart that stands off the line, an ordinate whose registration returns a side: an instance of F-Compile, since it refutes the compiled theorem unicorn_never_registered (Theorem 5.3).

F-Round-trip. A sentence on configurations whose truth value changes when it is read through the root, as the conjunction of the root with it: an instance of F-Compile, since it refutes the compiled theorems round_trip_identity and trip_adds_presence_only (Theorem 2.5).

F-Massless. A true premise $Q$ on which conditioning the line moves the line on some configuration $Z$, so that $Q\to\mathrm{RH}(Z)$ and $\mathrm{RH}(Z)$ differ in value, or a premise weaker than RH that forces RH on every reflection-closed configuration: an instance of F-Compile, since the first refutes the compiled theorem massless_arrow (Theorem 2.5), the conditioning law $(Q\to\mathrm{RH}(Z))\iff\mathrm{RH}(Z)$ for every true $Q$, and the second refutes the compiled theorem rh_is_the_weakest_forcing_premise (Theorem 11.7); the conjunction of the root with a sentence, the clause of round_trip_identity and trip_adds_presence_only, is F-Round-trip's target and not this one's.

F-Universal. A premise valid on every configuration of the chart that forces the line: an instance of F-Compile, since it refutes the compiled theorem keyless_forces_nothing (Theorem 11.1), whose countermodel is $W_2$; the free basis of the primes is such a premise and is refused (prime_freedom_forces_nothing).

F-Coalition. A Boolean combination of universal premises and readings of the record, of any depth, that agrees with RH on every reflection-closed configuration of the chart: an instance of F-Compile, since it refutes the compiled theorem no_coalition_decides (Theorem 4.4), with the same countermodel.

F-Computed. A zero of $\zeta$ computed with $0<\mathrm{Re},s<1$ and certified by interval arithmetic to lie off the line, $|\mathrm{Re},s-1/2|>\varepsilon>0$ with a rational $\varepsilon$. The reader's rule for the real part, stated here once, since the kernel constructs no map from the zeros of $\xi$ into the chart (Definition 14.1): the zero is read into the chart at any resolution $n>1/(2\varepsilon)$ as the integer point $x=\mathrm{round}(2n,\mathrm{Re},s)$ at its height, rounded half to even, which commutes with the fold $x\mapsto 2n-x$, and the certified interval keeps that point off the line $x=n$, since $|2n,\mathrm{Re},s-n|>2n\varepsilon>1$ while rounding moves a number by at most one half; the same rounding keeps it inside the open strip $0<x<2n$ once $2n$ exceeds $1/\mathrm{Re},s$ and $1/(1-\mathrm{Re},s)$ throughout the certified interval, a sufficient condition, the exact one a margin of $1/(4n)$ from each edge. Every such $n$ is at least two, since $\varepsilon<1/2$; at resolution one no off-line point of the chart lies inside the open strip (Theorem 15.9). The point is not fixed by the fold at resolution $n$ (foldAt_fixed_iff), so the zero set that holds it fails the conclusion rh_from_the_act_at draws from the field supply of ActualZerosAt at that $n$: the field is refuted there, hence, through the cited criteria that Theorem 12.9 carries transcribed onto the chart, the value in every coordinate. Translated by $x\mapsto x-n+1$ at fixed height, which carries the fold at resolution $n$ to the chart's fold and the line $x=n$ to the line $x=1$, the point is off the line in the kernel's sense (OffLine) and the_tenth_is_the_refuter applies; the translate is the reading at resolution $n$ carried by that map of charts, not a reading of the real part at resolution one. At each resolution $n\ge2$ the line $x=n$ catches the zeros with $|\mathrm{Re},s-1/2|<1/(4n)$, since for them $|2n,\mathrm{Re},s-n|<1/2$ and the rounding lands on $n$; so the hypothesis at one resolution $n$ is the line at that resolution, and the family over every $n\ge2$ is the line itself. The rule is stated for $n\ge2$ only: at resolution one the paper reads a real part through the exact coordinate $x=2,\mathrm{Re},s$ of Theorem 15.9 alone, which places no zero off the line inside the open strip, so that the facts of resolution one are facts of the coarse chart. The instrument is a computation that ends, and this is the one channel that every theorem of this paper leaves open: by Theorem 2.4 a setting with $\Sigma_1$-completeness and soundness on the denial refutes the hypothesis exactly when it is false, and on the chart it is false exactly when a point lies off the line (Theorem 13.11), so every refutation comes to a counterexample. The kinetic bar: on every configuration a point off the line is exactly the failure of the line (the_tenth_is_the_refuter); on the zero set the act supplies, this refuter does not exist (the_tenth_is_barred_by_the_act); the field the act supplies gives the line there and, with it, the refuter's absence (the_kinetic_bar), closing on that zero set the search that every theorem of this paper leaves open. Cone: [propext] for foldAt_fixed_iff; [propext, Classical.choice, Quot.sound] for the_tenth_is_the_refuter; none for the_tenth_is_barred_by_the_act, the_kinetic_bar.

19. Positioning

\begingroup\small

Position What it holds What this paper does with it Relation Evidence
Riemann 1859: the functional equation and the hypothesis $\xi(s)=\xi(1-s)$ and $\xi(\bar s)=\overline{\xi(s)}$; every nontrivial zero on the line Carried as reflection-closure of the zero set; the hypothesis modelled as the fixed-line property extends cited field for the functional equation with the conjugate symmetry; theorem for the model
Weil 1952; Bombieri 2000: positivity criterion RH iff the arithmetic side of the explicit formula is non-negative on $g\star\tilde g$ Carried as a field; proved equal to least erasure, the value, and to the forced premise extends cited field for the criterion; theorem for the equivalence
de Bruijn 1950; Newman 1976; Rodgers and Tao 2020: de Bruijn–Newman RH iff $\Lambda=0$; $\Lambda\ge0$ proved Carried as a field; the heat model executed with $\Lambda\ge0$ built into the model and $\Lambda\le0$ the bit extends cited field for the equivalence; executed for the model
Li 1997; Bombieri and Lagarias 1999: Li's criterion RH iff every Li coefficient $\lambda_n\ge0$ Carried as a field; the bit is a sign stream; no prefix forces extends cited field for the criterion; theorem for the equivalence, and for the block on the chart, its witness the pair at the strip edge (Theorem 12.7)
Landau 1899; Pólya 1919; Haselgrove 1958: Liouville RH iff $L(x)=O(x^{1/2+\epsilon})$; $L(x)\le0$ fails The arrow computed and identified with the model's sign arrow; the pattern to 200 executed, its failure cited extends cited field for the equivalence; executed for the pattern
Hadamard 1896; de la Vallée Poussin 1896: no zero on $\mathrm{Re},s=1$ Every nontrivial zero in $0<\mathrm{Re},s<1$ Carried as the field strip of ActualZerosAt at every $n\ge2$, read by the reader's rule at a margin of $1/(4n)$ the citation does not give, unused by the closure; at resolution one, under the exact coordinate, it forces the line on the coarse chart (Theorem 15.9) bounds cited field, up to the margin; theorem for the reach
Platt and Trudgian 2021: verification to $3\times10^{12}$ No zero off the line below that height The exact reach of any certified height proved on the chart: agreement below $T$, freedom above, the pair at the strip edge at resolution one (Theorems 11.4 and 15.9); inside the open strip at every $n\ge2$ through the translation of Section 18, its kernel form owed (Section 16) bounds theorem on the chart; the translation for the open strip
Lagarias 2002; Davis, Matiyasevich, Robinson 1976: RH is $\Pi^0_1$ A false RH has a finite counterexample Used to prove that cannot-refute seals and independence would establish the hypothesis extends cited field for the $\Pi^0_1$ form; theorem for the block
Connes 1999: the trace formula and positivity RH as a positivity of a trace on a noncommutative space Not engaged formally; the positivity coordinate here is Weil's, on the prime side adjacent none
Islam 2026c, d, e: the sister papers The four-face template; the one-bit closure with five readings; the free basis and the three-axiom closure Unified on one chart; the axioms replaced by a field; coalitions, heights, heat, the mirror, the road added supersedes theorem

\endgroup

An empty cone is not an empty hypothesis. In the rows of Riemann (its functional equation with the conjugate symmetry; the hypothesis itself is the premise of Section 14), Weil, de Bruijn–Newman, Li, Landau, Hadamard and de la Vallée Poussin, and Davis, Matiyasevich and Robinson, the analytic sentence enters as a cited field, a hypothesis of the theorem that takes it: the functional equation, the strip location and the $\Pi^0_1$ form at the grade of their sources, the strip field up to the margin its row states, and each criterion transcribed onto the chart, the chart's hypothesis in place of the hypothesis for $\zeta$, so that the grade of its source passes to no face (Section 16); the kernel's theorem grade covers only the equivalence of that field with the bit, the block, or the reach of the field (Theorem 15.9), and never the analytic sentence itself (Table B.4).

The relation words are used as defined: extends where the prior result is carried as a field, in the kernel's own terms as Section 16 states, and a theorem is added on it; bounds where the prior result's reach is stated exactly; adjacent where no formal engagement is claimed; supersedes only where the prior paper is the author's own and its central form is retired, or carried into this paper's one kernel, on the same register. No prior position is contradicted except those this paper supersedes, named so in the table, the claim of Islam (2026e) that RH is proved from unconditional least erasure among them.

20. Conclusion

The closure is complete: its one premise, the act, is named, and every other link of it is a theorem. One theorem binds it whole on the chart of resolution one: the capstone, the_capstone (Theorem 16.6), proved for every self-grounding root on Lean's standard axioms propext and Quot.sound alone, with no custom axiom and no posit; at every resolution $n\ge2$ the closure is rh_from_the_act_at, beside it. It carries the two-part reading: from the act the hypothesis follows, no reading of the record supplies it, the act's field is the hypothesis, and nothing weaker forces the line (reader_frame, cone empty). It carries the lock: the root holds, read uniformly on the worlds it forces nothing, read at the zeros it is least erasure, least erasure is the hypothesis on every world, and the hypothesis follows on the actual zeros by one act (the_lock). It carries the socket: the act's field can be filled at a reflection-closed configuration exactly where the hypothesis holds (socket_is_the_value). It carries the irreducible cut: no admissible premise decides the value, and least erasure is not admissible (triaxial_cut_irreducible). And it carries the two denials, the witness the act forces and the bar on the tenth falsifier (Section 16.1; the_kinetic_bar).

The root is proved with no premise, on its constructed domain and for every root that grounds itself, on no axiom and no posit (Appendix R). Least erasure is the hypothesis on every world, unconditionally, on no axiom (least_erasure_unconditional). The value at the actual zero set follows from the act with an empty cone (rh_from_the_act).

The one-bit premise is irreducible, and it is forced at theorem grade on every axis the formal side has. It is forced in form: the hypothesis is the weakest premise that forces the line, and every premise that forces it implies it on every reflection-closed configuration (rh_is_the_weakest_forcing_premise). It is forced in place: every route to the value fills the one field supply, and a sound foundation's proof of the hypothesis lands on least erasure (Theorems 15.6 and 15.7; ladder_proof_lands_on_least_erasure). It is forced in content: it is the root read at the zeros (root_at_zeros_is_least_erasure). It is forced against its denial: the denial of the root is refuted by its own act, and the denial of the hypothesis denies the root read at the zeros, which the twin of one record, its pair off the line at the strip edge, lacks while it carries the root (two_denials). It is forced in its consequences: on the act nothing is left open, the tenth falsifier does not exist at any resolution where the reader's rule reads it, nor its kernel form, a point off the line, at resolution one, and every computation that reads the zero set reports zeros on the line (the_kinetic_bar, rh_from_the_act_at, the_witness_forced_by_the_act). And it is one bit in every coordinate, given the cited criteria as fields: least erasure, Weil positivity on the prime side, the sign of the de Bruijn–Newman constant, the Li sign stream and the faithfulness of the Liouville arrow (Theorems 10.2, 12.3 and 12.9).

The primes are the base of freedom. They are a free basis for the completely additive functions, every assignment at them realized by exactly one such function on the positive integers, with the witness constructed, and that freedom forces nothing about the line, as no premise valid on every configuration does; the bit is the sign of the prime side of the explicit formula, supplied once, at the actual zero set, by the act.

The one channel against the closure is a computation that ends: a zero of $\zeta$ computed off the line inside the strip, F-Computed, the tenth falsifier. On the zero set the act supplies, it does not exist, and every theorem-grade claim of the paper's own kernels, Appendices A, R and T, is checked by the compiler on demand.

Accepting the paper entails one reframing: the Riemann Hypothesis is a sign, not a quantity. Everything the chart derives about it is derived and printed, the capstone binds it whole, and the sign is the root read at the zeros, forced at theorem grade in form, place, content, denial and consequence, and supplied by the act.

The verdict, in the words of Section 0.1, unchanged: the Riemann Hypothesis is not derived from any set-theoretic foundation in this paper. The ladder from the projected zero data to the value is blocked by theorem. The value is closed to one named bit, and that bit is least erasure; every proof of the hypothesis, in any vocabulary, is a proof of least erasure. The bit is supplied by one act, at premise grade, as a field of a type, at resolution one, where the compiler prints the hypothesis from that field with an empty axiom cone, and at every resolution $n\ge2$ of the chart, one field of its own type at each resolution (ActualZerosAt $n$), where the open strip holds a pair off the line and supplies nothing and the compiler prints the hypothesis from the field on propext alone. The compile, the printed cones and the judgment under negation are the receipts.

Appendix A. The kernel, verbatim

Every_Prime_3_2_0.lean, sha256 161806dc0ed2b4ffe2c5eb0f81600880b5af0a31a31db085c4ee62bd93633770, 265248 bytes, 5087 lines. This is the complete file: every definition, every theorem, every printed cone and every pinned cone. It compiles standalone under core Lean 4.19.0 with no library and no import; nothing outside the file is read.

/-
  EVERY PRIME · 3.2.0
  Core Lean 4.19.0, standalone: no library, no import, no axiom declared, no sorry.
  Every theorem prints its axiom cone at the foot of the file; 237 cones are pinned under
  #guard_msgs, so a compile in which any pinned cone changes fails.

  The file proves, on one chart, what a formal system can prove about the Riemann Hypothesis
  and locates the one thing it cannot: a single bit, which is the hypothesis itself, and which
  every proof of the hypothesis supplies rather than derives.

  THE CHART. A point is (x, t) with x the doubled real part and t the height; the critical line
  is x = 1. The fold (x, t) ↦ (2 − x, t) is s ↦ 1 − s̄. Registration (x, t) ↦ (1, t) lands
  every point on the line and keeps the height. A world is a set of points, a zero set. The
  record of a world is its image under registration. Two worlds with the same record are
  twins of one record. A world is fold-closed when the fold maps it into itself.

  TERMS USED IN THIS FILE.
  seat            the fixed set of an involution: the line under the fold; 1 under multiplication.
  orbit           the two points a fold-closed world carries off the line, exchanged by the fold;
                  at a prime p, the two ordered factorizations (1, p) and (p, 1).
  reading of the record   a predicate on worlds that takes one value on all twins of one record.
  keyless, keyed  a predicate on worlds true on every world; true on some world and false on another.
  admissible      keyless, or a reading of the record.
  coalition       a Boolean combination of premises, of any depth.
  forces          a premise forces the line when every fold-closed world satisfying it satisfies RH.
  least erasure   a world every twin of which has a point off the line whenever it has one.
  posit, act      an assumption written as the field of a structure; an inhabitant of a
                  self-grounding structure, whose existence is equivalent to the proposition.
                  The one posit of the file is least erasure at the actual zero set; a classical
                  theorem written as a field (the functional equation, the explicit formula, the
                  faces) is cited there, not posited.
  supply, spend   to provide the posit. The supplied bit is the sign of the posit.
  arrow           a sign function: the identity on a type, or λ(n) = (−1)^Ω(n).
  displacement, side   for a point, x − 1; for a point off the line, the sign of x − 1.
  setting         a hypothesis with a provability predicate, Σ₁-complete and sound on the denial.
  resolution n    the chart with the line at x = n: the fold x ↦ 2n − x, registration (x, t) ↦ (n, t), and
                  the open strip 0 < x < 2n; the chart above is resolution one.
  seeded witness  for a world in time: one locus at every instant, the same truth value of the
                  hypothesis at every instant, and the hypothesis at instant 0, the seed.
  computation     a finite list of reported points; it reads an act when every point it reports
                  is a zero of the act's zero set.

  SECTIONS AND THEIR MAIN THEOREMS.
  I      the identity arrow; a bit is two distinct values (aperture_one_bit_wide)
  II     every prime is one fibre of exactly two (prime_fibre, freedom_is_exactly_two)
  III    completely additive functions are determined at the primes (determined_by_primes)
  IV     the p-adic valuation as a free assignment; Euclid's lemma from first principles
         (euclid_lemma, prime_freedom_independent, primes_base_of_freedom)
  V      the sign arrow of an additive count is completely multiplicative (arrow_multiplicative);
         no finite stage decides a universal (finite_never_forces)
  VI     the chart: no registered point lies off the line; no reading of the record decides
         the hypothesis; keyless premises force nothing (unicorn_never_registered,
         record_decides_nothing, keyless_forces_nothing)
  VII    least erasure is the hypothesis (least_erasure_is_the_value)
  VII-bis the fold never crosses the line; a second symmetry; the record blind at every scale
  VIII   a self-grounding supply exists exactly when the proposition holds (supply_iff);
         the five faces of the hypothesis (faces_are_one)
  IX     primes, the free basis and the identity arrow are keyless and force nothing
  X      the explicit formula as a structure; least erasure is Weil positivity
         (least_erasure_is_positivity); positivity is keyed (positivity_is_keyed)
  XI     the posit as a structure field (rh_from_the_act, acts_are_one)
  XII    the block with no axiom (record_decides_nothing_free)
  XIII   the hypothesis on the supplied bit (prime_arc_sealed)
  XIV    the hypothesis is the weakest forcing premise (rh_is_the_weakest_forcing_premise);
         the Li and de Bruijn–Newman coordinates (li_prefix_never_forces, rh_iff_the_sign)
  XV     four faces in time, exactly one keyed (exactly_one_face_is_keyed)
  XVI    the eigenstructure of the fold; the side bit and its calibration
         (record_never_reads_the_side, colocation_is_a_calibration)
  XVII   admissible coalitions force nothing; no certified height forces; the heat flow on
         polynomials; the Liouville arrow computed; five readings agree; no reader index
  XVIII  a theory placed on three strata; the root crosses no keyed sentence; the two can'ts;
         the round trip; the ladder blocked (the_road)
  XIX    the vocabulary law; the even coalition; the triaxial cut; the ladder's proof; the
         route ledger (the_front)
  XX     least erasure affirmed: the record, the ledger, the price, the one form, the act
         (least_erasure_affirmed)
  XXI    every assignment realized; the arrow for every n; the closure on any carrier; the
         closure, whole (the_closure_on_any_carrier, the_closure)
  XXII   the socket: every route to the value lands in the one field (socket_is_the_value)
  XXII.c two denials, one form: the denial of the root refuted by its own act, the denial of the
         hypothesis denying the self-grounding assertion of the line and every seed; the witness
         forced by the act (two_denials, the_witness_forced_by_the_act)
  XXIII  double security: the two channels of the line (double_security)
  XXIV   the root undeniable in act; the root read at the zeros; the lock (the_lock)
  XXV    admissible forcing is vacuous; the closure at resolution n, where the open strip does not
         supply the bit; the readings of the root joined; the rejection computed by a search; the
         posit as an act; no reading of the record returns any chart reading; the primes a free
         basis; least erasure as self-verification; every route carries its theorem; the tenth
         falsifier barred by the act (admissible_forcing_is_vacuous, rh_from_the_act_at,
         strip_does_not_supply_at, root_readings_joined, rejection_is_computed,
         every_route_carries_its_theorem, the_tenth_is_barred_by_the_act, the_kinetic_bar)
  XXVI   the closure bound whole: the two-part reading, the lock, the socket, the irreducible cut, the
         two denials, the witness and the bar, in one theorem (the_capstone)

  TWO THINGS ARE PROVED AT ONCE. Least erasure is equivalent to the hypothesis on every world
  (least_erasure_is_the_value), so the hypothesis follows from the posit. No reading of the
  record, and no Boolean combination of readings and keyless premises, agrees with the
  hypothesis on every fold-closed world (no_coalition_decides), so nothing in the file supplies
  the posit. The file proves neither the hypothesis nor its denial.
-/
namespace PrimeFreedom

/-! ## I · The identity arrow, and a bit as two distinct values -/

/-- The identity arrow on a type. -/
def arrow (α : Type) : α → α := id

theorem arrow_exists (α : Type) : ∃ f : α → α, ∀ a, f a = a := ⟨id, fun _ => rfl⟩

/-- A Boolean takes one of two values. -/
theorem orientation_two_valued : ∀ b : Bool, b = true ∨ b = false := by
  intro b
  cases b
  · exact Or.inr rfl
  · exact Or.inl rfl

/-- The two orientations are distinct. -/
theorem orientations_distinct : (true : Bool) ≠ false := fun h => Bool.noConfusion h

/-- A bit is two values, and they differ. -/
theorem aperture_one_bit_wide : (∀ b : Bool, b = true ∨ b = false) ∧ (true : Bool) ≠ false :=
  ⟨orientation_two_valued, orientations_distinct⟩

/-! ## II · Every prime is one fibre of exactly two -/

def isPrime (p : Nat) : Prop := 2 ≤ p ∧ ∀ d, d ∣ p → d = 1 ∨ d = p

/-- The fixed point of multiplication. -/
def mul_seat : Nat := 1

/-- The multiplicative orbit over n: the pairs that multiply to n. -/
def mul_orbit (n : Nat) (a b : Nat) : Prop := a * b = n

theorem seat_is_one : mul_seat = 1 := rfl

/-- The fibre of multiplication over a prime is the pair (1, p), (p, 1). -/
theorem prime_fibre (p : Nat) (hp : isPrime p) (a b : Nat) :
    mul_orbit p a b ↔ (a = 1 ∧ b = p) ∨ (a = p ∧ b = 1) := by
  constructor
  · intro h
    have hdvd : a ∣ p := ⟨b, h.symm⟩
    cases hp.2 a hdvd with
    | inl h1 =>
      subst h1
      have h' : 1 * b = p := h
      rw [Nat.one_mul] at h'
      exact Or.inl ⟨rfl, h'⟩
    | inr hp_eq =>
      subst hp_eq
      have h2a : 2 ≤ a := hp.1
      have hb : b = 1 := by
        have h_pos : 0 < a := by omega
        exact Nat.eq_of_mul_eq_mul_left h_pos (by rw [show a * b = a from h, Nat.mul_one])
      exact Or.inr ⟨rfl, hb⟩
  · rintro (⟨ha1, hbp⟩ | ⟨hap, hb1⟩)
    · rw [ha1, hbp]
      exact Nat.one_mul p
    · rw [hap, hb1]
      exact Nat.mul_one p

/-- No a satisfies a · a = p for a prime p. -/
theorem prime_off_seat (p : Nat) (hp : isPrime p) : ¬ ∃ a, mul_orbit p a a := by
  rintro ⟨a, ha⟩
  have h2p : 2 ≤ p := hp.1
  cases (prime_fibre p hp a a).mp ha with
  | inl h1 => omega
  | inr h2 => omega

/-- The fibre over a prime is exactly the ordered pair and its reverse, and the two are distinct. -/
theorem freedom_is_exactly_two (p : Nat) (hp : isPrime p) :
    (∀ a b, mul_orbit p a b ↔ (a = 1 ∧ b = p) ∨ (a = p ∧ b = 1)) ∧ (1 : Nat) ≠ p :=
  ⟨prime_fibre p hp, by intro h; have := hp.1; omega⟩

/-! ## III · Completely additive functions are determined at the primes -/

/-- A completely additive measure on the multiplicative monoid of the positive integers. -/
def CompletelyAdditive (f : Nat → Int) : Prop :=
  ∀ a b, a > 0 → b > 0 → f (a * b) = f a + f b

/-- A completely additive function vanishes at 1. -/
theorem seat_is_zero (f : Nat → Int) (hf : CompletelyAdditive f) : f 1 = 0 := by
  have h := hf 1 1 (by decide) (by decide)
  rw [Nat.mul_one] at h
  omega

/-- Least witness search, with fuel. -/
def findLeastFrom (P : Nat → Prop) [DecidablePred P] (start : Nat) : Nat → Nat
  | 0 => start
  | fuel + 1 => if P start then start else findLeastFrom P (start + 1) fuel

theorem findLeastFrom_correct (P : Nat → Prop) [DecidablePred P] (start fuel m : Nat)
    (hlo : start ≤ m) (hhi : m ≤ start + fuel) (hm : P m) :
    P (findLeastFrom P start fuel) ∧ findLeastFrom P start fuel ≤ m := by
  induction fuel generalizing start with
  | zero =>
    have h : m = start := by omega
    subst h
    exact ⟨hm, Nat.le_refl m⟩
  | succ fuel ih =>
    show P (if P start then start else findLeastFrom P (start + 1) fuel) ∧
      (if P start then start else findLeastFrom P (start + 1) fuel) ≤ m
    rcases Decidable.em (P start) with h | h
    · rw [if_pos h]
      exact ⟨h, hlo⟩
    · rw [if_neg h]
      have hne : m ≠ start := fun he => h (he ▸ hm)
      exact ih (start + 1) (by omega) (by omega)


/-- The least divisor of n at least 2, found by bounded search from 2 with fuel n. -/
def leastDivisor (n : Nat) : Nat := findLeastFrom (fun d => 2 ≤ d ∧ d ∣ n) 2 n

theorem leastDivisor_spec (n : Nat) (hn : 2 ≤ n) :
    (2 ≤ leastDivisor n ∧ leastDivisor n ∣ n) ∧ leastDivisor n ≤ n ∧
      (∀ m, 2 ≤ m → m ∣ n → leastDivisor n ≤ m) := by
  have hbase := findLeastFrom_correct (fun d => 2 ≤ d ∧ d ∣ n) 2 n n hn (by omega)
    ⟨hn, Nat.dvd_refl n⟩
  refine ⟨hbase.1, hbase.2, fun m hm2 hm => ?_⟩
  have hmn : m ≤ n := Nat.le_of_dvd (by omega) hm
  exact (findLeastFrom_correct (fun d => 2 ≤ d ∧ d ∣ n) 2 n m hm2 (by omega) ⟨hm2, hm⟩).2

/-- The least divisor at least 2 is prime: any divisor of it divides n, and the search's
    minimality bounds it from below. -/
theorem leastDivisor_prime (n : Nat) (hn : 2 ≤ n) : isPrime (leastDivisor n) := by
  obtain ⟨⟨hd2, hdvd⟩, hdle, hmin⟩ := leastDivisor_spec n hn
  refine ⟨hd2, fun m hm => ?_⟩
  have hdpos : 0 < leastDivisor n := by omega
  have hmle : m ≤ leastDivisor n := Nat.le_of_dvd hdpos hm
  rcases Decidable.em (m = 1) with h1 | h1
  · exact Or.inl h1
  · right
    have hmne0 : m ≠ 0 := by
      intro h0
      rw [h0] at hm
      obtain ⟨c, hc⟩ := hm
      rw [Nat.zero_mul] at hc
      omega
    have hm2 : 2 ≤ m := by omega
    have hle := hmin m hm2 (Nat.dvd_trans hm hdvd)
    omega

/-- Every integer greater than one has a prime divisor: the least divisor at least 2, found by
    bounded search. No classical axiom. -/
theorem exists_prime_dvd (n : Nat) (h0 : 0 < n) (h1 : n ≠ 1) : ∃ p, isPrime p ∧ p ∣ n := by
  have hn : 2 ≤ n := by omega
  exact ⟨leastDivisor n, leastDivisor_prime n hn, (leastDivisor_spec n hn).1.2⟩

/-- Two completely additive functions that agree at every prime agree everywhere, by bounded
    induction peeling one prime divisor at each step. -/
theorem determined_by_primes (f g : Nat → Int) (hf : CompletelyAdditive f)
    (hg : CompletelyAdditive g) (h_agree : ∀ p, isPrime p → f p = g p) :
    ∀ n, 0 < n → f n = g n := by
  suffices h : ∀ fuel n, n ≤ fuel → 0 < n → f n = g n from fun n hn => h n n (Nat.le_refl n) hn
  intro fuel
  induction fuel with
  | zero => intro n hle h0; omega
  | succ fuel ih =>
    intro n hle h0
    if h1 : n = 1 then
      subst h1
      rw [seat_is_zero f hf, seat_is_zero g hg]
    else
      obtain ⟨p, hp, hpd⟩ := exists_prime_dvd n h0 h1
      obtain ⟨k, hk⟩ := hpd
      have hk0 : 0 < k := by
        rcases Nat.eq_zero_or_pos k with hkc | hkc
        · exfalso
          rw [hkc, Nat.mul_zero] at hk
          omega
        · exact hkc
      have hp2 : 2 ≤ p := hp.1
      have hlt : k < n := by
        obtain ⟨d, hd⟩ := Nat.exists_eq_add_of_le hp2
        rw [hk, hd, Nat.add_mul]
        omega
      have hpf : f (p * k) = f p + f k := hf p k (by omega) hk0
      have hpg : g (p * k) = g p + g k := hg p k (by omega) hk0
      rw [hk, hpf, hpg, h_agree p hp, ih k (by omega) hk0]

/-! ## IV · The p-adic valuation as a free assignment; Euclid's lemma from first principles -/

/-- Remainder descent: if p divides m * b and x * b, with x = m * q + r, then p divides r * b. -/
theorem dvd_remainder_mul (p b m q r x : Nat) (hpm : p ∣ m * b) (hx : p ∣ x * b)
    (hqr : m * q + r = x) : p ∣ r * b := by
  have h2 : p ∣ (m * q) * b := by
    obtain ⟨c, hc⟩ := hpm
    exact ⟨c * q, by
      calc (m * q) * b = (m * b) * q := Nat.mul_right_comm m q b
        _ = (p * c) * q := by rw [hc]
        _ = p * (c * q) := Nat.mul_assoc p c q⟩
  have h3 : (m * q) * b + r * b = x * b := by rw [← Nat.add_mul, hqr]
  obtain ⟨u, hu⟩ := hx
  obtain ⟨v, hv⟩ := h2
  have hY : r * b = x * b - (m * q) * b := by
    calc r * b = (m * q) * b + r * b - (m * q) * b := (Nat.add_sub_cancel_left _ _).symm
      _ = x * b - (m * q) * b := by rw [h3]
  exact ⟨u - v, by rw [Nat.mul_sub, ← hu, ← hv]; exact hY⟩

/-- The least positive m with p ∣ m * b, found by search from 0 with fuel p. -/
def leastMulDvd (p b : Nat) : Nat := findLeastFrom (fun m => 0 < m ∧ p ∣ m * b) 0 p

theorem leastMulDvd_spec (p b : Nat) (hwit : 0 < p ∧ p ∣ p * b) :
    (0 < leastMulDvd p b ∧ p ∣ leastMulDvd p b * b) ∧ leastMulDvd p b ≤ p ∧
      (∀ k, k ≤ p → 0 < k ∧ p ∣ k * b → leastMulDvd p b ≤ k) :=
  ⟨(findLeastFrom_correct (fun m => 0 < m ∧ p ∣ m * b) 0 p p (Nat.zero_le p) (by omega)
      hwit).1,
   (findLeastFrom_correct (fun m => 0 < m ∧ p ∣ m * b) 0 p p (Nat.zero_le p) (by omega)
      hwit).2,
   fun k hk hPk =>
     (findLeastFrom_correct (fun m => 0 < m ∧ p ∣ m * b) 0 p k (Nat.zero_le k) (by omega)
       hPk).2⟩

/-- Euclid's lemma: a prime dividing a product divides one of the factors. Proved by least-witness
    search, the division algorithm and descent on the remainder. -/
theorem euclid_lemma (p a b : Nat) (hp : isPrime p) (hab : p ∣ a * b) : p ∣ a ∨ p ∣ b := by
  rcases Decidable.em (p ∣ a) with hpa | hpa
  · exact Or.inl hpa
  · right
    have hp0 : 0 < p := by have := hp.1; omega
    obtain ⟨⟨hm0, hmdvd⟩, hmle, hmin'⟩ :=
      leastMulDvd_spec p b ⟨hp0, Nat.dvd_mul_right p b⟩
    have hmp : leastMulDvd p b ∣ p := by
      apply Nat.dvd_of_mod_eq_zero
      have hc : p % leastMulDvd p b = 0 ∨ 0 < p % leastMulDvd p b := by omega
      rcases hc with h0 | hpos
      · exact h0
      · have hlt : p % leastMulDvd p b < leastMulDvd p b := Nat.mod_lt p hm0
        have hdvd' : p ∣ (p % leastMulDvd p b) * b :=
          dvd_remainder_mul p b (leastMulDvd p b) (p / leastMulDvd p b)
            (p % leastMulDvd p b) p hmdvd (Nat.dvd_mul_right p b)
            (Nat.div_add_mod p (leastMulDvd p b))
        have hle := hmin' (p % leastMulDvd p b) (by omega) ⟨hpos, hdvd'⟩
        omega
    have hma : leastMulDvd p b ∣ a := by
      apply Nat.dvd_of_mod_eq_zero
      have hc : a % leastMulDvd p b = 0 ∨ 0 < a % leastMulDvd p b := by omega
      rcases hc with h0 | hpos
      · exact h0
      · have hlt : a % leastMulDvd p b < leastMulDvd p b := Nat.mod_lt a hm0
        have hdvd' : p ∣ (a % leastMulDvd p b) * b :=
          dvd_remainder_mul p b (leastMulDvd p b) (a / leastMulDvd p b)
            (a % leastMulDvd p b) a hmdvd hab (Nat.div_add_mod a (leastMulDvd p b))
        have hle := hmin' (a % leastMulDvd p b) (by omega) ⟨hpos, hdvd'⟩
        omega
    rcases hp.2 _ hmp with h | h
    · rw [h] at hmdvd
      rwa [Nat.one_mul] at hmdvd
    · rw [h] at hma
      exact absurd hma hpa

/-- Greatest witness at or below the bound, by downward search; P 0 always holds here. -/
def findGt (P : Nat → Prop) [DecidablePred P] : Nat → Nat
  | 0 => 0
  | n + 1 => if P (n + 1) then n + 1 else findGt P n

theorem findGt_spec (P : Nat → Prop) [DecidablePred P] (n : Nat) (h0 : P 0) :
    P (findGt P n) := by
  induction n with
  | zero => exact h0
  | succ n ih =>
    show P (if P (n + 1) then n + 1 else findGt P n)
    rcases Decidable.em (P (n + 1)) with h | h
    · rw [if_pos h]; exact h
    · rw [if_neg h]; exact ih

theorem findGt_max (P : Nat → Prop) [DecidablePred P] (n k : Nat) (hk : k ≤ n) (hPk : P k) :
    k ≤ findGt P n := by
  induction n with
  | zero =>
    have h : k = 0 := by omega
    subst h
    exact Nat.le_refl _
  | succ n ih =>
    show k ≤ (if P (n + 1) then n + 1 else findGt P n)
    rcases Decidable.em (P (n + 1)) with h | h
    · rw [if_pos h]; exact hk
    · rw [if_neg h]
      have hne : k ≠ n + 1 := fun hkk => h (hkk ▸ hPk)
      have hkn : k ≤ n := by omega
      exact ih hkn

/-- The p-adic valuation: the exponent of p in n, as the greatest k with p ^ k ∣ n. -/
def pExp (p n : Nat) : Nat := findGt (fun k => p ^ k ∣ n) n

theorem pExp_dvd (p n : Nat) : p ^ pExp p n ∣ n :=
  findGt_spec (fun k => p ^ k ∣ n) n (by
    show p ^ 0 ∣ n
    rw [Nat.pow_zero]
    exact Nat.one_dvd n)

/-- Exponents of two outrun their index. -/
theorem two_pow_ge (k : Nat) : k + 1 ≤ 2 ^ k := by
  induction k with
  | zero => decide
  | succ k ih => rw [Nat.pow_succ]; omega

/-- A power of p ≥ 2 dividing a positive n is bounded by n. -/
theorem pow_dvd_bound (p n k : Nat) (hp : 2 ≤ p) (hn : 0 < n) (h : p ^ k ∣ n) : k ≤ n := by
  have h1 : p ^ k ≤ n := Nat.le_of_dvd hn h
  have h2 : k + 1 ≤ 2 ^ k := two_pow_ge k
  have h3 : 2 ^ k ≤ p ^ k := Nat.pow_le_pow_left hp k
  omega

theorem pExp_le_of_dvd (p n k : Nat) (hk : k ≤ n) (h : p ^ k ∣ n) : k ≤ pExp p n :=
  findGt_max (fun k => p ^ k ∣ n) n k hk h

/-- Four factors rearranged. -/
theorem mul_mul_mul_comm_nat (a b c d : Nat) : (a * b) * (c * d) = (a * c) * (b * d) := by
  calc (a * b) * (c * d) = a * (b * c) * d := by
        rw [Nat.mul_assoc, ← Nat.mul_assoc b c d, Nat.mul_assoc a (b * c) d]
    _ = a * (c * b) * d := by rw [Nat.mul_comm b c]
    _ = (a * c) * (b * d) := by
        rw [Nat.mul_assoc, Nat.mul_assoc c b d, Nat.mul_assoc a c (b * d)]

/-- The p-adic valuation is additive over products. -/
theorem pExp_mul (p a b : Nat) (hp : isPrime p) (ha : 0 < a) (hb : 0 < b) :
    pExp p (a * b) = pExp p a + pExp p b := by
  have hp2 : 2 ≤ p := hp.1
  have hp0 : 0 < p := by omega
  have hia : p ^ pExp p a ∣ a := pExp_dvd p a
  have hjb : p ^ pExp p b ∣ b := pExp_dvd p b
  obtain ⟨a', ha'⟩ := hia
  obtain ⟨b', hb'⟩ := hjb
  have hpa' : ¬ p ∣ a' := by
    intro hdiv
    obtain ⟨c, hc⟩ := hdiv
    have hbig : p ^ (pExp p a + 1) ∣ a :=
      ⟨c, by
        calc a = p ^ pExp p a * a' := ha'
          _ = p ^ pExp p a * (p * c) := by rw [hc]
          _ = p ^ (pExp p a + 1) * c := by rw [Nat.pow_add, Nat.pow_one, Nat.mul_assoc]⟩
    have hle := pExp_le_of_dvd p a (pExp p a + 1)
      (pow_dvd_bound p a _ hp2 ha hbig) hbig
    omega
  have hpb' : ¬ p ∣ b' := by
    intro hdiv
    obtain ⟨c, hc⟩ := hdiv
    have hbig : p ^ (pExp p b + 1) ∣ b :=
      ⟨c, by
        calc b = p ^ pExp p b * b' := hb'
          _ = p ^ pExp p b * (p * c) := by rw [hc]
          _ = p ^ (pExp p b + 1) * c := by rw [Nat.pow_add, Nat.pow_one, Nat.mul_assoc]⟩
    have hle := pExp_le_of_dvd p b (pExp p b + 1)
      (pow_dvd_bound p b _ hp2 hb hbig) hbig
    omega
  have hprodeq : a * b = p ^ (pExp p a + pExp p b) * (a' * b') := by
    have e1 : a * b = (p ^ pExp p a * a') * b := congrArg (fun x => x * b) ha'
    have e2 : (p ^ pExp p a * a') * b = (p ^ pExp p a * a') * (p ^ pExp p b * b') :=
      congrArg (fun x => (p ^ pExp p a * a') * x) hb'
    have e3 : (p ^ pExp p a * a') * (p ^ pExp p b * b') =
        (p ^ pExp p a * p ^ pExp p b) * (a' * b') := mul_mul_mul_comm_nat _ _ _ _
    have e4 : (p ^ pExp p a * p ^ pExp p b) * (a' * b') =
        p ^ (pExp p a + pExp p b) * (a' * b') :=
      congrArg (fun x => x * (a' * b')) (Nat.pow_add p _ _).symm
    exact e1.trans (e2.trans (e3.trans e4))
  have hup : p ^ (pExp p a + pExp p b) ∣ a * b := ⟨a' * b', hprodeq⟩
  have hdown : ¬ p ^ (pExp p a + pExp p b + 1) ∣ a * b := by
    intro hbig
    have hdecomp : p ^ (pExp p a + pExp p b + 1) = p ^ (pExp p a + pExp p b) * p := by
      rw [Nat.pow_add, Nat.pow_one]
    have hdiv : p ∣ a' * b' := by
      have h' : p ^ (pExp p a + pExp p b) * p ∣ p ^ (pExp p a + pExp p b) * (a' * b') := by
        rw [← hprodeq, ← hdecomp]
        exact hbig
      exact Nat.dvd_of_mul_dvd_mul_left (Nat.pow_pos hp0) h'
    rcases euclid_lemma p a' b' hp hdiv with h | h
    · exact hpa' h
    · exact hpb' h
  have hle1 : pExp p a + pExp p b ≤ pExp p (a * b) :=
    pExp_le_of_dvd p (a * b) _ (pow_dvd_bound p (a * b) _ hp2 (Nat.mul_pos ha hb) hup) hup
  have hle2 : pExp p (a * b) ≤ pExp p a + pExp p b := by
    have hK : p ^ pExp p (a * b) ∣ a * b := pExp_dvd p (a * b)
    rcases Decidable.em (pExp p a + pExp p b + 1 ≤ pExp p (a * b)) with hgt | hgt
    · exact absurd (Nat.dvd_trans (Nat.pow_dvd_pow p hgt) hK) hdown
    · omega
  omega

/-- The valuation of p at itself is one. -/
theorem pExp_self (p : Nat) (hp : isPrime p) : pExp p p = 1 := by
  have hp2 : 2 ≤ p := hp.1
  have hp0 : 0 < p := by omega
  have h1 : p ^ (1 : Nat) ∣ p := by rw [Nat.pow_one]; exact Nat.dvd_refl p
  have h1le : 1 ≤ pExp p p := pExp_le_of_dvd p p 1 (by omega) h1
  have hnot2 : ¬ p ^ (1 + 1 : Nat) ∣ p := by
    intro h
    have hle : p ^ (1 + 1) ≤ p := Nat.le_of_dvd hp0 h
    rw [Nat.pow_add, Nat.pow_one] at hle
    have hge : 2 * p ≤ p * p := by
      obtain ⟨d, hd⟩ := Nat.exists_eq_add_of_le hp2
      rw [hd, Nat.add_mul]
      exact Nat.le_add_right _ _
    omega
  rcases Decidable.em (2 ≤ pExp p p) with h | h
  · exact absurd (Nat.dvd_trans (Nat.pow_dvd_pow p h) (pExp_dvd p p)) hnot2
  · omega

/-- The valuation vanishes where p does not divide. -/
theorem pExp_eq_zero_of_not_dvd (p n : Nat) (h : ¬ p ∣ n) : pExp p n = 0 := by
  rcases Decidable.em (1 ≤ pExp p n) with hpos | hneg
  · have hpow : p ^ (1 : Nat) ∣ p ^ pExp p n := Nat.pow_dvd_pow p hpos
    rw [Nat.pow_one] at hpow
    exact absurd (Nat.dvd_trans hpow (pExp_dvd p n)) h
  · omega

/-- The valuation at one is zero. -/
theorem pExp_one (p : Nat) (hp : isPrime p) : pExp p 1 = 0 := by
  apply pExp_eq_zero_of_not_dvd
  intro hd
  have h1 := Nat.le_of_dvd (by decide) hd
  have h2 := hp.1
  omega

/-- The valuation at a different prime is zero. -/
theorem pExp_other (p q : Nat) (hp : isPrime p) (hq : isPrime q) (hpq : p ≠ q) :
    pExp p q = 0 := by
  apply pExp_eq_zero_of_not_dvd
  intro hd
  rcases hq.2 p hd with h | h
  · have := hp.1; omega
  · exact hpq h

/-- The p-adic valuation as an integer-valued function. -/
def padicMeasure (p : Nat) (n : Nat) : Int := (pExp p n : Int)

theorem padicMeasure_additive (p : Nat) (hp : isPrime p) :
    CompletelyAdditive (padicMeasure p) := by
  intro a b ha hb
  show ((pExp p (a * b) : Nat) : Int) = (pExp p a : Int) + (pExp p b : Int)
  rw [pExp_mul p a b hp ha hb, Int.natCast_add]

/-- For distinct primes p and q there is a completely additive function equal to 1 at p and 0 at q:
    the p-adic valuation. -/
theorem prime_freedom_independent (p q : Nat) (hp : isPrime p) (hq : isPrime q) (hpq : p ≠ q) :
    ∃ f : Nat → Int, CompletelyAdditive f ∧ f p = 1 ∧ f q = 0 ∧ f 1 = 0 :=
  ⟨padicMeasure p, padicMeasure_additive p hp,
   by show ((pExp p p : Nat) : Int) = 1; rw [pExp_self p hp]; rfl,
   by show ((pExp p q : Nat) : Int) = 0; rw [pExp_other p q hp hq hpq]; rfl,
   by show ((pExp p 1 : Nat) : Int) = 0; rw [pExp_one p hp]; rfl⟩

/-- Uniqueness and independence together: a completely additive function is determined by its
    values at the primes, and those values are freely assignable. -/
theorem primes_base_of_freedom :
    (∀ f g : Nat → Int, CompletelyAdditive f → CompletelyAdditive g →
      (∀ p, isPrime p → f p = g p) → ∀ n, 0 < n → f n = g n) ∧
    (∀ p q : Nat, isPrime p → isPrime q → p ≠ q →
      ∃ f : Nat → Int, CompletelyAdditive f ∧ f p = 1 ∧ f q = 0 ∧ f 1 = 0) :=
  ⟨determined_by_primes, prime_freedom_independent⟩

/-! ## V · The sign arrow of an additive count -/

/-- An additive count: Ω(ab) = Ω(a) + Ω(b) for positive a and b. -/
def AdditiveCount (Om : Nat → Nat) : Prop := ∀ a b, a > 0 → b > 0 → Om (a * b) = Om a + Om b

/-- The sign arrow of a count: +1 on an even count, −1 on an odd one. -/
def signArrow (k : Nat) : Int := if k % 2 = 0 then 1 else -1

/-- The sign of a sum is the product of the signs. -/
theorem signArrow_add (m n : Nat) :
    signArrow (m + n) = signArrow m * signArrow n := by
  unfold signArrow
  rw [Nat.add_mod]
  rcases Nat.mod_two_eq_zero_or_one m with hm | hm <;>
    rcases Nat.mod_two_eq_zero_or_one n with hn | hn <;>
    rw [hm, hn] <;> decide

/-- The sign arrow of an additive count is completely multiplicative, as λ(n) = (−1)^Ω(n) is. -/
theorem arrow_multiplicative (Om : Nat → Nat) (hOm : AdditiveCount Om)
    (a b : Nat) (ha : a > 0) (hb : 0 < b) :
    signArrow (Om (a * b)) = signArrow (Om a) * signArrow (Om b) := by
  rw [hOm a b ha hb, signArrow_add]

/-- At a prime the count is one and the sign is −1. -/
theorem arrow_at_prime (Om : Nat → Nat) (p : Nat) (_hp : isPrime p) (hOm : Om p = 1) :
    signArrow (Om p) = -1 := by
  rw [hOm]
  decide

/-! ## V-bis · No finite stage decides a universal -/

/-- For every N there is a property true below N and false at N. -/
theorem finite_never_forces (N : Nat) :
    ∃ P : Nat → Prop, (∀ n, n < N → P n) ∧ ¬ ∀ n, P n :=
  ⟨fun n => n < N, fun _ h => h, fun h => Nat.lt_irrefl N (h N)⟩

/-- A property with counterexamples past every stage is not universal:
    no finite census decides the limit. -/
theorem limit_not_forced (P : Nat → Prop) (h_finite : ∀ N, ∃ n > N, ¬ P n) : ¬ (∀ n, P n) := by
  intro h
  obtain ⟨n, _, hn_not⟩ := h_finite 0
  exact hn_not (h n)

/-! ## VI · The chart: the fold, registration, the record -/

/-- A point of the chart: the doubled real part x and the height t.
    The critical line is x = 1; the fold s ↦ 1 − s̄ sends x to 2 − x;
    registration keeps the height and lands on the line. -/
structure Pt where
  x : Int
  t : Nat
  deriving DecidableEq

def onLine (z : Pt) : Prop := z.x = 1
instance (z : Pt) : Decidable (onLine z) := inferInstanceAs (Decidable (z.x = 1))
def fold (z : Pt) : Pt := ⟨2 - z.x, z.t⟩
def reg (z : Pt) : Pt := ⟨1, z.t⟩

theorem fold_fixed_iff (z : Pt) : fold z = z ↔ onLine z := by
  cases z with
  | mk x t =>
    show Pt.mk (2 - x) t = Pt.mk x t ↔ x = 1
    constructor
    · intro h
      have hx := congrArg Pt.x h
      change 2 - x = x at hx
      omega
    · intro h
      subst h
      rfl

theorem reg_fixes_line (z : Pt) (h : onLine z) : reg z = z := by
  cases z with
  | mk x t =>
    have hx : x = 1 := h
    subst hx
    rfl

/-- No registered point lies off the line. -/
theorem unicorn_never_registered (z : Pt) (h : ¬ onLine z) : ∀ w, reg w ≠ z := by
  intro w hw
  apply h
  rw [← hw]
  exact rfl

/-- Every point is on the line, fixed by the fold and by registration, or off the line, moved by
    the fold, sharing its record with its partner, and registered by no point. -/
theorem nothing_escapes_one_cut (z : Pt) :
    (onLine z ∧ fold z = z ∧ reg z = z) ∨
    (¬ onLine z ∧ fold z ≠ z ∧ reg (fold z) = reg z ∧ ∀ w, reg w ≠ z) :=
  if h : z.x = 1 then Or.inl ⟨h, (fold_fixed_iff z).mpr h, reg_fixes_line z h⟩
  else Or.inr ⟨h, fun hf => h ((fold_fixed_iff z).mp hf), rfl, unicorn_never_registered z h⟩

/-- A world is a zero set on the chart. -/
abbrev World := Pt → Prop
def FoldClosed (Z : World) : Prop := ∀ z, Z z → Z (fold z)
/-- The hypothesis, on the chart: every zero lies on the line. -/
def RH (Z : World) : Prop := ∀ z, Z z → onLine z
def Left (Z : World) : Prop := ∃ z, Z z ∧ z.x < 1
def Right (Z : World) : Prop := ∃ z, Z z ∧ 1 < z.x

/-- On a fold-closed world some zero lies left of the line exactly when some zero lies right of it. -/
theorem sides_together (Z : World) (hZ : FoldClosed Z) : Left Z ↔ Right Z :=
  ⟨fun ⟨z, hz, hx⟩ => ⟨fold z, hZ z hz, show 1 < 2 - z.x by omega⟩,
   fun ⟨z, hz, hx⟩ => ⟨fold z, hZ z hz, show 2 - z.x < 1 by omega⟩⟩

/-- On a fold-closed world the hypothesis holds exactly when no zero lies left of the line. -/
theorem rh_iff_no_left (Z : World) (hZ : FoldClosed Z) : RH Z ↔ ¬ Left Z := by
  constructor
  · intro h ⟨z, hz, hx⟩
    have e : z.x = 1 := h z hz
    omega
  · intro h z hz
    if hx : z.x = 1 then exact hx
    else
      exfalso
      apply h
      if hl : z.x < 1 then exact ⟨z, hz, hl⟩
      else exact ⟨fold z, hZ z hz, show 2 - z.x < 1 by omega⟩

/-- The record of a world: its zeros registered. -/
def recordOf (Z : World) : World := fun r => ∃ s, Z s ∧ reg s = r
def SameRecord (Z Z' : World) : Prop := ∀ r, recordOf Z r ↔ recordOf Z' r
/-- A reading respects the record when two worlds of one record read alike. -/
def RespectsRecord (g : World → Prop) : Prop := ∀ Z Z', SameRecord Z Z' → (g Z ↔ g Z')

/-- The on-line world at height 14, and the off-line pair at offset k about the same height. -/
abbrev W1 : World := fun z => z = ⟨1, 14⟩
abbrev pairAt (k : Int) : World := fun z => z = ⟨1 - k, 14⟩ ∨ z = ⟨1 + k, 14⟩
abbrev W2 : World := pairAt 1

theorem W1_closed : FoldClosed W1 := by
  intro z hz
  have h : z = ⟨1, 14⟩ := hz
  subst h
  show fold ⟨1, 14⟩ = ⟨1, 14⟩
  decide

theorem W1_rh : RH W1 := by
  intro z hz
  have h : z = ⟨1, 14⟩ := hz
  subst h
  exact rfl

theorem pair_closed (k : Int) : FoldClosed (pairAt k) := by
  intro z hz
  rcases hz with h | h
  · subst h
    apply Or.inr
    show Pt.mk (2 - (1 - k)) 14 = Pt.mk (1 + k) 14
    congr 1
    omega
  · subst h
    apply Or.inl
    show Pt.mk (2 - (1 + k)) 14 = Pt.mk (1 - k) 14
    congr 1
    omega

theorem pair_not_rh (k : Int) (hk : k ≠ 0) : ¬ RH (pairAt k) := by
  intro h
  have e : (1 : Int) - k = 1 := h ⟨1 - k, 14⟩ (Or.inl rfl)
  omega

theorem pair_same_record (k : Int) : SameRecord W1 (pairAt k) := by
  intro r
  constructor
  · intro ⟨s, hs, hr⟩
    have h : s = ⟨1, 14⟩ := hs
    subst h
    exact ⟨⟨1 - k, 14⟩, Or.inl rfl, hr⟩
  · intro ⟨s, hs, hr⟩
    rcases hs with h | h <;> subst h <;> exact ⟨⟨1, 14⟩, rfl, hr⟩

theorem W2_closed : FoldClosed W2 := pair_closed 1
theorem W2_not_rh : ¬ RH W2 := pair_not_rh 1 (by decide)
theorem same_record_12 : SameRecord W1 W2 := pair_same_record 1

/-- Distinct positive offsets give distinct fold-closed worlds with the record of W1, none
    satisfying the hypothesis. -/
theorem fibre_is_infinite (k k' : Int) (hk : 0 < k) (hk' : 0 < k') (hne : k ≠ k') :
    SameRecord W1 (pairAt k) ∧ ¬ RH (pairAt k) ∧ pairAt k ⟨1 - k, 14⟩ ∧ ¬ pairAt k' ⟨1 - k, 14⟩ := by
  refine ⟨pair_same_record k, pair_not_rh k (by omega), Or.inl rfl, ?_⟩
  intro h
  rcases h with h | h
  · have e : (1 : Int) - k = 1 - k' := congrArg Pt.x h
    omega
  · have e : (1 : Int) - k = 1 + k' := congrArg Pt.x h
    omega

/-- Two worlds with the same record that both satisfy the hypothesis are equal. -/
theorem lossless_unique (Z Z' : World) (h : SameRecord Z Z') (hZ : RH Z) (hZ' : RH Z') :
    ∀ z, Z z ↔ Z' z := by
  intro z
  constructor
  · intro hz
    obtain ⟨s, hs, hsr⟩ := (h z).mp ⟨z, hz, reg_fixes_line z (hZ z hz)⟩
    have e : reg s = s := reg_fixes_line s (hZ' s hs)
    rw [← hsr, e]
    exact hs
  · intro hz
    obtain ⟨s, hs, hsr⟩ := (h z).mpr ⟨z, hz, reg_fixes_line z (hZ' z hz)⟩
    have e : reg s = s := reg_fixes_line s (hZ s hs)
    rw [← hsr, e]
    exact hs

/-- No reading of the record agrees with the hypothesis on every fold-closed world. -/
theorem record_decides_nothing (g : World → Prop) (hg : RespectsRecord g) :
    ¬ ∀ Z, FoldClosed Z → (g Z ↔ RH Z) := fun h =>
  W2_not_rh ((h W2 W2_closed).mp ((hg W1 W2 same_record_12).mp ((h W1 W1_closed).mpr W1_rh)))

/-- record_decides_nothing, under a second name. -/
theorem unicorn_block (g : World → Prop) (hg : RespectsRecord g) :
    ¬ ∀ Z, FoldClosed Z → (g Z ↔ RH Z) := record_decides_nothing g hg

/-- A premise is keyless when it holds on every world. -/
def Keyless (A : World → Prop) : Prop := ∀ Z, A Z
/-- A premise forces the line when every fold-closed world it holds on satisfies the hypothesis. -/
def Forces (A : World → Prop) : Prop := ∀ Z, FoldClosed Z → A Z → RH Z

/-- A keyless premise forces nothing: it holds on W2, which is fold-closed and fails the
    hypothesis. -/
theorem keyless_forces_nothing (A : World → Prop) (hA : Keyless A) : ¬ Forces A :=
  fun h => W2_not_rh (h W2 W2_closed (hA W2))

/-- The hypothesis separates W1 from W2, which share one record. -/
theorem sentence_separates_record_does_not : (RH W1 ∧ ¬ RH W2) ∧ SameRecord W1 W2 :=
  ⟨⟨W1_rh, W2_not_rh⟩, same_record_12⟩

/-! ## VII · Least erasure is the value -/

def OffLine (Z : World) : Prop := ∃ z, Z z ∧ ¬ onLine z
/-- Least erasure in the fibre: if the world erases, every world of its record erases. -/
def LeastErasure (Z : World) : Prop := ∀ Z', SameRecord Z Z' → OffLine Z → OffLine Z'

theorem record_is_lossless (Z : World) : ¬ OffLine (recordOf Z) := by
  intro ⟨r, ⟨s, _, hsr⟩, hoff⟩
  apply hoff
  rw [← hsr]
  exact rfl

theorem record_same (Z : World) : SameRecord Z (recordOf Z) := by
  intro r
  constructor
  · intro ⟨s, hs, hsr⟩
    exact ⟨reg s, ⟨s, hs, rfl⟩, hsr⟩
  · intro ⟨s', ⟨s, hs, hss'⟩, hs'r⟩
    subst hss'
    exact ⟨s, hs, hs'r⟩

/-- Least erasure holds on a world exactly when the hypothesis does. -/
theorem least_erasure_is_the_value (Z : World) : LeastErasure Z ↔ RH Z := by
  constructor
  · intro hle z hz
    if h : z.x = 1 then exact h
    else exact absurd (hle (recordOf Z) (record_same Z) ⟨z, hz, h⟩) (record_is_lossless Z)
  · intro hrh _ _ ⟨z, hz, hoff⟩
    exact absurd (hrh z hz) hoff

/-- Least erasure is not a reading of the record: it holds on W1 and fails on W2, which share one
    record. -/
theorem least_erasure_reads_past_the_record : ¬ RespectsRecord LeastErasure := fun h =>
  W2_not_rh ((least_erasure_is_the_value W2).mp
    ((h W1 W2 same_record_12).mp ((least_erasure_is_the_value W1).mpr W1_rh)))

/-- Any premise that forces the line and is forced by it is the line, on every fold-closed
    world. -/
theorem posit_is_the_value (A : World → Prop) (h : Forces A)
    (h' : ∀ Z, FoldClosed Z → RH Z → A Z) : ∀ Z, FoldClosed Z → (A Z ↔ RH Z) :=
  fun Z hZ => ⟨h Z hZ, h' Z hZ⟩

/-! ## VII-bis · The fold never crosses the line; a second symmetry; the record blind at every scale -/

/-- The fold lands on the line exactly where the point already was: folding never crosses. -/
theorem fold_onLine_iff (z : Pt) : onLine (fold z) ↔ onLine z := by
  show (2 - z.x = 1) ↔ (z.x = 1)
  constructor <;> intro h <;> omega

theorem fold_preserves_offline (z : Pt) : ¬ onLine (fold z) ↔ ¬ onLine z := by
  rw [fold_onLine_iff]

theorem fold_ne_of_offline (z : Pt) (h : ¬ onLine z) : fold z ≠ z :=
  fun hf => h ((fold_fixed_iff z).mp hf)

/-- A second involution on the chart, commuting with the fold and preserving the line. -/
structure ConjSymmetry where
  conj : Pt → Pt
  invol : ∀ z, conj (conj z) = z
  commutes : ∀ z, conj (fold z) = fold (conj z)
  preserves_line : ∀ z, onLine (conj z) ↔ onLine z

/-- Under both symmetries one off-line zero forces its reflection, its conjugate and their
    composite into the world, all off the line. -/
theorem offline_zero_quadruple (Z : World) (hF : FoldClosed Z) (C : ConjSymmetry)
    (hC : ∀ z, Z z → Z (C.conj z)) (z : Pt) (hz : Z z) (hoff : ¬ onLine z) :
    Z (fold z) ∧ Z (C.conj z) ∧ Z (C.conj (fold z)) ∧
      ¬ onLine (fold z) ∧ ¬ onLine (C.conj z) ∧ ¬ onLine (C.conj (fold z)) ∧ fold z ≠ z :=
  ⟨hF z hz, hC z hz, hC (fold z) (hF z hz),
   (fold_preserves_offline z).mpr hoff,
   fun h => hoff ((C.preserves_line z).mp h),
   fun h => hoff ((fold_onLine_iff z).mp ((C.preserves_line (fold z)).mp h)),
   fold_ne_of_offline z hoff⟩

/-- If the hypothesis fails on a world, some zero of it lies off the line. Classical. -/
theorem not_rh_has_offline_witness (Z : World) (h : ¬ RH Z) : OffLine Z := by
  apply Classical.byContradiction
  intro hno
  apply h
  intro z hz
  apply Classical.byContradiction
  intro hoff
  exact hno ⟨z, hz, hoff⟩

/-- Denying the hypothesis on a world with both symmetries posits a whole off-line orbit of four
    points. -/
theorem denial_posits_the_orbit (Z : World) (hF : FoldClosed Z) (C : ConjSymmetry)
    (hC : ∀ z, Z z → Z (C.conj z)) (h : ¬ RH Z) :
    ∃ z, Z z ∧ ¬ onLine z ∧ Z (fold z) ∧ Z (C.conj z) ∧ Z (C.conj (fold z)) := by
  obtain ⟨z, hz, hoff⟩ := not_rh_has_offline_witness Z h
  exact ⟨z, hz, hoff, hF z hz, hC z hz, hC (fold z) (hF z hz)⟩

/-- For every nonzero offset the pair world is fold-closed, fails the hypothesis, and shares the
    record of W1. -/
theorem record_blind_at_every_scale (k : Int) (hk : k ≠ 0) :
    RH W1 ∧ FoldClosed (pairAt k) ∧ ¬ RH (pairAt k) ∧ SameRecord W1 (pairAt k) :=
  ⟨W1_rh, pair_closed k, pair_not_rh k hk, pair_same_record k⟩

/-! ## VIII · Self-grounding supplies, and the five faces of the hypothesis -/

/-- A self-grounding root, the structure of Appendix R in the same words: acts occur, and every act instances the root. -/
structure SelfGrounding (root : Prop) where
  Act       : Type
  anAct     : Act
  instances : Act → root

/-- A self-grounding supply of a proposition, with an act, exists exactly when the proposition
    holds. -/
theorem supply_iff (root : Prop) : (∃ G : SelfGrounding root, Nonempty G.Act) ↔ root := by
  constructor
  · intro ⟨G, ⟨a⟩⟩
    exact G.instances a
  · intro hr
    exact ⟨⟨Unit, (), fun _ => hr⟩, ⟨()⟩⟩

/-- The five faces of the hypothesis. The equivalences are fields, carried as hypotheses and not
    proved here: the critical line (Riemann 1859), Λ = 0 (Newman 1976; Rodgers and Tao 2020), the
    faithfulness of the Liouville function (Landau 1899), and Weil positivity (Weil 1952). -/
structure Faces where
  line : Prop
  lamZero : Prop
  faithful : Prop
  weil : Prop
  least : Prop
  line_iff_least : line ↔ least
  lam_iff_least : lamZero ↔ least
  faith_iff_least : faithful ↔ least
  weil_iff_least : weil ↔ least

/-- Any one face implies all five. -/
theorem faces_are_one (H : Faces) :
    (H.line ↔ H.least) ∧ (H.lamZero ↔ H.least) ∧ (H.faithful ↔ H.least) ∧ (H.weil ↔ H.least) :=
  ⟨H.line_iff_least, H.lam_iff_least, H.faith_iff_least, H.weil_iff_least⟩

/-- Given a self-grounding supply of the least-erasure face with an act, all five faces hold. -/
theorem rh_from_the_act_generic (H : Faces) (G : SelfGrounding H.least) (a : G.Act) :
    H.line ∧ H.lamZero ∧ H.faithful ∧ H.weil ∧ H.least :=
  let le := G.instances a
  ⟨H.line_iff_least.mpr le, H.lam_iff_least.mpr le, H.faith_iff_least.mpr le,
   H.weil_iff_least.mpr le, le⟩


/-! ## IX · Primes, the free basis and the identity arrow are keyless and force nothing -/

/-- Primes exist. -/
theorem primes_exist : ∃ p, isPrime p :=
  let ⟨p, hp, _⟩ := exists_prime_dvd 2 (by decide) (by decide)
  ⟨p, hp⟩

/-- The existence of primes holds on every world. -/
theorem primes_exist_keyless : Keyless (fun _ => ∃ p, isPrime p) := fun _ => primes_exist

/-- The free basis at the primes holds on every world. -/
theorem prime_freedom_keyless :
    Keyless (fun _ => ∀ p q, isPrime p → isPrime q → p ≠ q →
      ∃ f : Nat → Int, CompletelyAdditive f ∧ f p = 1 ∧ f q = 0 ∧ f 1 = 0) :=
  fun _ => prime_freedom_independent

/-- The identity arrow exists on every world. -/
theorem arrow_keyless : Keyless (fun _ => ∃ f : Nat → Nat, ∀ a, f a = a) :=
  fun _ => arrow_exists Nat

/-- The existence of primes forces nothing. -/
theorem primes_exist_forces_nothing : ¬ Forces (fun _ => ∃ p, isPrime p) :=
  keyless_forces_nothing _ primes_exist_keyless

/-- The free basis at the primes forces nothing. -/
theorem prime_freedom_forces_nothing :
    ¬ Forces (fun _ => ∀ p q, isPrime p → isPrime q → p ≠ q →
      ∃ f : Nat → Int, CompletelyAdditive f ∧ f p = 1 ∧ f q = 0 ∧ f 1 = 0) :=
  keyless_forces_nothing _ prime_freedom_keyless

/-- The existence of the identity arrow forces nothing. -/
theorem arrow_forces_nothing : ¬ Forces (fun _ => ∃ f : Nat → Nat, ∀ a, f a = a) :=
  keyless_forces_nothing _ arrow_keyless

/-- The free basis holds, and a fold-closed world failing the hypothesis exists. -/
theorem free_basis_coexists_with_offline_world :
    (∀ p q : Nat, isPrime p → isPrime q → p ≠ q →
      ∃ f : Nat → Int, CompletelyAdditive f ∧ f p = 1 ∧ f q = 0 ∧ f 1 = 0) ∧
    ∃ Z, FoldClosed Z ∧ ¬ RH Z :=
  ⟨prime_freedom_independent, W2, W2_closed, W2_not_rh⟩

/-- An off-line point folds to a distinct off-line point, which no point registers to. -/
theorem fold_off_line_stays_off (z : Pt) (h : ¬ onLine z) :
    ¬ onLine (fold z) ∧ fold z ≠ reg z ∧ fold z ≠ z :=
  ⟨(fold_preserves_offline z).mpr h,
   fun e => unicorn_never_registered (fold z) ((fold_preserves_offline z).mpr h) z e.symm,
   fold_ne_of_offline z h⟩

/-! ## X · The explicit formula as a structure; least erasure is Weil positivity -/

structure ExplicitFormula where
  /-- The value type of the two sides, with its order and its zero. -/
  V : Type
  le : V → V → Prop
  zero : V
  /-- The admissible test functions, their adjoint g ↦ g~, and their convolution. -/
  T : Type
  adj : T → T
  conv : T → T → T
  /-- The arithmetic side: the archimedean term with the sum over the primes. -/
  primeSide : T → V
  /-- The zero side: the sum over the zeros. -/
  zeroSide : T → V
  /-- The zeros, as a world on the chart. -/
  zeros : World
  /-- The explicit formula: the zero side of every test function equals its arithmetic side. Carried
    as a hypothesis (Guinand 1948; Weil 1952). -/
  identity : ∀ g, zeroSide g = primeSide g
  /-- Weil's criterion: the arithmetic side is non-negative on every g ⋆ g̃ exactly when the zeros
    lie on the line. Carried as a hypothesis (Weil 1952; Bombieri 2000). -/
  positivity_iff_line : (∀ g, le zero (primeSide (conv g (adj g)))) ↔ RH zeros

/-- Weil positivity, stated on the prime side. -/
def WeilPositive (E : ExplicitFormula) : Prop :=
  ∀ g, E.le E.zero (E.primeSide (E.conv g (E.adj g)))

/-- Through the identity, positivity reads the same on the zero side. -/
theorem positivity_on_zero_side (E : ExplicitFormula) :
    WeilPositive E ↔ ∀ g, E.le E.zero (E.zeroSide (E.conv g (E.adj g))) := by
  constructor
  · intro h g
    rw [E.identity]
    exact h g
  · intro h g
    rw [← E.identity]
    exact h g

/-- Least erasure of the zeros of an explicit formula is Weil positivity of its arithmetic side. -/
theorem least_erasure_is_positivity (E : ExplicitFormula) :
    LeastErasure E.zeros ↔ WeilPositive E :=
  (least_erasure_is_the_value E.zeros).trans E.positivity_iff_line.symm

/-- A self-grounding supply of Weil positivity exists exactly when the zeros lie on the line. -/
theorem prime_witness_iff (E : ExplicitFormula) :
    (∃ G : SelfGrounding (WeilPositive E), Nonempty G.Act) ↔ RH E.zeros :=
  (supply_iff (WeilPositive E)).trans E.positivity_iff_line

/-- Weil positivity implies the hypothesis for the zeros of the explicit formula. -/
theorem rh_from_prime_witness (E : ExplicitFormula) (h : WeilPositive E) : RH E.zeros :=
  E.positivity_iff_line.mp h

/-- The positive instance: one test function, arithmetic side zero, zeros on the line. -/
def positiveInstance : ExplicitFormula where
  V := Int
  le := fun a b => a ≤ b
  zero := 0
  T := Unit
  adj := id
  conv := fun _ _ => ()
  primeSide := fun _ => 0
  zeroSide := fun _ => 0
  zeros := W1
  identity := fun _ => rfl
  positivity_iff_line := ⟨fun _ => W1_rh, fun _ _ => Int.le_refl 0⟩

/-- The negative instance: one test function, arithmetic side minus one, zeros off the line. -/
def negativeInstance : ExplicitFormula where
  V := Int
  le := fun a b => a ≤ b
  zero := 0
  T := Unit
  adj := id
  conv := fun _ _ => ()
  primeSide := fun _ => -1
  zeroSide := fun _ => -1
  zeros := W2
  identity := fun _ => rfl
  positivity_iff_line :=
    ⟨fun h => absurd (h ()) (by decide : ¬ ((0 : Int) ≤ -1)), fun h => absurd h W2_not_rh⟩

/-- Two explicit formulas satisfy every field, one positive with its zeros on the line and one not
    positive with its zeros off the line: no field decides positivity. -/
theorem positivity_is_keyed : WeilPositive positiveInstance ∧ ¬ WeilPositive negativeInstance :=
  ⟨fun _ => Int.le_refl 0, fun h => absurd (h ()) (by decide : ¬ ((0 : Int) ≤ -1))⟩

/-- The free basis holds in both instances. -/
theorem freedom_does_not_pick_the_sign :
    (∀ p q : Nat, isPrime p → isPrime q → p ≠ q →
      ∃ f : Nat → Int, CompletelyAdditive f ∧ f p = 1 ∧ f q = 0 ∧ f 1 = 0) ∧
    WeilPositive positiveInstance ∧ ¬ WeilPositive negativeInstance :=
  ⟨prime_freedom_independent, positivity_is_keyed⟩

/-- Section X, whole: the free basis; least erasure as the hypothesis and as positivity; the block;
    keyless premises forcing nothing; positivity keyed. -/
theorem prime_witness_ledger :
    (∀ f g : Nat → Int, CompletelyAdditive f → CompletelyAdditive g →
      (∀ p, isPrime p → f p = g p) → ∀ n, 0 < n → f n = g n) ∧
    (∀ p q : Nat, isPrime p → isPrime q → p ≠ q →
      ∃ f : Nat → Int, CompletelyAdditive f ∧ f p = 1 ∧ f q = 0 ∧ f 1 = 0) ∧
    (∀ Z : World, LeastErasure Z ↔ RH Z) ∧
    (∀ E : ExplicitFormula, LeastErasure E.zeros ↔ WeilPositive E) ∧
    (∀ g : World → Prop, RespectsRecord g → ¬ ∀ Z, FoldClosed Z → (g Z ↔ RH Z)) ∧
    (¬ Forces (fun _ => ∃ p, isPrime p)) ∧
    (¬ Forces (fun _ => ∀ p q, isPrime p → isPrime q → p ≠ q →
      ∃ f : Nat → Int, CompletelyAdditive f ∧ f p = 1 ∧ f q = 0 ∧ f 1 = 0)) ∧
    (¬ Forces (fun _ => ∃ f : Nat → Nat, ∀ a, f a = a)) ∧
    (WeilPositive positiveInstance ∧ ¬ WeilPositive negativeInstance) :=
  ⟨determined_by_primes, prime_freedom_independent, least_erasure_is_the_value,
   least_erasure_is_positivity, unicorn_block, primes_exist_forces_nothing,
   prime_freedom_forces_nothing, arrow_forces_nothing, positivity_is_keyed⟩

/-! ## XI · The posit as a structure field -/

/-- A zero set with its fold-closure and the one posit, least erasure. -/
structure ActualZeros where
  /-- The zero set, as a world on the chart. -/
  zeros : World
  /-- The zero set is fold-closed (the functional equation, Riemann 1859). -/
  fold_closed : FoldClosed zeros
  /-- The posit: least erasure of the zero set. By least_erasure_is_the_value this field is the
    hypothesis. -/
  supply : LeastErasure zeros

/-- From the posit, the hypothesis. -/
theorem rh_from_the_act (A : ActualZeros) : RH A.zeros :=
  (least_erasure_is_the_value A.zeros).mp A.supply

/-- The type of the posit is equivalent to the hypothesis. -/
theorem posit_is_the_conclusion (A : ActualZeros) : LeastErasure A.zeros ↔ RH A.zeros :=
  least_erasure_is_the_value A.zeros

/-- From the posit: the line, least erasure, every zero fixed by the fold and by registration, and
    no off-line orbit. -/
theorem rh_ground_closure_complete (A : ActualZeros) :
    RH A.zeros ∧ LeastErasure A.zeros ∧ (∀ z, A.zeros z → fold z = z) ∧
    (∀ z, A.zeros z → reg z = z) ∧ ¬ Left A.zeros :=
  ⟨rh_from_the_act A, A.supply,
   fun z hz => (fold_fixed_iff z).mpr (rh_from_the_act A z hz),
   fun z hz => reg_fixes_line z (rh_from_the_act A z hz),
   (rh_iff_no_left A.zeros A.fold_closed).mp (rh_from_the_act A)⟩

/-- An explicit formula for fold-closed zeros, with positivity posited. -/
structure PrimeAct where
  E : ExplicitFormula
  fold_closed : FoldClosed E.zeros
  /-- The posit on the prime side: Weil positivity. -/
  positive : WeilPositive E

/-- A prime act is a least-erasure act. -/
def PrimeAct.toActual (P : PrimeAct) : ActualZeros :=
  ⟨P.E.zeros, P.fold_closed, (least_erasure_is_positivity P.E).mpr P.positive⟩

/-- From positivity posited, the hypothesis. -/
theorem rh_from_prime_act (P : PrimeAct) : RH P.E.zeros := rh_from_the_act P.toActual

/-- For an explicit formula with fold-closed zeros, a positivity posit exists exactly when a
    least-erasure posit exists for its zeros. -/
theorem acts_are_one (E : ExplicitFormula) (hF : FoldClosed E.zeros) :
    (∃ P : PrimeAct, P.E = E) ↔ ∃ A : ActualZeros, A.zeros = E.zeros := by
  constructor
  · intro ⟨P, hP⟩
    subst hP
    exact ⟨P.toActual, rfl⟩
  · intro ⟨A, hA⟩
    refine ⟨⟨E, hF, (least_erasure_is_positivity E).mp ?_⟩, rfl⟩
    rw [← hA]
    exact A.supply


/-! ## XII · The block with no axiom: the pair world written out -/

/-- The pair world at offset one, written out. -/
abbrev W2f : World := fun z => z = ⟨0, 14⟩ ∨ z = ⟨2, 14⟩

theorem W2f_closed : FoldClosed W2f := by
  intro z hz
  rcases hz with h | h
  · subst h; exact Or.inr rfl
  · subst h; exact Or.inl rfl

theorem W2f_not_rh : ¬ RH W2f :=
  fun h => absurd (h ⟨0, 14⟩ (Or.inl rfl)) (by decide : ¬ ((0 : Int) = 1))

theorem same_record_f : SameRecord W1 W2f := by
  intro r
  constructor
  · intro ⟨s, hs, hr⟩
    have h : s = ⟨1, 14⟩ := hs
    subst h
    exact ⟨⟨0, 14⟩, Or.inl rfl, hr⟩
  · intro ⟨s, hs, hr⟩
    rcases hs with h | h <;> subst h <;> exact ⟨⟨1, 14⟩, rfl, hr⟩

/-- record_decides_nothing, with no axiom. -/
theorem record_decides_nothing_free (g : World → Prop) (hg : RespectsRecord g) :
    ¬ ∀ Z, FoldClosed Z → (g Z ↔ RH Z) := fun h =>
  W2f_not_rh ((h W2f W2f_closed).mp ((hg W1 W2f same_record_f).mp ((h W1 W1_closed).mpr W1_rh)))

/-- unicorn_block, with no axiom. -/
theorem unicorn_block_free (g : World → Prop) (hg : RespectsRecord g) :
    ¬ ∀ Z, FoldClosed Z → (g Z ↔ RH Z) := record_decides_nothing_free g hg

/-- keyless_forces_nothing, with no axiom. -/
theorem keyless_forces_nothing_free (A : World → Prop) (hA : Keyless A) : ¬ Forces A :=
  fun h => W2f_not_rh (h W2f W2f_closed (hA W2f))

/-- arrow_forces_nothing, with no axiom. -/
theorem arrow_forces_nothing_free : ¬ Forces (fun _ => ∃ f : Nat → Nat, ∀ a, f a = a) :=
  keyless_forces_nothing_free _ arrow_keyless

/-- least_erasure_reads_past_the_record, with no axiom. -/
theorem least_erasure_reads_past_the_record_free : ¬ RespectsRecord LeastErasure := fun h =>
  W2f_not_rh ((least_erasure_is_the_value W2f).mp
    ((h W1 W2f same_record_f).mp ((least_erasure_is_the_value W1).mpr W1_rh)))

/-- The negative instance on the explicit pair world. -/
def negativeInstanceF : ExplicitFormula where
  V := Int
  le := fun a b => a ≤ b
  zero := 0
  T := Unit
  adj := id
  conv := fun _ _ => ()
  primeSide := fun _ => -1
  zeroSide := fun _ => -1
  zeros := W2f
  identity := fun _ => rfl
  positivity_iff_line :=
    ⟨fun h => absurd (h ()) (by decide : ¬ ((0 : Int) ≤ -1)), fun h => absurd h W2f_not_rh⟩

/-- positivity_is_keyed, with no axiom. -/
theorem positivity_is_keyed_free : WeilPositive positiveInstance ∧ ¬ WeilPositive negativeInstanceF :=
  ⟨fun _ => Int.le_refl 0, fun h => absurd (h ()) (by decide : ¬ ((0 : Int) ≤ -1))⟩


/-! ## XIII · The hypothesis on the supplied bit -/

/-- For every explicit formula, Weil positivity is equivalent to the hypothesis for its zeros. -/
theorem spend_is_the_line (E : ExplicitFormula) : WeilPositive E ↔ RH E.zeros :=
  E.positivity_iff_line

/-- The free basis holds, and an explicit formula exists on which positivity fails: the free basis
    and positivity are distinct. -/
theorem spend_is_not_the_free_basis :
    (∀ p q : Nat, isPrime p → isPrime q → p ≠ q →
      ∃ f : Nat → Int, CompletelyAdditive f ∧ f p = 1 ∧ f q = 0 ∧ f 1 = 0) ∧
    ∃ E : ExplicitFormula, ¬ WeilPositive E :=
  ⟨prime_freedom_independent, negativeInstanceF, positivity_is_keyed_free.2⟩

/-- From positivity posited: the line, least erasure, positivity, every zero fixed by the fold and
    by registration, and no off-line orbit. -/
theorem rh_on_the_spent_bit (P : PrimeAct) :
    RH P.E.zeros ∧ LeastErasure P.E.zeros ∧ WeilPositive P.E ∧
    (∀ z, P.E.zeros z → fold z = z) ∧ (∀ z, P.E.zeros z → reg z = z) ∧ ¬ Left P.E.zeros :=
  let c := rh_ground_closure_complete P.toActual
  ⟨c.1, c.2.1, P.positive, c.2.2.1, c.2.2.2.1, c.2.2.2.2⟩

/-- Sections X to XIII, whole. -/
theorem prime_arc_sealed :
    (∀ f g : Nat → Int, CompletelyAdditive f → CompletelyAdditive g →
      (∀ p, isPrime p → f p = g p) → ∀ n, 0 < n → f n = g n) ∧
    (∀ p q : Nat, isPrime p → isPrime q → p ≠ q →
      ∃ f : Nat → Int, CompletelyAdditive f ∧ f p = 1 ∧ f q = 0 ∧ f 1 = 0) ∧
    (∀ Z : World, LeastErasure Z ↔ RH Z) ∧
    (∀ E : ExplicitFormula, LeastErasure E.zeros ↔ WeilPositive E) ∧
    (∀ E : ExplicitFormula, WeilPositive E ↔ RH E.zeros) ∧
    (∀ g : World → Prop, RespectsRecord g → ¬ ∀ Z, FoldClosed Z → (g Z ↔ RH Z)) ∧
    (∀ A : World → Prop, Keyless A → ¬ Forces A) ∧
    (WeilPositive positiveInstance ∧ ¬ WeilPositive negativeInstanceF) ∧
    (∃ E : ExplicitFormula, ¬ WeilPositive E) ∧
    (∀ P : PrimeAct, RH P.E.zeros) :=
  ⟨determined_by_primes, prime_freedom_independent, least_erasure_is_the_value,
   least_erasure_is_positivity, spend_is_the_line, record_decides_nothing_free,
   keyless_forces_nothing_free, positivity_is_keyed_free, spend_is_not_the_free_basis.2,
   rh_from_prime_act⟩


/-! ## XIV · The weakest forcing premise; the Li and de Bruijn–Newman coordinates -/

/-- The hypothesis forces the line, and every premise that forces the line implies the hypothesis
    on every fold-closed world. -/
theorem rh_is_the_weakest_forcing_premise :
    Forces RH ∧ ∀ A : World → Prop, Forces A → ∀ Z, FoldClosed Z → A Z → RH Z :=
  ⟨fun _ _ h => h, fun _ hA Z hZ ha => hA Z hZ ha⟩

/-- A premise that holds at some fold-closed world where the hypothesis fails does not force. -/
theorem weaker_never_forces (A : World → Prop) (Z : World) (hZ : FoldClosed Z) (ha : A Z)
    (hn : ¬ RH Z) : ¬ Forces A :=
  fun h => hn (h Z hZ ha)

/-- A premise true on W2f forces nothing. -/
theorem weaker_at_the_twin_never_forces (A : World → Prop) (ha : A W2f) : ¬ Forces A :=
  weaker_never_forces A W2f W2f_closed ha W2f_not_rh

/-- A zero set with the signs of its Li coefficients: the hypothesis holds exactly when every
    coefficient is non-negative. Carried as a hypothesis (Li 1997; Bombieri and Lagarias 1999). -/
structure LiStream where
  zeros : World
  nonneg : Nat → Prop
  li : RH zeros ↔ ∀ n, 1 ≤ n → nonneg n

theorem rh_from_li (L : LiStream) (h : ∀ n, 1 ≤ n → L.nonneg n) : RH L.zeros := L.li.mpr h

theorem li_is_the_bit_stream (L : LiStream) : (∀ n, 1 ≤ n → L.nonneg n) ↔ RH L.zeros := L.li.symm

/-- For every N there is a Li stream non-negative below N whose zero set lies off the line. -/
theorem li_prefix_never_forces (N : Nat) :
    ∃ L : LiStream, (∀ n, n < N → L.nonneg n) ∧ ¬ RH L.zeros :=
  ⟨⟨W2f, fun n => n < N,
    ⟨fun h => absurd h W2f_not_rh,
     fun h => absurd (h (N + 1) (Nat.succ_pos N))
       (fun c => Nat.lt_irrefl N (Nat.lt_trans (Nat.lt_succ_self N) c))⟩⟩,
   fun _ h => h, W2f_not_rh⟩

/-- The de Bruijn–Newman constant over an ordered type: Λ and its zero, the order's reflexivity and
    antisymmetry, 0 ≤ Λ (Rodgers and Tao 2020), and the hypothesis exactly when Λ = 0 (Newman
    1976). Every field is carried as a hypothesis. -/
structure DBN (V : Type) [LE V] where
  zeros : World
  lam : V
  zero : V
  refl : ∀ a : V, a ≤ a
  antisymm : ∀ a b : V, a ≤ b → b ≤ a → a = b
  lower : zero ≤ lam
  rh_iff : RH zeros ↔ lam = zero

/-- From Λ ≤ 0 and the cited 0 ≤ Λ, the hypothesis. -/
theorem rh_from_the_sign {V : Type} [LE V] (D : DBN V) (h : D.lam ≤ D.zero) : RH D.zeros :=
  D.rh_iff.mpr (D.antisymm _ _ h D.lower)

/-- The hypothesis is equivalent to Λ ≤ 0. -/
theorem rh_iff_the_sign {V : Type} [LE V] (D : DBN V) : RH D.zeros ↔ D.lam ≤ D.zero :=
  ⟨fun h => by rw [D.rh_iff.mp h]; exact D.refl _, rh_from_the_sign D⟩

/-- On one zero set, Weil positivity and Λ ≤ 0 are equivalent. -/
theorem spends_are_one {V : Type} [LE V] (P : PrimeAct) (D : DBN V) (same : D.zeros = P.E.zeros) :
    (D.lam ≤ D.zero) ↔ WeilPositive P.E :=
  (rh_iff_the_sign D).symm.trans (by rw [same]; exact (spend_is_the_line P.E).symm)

/-- Λ = 0 is realized over W1 and Λ = 1 over W2f: the sign is a property of the world. -/
theorem sign_realized_both_ways :
    (∃ D : DBN Int, D.zeros = W1 ∧ D.lam = D.zero) ∧
    (∃ D : DBN Int, D.zeros = W2f ∧ ¬ D.lam ≤ D.zero) :=
  ⟨⟨⟨W1, 0, 0, fun a => Int.le_refl a, fun a b => Int.le_antisymm, Int.le_refl 0,
      ⟨fun _ => rfl, fun _ => W1_rh⟩⟩, rfl, rfl⟩,
   ⟨⟨W2f, 1, 0, fun a => Int.le_refl a, fun a b => Int.le_antisymm, by decide,
      ⟨fun h => absurd h W2f_not_rh, fun h => absurd h (by decide)⟩⟩, rfl, by decide⟩⟩

/-- A self-grounding supply of 0 < 1, with the unit act. -/
def rootSelfGrounding : SelfGrounding ((0 : Int) < 1) := ⟨Unit, (), fun _ => by decide⟩

theorem root_has_an_act : Nonempty rootSelfGrounding.Act := ⟨()⟩

/-- No self-grounding supply of the hypothesis on W2f has an act: W2f fails the hypothesis. -/
theorem line_not_self_grounding : ¬ ∃ G : SelfGrounding (RH W2f), Nonempty G.Act :=
  fun ⟨G, ⟨a⟩⟩ => W2f_not_rh (G.instances a)

/-- Section XIV, whole. -/
theorem the_vestigial_posit :
    (Forces RH ∧ ∀ A : World → Prop, Forces A → ∀ Z, FoldClosed Z → A Z → RH Z) ∧
    (∀ A : World → Prop, A W2f → ¬ Forces A) ∧
    (∀ L : LiStream, (∀ n, 1 ≤ n → L.nonneg n) ↔ RH L.zeros) ∧
    (∀ N, ∃ L : LiStream, (∀ n, n < N → L.nonneg n) ∧ ¬ RH L.zeros) ∧
    (∀ (V : Type) [LE V] (D : DBN V), RH D.zeros ↔ D.lam ≤ D.zero) ∧
    ((∃ D : DBN Int, D.zeros = W1 ∧ D.lam = D.zero) ∧
      (∃ D : DBN Int, D.zeros = W2f ∧ ¬ D.lam ≤ D.zero)) ∧
    (∀ (V : Type) [LE V] (P : PrimeAct) (D : DBN V), D.zeros = P.E.zeros →
      ((D.lam ≤ D.zero) ↔ WeilPositive P.E)) ∧
    Nonempty rootSelfGrounding.Act ∧
    ¬ ∃ G : SelfGrounding (RH W2f), Nonempty G.Act :=
  ⟨rh_is_the_weakest_forcing_premise, weaker_at_the_twin_never_forces, li_is_the_bit_stream,
   li_prefix_never_forces, fun _ _ D => rh_iff_the_sign D, sign_realized_both_ways,
   fun _ _ P D same => spends_are_one P D same, root_has_an_act, line_not_self_grounding⟩


/-! ## XV · Four faces in time, exactly one keyed -/

/-- A world in time: the zero set at each instant. -/
abbrev TWorld := Nat → World

/-- The same locus at every instant: the line. -/
def SameLocus (W : TWorld) : Prop := ∀ t z, W t z → (fold z = z ↔ onLine z)
/-- The fold acts at every instant. -/
def FoldInvT (W : TWorld) : Prop := ∀ t, FoldClosed (W t)
/-- The record at every instant lands on the line and forgets the side. -/
def RecordT (W : TWorld) : Prop := ∀ t z, W t z → onLine (reg z) ∧ reg (fold z) = reg z
/-- The arrow at every instant: the free bit is present. -/
def ArrowT (_W : TWorld) : Prop := ∀ _t : Nat, ∃ f : Nat → Nat, ∀ a, f a = a
/-- Timeless: whether the zeros sit on the line does not vary in time. -/
def TimelessT (W : TWorld) : Prop := ∀ t s, RH (W t) ↔ RH (W s)
/-- Bound: the closure at every instant. -/
def BoundT (W : TWorld) : Prop := ∀ t, RH (W t)

/-- The on-line world, constant in time, and the twin, constant in time. -/
abbrev WOn : TWorld := fun _ => W1
abbrev WTwin : TWorld := fun _ => W2f

/-- The fold face holds on every world in time. -/
theorem fold_face_keyless (W : TWorld) : SameLocus W := fun _ z _ => fold_fixed_iff z
theorem fold_face_on_twin : FoldInvT WTwin := fun _ => W2f_closed
theorem fold_face_on_line : FoldInvT WOn := fun _ => W1_closed

/-- The record face holds on every world in time. -/
theorem record_face_keyless (W : TWorld) : RecordT W := fun _ _ _ => ⟨rfl, rfl⟩

/-- The arrow face holds on every world in time. -/
theorem arrow_face_keyless (W : TWorld) : ArrowT W := fun _ => arrow_exists Nat

/-- The closure face holds on WOn. -/
theorem closure_face_on_line : BoundT WOn := fun _ => W1_rh
theorem closure_face_fails_on_twin : ¬ BoundT WTwin := fun h => W2f_not_rh (h 0)

/-- WTwin carries the fold, the record and the arrow at every instant and is timeless, and it is
    not bound: of the four faces only the closure is keyed. -/
theorem exactly_one_face_is_keyed :
    (SameLocus WTwin ∧ FoldInvT WTwin ∧ RecordT WTwin ∧ ArrowT WTwin ∧ TimelessT WTwin) ∧
    ¬ BoundT WTwin ∧
    (SameLocus WOn ∧ FoldInvT WOn ∧ RecordT WOn ∧ ArrowT WOn ∧ TimelessT WOn) ∧ BoundT WOn :=
  ⟨⟨fold_face_keyless _, fold_face_on_twin, record_face_keyless _, arrow_face_keyless _,
    fun _ _ => Iff.rfl⟩, closure_face_fails_on_twin,
   ⟨fold_face_keyless _, fold_face_on_line, record_face_keyless _, arrow_face_keyless _,
    fun _ _ => Iff.rfl⟩, closure_face_on_line⟩

/-- The arrow, the fold and the record hold on WTwin at every instant while the line fails there:
    the arrow is not the line. -/
theorem arrow_is_not_the_line :
    ArrowT WTwin ∧ FoldInvT WTwin ∧ RecordT WTwin ∧ ¬ BoundT WTwin :=
  ⟨arrow_face_keyless _, fold_face_on_twin, record_face_keyless _, closure_face_fails_on_twin⟩

/-- A timeless world is bound exactly when it is bound at instant 0. -/
theorem template_binds_iff_seed (W : TWorld) (u : TimelessT W) : BoundT W ↔ RH (W 0) :=
  ⟨fun h => h 0, fun s t => (u 0 t).mp s⟩

/-- For a timeless world, bound at instant 0 is the hypothesis at instant 0; WTwin has the three
    keyless faces and fails the hypothesis at every instant. -/
theorem the_seed_is_the_spend :
    (∀ W : TWorld, TimelessT W → (BoundT W ↔ RH (W 0))) ∧
    TimelessT WTwin ∧ ArrowT WTwin ∧ FoldInvT WTwin ∧ RecordT WTwin ∧ ¬ RH (WTwin 0) :=
  ⟨template_binds_iff_seed, fun _ _ => Iff.rfl, arrow_face_keyless _, fold_face_on_twin,
   record_face_keyless _, W2f_not_rh⟩

/-- Section XV, whole. -/
theorem the_template_plugged_in :
    ((SameLocus WTwin ∧ FoldInvT WTwin ∧ RecordT WTwin ∧ ArrowT WTwin ∧ TimelessT WTwin) ∧
      ¬ BoundT WTwin ∧
      (SameLocus WOn ∧ FoldInvT WOn ∧ RecordT WOn ∧ ArrowT WOn ∧ TimelessT WOn) ∧ BoundT WOn) ∧
    (ArrowT WTwin ∧ FoldInvT WTwin ∧ RecordT WTwin ∧ ¬ BoundT WTwin) ∧
    (∀ W : TWorld, TimelessT W → (BoundT W ↔ RH (W 0))) ∧
    (∀ W : TWorld, BoundT W → ∀ t, LeastErasure (W t)) :=
  ⟨exactly_one_face_is_keyed, arrow_is_not_the_line, template_binds_iff_seed,
   fun W h t => (least_erasure_is_the_value (W t)).mpr (h t)⟩


/-! ## XVI · The eigenstructure of the fold: the side bit and its calibration -/

/-- The displacement x − 1. -/
def oddPart (z : Pt) : Int := z.x - 1

/-- The fold negates the displacement and fixes the height. -/
theorem fold_negates_odd (z : Pt) : oddPart (fold z) = - oddPart z := by
  show 2 - z.x - 1 = -(z.x - 1)
  rw [Int.neg_sub, Int.sub_sub, Int.add_comm, ← Int.sub_sub]; rfl

theorem fold_keeps_even (z : Pt) : (fold z).t = z.t := rfl

/-- The fold acts as −1 on the displacement. -/
theorem residence_orientation_reversing (z : Pt) : oddPart (fold z) = (-1) * oddPart z := by
  rw [fold_negates_odd, Int.neg_one_mul]

/-- Registration sends the displacement to 0, keeps the height, and is idempotent. -/
theorem reg_kills_odd (_z : Pt) : oddPart (reg _z) = 0 := rfl
theorem reg_keeps_even (z : Pt) : (reg z).t = z.t := rfl
theorem reg_idempotent (z : Pt) : reg (reg z) = reg z := rfl

/-- A point is on the line exactly when its displacement is 0. -/
theorem onLine_iff_odd_zero (z : Pt) : onLine z ↔ oddPart z = 0 := Int.sub_eq_zero.symm

/-- The hypothesis: every zero has displacement 0. -/
theorem rh_iff_even_eigenspace (Z : World) : RH Z ↔ ∀ z, Z z → oddPart z = 0 :=
  ⟨fun h z hz => (onLine_iff_odd_zero z).mp (h z hz), fun h z hz => (onLine_iff_odd_zero z).mpr (h z hz)⟩

/-- Every function of the registered point takes one value on a point and its fold-partner. -/
theorem record_blind_to_odd {β : Type} (g : Pt → β) (z : Pt) : g (reg (fold z)) = g (reg z) := rfl

/-- Off the line a point and its fold-partner have opposite nonzero displacements. -/
theorem odd_pair_opposite (z : Pt) (h : ¬ onLine z) :
    oddPart (fold z) = - oddPart z ∧ oddPart z ≠ 0 :=
  ⟨fold_negates_odd z, fun e => h ((onLine_iff_odd_zero z).mpr e)⟩

/-- The side bit: whether the displacement is negative. -/
def side (z : Pt) : Bool := decide (oddPart z < 0)

/-- Off the line the fold flips the side bit. -/
theorem side_odd_off_line (z : Pt) (h : ¬ onLine z) : side (fold z) = !side z := by
  have hne : oddPart z ≠ 0 := (odd_pair_opposite z h).2
  unfold side
  rw [fold_negates_odd]
  exact (Int.decLt (oddPart z) 0).byCases
    (fun hl =>
      have hp : ¬ (-(oddPart z) < 0) := fun c => Int.lt_irrefl _ (Int.lt_trans c (Int.neg_pos_of_neg hl))
      by rw [decide_eq_true hl, decide_eq_false hp]; rfl)
    (fun hr =>
      have hp : -(oddPart z) < 0 :=
        Int.neg_neg_of_pos (Int.lt_iff_le_and_ne.mpr ⟨Int.not_lt.mp hr, Ne.symm hne⟩)
      by rw [decide_eq_false hr, decide_eq_true hp]; rfl)

/-- A function invariant under the fold differs from any function that the fold flips at some
    point. -/
theorem wall_on_the_chart (f d : Pt → Bool) (z : Pt) (he : ∀ w, f (fold w) = f w)
    (ho : d (fold z) ≠ d z) : f ≠ d := by
  intro h; subst h; exact ho (he z)

/-- No function of the registered point equals the side bit at an off-line point. -/
theorem record_never_reads_the_side (g : Pt → Bool) (z : Pt) (h : ¬ onLine z) :
    (fun w => g (reg w)) ≠ side :=
  wall_on_the_chart (fun w => g (reg w)) side z (fun _ => rfl)
    (by rw [side_odd_off_line z h]; cases side z <;> decide)

/-- Given the side bit at an off-line point, any function flipped by the fold at that point is
    fixed on the orbit by one calibration bit, which exists and is unique. -/
theorem colocation_is_a_calibration (d : Pt → Bool) (z : Pt) (h : ¬ onLine z)
    (hd : d (fold z) = !d z) :
    ∃ c : Bool, (d z = xor (side z) c ∧ d (fold z) = xor (side (fold z)) c) ∧
      ∀ c', (d z = xor (side z) c' ∧ d (fold z) = xor (side (fold z)) c') → c' = c := by
  have hs := side_odd_off_line z h
  refine ⟨xor (d z) (side z),
    ⟨by cases side z <;> cases d z <;> rfl, by rw [hs, hd]; cases side z <;> cases d z <;> rfl⟩, ?_⟩
  intro c' hc; obtain ⟨h1, -⟩ := hc
  generalize hsx : side z = sv at h1; generalize hdx : d z = dv at h1
  cases sv <;> cases dv <;> cases c' <;> first | rfl | exact absurd h1 (by decide)

/-- Both calibration values are realized off the line, by the side bit and by its complement. -/
theorem calibration_realized_both_ways (z : Pt) (h : ¬ onLine z) :
    (side (fold z) = !side z ∧ side z = xor (side z) false) ∧
    ((!side (fold z)) = !(!side z) ∧ (!side z) = xor (side z) true) :=
  ⟨⟨side_odd_off_line z h, by cases side z <;> rfl⟩,
   ⟨by rw [side_odd_off_line z h], by cases side z <;> rfl⟩⟩

/-- A proposition implied by its own negation. -/
def SelfVerifyingP (P : Prop) : Prop := ¬P → P

/-- The hypothesis on a world implies its self-verification there. -/
theorem value_is_recursion (Z : World) (h : RH Z) : SelfVerifyingP (RH Z) := fun _ => h
theorem recursion_is_value (Z : World) (h : SelfVerifyingP (RH Z)) : ¬¬ RH Z := fun n => n (h n)

/-- Self-verification of the hypothesis holds on W1 and fails on W2f. -/
theorem recursion_on_the_line : SelfVerifyingP (RH W1) := fun _ => W1_rh
theorem recursion_fails_on_the_twin : ¬ SelfVerifyingP (RH W2f) := fun h => W2f_not_rh (h W2f_not_rh)

/-- Self-verification of 0 < 1. -/
theorem root_recursion : SelfVerifyingP ((0 : Int) < 1) := fun _ => by decide

/-- Least erasure on a world implies self-verification of the hypothesis there, and conversely up
    to double negation. -/
theorem least_erasure_is_the_recursion (Z : World) :
    (LeastErasure Z → SelfVerifyingP (RH Z)) ∧ (SelfVerifyingP (RH Z) → ¬¬ LeastErasure Z) :=
  ⟨fun h => value_is_recursion Z ((least_erasure_is_the_value Z).mp h),
   fun h n => recursion_is_value Z h (fun r => n ((least_erasure_is_the_value Z).mpr r))⟩

/-- Section XVI, whole. -/
theorem the_mirror_at_minus_one :
    (∀ z, oddPart (fold z) = (-1) * oddPart z ∧ (fold z).t = z.t) ∧
    (∀ z, oddPart (reg z) = 0 ∧ (reg z).t = z.t ∧ reg (reg z) = reg z) ∧
    (∀ Z : World, RH Z ↔ ∀ z, Z z → oddPart z = 0) ∧
    (∀ (g : Pt → Bool) (z : Pt), ¬ onLine z → (fun w => g (reg w)) ≠ side) ∧
    (∀ (d : Pt → Bool) (z : Pt), ¬ onLine z → d (fold z) = !d z →
      ∃ c : Bool, (d z = xor (side z) c ∧ d (fold z) = xor (side (fold z)) c) ∧
        ∀ c', (d z = xor (side z) c' ∧ d (fold z) = xor (side (fold z)) c') → c' = c) ∧
    (SelfVerifyingP (RH W1) ∧ ¬ SelfVerifyingP (RH W2f) ∧ SelfVerifyingP ((0 : Int) < 1)) ∧
    (∀ Z : World, (LeastErasure Z → SelfVerifyingP (RH Z)) ∧ (SelfVerifyingP (RH Z) → ¬¬ LeastErasure Z)) :=
  ⟨fun z => ⟨residence_orientation_reversing z, fold_keeps_even z⟩,
   fun z => ⟨reg_kills_odd z, reg_keeps_even z, reg_idempotent z⟩,
   rh_iff_even_eigenspace, record_never_reads_the_side, colocation_is_a_calibration,
   ⟨recursion_on_the_line, recursion_fails_on_the_twin, root_recursion⟩,
   least_erasure_is_the_recursion⟩

/-! ## XVII · Admissible coalitions, the certified height, the heat flow, the Liouville arrow, five readings, the reader index -/

/-! ### XVII.a · Admissible coalitions -/

/-- A premise is admissible when it is keyless or a reading of the record. -/
def Admissible (A : World → Prop) : Prop := Keyless A ∨ RespectsRecord A

/-- An admissible premise that holds on W1 holds on W2f. -/
theorem admissible_transfers (A : World → Prop) (h : Admissible A) (h1 : A W1) : A W2f := by
  rcases h with k | r
  · exact k W2f
  · exact (r W1 W2f same_record_f).mp h1

/-- Three admissible premises true on W1 are true on W2f, so their conjunction forces nothing. -/
theorem no_admissible_triad_forces (A B C : World → Prop)
    (hA : Admissible A) (hB : Admissible B) (hC : Admissible C) (h : A W1 ∧ B W1 ∧ C W1) :
    ¬ Forces (fun Z => A Z ∧ B Z ∧ C Z) :=
  fun f => W2f_not_rh (f W2f W2f_closed
    ⟨admissible_transfers A hA h.1, admissible_transfers B hB h.2.1, admissible_transfers C hC h.2.2⟩)

/-- A list of admissible premises true on W1 forces nothing. -/
theorem no_admissible_coalition_forces (L : List (World → Prop))
    (hL : ∀ A ∈ L, Admissible A) (h1 : ∀ A ∈ L, A W1) :
    ¬ Forces (fun Z => ∀ A ∈ L, A Z) :=
  fun f => W2f_not_rh (f W2f W2f_closed (fun A hA => admissible_transfers A (hL A hA) (h1 A hA)))

/-- Least erasure is not admissible: it fails on W2f and is not a reading of the record. -/
theorem spend_is_not_admissible : ¬ Admissible LeastErasure := by
  intro h
  rcases h with k | r
  · exact W2f_not_rh ((least_erasure_is_the_value W2f).mp (k W2f))
  · exact least_erasure_reads_past_the_record_free r

/-- Three predicates on a point: the freedom axis, always true; the seat axis, the point is fixed
    by the fold; the collapse axis, the displacement equals its own negative. -/
def freedomAxis (_ : Pt) : Prop := True
def ramAxis (z : Pt) : Prop := fold z = z
def collapseAxis (z : Pt) : Prop := oddPart z = - oddPart z

/-- All three axes hold at a point exactly when it lies on the line. -/
theorem three_axis_lock (z : Pt) : (freedomAxis z ∧ ramAxis z ∧ collapseAxis z) ↔ onLine z := by
  constructor
  · intro ⟨_, h, _⟩
    exact (fold_fixed_iff z).mp h
  · intro h
    refine ⟨trivial, (fold_fixed_iff z).mpr h, ?_⟩
    have e : oddPart z = 0 := (onLine_iff_odd_zero z).mp h
    unfold collapseAxis
    omega

/-- The freedom axis holds at an off-line point. -/
theorem freedom_alone_open : freedomAxis ⟨0, 14⟩ ∧ ¬ onLine ⟨0, 14⟩ :=
  ⟨trivial, by decide⟩

/-! ### XVII.b · The certified height -/

/-- The zeros certified on the line up to height T. -/
def LineBelow (T : Nat) : World := fun z => z.x = 1 ∧ z.t ≤ T
/-- The same zeros, with one off-line pair just above the certified height. -/
def TwinAbove (T : Nat) : World := fun z => (z.x = 1 ∧ z.t ≤ T) ∨ (z = ⟨0, T+1⟩ ∨ z = ⟨2, T+1⟩)

/-- For every T the world certified to T lies on the line, and a fold-closed world agrees with it
    at every height up to T and carries an off-line pair above T. The certificate of Platt and
    Trudgian (2021) to height 3·10¹² is such a T. -/
theorem certified_height_never_forces (T : Nat) :
    RH (LineBelow T) ∧ FoldClosed (TwinAbove T) ∧ ¬ RH (TwinAbove T) ∧
    ∀ z, z.t ≤ T → (TwinAbove T z ↔ LineBelow T z) := by
  refine ⟨fun z hz => hz.1, ?_, ?_, ?_⟩
  · intro z hz
    rcases hz with ⟨h1, h2⟩ | h | h
    · exact Or.inl ⟨show 2 - z.x = 1 by omega, h2⟩
    · subst h
      exact Or.inr (Or.inr rfl)
    · subst h
      exact Or.inr (Or.inl rfl)
  · intro h
    have h0 : (0 : Int) = 1 := h ⟨0, T+1⟩ (Or.inr (Or.inl rfl))
    exact absurd h0 (by decide)
  · intro z hz
    constructor
    · intro h
      rcases h with h | h | h
      · exact h
      · subst h
        have : T + 1 ≤ T := hz
        omega
      · subst h
        have : T + 1 ≤ T := hz
        omega
    · intro h
      exact Or.inl h

/-- Below T the certified world and its twin have the same record. -/
theorem certified_worlds_share_the_record_below (T : Nat) (r : Pt) (hr : r.t ≤ T) :
    recordOf (LineBelow T) r ↔ recordOf (TwinAbove T) r := by
  constructor
  · intro ⟨s, hs, hsr⟩
    exact ⟨s, Or.inl hs, hsr⟩
  · intro ⟨s, hs, hsr⟩
    rcases hs with h | h | h
    · exact ⟨s, h, hsr⟩
    · subst h
      have e : (T + 1 : Nat) = r.t := congrArg Pt.t hsr
      omega
    · subst h
      have e : (T + 1 : Nat) = r.t := congrArg Pt.t hsr
      omega

/-! ### XVII.c · The heat flow on polynomials: under ∂ₜH = −∂ₓ²H the constant term of z² + bz + c moves to c − 2t and the discriminant rises by 8t -/

namespace HeatFlow

theorem sq_nonneg (x : Int) : 0 ≤ x * x := by
  cases Int.le_total 0 x with
  | inl h => exact Int.mul_nonneg h h
  | inr h =>
    have hn : 0 ≤ -x := by omega
    have := Int.mul_nonneg hn hn
    rw [Int.neg_mul_neg] at this
    exact this

theorem cube_diff (u k : Int) :
    u*u*u - (u-k)*(u-k)*(u-k) = 3*(u*u*k) - 3*(u*k*k) + k*k*k := by
  simp only [Int.sub_mul, Int.mul_sub, Int.mul_assoc]
  simp only [Int.mul_comm k u, Int.mul_left_comm k u]
  omega

/-- Discriminant of z² + bz + c. -/
def disc (b c : Int) : Int := b*b - 4*c
/-- The flow on the constant term: exp(−tD²)(z² + bz + c) = z² + bz + (c − 2t). -/
def flowC (c t : Int) : Int := c - 2*t
/-- Real-rooted at time t: the flowed discriminant is nonnegative. -/
def RR (b c t : Int) : Prop := 0 ≤ disc b (flowC c t)
instance (b c t : Int) : Decidable (RR b c t) := inferInstanceAs (Decidable (0 ≤ disc b (flowC c t)))

/-- disc(t) = disc(0) + 8t. -/
theorem disc_flow (b c t : Int) : disc b (flowC c t) = disc b c + 8*t := by
  unfold disc flowC; omega

/-- Real-rootedness is preserved forward in time. -/
theorem forward_preserves (b c s t : Int) (hst : s ≤ t) (h : RR b c s) : RR b c t := by
  unfold RR at *; rw [disc_flow] at *; omega

/-- Every quadratic is real-rooted after some finite time. -/
theorem erasure_finite (b c : Int) : ∃ t, 0 ≤ t ∧ RR b c t :=
  ⟨(disc b c).natAbs, by omega, by unfold RR; rw [disc_flow]; omega⟩

/-- The least erasure time, Λ of the quadratic: 0 if already real-rooted, else ⌈−disc/8⌉. -/
def lam (b c : Int) : Int := if 0 ≤ disc b c then 0 else (7 - disc b c) / 8

theorem lam_nonneg (b c : Int) : 0 ≤ lam b c := by
  unfold lam; split <;> omega

/-- At time Λ the quadratic is real-rooted. -/
theorem real_at_lam (b c : Int) : RR b c (lam b c) := by
  unfold RR lam; rw [disc_flow]; split <;> omega

/-- If Λ > 0, the quadratic is not real-rooted at time Λ − 1. -/
theorem lam_least (b c : Int) (h : 0 < lam b c) : ¬ RR b c (lam b c - 1) := by
  unfold RR; rw [disc_flow]; unfold lam at *; split at * <;> omega

/-- Λ = 0 exactly when the quadratic is real-rooted at time 0. -/
theorem lam_zero_iff_real (b c : Int) : lam b c = 0 ↔ RR b c 0 := by
  unfold RR lam; rw [disc_flow]; split <;> omega

/-- For z² + c the squared imaginary part of the roots is max(c − 2t, 0): de Bruijn's bound holds
    with equality. -/
def imSq (c t : Int) : Int := max (flowC c t) 0
theorem de_bruijn_tight (c t : Int) (ht : 0 ≤ t) : imSq c t = max (imSq c 0 - 2*t) 0 := by
  unfold imSq flowC; omega

/-- For z² + 2k the roots are ±√(2t − 2k): at t = k they meet at 0. -/
def rootSq (c t : Int) : Int := 2*t - c
theorem collision (k t : Int) :
    rootSq (2*k) k = 0 ∧ (t < k → rootSq (2*k) t < 0) ∧ (k < t → 0 < rootSq (2*k) t) ∧
    rootSq (2*k) (t+1) = rootSq (2*k) t + 2 := by
  unfold rootSq; omega

/-- Discriminant of z³ + pz + q. -/
def disc3 (p q : Int) : Int := -4*(p*p*p) - 27*(q*q)
/-- The flow on the linear coefficient: exp(−tD²)(z³ + pz + q) = z³ + (p − 6t)z + q. -/
def flowP (p t : Int) : Int := p - 6*t

/-- One time step raises the cubic discriminant by 72((u − 3)² + 3), u the current linear
    coefficient. -/
theorem disc3_step (p q t : Int) :
    disc3 (flowP p (t+1)) q - disc3 (flowP p t) q = 72*((p - 6*t - 3)*(p - 6*t - 3) + 3) := by
  have key : ∀ u k : Int, u*u*u - (u-k)*(u-k)*(u-k) = 3*(u*u*k) - 3*(u*k*k) + k*k*k := by
    intro u k
    simp only [Int.sub_mul, Int.mul_sub, Int.mul_assoc]
    simp only [Int.mul_comm k u, Int.mul_left_comm k u]
    omega
  have h := key (p - 6*t) 6
  have e0 : flowP p (t+1) = (p - 6*t) - 6 := by unfold flowP; omega
  have e1 : (p - 6*t)*(p - 6*t)*6 = 6*((p - 6*t)*(p - 6*t)) := Int.mul_comm _ _
  have e2 : (p - 6*t)*6*6 = 36*(p - 6*t) := by rw [Int.mul_assoc, Int.mul_comm]; rfl
  have e3 : (p - 6*t - 3)*(p - 6*t - 3) = (p - 6*t)*(p - 6*t) - 6*(p - 6*t) + 9 := by
    generalize p - 6*t = u
    simp only [Int.sub_mul, Int.mul_sub]; rw [Int.mul_comm 3 u]; omega
  have e4 : (6:Int)*6*6 = 216 := by decide
  rw [e1, e2, e4] at h
  unfold disc3; rw [e0, e3]
  have e5 : flowP p t = p - 6*t := rfl
  rw [e5]
  omega

/-- The cubic discriminant strictly increases with time. -/
theorem disc3_strict (p q t : Int) : disc3 (flowP p t) q < disc3 (flowP p (t+1)) q := by
  have h := disc3_step p q t
  have := sq_nonneg (p - 6*t - 3)
  omega

/-- Over any number of steps the cubic discriminant never falls. -/
theorem disc3_monotone_rec (p q : Int) : ∀ n : Nat, disc3 (flowP p 0) q ≤ disc3 (flowP p n) q := by
  intro n
  induction n with
  | zero => exact Int.le_refl _
  | succ n ih =>
    have st := disc3_strict p q (n : Int)
    have e : ((n + 1 : Nat) : Int) = (n : Int) + 1 := by omega
    rw [e]; omega

/-- disc3_monotone_rec, restated. -/
theorem disc3_monotone (p q : Int) (n : Nat) : disc3 (flowP p 0) q ≤ disc3 (flowP p n) q :=
  disc3_monotone_rec p q n

theorem cubic_forward_preserves (p q : Int) (h : 0 ≤ disc3 (flowP p 0) q) (n : Nat) :
    0 ≤ disc3 (flowP p n) q := Int.le_trans h (disc3_monotone_rec p q n)

/-- The flow is injective on the constant term: the polynomial at time t determines the polynomial
    at time 0. -/
theorem flow_injective (c c' t : Int) (h : flowC c t = flowC c' t) : c = c' := by
  unfold flowC at h; omega

/-- At every positive time there are two quadratics real-rooted at t, one real-rooted at 0 and one
    not. -/
theorem certificate_two_worlds (t : Int) (ht : 0 < t) :
    RR 0 0 t ∧ RR 0 t t ∧ RR 0 0 0 ∧ ¬ RR 0 t 0 := by
  unfold RR; simp only [disc_flow]; unfold disc; omega

/-- No function of real-rootedness at time t returns real-rootedness at time 0 on every quadratic. -/
theorem certificate_decides_nothing (t : Int) (ht : 0 < t) :
    ¬ ∃ g : Bool → Bool, ∀ b c : Int, g (decide (RR b c t)) = decide (RR b c 0) := by
  intro ⟨g, hg⟩
  have ⟨h1, h2, h3, h4⟩ := certificate_two_worlds t ht
  have a := hg 0 0
  have b := hg 0 t
  rw [decide_eq_true h1, decide_eq_true h3] at a
  rw [decide_eq_true h2, decide_eq_false h4] at b
  rw [a] at b
  exact Bool.noConfusion b

/-- For every t > 0 some quadratic is real-rooted from t on and not at 0, with Λ > 0. -/
theorem certification_never_forces (t : Int) (ht : 0 < t) :
    ∃ c : Int, (∀ s, t ≤ s → RR 0 c s) ∧ ¬ RR 0 c 0 ∧ 0 < lam 0 c :=
  ⟨t, fun s hs => forward_preserves 0 t t s hs (certificate_two_worlds t ht).2.1,
   (certificate_two_worlds t ht).2.2.2,
   by unfold lam disc; split <;> omega⟩

/-- A double root is real-rooted at 0 with Λ = 0, and not real-rooted at any earlier time. -/
theorem zero_slack (a : Int) :
    RR (2*a) (a*a) 0 ∧ lam (2*a) (a*a) = 0 ∧ ∀ s, 0 < s → ¬ RR (2*a) (a*a) (-s) := by
  have hd : disc (2*a) (a*a) = 0 := by
    unfold disc; rw [Int.mul_assoc, Int.mul_left_comm a 2 a]; omega
  refine ⟨?_, ?_, ?_⟩
  · unfold RR; rw [disc_flow, hd]; omega
  · unfold lam; rw [hd]; simp
  · intro s hs; unfold RR; rw [disc_flow, hd]; omega

/-- A quadratic real-rooted at time 1 may or may not be real-rooted at time 0: z² − 2 is, z² + 2 is
    not. -/
theorem backward_not_forced : RR 0 (-2) 1 ∧ RR 0 2 1 ∧ RR 0 (-2) 0 ∧ ¬ RR 0 2 0 := by
  unfold RR; simp only [disc_flow]; unfold disc; decide

/-- The largest Λ over a family of quadratics. -/
def famLam : List (Int × Int) → Int
  | [] => 0
  | (b, c) :: r => max (lam b c) (famLam r)

theorem famLam_nonneg_rec : ∀ F : List (Int × Int), 0 ≤ famLam F := by
  intro F
  induction F with
  | nil => exact Int.le_refl 0
  | cons m r ih =>
    obtain ⟨b, c⟩ := m
    unfold famLam; omega

theorem family_least_erasure_rec :
    ∀ F : List (Int × Int), famLam F = 0 ↔ ∀ m ∈ F, RR m.1 m.2 0 := by
  intro F
  induction F with
  | nil => simp [famLam]
  | cons m r ih =>
    obtain ⟨b, c⟩ := m
    have hn := famLam_nonneg_rec r
    have hl := lam_nonneg b c
    have hz := lam_zero_iff_real b c
    constructor
    · intro h m hm
      unfold famLam at h
      cases hm with
      | head => exact hz.mp (by omega)
      | tail _ hm' => exact ih.mp (by omega) m hm'
    · intro h
      have h1 : lam b c = 0 := hz.mpr (h (b, c) (List.Mem.head r))
      have h2 : famLam r = 0 := ih.mpr (fun m hm => h m (List.Mem.tail _ hm))
      unfold famLam; omega

/-- The family's Λ is 0 exactly when every member is real-rooted at time 0. -/
theorem family_least_erasure (F : List (Int × Int)) : famLam F = 0 ↔ ∀ m ∈ F, RR m.1 m.2 0 :=
  family_least_erasure_rec F

end HeatFlow

/-- Real-rootedness at time 0 is exactly Λ ≤ 0, since 0 ≤ Λ. -/
theorem heat_bit_is_one_inequality (b c : Int) : HeatFlow.RR b c 0 ↔ HeatFlow.lam b c ≤ 0 := by
  have h1 := HeatFlow.lam_nonneg b c
  have h2 := HeatFlow.lam_zero_iff_real b c
  constructor
  · intro h
    have := h2.mpr h
    omega
  · intro h
    exact h2.mp (by omega)

/-- Over a family, every member is real-rooted at time 0 exactly when the family's Λ ≤ 0. -/
theorem family_bit_is_one_inequality (F : List (Int × Int)) :
    (∀ m ∈ F, HeatFlow.RR m.1 m.2 0) ↔ HeatFlow.famLam F ≤ 0 := by
  have h1 := HeatFlow.famLam_nonneg_rec F
  have h2 := HeatFlow.family_least_erasure F
  constructor
  · intro h
    have := h2.mpr h
    omega
  · intro h
    exact h2.mp (by omega)

/-- The de Bruijn–Newman structure and the quadratic model satisfy the same equivalences, the model
    with its lower bound proved. -/
theorem heat_model_reads_as_the_carrier {V : Type} [LE V] (D : DBN V) (b c : Int) :
    (RH D.zeros ↔ D.lam ≤ D.zero) ∧ (HeatFlow.RR b c 0 ↔ HeatFlow.lam b c ≤ 0) ∧
    (0 ≤ HeatFlow.lam b c) :=
  ⟨rh_iff_the_sign D, heat_bit_is_one_inequality b c, HeatFlow.lam_nonneg b c⟩

/-! ### XVII.d · The Liouville arrow λ(n) = (−1)^Ω(n), computed -/

namespace Liouville

/-- Ω, the number of prime factors with multiplicity, by trial division. -/
def omegaF : Nat → Nat → Nat → Nat
  | 0, _, _ => 0
  | fuel + 1, n, d =>
    if n ≤ 1 then 0
    else if d * d > n then 1
    else if n % d = 0 then 1 + omegaF fuel (n / d) d
    else omegaF fuel n (d + 1)
def bigOmega (n : Nat) : Nat := omegaF (2 * n + 2) n 2
/-- The arrow λ(n) = (−1)^Ω(n). -/
def lam (n : Nat) : Int := if bigOmega n % 2 = 0 then 1 else -1

/-- λ(ab) = λ(a)λ(b) on 1..40 × 1..40. -/
theorem lam_mult : ((List.range 40).all fun a => (List.range 40).all fun b =>
      lam ((a+1)*(b+1)) == lam (a+1) * lam (b+1)) = true := by decide

/-- λ(p) = −1 for every prime p below 100. -/
theorem lam_flips_at_primes :
    ([2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97].all fun p => lam p == -1) = true := by
  decide

def L : Nat → Int
  | 0 => 0
  | n + 1 => L n + lam (n + 1)

/-- L(x) = Σ_{n ≤ x} λ(n) ≤ 0 for 2 ≤ x ≤ 200. The inequality fails at x = 906,150,257 (Haselgrove
    1958; Tanaka 1980). -/
theorem polya_holds_to_200 : ((List.range 199).all fun k => decide (L (k + 2) ≤ 0)) = true := by decide

end Liouville

/-- λ is the sign arrow of the computed count Ω. -/
theorem liouville_is_the_sign_arrow (n : Nat) : Liouville.lam n = signArrow (Liouville.bigOmega n) := rfl

/-- A zero set with the faithfulness of λ: the hypothesis holds exactly when L(x) = O(x^{1/2+ε})
    for every ε > 0. Carried as a hypothesis (Landau 1899). -/
structure LiouvilleFace where
  zeros : World
  faithful : Prop
  faithful_iff : RH zeros ↔ faithful

theorem rh_from_faithful (F : LiouvilleFace) (h : F.faithful) : RH F.zeros := F.faithful_iff.mpr h
theorem faithful_is_the_bit (F : LiouvilleFace) : F.faithful ↔ RH F.zeros := F.faithful_iff.symm

/-- On one zero set, Weil positivity, Λ ≤ 0, the non-negativity of the Li stream and the
    faithfulness of λ are equivalent, each cited equivalence entering as a field. -/
theorem the_posit_in_every_coordinate {V : Type} [LE V] (P : PrimeAct) (D : DBN V) (Li : LiStream)
    (F : LiouvilleFace) (hD : D.zeros = P.E.zeros) (hL : Li.zeros = P.E.zeros)
    (hF : F.zeros = P.E.zeros) :
    (WeilPositive P.E ↔ D.lam ≤ D.zero) ∧ (WeilPositive P.E ↔ ∀ n, 1 ≤ n → Li.nonneg n) ∧
    (WeilPositive P.E ↔ F.faithful) := by
  have hW : WeilPositive P.E ↔ RH P.E.zeros := spend_is_the_line P.E
  refine ⟨?_, ?_, ?_⟩
  · rw [hW, ← hD]
    exact rh_iff_the_sign D
  · rw [hW, ← hL]
    exact (li_is_the_bit_stream Li).symm
  · rw [hW, ← hF]
    exact F.faithful_iff

/-! ### XVII.e · Five readings, one proposition -/

/-- Lossless registration: every zero is fixed by registration. -/
def Lossless (Z : World) : Prop := ∀ z, Z z → reg z = z
/-- Every zero has displacement 0. -/
def DepthZero (Z : World) : Prop := ∀ z, Z z → oddPart z = 0
/-- The Li mode of a zero, in the chart's own scale: |ρ − 1|² and |ρ|² doubled. -/
def N1 (z : Pt) : Int := (z.x - 2)*(z.x - 2) + 4*((z.t : Int)*(z.t : Int))
def N0 (z : Pt) : Int := z.x*z.x + 4*((z.t : Int)*(z.t : Int))
/-- Stability: no Li mode grows. -/
def Stable (Z : World) : Prop := ∀ z, Z z → N1 z ≤ N0 z

theorem modes (z : Pt) : N1 z - N0 z = 4 - 4 * z.x := by
  simp only [N1, N0, Int.sub_mul, Int.mul_sub]
  omega

/-- Registration fixes a zero exactly when the zero lies on the line. -/
theorem lossless_iff_rh (Z : World) : Lossless Z ↔ RH Z := by
  constructor
  · intro h z hz
    have e := congrArg Pt.x (h z hz)
    exact e.symm
  · intro h z hz
    exact reg_fixes_line z (h z hz)

/-- On a fold-closed world, stability of every Li mode is the line: a mode below the line grows,
    and its fold-partner stands above. -/
theorem stable_iff_rh (Z : World) (hZ : FoldClosed Z) : Stable Z ↔ RH Z := by
  constructor
  · intro h z hz
    have a := h z hz
    have b := h (fold z) (hZ z hz)
    have ea := modes z
    have eb := modes (fold z)
    have ex : (fold z).x = 2 - z.x := rfl
    rw [ex] at eb
    show z.x = 1
    omega
  · intro h z hz
    have e : z.x = 1 := h z hz
    have := modes z
    omega

/-- On every fold-closed world the line, lossless registration, displacement zero, no left zero,
    the stability of every Li mode and least erasure are equivalent. -/
theorem five_readings_agree (Z : World) (hZ : FoldClosed Z) :
    (RH Z ↔ Lossless Z) ∧ (RH Z ↔ DepthZero Z) ∧ (RH Z ↔ ¬ Left Z) ∧
    (RH Z ↔ Stable Z) ∧ (RH Z ↔ LeastErasure Z) :=
  ⟨(lossless_iff_rh Z).symm, rh_iff_even_eigenspace Z, rh_iff_no_left Z hZ,
   (stable_iff_rh Z hZ).symm, (least_erasure_is_the_value Z).symm⟩

/-- And no record-respecting reading returns any of the five, since each is the hypothesis. -/
theorem no_record_reading_returns_any_face (g : World → Prop) (hg : RespectsRecord g) :
    ¬ (∀ Z, FoldClosed Z → (g Z ↔ Lossless Z)) ∧ ¬ (∀ Z, FoldClosed Z → (g Z ↔ Stable Z)) := by
  constructor
  · intro h
    exact record_decides_nothing_free g hg (fun Z hZ => (h Z hZ).trans (lossless_iff_rh Z))
  · intro h
    exact record_decides_nothing_free g hg (fun Z hZ => (h Z hZ).trans (stable_iff_rh Z hZ))

/-! ### XVII.f · The supply has no reader index -/

/-- A proposition indexed by a type of readers, constant. -/
def Requirement (Reader : Type) (V : Prop) : Reader → Prop := fun _ => V

/-- Every reader faces the same proposition. -/
theorem same_for_every_reader {Reader : Type} (V : Prop) (a b : Reader) :
    Requirement Reader V a ↔ Requirement Reader V b := Iff.rfl

/-- A requirement that differs between two readers is not the fixed value. -/
theorem no_private_bit {Reader : Type} (V : Prop) (R : Reader → Prop) (hR : ∀ r, R r ↔ V)
    (a b : Reader) : R a ↔ R b := (hR a).trans (hR b).symm

/-- A reader-indexed requirement equal to Weil positivity for every reader is the same for all
    readers. -/
theorem spend_has_no_reader {Reader : Type} (P : PrimeAct) (R : Reader → Prop)
    (hR : ∀ r, R r ↔ WeilPositive P.E) (a b : Reader) : R a ↔ R b :=
  no_private_bit (WeilPositive P.E) R hR a b

/-! ### XVII.g · Section XVII, whole -/

/-- Section XVII, whole. -/
theorem the_harvest :
    (∀ (L : List (World → Prop)), (∀ A ∈ L, Admissible A) → (∀ A ∈ L, A W1) →
      ¬ Forces (fun Z => ∀ A ∈ L, A Z)) ∧
    ¬ Admissible LeastErasure ∧
    (∀ T : Nat, RH (LineBelow T) ∧ FoldClosed (TwinAbove T) ∧ ¬ RH (TwinAbove T)) ∧
    (∀ b c : Int, (HeatFlow.RR b c 0 ↔ HeatFlow.lam b c ≤ 0) ∧ 0 ≤ HeatFlow.lam b c) ∧
    (∀ t : Int, 0 < t → ¬ ∃ g : Bool → Bool, ∀ b c : Int,
      g (decide (HeatFlow.RR b c t)) = decide (HeatFlow.RR b c 0)) ∧
    (∀ n : Nat, Liouville.lam n = signArrow (Liouville.bigOmega n)) ∧
    (∀ Z : World, FoldClosed Z →
      (RH Z ↔ Lossless Z) ∧ (RH Z ↔ DepthZero Z) ∧ (RH Z ↔ ¬ Left Z) ∧
      (RH Z ↔ Stable Z) ∧ (RH Z ↔ LeastErasure Z)) ∧
    (∀ {Reader : Type} (P : PrimeAct) (R : Reader → Prop),
      (∀ r, R r ↔ WeilPositive P.E) → ∀ a b : Reader, R a ↔ R b) :=
  ⟨no_admissible_coalition_forces, spend_is_not_admissible,
   fun T => ⟨(certified_height_never_forces T).1, (certified_height_never_forces T).2.1,
     (certified_height_never_forces T).2.2.1⟩,
   fun b c => ⟨heat_bit_is_one_inequality b c, HeatFlow.lam_nonneg b c⟩,
   HeatFlow.certificate_decides_nothing, liouville_is_the_sign_arrow, five_readings_agree,
   fun P R hR a b => spend_has_no_reader P R hR a b⟩


/-! ## XVIII · A theory placed on three strata; the root; the two can'ts; the round trip; the ladder blocked -/

/-! ### XVIII.a · Placement: computation, provability, truth -/

/-- A theory: its sentences, what it proves, what finite computation settles, what holds in its
    intended model. -/
structure Theory where
  Sent  : Type
  Prov  : Sent → Prop
  Comp  : Sent → Prop
  True_ : Sent → Prop

/-- Σ₁-completeness, abstractly: what finite computation settles, the theory proves. -/
def RungOnLadder (T : Theory) : Prop := ∀ s, T.Comp s → T.Prov s
/-- Soundness: what the theory proves holds in its intended model. -/
def Sound (T : Theory) : Prop := ∀ s, T.Prov s → T.True_ s

/-- Under Σ₁-completeness and soundness: what computation settles the theory proves, what the
    theory proves holds, and what computation settles holds. -/
theorem placement (T : Theory) (hR : RungOnLadder T) (hS : Sound T) :
    (∀ s, T.Comp s → T.Prov s) ∧ (∀ s, T.Prov s → T.True_ s) ∧ (∀ s, T.Comp s → T.True_ s) :=
  ⟨hR, hS, fun s h => hS s (hR s h)⟩

/-- An unsound theory: it proves everything and its model refutes half of it. -/
def unsound : Theory := ⟨Bool, fun _ => True, fun _ => False, fun b => b = true⟩

/-- The unsound theory is Σ₁-complete and not sound. -/
theorem soundness_is_load_bearing : RungOnLadder unsound ∧ ¬ Sound unsound := by
  refine ⟨fun _ h => h.elim, fun h => ?_⟩
  have := h false trivial
  cases this

/-- A sound incomplete theory: true on both sentences, proving one. -/
def incomplete : Theory := ⟨Bool, fun b => b = true, fun _ => False, fun _ => True⟩

/-- A sound theory can leave a truth unproved. -/
theorem ground_exceeds_ladder :
    Sound incomplete ∧ incomplete.True_ false ∧ ¬ incomplete.Prov false :=
  ⟨fun _ _ => trivial, trivial, fun h => Bool.noConfusion h⟩

/-- Independent axioms are separate bits: every combination of two values is realized. -/
theorem independent_axioms_are_separate_bits :
    ∀ a b : Bool, ∃ w : Bool × Bool, w.1 = a ∧ w.2 = b :=
  fun a b => ⟨(a, b), rfl, rfl⟩

/-! ### XVIII.b · The root crosses every keyless sentence and no keyed one -/

/-- Over any type of worlds: a sentence is keyless when every world has it, keyed when some world
    lacks it. -/
def KeylessOn {W : Type} (P : W → Prop) : Prop := ∀ w, P w
def KeyedOn {W : Type} (P : W → Prop) : Prop := ∃ w, ¬ P w

/-- The root proposition, 0 < 1. -/
def RootAct : Prop := (0 : Int) < 1
theorem root_act : RootAct := show (0 : Int) < 1 by decide

/-- The root is keyless over every type of worlds. -/
theorem root_is_keyless {W : Type} : KeylessOn (fun _ : W => RootAct) := fun _ => root_act

/-- The root implies every keyless sentence on every world. -/
theorem keyless_crosses {W : Type} (P : W → Prop) (hP : KeylessOn P) : ∀ w, RootAct → P w :=
  fun w _ => hP w

/-- The root does not imply a keyed sentence on every world. -/
theorem root_decides_no_keyed {W : Type} (P : W → Prop) (hK : KeyedOn P) :
    ¬ ∀ w, RootAct → P w :=
  fun h => hK.elim (fun w hw => hw (h w root_act))

/-- Choice over ZF as a keyed sentence: two worlds, one each way (Gödel 1938; Cohen 1963). -/
def choiceHolds : Bool → Prop := fun w => w = true
theorem choice_is_keyed : KeyedOn choiceHolds := ⟨false, fun h => Bool.noConfusion h⟩
theorem root_does_not_cross_choice :
    (∀ _w : Bool, RootAct) ∧ choiceHolds true ∧ ¬ choiceHolds false :=
  ⟨fun _ => root_act, rfl, fun h => Bool.noConfusion h⟩

/-- The hypothesis is keyed over the worlds of the chart. -/
theorem line_is_keyed_over_worlds : KeyedOn RH ∧ ∃ Z, FoldClosed Z ∧ RH Z :=
  ⟨⟨W2f, W2f_not_rh⟩, ⟨W1, W1_closed, W1_rh⟩⟩

/-- The root does not imply the hypothesis on every world. -/
theorem root_does_not_cross_the_line : ¬ ∀ Z : World, RootAct → RH Z :=
  root_decides_no_keyed RH line_is_keyed_over_worlds.1

/-! ### XVIII.c · The two can'ts of a foundation are not mirror images -/

/-- A hypothesis with a provability predicate, Σ₁-completeness on the denial (a false Π⁰₁
    hypothesis has a finite witness, which the theory proves: Davis, Matiyasevich and Robinson
    1976; Lagarias 2002) and soundness on the denial, both carried as hypotheses. -/
structure Setting where
  hyp       : Prop
  Prov      : Prop → Prop
  sigma1    : ¬ hyp → Prov (¬ hyp)
  sound_neg : Prov (¬ hyp) → ¬ hyp

/-- On the chart one off-line zero refutes the hypothesis. -/
theorem refutation_is_one_point (Z : World) (z : Pt) (hz : Z z) (h : ¬ onLine z) : ¬ RH Z :=
  fun r => h (r z hz)

/-- If the theory cannot refute the hypothesis, the hypothesis holds. -/
theorem cant_refute_seals (S : Setting) (h : ¬ S.Prov (¬ S.hyp)) : S.hyp :=
  Classical.byContradiction (fun n => h (S.sigma1 n))

theorem cant_refute_seals_dec (S : Setting) [Decidable S.hyp] (h : ¬ S.Prov (¬ S.hyp)) : S.hyp :=
  Decidable.byContradiction (fun n => h (S.sigma1 n))

/-- Under soundness on the denial, the hypothesis holds exactly when the foundation cannot refute it. -/
theorem rh_iff_cant_refute (S : Setting) [Decidable S.hyp] : S.hyp ↔ ¬ S.Prov (¬ S.hyp) :=
  ⟨fun r p => S.sound_neg p r, cant_refute_seals_dec S⟩

/-- A hypothesis the theory neither proves nor refutes holds. -/
theorem independence_forces_truth (S : Setting) (_hp : ¬ S.Prov S.hyp) (hn : ¬ S.Prov (¬ S.hyp)) :
    S.hyp :=
  cant_refute_seals S hn

/-- A setting in which the hypothesis holds and is not provable. -/
def independentTrue : Setting := ⟨True, fun _ => False, fun n => absurd trivial n, fun p => p.elim⟩

theorem cant_prove_does_not_seal_false :
    independentTrue.hyp ∧ ¬ independentTrue.Prov independentTrue.hyp :=
  ⟨trivial, id⟩

/-- Cannot-refute implies the hypothesis; cannot-prove is consistent with it. -/
theorem cant_asymmetry :
    (∀ S : Setting, ¬ S.Prov (¬ S.hyp) → S.hyp) ∧ (∃ S : Setting, S.hyp ∧ ¬ S.Prov S.hyp) :=
  ⟨cant_refute_seals, ⟨independentTrue, cant_prove_does_not_seal_false⟩⟩

/-! ### XVIII.d · The round trip is the identity -/

/-- A sentence conjoined with the root. -/
def viaRoot {W : Type} (P : W → Prop) : W → Prop := fun w => RootAct ∧ P w

/-- Conjoining the root changes no sentence's value. -/
theorem round_trip_identity {W : Type} (P : W → Prop) (w : W) : viaRoot P w ↔ P w :=
  ⟨fun h => h.2, fun h => ⟨root_act, h⟩⟩

/-- An absolute sentence, the same in every world, returns unchanged. -/
theorem absolute_returns_unchanged {W : Type} (P : W → Prop) (hAbs : ∀ w v, P w ↔ P v) (w : W) :
    ∀ v, viaRoot P v ↔ P w :=
  fun v => (round_trip_identity P v).trans (hAbs v w)

/-- The trip adds presence and nothing else: it returns identically for a sentence and its denial. -/
theorem trip_adds_presence_only {W : Type} (P : W → Prop) (w : W) :
    RootAct ∧ (viaRoot P w ↔ P w) ∧ (viaRoot (fun v => ¬ P v) w ↔ ¬ P w) :=
  ⟨root_act, round_trip_identity P w, round_trip_identity (fun v => ¬ P v) w⟩

/-- For any true Q, (Q → RH Z) ↔ RH Z. -/
theorem massless_arrow (Q : Prop) (hq : Q) (Z : World) : (Q → RH Z) ↔ RH Z :=
  ⟨fun f => f hq, fun h _ => h⟩

/-- Any true premise satisfies the three properties of the root. -/
theorem any_true_premise_serves (R : Prop) (hR : R) {W : Type} (P : W → Prop) :
    ((∀ w, P w) → ∀ w, R → P w) ∧ ((∃ w, ¬ P w) → ¬ ∀ w, R → P w) ∧ (∀ w, (R ∧ P w) ↔ P w) :=
  ⟨fun hP w _ => hP w, fun h₁ h => h₁.elim (fun w hw => hw (h w hR)),
   fun _ => ⟨fun h => h.2, fun h => ⟨hR, h⟩⟩⟩

/-- Conjoined with the root, the hypothesis is itself on W1 and on W2f. -/
theorem the_line_round_trips :
    (∀ Z : World, viaRoot RH Z ↔ RH Z) ∧ viaRoot RH W1 ∧ ¬ viaRoot RH W2f :=
  ⟨fun Z => round_trip_identity RH Z, ⟨root_act, W1_rh⟩, fun h => W2f_not_rh h.2⟩

/-! ### XVIII.e · The ladder blocked, in six clauses -/

/-- Six clauses: no reading of the record decides the hypothesis; no keyless premise forces it; no
    admissible coalition holding on W1 forces it; the root alone does not give it; a setting carries
    a true hypothesis it does not prove; and the hypothesis forces the line and is entailed by every
    premise that forces it. -/
theorem ladder_blocked :
    (∀ g : World → Prop, RespectsRecord g → ¬ ∀ Z, FoldClosed Z → (g Z ↔ RH Z)) ∧
    (∀ A : World → Prop, Keyless A → ¬ Forces A) ∧
    (∀ L : List (World → Prop), (∀ A ∈ L, Admissible A) → (∀ A ∈ L, A W1) →
      ¬ Forces (fun Z => ∀ A ∈ L, A Z)) ∧
    (¬ ∀ Z : World, RootAct → RH Z) ∧
    (∃ S : Setting, S.hyp ∧ ¬ S.Prov S.hyp) ∧
    (Forces RH ∧ ∀ A : World → Prop, Forces A → ∀ Z, FoldClosed Z → A Z → RH Z) :=
  ⟨record_decides_nothing_free, keyless_forces_nothing_free, no_admissible_coalition_forces,
   root_does_not_cross_the_line, ⟨independentTrue, cant_prove_does_not_seal_false⟩,
   rh_is_the_weakest_forcing_premise⟩

/-- Section XVIII, whole. -/
theorem the_road :
    (∀ T : Theory, RungOnLadder T → Sound T → ∀ s, T.Comp s → T.True_ s) ∧
    (RungOnLadder unsound ∧ ¬ Sound unsound) ∧
    (Sound incomplete ∧ incomplete.True_ false ∧ ¬ incomplete.Prov false) ∧
    (∀ {W : Type} (P : W → Prop), KeylessOn P → ∀ w, RootAct → P w) ∧
    (∀ {W : Type} (P : W → Prop), KeyedOn P → ¬ ∀ w, RootAct → P w) ∧
    (KeyedOn choiceHolds ∧ KeyedOn RH) ∧
    (∀ S : Setting, ¬ S.Prov (¬ S.hyp) → S.hyp) ∧
    (∃ S : Setting, S.hyp ∧ ¬ S.Prov S.hyp) ∧
    (∀ {W : Type} (P : W → Prop) (w : W), viaRoot P w ↔ P w) ∧
    (∀ (Q : Prop), Q → ∀ Z : World, (Q → RH Z) ↔ RH Z) ∧
    (∀ A : World → Prop, Forces A → ∀ Z, FoldClosed Z → A Z → RH Z) :=
  ⟨fun T hR hS => (placement T hR hS).2.2, soundness_is_load_bearing, ground_exceeds_ladder,
   fun P hP => keyless_crosses P hP, fun P hK => root_decides_no_keyed P hK,
   ⟨choice_is_keyed, line_is_keyed_over_worlds.1⟩,
   cant_refute_seals, ⟨independentTrue, cant_prove_does_not_seal_false⟩,
   fun P w => round_trip_identity P w, massless_arrow, rh_is_the_weakest_forcing_premise.2⟩

/-! ## XIX · The vocabulary law, the even coalition, the triaxial cut, the ladder's proof, the route ledger -/

/-! ### XIX.a · The vocabulary law -/

/-- On every world, a consequence of the hypothesis is a consequence of least erasure and
    conversely, and a premise entailing one entails the other. -/
theorem vocabulary_law (Z : World) (P : Prop) :
    ((RH Z → P) ↔ (LeastErasure Z → P)) ∧ ((P → RH Z) ↔ (P → LeastErasure Z)) :=
  ⟨⟨fun h l => h ((least_erasure_is_the_value Z).mp l),
    fun h r => h ((least_erasure_is_the_value Z).mpr r)⟩,
   ⟨fun h p => (least_erasure_is_the_value Z).mpr (h p),
    fun h p => (least_erasure_is_the_value Z).mp (h p)⟩⟩

/-- A consequence of any one face is a consequence of the least-erasure face. -/
theorem every_face_proves_every_face (H : Faces) (P : Prop) :
    ((H.line → P) ↔ (H.least → P)) ∧ ((H.lamZero → P) ↔ (H.least → P)) ∧
    ((H.faithful → P) ↔ (H.least → P)) ∧ ((H.weil → P) ↔ (H.least → P)) :=
  ⟨⟨fun h l => h (H.line_iff_least.mpr l), fun h r => h (H.line_iff_least.mp r)⟩,
   ⟨fun h l => h (H.lam_iff_least.mpr l), fun h r => h (H.lam_iff_least.mp r)⟩,
   ⟨fun h l => h (H.faith_iff_least.mpr l), fun h r => h (H.faith_iff_least.mp r)⟩,
   ⟨fun h l => h (H.weil_iff_least.mpr l), fun h r => h (H.weil_iff_least.mp r)⟩⟩

/-- On every fold-closed world a consequence of any of the four chart readings is a consequence of
    least erasure. -/
theorem chart_faces_prove_each_other (Z : World) (hZ : FoldClosed Z) (P : Prop) :
    ((Lossless Z → P) ↔ (LeastErasure Z → P)) ∧ ((DepthZero Z → P) ↔ (LeastErasure Z → P)) ∧
    ((¬ Left Z → P) ↔ (LeastErasure Z → P)) ∧ ((Stable Z → P) ↔ (LeastErasure Z → P)) :=
  ⟨⟨fun h l => h ((lossless_iff_rh Z).mpr ((least_erasure_is_the_value Z).mp l)),
    fun h r => h ((least_erasure_is_the_value Z).mpr ((lossless_iff_rh Z).mp r))⟩,
   ⟨fun h l => h ((rh_iff_even_eigenspace Z).mp ((least_erasure_is_the_value Z).mp l)),
    fun h r => h ((least_erasure_is_the_value Z).mpr ((rh_iff_even_eigenspace Z).mpr r))⟩,
   ⟨fun h l => h ((rh_iff_no_left Z hZ).mp ((least_erasure_is_the_value Z).mp l)),
    fun h r => h ((least_erasure_is_the_value Z).mpr ((rh_iff_no_left Z hZ).mpr r))⟩,
   ⟨fun h l => h ((stable_iff_rh Z hZ).mpr ((least_erasure_is_the_value Z).mp l)),
    fun h r => h ((least_erasure_is_the_value Z).mpr ((stable_iff_rh Z hZ).mp r))⟩⟩

/-! ### XIX.b · The even coalition: closed under every combination, blind to the value -/

/-- The fold is an involution. -/
theorem fold_fold (z : Pt) : fold (fold z) = z := by
  cases z with
  | mk x t =>
    show Pt.mk (2 - (2 - x)) t = Pt.mk x t
    congr 1
    omega

/-- The fold law is keyless. -/
theorem fold_law_admissible : Admissible (fun _ : World => ∀ z, fold (fold z) = z) :=
  Or.inl (fun _ => fold_fold)

/-- Two worlds of one record have one record. -/
theorem same_record_eq (Z Z' : World) (h : SameRecord Z Z') : recordOf Z = recordOf Z' :=
  funext (fun r => propext (h r))

/-- A function of the record is a reading of the record. -/
theorem record_reading_admissible (h : World → Prop) : Admissible (fun Z => h (recordOf Z)) :=
  Or.inr (fun Z Z' hs => by
    show h (recordOf Z) ↔ h (recordOf Z')
    rw [same_record_eq Z Z' hs])

/-- A constant premise is admissible. -/
theorem admissible_const (P : Prop) : Admissible (fun _ : World => P) :=
  Or.inr (fun _ _ _ => Iff.rfl)

/-- The denial of a keyless premise respects the record: it is false everywhere. -/
theorem keyless_denial_respects (A : World → Prop) (hA : Keyless A) :
    RespectsRecord (fun Z => ¬ A Z) :=
  fun Z Z' _ => ⟨fun n => absurd (hA Z) n, fun n => absurd (hA Z') n⟩

/-- Admissible premises are closed under negation. -/
theorem admissible_not (A : World → Prop) (hA : Admissible A) : Admissible (fun Z => ¬ A Z) := by
  rcases hA with k | r
  · exact Or.inr (keyless_denial_respects A k)
  · exact Or.inr (fun Z Z' h => ⟨fun n a => n ((r Z Z' h).mpr a), fun n a => n ((r Z Z' h).mp a)⟩)

/-- Admissible premises are closed under conjunction. -/
theorem admissible_and (A B : World → Prop) (hA : Admissible A) (hB : Admissible B) :
    Admissible (fun Z => A Z ∧ B Z) := by
  rcases hA with ka | ra <;> rcases hB with kb | rb
  · exact Or.inl (fun Z => ⟨ka Z, kb Z⟩)
  · exact Or.inr (fun Z Z' h =>
      ⟨fun ⟨_, b⟩ => ⟨ka Z', (rb Z Z' h).mp b⟩, fun ⟨_, b⟩ => ⟨ka Z, (rb Z Z' h).mpr b⟩⟩)
  · exact Or.inr (fun Z Z' h =>
      ⟨fun ⟨a, _⟩ => ⟨(ra Z Z' h).mp a, kb Z'⟩, fun ⟨a, _⟩ => ⟨(ra Z Z' h).mpr a, kb Z⟩⟩)
  · exact Or.inr (fun Z Z' h =>
      ⟨fun ⟨a, b⟩ => ⟨(ra Z Z' h).mp a, (rb Z Z' h).mp b⟩,
       fun ⟨a, b⟩ => ⟨(ra Z Z' h).mpr a, (rb Z Z' h).mpr b⟩⟩)

/-- Admissible premises are closed under disjunction. -/
theorem admissible_or (A B : World → Prop) (hA : Admissible A) (hB : Admissible B) :
    Admissible (fun Z => A Z ∨ B Z) := by
  rcases hA with ka | ra <;> rcases hB with kb | rb
  · exact Or.inl (fun Z => Or.inl (ka Z))
  · exact Or.inl (fun Z => Or.inl (ka Z))
  · exact Or.inl (fun Z => Or.inr (kb Z))
  · exact Or.inr (fun Z Z' h =>
      ⟨fun o => o.elim (fun a => Or.inl ((ra Z Z' h).mp a)) (fun b => Or.inr ((rb Z Z' h).mp b)),
       fun o => o.elim (fun a => Or.inl ((ra Z Z' h).mpr a)) (fun b => Or.inr ((rb Z Z' h).mpr b))⟩)

/-- No admissible premise agrees with the hypothesis on every fold-closed world. -/
theorem admissible_never_decides (A : World → Prop) (hA : Admissible A) :
    ¬ ∀ Z, FoldClosed Z → (A Z ↔ RH Z) := by
  intro h
  rcases hA with k | r
  · exact W2f_not_rh ((h W2f W2f_closed).mp (k W2f))
  · exact record_decides_nothing_free A r h

/-- A coalition: any Boolean combination of atomic premises, however deep. -/
inductive Coalition (ι : Type) where
  | atom : ι → Coalition ι
  | top : Coalition ι
  | bot : Coalition ι
  | not : Coalition ι → Coalition ι
  | and : Coalition ι → Coalition ι → Coalition ι
  | or : Coalition ι → Coalition ι → Coalition ι

/-- The premise a coalition asserts, given its atoms. -/
def Coalition.eval {ι : Type} (at_ : ι → World → Prop) : Coalition ι → World → Prop
  | .atom i => at_ i
  | .top => fun _ => True
  | .bot => fun _ => False
  | .not c => fun Z => ¬ Coalition.eval at_ c Z
  | .and c d => fun Z => Coalition.eval at_ c Z ∧ Coalition.eval at_ d Z
  | .or c d => fun Z => Coalition.eval at_ c Z ∨ Coalition.eval at_ d Z

/-- Every coalition of admissible atoms is admissible. -/
theorem coalition_admissible {ι : Type} (at_ : ι → World → Prop) (h : ∀ i, Admissible (at_ i)) :
    ∀ c : Coalition ι, Admissible (Coalition.eval at_ c) := by
  intro c
  induction c with
  | atom i => exact h i
  | top => exact admissible_const True
  | bot => exact admissible_const False
  | not c ih =>
    show Admissible (fun Z => ¬ Coalition.eval at_ c Z)
    exact admissible_not _ ih
  | and c d ihc ihd =>
    show Admissible (fun Z => Coalition.eval at_ c Z ∧ Coalition.eval at_ d Z)
    exact admissible_and _ _ ihc ihd
  | or c d ihc ihd =>
    show Admissible (fun Z => Coalition.eval at_ c Z ∨ Coalition.eval at_ d Z)
    exact admissible_or _ _ ihc ihd

/-- No coalition of admissible atoms agrees with the hypothesis on every fold-closed world. -/
theorem no_coalition_decides {ι : Type} (at_ : ι → World → Prop) (h : ∀ i, Admissible (at_ i))
    (c : Coalition ι) : ¬ ∀ Z, FoldClosed Z → (Coalition.eval at_ c Z ↔ RH Z) :=
  admissible_never_decides _ (coalition_admissible at_ h c)

/-! ### XIX.c · The triaxial cut, irreducible -/

/-- The fold law and every reading of the record are admissible; admissible premises are closed
    under Boolean combination; no admissible premise decides the hypothesis; off the line one
    supplied side bit fixes any fold-flipped target by a unique calibration, both values realized;
    least erasure is not admissible; and nothing weaker than the hypothesis forces the line. -/
theorem triaxial_cut_irreducible :
    Admissible (fun _ : World => ∀ z, fold (fold z) = z) ∧
    (∀ h : World → Prop, Admissible (fun Z => h (recordOf Z))) ∧
    (∀ (ι : Type) (at_ : ι → World → Prop), (∀ i, Admissible (at_ i)) →
      ∀ c : Coalition ι, Admissible (Coalition.eval at_ c)) ∧
    (∀ A : World → Prop, Admissible A → ¬ ∀ Z, FoldClosed Z → (A Z ↔ RH Z)) ∧
    (∀ (d : Pt → Bool) (z : Pt), ¬ onLine z → d (fold z) = !d z →
      ∃ c : Bool, (d z = xor (side z) c ∧ d (fold z) = xor (side (fold z)) c) ∧
        ∀ c', (d z = xor (side z) c' ∧ d (fold z) = xor (side (fold z)) c') → c' = c) ∧
    (∀ z : Pt, ¬ onLine z →
      (side (fold z) = !side z ∧ side z = xor (side z) false) ∧
      ((!side (fold z)) = !(!side z) ∧ (!side z) = xor (side z) true)) ∧
    ¬ Admissible LeastErasure ∧
    (Forces RH ∧ ∀ A : World → Prop, Forces A → ∀ Z, FoldClosed Z → A Z → RH Z) :=
  ⟨fold_law_admissible, record_reading_admissible,
   fun _ at_ h c => coalition_admissible at_ h c, admissible_never_decides,
   colocation_is_a_calibration, calibration_realized_both_ways,
   spend_is_not_admissible, rh_is_the_weakest_forcing_premise⟩

/-! ### XIX.d · The ladder's proof lands on least erasure; no foundation is claimed closed -/

/-- A reading of a theory's sentences on the chart: each sentence names a world, and the sentence
    holds in the intended model exactly when that world satisfies the hypothesis. -/
structure ReadsAsLine (T : Theory) where
  world : T.Sent → World
  reads : ∀ s, T.True_ s ↔ RH (world s)

/-- If a sound theory proves a sentence that reads as the hypothesis on a world, that world has
    least erasure. -/
theorem ladder_proof_lands_on_least_erasure (T : Theory) (hS : Sound T) (R : ReadsAsLine T)
    (s : T.Sent) (hp : T.Prov s) : LeastErasure (R.world s) :=
  (least_erasure_is_the_value (R.world s)).mpr ((R.reads s).mp (hS s hp))

/-- Where the theory also proves the sentence whenever it holds, its proof is exactly least
    erasure on the world the sentence names. -/
theorem ladder_proof_iff_least_erasure (T : Theory) (hS : Sound T) (R : ReadsAsLine T)
    (s : T.Sent) (hc : T.True_ s → T.Prov s) : T.Prov s ↔ LeastErasure (R.world s) :=
  ⟨ladder_proof_lands_on_least_erasure T hS R s,
   fun l => hc ((R.reads s).mpr ((least_erasure_is_the_value (R.world s)).mp l))⟩

/-- A sound theory with one sentence, proved, reading as the line world. -/
def lineTheory : Theory := ⟨Unit, fun _ => True, fun _ => False, fun _ => True⟩
theorem lineTheory_sound : Sound lineTheory := fun _ _ => trivial
def lineTheoryReads : ReadsAsLine lineTheory :=
  ⟨fun _ => W1, fun _ => ⟨fun _ => W1_rh, fun _ => trivial⟩⟩

/-- A sound theory proving a sentence that reads as the hypothesis exists, and its proof lands on
    least erasure. -/
theorem a_sound_theory_may_prove_the_line :
    Sound lineTheory ∧ lineTheory.Prov () ∧ LeastErasure (lineTheoryReads.world ()) :=
  ⟨lineTheory_sound, trivial,
   ladder_proof_lands_on_least_erasure lineTheory lineTheory_sound lineTheoryReads () trivial⟩

/-! ### XIX.e · The route ledger, computed -/

/-- Six routes to the hypothesis. -/
inductive Route where
  | ladderFromRecord | foundationAsSystem | placement | groundByAct | independence | realPartCertified
  deriving DecidableEq, Repr

/-- A route's status: blocked by a theorem of this file; closed by the act; carried on a cited
    theorem; or open, with no closure claimed. -/
inductive RouteStatus where
  | blocked | closedByAct | cited | open
  deriving DecidableEq, Repr

/-- A status is a function of three recorded bits: a theorem of this file blocks the route; the act
    closes it; a cited theorem carries it. -/
def routeStatus (blocked byAct cited : Bool) : RouteStatus :=
  if blocked then .blocked else if byAct then .closedByAct else if cited then .cited else .open

structure RouteEntry where
  route : Route
  blocked : Bool
  byAct : Bool
  cited : Bool
  printed : RouteStatus

/-- The ledger: the ladder from the record, blocked (unicorn_block); the foundation as a system,
    open (a_sound_theory_may_prove_the_line); placement, on the two cited premises (placement);
    the ground closed by the act (rh_from_the_act); independence, blocked, since it would force
    truth (independence_forces_truth); the real part to the certified height, cited (Platt and
    Trudgian 2021, certified_height_never_forces). -/
def routeLedger : List RouteEntry :=
  [⟨.ladderFromRecord, true, false, false, .blocked⟩,
   ⟨.foundationAsSystem, false, false, false, .open⟩,
   ⟨.placement, false, false, true, .cited⟩,
   ⟨.groundByAct, false, true, false, .closedByAct⟩,
   ⟨.independence, true, false, false, .blocked⟩,
   ⟨.realPartCertified, false, false, true, .cited⟩]

/-- Every printed status is the computed one. -/
theorem route_ledger_is_computed :
    routeLedger.all (fun e => routeStatus e.blocked e.byAct e.cited == e.printed) = true := by
  decide

/-- Six routes: two blocked, one closed by the act, two cited, one open. -/
theorem route_ledger_counts :
    routeLedger.length = 6 ∧
    (routeLedger.filter (fun e => e.printed == .blocked)).length = 2 ∧
    (routeLedger.filter (fun e => e.printed == .closedByAct)).length = 1 ∧
    (routeLedger.filter (fun e => e.printed == .cited)).length = 2 ∧
    (routeLedger.filter (fun e => e.printed == .open)).length = 1 := by
  decide

/-- Nothing escapes the ledger: every status is one of the four. -/
theorem route_status_total : ∀ a b c : Bool,
    routeStatus a b c = .blocked ∨ routeStatus a b c = .closedByAct ∨
    routeStatus a b c = .cited ∨ routeStatus a b c = .open := by
  decide

/-- A route is blocked exactly when a theorem blocks it: no other bit produces the verdict. -/
theorem blocked_iff_theorem : ∀ a b c : Bool, routeStatus a b c = .blocked ↔ a = true := by
  decide

/-! ### XIX.f · The two-part reading -/

/-- (a) From the posit the hypothesis follows. (b) No reading of the record supplies the posit. (c)
    The posit is the hypothesis. (d) Nothing weaker forces. -/
theorem reader_frame :
    (∀ A : ActualZeros, RH A.zeros) ∧
    (∀ g : World → Prop, RespectsRecord g → ¬ ∀ Z, FoldClosed Z → (g Z ↔ RH Z)) ∧
    (∀ Z : World, LeastErasure Z ↔ RH Z) ∧
    (Forces RH ∧ ∀ A : World → Prop, Forces A → ∀ Z, FoldClosed Z → A Z → RH Z) :=
  ⟨rh_from_the_act, record_decides_nothing_free, least_erasure_is_the_value,
   rh_is_the_weakest_forcing_premise⟩

/-- Section XIX, whole. -/
theorem the_front :
    (∀ (Z : World) (P : Prop), ((RH Z → P) ↔ (LeastErasure Z → P)) ∧
      ((P → RH Z) ↔ (P → LeastErasure Z))) ∧
    (∀ (H : Faces) (P : Prop), ((H.line → P) ↔ (H.least → P)) ∧ ((H.lamZero → P) ↔ (H.least → P)) ∧
      ((H.faithful → P) ↔ (H.least → P)) ∧ ((H.weil → P) ↔ (H.least → P))) ∧
    (∀ (ι : Type) (at_ : ι → World → Prop), (∀ i, Admissible (at_ i)) →
      ∀ c : Coalition ι, ¬ ∀ Z, FoldClosed Z → (Coalition.eval at_ c Z ↔ RH Z)) ∧
    ¬ Admissible LeastErasure ∧
    (Forces RH ∧ ∀ A : World → Prop, Forces A → ∀ Z, FoldClosed Z → A Z → RH Z) ∧
    (∀ (T : Theory), Sound T → ∀ (R : ReadsAsLine T) (s : T.Sent), T.Prov s →
      LeastErasure (R.world s)) ∧
    (Sound lineTheory ∧ lineTheory.Prov () ∧ LeastErasure (lineTheoryReads.world ())) ∧
    routeLedger.all (fun e => routeStatus e.blocked e.byAct e.cited == e.printed) = true ∧
    ((∀ A : ActualZeros, RH A.zeros) ∧
     (∀ g : World → Prop, RespectsRecord g → ¬ ∀ Z, FoldClosed Z → (g Z ↔ RH Z)) ∧
     (∀ Z : World, LeastErasure Z ↔ RH Z)) :=
  ⟨vocabulary_law, every_face_proves_every_face,
   fun _ at_ h c => no_coalition_decides at_ h c, spend_is_not_admissible,
   rh_is_the_weakest_forcing_premise,
   fun T hS R s hp => ladder_proof_lands_on_least_erasure T hS R s hp,
   a_sound_theory_may_prove_the_line, route_ledger_is_computed,
   ⟨rh_from_the_act, record_decides_nothing_free, least_erasure_is_the_value⟩⟩

/-! ## XX · Least erasure affirmed: the record, the ledger, the price, the one form, the act -/

/-! ### XX.a · The record is carried by a least-erasure world, and by only one -/

/-- Registration lands on the line. -/
theorem reg_on_line (z : Pt) : onLine (reg z) := rfl

/-- The record of every world satisfies the hypothesis. -/
theorem record_rh (Z : World) : RH (recordOf Z) := by
  intro r ⟨s, _, hsr⟩
  rw [← hsr]
  exact rfl

/-- The record of every world has least erasure. -/
theorem record_has_least_erasure (Z : World) : LeastErasure (recordOf Z) :=
  (least_erasure_is_the_value (recordOf Z)).mpr (record_rh Z)

/-- The record of every world is fold-closed: it lies on the line, which the fold fixes. -/
theorem record_closed (Z : World) : FoldClosed (recordOf Z) := by
  intro r ⟨s, hs, hsr⟩
  rw [← hsr]
  exact ⟨s, hs, ((fold_fixed_iff (reg s)).mpr rfl).symm⟩

/-- The record of Z shares the record of Z, has least erasure, and every least-erasure world with
    that record equals it pointwise. -/
theorem record_carried_by_least_erasure (Z : World) :
    SameRecord Z (recordOf Z) ∧ LeastErasure (recordOf Z) ∧
    ∀ Z', SameRecord Z Z' → LeastErasure Z' → ∀ z, Z' z ↔ recordOf Z z := by
  refine ⟨record_same Z, record_has_least_erasure Z, ?_⟩
  intro Z' hs hle z
  have h1 : SameRecord Z' (recordOf Z) := fun r => (hs r).symm.trans (record_same Z r)
  exact lossless_unique Z' (recordOf Z) h1 ((least_erasure_is_the_value Z').mp hle) (record_rh Z) z

/-! ### XX.b · Every reading of the record holds on a least-erasure world -/

/-- An admissible premise that holds on a world holds on that world's record, which has least
    erasure. -/
theorem admissible_holds_on_the_lossless_world (A : World → Prop) (hA : Admissible A) (Z : World)
    (h : A Z) : A (recordOf Z) ∧ LeastErasure (recordOf Z) := by
  refine ⟨?_, record_has_least_erasure Z⟩
  rcases hA with k | r
  · exact k (recordOf Z)
  · exact (r Z (recordOf Z) (record_same Z)).mp h

/-- Every reading of the record that holds on a world holds on that world's record. -/
theorem every_reading_holds_on_the_lossless_world (g : World → Prop) (hg : RespectsRecord g)
    (Z : World) (h : g Z) : g (recordOf Z) ∧ LeastErasure (recordOf Z) := by
  refine ⟨(hg Z (recordOf Z) (record_same Z)).mp h, record_has_least_erasure Z⟩

/-- Every coalition of admissible atoms that holds on a world holds on that world's record. -/
theorem every_coalition_holds_on_the_lossless_world {ι : Type} (at_ : ι → World → Prop)
    (h : ∀ i, Admissible (at_ i)) (c : Coalition ι) (Z : World) (hc : Coalition.eval at_ c Z) :
    Coalition.eval at_ c (recordOf Z) ∧ LeastErasure (recordOf Z) := by
  refine ⟨?_, record_has_least_erasure Z⟩
  rcases coalition_admissible at_ h c with k | r
  · exact k (recordOf Z)
  · exact (r Z (recordOf Z) (record_same Z)).mp hc

/-- An admissible premise that denies least erasure on every fold-closed world holds on no world. -/
theorem record_never_testifies_against (A : World → Prop) (hA : Admissible A)
    (hdeny : ∀ Z, FoldClosed Z → A Z → ¬ LeastErasure Z) : ∀ Z, ¬ A Z := by
  intro Z h
  rcases hA with k | r
  · exact hdeny (recordOf Z) (record_closed Z) (k (recordOf Z)) (record_has_least_erasure Z)
  · exact hdeny (recordOf Z) (record_closed Z) ((r Z (recordOf Z) (record_same Z)).mp h)
      (record_has_least_erasure Z)

/-! ### XX.c · The erasure ledger: one bit per off-line pair, zero exactly at least erasure -/

/-- An off-line pair at offset k is two distinct points, exchanged by the fold, with one registered
    point. -/
theorem pair_two_points_one_record (k : Int) (h : Nat) (hk : k ≠ 0) :
    (⟨1 - k, h⟩ : Pt) ≠ ⟨1 + k, h⟩ ∧ reg ⟨1 - k, h⟩ = reg ⟨1 + k, h⟩ ∧
    fold ⟨1 - k, h⟩ = ⟨1 + k, h⟩ := by
  refine ⟨?_, rfl, ?_⟩
  · intro e
    have := congrArg Pt.x e
    change 1 - k = 1 + k at this
    omega
  · show Pt.mk (2 - (1 - k)) h = Pt.mk (1 + k) h
    congr 1
    omega

/-- A finite configuration: the heights of its on-line zeros, and its off-line pairs, each an
    offset with a height. An offset of zero is no pair. -/
structure FinCfg where
  online : List Nat
  pairs : List (Int × Nat)

/-- The world a finite configuration names on the chart. -/
def FinCfg.world (C : FinCfg) : World := fun z =>
  (z.x = 1 ∧ z.t ∈ C.online) ∨
  ∃ p ∈ C.pairs, p.1 ≠ 0 ∧ (z = ⟨1 - p.1, p.2⟩ ∨ z = ⟨1 + p.1, p.2⟩)

/-- The off-line pairs, counted. -/
def offCount : List (Int × Nat) → Nat
  | [] => 0
  | p :: ps => (if p.1 = 0 then 0 else 1) + offCount ps

/-- Erased bits: the number of off-line pairs. -/
def FinCfg.erasedBits (C : FinCfg) : Nat := offCount C.pairs

theorem offCount_zero_iff (ps : List (Int × Nat)) : offCount ps = 0 ↔ ∀ p ∈ ps, p.1 = 0 := by
  induction ps with
  | nil => exact ⟨fun _ p hp => (nomatch hp), fun _ => rfl⟩
  | cons p ps ih =>
    show (if p.1 = 0 then 0 else 1) + offCount ps = 0 ↔ ∀ q ∈ p :: ps, q.1 = 0
    by_cases hp : p.1 = 0
    · rw [if_pos hp, Nat.zero_add, ih]
      constructor
      · intro h q hq
        cases hq with
        | head => exact hp
        | tail _ hq' => exact h q hq'
      · intro h q hq
        exact h q (List.Mem.tail p hq)
    · rw [if_neg hp]
      constructor
      · intro h
        omega
      · intro h
        exact absurd (h p (List.Mem.head ps)) hp

/-- Every finite configuration is fold-closed: the on-line points are fixed and each pair is
    exchanged. -/
theorem fincfg_closed (C : FinCfg) : FoldClosed C.world := by
  intro z hz
  rcases hz with ⟨hx, ht⟩ | ⟨p, hp, hk, hz⟩
  · exact Or.inl ⟨show 2 - z.x = 1 by omega, ht⟩
  · refine Or.inr ⟨p, hp, hk, ?_⟩
    rcases hz with e | e
    · subst e
      exact Or.inr (by show Pt.mk (2 - (1 - p.1)) p.2 = Pt.mk (1 + p.1) p.2; congr 1; omega)
    · subst e
      exact Or.inl (by show Pt.mk (2 - (1 + p.1)) p.2 = Pt.mk (1 - p.1) p.2; congr 1; omega)

/-- Least erasure holds exactly when the erased bits are zero. -/
theorem least_erasure_iff_zero_erased (C : FinCfg) : LeastErasure C.world ↔ C.erasedBits = 0 := by
  rw [least_erasure_is_the_value]
  show RH C.world ↔ offCount C.pairs = 0
  rw [offCount_zero_iff]
  constructor
  · intro h p hp
    refine Decidable.byContradiction (fun hk => ?_)
    have hz : C.world ⟨1 - p.1, p.2⟩ := Or.inr ⟨p, hp, hk, Or.inl rfl⟩
    have := h _ hz
    change 1 - p.1 = 1 at this
    omega
  · intro h z hz
    rcases hz with ⟨hx, _⟩ | ⟨p, hp, hk, _⟩
    · exact hx
    · exact absurd (h p hp) hk

/-! ### XX.d · The price: one floor per erased bit, zero exactly at least erasure -/

/-- k_B T ln 2 at 300 K in units of 10⁻⁴⁵ J: k_B = 1380649 × 10⁻²⁹ J/K (SI 2019), ln 2 =
    6931471805599453 × 10⁻¹⁶ to sixteen digits. -/
def landauerFloor : Nat := 1380649 * 300 * 6931471805599453

theorem landauer_floor_exact : landauerFloor = 2870978885078723755499100 := by decide

/-- The price of a registration: one floor per erased bit if irreversible, 0 if reversible. -/
def FinCfg.price (C : FinCfg) (irreversible : Bool) : Nat :=
  if irreversible then C.erasedBits * landauerFloor else 0

/-- An irreversible registration has price 0 exactly when the configuration has least erasure. -/
theorem price_zero_iff_least_erasure (C : FinCfg) : C.price true = 0 ↔ LeastErasure C.world := by
  rw [least_erasure_iff_zero_erased]
  show C.erasedBits * landauerFloor = 0 ↔ C.erasedBits = 0
  constructor
  · intro h
    rcases Nat.mul_eq_zero.mp h with h1 | h1
    · exact h1
    · exact absurd h1 (by decide)
  · intro h
    rw [h, Nat.zero_mul]

/-- One more off-line pair. -/
def FinCfg.addPair (C : FinCfg) (k : Int) (h : Nat) : FinCfg := ⟨C.online, (k, h) :: C.pairs⟩

/-- Adding an off-line pair adds one floor; the price is the erased bits times the floor. -/
theorem denial_price_linear (C : FinCfg) (k : Int) (h : Nat) (hk : k ≠ 0) :
    (C.addPair k h).price true = C.price true + landauerFloor ∧
    C.price true = C.erasedBits * landauerFloor := by
  refine ⟨?_, rfl⟩
  show ((if k = 0 then 0 else 1) + offCount C.pairs) * landauerFloor
      = offCount C.pairs * landauerFloor + landauerFloor
  rw [if_neg hk, Nat.add_mul, Nat.one_mul, Nat.add_comm]

/-- What is held reversibly commits no bit. -/
theorem reversible_commits_nothing (C : FinCfg) : C.price false = 0 := rfl

/-! ### XX.e · The one form of anything against least erasure -/

/-- Least erasure holds exactly when no point of the world lies off the line. No classical axiom. -/
theorem least_erasure_iff_no_point_off (Z : World) : LeastErasure Z ↔ ¬ OffLine Z := by
  rw [least_erasure_is_the_value]
  constructor
  · intro h ⟨z, hz, hoff⟩
    exact hoff (h z hz)
  · intro h z hz
    exact Decidable.byContradiction (fun hoff => h ⟨z, hz, hoff⟩)

/-- Least erasure fails exactly when some point of the world lies off the line. Classical. -/
theorem rejection_is_a_witness (Z : World) : ¬ LeastErasure Z ↔ OffLine Z := by
  rw [least_erasure_iff_no_point_off]
  exact ⟨fun h => Classical.byContradiction (fun hn => h hn), fun h hn => hn h⟩

/-- Two settings on one hypothesis agree on whether the hypothesis is refutable. -/
theorem falsifier_form_constant (S₁ S₂ : Setting) [Decidable S₁.hyp] [Decidable S₂.hyp]
    (h : S₁.hyp = S₂.hyp) : (¬ S₁.Prov (¬ S₁.hyp)) ↔ (¬ S₂.Prov (¬ S₂.hyp)) := by
  constructor
  · intro h1 p2
    exact S₂.sound_neg p2 (Eq.mp h (cant_refute_seals_dec S₁ h1))
  · intro h2 p1
    exact S₁.sound_neg p1 (Eq.mpr h (cant_refute_seals_dec S₂ h2))

/-! ### XX.f · The act -/

/-- Any inhabitant of any type yields the root proposition. -/
theorem act_reenacts_root {Act : Type} (_a : Act) : RootAct := root_act

/-- The root does not imply the denial of the hypothesis on every world. -/
theorem root_does_not_cross_the_denial : ¬ ∀ Z : World, RootAct → ¬ RH Z :=
  fun h => h W1 root_act W1_rh

/-- A self-grounding supply of least erasure with an act exists exactly when least erasure holds. -/
theorem assent_is_the_value (Z : World) :
    (∃ G : SelfGrounding (LeastErasure Z), Nonempty G.Act) ↔ LeastErasure Z :=
  supply_iff (LeastErasure Z)

/-! ### XX.g · Freedom given, the sign spent -/

/-- A prime is one fibre of exactly two, never on the diagonal; an off-line pair is two points
    exchanged by the fold with one record; a bit is two distinct values. -/
theorem one_shape_two_registers :
    (∀ p : Nat, isPrime p →
      (∀ a b, mul_orbit p a b ↔ (a = 1 ∧ b = p) ∨ (a = p ∧ b = 1)) ∧ (1 : Nat) ≠ p) ∧
    (∀ p : Nat, isPrime p → ¬ ∃ a, mul_orbit p a a) ∧
    (∀ (k : Int) (h : Nat), k ≠ 0 → (⟨1 - k, h⟩ : Pt) ≠ ⟨1 + k, h⟩ ∧
      reg ⟨1 - k, h⟩ = reg ⟨1 + k, h⟩ ∧ fold ⟨1 - k, h⟩ = ⟨1 + k, h⟩) ∧
    ((∀ b : Bool, b = true ∨ b = false) ∧ (true : Bool) ≠ false) :=
  ⟨freedom_is_exactly_two, prime_off_seat, pair_two_points_one_record, aperture_one_bit_wide⟩

/-- The free basis holds and forces nothing; least erasure is Weil positivity; positivity is keyed;
    a self-grounding supply of positivity is the hypothesis. -/
theorem freedom_is_given_the_sign_is_spent :
    (∀ p q : Nat, isPrime p → isPrime q → p ≠ q →
      ∃ f : Nat → Int, CompletelyAdditive f ∧ f p = 1 ∧ f q = 0 ∧ f 1 = 0) ∧
    ¬ Forces (fun _ => ∀ p q, isPrime p → isPrime q → p ≠ q →
      ∃ f : Nat → Int, CompletelyAdditive f ∧ f p = 1 ∧ f q = 0 ∧ f 1 = 0) ∧
    (∀ E : ExplicitFormula, LeastErasure E.zeros ↔ WeilPositive E) ∧
    (WeilPositive positiveInstance ∧ ¬ WeilPositive negativeInstance) ∧
    (∀ E : ExplicitFormula, (∃ G : SelfGrounding (WeilPositive E), Nonempty G.Act) ↔ RH E.zeros) :=
  ⟨prime_freedom_independent, prime_freedom_forces_nothing, least_erasure_is_positivity,
   positivity_is_keyed, prime_witness_iff⟩

/-! ### XX.h · Least erasure, affirmed whole -/

/-- Section XX, whole. -/
theorem least_erasure_affirmed :
    (∀ Z : World, LeastErasure Z ↔ RH Z) ∧
    (∀ Z : World, SameRecord Z (recordOf Z) ∧ LeastErasure (recordOf Z) ∧
      ∀ Z', SameRecord Z Z' → LeastErasure Z' → ∀ z, Z' z ↔ recordOf Z z) ∧
    (∀ (A : World → Prop), Admissible A → ∀ Z, A Z → A (recordOf Z) ∧ LeastErasure (recordOf Z)) ∧
    (∀ (A : World → Prop), Admissible A →
      (∀ Z, FoldClosed Z → A Z → ¬ LeastErasure Z) → ∀ Z, ¬ A Z) ∧
    (∀ C : FinCfg, LeastErasure C.world ↔ C.erasedBits = 0) ∧
    (∀ C : FinCfg, C.price true = 0 ↔ LeastErasure C.world) ∧
    (∀ Z : World, LeastErasure Z ↔ ¬ OffLine Z) ∧
    (∀ (S₁ S₂ : Setting) [Decidable S₁.hyp] [Decidable S₂.hyp], S₁.hyp = S₂.hyp →
      ((¬ S₁.Prov (¬ S₁.hyp)) ↔ (¬ S₂.Prov (¬ S₂.hyp)))) ∧
    (∀ Z : World, (∃ G : SelfGrounding (LeastErasure Z), Nonempty G.Act) ↔ LeastErasure Z) ∧
    (∀ E : ExplicitFormula, LeastErasure E.zeros ↔ WeilPositive E) :=
  ⟨least_erasure_is_the_value, record_carried_by_least_erasure,
   admissible_holds_on_the_lossless_world, record_never_testifies_against,
   least_erasure_iff_zero_erased, price_zero_iff_least_erasure, least_erasure_iff_no_point_off,
   fun S₁ S₂ _ _ h => falsifier_form_constant S₁ S₂ h, assent_is_the_value,
   least_erasure_is_positivity⟩


/-! ## XXI · Every assignment realized; the arrow for every n; the closure, whole

The primes admit every assignment of integers: for each `a` on the primes, `n ↦ Σ_{p ≤ n} v_p(n) a(p)`
is completely additive and takes the value `a(p)` at every prime, and by `determined_by_primes` it is the
only such function. The count `Ω(n) = Σ_p v_p(n)` and the arrow `λ(n) = (−1)^{Ω(n)}` are defined for every
`n`, and `λ` is completely multiplicative with `λ(p) = −1`. The Liouville face is pinned to the constructed
walk. On the chart, least erasure is the value, the fixed-point condition and leastness in the fibre; the
closure is bound in one theorem; and the same laws hold on any carrier with an involution and a registration,
the chart one instance. -/

/-- The finite sum `sumBelow N g = g 0 + ⋯ + g (N − 1)`. -/
def sumBelow : Nat → (Nat → Int) → Int
  | 0, _ => 0
  | N + 1, g => sumBelow N g + g N

theorem sumBelow_add (g h : Nat → Int) (N : Nat) :
    sumBelow N (fun i => g i + h i) = sumBelow N g + sumBelow N h := by
  induction N with
  | zero => show (0 : Int) = 0 + 0; omega
  | succ N ih =>
    show sumBelow N (fun i => g i + h i) + (g N + h N) = (sumBelow N g + g N) + (sumBelow N h + h N)
    rw [ih]; omega

theorem sumBelow_congr (g h : Nat → Int) (N : Nat) (hgh : ∀ i, i < N → g i = h i) :
    sumBelow N g = sumBelow N h := by
  induction N with
  | zero => rfl
  | succ N ih =>
    show sumBelow N g + g N = sumBelow N h + h N
    rw [ih (fun i hi => hgh i (by omega)), hgh N (by omega)]

theorem sumBelow_stable (g : Nat → Int) (M k : Nat) (hz : ∀ i, M ≤ i → i < M + k → g i = 0) :
    sumBelow (M + k) g = sumBelow M g := by
  induction k with
  | zero => rfl
  | succ k ih =>
    show sumBelow (M + k) g + g (M + k) = sumBelow M g
    rw [ih (fun i h1 h2 => hz i h1 (by omega)), hz (M + k) (by omega) (by omega)]
    omega

theorem sumBelow_zero (g : Nat → Int) (N : Nat) (hz : ∀ i, i < N → g i = 0) : sumBelow N g = 0 := by
  induction N with
  | zero => rfl
  | succ N ih =>
    show sumBelow N g + g N = 0
    rw [ih (fun i hi => hz i (by omega)), hz N (by omega)]
    omega

theorem sumBelow_single (g : Nat → Int) (j N : Nat) (hj : j < N) (hz : ∀ i, i < N → i ≠ j → g i = 0) :
    sumBelow N g = g j := by
  induction N with
  | zero => omega
  | succ N ih =>
    show sumBelow N g + g N = g j
    by_cases hjN : j = N
    · rw [hjN, sumBelow_zero g N (fun i hi => hz i (by omega) (by omega))]
      omega
    · rw [ih (by omega) (fun i hi hij => hz i (by omega) hij), hz N (by omega) (fun h => hjN h.symm)]
      omega

/-- Primality, decided: two at least, and its own least divisor. -/
def primeTest (p : Nat) : Bool := decide (2 ≤ p ∧ leastDivisor p = p)

theorem primeTest_iff (p : Nat) : primeTest p = true ↔ isPrime p := by
  constructor
  · intro h
    obtain ⟨h2, hl⟩ : 2 ≤ p ∧ leastDivisor p = p := of_decide_eq_true h
    have hp := leastDivisor_prime p h2
    rw [hl] at hp
    exact hp
  · intro hp
    apply decide_eq_true
    refine ⟨hp.1, ?_⟩
    have hs := leastDivisor_spec p hp.1
    rcases hp.2 (leastDivisor p) hs.1.2 with h1 | h1
    · have h2 := hs.1.1
      omega
    · exact h1

theorem pExp_zero_above (p n : Nat) (hn : 0 < n) (hp : n < p) : pExp p n = 0 :=
  pExp_eq_zero_of_not_dvd p n (fun hd => absurd (Nat.le_of_dvd hn hd) (by omega))

/-- The term of the extension at `p`: the exponent of `p` in `n` times the value assigned to `p`, at primes only. -/
def extendTerm (a : Nat → Int) (n p : Nat) : Int := if primeTest p = true then (pExp p n : Int) * a p else 0

/-- The extension of an assignment on the primes: `n ↦ Σ_{p ≤ n} v_p(n) a(p)`. -/
def extendAssignment (a : Nat → Int) (n : Nat) : Int := sumBelow (n + 1) (extendTerm a n)

theorem extendTerm_zero_above (a : Nat → Int) (n i : Nat) (hn : 0 < n) (hi : n < i) : extendTerm a n i = 0 := by
  unfold extendTerm
  rw [pExp_zero_above i n hn hi]
  by_cases hb : primeTest i = true
  · rw [if_pos hb]; simp
  · rw [if_neg hb]

theorem extendAssignment_bound (a : Nat → Int) (n B : Nat) (hn : 0 < n) (hB : n < B) :
    extendAssignment a n = sumBelow B (extendTerm a n) := by
  obtain ⟨k, rfl⟩ : ∃ k, B = n + 1 + k := ⟨B - (n + 1), by omega⟩
  unfold extendAssignment
  rw [sumBelow_stable (extendTerm a n) (n + 1) k (fun i h1 _ => extendTerm_zero_above a n i hn (by omega))]

theorem extendTerm_mul (a : Nat → Int) (m n p : Nat) (hm : 0 < m) (hn : 0 < n) :
    extendTerm a (m * n) p = extendTerm a m p + extendTerm a n p := by
  unfold extendTerm
  by_cases hb : primeTest p = true
  · rw [if_pos hb, if_pos hb, if_pos hb, pExp_mul p m n ((primeTest_iff p).mp hb) hm hn]
    have e : ((pExp p m + pExp p n : Nat) : Int) = (pExp p m : Int) + (pExp p n : Int) := by omega
    rw [e, Int.add_mul]
  · rw [if_neg hb, if_neg hb, if_neg hb]
    omega

theorem extendAssignment_mul (a : Nat → Int) (m n : Nat) (hm : 0 < m) (hn : 0 < n) :
    extendAssignment a (m * n) = extendAssignment a m + extendAssignment a n := by
  have hmle : m ≤ m * n := by
    first
    | exact Nat.le_mul_of_pos_right m hn
    | exact Nat.le_mul_of_pos_right hn
    | (have h := Nat.mul_le_mul_left m hn; rwa [Nat.mul_one] at h)
  have hnle : n ≤ m * n := by
    first
    | exact Nat.le_mul_of_pos_left n hm
    | exact Nat.le_mul_of_pos_left hm
    | (have h := Nat.mul_le_mul_right n hm; rwa [Nat.one_mul] at h)
  rw [extendAssignment_bound a (m * n) (m * n + 1) (by omega) (by omega),
      extendAssignment_bound a m (m * n + 1) hm (by omega),
      extendAssignment_bound a n (m * n + 1) hn (by omega),
      sumBelow_congr (extendTerm a (m * n)) (fun i => extendTerm a m i + extendTerm a n i) (m * n + 1)
        (fun i _ => extendTerm_mul a m n i hm hn)]
  exact sumBelow_add (extendTerm a m) (extendTerm a n) (m * n + 1)

theorem extendTerm_other (a : Nat → Int) (q i : Nat) (hq : isPrime q) (hi : i ≠ q) : extendTerm a q i = 0 := by
  unfold extendTerm
  by_cases hb : primeTest i = true
  · rw [if_pos hb, pExp_other i q ((primeTest_iff i).mp hb) hq hi]; simp
  · rw [if_neg hb]

theorem extendAssignment_prime (a : Nat → Int) (q : Nat) (hq : isPrime q) : extendAssignment a q = a q := by
  unfold extendAssignment
  rw [sumBelow_single (extendTerm a q) q (q + 1) (by omega) (fun i _ hiq => extendTerm_other a q i hq hiq)]
  unfold extendTerm
  rw [if_pos ((primeTest_iff q).mpr hq), pExp_self q hq]
  simp

theorem extendAssignment_additive (a : Nat → Int) : CompletelyAdditive (extendAssignment a) :=
  fun m n hm hn => extendAssignment_mul a m n hm hn

/-- **Theorem (every assignment is realized).** For every assignment `a` of integers to the primes, the extension
    is completely additive, takes the value `a(p)` at every prime, and is the only completely additive function
    that does: the primes are a free basis, existence and uniqueness both proved. -/
theorem primes_admit_every_assignment (a : Nat → Int) :
    CompletelyAdditive (extendAssignment a) ∧ (∀ p, isPrime p → extendAssignment a p = a p) ∧
    ∀ g : Nat → Int, CompletelyAdditive g → (∀ p, isPrime p → g p = a p) →
      ∀ n, 0 < n → g n = extendAssignment a n :=
  ⟨extendAssignment_additive a, extendAssignment_prime a,
   fun g hg hga => determined_by_primes g (extendAssignment a) hg (extendAssignment_additive a)
     (fun p hp => (hga p hp).trans (extendAssignment_prime a p hp).symm)⟩

/-- `Ω(n) = Σ_p v_p(n)`, the prime factors of `n` counted with multiplicity, for every `n`. -/
def omegaAll (n : Nat) : Int := extendAssignment (fun _ => 1) n

/-- `λ(n) = (−1)^{Ω(n)}`, for every `n`. -/
def liouvilleAll (n : Nat) : Int := if omegaAll n % 2 = 0 then 1 else -1

theorem omegaAll_mul (m n : Nat) (hm : 0 < m) (hn : 0 < n) : omegaAll (m * n) = omegaAll m + omegaAll n :=
  extendAssignment_mul (fun _ => 1) m n hm hn

theorem omegaAll_prime (p : Nat) (hp : isPrime p) : omegaAll p = 1 :=
  extendAssignment_prime (fun _ => 1) p hp

/-- **The arrow, for every n.** `λ` is completely multiplicative, on all positive integers. -/
theorem liouvilleAll_mul (m n : Nat) (hm : 0 < m) (hn : 0 < n) :
    liouvilleAll (m * n) = liouvilleAll m * liouvilleAll n := by
  unfold liouvilleAll
  rw [omegaAll_mul m n hm hn]
  generalize omegaAll m = x
  generalize omegaAll n = y
  by_cases hx : x % 2 = 0 <;> by_cases hy : y % 2 = 0
  · rw [if_pos (show (x + y) % 2 = 0 by omega), if_pos hx, if_pos hy]; decide
  · rw [if_neg (show ¬ (x + y) % 2 = 0 by omega), if_pos hx, if_neg hy]; decide
  · rw [if_neg (show ¬ (x + y) % 2 = 0 by omega), if_neg hx, if_pos hy]; decide
  · rw [if_pos (show (x + y) % 2 = 0 by omega), if_neg hx, if_neg hy]; decide

theorem liouvilleAll_prime (p : Nat) (hp : isPrime p) : liouvilleAll p = -1 := by
  unfold liouvilleAll
  rw [omegaAll_prime p hp]
  decide

theorem liouvilleAll_one : liouvilleAll 1 = 1 := by decide

set_option maxRecDepth 100000 in
/-- The arrow for every n agrees with the computed arrow of Section XVII on 1..30. -/
theorem liouvilleAll_agrees_to_30 : ∀ n, n < 30 → Liouville.lam (n + 1) = liouvilleAll (n + 1) := by decide

/-- The Liouville walk `L(x) = Σ_{1 ≤ n ≤ x} λ(n)`, for every `x`. -/
def liouvilleWalk : Nat → Int
  | 0 => 0
  | n + 1 => liouvilleWalk n + liouvilleAll (n + 1)

/-- The Liouville sentence in integers: for all `k, m ≥ 1` there is `C` with `|L(x)|^{2m} ≤ C^{2m} x^{m+2k}` for every
    `x`, that is `L(x) = O(x^{1/2 + k/m})` at every exponent above one half. -/
def FaithfulLambda : Prop :=
  ∀ k m : Nat, 0 < k → 0 < m → ∃ C : Nat, ∀ x : Nat,
    (liouvilleWalk x).natAbs ^ (2 * m) ≤ C ^ (2 * m) * x ^ (m + 2 * k)

/-- The Liouville face pinned to the arithmetic: its sentence is `FaithfulLambda`, a statement about the constructed
    walk. The link to the zeros is the cited equivalence of `LiouvilleFace`, carried as the one field. -/
structure LiouvilleFacePinned where
  zeros : World
  landau : RH zeros ↔ FaithfulLambda

theorem pinned_face_reads (F : LiouvilleFacePinned) : RH F.zeros ↔ FaithfulLambda := F.landau

/-- The pinned face is a Liouville face, with its sentence fixed. -/
def LiouvilleFacePinned.toFace (F : LiouvilleFacePinned) : LiouvilleFace :=
  { zeros := F.zeros, faithful := FaithfulLambda, faithful_iff := F.landau }

theorem pinned_face_is_a_face (F : LiouvilleFacePinned) : F.toFace.faithful = FaithfulLambda := rfl

/-- **The fixed-point form.** A configuration satisfies the hypothesis exactly when it is its own record. -/
theorem rh_iff_own_record (Z : World) : RH Z ↔ ∀ z, Z z ↔ recordOf Z z := by
  constructor
  · intro hZ z
    constructor
    · intro hz
      exact ⟨z, hz, reg_fixes_line z (hZ z hz)⟩
    · intro ⟨s, hs, hsr⟩
      subst hsr
      rw [reg_fixes_line s (hZ s hs)]
      exact hs
  · intro h z hz
    obtain ⟨s, _, hsr⟩ := (h z).mp hz
    subst hsr
    exact rfl

/-- The erased part of a configuration: its zeros off the line. -/
def erasedPart (Z : World) : World := fun z => Z z ∧ ¬ onLine z

/-- **The variational form.** Least erasure is leastness: a configuration has least erasure exactly when its erased
    part lies inside the erased part of every configuration with the same record. -/
theorem least_erasure_is_least (Z : World) :
    LeastErasure Z ↔ ∀ Z', SameRecord Z Z' → ∀ z, erasedPart Z z → erasedPart Z' z := by
  rw [least_erasure_is_the_value]
  constructor
  · intro hZ _ _ z hz
    exact absurd (hZ z hz.1) hz.2
  · intro h z hz
    rcases Decidable.em (onLine z) with hon | hoff
    · exact hon
    · obtain ⟨⟨s, _, hsr⟩, hoff'⟩ := h (recordOf Z) (record_same Z) z ⟨hz, hoff⟩
      exact (hoff' (by rw [← hsr]; exact rfl)).elim

/-- The record is the least member of its fibre, and the only one: it has least erasure, and every configuration of
    the fibre with least erasure has exactly its zeros. -/
theorem record_is_the_least (Z : World) :
    LeastErasure (recordOf Z) ∧ ∀ Z', SameRecord Z Z' → LeastErasure Z' → ∀ z, Z' z ↔ recordOf Z z := by
  have hrh : RH (recordOf Z) := by
    intro r hr
    obtain ⟨s, _, hsr⟩ := hr
    subst hsr
    exact rfl
  refine ⟨(least_erasure_is_the_value _).mpr hrh, fun Z' h hle z => ?_⟩
  exact lossless_unique Z' (recordOf Z) (fun r => (h r).symm.trans (record_same Z r))
    ((least_erasure_is_the_value Z').mp hle) hrh z

/-- **The closure, whole.** On the chart: the seat is the fixed set of the fold; registration lands on it and fixes
    it; over one record both worlds exist, and no record-respecting reading decides the value on fold-closed
    configurations; least erasure is the value, is the fixed-point condition, and is leastness in the fibre; the
    lossless member of a fibre is unique; nothing escapes the cut; and the act prints the hypothesis at the actual
    zero set. -/
theorem the_closure :
    (∀ z : Pt, fold z = z ↔ onLine z) ∧
    (∀ z : Pt, onLine (reg z) ∧ (onLine z → reg z = z)) ∧
    (SameRecord W1 W2 ∧ RH W1 ∧ ¬ RH W2) ∧
    (∀ g : World → Prop, RespectsRecord g → ¬ ∀ Z, FoldClosed Z → (g Z ↔ RH Z)) ∧
    (∀ Z : World, (LeastErasure Z ↔ RH Z) ∧ (RH Z ↔ ∀ z, Z z ↔ recordOf Z z) ∧
      (LeastErasure Z ↔ ∀ Z', SameRecord Z Z' → ∀ z, erasedPart Z z → erasedPart Z' z)) ∧
    (∀ Z Z' : World, SameRecord Z Z' → RH Z → RH Z' → ∀ z, Z z ↔ Z' z) ∧
    (∀ z : Pt, (onLine z ∧ fold z = z ∧ reg z = z) ∨
      (¬ onLine z ∧ fold z ≠ z ∧ reg (fold z) = reg z ∧ ∀ w, reg w ≠ z)) ∧
    (∀ A : ActualZeros, RH A.zeros) :=
  ⟨fold_fixed_iff, fun z => ⟨(show (reg z).x = 1 from rfl), reg_fixes_line z⟩, ⟨same_record_12, W1_rh, W2_not_rh⟩,
   record_decides_nothing,
   fun Z => ⟨least_erasure_is_the_value Z, rh_iff_own_record Z, least_erasure_is_least Z⟩,
   lossless_unique, nothing_escapes_one_cut, rh_from_the_act⟩

namespace Carrier

/-- A fold on any carrier: an involution. -/
structure Fold (X : Type) where
  σ : X → X
  invol : ∀ x, σ (σ x) = x

/-- A registration for a fold: it lands on the fixed set, fixes it, and forgets the side. -/
structure Registration {X : Type} (F : Fold X) where
  r : X → X
  lands : ∀ x, F.σ (r x) = r x
  fixes : ∀ x, F.σ x = x → r x = x
  forgets : ∀ x, r (F.σ x) = r x

def RHc {X : Type} (F : Fold X) (Z : X → Prop) : Prop := ∀ x, Z x → F.σ x = x
def recordC {X : Type} {F : Fold X} (R : Registration F) (Z : X → Prop) : X → Prop :=
  fun y => ∃ s, Z s ∧ R.r s = y
def SameRecordC {X : Type} {F : Fold X} (R : Registration F) (Z Z' : X → Prop) : Prop :=
  ∀ y, recordC R Z y ↔ recordC R Z' y
def OffC {X : Type} (F : Fold X) (Z : X → Prop) : Prop := ∃ x, Z x ∧ F.σ x ≠ x
def LeastErasureC {X : Type} {F : Fold X} (R : Registration F) (Z : X → Prop) : Prop :=
  ∀ Z', SameRecordC R Z Z' → OffC F Z → OffC F Z'

theorem record_same_C {X : Type} {F : Fold X} (R : Registration F) (Z : X → Prop) :
    SameRecordC R Z (recordC R Z) := by
  intro y
  constructor
  · intro ⟨s, hs, hsy⟩
    exact ⟨R.r s, ⟨s, hs, rfl⟩, by rw [R.fixes (R.r s) (R.lands s)]; exact hsy⟩
  · intro ⟨s', ⟨s, hs, hss'⟩, hs'y⟩
    subst hss'
    exact ⟨s, hs, by rw [← hs'y, R.fixes (R.r s) (R.lands s)]⟩

theorem least_erasure_is_the_value_C {X : Type} {F : Fold X} (R : Registration F)
    (em : ∀ x, F.σ x = x ∨ F.σ x ≠ x) (Z : X → Prop) : LeastErasureC R Z ↔ RHc F Z := by
  constructor
  · intro hle x hx
    rcases em x with h | h
    · exact h
    · obtain ⟨y, ⟨s, _, hsy⟩, hy⟩ := hle (recordC R Z) (record_same_C R Z) ⟨x, hx, h⟩
      exact (hy (by rw [← hsy]; exact R.lands s)).elim
  · intro hZ _ _ ⟨x, hx, h⟩
    exact absurd (hZ x hx) h

theorem rh_iff_own_record_C {X : Type} {F : Fold X} (R : Registration F) (Z : X → Prop) :
    RHc F Z ↔ ∀ x, Z x ↔ recordC R Z x := by
  constructor
  · intro hZ x
    constructor
    · intro hx
      exact ⟨x, hx, R.fixes x (hZ x hx)⟩
    · intro ⟨s, hs, hsx⟩
      subst hsx
      rw [R.fixes s (hZ s hs)]
      exact hs
  · intro h x hx
    obtain ⟨s, _, hsx⟩ := (h x).mp hx
    subst hsx
    exact R.lands s

theorem one_record_C {X : Type} {F : Fold X} (R : Registration F) (x : X) :
    SameRecordC R (fun s => s = R.r x) (fun s => s = x ∨ s = F.σ x) := by
  intro y
  constructor
  · intro ⟨s, hs, hy⟩
    refine ⟨x, Or.inl rfl, ?_⟩
    rw [← hy, hs, R.fixes (R.r x) (R.lands x)]
  · intro ⟨s, hs, hy⟩
    refine ⟨R.r x, rfl, ?_⟩
    rw [R.fixes (R.r x) (R.lands x), ← hy]
    rcases hs with h | h
    · rw [h]
    · rw [h, R.forgets]

theorem worlds_differ_C {X : Type} {F : Fold X} (R : Registration F) (x : X) (h : F.σ x ≠ x) :
    RHc F (fun s => s = R.r x) ∧ ¬ RHc F (fun s => s = x ∨ s = F.σ x) :=
  ⟨fun _ hs => hs ▸ R.lands x, fun hall => h (hall x (Or.inl rfl))⟩

theorem no_reading_decides_C {X : Type} {F : Fold X} (R : Registration F) (x : X) (h : F.σ x ≠ x)
    (g : (X → Prop) → Prop) (hg : ∀ Z Z', SameRecordC R Z Z' → (g Z ↔ g Z')) :
    ¬ ((g (fun s => s = R.r x) ↔ RHc F (fun s => s = R.r x)) ∧
       (g (fun s => s = x ∨ s = F.σ x) ↔ RHc F (fun s => s = x ∨ s = F.σ x))) := by
  intro ⟨h1, h2⟩
  exact (worlds_differ_C R x h).2 (h2.mp ((hg _ _ (one_record_C R x)).mp (h1.mpr (worlds_differ_C R x h).1)))

/-- On any carrier the lossless member of a record is unique: two configurations of one record that both
    satisfy the hypothesis carry the same points. -/
theorem lossless_unique_C {X : Type} {F : Fold X} (R : Registration F) (Z Z' : X → Prop)
    (hs : SameRecordC R Z Z') (h : RHc F Z) (h' : RHc F Z') : ∀ x, Z x ↔ Z' x :=
  fun x => ((rh_iff_own_record_C R Z).mp h x).trans ((hs x).trans ((rh_iff_own_record_C R Z').mp h' x).symm)

/-- The chart's fold, as a carrier fold. -/
def chartFold : Fold Pt := ⟨fold, fold_fold⟩

/-- The chart's registration, as a carrier registration. -/
def chartReg : Registration chartFold :=
  ⟨reg, fun z => (fold_fixed_iff (reg z)).mpr rfl, fun z h => reg_fixes_line z ((fold_fixed_iff z).mp h),
   fun _ => rfl⟩

/-- **The chart is one instance.** Its fixed set is the line, and the carrier's hypothesis is the chart's. -/
theorem chart_is_an_instance :
    (∀ z, chartFold.σ z = z ↔ onLine z) ∧ ∀ Z : World, RHc chartFold Z ↔ RH Z :=
  ⟨fold_fixed_iff, fun _ => ⟨fun h z hz => (fold_fixed_iff z).mp (h z hz), fun h z hz => (fold_fixed_iff z).mpr (h z hz)⟩⟩

/-- **The closure on any carrier.** On every carrier with an involution and a registration on which fixedness is
    decided: least erasure is the value; the value is lossless registration; the lossless member of a record is
    unique; and every point off the fixed set gives two worlds of one record that differ in the value. -/
theorem the_closure_on_any_carrier {X : Type} {F : Fold X} (R : Registration F) (em : ∀ x, F.σ x = x ∨ F.σ x ≠ x) :
    (∀ Z, LeastErasureC R Z ↔ RHc F Z) ∧ (∀ Z, RHc F Z ↔ ∀ x, Z x ↔ recordC R Z x) ∧
    (∀ Z Z', SameRecordC R Z Z' → RHc F Z → RHc F Z' → ∀ x, Z x ↔ Z' x) ∧
    (∀ x, F.σ x ≠ x → SameRecordC R (fun s => s = R.r x) (fun s => s = x ∨ s = F.σ x) ∧
      RHc F (fun s => s = R.r x) ∧ ¬ RHc F (fun s => s = x ∨ s = F.σ x)) :=
  ⟨least_erasure_is_the_value_C R em, rh_iff_own_record_C R, lossless_unique_C R,
   fun x h => ⟨one_record_C R x, worlds_differ_C R x h⟩⟩

end Carrier

/-! ## XXII · The socket: every route to the value lands in the one field

An unconditional closure would be a closed term of type `LeastErasure Z` at the actual zero set, placed in the field
`supply` of `ActualZeros`. This section proves that the field is the only socket and that nothing reaches the value by
another way. A term of the hypothesis at a fold-closed configuration exists exactly when the field can be filled there,
and the closure theorem of Section XXI takes any term in the field with no other change. A premise on configurations
either forces the line or holds at a fold-closed configuration where the value fails; a keyless premise forces nothing;
a forcing premise that respects the record fails at every nonempty fold-closed configuration; a forcing premise either
is the value on every fold-closed configuration or fails at one that satisfies the hypothesis; and a forcing premise
that holds at a configuration fills the field there. A sentence carried to the zeros by a cited equivalence fills the
field exactly when it holds, whatever the sentence. The named sentences depend on their own configurations: Weil
positivity differs between two explicit formulas with every field, no prefix of a Li stream forces, and the Liouville
sentence, read as a property of an assignment at the primes, fails at the assignment that sends every prime to zero.
The one refutation is one point. -/

/-- The field can be filled at a fold-closed configuration exactly when the hypothesis holds there, and exactly when
    least erasure does. -/
theorem socket_is_the_value (Z : World) (hZ : FoldClosed Z) :
    ((∃ S : ActualZeros, S.zeros = Z) ↔ RH Z) ∧ ((∃ S : ActualZeros, S.zeros = Z) ↔ LeastErasure Z) := by
  have h1 : (∃ S : ActualZeros, S.zeros = Z) ↔ RH Z :=
    ⟨fun ⟨S, hS⟩ => hS ▸ rh_from_the_act S, fun h => ⟨⟨Z, hZ, (least_erasure_is_the_value Z).mpr h⟩, rfl⟩⟩
  exact ⟨h1, h1.trans (least_erasure_is_the_value Z).symm⟩

/-- The closure theorem takes a term in the field and changes nothing else: its last conjunct, applied to the
    configuration with the term, gives the hypothesis. -/
theorem closure_takes_a_term (Z : World) (hZ : FoldClosed Z) (s : LeastErasure Z) : RH Z :=
  the_closure.2.2.2.2.2.2.2 ⟨Z, hZ, s⟩

/-- At W1 the field holds a closed term, and the closure gives the hypothesis there with nothing assumed. -/
theorem closure_at_a_term : RH W1 :=
  closure_takes_a_term W1 W1_closed ((least_erasure_is_the_value W1).mpr W1_rh)

/-- Every premise either forces the line or holds at a fold-closed configuration where the value fails. Classical. -/
theorem forces_or_has_a_twin (A : World → Prop) : Forces A ∨ ∃ Z, FoldClosed Z ∧ A Z ∧ ¬ RH Z :=
  Classical.byCases (p := ∃ Z, FoldClosed Z ∧ A Z ∧ ¬ RH Z) Or.inr
    (fun h => Or.inl (fun Z hZ ha => Classical.byContradiction (fun hn => h ⟨Z, hZ, ha, hn⟩)))

/-- A configuration with one more pair, at real parts 0 and 1 and at the height `t`. -/
def withPair (Z : World) (t : Nat) : World := fun w => Z w ∨ w = ⟨0, t⟩ ∨ w = ⟨2, t⟩

theorem withPair_closed (Z : World) (hZ : FoldClosed Z) (t : Nat) : FoldClosed (withPair Z t) := by
  intro w hw
  rcases hw with h | h | h
  · exact Or.inl (hZ w h)
  · subst h
    exact Or.inr (Or.inr rfl)
  · subst h
    exact Or.inr (Or.inl rfl)

/-- The pair added at the height of a zero leaves the record unchanged: both new points have the registration of that zero. -/
theorem withPair_same_record (Z : World) (z : Pt) (hz : Z z) : SameRecord Z (withPair Z z.t) := by
  intro r
  constructor
  · intro ⟨s, hs, hsr⟩
    exact ⟨s, Or.inl hs, hsr⟩
  · intro ⟨s, hs, hsr⟩
    rcases hs with h | h | h
    · exact ⟨s, h, hsr⟩
    · subst h
      exact ⟨z, hz, hsr⟩
    · subst h
      exact ⟨z, hz, hsr⟩

theorem withPair_not_rh (Z : World) (t : Nat) : ¬ RH (withPair Z t) := by
  intro h
  have e : (0 : Int) = 1 := h ⟨0, t⟩ (Or.inr (Or.inl rfl))
  omega

/-- A premise that respects the record and forces the line fails at every nonempty fold-closed configuration: the
    configuration and its copy with one more pair share a record, and the copy fails the hypothesis. -/
theorem record_forcing_fails_everywhere (A : World → Prop) (hr : RespectsRecord A) (hf : Forces A) (Z : World)
    (hZ : FoldClosed Z) (hne : ∃ z, Z z) : ¬ A Z := by
  intro ha
  obtain ⟨z, hz⟩ := hne
  exact withPair_not_rh Z z.t (hf (withPair Z z.t) (withPair_closed Z hZ z.t)
    ((hr Z (withPair Z z.t) (withPair_same_record Z z hz)).mp ha))

/-- A premise that forces the line either is the value on every fold-closed configuration or fails at a fold-closed
    configuration that satisfies the hypothesis. Classical. -/
theorem forcing_is_the_value_or_stronger (A : World → Prop) (hf : Forces A) :
    (∀ Z, FoldClosed Z → (A Z ↔ RH Z)) ∨ ∃ Z, FoldClosed Z ∧ RH Z ∧ ¬ A Z :=
  Classical.byCases (p := ∃ Z, FoldClosed Z ∧ RH Z ∧ ¬ A Z) Or.inr
    (fun h => Or.inl (fun Z hZ => ⟨hf Z hZ, fun hrh => Classical.byContradiction (fun hna => h ⟨Z, hZ, hrh, hna⟩)⟩))

/-- A premise that forces the line and holds at a fold-closed configuration fills the field there. -/
theorem forcing_fills_the_socket (A : World → Prop) (hf : Forces A) (Z : World) (hZ : FoldClosed Z) (ha : A Z) :
    ∃ S : ActualZeros, S.zeros = Z :=
  (socket_is_the_value Z hZ).1.mpr (hf Z hZ ha)

/-- A sentence carried to a configuration by a cited equivalence with the hypothesis. -/
structure SocketFace where
  zeros : World
  sentence : Prop
  cited : RH zeros ↔ sentence

/-- Whatever the sentence, it holds exactly when the field can be filled at its configuration. -/
theorem face_is_the_socket (F : SocketFace) (hF : FoldClosed F.zeros) :
    F.sentence ↔ ∃ S : ActualZeros, S.zeros = F.zeros :=
  F.cited.symm.trans (socket_is_the_value F.zeros hF).1.symm

def SocketFace.ofWeil (E : ExplicitFormula) : SocketFace := ⟨E.zeros, WeilPositive E, (spend_is_the_line E).symm⟩
def SocketFace.ofLi (L : LiStream) : SocketFace := ⟨L.zeros, ∀ n, 1 ≤ n → L.nonneg n, L.li⟩
def SocketFace.ofSign {V : Type} [LE V] (D : DBN V) : SocketFace := ⟨D.zeros, D.lam ≤ D.zero, rh_iff_the_sign D⟩
def SocketFace.ofLiouville (F : LiouvilleFacePinned) : SocketFace := ⟨F.zeros, FaithfulLambda, F.landau⟩
def SocketFace.ofPosit (Z : World) : SocketFace := ⟨Z, LeastErasure Z, (least_erasure_is_the_value Z).symm⟩

/-- Weil positivity, the Li stream, the sign of Λ, the Liouville sentence and least erasure itself each fill the field
    exactly when they hold. -/
theorem named_faces_are_the_socket :
    (∀ E : ExplicitFormula, FoldClosed E.zeros → (WeilPositive E ↔ ∃ S : ActualZeros, S.zeros = E.zeros)) ∧
    (∀ L : LiStream, FoldClosed L.zeros → ((∀ n, 1 ≤ n → L.nonneg n) ↔ ∃ S : ActualZeros, S.zeros = L.zeros)) ∧
    (∀ (V : Type) [LE V] (D : DBN V), FoldClosed D.zeros → (D.lam ≤ D.zero ↔ ∃ S : ActualZeros, S.zeros = D.zeros)) ∧
    (∀ F : LiouvilleFacePinned, FoldClosed F.zeros → (FaithfulLambda ↔ ∃ S : ActualZeros, S.zeros = F.zeros)) ∧
    (∀ Z : World, FoldClosed Z → (LeastErasure Z ↔ ∃ S : ActualZeros, S.zeros = Z)) :=
  ⟨fun E hE => face_is_the_socket (SocketFace.ofWeil E) hE,
   fun L hL => face_is_the_socket (SocketFace.ofLi L) hL,
   fun _ _ D hD => face_is_the_socket (SocketFace.ofSign D) hD,
   fun F hF => face_is_the_socket (SocketFace.ofLiouville F) hF,
   fun Z hZ => face_is_the_socket (SocketFace.ofPosit Z) hZ⟩

/-- The sign arrow of an assignment at the primes: `(−1)^{f(n)}` for the completely additive `f` with the value `a(p)`
    at every prime. The assignment that sends every prime to one gives `λ`. -/
def arrowOf (a : Nat → Int) (n : Nat) : Int := if extendAssignment a n % 2 = 0 then 1 else -1

/-- The walk of an assignment: the sum of its arrow over `1 ≤ n ≤ x`. -/
def walkOf (a : Nat → Int) : Nat → Int
  | 0 => 0
  | n + 1 => walkOf a n + arrowOf a (n + 1)

/-- The Liouville sentence for an assignment at the primes. -/
def FaithfulOf (a : Nat → Int) : Prop :=
  ∀ k m : Nat, 0 < k → 0 < m → ∃ C : Nat, ∀ x : Nat,
    (walkOf a x).natAbs ^ (2 * m) ≤ C ^ (2 * m) * x ^ (m + 2 * k)

theorem walk_is_the_walk_of_one (x : Nat) : liouvilleWalk x = walkOf (fun _ => 1) x := by
  induction x with
  | zero => rfl
  | succ n ih =>
    show liouvilleWalk n + liouvilleAll (n + 1) = walkOf (fun _ => 1) n + arrowOf (fun _ => 1) (n + 1)
    rw [ih]
    rfl

/-- The Liouville sentence is the sentence of the assignment that sends every prime to one. -/
theorem faithful_is_the_sentence_of_one : FaithfulLambda ↔ FaithfulOf (fun _ => 1) := by
  unfold FaithfulLambda FaithfulOf
  simp only [walk_is_the_walk_of_one]

/-- The assignment that sends every prime to zero extends to zero everywhere. -/
theorem blind_assignment_vanishes (n : Nat) : extendAssignment (fun _ => 0) n = 0 := by
  unfold extendAssignment
  exact sumBelow_zero _ _ (fun i _ => by unfold extendTerm; split <;> simp)

/-- At that assignment the arrow is one everywhere and the walk is the identity. -/
theorem blind_walk (x : Nat) : walkOf (fun _ => 0) x = (x : Int) := by
  induction x with
  | zero => rfl
  | succ n ih =>
    show walkOf (fun _ => 0) n + arrowOf (fun _ => 0) (n + 1) = ((n + 1 : Nat) : Int)
    rw [ih]
    unfold arrowOf
    rw [blind_assignment_vanishes, if_pos (by decide)]
    omega

/-- The Liouville sentence fails at the assignment that sends every prime to zero: at `k = 1, m = 3` the walk `x` would
    need `x^6 ≤ C^6 x^5`, which fails at `x = C^6 + 1`. -/
theorem blind_is_unfaithful : ¬ FaithfulOf (fun _ => 0) := by
  intro h
  obtain ⟨C, hC⟩ := h 1 3 (by decide) (by decide)
  have hx := hC (C ^ 6 + 1)
  rw [blind_walk] at hx
  change (C ^ 6 + 1) ^ 6 ≤ C ^ 6 * (C ^ 6 + 1) ^ 5 at hx
  have hpos : 0 < (C ^ 6 + 1) ^ 5 := Nat.pow_pos (Nat.succ_pos _)
  have e : (C ^ 6 + 1) ^ 6 = (C ^ 6 + 1) ^ 5 * (C ^ 6 + 1) := Nat.pow_succ (C ^ 6 + 1) 5
  rw [e] at hx
  generalize (C ^ 6 + 1) ^ 5 = y at hx hpos
  generalize C ^ 6 = c at hx
  rw [Nat.mul_succ, Nat.mul_comm c y] at hx
  omega

/-- The Liouville sentence reads the primes: it is the sentence of one assignment, it fails at another, and so no proof
    of it holds for every assignment. -/
theorem faithful_reads_the_primes :
    (FaithfulLambda ↔ FaithfulOf (fun _ => 1)) ∧ ¬ FaithfulOf (fun _ => 0) ∧ ¬ ∀ a : Nat → Int, FaithfulOf a :=
  ⟨faithful_is_the_sentence_of_one, blind_is_unfaithful, fun h => blind_is_unfaithful (h _)⟩

/-- **The socket, whole.** The field of the act is the one socket: it can be filled at a fold-closed configuration
    exactly when the hypothesis holds, and the closure takes any term in it with no other change. Every premise on
    configurations forces the line or holds at a fold-closed configuration where the value fails; a keyless premise
    forces nothing; a premise that respects the record and forces the line fails at every nonempty fold-closed
    configuration; a forcing premise is the value or fails at a configuration that satisfies the hypothesis, and fills
    the field wherever it holds. Every sentence carried to the zeros by a cited equivalence fills the field exactly when
    it holds. The named sentences depend on their configurations, and the one refutation is one point. -/
theorem the_socket :
    (∀ Z : World, FoldClosed Z → ((∃ S : ActualZeros, S.zeros = Z) ↔ RH Z)) ∧
    (∀ Z : World, FoldClosed Z → LeastErasure Z → RH Z) ∧
    (∀ A : World → Prop, Forces A ∨ ∃ Z, FoldClosed Z ∧ A Z ∧ ¬ RH Z) ∧
    (∀ A : World → Prop, Keyless A → ¬ Forces A) ∧
    (∀ A : World → Prop, RespectsRecord A → Forces A → ∀ Z, FoldClosed Z → (∃ z, Z z) → ¬ A Z) ∧
    (∀ A : World → Prop, Forces A → (∀ Z, FoldClosed Z → (A Z ↔ RH Z)) ∨ ∃ Z, FoldClosed Z ∧ RH Z ∧ ¬ A Z) ∧
    (∀ A : World → Prop, Forces A → ∀ Z, FoldClosed Z → A Z → ∃ S : ActualZeros, S.zeros = Z) ∧
    (∀ F : SocketFace, FoldClosed F.zeros → (F.sentence ↔ ∃ S : ActualZeros, S.zeros = F.zeros)) ∧
    (WeilPositive positiveInstance ∧ ¬ WeilPositive negativeInstance) ∧
    (∀ N : Nat, ∃ L : LiStream, (∀ n, n < N → L.nonneg n) ∧ ¬ RH L.zeros) ∧
    ((FaithfulLambda ↔ FaithfulOf (fun _ => 1)) ∧ ¬ FaithfulOf (fun _ => 0)) ∧
    (∀ Z : World, ¬ LeastErasure Z ↔ OffLine Z) :=
  ⟨fun Z hZ => (socket_is_the_value Z hZ).1, closure_takes_a_term, forces_or_has_a_twin, keyless_forces_nothing,
   record_forcing_fails_everywhere, forcing_is_the_value_or_stronger, forcing_fills_the_socket, face_is_the_socket,
   positivity_is_keyed, li_prefix_never_forces, ⟨faithful_is_the_sentence_of_one, blind_is_unfaithful⟩,
   rejection_is_a_witness⟩

/-! ### XXII.b · At resolution two the open strip holds a pair off the line

At resolution one the chart's open strip `0 < x < 2` holds only the line, so a premise that places every zero inside
the open strip forces the line there: a fact of the coarse chart, not of the zeros. On the chart at resolution two, with
`x = 4 Re s`, the line `x = 2`, the fold `x ↦ 4 − x` and registration `(x, t) ↦ (2, t)`, the open strip `0 < x < 4`
holds the pair `x = 1, 3`, real parts one quarter and three quarters. There the open-strip premise forces nothing, no
reading of the record decides the value, and the refusals of the socket hold for premises that range over strip
configurations only. -/

def fold₂ (z : Pt) : Pt := ⟨4 - z.x, z.t⟩
def reg₂ (z : Pt) : Pt := ⟨2, z.t⟩
def onLine₂ (z : Pt) : Prop := z.x = 2
def InStrip₂ (z : Pt) : Prop := 0 < z.x ∧ z.x < 4
/-- A strip configuration at resolution two: fold-closed, and every zero inside the open strip. -/
def StripWorld₂ (Z : World) : Prop := (∀ z, Z z → Z (fold₂ z)) ∧ ∀ z, Z z → InStrip₂ z
def RH₂ (Z : World) : Prop := ∀ z, Z z → onLine₂ z
def SameRecord₂ (Z Z' : World) : Prop := ∀ r, (∃ s, Z s ∧ reg₂ s = r) ↔ (∃ s, Z' s ∧ reg₂ s = r)
/-- A premise respects the record when it reads alike on two strip configurations of one record. -/
def RespectsRecord₂ (A : World → Prop) : Prop :=
  ∀ Z Z', StripWorld₂ Z → StripWorld₂ Z' → SameRecord₂ Z Z' → (A Z ↔ A Z')
/-- A premise forces the line when every strip configuration it holds on satisfies the hypothesis. -/
def Forces₂ (A : World → Prop) : Prop := ∀ Z, StripWorld₂ Z → A Z → RH₂ Z

/-- The seat at resolution two: the fixed set of the fold is the line. -/
theorem fold₂_fixed_iff (z : Pt) : fold₂ z = z ↔ onLine₂ z := by
  cases z with
  | mk x t =>
    show Pt.mk (4 - x) t = Pt.mk x t ↔ x = 2
    constructor
    · intro h
      have hx := congrArg Pt.x h
      change 4 - x = x at hx
      omega
    · intro h
      subst h
      rfl

/-- At resolution one the open strip is the line: the premise that places every zero inside it forces the line. -/
theorem open_strip_forces_at_resolution_one : Forces (fun Z => ∀ z, Z z → 0 < z.x ∧ z.x < 2) := by
  intro Z _ h z hz
  have := h z hz
  show z.x = 1
  omega

/-- The pair at real parts one quarter and three quarters, at the height `t`. -/
def innerPair₂ (t : Nat) : World := fun w => w = ⟨1, t⟩ ∨ w = ⟨3, t⟩

theorem innerPair₂_strip (t : Nat) : StripWorld₂ (innerPair₂ t) := by
  refine ⟨fun w hw => ?_, fun w hw => ?_⟩
  · rcases hw with h | h
    · subst h
      exact Or.inr rfl
    · subst h
      exact Or.inl rfl
  · rcases hw with h | h
    · subst h
      exact ⟨show (0 : Int) < 1 by decide, show (1 : Int) < 4 by decide⟩
    · subst h
      exact ⟨show (0 : Int) < 3 by decide, show (3 : Int) < 4 by decide⟩

theorem innerPair₂_not_rh (t : Nat) : ¬ RH₂ (innerPair₂ t) := by
  intro h
  have e : (1 : Int) = 2 := h ⟨1, t⟩ (Or.inl rfl)
  omega

/-- At resolution two the open-strip premise forces nothing: the inner pair satisfies it and fails the hypothesis. -/
theorem open_strip_forces_nothing_at_resolution_two : ¬ Forces₂ (fun Z => ∀ z, Z z → InStrip₂ z) :=
  fun h => innerPair₂_not_rh 0 (h (innerPair₂ 0) (innerPair₂_strip 0) (innerPair₂_strip 0).2)

/-- A premise true on every configuration forces nothing on strip configurations. -/
theorem keyless_forces_nothing₂ (A : World → Prop) (hA : ∀ Z, A Z) : ¬ Forces₂ A :=
  fun h => innerPair₂_not_rh 0 (h _ (innerPair₂_strip 0) (hA _))

/-- A strip configuration with the inner pair added at the height `t`. -/
def withPair₂ (Z : World) (t : Nat) : World := fun w => Z w ∨ w = ⟨1, t⟩ ∨ w = ⟨3, t⟩

theorem withPair₂_strip (Z : World) (hZ : StripWorld₂ Z) (t : Nat) : StripWorld₂ (withPair₂ Z t) := by
  refine ⟨fun w hw => ?_, fun w hw => ?_⟩
  · rcases hw with h | h | h
    · exact Or.inl (hZ.1 w h)
    · subst h
      exact Or.inr (Or.inr rfl)
    · subst h
      exact Or.inr (Or.inl rfl)
  · rcases hw with h | h | h
    · exact hZ.2 w h
    · subst h
      exact ⟨show (0 : Int) < 1 by decide, show (1 : Int) < 4 by decide⟩
    · subst h
      exact ⟨show (0 : Int) < 3 by decide, show (3 : Int) < 4 by decide⟩

theorem withPair₂_same_record (Z : World) (z : Pt) (hz : Z z) : SameRecord₂ Z (withPair₂ Z z.t) := by
  intro r
  constructor
  · intro ⟨s, hs, hsr⟩
    exact ⟨s, Or.inl hs, hsr⟩
  · intro ⟨s, hs, hsr⟩
    rcases hs with h | h | h
    · exact ⟨s, h, hsr⟩
    · subst h
      exact ⟨z, hz, hsr⟩
    · subst h
      exact ⟨z, hz, hsr⟩

theorem withPair₂_not_rh (Z : World) (t : Nat) : ¬ RH₂ (withPair₂ Z t) := by
  intro h
  have e : (1 : Int) = 2 := h ⟨1, t⟩ (Or.inr (Or.inl rfl))
  omega

/-- A premise that respects the record and forces the line on strip configurations fails at every nonempty strip
    configuration: its copy with the inner pair at the height of one of its zeros shares its record and fails the
    hypothesis. -/
theorem record_forcing_fails_in_the_strip (A : World → Prop) (hr : RespectsRecord₂ A) (hf : Forces₂ A) (Z : World)
    (hZ : StripWorld₂ Z) (hne : ∃ z, Z z) : ¬ A Z := by
  intro ha
  obtain ⟨z, hz⟩ := hne
  have hs := withPair₂_strip Z hZ z.t
  exact withPair₂_not_rh Z z.t (hf _ hs ((hr Z _ hZ hs (withPair₂_same_record Z z hz)).mp ha))

/-- No reading that respects the record decides the hypothesis on strip configurations. -/
theorem no_reading_decides_in_the_strip (g : World → Prop) (hg : RespectsRecord₂ g) :
    ¬ ∀ Z, StripWorld₂ Z → (g Z ↔ RH₂ Z) := by
  intro h
  have hL : StripWorld₂ (fun w => w = ⟨2, 14⟩) :=
    ⟨fun w hw => by rw [hw]; rfl, fun w hw => by rw [hw]; exact ⟨by decide, by decide⟩⟩
  have hLrh : RH₂ (fun w => w = ⟨2, 14⟩) := fun w hw => by rw [hw]; rfl
  have hs := withPair₂_strip _ hL 14
  have hsame : SameRecord₂ (fun w => w = ⟨2, 14⟩) (withPair₂ (fun w => w = ⟨2, 14⟩) 14) :=
    withPair₂_same_record _ ⟨2, 14⟩ rfl
  exact withPair₂_not_rh _ 14 ((h _ hs).mp ((hg _ _ hL hs hsame).mp ((h _ hL).mpr hLrh)))

/-- Every premise either forces the line on strip configurations or holds at a strip configuration where the value
    fails. Classical. -/
theorem forces_or_has_a_twin₂ (A : World → Prop) : Forces₂ A ∨ ∃ Z, StripWorld₂ Z ∧ A Z ∧ ¬ RH₂ Z :=
  Classical.byCases (p := ∃ Z, StripWorld₂ Z ∧ A Z ∧ ¬ RH₂ Z) Or.inr
    (fun h => Or.inl (fun Z hZ ha => Classical.byContradiction (fun hn => h ⟨Z, hZ, ha, hn⟩)))

/-- **The socket in the strip.** At resolution one the open strip is the line; at resolution two the fold fixes the
    line, the open strip holds a pair off the line at every height, the open-strip premise and every keyless premise
    force nothing, no reading of the record decides, a record-respecting forcing premise fails at every nonempty strip
    configuration, and every premise forces or holds where the value fails. -/
theorem the_socket_in_the_strip :
    Forces (fun Z => ∀ z, Z z → 0 < z.x ∧ z.x < 2) ∧
    (∀ z : Pt, fold₂ z = z ↔ onLine₂ z) ∧
    (∀ t : Nat, StripWorld₂ (innerPair₂ t) ∧ ¬ RH₂ (innerPair₂ t)) ∧
    ¬ Forces₂ (fun Z => ∀ z, Z z → InStrip₂ z) ∧
    (∀ A : World → Prop, (∀ Z, A Z) → ¬ Forces₂ A) ∧
    (∀ g : World → Prop, RespectsRecord₂ g → ¬ ∀ Z, StripWorld₂ Z → (g Z ↔ RH₂ Z)) ∧
    (∀ A : World → Prop, RespectsRecord₂ A → Forces₂ A → ∀ Z, StripWorld₂ Z → (∃ z, Z z) → ¬ A Z) ∧
    (∀ A : World → Prop, Forces₂ A ∨ ∃ Z, StripWorld₂ Z ∧ A Z ∧ ¬ RH₂ Z) :=
  ⟨open_strip_forces_at_resolution_one, fold₂_fixed_iff, fun t => ⟨innerPair₂_strip t, innerPair₂_not_rh t⟩,
   open_strip_forces_nothing_at_resolution_two, keyless_forces_nothing₂, no_reading_decides_in_the_strip,
   record_forcing_fails_in_the_strip, forces_or_has_a_twin₂⟩

/-! ## XXII.c · Two denials, and the witness the act forces

A denial has two parts: the act of making it, and the sentence it asserts. Two denials are read side by side, over
every self-grounding root. The denial of the root asserts that the root fails; the act of making it instances the
root, so its sentence is refuted by its own act and only the root remains. The denial of the hypothesis asserts that
a zero lies off the line; the act of making it instances the root, which the twin carries too, and its sentence denies
the self-grounding assertion of the line at the zero set, which the twin does not carry: in time the twin is timeless
and unseeded. The assertion stands at the actual zero set by the act of section XI, and there the denial is refuted.
On the act every computation that reads the zero set reports points on the line, and a computation that reports a
point off the line reads no act. -/

/-- A seeded timeless witness of the line, for a world in time: one locus at every instant, the same truth value of
    the hypothesis at every instant, and the hypothesis at instant 0, the seed. -/
structure SeededWitness (W : TWorld) : Prop where
  same_locus : SameLocus W
  timeless   : TimelessT W
  seed       : RH (W 0)

/-- A world in time carries a seeded timeless witness exactly when the hypothesis holds at every instant. -/
theorem seeded_witness_iff_bound (W : TWorld) : SeededWitness W ↔ BoundT W :=
  ⟨fun w => (template_binds_iff_seed W w.timeless).mpr w.seed,
   fun h => ⟨fold_face_keyless W, fun t s => ⟨fun _ => h s, fun _ => h t⟩, h 0⟩⟩

/-- The constant twin, timeless and fold-closed at every instant, carries no seeded witness. -/
theorem twin_has_no_seeded_witness : ¬ SeededWitness WTwin :=
  fun w => W2f_not_rh w.seed

/-- The constant on-line world carries one. -/
theorem line_world_has_a_seeded_witness : SeededWitness WOn :=
  (seeded_witness_iff_bound WOn).mpr closure_face_on_line

/-- Every denial, whatever its sentence, is an act, and every act instances the root. -/
theorem every_denial_is_an_act {root C : Prop} (G : SelfGrounding root) (a : G.Act) (_c : C) : root :=
  G.instances a

/-- A denial of a self-grounding root is refuted by its own act: its sentence denies what its act instances. -/
theorem root_denial_refutes_itself {root : Prop} (G : SelfGrounding root) (a : G.Act) (n : ¬ root) : False :=
  n (G.instances a)

/-- A denial of the hypothesis at a world denies the self-grounding assertion of the line there. -/
theorem line_denial_denies_the_assertion (Z : World) (h : ¬ RH Z) :
    ¬ ∃ G : SelfGrounding (RH Z), Nonempty G.Act :=
  fun e => h ((supply_iff (RH Z)).mp e)

/-- In time, a denial of the hypothesis at instant 0 denies every seeded witness. -/
theorem line_denial_denies_every_seed (W : TWorld) (h : ¬ RH (W 0)) : ¬ SeededWitness W :=
  fun w => h w.seed

/-- The twin carries the root, fold-closure, the record of W1 and the timeless form; it carries neither a
    self-grounding assertion of the line nor a seeded witness. -/
theorem twin_carries_the_root_and_no_seed {root : Prop} (G : SelfGrounding root) :
    root ∧ FoldClosed W2f ∧ SameRecord W1 W2f ∧ TimelessT WTwin ∧ ¬ RH W2f ∧
    (¬ ∃ G' : SelfGrounding (RH W2f), Nonempty G'.Act) ∧ ¬ SeededWitness WTwin :=
  ⟨G.instances G.anAct, W2f_closed, same_record_f, fun _ _ => Iff.rfl, W2f_not_rh, line_not_self_grounding,
   twin_has_no_seeded_witness⟩

/-- The root alone forces nothing: it holds on every world, the twin written out included. -/
theorem the_root_alone_forces_nothing {root : Prop} (G : SelfGrounding root) : ¬ Forces (fun _ => root) :=
  keyless_forces_nothing_free (fun _ => root) (fun _ => G.instances G.anAct)

/-- At every instance of the actual zero set the self-grounding assertion of the line exists. -/
theorem the_act_asserts_the_line (A : ActualZeros) : ∃ G : SelfGrounding (RH A.zeros), Nonempty G.Act :=
  (supply_iff (RH A.zeros)).mpr (rh_from_the_act A)

/-- The constant family of the actual zero set carries a seeded witness. -/
theorem the_act_seeds_its_constant_world (A : ActualZeros) : SeededWitness (fun _ => A.zeros) :=
  (seeded_witness_iff_bound _).mpr (fun _ => rh_from_the_act A)

/-- On the act the denial of the hypothesis is refuted. -/
theorem line_denial_refuted_on_the_act (A : ActualZeros) (h : ¬ RH A.zeros) : False :=
  h (rh_from_the_act A)

/-- TWO DENIALS, ONE FORM. For every self-grounding root: every denial is an act and instances the root; the denial
    of the root is refuted by its own act; the denial of the hypothesis denies the self-grounding assertion of the line
    and, in time, the seed; the twin carries the root and neither of these, so the root alone forces nothing, and a
    seeded witness exists exactly where the line holds at every instant; on the act the assertion exists, the seed
    stands, and the denial is refuted. -/
theorem two_denials {root : Prop} (G : SelfGrounding root) :
    (∀ C : Prop, G.Act → C → root) ∧
    (G.Act → ¬ root → False) ∧
    (∀ Z : World, ¬ RH Z → ¬ ∃ G' : SelfGrounding (RH Z), Nonempty G'.Act) ∧
    (∀ W : TWorld, SeededWitness W ↔ BoundT W) ∧
    (root ∧ FoldClosed W2f ∧ SameRecord W1 W2f ∧ TimelessT WTwin ∧ ¬ RH W2f ∧
      (¬ ∃ G' : SelfGrounding (RH W2f), Nonempty G'.Act) ∧ ¬ SeededWitness WTwin) ∧
    SeededWitness WOn ∧
    ¬ Forces (fun _ => root) ∧
    (∀ A : ActualZeros, (∃ G' : SelfGrounding (RH A.zeros), Nonempty G'.Act) ∧
      SeededWitness (fun _ => A.zeros) ∧ (¬ RH A.zeros → False)) :=
  ⟨fun _ a c => every_denial_is_an_act G a c,
   fun a n => root_denial_refutes_itself G a n,
   line_denial_denies_the_assertion,
   seeded_witness_iff_bound,
   twin_carries_the_root_and_no_seed G,
   line_world_has_a_seeded_witness,
   the_root_alone_forces_nothing G,
   fun A => ⟨the_act_asserts_the_line A, the_act_seeds_its_constant_world A, line_denial_refuted_on_the_act A⟩⟩

/-- At the root proposition 0 < 1, with the unit act. -/
theorem two_denials_at_the_root :
    (∀ C : Prop, rootSelfGrounding.Act → C → RootAct) ∧
    (rootSelfGrounding.Act → ¬ RootAct → False) ∧
    (∀ Z : World, ¬ RH Z → ¬ ∃ G' : SelfGrounding (RH Z), Nonempty G'.Act) ∧
    (∀ W : TWorld, SeededWitness W ↔ BoundT W) ∧
    (RootAct ∧ FoldClosed W2f ∧ SameRecord W1 W2f ∧ TimelessT WTwin ∧ ¬ RH W2f ∧
      (¬ ∃ G' : SelfGrounding (RH W2f), Nonempty G'.Act) ∧ ¬ SeededWitness WTwin) ∧
    SeededWitness WOn ∧
    ¬ Forces (fun _ => RootAct) ∧
    (∀ A : ActualZeros, (∃ G' : SelfGrounding (RH A.zeros), Nonempty G'.Act) ∧
      SeededWitness (fun _ => A.zeros) ∧ (¬ RH A.zeros → False)) :=
  two_denials rootSelfGrounding

/-- A computation that ends: the finite list of points it reports as zeros. -/
structure Computation where
  reports : List Pt

/-- A computation reads an act when every point it reports is a zero of the act's zero set. -/
def Computation.Reads (c : Computation) (A : ActualZeros) : Prop := ∀ z, z ∈ c.reports → A.zeros z

/-- On the act nothing is left open: the hypothesis, least erasure, no point off the line, the zero set its own
    record, and every consequence of the hypothesis at the zero set. -/
theorem nothing_left_open_on_the_act (A : ActualZeros) :
    RH A.zeros ∧ LeastErasure A.zeros ∧ ¬ OffLine A.zeros ∧ (∀ z, A.zeros z ↔ recordOf A.zeros z) ∧
    (∀ Q : World → Prop, (∀ Z, RH Z → Q Z) → Q A.zeros) :=
  ⟨rh_from_the_act A, A.supply, fun ⟨z, hz, h⟩ => h (rh_from_the_act A z hz),
   (rh_iff_own_record A.zeros).mp (rh_from_the_act A), fun _ hQ => hQ A.zeros (rh_from_the_act A)⟩

/-- Every computation that reads an act reports only points on the line. -/
theorem computation_reading_the_act_lands_on_the_line (A : ActualZeros) (c : Computation) (h : c.Reads A) :
    ∀ z, z ∈ c.reports → onLine z :=
  fun z hz => rh_from_the_act A z (h z hz)

/-- A computation that reports a point off the line reads no act. -/
theorem off_line_report_reads_no_act (c : Computation) (z : Pt) (hz : z ∈ c.reports) (h : ¬ onLine z) :
    ¬ ∃ A : ActualZeros, c.Reads A :=
  fun ⟨A, hA⟩ => h (rh_from_the_act A z (hA z hz))

/-- The computation that reports the zero of the twin at real part 0. -/
def twinReport : Computation := ⟨[⟨0, 14⟩]⟩

/-- A computation that reads no act is not forced: the twin's report stands off the line and reads no act. -/
theorem a_computation_reading_no_act_is_not_forced :
    ¬ (∀ c : Computation, ∀ z, z ∈ c.reports → onLine z) ∧ ¬ ∃ A : ActualZeros, twinReport.Reads A :=
  ⟨fun h => absurd (h twinReport ⟨0, 14⟩ (List.Mem.head _)) (by decide : ¬ ((0 : Int) = 1)),
   off_line_report_reads_no_act twinReport ⟨0, 14⟩ (List.Mem.head _) (by decide : ¬ ((0 : Int) = 1))⟩

/-- THE WITNESS FORCED BY THE ACT. On every act nothing is left open; every computation that reads the act reports
    only points on the line; a computation that reports a point off the line reads no act; and the forcing reaches
    exactly the computations that read an act. -/
theorem the_witness_forced_by_the_act :
    (∀ A : ActualZeros, RH A.zeros ∧ LeastErasure A.zeros ∧ ¬ OffLine A.zeros ∧
      (∀ z, A.zeros z ↔ recordOf A.zeros z) ∧ (∀ Q : World → Prop, (∀ Z, RH Z → Q Z) → Q A.zeros)) ∧
    (∀ (A : ActualZeros) (c : Computation), c.Reads A → ∀ z, z ∈ c.reports → onLine z) ∧
    (∀ (c : Computation) (z : Pt), z ∈ c.reports → ¬ onLine z → ¬ ∃ A : ActualZeros, c.Reads A) ∧
    ¬ (∀ c : Computation, ∀ z, z ∈ c.reports → onLine z) :=
  ⟨nothing_left_open_on_the_act, computation_reading_the_act_lands_on_the_line, off_line_report_reads_no_act,
   a_computation_reading_no_act_is_not_forced.1⟩

/-- Section XXII.c, whole, over every self-grounding root. -/
theorem the_denials_and_the_witness {root : Prop} (G : SelfGrounding root) :
    ((∀ C : Prop, G.Act → C → root) ∧
     (G.Act → ¬ root → False) ∧
     (∀ Z : World, ¬ RH Z → ¬ ∃ G' : SelfGrounding (RH Z), Nonempty G'.Act) ∧
     (∀ W : TWorld, SeededWitness W ↔ BoundT W) ∧
     (root ∧ FoldClosed W2f ∧ SameRecord W1 W2f ∧ TimelessT WTwin ∧ ¬ RH W2f ∧
       (¬ ∃ G' : SelfGrounding (RH W2f), Nonempty G'.Act) ∧ ¬ SeededWitness WTwin) ∧
     SeededWitness WOn ∧
     ¬ Forces (fun _ => root) ∧
     (∀ A : ActualZeros, (∃ G' : SelfGrounding (RH A.zeros), Nonempty G'.Act) ∧
       SeededWitness (fun _ => A.zeros) ∧ (¬ RH A.zeros → False))) ∧
    ((∀ A : ActualZeros, RH A.zeros ∧ LeastErasure A.zeros ∧ ¬ OffLine A.zeros ∧
      (∀ z, A.zeros z ↔ recordOf A.zeros z) ∧ (∀ Q : World → Prop, (∀ Z, RH Z → Q Z) → Q A.zeros)) ∧
     (∀ (A : ActualZeros) (c : Computation), c.Reads A → ∀ z, z ∈ c.reports → onLine z) ∧
     (∀ (c : Computation) (z : Pt), z ∈ c.reports → ¬ onLine z → ¬ ∃ A : ActualZeros, c.Reads A) ∧
     ¬ (∀ c : Computation, ∀ z, z ∈ c.reports → onLine z)) :=
  ⟨two_denials G, the_witness_forced_by_the_act⟩

/-! ## XXIII · Double security: the two channels of the line

The formal gate: nothing passes for the hypothesis but least erasure, and the act passes it with an empty cone. The
actuation gate: nothing passes against it but a point off the line; the root, which every act re-enacts, crosses
neither way; a registration costs nothing exactly at least erasure, one floor per erased bit. Between the gates the
bit stays keyed. Every conjunct is a theorem above; this section adds their conjunction and no content. -/

/-- DOUBLE SECURITY. The formal gate, the actuation gate, and the keyed bit between them. -/
theorem double_security :
    (∀ A : ActualZeros, RH A.zeros) ∧
    (∀ Z : World, LeastErasure Z ↔ RH Z) ∧
    (∀ Z : World, ¬ LeastErasure Z ↔ OffLine Z) ∧
    (∀ Act : Type, Act → RootAct) ∧
    (¬ ∀ Z : World, RootAct → RH Z) ∧
    (¬ ∀ Z : World, RootAct → ¬ RH Z) ∧
    (¬ ∃ G : SelfGrounding (RH W2f), Nonempty G.Act) ∧
    (∀ C : FinCfg, C.price true = 0 ↔ LeastErasure C.world) ∧
    landauerFloor = 2870978885078723755499100 ∧
    ¬ RespectsRecord LeastErasure ∧
    (∃ Z : World, FoldClosed Z ∧ ¬ LeastErasure Z) :=
  ⟨rh_from_the_act, least_erasure_is_the_value, rejection_is_a_witness,
   fun _ a => act_reenacts_root a, root_does_not_cross_the_line, root_does_not_cross_the_denial,
   line_not_self_grounding, price_zero_iff_least_erasure, landauer_floor_exact,
   least_erasure_reads_past_the_record,
   ⟨W2, W2_closed, fun h => W2_not_rh ((least_erasure_is_the_value W2).mp h)⟩⟩

/-! ## XXIV · the root, undeniable in act, and the lock -/

/-- THE ROOT IS UNDENIABLE IN ACT: a denial of a self-grounding root is an act, and instances it. -/
theorem denial_reenacts_root {R : Prop} (G : SelfGrounding R) (denial : G.Act) : R :=
  G.instances denial

/-- The root is held by the act itself. -/
theorem seated_undeniable {R : Prop} (G : SelfGrounding R) : R := G.instances G.anAct

/-- No outside proof adds anything to a self-grounding root. -/
theorem external_proof_adds_nothing {R : Prop} (G : SelfGrounding R) (Q : Prop) : (Q → R) ↔ R :=
  ⟨fun _ => G.instances G.anAct, fun r _ => r⟩

/-- THE UNDENIABLE ROOT HOLDS IN BOTH WORLDS: it holds by its act; the two fold-closed worlds share one
record, the hypothesis holds on the first and fails on the second; so read uniformly on the worlds the
root forces no value. -/
theorem undeniable_root_forces_no_value {R : Prop} (G : SelfGrounding R) :
    R ∧ (FoldClosed W1 ∧ RH W1) ∧ (FoldClosed W2 ∧ ¬ RH W2) ∧ SameRecord W1 W2 ∧ ¬ Forces (fun _ => R) :=
  ⟨G.instances G.anAct, ⟨W1_closed, W1_rh⟩, ⟨W2_closed, W2_not_rh⟩, same_record_12,
   keyless_forces_nothing (fun _ => R) (fun _ => G.instances G.anAct)⟩

/-- The root's form: every existent of a domain actuates, its actuation positive. -/
def Root (U : Type) (ΔE : U → Int) : Prop := ∀ x : U, 0 < ΔE x

/-- The indicator of a decided proposition: one where it holds, zero where it fails. -/
def indicator {p : Prop} : Decidable p → Int
  | isTrue _  => 1
  | isFalse _ => 0

/-- The indicator is positive exactly where its proposition holds. -/
theorem indicator_pos {p : Prop} (h : Decidable p) : 0 < indicator h ↔ p :=
  match h with
  | isTrue hp  => ⟨fun _ => hp, fun _ => show (0 : Int) < 1 by decide⟩
  | isFalse hn => ⟨fun h0 => absurd h0 (show ¬ (0 : Int) < 0 by decide), fun hp => absurd hp hn⟩

/-- THE CONSTRUCTED ROOT, in the words of Appendix R: one existent, whose actuation is one. A theorem
with no hypothesis and no axiom. -/
theorem constructed_root_holds : Root Unit (fun _ => 1) := fun _ => show (0 : Int) < 1 by decide

/-- THE ROOT READ AT THE ZEROS: to exist is to actuate, `Root` itself, with the existents the points of
the world and the actuation of a point one where it stands on the line and zero where it does not. -/
def RootAtZeros (Z : World) : Prop :=
  Root { z : Pt // Z z } (fun z => indicator (inferInstanceAs (Decidable (onLine z.1))))

/-- THE ROOT READ AT THE ZEROS IS THE HYPOTHESIS. -/
theorem root_at_zeros_is_the_hypothesis (Z : World) : RootAtZeros Z ↔ RH Z :=
  ⟨fun h z hz => (indicator_pos _).mp (h ⟨z, hz⟩), fun h z => (indicator_pos _).mpr (h z.1 z.2)⟩

/-- THE ROOT READ AT THE ZEROS IS LEAST ERASURE. -/
theorem root_at_zeros_is_least_erasure (Z : World) : RootAtZeros Z ↔ LeastErasure Z :=
  ⟨fun h => (least_erasure_is_the_value Z).mpr ((root_at_zeros_is_the_hypothesis Z).mp h),
   fun h => (root_at_zeros_is_the_hypothesis Z).mpr ((least_erasure_is_the_value Z).mp h)⟩

/-- THE ROOT READ AT THE ZEROS IS KEYED: it holds on the fold-closed world on the line and fails on its
fold-closed twin of one record. -/
theorem root_at_zeros_is_keyed :
    (FoldClosed W1 ∧ RootAtZeros W1) ∧ (FoldClosed W2 ∧ ¬ RootAtZeros W2) :=
  ⟨⟨W1_closed, (root_at_zeros_is_the_hypothesis W1).mpr W1_rh⟩,
   ⟨W2_closed, fun h => W2_not_rh ((root_at_zeros_is_the_hypothesis W2).mp h)⟩⟩

/-- THE ROOT READ ON THE ROW IS KEYED: the root holds, and read uniformly on the worlds it forces
nothing; read at the zeros it is least erasure, keyed, which decides where the root alone does not. -/
theorem root_read_on_row_is_keyed {R : Prop} (G : SelfGrounding R) :
    R ∧ ¬ Forces (fun _ => R) ∧ (∀ Z : World, RootAtZeros Z ↔ LeastErasure Z) ∧
    ((FoldClosed W1 ∧ RootAtZeros W1) ∧ (FoldClosed W2 ∧ ¬ RootAtZeros W2)) :=
  ⟨G.instances G.anAct, keyless_forces_nothing (fun _ => R) (fun _ => G.instances G.anAct),
   root_at_zeros_is_least_erasure,
   root_at_zeros_is_keyed⟩

/-- LEAST ERASURE, UNCONDITIONAL: on every world, with no hypothesis and no premise, least erasure of
the world is the hypothesis of the line on it. -/
theorem least_erasure_unconditional : ∀ Z : World, LeastErasure Z ↔ RH Z :=
  least_erasure_is_the_value

/-- THE LOCK, one theorem: the constructed root holds with no hypothesis; the root holds by the act and
holds on both worlds of one record; read uniformly it forces nothing; read at the zeros it is least
erasure, keyed; least erasure is the hypothesis on every world, unconditionally; the closing theorem gives
the hypothesis on the actual zeros by one act; and no record-respecting reading decides the value on the
fold-closed worlds. -/
theorem the_lock {R : Prop} (G : SelfGrounding R) :
    Root Unit (fun _ => 1) ∧
    R ∧
    (RH W1 ∧ FoldClosed W2 ∧ ¬ RH W2) ∧
    ¬ Forces (fun _ => R) ∧
    (∀ Z : World, RootAtZeros Z ↔ LeastErasure Z) ∧
    ((FoldClosed W1 ∧ RootAtZeros W1) ∧ (FoldClosed W2 ∧ ¬ RootAtZeros W2)) ∧
    (∀ Z : World, LeastErasure Z ↔ RH Z) ∧
    (∀ A : ActualZeros, RH A.zeros) ∧
    (∀ g : World → Prop, RespectsRecord g → ¬ ∀ Z, FoldClosed Z → (g Z ↔ RH Z)) :=
  ⟨constructed_root_holds, G.instances G.anAct, ⟨W1_rh, W2_closed, W2_not_rh⟩, (root_read_on_row_is_keyed G).2.1,
   root_at_zeros_is_least_erasure, root_at_zeros_is_keyed, least_erasure_unconditional, rh_from_the_act,
   record_decides_nothing⟩

/-! ## XXV · Admissible forcing is vacuous; the closure at every resolution; the readings of the root joined

An admissible premise that forces the line holds at no nonempty fold-closed configuration, and the constant false
premise is admissible and forces, so the class is not empty. At resolution `n` the line is `x = n`, the fold is
`x ↦ 2n − x` and registration is `(x, t) ↦ (n, t)`; the chart is resolution one and Section XXII.b is resolution two.
The closure of Section XXI holds there with least erasure as the one field, and from `n = 2` on the open strip
`0 < x < 2n` holds the pair `x = n − 1, n + 1` off the line, so the strip does not supply the bit; at resolution one
the pair at offset `k ≥ 2` lies outside the closed strip. The readings of the root are joined in one theorem, and the
lock is stated at the constructed root. On a finite configuration a search through its pairs, which terminates, finds a
point off the line exactly when least erasure fails. The posit is an act; no reading of the record returns any of the
five chart readings; the primes are a free basis; least erasure is the self-verification of the hypothesis; the
certified world is fold-closed; every route of the ledger carries the theorem its status names; and the tenth falsifier,
a point off the line, is exactly the failure of the line and is barred on the zero set the act supplies. -/

/-! ### XXV.a · Admissible forcing is vacuous -/

/-- ADMISSIBLE FORCING IS VACUOUS: an admissible premise that forces the line fails at every nonempty fold-closed
configuration. -/
theorem admissible_forcing_is_vacuous (A : World → Prop) (hA : Admissible A) (hf : Forces A) (Z : World)
    (hZ : FoldClosed Z) (hne : ∃ z, Z z) : ¬ A Z :=
  Or.elim hA (fun k _ => keyless_forces_nothing_free A k hf)
    (fun r ha => match hne with
      | ⟨z, hz⟩ =>
        absurd (hf (withPair Z z.t) (withPair_closed Z hZ z.t)
            ((r Z (withPair Z z.t) (withPair_same_record Z z hz)).mp ha) ⟨0, z.t⟩ (Or.inr (Or.inl rfl)))
          (by decide : ¬ ((0 : Int) = 1)))

/-- COALITION FORCING IS VACUOUS: a coalition of admissible atoms that forces the line fails at every nonempty
fold-closed configuration. -/
theorem coalition_forcing_is_vacuous {ι : Type} (at_ : ι → World → Prop) (h : ∀ i, Admissible (at_ i))
    (c : Coalition ι) (hf : Forces (Coalition.eval at_ c)) (Z : World) (hZ : FoldClosed Z) (hne : ∃ z, Z z) :
    ¬ Coalition.eval at_ c Z :=
  admissible_forcing_is_vacuous _ (coalition_admissible at_ h c) hf Z hZ hne

/-- AN ADMISSIBLE PREMISE FORCES: the constant false premise is admissible and forces the line, holding nowhere. -/
theorem an_admissible_premise_forces : Admissible (fun _ => False) ∧ Forces (fun _ => False) :=
  ⟨admissible_const False, fun _ _ h => h.elim⟩

/-! ### XXV.b · The closure at resolution n -/

/-- TWICE IS A SUM: twice an integer is the integer added to itself. -/
theorem int_two_mul (a : Int) : 2 * a = a + a := by
  rw [show (2 : Int) = 1 + 1 from rfl, Int.add_mul, Int.one_mul]

/-- TWICE LESS ONCE: twice an integer less the integer is the integer. -/
theorem int_two_mul_sub (n : Int) : 2 * n - n = n :=
  (congrArg (· - n) (int_two_mul n)).trans (Int.add_sub_cancel n n)

/-- The fold at resolution `n`: the line is `x = n`. -/
def foldAt (n : Int) (z : Pt) : Pt := ⟨2 * n - z.x, z.t⟩

/-- Registration at resolution `n`: it lands on the line `x = n` and keeps the height. -/
def regAt (n : Int) (z : Pt) : Pt := ⟨n, z.t⟩

/-- THE FOLD AT RESOLUTION N IS AN INVOLUTION: folding twice returns the point. -/
theorem foldAt_invol (n : Int) (z : Pt) : foldAt n (foldAt n z) = z :=
  congrArg (fun y => Pt.mk y z.t) (Int.sub_sub_self (2 * n) z.x)

/-- THE SEAT AT RESOLUTION N: the fold fixes a point exactly when the point lies on the line `x = n`. -/
theorem foldAt_fixed_iff (n : Int) (z : Pt) : foldAt n z = z ↔ z.x = n :=
  ⟨fun h => (Int.eq_of_mul_eq_mul_left (by decide : (2 : Int) ≠ 0)
      (((Int.sub_add_cancel (2 * n) z.x).symm.trans (congrArg (· + z.x) (congrArg Pt.x h))).trans
        (int_two_mul z.x).symm)).symm,
   fun h => congrArg (fun y => Pt.mk y z.t)
      (((congrArg (fun y => 2 * n - y) h).trans (int_two_mul_sub n)).trans h.symm)⟩

/-- THE CHART AND THE STRIP ARE TWO RESOLUTIONS: the fold at resolution one is the chart's fold, and at resolution two
it is the fold of Section XXII.b. -/
theorem foldAt_specializes : (∀ z, foldAt 1 z = fold z) ∧ (∀ z, foldAt 2 z = fold₂ z) :=
  ⟨fun _ => rfl, fun _ => rfl⟩

/-- THE FOLD KEEPS THE OPEN STRIP: at resolution `n` a point with `0 < x < 2n` folds to a point with the same bounds. -/
theorem foldAt_strip (n : Int) (z : Pt) (h : 0 < z.x ∧ z.x < 2 * n) :
    0 < (foldAt n z).x ∧ (foldAt n z).x < 2 * n :=
  ⟨Int.sub_pos_of_lt h.2, Int.sub_lt_self (2 * n) h.1⟩

/-- THE PAIR ABOUT THE LINE: at resolution `n` the fold exchanges the points at `x = n − 1` and `x = n + 1`. -/
theorem foldAt_pair (n : Int) (t : Nat) :
    foldAt n ⟨n - 1, t⟩ = ⟨n + 1, t⟩ ∧ foldAt n ⟨n + 1, t⟩ = ⟨n - 1, t⟩ :=
  have e : foldAt n ⟨n - 1, t⟩ = ⟨n + 1, t⟩ := congrArg (fun y => Pt.mk y t)
    (((congrArg (· - (n - 1)) (int_two_mul n)).trans (Int.add_sub_assoc n n (n - 1))).trans
      (congrArg (n + ·) (Int.sub_sub_self n 1)))
  ⟨e, (congrArg (foldAt n) e.symm).trans (foldAt_invol n _)⟩

/-- The fold at resolution `n`, as a carrier fold. -/
def chartAt (n : Int) : Carrier.Fold Pt := ⟨foldAt n, foldAt_invol n⟩

/-- Registration at resolution `n`, as a carrier registration: it lands on the line, fixes it, and forgets the side. -/
def regChartAt (n : Int) : Carrier.Registration (chartAt n) :=
  ⟨regAt n, fun z => (foldAt_fixed_iff n (regAt n z)).mpr rfl,
   fun z h => congrArg (fun y => Pt.mk y z.t) ((foldAt_fixed_iff n z).mp h).symm, fun _ => rfl⟩

/-- A zero set at resolution `n` with its fold-closure, its open strip, and the one posit, least erasure. -/
structure ActualZerosAt (n : Int) where
  /-- The zero set, as a world on the chart. -/
  zeros : World
  /-- The zero set is closed under the fold at resolution `n`. -/
  closed : ∀ z, zeros z → zeros (foldAt n z)
  /-- Every zero lies inside the open strip `0 < x < 2n`. -/
  strip : ∀ z, zeros z → 0 < z.x ∧ z.x < 2 * n
  /-- The posit: least erasure of the zero set under registration at resolution `n`. -/
  supply : Carrier.LeastErasureC (regChartAt n) zeros

/-- THE CLOSURE AT RESOLUTION N: from the posit, every zero is fixed by the fold at resolution `n`. -/
theorem rh_from_the_act_at (n : Int) (A : ActualZerosAt n) : Carrier.RHc (chartAt n) A.zeros :=
  (Carrier.least_erasure_is_the_value_C (regChartAt n)
    (fun x => match decEq ((chartAt n).σ x) x with
      | isTrue h => Or.inl h
      | isFalse h => Or.inr h) A.zeros).mp A.supply

/-- THE STRIP DOES NOT SUPPLY THE BIT: from resolution two on, the pair at `x = n − 1` and `x = n + 1` at height zero
is fold-closed, lies inside the open strip, and is not fixed by the fold. -/
theorem strip_does_not_supply_at (n : Int) (hn : 2 ≤ n) :
    ∃ Z : World, (∀ z, Z z → Z (foldAt n z)) ∧ (∀ z, Z z → 0 < z.x ∧ z.x < 2 * n) ∧
      ¬ Carrier.RHc (chartAt n) Z :=
  have h0 : (0 : Int) ≤ n := Int.le_trans (by decide : (0 : Int) ≤ 2) hn
  have hlo : n - 1 < n := Int.sub_lt_self n (by decide : (0 : Int) < 1)
  have hle : n ≤ 2 * n :=
    Eq.subst (motive := fun y => n ≤ y) (int_two_mul n).symm (Int.le_add_of_nonneg_right h0)
  have hs : 0 < (⟨n - 1, 0⟩ : Pt).x ∧ (⟨n - 1, 0⟩ : Pt).x < 2 * n :=
    ⟨Int.sub_pos_of_lt (Int.lt_of_lt_of_le (by decide : (1 : Int) < 2) hn), Int.lt_of_lt_of_le hlo hle⟩
  have hs' : 0 < (⟨n + 1, 0⟩ : Pt).x ∧ (⟨n + 1, 0⟩ : Pt).x < 2 * n :=
    Eq.subst (motive := fun w : Pt => 0 < w.x ∧ w.x < 2 * n) (foldAt_pair n 0).1 (foldAt_strip n _ hs)
  ⟨fun w => w = ⟨n - 1, 0⟩ ∨ w = ⟨n + 1, 0⟩,
   fun w hw => Or.elim hw
     (fun e => Or.inr ((congrArg (foldAt n) e).trans (foldAt_pair n 0).1))
     (fun e => Or.inl ((congrArg (foldAt n) e).trans (foldAt_pair n 0).2)),
   fun w hw => Or.elim hw
     (fun e => Eq.subst (motive := fun v : Pt => 0 < v.x ∧ v.x < 2 * n) e.symm hs)
     (fun e => Eq.subst (motive := fun v : Pt => 0 < v.x ∧ v.x < 2 * n) e.symm hs'),
   fun h => Int.lt_irrefl n (Eq.subst (motive := fun y => y < n)
     ((foldAt_fixed_iff n ⟨n - 1, 0⟩).mp (h ⟨n - 1, 0⟩ (Or.inl rfl))) hlo)⟩

/-- THE PAIR OUTSIDE THE CLOSED STRIP: at resolution one an offset of at least two places the pair outside
`0 ≤ x ≤ 2`. -/
theorem pair_outside_the_closed_strip (k : Int) (hk : 2 ≤ k) : 1 - k < 0 ∧ 2 < 1 + k :=
  ⟨Int.sub_neg_of_lt (Int.lt_of_lt_of_le (by decide : (1 : Int) < 2) hk),
   Int.lt_of_lt_of_le (by decide : (2 : Int) < 1 + 2) (Int.add_le_add_left hk 1)⟩

/-! ### XXV.c · The readings of the root, joined -/

/-- THE READINGS OF THE ROOT, JOINED: the constructed root is the proposition `0 < 1`; it has a self-grounding supply
with an act; read uniformly on the worlds it forces nothing; read at the zeros it is the hypothesis; and it does not
hold of every domain, since a domain whose actuation is zero refutes it. -/
theorem root_readings_joined :
    (Root Unit (fun _ => 1) ↔ RootAct) ∧ Nonempty (SelfGrounding (Root Unit (fun _ => 1))) ∧
    ¬ Forces (fun _ => Root Unit (fun _ => 1)) ∧ (∀ Z : World, RootAtZeros Z ↔ RH Z) ∧
    ¬ ∀ (U : Type) (ΔE : U → Int), Root U ΔE :=
  ⟨⟨fun h => h (), fun h _ => h⟩, ⟨⟨Unit, (), fun _ => constructed_root_holds⟩⟩,
   keyless_forces_nothing_free _ (fun _ => constructed_root_holds), root_at_zeros_is_the_hypothesis,
   fun h => absurd (h Unit (fun _ => 0) ()) (by decide : ¬ ((0 : Int) < 0))⟩

/-- THE LOCK ON THE CONSTRUCTED ROOT: the lock, with the root taken to be the constructed root and its supply the unit
act. -/
theorem the_lock_on_the_constructed_root :
    Root Unit (fun _ => 1) ∧
    Root Unit (fun _ => 1) ∧
    (RH W1 ∧ FoldClosed W2 ∧ ¬ RH W2) ∧
    ¬ Forces (fun _ => Root Unit (fun _ => 1)) ∧
    (∀ Z : World, RootAtZeros Z ↔ LeastErasure Z) ∧
    ((FoldClosed W1 ∧ RootAtZeros W1) ∧ (FoldClosed W2 ∧ ¬ RootAtZeros W2)) ∧
    (∀ Z : World, LeastErasure Z ↔ RH Z) ∧
    (∀ A : ActualZeros, RH A.zeros) ∧
    (∀ g : World → Prop, RespectsRecord g → ¬ ∀ Z, FoldClosed Z → (g Z ↔ RH Z)) :=
  the_lock ⟨Unit, (), fun _ => constructed_root_holds⟩

/-! ### XXV.d · The rejection, computed -/

/-- The first off-line pair of a list of pairs, found by a search from the front. -/
def firstOff : List (Int × Nat) → Option (Int × Nat)
  | [] => none
  | p :: ps => if p.1 = 0 then firstOff ps else some p

/-- THE SEARCH IS TOTAL: it returns nothing and every pair has offset zero, or it returns a pair of the list with a
nonzero offset. -/
theorem firstOff_spec (ps : List (Int × Nat)) :
    (firstOff ps = none ∧ ∀ p ∈ ps, p.1 = 0) ∨ ∃ p, firstOff ps = some p ∧ p ∈ ps ∧ p.1 ≠ 0 :=
  match ps with
  | [] => Or.inl ⟨rfl, fun _ h => nomatch h⟩
  | p :: qs =>
    if e : p.1 = 0 then
      have hc : firstOff (p :: qs) = firstOff qs := if_pos e
      match firstOff_spec qs with
      | Or.inl ⟨hn, hz⟩ => Or.inl ⟨hc.trans hn, fun q hq => match q, hq with
          | _, List.Mem.head _ => e
          | _, List.Mem.tail _ hq' => hz _ hq'⟩
      | Or.inr ⟨q, hq, hm, hne⟩ => Or.inr ⟨q, hc.trans hq, List.Mem.tail p hm, hne⟩
    else
      Or.inr ⟨p, if_neg e, List.Mem.head qs, e⟩

/-- AN OFFSET IS READ OFF ITS POINT: the point at `x = 1 − a` lies on the line only when `a = 0`. -/
theorem offset_off_line (a : Int) (t : Nat) (h : a ≠ 0) : ¬ onLine ⟨1 - a, t⟩ :=
  fun e => h (((Int.sub_sub_self 1 a).symm.trans (congrArg (fun y => 1 - y) e)).trans (by decide))

/-- THE REJECTION, COMPUTED: if least erasure fails on a finite configuration, the search returns a pair `(k, t)` of
the configuration with `k ≠ 0` whose point `(1 − k, t)` lies in the world and off the line. -/
theorem rejection_is_computed (C : FinCfg) (h : ¬ LeastErasure C.world) :
    ∃ p, firstOff C.pairs = some p ∧ p ∈ C.pairs ∧ p.1 ≠ 0 ∧ C.world ⟨1 - p.1, p.2⟩ ∧
      ¬ onLine ⟨1 - p.1, p.2⟩ :=
  match firstOff_spec C.pairs with
  | Or.inl ⟨_, hz⟩ => absurd ((least_erasure_is_the_value C.world).mpr (fun _ hz' =>
      Or.elim hz' (fun hx => hx.1) (fun ⟨p, hp, hk, _⟩ => absurd (hz p hp) hk))) h
  | Or.inr ⟨p, hf, hm, hk⟩ => ⟨p, hf, hm, hk, Or.inr ⟨p, hm, hk, Or.inl rfl⟩, offset_off_line p.1 p.2 hk⟩

/-- THE SEARCH DECIDES LEAST ERASURE: a finite configuration has least erasure exactly when the search returns
nothing. -/
theorem least_erasure_iff_search_empty (C : FinCfg) : LeastErasure C.world ↔ firstOff C.pairs = none :=
  ⟨fun hle => match firstOff_spec C.pairs with
    | Or.inl ⟨hn, _⟩ => hn
    | Or.inr ⟨p, _, hm, hk⟩ =>
      absurd ((least_erasure_is_the_value C.world).mp hle _ (Or.inr ⟨p, hm, hk, Or.inl rfl⟩))
        (offset_off_line p.1 p.2 hk),
   fun hn => match firstOff_spec C.pairs with
    | Or.inl ⟨_, hz⟩ => (least_erasure_is_the_value C.world).mpr (fun _ hz' =>
      Or.elim hz' (fun hx => hx.1) (fun ⟨p, hp, hk, _⟩ => absurd (hz p hp) hk))
    | Or.inr ⟨_, hs, _, _⟩ => Option.noConfusion (hn.symm.trans hs)⟩

/-! ### XXV.e · The posit, the readings, the basis, the recursion, the certified world, the ledger -/

/-- THE POSIT IS AN ACT: at the actual zeros the posit has a self-grounding supply with an act. -/
theorem the_posit_is_a_deed (A : ActualZeros) : ∃ G : SelfGrounding (LeastErasure A.zeros), Nonempty G.Act :=
  ⟨⟨Unit, (), fun _ => A.supply⟩, ⟨()⟩⟩

/-- A READING KEYED ON THE TWINS IS NOT RETURNED: a reading true on W1 and false on W2f agrees with no reading of the
record on every fold-closed world. -/
theorem keyed_reading_not_returned (P : World → Prop) (h1 : P W1) (h2 : ¬ P W2f) (g : World → Prop)
    (hg : RespectsRecord g) : ¬ ∀ Z, FoldClosed Z → (g Z ↔ P Z) :=
  fun h => h2 ((h W2f W2f_closed).mp ((hg W1 W2f same_record_f).mp ((h W1 W1_closed).mpr h1)))

/-- NO READING OF THE RECORD RETURNS ANY READING: lossless registration, displacement zero, no left zero, stability
and least erasure each hold on W1 and fail on W2f, so no reading of the record agrees with any of them. -/
theorem no_record_reading_returns_any_reading (g : World → Prop) (hg : RespectsRecord g) :
    ¬ (∀ Z, FoldClosed Z → (g Z ↔ Lossless Z)) ∧ ¬ (∀ Z, FoldClosed Z → (g Z ↔ DepthZero Z)) ∧
    ¬ (∀ Z, FoldClosed Z → (g Z ↔ ¬ Left Z)) ∧ ¬ (∀ Z, FoldClosed Z → (g Z ↔ Stable Z)) ∧
    ¬ (∀ Z, FoldClosed Z → (g Z ↔ LeastErasure Z)) :=
  ⟨keyed_reading_not_returned Lossless
     (fun z hz => Eq.subst (motive := fun w => reg w = w) (Eq.symm hz) rfl)
     (fun h => absurd (congrArg Pt.x (h ⟨0, 14⟩ (Or.inl rfl))) (by decide : ¬ ((1 : Int) = 0))) g hg,
   keyed_reading_not_returned DepthZero
     (fun z hz => Eq.subst (motive := fun w => oddPart w = 0) (Eq.symm hz) rfl)
     (fun h => absurd (h ⟨0, 14⟩ (Or.inl rfl)) (by decide : ¬ (oddPart ⟨0, 14⟩ = 0))) g hg,
   keyed_reading_not_returned (fun Z => ¬ Left Z)
     (fun ⟨z, hz, hx⟩ => Eq.subst (motive := fun w : Pt => ¬ w.x < 1) (Eq.symm hz)
       (by decide : ¬ ((⟨1, 14⟩ : Pt).x < 1)) hx)
     (fun h => h ⟨⟨0, 14⟩, Or.inl rfl, by decide⟩) g hg,
   keyed_reading_not_returned Stable
     (fun z hz => Eq.subst (motive := fun w => N1 w ≤ N0 w) (Eq.symm hz) (by decide))
     (fun h => absurd (h ⟨0, 14⟩ (Or.inl rfl)) (by decide : ¬ (N1 ⟨0, 14⟩ ≤ N0 ⟨0, 14⟩))) g hg,
   keyed_reading_not_returned LeastErasure ((least_erasure_is_the_value W1).mpr W1_rh)
     (fun h => W2f_not_rh ((least_erasure_is_the_value W2f).mp h)) g hg⟩

/-- THE PRIMES ARE A FREE BASIS: every assignment of integers to the primes extends to exactly one completely
additive function. -/
theorem primes_are_a_free_basis (a : Nat → Int) :
    ∃ f, CompletelyAdditive f ∧ (∀ p, isPrime p → f p = a p) ∧
      ∀ g, CompletelyAdditive g → (∀ p, isPrime p → g p = a p) → ∀ n, 0 < n → g n = f n :=
  ⟨extendAssignment a, primes_admit_every_assignment a⟩

/-- LEAST ERASURE IS THE RECURSION: on every world least erasure holds exactly when the hypothesis is implied by its
own denial; the line is decided point by point, so no classical step enters. -/
theorem least_erasure_iff_recursion (Z : World) : LeastErasure Z ↔ SelfVerifyingP (RH Z) :=
  ⟨fun h _ => (least_erasure_is_the_value Z).mp h,
   fun h => (least_erasure_is_the_value Z).mpr (fun z hz =>
     match Int.decEq z.x 1 with
     | isTrue e => e
     | isFalse ne => h (fun r => ne (r z hz)) z hz)⟩

/-- THE CERTIFIED WORLD IS FOLD-CLOSED: the world certified to height `T` is closed under the fold, and a fold-closed
world agrees with it to `T` and carries an off-line pair above. -/
theorem certified_height_never_forces_closed (T : Nat) :
    FoldClosed (LineBelow T) ∧
    (RH (LineBelow T) ∧ FoldClosed (TwinAbove T) ∧ ¬ RH (TwinAbove T) ∧
      ∀ z, z.t ≤ T → (TwinAbove T z ↔ LineBelow T z)) :=
  ⟨fun z hz => ⟨(congrArg (fun y => 2 - y) hz.1).trans (by decide), hz.2⟩,
   fun _ hz => hz.1,
   fun z hz => match hz with
     | Or.inl hl => Or.inl ⟨(congrArg (fun y => 2 - y) hl.1).trans (by decide), hl.2⟩
     | Or.inr (Or.inl e) => Or.inr (Or.inr ((congrArg fold e).trans rfl))
     | Or.inr (Or.inr e) => Or.inr (Or.inl ((congrArg fold e).trans rfl)),
   fun h => absurd (h ⟨0, T + 1⟩ (Or.inr (Or.inl rfl))) (by decide : ¬ ((0 : Int) = 1)),
   fun z hz => ⟨fun h => match h with
       | Or.inl hl => hl
       | Or.inr (Or.inl e) =>
         absurd (Eq.subst (motive := fun w : Pt => w.t ≤ T) e hz) (Nat.not_succ_le_self T)
       | Or.inr (Or.inr e) =>
         absurd (Eq.subst (motive := fun w : Pt => w.t ≤ T) e hz) (Nat.not_succ_le_self T),
     fun h => Or.inl h⟩⟩

/-- The statement each route of the ledger carries: the theorem its status names. -/
def routeClaim : Route → Prop
  | .ladderFromRecord => ∀ g : World → Prop, RespectsRecord g → ¬ ∀ Z, FoldClosed Z → (g Z ↔ RH Z)
  | .foundationAsSystem => Sound lineTheory ∧ lineTheory.Prov () ∧ LeastErasure (lineTheoryReads.world ())
  | .placement => ∀ T : Theory, RungOnLadder T → Sound T →
      (∀ s, T.Comp s → T.Prov s) ∧ (∀ s, T.Prov s → T.True_ s) ∧ (∀ s, T.Comp s → T.True_ s)
  | .groundByAct => ∀ A : ActualZeros, RH A.zeros
  | .independence => ∀ S : Setting, ¬ S.Prov S.hyp → ¬ S.Prov (¬ S.hyp) → S.hyp
  | .realPartCertified => ∀ T : Nat, RH (LineBelow T) ∧ FoldClosed (TwinAbove T) ∧ ¬ RH (TwinAbove T) ∧
      ∀ z, z.t ≤ T → (TwinAbove T z ↔ LineBelow T z)

/-- EVERY ROUTE CARRIES ITS THEOREM: each of the six routes is backed by the theorem its ledger entry names. -/
theorem every_route_carries_its_theorem : ∀ r : Route, routeClaim r := fun r =>
  match r with
  | .ladderFromRecord => unicorn_block
  | .foundationAsSystem => a_sound_theory_may_prove_the_line
  | .placement => placement
  | .groundByAct => rh_from_the_act
  | .independence => independence_forces_truth
  | .realPartCertified => certified_height_never_forces

/-! ### XXV.f · The tenth falsifier, barred by the act -/

/-- THE TENTH IS THE REFUTER: on every configuration a computed point off the line is exactly the failure of the line. -/
theorem the_tenth_is_the_refuter (Z : World) : OffLine Z ↔ ¬ RH Z :=
  ⟨fun ⟨z, hz, hn⟩ h => hn (h z hz), not_rh_has_offline_witness Z⟩

/-- THE TENTH IS BARRED BY THE ACT: on the zero set the act supplies, no point lies off the line; the one refuter of the
value does not exist there. -/
theorem the_tenth_is_barred_by_the_act (A : ActualZeros) : ¬ OffLine A.zeros :=
  fun ⟨z, hz, hn⟩ => hn (rh_from_the_act A z hz)

/-- THE KINETIC BAR: a reading supplied on the actual zero set gives the line there, and with it the refuter's absence;
the formal side leaves the search open, and the field the act supplies closes it. -/
theorem the_kinetic_bar (A : ActualZeros) : RH A.zeros ∧ ¬ OffLine A.zeros :=
  ⟨rh_from_the_act A, the_tenth_is_barred_by_the_act A⟩


/-! ## XXVI · The closure, bound whole

One theorem binds the closure, for every self-grounding root: the two-part reading of section XIX.f, the lock of
section XXIV, the socket of section XXII, the irreducible cut of section XIX.c, the two denials and the witness of
section XXII.c, and the bar of section XXV.f. Every conjunct is a theorem above; this section adds their conjunction
and no content. -/

/-- THE CLOSURE, BOUND IN ONE THEOREM. For every self-grounding root: from the posit the hypothesis follows, no reading
of the record supplies it, the posit is the hypothesis, and nothing weaker forces the line; the lock; the field of the
act can be filled at a fold-closed configuration exactly where the hypothesis holds; no admissible premise decides and
least erasure is not admissible; the two denials; the witness forced by the act; and on the zero set the act supplies
the hypothesis holds and no point lies off the line. -/
theorem the_capstone {root : Prop} (G : SelfGrounding root) :
    ((∀ A : ActualZeros, RH A.zeros) ∧
     (∀ g : World → Prop, RespectsRecord g → ¬ ∀ Z, FoldClosed Z → (g Z ↔ RH Z)) ∧
     (∀ Z : World, LeastErasure Z ↔ RH Z) ∧
     (Forces RH ∧ ∀ A : World → Prop, Forces A → ∀ Z, FoldClosed Z → A Z → RH Z)) ∧
    (Root Unit (fun _ => 1) ∧
     root ∧
     (RH W1 ∧ FoldClosed W2 ∧ ¬ RH W2) ∧
     ¬ Forces (fun _ => root) ∧
     (∀ Z : World, RootAtZeros Z ↔ LeastErasure Z) ∧
     ((FoldClosed W1 ∧ RootAtZeros W1) ∧ (FoldClosed W2 ∧ ¬ RootAtZeros W2)) ∧
     (∀ Z : World, LeastErasure Z ↔ RH Z) ∧
     (∀ A : ActualZeros, RH A.zeros) ∧
     (∀ g : World → Prop, RespectsRecord g → ¬ ∀ Z, FoldClosed Z → (g Z ↔ RH Z))) ∧
    (∀ Z : World, FoldClosed Z → ((∃ S : ActualZeros, S.zeros = Z) ↔ RH Z)) ∧
    ((∀ A : World → Prop, Admissible A → ¬ ∀ Z, FoldClosed Z → (A Z ↔ RH Z)) ∧ ¬ Admissible LeastErasure) ∧
    ((∀ C : Prop, G.Act → C → root) ∧
     (G.Act → ¬ root → False) ∧
     (∀ Z : World, ¬ RH Z → ¬ ∃ G' : SelfGrounding (RH Z), Nonempty G'.Act) ∧
     (∀ W : TWorld, SeededWitness W ↔ BoundT W) ∧
     (root ∧ FoldClosed W2f ∧ SameRecord W1 W2f ∧ TimelessT WTwin ∧ ¬ RH W2f ∧
       (¬ ∃ G' : SelfGrounding (RH W2f), Nonempty G'.Act) ∧ ¬ SeededWitness WTwin) ∧
     SeededWitness WOn ∧
     ¬ Forces (fun _ => root) ∧
     (∀ A : ActualZeros, (∃ G' : SelfGrounding (RH A.zeros), Nonempty G'.Act) ∧
       SeededWitness (fun _ => A.zeros) ∧ (¬ RH A.zeros → False))) ∧
    ((∀ A : ActualZeros, RH A.zeros ∧ LeastErasure A.zeros ∧ ¬ OffLine A.zeros ∧
      (∀ z, A.zeros z ↔ recordOf A.zeros z) ∧ (∀ Q : World → Prop, (∀ Z, RH Z → Q Z) → Q A.zeros)) ∧
     (∀ (A : ActualZeros) (c : Computation), c.Reads A → ∀ z, z ∈ c.reports → onLine z) ∧
     (∀ (c : Computation) (z : Pt), z ∈ c.reports → ¬ onLine z → ¬ ∃ A : ActualZeros, c.Reads A) ∧
     ¬ (∀ c : Computation, ∀ z, z ∈ c.reports → onLine z)) ∧
    (∀ A : ActualZeros, RH A.zeros ∧ ¬ OffLine A.zeros) :=
  ⟨reader_frame, the_lock G, fun Z hZ => (socket_is_the_value Z hZ).1,
   ⟨triaxial_cut_irreducible.2.2.2.1, triaxial_cut_irreducible.2.2.2.2.2.2.1⟩,
   two_denials G, the_witness_forced_by_the_act, the_kinetic_bar⟩

end PrimeFreedom

/-! ## Cones, printed: sections I to XVI -/

#print axioms PrimeFreedom.arrow_exists
#print axioms PrimeFreedom.aperture_one_bit_wide
#print axioms PrimeFreedom.prime_fibre
#print axioms PrimeFreedom.prime_off_seat
#print axioms PrimeFreedom.freedom_is_exactly_two
#print axioms PrimeFreedom.seat_is_zero
#print axioms PrimeFreedom.exists_prime_dvd
#print axioms PrimeFreedom.leastDivisor_prime
#print axioms PrimeFreedom.determined_by_primes
#print axioms PrimeFreedom.fold_preserves_offline
#print axioms PrimeFreedom.offline_zero_quadruple
#print axioms PrimeFreedom.not_rh_has_offline_witness
#print axioms PrimeFreedom.denial_posits_the_orbit
#print axioms PrimeFreedom.record_blind_at_every_scale
#print axioms PrimeFreedom.euclid_lemma
#print axioms PrimeFreedom.pExp_mul
#print axioms PrimeFreedom.padicMeasure_additive
#print axioms PrimeFreedom.prime_freedom_independent
#print axioms PrimeFreedom.primes_base_of_freedom
#print axioms PrimeFreedom.arrow_multiplicative
#print axioms PrimeFreedom.arrow_at_prime
#print axioms PrimeFreedom.finite_never_forces
#print axioms PrimeFreedom.limit_not_forced
#print axioms PrimeFreedom.nothing_escapes_one_cut
#print axioms PrimeFreedom.sides_together
#print axioms PrimeFreedom.rh_iff_no_left
#print axioms PrimeFreedom.record_decides_nothing
#print axioms PrimeFreedom.unicorn_block
#print axioms PrimeFreedom.keyless_forces_nothing
#print axioms PrimeFreedom.least_erasure_is_the_value
#print axioms PrimeFreedom.supply_iff
#print axioms PrimeFreedom.faces_are_one
#print axioms PrimeFreedom.rh_from_the_act_generic
#print axioms PrimeFreedom.rh_from_the_act
#print axioms PrimeFreedom.rh_ground_closure_complete

#print axioms PrimeFreedom.primes_exist
#print axioms PrimeFreedom.primes_exist_forces_nothing
#print axioms PrimeFreedom.prime_freedom_forces_nothing
#print axioms PrimeFreedom.arrow_forces_nothing
#print axioms PrimeFreedom.free_basis_coexists_with_offline_world
#print axioms PrimeFreedom.fold_off_line_stays_off
#print axioms PrimeFreedom.positivity_on_zero_side
#print axioms PrimeFreedom.least_erasure_is_positivity
#print axioms PrimeFreedom.prime_witness_iff
#print axioms PrimeFreedom.rh_from_prime_witness
#print axioms PrimeFreedom.positivity_is_keyed
#print axioms PrimeFreedom.freedom_does_not_pick_the_sign
#print axioms PrimeFreedom.prime_witness_ledger
#print axioms PrimeFreedom.posit_is_the_conclusion
#print axioms PrimeFreedom.rh_from_prime_act
#print axioms PrimeFreedom.acts_are_one
#print axioms PrimeFreedom.record_decides_nothing_free
#print axioms PrimeFreedom.unicorn_block_free
#print axioms PrimeFreedom.keyless_forces_nothing_free
#print axioms PrimeFreedom.arrow_forces_nothing_free
#print axioms PrimeFreedom.least_erasure_reads_past_the_record_free
#print axioms PrimeFreedom.positivity_is_keyed_free

/-! ## Cones, pinned: sections VII to XIII (a compile in which any pinned cone changes fails) -/
/-- info: 'PrimeFreedom.least_erasure_is_the_value' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.least_erasure_is_the_value
/-- info: 'PrimeFreedom.least_erasure_is_positivity' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.least_erasure_is_positivity
/-- info: 'PrimeFreedom.spend_is_the_line' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.spend_is_the_line
/-- info: 'PrimeFreedom.record_decides_nothing_free' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.record_decides_nothing_free
/-- info: 'PrimeFreedom.keyless_forces_nothing_free' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.keyless_forces_nothing_free
/-- info: 'PrimeFreedom.rh_from_the_act' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.rh_from_the_act
/-- info: 'PrimeFreedom.rh_from_prime_act' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.rh_from_prime_act
/-- info: 'PrimeFreedom.acts_are_one' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.acts_are_one
/-- info: 'PrimeFreedom.primes_base_of_freedom' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.primes_base_of_freedom
/-- info: 'PrimeFreedom.spend_is_not_the_free_basis' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.spend_is_not_the_free_basis
/-- info: 'PrimeFreedom.rh_on_the_spent_bit' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.rh_on_the_spent_bit
/-- info: 'PrimeFreedom.prime_arc_sealed' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.prime_arc_sealed
/-- info: 'PrimeFreedom.rh_is_the_weakest_forcing_premise' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.rh_is_the_weakest_forcing_premise
/-- info: 'PrimeFreedom.li_prefix_never_forces' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.li_prefix_never_forces
/-- info: 'PrimeFreedom.rh_from_the_sign' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.rh_from_the_sign
/-- info: 'PrimeFreedom.rh_iff_the_sign' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.rh_iff_the_sign
/-- info: 'PrimeFreedom.spends_are_one' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.spends_are_one
/-- info: 'PrimeFreedom.line_not_self_grounding' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.line_not_self_grounding
/-- info: 'PrimeFreedom.sign_realized_both_ways' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.sign_realized_both_ways
/-- info: 'PrimeFreedom.the_vestigial_posit' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.the_vestigial_posit
/-- info: 'PrimeFreedom.exactly_one_face_is_keyed' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.exactly_one_face_is_keyed
/-- info: 'PrimeFreedom.arrow_is_not_the_line' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.arrow_is_not_the_line
/-- info: 'PrimeFreedom.template_binds_iff_seed' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.template_binds_iff_seed
/-- info: 'PrimeFreedom.the_seed_is_the_spend' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.the_seed_is_the_spend
/-- info: 'PrimeFreedom.the_template_plugged_in' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.the_template_plugged_in
/-! ## Cones, pinned: section XVI -/
/-- info: 'PrimeFreedom.fold_negates_odd' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.fold_negates_odd
/-- info: 'PrimeFreedom.rh_iff_even_eigenspace' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.rh_iff_even_eigenspace
/-- info: 'PrimeFreedom.record_blind_to_odd' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.record_blind_to_odd
/-- info: 'PrimeFreedom.side_odd_off_line' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.side_odd_off_line
/-- info: 'PrimeFreedom.record_never_reads_the_side' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.record_never_reads_the_side
/-- info: 'PrimeFreedom.colocation_is_a_calibration' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.colocation_is_a_calibration
/-- info: 'PrimeFreedom.calibration_realized_both_ways' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.calibration_realized_both_ways
/-- info: 'PrimeFreedom.recursion_fails_on_the_twin' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.recursion_fails_on_the_twin
/-- info: 'PrimeFreedom.least_erasure_is_the_recursion' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.least_erasure_is_the_recursion
/-- info: 'PrimeFreedom.the_mirror_at_minus_one' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.the_mirror_at_minus_one

/-! ## Cones, printed: section XVII -/
#print axioms PrimeFreedom.admissible_transfers
#print axioms PrimeFreedom.no_admissible_triad_forces
#print axioms PrimeFreedom.no_admissible_coalition_forces
#print axioms PrimeFreedom.spend_is_not_admissible
#print axioms PrimeFreedom.three_axis_lock
#print axioms PrimeFreedom.freedom_alone_open
#print axioms PrimeFreedom.certified_height_never_forces
#print axioms PrimeFreedom.certified_worlds_share_the_record_below
#print axioms PrimeFreedom.HeatFlow.disc_flow
#print axioms PrimeFreedom.HeatFlow.forward_preserves
#print axioms PrimeFreedom.HeatFlow.erasure_finite
#print axioms PrimeFreedom.HeatFlow.lam_nonneg
#print axioms PrimeFreedom.HeatFlow.real_at_lam
#print axioms PrimeFreedom.HeatFlow.lam_least
#print axioms PrimeFreedom.HeatFlow.lam_zero_iff_real
#print axioms PrimeFreedom.HeatFlow.de_bruijn_tight
#print axioms PrimeFreedom.HeatFlow.collision
#print axioms PrimeFreedom.HeatFlow.disc3_step
#print axioms PrimeFreedom.HeatFlow.disc3_strict
#print axioms PrimeFreedom.HeatFlow.disc3_monotone
#print axioms PrimeFreedom.HeatFlow.cubic_forward_preserves
#print axioms PrimeFreedom.HeatFlow.flow_injective
#print axioms PrimeFreedom.HeatFlow.certificate_two_worlds
#print axioms PrimeFreedom.HeatFlow.certificate_decides_nothing
#print axioms PrimeFreedom.HeatFlow.certification_never_forces
#print axioms PrimeFreedom.HeatFlow.zero_slack
#print axioms PrimeFreedom.HeatFlow.backward_not_forced
#print axioms PrimeFreedom.HeatFlow.family_least_erasure
#print axioms PrimeFreedom.heat_bit_is_one_inequality
#print axioms PrimeFreedom.family_bit_is_one_inequality
#print axioms PrimeFreedom.heat_model_reads_as_the_carrier
#print axioms PrimeFreedom.Liouville.lam_mult
#print axioms PrimeFreedom.Liouville.lam_flips_at_primes
#print axioms PrimeFreedom.Liouville.polya_holds_to_200
#print axioms PrimeFreedom.liouville_is_the_sign_arrow
#print axioms PrimeFreedom.rh_from_faithful
#print axioms PrimeFreedom.faithful_is_the_bit
#print axioms PrimeFreedom.the_posit_in_every_coordinate
#print axioms PrimeFreedom.modes
#print axioms PrimeFreedom.lossless_iff_rh
#print axioms PrimeFreedom.stable_iff_rh
#print axioms PrimeFreedom.five_readings_agree
#print axioms PrimeFreedom.no_record_reading_returns_any_face
#print axioms PrimeFreedom.same_for_every_reader
#print axioms PrimeFreedom.no_private_bit
#print axioms PrimeFreedom.spend_has_no_reader
#print axioms PrimeFreedom.the_harvest

/-! ## Cones, pinned: section XVII -/
/-- info: 'PrimeFreedom.no_admissible_coalition_forces' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.no_admissible_coalition_forces
/-- info: 'PrimeFreedom.spend_is_not_admissible' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.spend_is_not_admissible
/-- info: 'PrimeFreedom.certified_height_never_forces' depends on axioms: [propext, Classical.choice, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.certified_height_never_forces
/-- info: 'PrimeFreedom.HeatFlow.lam_nonneg' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.HeatFlow.lam_nonneg
/-- info: 'PrimeFreedom.HeatFlow.lam_zero_iff_real' depends on axioms: [propext, Classical.choice, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.HeatFlow.lam_zero_iff_real
/-- info: 'PrimeFreedom.HeatFlow.certificate_decides_nothing' depends on axioms: [propext, Classical.choice, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.HeatFlow.certificate_decides_nothing
/-- info: 'PrimeFreedom.HeatFlow.zero_slack' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.HeatFlow.zero_slack
/-- info: 'PrimeFreedom.heat_bit_is_one_inequality' depends on axioms: [propext, Classical.choice, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.heat_bit_is_one_inequality
/-- info: 'PrimeFreedom.liouville_is_the_sign_arrow' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.liouville_is_the_sign_arrow
/-- info: 'PrimeFreedom.Liouville.polya_holds_to_200' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.Liouville.polya_holds_to_200
/-- info: 'PrimeFreedom.the_posit_in_every_coordinate' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.the_posit_in_every_coordinate
/-- info: 'PrimeFreedom.five_readings_agree' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.five_readings_agree
/-- info: 'PrimeFreedom.spend_has_no_reader' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.spend_has_no_reader
/-- info: 'PrimeFreedom.the_harvest' depends on axioms: [propext, Classical.choice, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.the_harvest

/-! ## Cones, printed: section XVIII -/

#print axioms PrimeFreedom.placement
#print axioms PrimeFreedom.soundness_is_load_bearing
#print axioms PrimeFreedom.ground_exceeds_ladder
#print axioms PrimeFreedom.independent_axioms_are_separate_bits
#print axioms PrimeFreedom.root_is_keyless
#print axioms PrimeFreedom.keyless_crosses
#print axioms PrimeFreedom.root_decides_no_keyed
#print axioms PrimeFreedom.choice_is_keyed
#print axioms PrimeFreedom.root_does_not_cross_choice
#print axioms PrimeFreedom.line_is_keyed_over_worlds
#print axioms PrimeFreedom.root_does_not_cross_the_line
#print axioms PrimeFreedom.refutation_is_one_point
#print axioms PrimeFreedom.cant_refute_seals
#print axioms PrimeFreedom.cant_refute_seals_dec
#print axioms PrimeFreedom.rh_iff_cant_refute
#print axioms PrimeFreedom.independence_forces_truth
#print axioms PrimeFreedom.cant_prove_does_not_seal_false
#print axioms PrimeFreedom.cant_asymmetry
#print axioms PrimeFreedom.round_trip_identity
#print axioms PrimeFreedom.absolute_returns_unchanged
#print axioms PrimeFreedom.trip_adds_presence_only
#print axioms PrimeFreedom.massless_arrow
#print axioms PrimeFreedom.any_true_premise_serves
#print axioms PrimeFreedom.the_line_round_trips
#print axioms PrimeFreedom.ladder_blocked
#print axioms PrimeFreedom.the_road

/-! ## Cones, pinned: section XVIII -/
/-- info: 'PrimeFreedom.placement' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.placement
/-- info: 'PrimeFreedom.soundness_is_load_bearing' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.soundness_is_load_bearing
/-- info: 'PrimeFreedom.ground_exceeds_ladder' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.ground_exceeds_ladder
/-- info: 'PrimeFreedom.root_decides_no_keyed' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.root_decides_no_keyed
/-- info: 'PrimeFreedom.root_does_not_cross_the_line' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.root_does_not_cross_the_line
/-- info: 'PrimeFreedom.cant_refute_seals' depends on axioms: [propext, Classical.choice, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.cant_refute_seals
/-- info: 'PrimeFreedom.rh_iff_cant_refute' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.rh_iff_cant_refute
/-- info: 'PrimeFreedom.independence_forces_truth' depends on axioms: [propext, Classical.choice, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.independence_forces_truth
/-- info: 'PrimeFreedom.cant_prove_does_not_seal_false' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.cant_prove_does_not_seal_false
/-- info: 'PrimeFreedom.round_trip_identity' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.round_trip_identity
/-- info: 'PrimeFreedom.massless_arrow' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.massless_arrow
/-- info: 'PrimeFreedom.ladder_blocked' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.ladder_blocked
/-- info: 'PrimeFreedom.the_road' depends on axioms: [propext, Classical.choice, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.the_road

/-! ## Cones, printed: section XIX -/

#print axioms PrimeFreedom.vocabulary_law
#print axioms PrimeFreedom.every_face_proves_every_face
#print axioms PrimeFreedom.chart_faces_prove_each_other
#print axioms PrimeFreedom.fold_fold
#print axioms PrimeFreedom.fold_law_admissible
#print axioms PrimeFreedom.same_record_eq
#print axioms PrimeFreedom.record_reading_admissible
#print axioms PrimeFreedom.admissible_const
#print axioms PrimeFreedom.keyless_denial_respects
#print axioms PrimeFreedom.admissible_not
#print axioms PrimeFreedom.admissible_and
#print axioms PrimeFreedom.admissible_or
#print axioms PrimeFreedom.admissible_never_decides
#print axioms PrimeFreedom.coalition_admissible
#print axioms PrimeFreedom.no_coalition_decides
#print axioms PrimeFreedom.triaxial_cut_irreducible
#print axioms PrimeFreedom.ladder_proof_lands_on_least_erasure
#print axioms PrimeFreedom.ladder_proof_iff_least_erasure
#print axioms PrimeFreedom.lineTheory_sound
#print axioms PrimeFreedom.a_sound_theory_may_prove_the_line
#print axioms PrimeFreedom.route_ledger_is_computed
#print axioms PrimeFreedom.route_ledger_counts
#print axioms PrimeFreedom.route_status_total
#print axioms PrimeFreedom.blocked_iff_theorem
#print axioms PrimeFreedom.reader_frame
#print axioms PrimeFreedom.the_front

/-! ## Cones, pinned: section XIX -/
/-- info: 'PrimeFreedom.vocabulary_law' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.vocabulary_law
/-- info: 'PrimeFreedom.every_face_proves_every_face' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.every_face_proves_every_face
/-- info: 'PrimeFreedom.chart_faces_prove_each_other' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.chart_faces_prove_each_other
/-- info: 'PrimeFreedom.record_reading_admissible' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.record_reading_admissible
/-- info: 'PrimeFreedom.admissible_not' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.admissible_not
/-- info: 'PrimeFreedom.admissible_and' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.admissible_and
/-- info: 'PrimeFreedom.admissible_or' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.admissible_or
/-- info: 'PrimeFreedom.admissible_never_decides' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.admissible_never_decides
/-- info: 'PrimeFreedom.coalition_admissible' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.coalition_admissible
/-- info: 'PrimeFreedom.no_coalition_decides' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.no_coalition_decides
/-- info: 'PrimeFreedom.triaxial_cut_irreducible' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.triaxial_cut_irreducible
/-- info: 'PrimeFreedom.ladder_proof_lands_on_least_erasure' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.ladder_proof_lands_on_least_erasure
/-- info: 'PrimeFreedom.ladder_proof_iff_least_erasure' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.ladder_proof_iff_least_erasure
/-- info: 'PrimeFreedom.a_sound_theory_may_prove_the_line' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.a_sound_theory_may_prove_the_line
/-- info: 'PrimeFreedom.route_ledger_is_computed' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.route_ledger_is_computed
/-- info: 'PrimeFreedom.blocked_iff_theorem' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.blocked_iff_theorem
/-- info: 'PrimeFreedom.reader_frame' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.reader_frame
/-- info: 'PrimeFreedom.the_front' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.the_front

/-! ## Cones, pinned: section XX -/
/-- info: 'PrimeFreedom.reg_on_line' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.reg_on_line
/-- info: 'PrimeFreedom.record_rh' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.record_rh
/-- info: 'PrimeFreedom.record_has_least_erasure' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.record_has_least_erasure
/-- info: 'PrimeFreedom.record_closed' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.record_closed
/-- info: 'PrimeFreedom.record_carried_by_least_erasure' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.record_carried_by_least_erasure
/-- info: 'PrimeFreedom.admissible_holds_on_the_lossless_world' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.admissible_holds_on_the_lossless_world
/-- info: 'PrimeFreedom.every_reading_holds_on_the_lossless_world' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.every_reading_holds_on_the_lossless_world
/-- info: 'PrimeFreedom.every_coalition_holds_on_the_lossless_world' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.every_coalition_holds_on_the_lossless_world
/-- info: 'PrimeFreedom.record_never_testifies_against' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.record_never_testifies_against
/-- info: 'PrimeFreedom.pair_two_points_one_record' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.pair_two_points_one_record
/-- info: 'PrimeFreedom.offCount_zero_iff' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.offCount_zero_iff
/-- info: 'PrimeFreedom.fincfg_closed' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.fincfg_closed
/-- info: 'PrimeFreedom.least_erasure_iff_zero_erased' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.least_erasure_iff_zero_erased
/-- info: 'PrimeFreedom.landauer_floor_exact' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.landauer_floor_exact
/-- info: 'PrimeFreedom.price_zero_iff_least_erasure' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.price_zero_iff_least_erasure
/-- info: 'PrimeFreedom.denial_price_linear' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.denial_price_linear
/-- info: 'PrimeFreedom.reversible_commits_nothing' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.reversible_commits_nothing
/-- info: 'PrimeFreedom.least_erasure_iff_no_point_off' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.least_erasure_iff_no_point_off
/-- info: 'PrimeFreedom.rejection_is_a_witness' depends on axioms: [propext, Classical.choice, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.rejection_is_a_witness
/-- info: 'PrimeFreedom.falsifier_form_constant' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.falsifier_form_constant
/-- info: 'PrimeFreedom.act_reenacts_root' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.act_reenacts_root
/-- info: 'PrimeFreedom.root_does_not_cross_the_denial' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.root_does_not_cross_the_denial
/-- info: 'PrimeFreedom.assent_is_the_value' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.assent_is_the_value
/-- info: 'PrimeFreedom.one_shape_two_registers' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.one_shape_two_registers
/-- info: 'PrimeFreedom.freedom_is_given_the_sign_is_spent' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.freedom_is_given_the_sign_is_spent
/-- info: 'PrimeFreedom.least_erasure_affirmed' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.least_erasure_affirmed

/-! ## Cones, printed: every theorem of sections I to XX whose cone is not printed above -/

#print axioms PrimeFreedom.orientation_two_valued
#print axioms PrimeFreedom.orientations_distinct
#print axioms PrimeFreedom.seat_is_one
#print axioms PrimeFreedom.findLeastFrom_correct
#print axioms PrimeFreedom.leastDivisor_spec
#print axioms PrimeFreedom.dvd_remainder_mul
#print axioms PrimeFreedom.leastMulDvd_spec
#print axioms PrimeFreedom.findGt_spec
#print axioms PrimeFreedom.findGt_max
#print axioms PrimeFreedom.pExp_dvd
#print axioms PrimeFreedom.two_pow_ge
#print axioms PrimeFreedom.pow_dvd_bound
#print axioms PrimeFreedom.pExp_le_of_dvd
#print axioms PrimeFreedom.mul_mul_mul_comm_nat
#print axioms PrimeFreedom.pExp_self
#print axioms PrimeFreedom.pExp_eq_zero_of_not_dvd
#print axioms PrimeFreedom.pExp_one
#print axioms PrimeFreedom.pExp_other
#print axioms PrimeFreedom.signArrow_add
#print axioms PrimeFreedom.fold_fixed_iff
#print axioms PrimeFreedom.reg_fixes_line
#print axioms PrimeFreedom.unicorn_never_registered
#print axioms PrimeFreedom.W1_closed
#print axioms PrimeFreedom.W1_rh
#print axioms PrimeFreedom.pair_closed
#print axioms PrimeFreedom.pair_not_rh
#print axioms PrimeFreedom.pair_same_record
#print axioms PrimeFreedom.W2_closed
#print axioms PrimeFreedom.W2_not_rh
#print axioms PrimeFreedom.same_record_12
#print axioms PrimeFreedom.fibre_is_infinite
#print axioms PrimeFreedom.lossless_unique
#print axioms PrimeFreedom.sentence_separates_record_does_not
#print axioms PrimeFreedom.record_is_lossless
#print axioms PrimeFreedom.record_same
#print axioms PrimeFreedom.least_erasure_reads_past_the_record
#print axioms PrimeFreedom.posit_is_the_value
#print axioms PrimeFreedom.fold_onLine_iff
#print axioms PrimeFreedom.fold_ne_of_offline
#print axioms PrimeFreedom.primes_exist_keyless
#print axioms PrimeFreedom.prime_freedom_keyless
#print axioms PrimeFreedom.arrow_keyless
#print axioms PrimeFreedom.W2f_closed
#print axioms PrimeFreedom.W2f_not_rh
#print axioms PrimeFreedom.same_record_f
#print axioms PrimeFreedom.weaker_never_forces
#print axioms PrimeFreedom.weaker_at_the_twin_never_forces
#print axioms PrimeFreedom.rh_from_li
#print axioms PrimeFreedom.li_is_the_bit_stream
#print axioms PrimeFreedom.root_has_an_act
#print axioms PrimeFreedom.fold_face_keyless
#print axioms PrimeFreedom.fold_face_on_twin
#print axioms PrimeFreedom.fold_face_on_line
#print axioms PrimeFreedom.record_face_keyless
#print axioms PrimeFreedom.arrow_face_keyless
#print axioms PrimeFreedom.closure_face_on_line
#print axioms PrimeFreedom.closure_face_fails_on_twin
#print axioms PrimeFreedom.fold_keeps_even
#print axioms PrimeFreedom.residence_orientation_reversing
#print axioms PrimeFreedom.reg_kills_odd
#print axioms PrimeFreedom.reg_keeps_even
#print axioms PrimeFreedom.reg_idempotent
#print axioms PrimeFreedom.onLine_iff_odd_zero
#print axioms PrimeFreedom.odd_pair_opposite
#print axioms PrimeFreedom.wall_on_the_chart
#print axioms PrimeFreedom.value_is_recursion
#print axioms PrimeFreedom.recursion_is_value
#print axioms PrimeFreedom.recursion_on_the_line
#print axioms PrimeFreedom.root_recursion
#print axioms PrimeFreedom.HeatFlow.sq_nonneg
#print axioms PrimeFreedom.HeatFlow.cube_diff
#print axioms PrimeFreedom.HeatFlow.disc3_monotone_rec
#print axioms PrimeFreedom.HeatFlow.famLam_nonneg_rec
#print axioms PrimeFreedom.HeatFlow.family_least_erasure_rec
#print axioms PrimeFreedom.root_act

/-! ## Cones, pinned: section XXI -/

/-- info: 'PrimeFreedom.sumBelow_add' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.sumBelow_add
/-- info: 'PrimeFreedom.sumBelow_congr' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.sumBelow_congr
/-- info: 'PrimeFreedom.sumBelow_stable' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.sumBelow_stable
/-- info: 'PrimeFreedom.sumBelow_zero' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.sumBelow_zero
/-- info: 'PrimeFreedom.sumBelow_single' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.sumBelow_single
/-- info: 'PrimeFreedom.primeTest_iff' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.primeTest_iff
/-- info: 'PrimeFreedom.pExp_zero_above' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.pExp_zero_above
/-- info: 'PrimeFreedom.extendTerm_zero_above' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.extendTerm_zero_above
/-- info: 'PrimeFreedom.extendAssignment_bound' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.extendAssignment_bound
/-- info: 'PrimeFreedom.extendTerm_mul' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.extendTerm_mul
/-- info: 'PrimeFreedom.extendAssignment_mul' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.extendAssignment_mul
/-- info: 'PrimeFreedom.extendTerm_other' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.extendTerm_other
/-- info: 'PrimeFreedom.extendAssignment_prime' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.extendAssignment_prime
/-- info: 'PrimeFreedom.extendAssignment_additive' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.extendAssignment_additive
/-- info: 'PrimeFreedom.primes_admit_every_assignment' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.primes_admit_every_assignment
/-- info: 'PrimeFreedom.omegaAll_mul' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.omegaAll_mul
/-- info: 'PrimeFreedom.omegaAll_prime' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.omegaAll_prime
/-- info: 'PrimeFreedom.liouvilleAll_mul' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.liouvilleAll_mul
/-- info: 'PrimeFreedom.liouvilleAll_prime' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.liouvilleAll_prime
/-- info: 'PrimeFreedom.liouvilleAll_one' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.liouvilleAll_one
/-- info: 'PrimeFreedom.liouvilleAll_agrees_to_30' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.liouvilleAll_agrees_to_30
/-- info: 'PrimeFreedom.pinned_face_reads' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.pinned_face_reads
/-- info: 'PrimeFreedom.pinned_face_is_a_face' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.pinned_face_is_a_face
/-- info: 'PrimeFreedom.rh_iff_own_record' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.rh_iff_own_record
/-- info: 'PrimeFreedom.least_erasure_is_least' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.least_erasure_is_least
/-- info: 'PrimeFreedom.record_is_the_least' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.record_is_the_least
/-- info: 'PrimeFreedom.the_closure' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.the_closure
/-- info: 'PrimeFreedom.Carrier.record_same_C' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.Carrier.record_same_C
/-- info: 'PrimeFreedom.Carrier.least_erasure_is_the_value_C' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.Carrier.least_erasure_is_the_value_C
/-- info: 'PrimeFreedom.Carrier.rh_iff_own_record_C' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.Carrier.rh_iff_own_record_C
/-- info: 'PrimeFreedom.Carrier.one_record_C' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.Carrier.one_record_C
/-- info: 'PrimeFreedom.Carrier.worlds_differ_C' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.Carrier.worlds_differ_C
/-- info: 'PrimeFreedom.Carrier.no_reading_decides_C' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.Carrier.no_reading_decides_C
/-- info: 'PrimeFreedom.Carrier.chart_is_an_instance' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.Carrier.chart_is_an_instance
/-- info: 'PrimeFreedom.Carrier.the_closure_on_any_carrier' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.Carrier.the_closure_on_any_carrier

/-- info: 'PrimeFreedom.Carrier.lossless_unique_C' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.Carrier.lossless_unique_C

/-! ## Cones, pinned: section XXII -/
/-- info: 'PrimeFreedom.socket_is_the_value' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.socket_is_the_value
/-- info: 'PrimeFreedom.closure_takes_a_term' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.closure_takes_a_term
/-- info: 'PrimeFreedom.closure_at_a_term' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.closure_at_a_term
/-- info: 'PrimeFreedom.forces_or_has_a_twin' depends on axioms: [propext, Classical.choice, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.forces_or_has_a_twin
/-- info: 'PrimeFreedom.withPair_closed' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.withPair_closed
/-- info: 'PrimeFreedom.withPair_same_record' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.withPair_same_record
/-- info: 'PrimeFreedom.withPair_not_rh' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.withPair_not_rh
/-- info: 'PrimeFreedom.record_forcing_fails_everywhere' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.record_forcing_fails_everywhere
/-- info: 'PrimeFreedom.forcing_is_the_value_or_stronger' depends on axioms: [propext, Classical.choice, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.forcing_is_the_value_or_stronger
/-- info: 'PrimeFreedom.forcing_fills_the_socket' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.forcing_fills_the_socket
/-- info: 'PrimeFreedom.face_is_the_socket' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.face_is_the_socket
/-- info: 'PrimeFreedom.named_faces_are_the_socket' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.named_faces_are_the_socket
/-- info: 'PrimeFreedom.walk_is_the_walk_of_one' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.walk_is_the_walk_of_one
/-- info: 'PrimeFreedom.faithful_is_the_sentence_of_one' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.faithful_is_the_sentence_of_one
/-- info: 'PrimeFreedom.blind_assignment_vanishes' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.blind_assignment_vanishes
/-- info: 'PrimeFreedom.blind_walk' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.blind_walk
/-- info: 'PrimeFreedom.blind_is_unfaithful' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.blind_is_unfaithful
/-- info: 'PrimeFreedom.faithful_reads_the_primes' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.faithful_reads_the_primes
/-- info: 'PrimeFreedom.the_socket' depends on axioms: [propext, Classical.choice, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.the_socket

/-! ## Cones, pinned: section XXII.b -/
/-- info: 'PrimeFreedom.fold₂_fixed_iff' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.fold₂_fixed_iff
/-- info: 'PrimeFreedom.open_strip_forces_at_resolution_one' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.open_strip_forces_at_resolution_one
/-- info: 'PrimeFreedom.innerPair₂_strip' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.innerPair₂_strip
/-- info: 'PrimeFreedom.innerPair₂_not_rh' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.innerPair₂_not_rh
/-- info: 'PrimeFreedom.open_strip_forces_nothing_at_resolution_two' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.open_strip_forces_nothing_at_resolution_two
/-- info: 'PrimeFreedom.keyless_forces_nothing₂' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.keyless_forces_nothing₂
/-- info: 'PrimeFreedom.withPair₂_strip' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.withPair₂_strip
/-- info: 'PrimeFreedom.withPair₂_same_record' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.withPair₂_same_record
/-- info: 'PrimeFreedom.withPair₂_not_rh' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.withPair₂_not_rh
/-- info: 'PrimeFreedom.record_forcing_fails_in_the_strip' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.record_forcing_fails_in_the_strip
/-- info: 'PrimeFreedom.no_reading_decides_in_the_strip' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.no_reading_decides_in_the_strip
/-- info: 'PrimeFreedom.forces_or_has_a_twin₂' depends on axioms: [propext, Classical.choice, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.forces_or_has_a_twin₂
/-- info: 'PrimeFreedom.the_socket_in_the_strip' depends on axioms: [propext, Classical.choice, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.the_socket_in_the_strip

/-! ## Cones, pinned: section XXIII -/

/-- info: 'PrimeFreedom.double_security' depends on axioms: [propext, Classical.choice, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.double_security

/-! ## Cones, pinned: section XXIV -/

/-- info: 'PrimeFreedom.denial_reenacts_root' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.denial_reenacts_root

/-- info: 'PrimeFreedom.external_proof_adds_nothing' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.external_proof_adds_nothing

/-- info: 'PrimeFreedom.seated_undeniable' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.seated_undeniable

/-- info: 'PrimeFreedom.undeniable_root_forces_no_value' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.undeniable_root_forces_no_value

/-- info: 'PrimeFreedom.root_read_on_row_is_keyed' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.root_read_on_row_is_keyed

/-- info: 'PrimeFreedom.least_erasure_unconditional' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.least_erasure_unconditional

/-- info: 'PrimeFreedom.the_lock' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.the_lock

/-- info: 'PrimeFreedom.indicator_pos' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.indicator_pos

/-- info: 'PrimeFreedom.constructed_root_holds' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.constructed_root_holds

/-- info: 'PrimeFreedom.root_at_zeros_is_the_hypothesis' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.root_at_zeros_is_the_hypothesis

/-- info: 'PrimeFreedom.root_at_zeros_is_least_erasure' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.root_at_zeros_is_least_erasure

/-- info: 'PrimeFreedom.root_at_zeros_is_keyed' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.root_at_zeros_is_keyed

/-! ## Cones, pinned: section XXV -/

/-- info: 'PrimeFreedom.admissible_forcing_is_vacuous' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.admissible_forcing_is_vacuous

/-- info: 'PrimeFreedom.coalition_forcing_is_vacuous' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.coalition_forcing_is_vacuous

/-- info: 'PrimeFreedom.an_admissible_premise_forces' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.an_admissible_premise_forces

/-- info: 'PrimeFreedom.int_two_mul' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.int_two_mul

/-- info: 'PrimeFreedom.int_two_mul_sub' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.int_two_mul_sub

/-- info: 'PrimeFreedom.foldAt_invol' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.foldAt_invol

/-- info: 'PrimeFreedom.foldAt_fixed_iff' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.foldAt_fixed_iff

/-- info: 'PrimeFreedom.foldAt_specializes' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.foldAt_specializes

/-- info: 'PrimeFreedom.foldAt_strip' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.foldAt_strip

/-- info: 'PrimeFreedom.foldAt_pair' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.foldAt_pair

/-- info: 'PrimeFreedom.rh_from_the_act_at' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.rh_from_the_act_at

/-- info: 'PrimeFreedom.strip_does_not_supply_at' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.strip_does_not_supply_at

/-- info: 'PrimeFreedom.pair_outside_the_closed_strip' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.pair_outside_the_closed_strip

/-- info: 'PrimeFreedom.root_readings_joined' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.root_readings_joined

/-- info: 'PrimeFreedom.the_lock_on_the_constructed_root' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.the_lock_on_the_constructed_root

/-- info: 'PrimeFreedom.firstOff_spec' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.firstOff_spec

/-- info: 'PrimeFreedom.offset_off_line' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.offset_off_line

/-- info: 'PrimeFreedom.rejection_is_computed' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.rejection_is_computed

/-- info: 'PrimeFreedom.least_erasure_iff_search_empty' depends on axioms: [propext] -/
#guard_msgs in #print axioms PrimeFreedom.least_erasure_iff_search_empty

/-- info: 'PrimeFreedom.the_posit_is_a_deed' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.the_posit_is_a_deed

/-- info: 'PrimeFreedom.keyed_reading_not_returned' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.keyed_reading_not_returned

/-- info: 'PrimeFreedom.no_record_reading_returns_any_reading' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.no_record_reading_returns_any_reading

/-- info: 'PrimeFreedom.primes_are_a_free_basis' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.primes_are_a_free_basis

/-- info: 'PrimeFreedom.least_erasure_iff_recursion' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.least_erasure_iff_recursion

/-- info: 'PrimeFreedom.certified_height_never_forces_closed' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.certified_height_never_forces_closed

/-- info: 'PrimeFreedom.every_route_carries_its_theorem' depends on axioms: [propext, Classical.choice, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.every_route_carries_its_theorem

/-- info: 'PrimeFreedom.the_tenth_is_the_refuter' depends on axioms: [propext, Classical.choice, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.the_tenth_is_the_refuter

/-- info: 'PrimeFreedom.the_tenth_is_barred_by_the_act' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.the_tenth_is_barred_by_the_act

/-- info: 'PrimeFreedom.the_kinetic_bar' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.the_kinetic_bar

/-! ## Cones, pinned: section XXII.c -/

/-- info: 'PrimeFreedom.seeded_witness_iff_bound' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.seeded_witness_iff_bound

/-- info: 'PrimeFreedom.twin_has_no_seeded_witness' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.twin_has_no_seeded_witness

/-- info: 'PrimeFreedom.line_world_has_a_seeded_witness' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.line_world_has_a_seeded_witness

/-- info: 'PrimeFreedom.every_denial_is_an_act' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.every_denial_is_an_act

/-- info: 'PrimeFreedom.root_denial_refutes_itself' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.root_denial_refutes_itself

/-- info: 'PrimeFreedom.line_denial_denies_the_assertion' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.line_denial_denies_the_assertion

/-- info: 'PrimeFreedom.line_denial_denies_every_seed' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.line_denial_denies_every_seed

/-- info: 'PrimeFreedom.twin_carries_the_root_and_no_seed' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.twin_carries_the_root_and_no_seed

/-- info: 'PrimeFreedom.the_root_alone_forces_nothing' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.the_root_alone_forces_nothing

/-- info: 'PrimeFreedom.the_act_asserts_the_line' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.the_act_asserts_the_line

/-- info: 'PrimeFreedom.the_act_seeds_its_constant_world' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.the_act_seeds_its_constant_world

/-- info: 'PrimeFreedom.line_denial_refuted_on_the_act' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.line_denial_refuted_on_the_act

/-- info: 'PrimeFreedom.two_denials' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.two_denials

/-- info: 'PrimeFreedom.two_denials_at_the_root' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.two_denials_at_the_root

/-- info: 'PrimeFreedom.nothing_left_open_on_the_act' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.nothing_left_open_on_the_act

/-- info: 'PrimeFreedom.computation_reading_the_act_lands_on_the_line' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.computation_reading_the_act_lands_on_the_line

/-- info: 'PrimeFreedom.off_line_report_reads_no_act' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.off_line_report_reads_no_act

/-- info: 'PrimeFreedom.a_computation_reading_no_act_is_not_forced' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.a_computation_reading_no_act_is_not_forced

/-- info: 'PrimeFreedom.the_witness_forced_by_the_act' does not depend on any axioms -/
#guard_msgs in #print axioms PrimeFreedom.the_witness_forced_by_the_act

/-- info: 'PrimeFreedom.the_denials_and_the_witness' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.the_denials_and_the_witness

/-! ## Cones, pinned: section XXVI -/

/-- info: 'PrimeFreedom.the_capstone' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms PrimeFreedom.the_capstone

Appendix B. Compile receipt, cones and judgment

B.1 The receipt

The receipt follows whole, as printed, with nothing elided.

EVERY PRIME · 3.2.0 · RECEIPT
file      Every_Prime_3_2_0.lean
sha256    161806dc0ed2b4ffe2c5eb0f81600880b5af0a31a31db085c4ee62bd93633770
size      265248 bytes · 5087 lines · 415 theorems at column one · 237 cones pinned under #guard_msgs · 231 cones printed
          every theorem's cone printed or pinned: 237 + 231 lines cover all 415
toolchain Lean (version 4.19.0, x86_64-unknown-linux-gnu, commit 6caaee842e94, Release) · core only, no Mathlib, no Lake
          second compile: Lean (version 4.22.0, x86_64-unknown-linux-gnu, commit ba2cbbf09d49, Release)
compile   exit 0, 0 errors, 0 warnings, on Lean 4.19.0 and on Lean 4.22.0; every #guard_msgs pin holds; the outputs of the two
          toolchains are identical, line for line, and identical to the 231 printed lines of 3.1.4
screen    the OS ground screen on the comment-stripped source: no sorry, admit, native_decide, #exit, kernel-check bypass,
          unsafe or external code, metaprogram command or compile-time IO; no import; no axiom declared
digests   comment-stripped, every block comment and line comment removed and nothing else changed:
            b74a9148a383e5f9c0bceaf61c9337b23659210079d2c94f14dccfe2f78c9cab
          the same with every run of whitespace collapsed to one space:
            1954039635a4e36e222e779173a5ca9544e658f2c3dd7defffa079b4a9ec7bc1
          3.1.4 under the two normalizations: f272e913be8a3dd1… and 13c91cb2189fc494…, the digests its receipt prints
          3.1.1 under the two normalizations: 22b83a66786e13be… and 1ebf7dadf9c181d2…
          3.0.0 under the two normalizations: 09f9452c8b431460… and c0f477677af3a8c0…

IDENTITY · what changed from 3.1.4, and the proof that nothing else did
  3.2.0 is 3.1.4 with five changes: the header's version and count of pins; two entries of the header's glossary
  (seeded witness, computation) and two entries of its section list (XXII.c, XXVI); section XXII.c, inserted before
  section XXIII; section XXVI, inserted before the namespace closes; and the pinned cones of the two sections, appended
  at the foot; deleting the two sections, the appended blocks and the added header lines and restoring the version and
  the count returns 3.1.4 byte for byte (checked; 3.1.4 has sha256 c824d30e 36c0242c)
  section XXII.c, 20 theorems: two denials, one form, over every self-grounding root: every denial an act that
  instances the root; the denial of the root refuted by its own act; the denial of the hypothesis denying the
  self-grounding assertion of the line and every seeded witness; the seeded witness the line in time; the twin
  carrying the root and no seed; the root alone forcing nothing; on the act the assertion, the seed and the
  refutation; the same at the root proposition 0 < 1; and the witness forced by the act: on the act nothing left
  open, every computation that reads it on the line, a computation reporting a point off the line reading no act,
  and not every computation forced, the twin's report standing off the line and reading no act
  section XXVI, 1 theorem: the_capstone, the closure bound whole for every self-grounding root, the two-part reading,
  the lock, the socket, the irreducible cut, the two denials, the witness and the bar, the conjunction of theorems
  proved above and no new content
  foot: 20 pins for section XXII.c; 1 for section XXVI
  vocabulary: the comment text scanned against the stop list of B.3: 553 comment blocks, stop-list hits: none

IDENTITY · 3.1.4, carried: what changed from 3.1.1, 3.1.0 and 3.0.0
  3.1.4 differs from 3.1.1 (sha256 f50954f4 8fef41c2), checked by diff, in exactly these places: the header (the
  version, the count of pins, the glossary's lines on cited fields and on resolution n, the list of sections XXI to
  XXV); section VIII, whose self-grounding structure carries an act, as in the root kernel of Appendix R, with the four
  places that build or read it (supply_iff, rh_from_the_act_generic, rootSelfGrounding, line_not_self_grounding); the
  comment of XVIII.e; one rewrite lemma in the proof of padicMeasure_additive (Int.natCast_add for Int.ofNat_add) and
  one unused binder in the proof of rh_is_the_weakest_forcing_premise made anonymous; section XXI, where the closure on
  any carrier carries the uniqueness of the lossless member (lossless_unique_C); sections XXIV and XXV, inserted before
  the namespace closes; and the pins of sections XXI, XXIV and XXV, appended at the foot; every other line is 3.1.1's
  section XXIV, 12 theorems: the root undeniable in act, held by its act, no outside proof adding to it, the root on
  both twin worlds of one record forcing nothing, the indicator, the constructed root, the root read at the zeros equal
  to the hypothesis and to least erasure and keyed, the root read uniformly forcing nothing, least erasure
  unconditional, and the lock binding them with the closure and the block
  section XXV, 29 theorems in six parts: an admissible premise or coalition that forces the line holds on no nonempty
  fold-closed configuration, and the constant false premise is admissible and forces; the fold, registration and
  closure at every resolution n, with the open strip holding a pair off the line from n = 2 on and the pair at offset
  k ≥ 2 outside the closed strip at resolution one; the readings of the root joined and the lock at the constructed
  root; the rejection computed by a terminating search through a finite configuration's pairs; the posit a deed, no
  reading of the record returning any of the five chart readings, the primes a free basis, least erasure the
  self-verification of the hypothesis, the certified world fold-closed, every route of the ledger carrying its
  theorem; and the tenth falsifier, a point off the line, the refuter on every configuration and barred on the zero set
  the act supplies
  3.1.1 is 3.1.0 with three changes: two header lines (the version and the count of pins), section XXIII inserted
  before the namespace closes, and its one pinned cone appended at the foot; deleting the section and the appended
  block and restoring the two header lines returns 3.1.0 byte for byte (checked; 3.1.0 has sha256 5fda7c86 2b151df3)
  section XXIII, 1 theorem: double_security, the formal gate, the actuation gate and the keyed bit between them,
  the conjunction of theorems proved above and no new content
  3.1.0 is 3.0.0 with three changes: two header lines (the version and the count of pins), sections XXI and XXII inserted
  before the namespace closes, and cone lines appended at the foot; deleting the sections and the appended lines and
  restoring the two header lines returns 3.0.0 byte for byte (checked)
  section XXI, 35 theorems: every assignment at the primes realized, existence with uniqueness; Ω and λ for every n;
  the Liouville face pinned to FaithfulLambda; least erasure as fixed point and as minimum of its fibre; the closure
  whole (the_closure); the closure on any carrier with an involution and a registration, the chart one instance
  section XXII, 32 theorems in two parts; its first part, 19 theorems: the field of the act is the only socket; every premise forces the line or has a twin where
  the value fails; a record-respecting forcing premise fails at every nonempty configuration; a forcing premise is the
  value or strictly stronger and fills the field where it holds; every cited face fills it exactly when it holds; the
  Liouville sentence, read at the primes, fails at the assignment that sends every prime to zero; its part XXII.b,
  13 theorems: at resolution one the open strip is the line; at resolution two it holds the pair x = 1, 3, which the
  rule of Section 18 reads at real parts within 1/8 of 1/4 and 3/4, and the chart refusals of the socket hold over
  configurations inside the open strip
  foot: 75 #print lines for the theorems of 3.0.0 whose cones were not printed; 36 pins for section XXI; 19 for section XXII; 13 for section XXII.b; 1 for section XXIII; 12 for section XXIV; 29 for section XXV
  vocabulary: the comment text scanned against the stop list of B.3: 524 comment blocks, stop-list hits: none

JUDGMENT · afresh, in this file
  the 415 laws: each negated alone, with its proof and every other law intact, in a copy of the whole file, compiled
  on Lean 4.19.0; refused, a proof failure located at the negated law: 415 of 415; survived: none; parse failures:
  none
  the planted vacuous law, judged in the same run, survived its negation, as dust must; the unmutated control
  compiled with no error
JUDGMENT PASSED

SEAL: theorem, conditional on the assumed bit (least erasure = Weil positivity = PrimeAct.positive = Λ ≤ 0 = the Li stream
  = Liouville faithfulness = the recursion of the line, least_erasure_is_the_recursion and least_erasure_iff_recursion),
  premise grade at the assumption; one field, visible in the input type of rh_from_the_act, whose axiom cone is empty
OWED to reach the rung: the complex carrier of Theorem 15.5 built in a library of the reals and complex numbers, with the
  chart's height generalized to the reals; identity, positivity_iff_line, rh_iff, lower and faithful_iff proved for zeta
  in the proof assistant; then the bit proved, which is the hypothesis, and which no route of this paper proves;
  the act supplies it at premise grade
FALSIFIER: one computed zero of ζ(s) with 0 < Re s < 1 and Re s ≠ 1/2, read into the chart off the line inside the open strip
  at a resolution n ≥ 2 (Section 18)

Its OWED line names fields of Section 12's structures that would be proved for zeta, faithful_iff among them, the field of the unpinned face LiouvilleFace, whose pinned successor LiouvilleFacePinned carries landau in its place; the cited fields are listed whole in Section 16, with Li's criterion (LiStream.li), Landau's equivalence (LiouvilleFacePinned.landau) and the reflection-closure (fold_closed) among them. The receipt records the identities of the edition: 3.2.0 is 3.1.4 with the header lines, the two sections and their pinned cones at the foot, which the receipt lists, and deleting those and restoring the version and the count returns 3.1.4 byte for byte, and every one of its 415 laws was judged afresh in the whole file; 3.1.4 differs from 3.1.1 exactly in the places the receipt lists, and its 394 laws are among the 415 judged afresh in this file; 3.1.1 is 3.1.0 with two header lines, section XXIII and its pinned cone line, and deleting those returns 3.1.0 byte for byte; 3.1.0 is 3.0.0 with two header lines, sections XXI and XXII and the appended cone lines, and deleting those returns 3.0.0 byte for byte, so the lineage of every definition, statement, proof, pin and print is on the record, and the judgment above covers the whole file. The digest printed in the receipt of 3.0.0 was taken on the comment-stripped source with every run of whitespace collapsed to one space, a normalization that receipt did not state; both digests of each of the four editions the receipt lists, 3.2.0, 3.1.4, 3.1.1 and 3.0.0, are printed above, each under its normalization.

B.2 Every cone, as printed by the compiler

The 231 lines below are the compiler's own output on the unpinned #print axioms commands at the foot of the kernel, unedited. A further 237 cones, listed in B.2.1, are pinned under #guard_msgs: the expected text stands in a docstring beside each command (Appendix A), the compiler compares its output with that text and prints nothing when they agree, and a compile in which any one of them differs fails. Together the two lists cover every theorem of the file. The three standard axioms of the Lean core, propext, Classical.choice and Quot.sound, are the only axioms any theorem depends on.

'PrimeFreedom.arrow_exists' does not depend on any axioms
'PrimeFreedom.aperture_one_bit_wide' does not depend on any axioms
'PrimeFreedom.prime_fibre' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.prime_off_seat' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.freedom_is_exactly_two' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.seat_is_zero' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.exists_prime_dvd' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.leastDivisor_prime' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.determined_by_primes' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.fold_preserves_offline' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.offline_zero_quadruple' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.not_rh_has_offline_witness' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.denial_posits_the_orbit' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.record_blind_at_every_scale' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.euclid_lemma' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.pExp_mul' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.padicMeasure_additive' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.prime_freedom_independent' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.primes_base_of_freedom' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.arrow_multiplicative' depends on axioms: [propext]
'PrimeFreedom.arrow_at_prime' does not depend on any axioms
'PrimeFreedom.finite_never_forces' does not depend on any axioms
'PrimeFreedom.limit_not_forced' does not depend on any axioms
'PrimeFreedom.nothing_escapes_one_cut' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.sides_together' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.rh_iff_no_left' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.record_decides_nothing' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.unicorn_block' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.keyless_forces_nothing' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.least_erasure_is_the_value' does not depend on any axioms
'PrimeFreedom.supply_iff' does not depend on any axioms
'PrimeFreedom.faces_are_one' does not depend on any axioms
'PrimeFreedom.rh_from_the_act_generic' does not depend on any axioms
'PrimeFreedom.rh_from_the_act' does not depend on any axioms
'PrimeFreedom.rh_ground_closure_complete' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.primes_exist' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.primes_exist_forces_nothing' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.prime_freedom_forces_nothing' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.arrow_forces_nothing' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.free_basis_coexists_with_offline_world' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.fold_off_line_stays_off' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.positivity_on_zero_side' does not depend on any axioms
'PrimeFreedom.least_erasure_is_positivity' does not depend on any axioms
'PrimeFreedom.prime_witness_iff' does not depend on any axioms
'PrimeFreedom.rh_from_prime_witness' does not depend on any axioms
'PrimeFreedom.positivity_is_keyed' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.freedom_does_not_pick_the_sign' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.prime_witness_ledger' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.posit_is_the_conclusion' does not depend on any axioms
'PrimeFreedom.rh_from_prime_act' does not depend on any axioms
'PrimeFreedom.acts_are_one' does not depend on any axioms
'PrimeFreedom.record_decides_nothing_free' does not depend on any axioms
'PrimeFreedom.unicorn_block_free' does not depend on any axioms
'PrimeFreedom.keyless_forces_nothing_free' does not depend on any axioms
'PrimeFreedom.arrow_forces_nothing_free' does not depend on any axioms
'PrimeFreedom.least_erasure_reads_past_the_record_free' does not depend on any axioms
'PrimeFreedom.positivity_is_keyed_free' depends on axioms: [propext]
'PrimeFreedom.admissible_transfers' does not depend on any axioms
'PrimeFreedom.no_admissible_triad_forces' does not depend on any axioms
'PrimeFreedom.no_admissible_coalition_forces' does not depend on any axioms
'PrimeFreedom.spend_is_not_admissible' does not depend on any axioms
'PrimeFreedom.three_axis_lock' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.freedom_alone_open' does not depend on any axioms
'PrimeFreedom.certified_height_never_forces' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.certified_worlds_share_the_record_below' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.HeatFlow.disc_flow' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.HeatFlow.forward_preserves' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.HeatFlow.erasure_finite' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.HeatFlow.lam_nonneg' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.HeatFlow.real_at_lam' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.HeatFlow.lam_least' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.HeatFlow.lam_zero_iff_real' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.HeatFlow.de_bruijn_tight' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.HeatFlow.collision' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.HeatFlow.disc3_step' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.HeatFlow.disc3_strict' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.HeatFlow.disc3_monotone' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.HeatFlow.cubic_forward_preserves' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.HeatFlow.flow_injective' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.HeatFlow.certificate_two_worlds' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.HeatFlow.certificate_decides_nothing' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.HeatFlow.certification_never_forces' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.HeatFlow.zero_slack' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.HeatFlow.backward_not_forced' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.HeatFlow.family_least_erasure' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.heat_bit_is_one_inequality' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.family_bit_is_one_inequality' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.heat_model_reads_as_the_carrier' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.Liouville.lam_mult' does not depend on any axioms
'PrimeFreedom.Liouville.lam_flips_at_primes' does not depend on any axioms
'PrimeFreedom.Liouville.polya_holds_to_200' does not depend on any axioms
'PrimeFreedom.liouville_is_the_sign_arrow' does not depend on any axioms
'PrimeFreedom.rh_from_faithful' does not depend on any axioms
'PrimeFreedom.faithful_is_the_bit' does not depend on any axioms
'PrimeFreedom.the_posit_in_every_coordinate' depends on axioms: [propext]
'PrimeFreedom.modes' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.lossless_iff_rh' does not depend on any axioms
'PrimeFreedom.stable_iff_rh' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.five_readings_agree' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.no_record_reading_returns_any_face' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.same_for_every_reader' does not depend on any axioms
'PrimeFreedom.no_private_bit' does not depend on any axioms
'PrimeFreedom.spend_has_no_reader' does not depend on any axioms
'PrimeFreedom.the_harvest' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.placement' does not depend on any axioms
'PrimeFreedom.soundness_is_load_bearing' does not depend on any axioms
'PrimeFreedom.ground_exceeds_ladder' does not depend on any axioms
'PrimeFreedom.independent_axioms_are_separate_bits' does not depend on any axioms
'PrimeFreedom.root_is_keyless' does not depend on any axioms
'PrimeFreedom.keyless_crosses' does not depend on any axioms
'PrimeFreedom.root_decides_no_keyed' does not depend on any axioms
'PrimeFreedom.choice_is_keyed' does not depend on any axioms
'PrimeFreedom.root_does_not_cross_choice' does not depend on any axioms
'PrimeFreedom.line_is_keyed_over_worlds' does not depend on any axioms
'PrimeFreedom.root_does_not_cross_the_line' does not depend on any axioms
'PrimeFreedom.refutation_is_one_point' does not depend on any axioms
'PrimeFreedom.cant_refute_seals' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.cant_refute_seals_dec' does not depend on any axioms
'PrimeFreedom.rh_iff_cant_refute' does not depend on any axioms
'PrimeFreedom.independence_forces_truth' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.cant_prove_does_not_seal_false' does not depend on any axioms
'PrimeFreedom.cant_asymmetry' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.round_trip_identity' does not depend on any axioms
'PrimeFreedom.absolute_returns_unchanged' does not depend on any axioms
'PrimeFreedom.trip_adds_presence_only' does not depend on any axioms
'PrimeFreedom.massless_arrow' does not depend on any axioms
'PrimeFreedom.any_true_premise_serves' does not depend on any axioms
'PrimeFreedom.the_line_round_trips' does not depend on any axioms
'PrimeFreedom.ladder_blocked' does not depend on any axioms
'PrimeFreedom.the_road' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.vocabulary_law' does not depend on any axioms
'PrimeFreedom.every_face_proves_every_face' does not depend on any axioms
'PrimeFreedom.chart_faces_prove_each_other' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.fold_fold' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.fold_law_admissible' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.same_record_eq' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.record_reading_admissible' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.admissible_const' does not depend on any axioms
'PrimeFreedom.keyless_denial_respects' does not depend on any axioms
'PrimeFreedom.admissible_not' does not depend on any axioms
'PrimeFreedom.admissible_and' does not depend on any axioms
'PrimeFreedom.admissible_or' does not depend on any axioms
'PrimeFreedom.admissible_never_decides' does not depend on any axioms
'PrimeFreedom.coalition_admissible' does not depend on any axioms
'PrimeFreedom.no_coalition_decides' does not depend on any axioms
'PrimeFreedom.triaxial_cut_irreducible' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.ladder_proof_lands_on_least_erasure' does not depend on any axioms
'PrimeFreedom.ladder_proof_iff_least_erasure' does not depend on any axioms
'PrimeFreedom.lineTheory_sound' does not depend on any axioms
'PrimeFreedom.a_sound_theory_may_prove_the_line' does not depend on any axioms
'PrimeFreedom.route_ledger_is_computed' does not depend on any axioms
'PrimeFreedom.route_ledger_counts' does not depend on any axioms
'PrimeFreedom.route_status_total' does not depend on any axioms
'PrimeFreedom.blocked_iff_theorem' does not depend on any axioms
'PrimeFreedom.reader_frame' does not depend on any axioms
'PrimeFreedom.the_front' does not depend on any axioms
'PrimeFreedom.orientation_two_valued' does not depend on any axioms
'PrimeFreedom.orientations_distinct' does not depend on any axioms
'PrimeFreedom.seat_is_one' does not depend on any axioms
'PrimeFreedom.findLeastFrom_correct' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.leastDivisor_spec' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.dvd_remainder_mul' depends on axioms: [propext]
'PrimeFreedom.leastMulDvd_spec' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.findGt_spec' does not depend on any axioms
'PrimeFreedom.findGt_max' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.pExp_dvd' depends on axioms: [propext]
'PrimeFreedom.two_pow_ge' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.pow_dvd_bound' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.pExp_le_of_dvd' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.mul_mul_mul_comm_nat' depends on axioms: [propext]
'PrimeFreedom.pExp_self' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.pExp_eq_zero_of_not_dvd' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.pExp_one' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.pExp_other' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.signArrow_add' depends on axioms: [propext]
'PrimeFreedom.fold_fixed_iff' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.reg_fixes_line' does not depend on any axioms
'PrimeFreedom.unicorn_never_registered' does not depend on any axioms
'PrimeFreedom.W1_closed' does not depend on any axioms
'PrimeFreedom.W1_rh' does not depend on any axioms
'PrimeFreedom.pair_closed' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.pair_not_rh' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.pair_same_record' does not depend on any axioms
'PrimeFreedom.W2_closed' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.W2_not_rh' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.same_record_12' does not depend on any axioms
'PrimeFreedom.fibre_is_infinite' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.lossless_unique' does not depend on any axioms
'PrimeFreedom.sentence_separates_record_does_not' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.record_is_lossless' does not depend on any axioms
'PrimeFreedom.record_same' does not depend on any axioms
'PrimeFreedom.least_erasure_reads_past_the_record' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.posit_is_the_value' does not depend on any axioms
'PrimeFreedom.fold_onLine_iff' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.fold_ne_of_offline' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.primes_exist_keyless' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.prime_freedom_keyless' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.arrow_keyless' does not depend on any axioms
'PrimeFreedom.W2f_closed' does not depend on any axioms
'PrimeFreedom.W2f_not_rh' does not depend on any axioms
'PrimeFreedom.same_record_f' does not depend on any axioms
'PrimeFreedom.weaker_never_forces' does not depend on any axioms
'PrimeFreedom.weaker_at_the_twin_never_forces' does not depend on any axioms
'PrimeFreedom.rh_from_li' does not depend on any axioms
'PrimeFreedom.li_is_the_bit_stream' does not depend on any axioms
'PrimeFreedom.root_has_an_act' does not depend on any axioms
'PrimeFreedom.fold_face_keyless' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.fold_face_on_twin' does not depend on any axioms
'PrimeFreedom.fold_face_on_line' does not depend on any axioms
'PrimeFreedom.record_face_keyless' does not depend on any axioms
'PrimeFreedom.arrow_face_keyless' does not depend on any axioms
'PrimeFreedom.closure_face_on_line' does not depend on any axioms
'PrimeFreedom.closure_face_fails_on_twin' does not depend on any axioms
'PrimeFreedom.fold_keeps_even' does not depend on any axioms
'PrimeFreedom.residence_orientation_reversing' depends on axioms: [propext]
'PrimeFreedom.reg_kills_odd' does not depend on any axioms
'PrimeFreedom.reg_keeps_even' does not depend on any axioms
'PrimeFreedom.reg_idempotent' does not depend on any axioms
'PrimeFreedom.onLine_iff_odd_zero' depends on axioms: [propext]
'PrimeFreedom.odd_pair_opposite' depends on axioms: [propext]
'PrimeFreedom.wall_on_the_chart' does not depend on any axioms
'PrimeFreedom.value_is_recursion' does not depend on any axioms
'PrimeFreedom.recursion_is_value' does not depend on any axioms
'PrimeFreedom.recursion_on_the_line' does not depend on any axioms
'PrimeFreedom.root_recursion' does not depend on any axioms
'PrimeFreedom.HeatFlow.sq_nonneg' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.HeatFlow.cube_diff' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.HeatFlow.disc3_monotone_rec' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.HeatFlow.famLam_nonneg_rec' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.HeatFlow.family_least_erasure_rec' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.root_act' does not depend on any axioms

B.2.1 The 237 pinned cones, as pinned in the source

'PrimeFreedom.least_erasure_is_the_value' does not depend on any axioms
'PrimeFreedom.least_erasure_is_positivity' does not depend on any axioms
'PrimeFreedom.spend_is_the_line' does not depend on any axioms
'PrimeFreedom.record_decides_nothing_free' does not depend on any axioms
'PrimeFreedom.keyless_forces_nothing_free' does not depend on any axioms
'PrimeFreedom.rh_from_the_act' does not depend on any axioms
'PrimeFreedom.rh_from_prime_act' does not depend on any axioms
'PrimeFreedom.acts_are_one' does not depend on any axioms
'PrimeFreedom.primes_base_of_freedom' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.spend_is_not_the_free_basis' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.rh_on_the_spent_bit' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.prime_arc_sealed' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.rh_is_the_weakest_forcing_premise' does not depend on any axioms
'PrimeFreedom.li_prefix_never_forces' does not depend on any axioms
'PrimeFreedom.rh_from_the_sign' does not depend on any axioms
'PrimeFreedom.rh_iff_the_sign' does not depend on any axioms
'PrimeFreedom.spends_are_one' does not depend on any axioms
'PrimeFreedom.line_not_self_grounding' does not depend on any axioms
'PrimeFreedom.sign_realized_both_ways' depends on axioms: [propext]
'PrimeFreedom.the_vestigial_posit' depends on axioms: [propext]
'PrimeFreedom.exactly_one_face_is_keyed' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.arrow_is_not_the_line' does not depend on any axioms
'PrimeFreedom.template_binds_iff_seed' does not depend on any axioms
'PrimeFreedom.the_seed_is_the_spend' does not depend on any axioms
'PrimeFreedom.the_template_plugged_in' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.fold_negates_odd' depends on axioms: [propext]
'PrimeFreedom.rh_iff_even_eigenspace' depends on axioms: [propext]
'PrimeFreedom.record_blind_to_odd' does not depend on any axioms
'PrimeFreedom.side_odd_off_line' depends on axioms: [propext]
'PrimeFreedom.record_never_reads_the_side' depends on axioms: [propext]
'PrimeFreedom.colocation_is_a_calibration' depends on axioms: [propext]
'PrimeFreedom.calibration_realized_both_ways' depends on axioms: [propext]
'PrimeFreedom.recursion_fails_on_the_twin' does not depend on any axioms
'PrimeFreedom.least_erasure_is_the_recursion' does not depend on any axioms
'PrimeFreedom.the_mirror_at_minus_one' depends on axioms: [propext]
'PrimeFreedom.no_admissible_coalition_forces' does not depend on any axioms
'PrimeFreedom.spend_is_not_admissible' does not depend on any axioms
'PrimeFreedom.certified_height_never_forces' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.HeatFlow.lam_nonneg' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.HeatFlow.lam_zero_iff_real' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.HeatFlow.certificate_decides_nothing' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.HeatFlow.zero_slack' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.heat_bit_is_one_inequality' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.liouville_is_the_sign_arrow' does not depend on any axioms
'PrimeFreedom.Liouville.polya_holds_to_200' does not depend on any axioms
'PrimeFreedom.the_posit_in_every_coordinate' depends on axioms: [propext]
'PrimeFreedom.five_readings_agree' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.spend_has_no_reader' does not depend on any axioms
'PrimeFreedom.the_harvest' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.placement' does not depend on any axioms
'PrimeFreedom.soundness_is_load_bearing' does not depend on any axioms
'PrimeFreedom.ground_exceeds_ladder' does not depend on any axioms
'PrimeFreedom.root_decides_no_keyed' does not depend on any axioms
'PrimeFreedom.root_does_not_cross_the_line' does not depend on any axioms
'PrimeFreedom.cant_refute_seals' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.rh_iff_cant_refute' does not depend on any axioms
'PrimeFreedom.independence_forces_truth' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.cant_prove_does_not_seal_false' does not depend on any axioms
'PrimeFreedom.round_trip_identity' does not depend on any axioms
'PrimeFreedom.massless_arrow' does not depend on any axioms
'PrimeFreedom.ladder_blocked' does not depend on any axioms
'PrimeFreedom.the_road' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.vocabulary_law' does not depend on any axioms
'PrimeFreedom.every_face_proves_every_face' does not depend on any axioms
'PrimeFreedom.chart_faces_prove_each_other' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.record_reading_admissible' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.admissible_not' does not depend on any axioms
'PrimeFreedom.admissible_and' does not depend on any axioms
'PrimeFreedom.admissible_or' does not depend on any axioms
'PrimeFreedom.admissible_never_decides' does not depend on any axioms
'PrimeFreedom.coalition_admissible' does not depend on any axioms
'PrimeFreedom.no_coalition_decides' does not depend on any axioms
'PrimeFreedom.triaxial_cut_irreducible' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.ladder_proof_lands_on_least_erasure' does not depend on any axioms
'PrimeFreedom.ladder_proof_iff_least_erasure' does not depend on any axioms
'PrimeFreedom.a_sound_theory_may_prove_the_line' does not depend on any axioms
'PrimeFreedom.route_ledger_is_computed' does not depend on any axioms
'PrimeFreedom.blocked_iff_theorem' does not depend on any axioms
'PrimeFreedom.reader_frame' does not depend on any axioms
'PrimeFreedom.the_front' does not depend on any axioms
'PrimeFreedom.reg_on_line' does not depend on any axioms
'PrimeFreedom.record_rh' does not depend on any axioms
'PrimeFreedom.record_has_least_erasure' does not depend on any axioms
'PrimeFreedom.record_closed' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.record_carried_by_least_erasure' does not depend on any axioms
'PrimeFreedom.admissible_holds_on_the_lossless_world' does not depend on any axioms
'PrimeFreedom.every_reading_holds_on_the_lossless_world' does not depend on any axioms
'PrimeFreedom.every_coalition_holds_on_the_lossless_world' does not depend on any axioms
'PrimeFreedom.record_never_testifies_against' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.pair_two_points_one_record' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.offCount_zero_iff' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.fincfg_closed' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.least_erasure_iff_zero_erased' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.landauer_floor_exact' does not depend on any axioms
'PrimeFreedom.price_zero_iff_least_erasure' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.denial_price_linear' depends on axioms: [propext]
'PrimeFreedom.reversible_commits_nothing' does not depend on any axioms
'PrimeFreedom.least_erasure_iff_no_point_off' depends on axioms: [propext]
'PrimeFreedom.rejection_is_a_witness' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.falsifier_form_constant' does not depend on any axioms
'PrimeFreedom.act_reenacts_root' does not depend on any axioms
'PrimeFreedom.root_does_not_cross_the_denial' does not depend on any axioms
'PrimeFreedom.assent_is_the_value' does not depend on any axioms
'PrimeFreedom.one_shape_two_registers' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.freedom_is_given_the_sign_is_spent' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.least_erasure_affirmed' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.sumBelow_add' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.sumBelow_congr' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.sumBelow_stable' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.sumBelow_zero' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.sumBelow_single' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.primeTest_iff' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.pExp_zero_above' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.extendTerm_zero_above' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.extendAssignment_bound' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.extendTerm_mul' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.extendAssignment_mul' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.extendTerm_other' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.extendAssignment_prime' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.extendAssignment_additive' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.primes_admit_every_assignment' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.omegaAll_mul' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.omegaAll_prime' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.liouvilleAll_mul' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.liouvilleAll_prime' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.liouvilleAll_one' depends on axioms: [propext]
'PrimeFreedom.liouvilleAll_agrees_to_30' depends on axioms: [propext]
'PrimeFreedom.pinned_face_reads' depends on axioms: [propext]
'PrimeFreedom.pinned_face_is_a_face' depends on axioms: [propext]
'PrimeFreedom.rh_iff_own_record' does not depend on any axioms
'PrimeFreedom.least_erasure_is_least' depends on axioms: [propext]
'PrimeFreedom.record_is_the_least' does not depend on any axioms
'PrimeFreedom.the_closure' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.Carrier.record_same_C' does not depend on any axioms
'PrimeFreedom.Carrier.least_erasure_is_the_value_C' does not depend on any axioms
'PrimeFreedom.Carrier.rh_iff_own_record_C' does not depend on any axioms
'PrimeFreedom.Carrier.one_record_C' does not depend on any axioms
'PrimeFreedom.Carrier.worlds_differ_C' does not depend on any axioms
'PrimeFreedom.Carrier.no_reading_decides_C' does not depend on any axioms
'PrimeFreedom.Carrier.chart_is_an_instance' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.Carrier.the_closure_on_any_carrier' does not depend on any axioms
'PrimeFreedom.Carrier.lossless_unique_C' does not depend on any axioms
'PrimeFreedom.socket_is_the_value' does not depend on any axioms
'PrimeFreedom.closure_takes_a_term' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.closure_at_a_term' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.forces_or_has_a_twin' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.withPair_closed' does not depend on any axioms
'PrimeFreedom.withPair_same_record' does not depend on any axioms
'PrimeFreedom.withPair_not_rh' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.record_forcing_fails_everywhere' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.forcing_is_the_value_or_stronger' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.forcing_fills_the_socket' does not depend on any axioms
'PrimeFreedom.face_is_the_socket' does not depend on any axioms
'PrimeFreedom.named_faces_are_the_socket' depends on axioms: [propext]
'PrimeFreedom.walk_is_the_walk_of_one' depends on axioms: [propext]
'PrimeFreedom.faithful_is_the_sentence_of_one' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.blind_assignment_vanishes' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.blind_walk' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.blind_is_unfaithful' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.faithful_reads_the_primes' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.the_socket' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.fold₂_fixed_iff' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.open_strip_forces_at_resolution_one' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.innerPair₂_strip' does not depend on any axioms
'PrimeFreedom.innerPair₂_not_rh' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.open_strip_forces_nothing_at_resolution_two' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.keyless_forces_nothing₂' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.withPair₂_strip' does not depend on any axioms
'PrimeFreedom.withPair₂_same_record' does not depend on any axioms
'PrimeFreedom.withPair₂_not_rh' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.record_forcing_fails_in_the_strip' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.no_reading_decides_in_the_strip' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.forces_or_has_a_twin₂' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.the_socket_in_the_strip' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.double_security' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.denial_reenacts_root' does not depend on any axioms
'PrimeFreedom.external_proof_adds_nothing' does not depend on any axioms
'PrimeFreedom.seated_undeniable' does not depend on any axioms
'PrimeFreedom.undeniable_root_forces_no_value' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.root_read_on_row_is_keyed' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.least_erasure_unconditional' does not depend on any axioms
'PrimeFreedom.the_lock' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.indicator_pos' does not depend on any axioms
'PrimeFreedom.constructed_root_holds' does not depend on any axioms
'PrimeFreedom.root_at_zeros_is_the_hypothesis' does not depend on any axioms
'PrimeFreedom.root_at_zeros_is_least_erasure' does not depend on any axioms
'PrimeFreedom.root_at_zeros_is_keyed' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.admissible_forcing_is_vacuous' does not depend on any axioms
'PrimeFreedom.coalition_forcing_is_vacuous' does not depend on any axioms
'PrimeFreedom.an_admissible_premise_forces' does not depend on any axioms
'PrimeFreedom.int_two_mul' depends on axioms: [propext]
'PrimeFreedom.int_two_mul_sub' depends on axioms: [propext]
'PrimeFreedom.foldAt_invol' depends on axioms: [propext]
'PrimeFreedom.foldAt_fixed_iff' depends on axioms: [propext]
'PrimeFreedom.foldAt_specializes' does not depend on any axioms
'PrimeFreedom.foldAt_strip' depends on axioms: [propext]
'PrimeFreedom.foldAt_pair' depends on axioms: [propext]
'PrimeFreedom.rh_from_the_act_at' depends on axioms: [propext]
'PrimeFreedom.strip_does_not_supply_at' depends on axioms: [propext]
'PrimeFreedom.pair_outside_the_closed_strip' depends on axioms: [propext]
'PrimeFreedom.root_readings_joined' does not depend on any axioms
'PrimeFreedom.the_lock_on_the_constructed_root' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.firstOff_spec' does not depend on any axioms
'PrimeFreedom.offset_off_line' depends on axioms: [propext]
'PrimeFreedom.rejection_is_computed' depends on axioms: [propext]
'PrimeFreedom.least_erasure_iff_search_empty' depends on axioms: [propext]
'PrimeFreedom.the_posit_is_a_deed' does not depend on any axioms
'PrimeFreedom.keyed_reading_not_returned' does not depend on any axioms
'PrimeFreedom.no_record_reading_returns_any_reading' does not depend on any axioms
'PrimeFreedom.primes_are_a_free_basis' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.least_erasure_iff_recursion' does not depend on any axioms
'PrimeFreedom.certified_height_never_forces_closed' does not depend on any axioms
'PrimeFreedom.every_route_carries_its_theorem' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.the_tenth_is_the_refuter' depends on axioms: [propext, Classical.choice, Quot.sound]
'PrimeFreedom.the_tenth_is_barred_by_the_act' does not depend on any axioms
'PrimeFreedom.the_kinetic_bar' does not depend on any axioms
'PrimeFreedom.seeded_witness_iff_bound' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.twin_has_no_seeded_witness' does not depend on any axioms
'PrimeFreedom.line_world_has_a_seeded_witness' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.every_denial_is_an_act' does not depend on any axioms
'PrimeFreedom.root_denial_refutes_itself' does not depend on any axioms
'PrimeFreedom.line_denial_denies_the_assertion' does not depend on any axioms
'PrimeFreedom.line_denial_denies_every_seed' does not depend on any axioms
'PrimeFreedom.twin_carries_the_root_and_no_seed' does not depend on any axioms
'PrimeFreedom.the_root_alone_forces_nothing' does not depend on any axioms
'PrimeFreedom.the_act_asserts_the_line' does not depend on any axioms
'PrimeFreedom.the_act_seeds_its_constant_world' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.line_denial_refuted_on_the_act' does not depend on any axioms
'PrimeFreedom.two_denials' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.two_denials_at_the_root' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.nothing_left_open_on_the_act' does not depend on any axioms
'PrimeFreedom.computation_reading_the_act_lands_on_the_line' does not depend on any axioms
'PrimeFreedom.off_line_report_reads_no_act' does not depend on any axioms
'PrimeFreedom.a_computation_reading_no_act_is_not_forced' does not depend on any axioms
'PrimeFreedom.the_witness_forced_by_the_act' does not depend on any axioms
'PrimeFreedom.the_denials_and_the_witness' depends on axioms: [propext, Quot.sound]
'PrimeFreedom.the_capstone' depends on axioms: [propext, Quot.sound]

B.3 Reproduction

Extract Appendix A to a file named Every_Prime_3_2_0.lean, obtain the Lean 4.19.0 release binary for the machine (the toolchain of the receipt is the Linux x86_64 build, commit 6caaee842e94; the 4.22.0 build, commit ba2cbbf09d49, prints the same lines), and run lean Every_Prime_3_2_0.lean. The command must exit 0 and print exactly the lines of B.2, and nothing for the pinned cones of B.2.1. The sha256 of the extracted file must be the one in the receipt. The ground screen is a text scan of the comment-stripped source for sorry, admit, native_decide, #exit, skipKernelTC, unsafe, extern, implemented_by, macro, syntax, elab, IO, import and a declaration axiom; the file contains none. The judgment is reproduced by replacing the statement of any one theorem with its negation, leaving its proof and every other theorem intact, and recompiling: the compile must fail with an error located at that theorem, and a planted vacuous theorem (h : 1 = 2) : 0 = 1, proved ex falso by absurd h (by decide), must survive its own negation, which shows that the instrument can see dust proved by contradiction; the judgment reads the proof term and not the statement alone, so the same law proved by another term may be refused, and what it certifies of each law is that its proof does not also prove the negation, not that the law is free of vacuity; a law whose conclusion is False, a refutation such as root_denial_refutes_itself or line_denial_refuted_on_the_act, has a true negated conclusion, so its refusal under negation certifies its proof term, and its content is the refutation its statement states.

The cone note printed after every theorem statement of Sections 2 to 16 was checked against the compiler and not against memory: the kernel carries a printed or pinned #print axioms line for each of its 415 theorems, and it was compiled, and every note in the body is the printed line for the theorems it names, exactly; of the 415, 197 print no axiom, 150 propext and Quot.sound, 40 propext alone, and 28 add Classical.choice.

The comment text of the kernel was scanned against a stop list of the discipline's private vocabulary, so that a reader meets only mathematics and citations in its prose; identifiers are not scanned. The script and its result on Every_Prime_3_2_0.lean follow; the result was comment blocks scanned: 553 and stop-list hits: none.

# Vocabulary scan of the comment text of a Lean file against a stop list.
# Comments are the /- ... -/ blocks; pinned cone messages (/-- info: ... -/) are excluded.
import re,sys
STOP=["operating system","codex","Root Axiom","RAM","Tongue","the Number","register","deed","ΔM","grade",
      "consensus","Zenodo","harvest","cycle","FORGE","audit","sealed","architect","substrate","premise grade",
      "vestigial","capstone","reader's frame","trap","Bridge","warrant","PhysOS","kernel","executed","ghost","unicorn"]
src=open(sys.argv[1],encoding='utf-8').read(); hits=[]
for m in re.finditer(r'/-[\s\S]*?-/',src):
    t=m.group(0)
    if t.startswith('/-- info:'): continue
    line=src[:m.start()].count(chr(10))+1; flat=re.sub(r'\s+',' ',t)
    for w in STOP:
        if re.search(r'(?<![A-Za-z_])'+re.escape(w)+r'(?![A-Za-z_])',flat): hits.append((line,w))
print("comment blocks scanned:",len([m for m in re.finditer(r'/-[\s\S]*?-/',src) if not m.group(0).startswith('/-- info:')]))
print("stop-list hits:",hits if hits else "none")

B.4 The hypothesis ledger

Every structure of the kernel that carries a face of the bit or a cited fact, with the number of theorems whose source names it, and the verdict theorems whose dependency closure, computed by name over the source of sections I to XXVI, contains it. The verdict roots checked are least_erasure_is_the_value, rh_from_the_act, record_decides_nothing, keyless_forces_nothing, no_coalition_decides, certified_height_never_forces, rh_is_the_weakest_forcing_premise, prime_freedom_forces_nothing, socket_is_the_value, forces_or_has_a_twin, the_closure, double_security, open_strip_forces_nothing_at_resolution_two, vocabulary_law, wall_on_the_chart, rh_from_the_act_at; the closure of every one contains none of these structures but ActualZeros, the act's own structure, in the closures of the four that carry the act (rh_from_the_act, socket_is_the_value, the_closure, double_security), and ActualZerosAt, the same structure at resolution $n$, in the closure of rh_from_the_act_at alone; the field fold_closed, the functional equation, is cited, and the closing proof uses only the field supply. The statements naming ActualZeros are thirty: the four of Section 14; the ten of sections XIX to XXIV and the eleven of section XXII.c that Section 16 lists; in section XXV, the_lock_on_the_constructed_root, the_posit_is_a_deed, the_tenth_is_barred_by_the_act and the_kinetic_bar; and, in section XXVI, the_capstone. The definitions routeClaim and Computation.Reads name it in the claim of the ground route and in the reading of a computation. Sources and grades are those of Section 12 and, for Setting, of the directional result of Section 2.

Structure Theorems taking it Verdict theorems taking it
ConjSymmetry 2 none
Faces 4 none
ExplicitFormula 12 none
PrimeAct 9 none
LiStream 7 none
DBN 8 none
LiouvilleFace 3 none
LiouvilleFacePinned 3 none
SocketFace 3 none
Setting 9 none
ActualZeros 30 rh_from_the_act, socket_is_the_value, the_closure, double_security
ActualZerosAt 1 rh_from_the_act_at

B.5 The executed numbers, recomputed outside the compiler

The kernel executes its numbers inside the compile, by evaluation, so the compiler's acceptance is their first check. The script below recomputes them outside the compiler, in Python 3 with the standard library only, in code written apart from the kernel's: trial division for $\Omega$, the kernel's own algorithm for it (Liouville.omegaF), rewritten; repeated division for $v_p$; for the heat model, a route the kernel does not take, the heat operator $e^{-tD^2}$ applied to the coefficients of each quadratic by its terminating series, with a search for the least integer time from zero, the model's time being integer, at which the flowed quadratic is real-rooted, set against the kernel's closed formula for $\Lambda$; and, for the floor, the kernel's own integer product, evaluated outside the compiler, set against the floor computed at sixty digits from the exact $\ln 2$. The script was written by the scribe and is run by a separate interpreter (Appendix D, Independence). Its output follows the script, unedited.

# Recomputes, outside the compiler, the numbers the kernel executes. Python 3 standard library only.
from decimal import Decimal, getcontext
from fractions import Fraction
from math import factorial

def omega(n):                      # prime factors with multiplicity, by trial division
    k, d = 0, 2
    while d * d <= n:
        while n % d == 0:
            n //= d; k += 1
        d += 1
    return k + (1 if n > 1 else 0)

def lam(n): return 1 if omega(n) % 2 == 0 else -1

primes = [p for p in range(2, 100) if all(p % q for q in range(2, int(p ** 0.5) + 1))]
mult = sum(lam(a * b) == lam(a) * lam(b) for a in range(1, 41) for b in range(1, 41))
print(f"liouville  multiplicative on 1..40 x 1..40: {mult} of 1600 pairs")
print(f"liouville  primes below 100: {len(primes)}; lambda(p) = -1 at {sum(lam(p) == -1 for p in primes)} of them")
L, worst = 0, None
for x in range(1, 201):
    L += lam(x)
    if x >= 2 and (worst is None or L > worst): worst = L
print(f"polya      L(x) <= 0 for 2 <= x <= 200: {worst <= 0}; max of L on that range {worst}; L(200) = {L}")

def v(p, n):                       # the p-adic valuation, by repeated division
    k = 0
    while n % p == 0:
        n //= p; k += 1
    return k
sep = sum(v(p, p) == 1 and v(p, q) == 0 for p in primes for q in primes if p != q)
add = sum(v(p, a * b) == v(p, a) + v(p, b) for p in primes for a in range(1, 41) for b in range(1, 41))
print(f"p-adic     v_p(p) = 1 and v_p(q) = 0 for distinct primes below 100: {sep} of {25 * 24} ordered pairs")
print(f"p-adic     v_p(ab) = v_p(a) + v_p(b), p < 100, 1 <= a, b <= 40: {add} of {25 * 1600}")

def d2(p):                         # second derivative; coefficients listed from the constant term up
    return [k * (k - 1) * p[k] for k in range(2, len(p))]
def heat(p, t):                    # exp(-t D^2) p by its series, which terminates on a polynomial
    out, q, k = [Fraction(0)] * len(p), list(p), 0
    while q and any(q):
        for i, a in enumerate(q): out[i] += Fraction((-t) ** k, factorial(k)) * a
        q, k = d2(q), k + 1
    return out
def real_rooted(p):                # c + b z + z^2 has real roots exactly when b^2 - 4c >= 0
    c, b, _ = p
    return b * b - 4 * c >= 0
def im_sq(p):                      # squared imaginary part of the roots of c + z^2
    return max(p[0], 0)
def least_time(b, c):              # least integer t >= 0 at which the flowed quadratic is real-rooted, by search
    t = 0
    while not real_rooted(heat([c, b, 1], t)): t += 1
    return t
def lam_kernel(b, c):              # the kernel's closed formula for Lambda, set against the search
    d = b * b - 4 * c
    return 0 if d >= 0 else (7 - d) // 8
grid = [(b, c) for b in range(-20, 21) for c in range(-60, 61)]
agree = sum(lam_kernel(b, c) == least_time(b, c) for b, c in grid)
zero_iff = sum((lam_kernel(b, c) == 0) == real_rooted(heat([c, b, 1], 0)) for b, c in grid)
tight = sum(im_sq(heat([c, 0, 1], t)) == max(im_sq(heat([c, 0, 1], 0)) - 2 * t, 0)
            for c in range(-60, 61) for t in range(0, 40))
print(f"heat       the kernel's Lambda equals the least integer time from zero at which the flowed quadratic is real-rooted: "
      f"{agree} of {len(grid)}")
print(f"heat       Lambda = 0 exactly when real-rooted at time zero: {zero_iff} of {len(grid)}; Lambda >= 0 on all: "
      f"{all(lam_kernel(b, c) >= 0 for b, c in grid)}")
print(f"heat       de Bruijn's bound tight for z^2 + c, 0 <= t < 40: {tight} of {121 * 40}")
print(f"heat       z^2 - 2: Lambda = {lam_kernel(0, -2)}, real-rooted at time -1: {real_rooted(heat([-2, 0, 1], -1))}")

getcontext().prec = 60
floor_int = 1380649 * 300 * 6931471805599453           # the kernel's own integer product, evaluated here
ln2 = Decimal(2).ln()
short = Decimal("1.380649E-23") * Decimal(300) * (ln2 - Decimal("0.6931471805599453"))
print(f"landauer   1380649 * 300 * 6931471805599453 = {floor_int}")
print(f"landauer   floor = {Decimal(floor_int) * Decimal(10) ** -45:.22E} J; shortfall against exact ln 2 "
      f"{short:.3E} J, relative {(ln2 - Decimal('0.6931471805599453')) / ln2:.3E}")
liouville  multiplicative on 1..40 x 1..40: 1600 of 1600 pairs
liouville  primes below 100: 25; lambda(p) = -1 at 25 of them
polya      L(x) <= 0 for 2 <= x <= 200: True; max of L on that range 0; L(200) = -16
p-adic     v_p(p) = 1 and v_p(q) = 0 for distinct primes below 100: 600 of 600 ordered pairs
p-adic     v_p(ab) = v_p(a) + v_p(b), p < 100, 1 <= a, b <= 40: 40000 of 40000
heat       the kernel's Lambda equals the least integer time from zero at which the flowed quadratic is real-rooted: 4961 of 4961
heat       Lambda = 0 exactly when real-rooted at time zero: 4961 of 4961; Lambda >= 0 on all: True
heat       de Bruijn's bound tight for z^2 + c, 0 <= t < 40: 4840 of 4840
heat       z^2 - 2: Lambda = 0, real-rooted at time -1: True
landauer   1380649 * 300 * 6931471805599453 = 2870978885078723755499100
landauer   floor = 2.8709788850787237554991E-21 J; shortfall against exact ln 2 3.901E-38 J, relative 1.359E-17

Every line agrees with the theorem it recomputes: Liouville.lam_mult, Liouville.lam_flips_at_primes and Liouville.polya_holds_to_200 (Theorems 8.3 and 8.4); pExp_self, pExp_other and pExp_mul on the stated ranges (Theorems 7.7 and 7.8); HeatFlow.real_at_lam, HeatFlow.lam_least, HeatFlow.lam_zero_iff_real, HeatFlow.lam_nonneg and HeatFlow.de_bruijn_tight on the stated grid; and landauer_floor_exact, with the shortfall Theorem 13.8 prints. The line for $z^2-2$ shows what the model's $\Lambda$ is, the least integer time from zero: a quadratic real-rooted at time zero has $\Lambda=0$, and the flow run backward stays real-rooted at time $-1$.

Appendix C. The harvest log

The harvest log, the record of the internal editions and the closing cards C.1 to C.4 of the first four audit cycles with note C.5, is published beside this paper as the companion file RH_3_1_3_Audit_and_Harvest_Log.md; the card numbers cited in this paper are the section numbers of that file. The fifth cycle, the self-audit of edition 3.1.4 named in Appendix D, is open in the audit log beside the paper and has no closing card yet. Edition 3.2.0 adds kernel sections XXII.c and XXVI, Section 16.1 with its eighth row, the sister kernel of Appendix T, a rewritten abstract and Conclusion and the recomputation of B.5, and takes its present title; every law of its kernel is judged afresh in the receipt of B.1, and the sixth cycle, the self-audit of this edition, ran eight rounds to a first cap, was resumed when the eighth row of Section 16.1, the sister kernel of Appendix T and the paragraph on the timeless closure were added, ran eight more rounds to a second cap of sixteen, and is open, with no closing card; its ledger and round records are in the audit log beside the paper.

Appendix D. Author's Provenance and Method Disclosure

This paper was developed under Trisduction (Islam 2026f), a verification and organizing discipline, not a source of results, with one source named where it is used: the step from count to heat behind Theorem 13.8 is a theorem of the operating system (Islam 2026a), conditional on its posit P1 (Appendix E.1). Its other conclusions rest on the standard results cited in the body and on the theorems of the kernel, and the closure rests on the act. Trisduction is the method under which those results were decomposed, assembled, and audited. It adds them no warrant and claims no authorship over them.

Trisduction was used for fidelity. It forces a claim onto three independent axes so no single persuasive line carries it alone, requires every verdict to resolve to one of three states, sealed, broken, or open, each with a named failure mechanism, and attaches an explicit grade, theorem, conditional, structural, corroboration or premise, to every claim so nothing is stated above its strength. Two errors it is built to catch are inflation, reading an internal lock as a proof, and circularity, reading a restatement of a claim as a derivation of it.

The root axiom, RA, is that to exist is to actuate. In this paper it is proved on its constructed domain, one existent whose actuation is one (Appendix R, RA₀; Appendix A, Root, constructed_root_holds), where it is a theorem on no axiom, and the bare schema over every domain is not a theorem (root_readings_joined). Its physical reading, that every physical existent carries a strictly positive energetic cost, grounded in the Heisenberg energy floor, the zero-point energy, and Landauer's bound, is the reading of the actual world through the root, the row's reading, named as such and carried at the grade of its corroboration; the closing theorem consumes the reading at the zeros, least erasure, and no part of the physical reading. The formal root inside it is that to formally be is to be grounded, with provability and computation levels of access to a determinacy fixed at the ground rather than ingredients of it.

::: {.box title="Nature of Root Axiom"} The root is triaxial, and that is the force of the cut. A characterless existence has no triaxiality: one scalar, no fold, no seat, nothing to lock. The root, to exist is to actuate, carries three axes, and they are not chosen: for every actuation, the direction of its deed gives the fold, the registration and the seat, and the registration is the only height-keeping map onto the seat. The deed is the direction: a denial spends the deed and instances the root. The registration is the fold's record: it keeps the height and forgets the side, and the two even axes, symmetry and record, are closed under combination and blind. The seat is the fixed set, where the two blind spots cancel, and the third axis is the one orientation the even pair cannot supply. Two axes never determine the point; three do. The seven rows are one cut because each is an involution with a seat and one missing orientation. The root makes the third axis native as a place: the seat, and the one orientation still open there; the axes themselves force no orientation. Which way that orientation points is the value, and it is the root read on that seat. The root alone still forces no value.

Key to the statement, in the words of its receipts. The three axes are the two even axes, the fold's symmetry and the record, and the orientation, the side of a point of the actuation, which the even pair cannot supply; the fold, the registration and the seat are what the direction of the deed gives, and the seat is where the side is read. The point two axes never determine is a point off the seat: there the even pair does not tell a point from its reversal, and the record with the side locks the point; on the seat both blind spots cancel and nothing is open there to determine. A point of the actuation is a side and a height, and every point instances the root: the points are the actuation's deeds, and the deed is the direction in the sense that its side is its direction, reversed by the fold. The characterless case, one scalar, is a degenerate direction: the fold is the identity and the seat is total, which is to say no fold and no seat to lock. The axes are not chosen in the sense that, given the direction, the fold, the registration and the seat are forced, the registration the only height-keeping map onto the seat; the root's own actuation takes the integer direction, under which it is not characterless, while a degenerate direction over the same deeds would be (every_root_actuates, degenerate_is_characterless). The root read on that seat is the root read on the row at the seat point where a point and its reversal land with one record; that the orientation between them is the row's value bit is the paper's structural reading, a second statement beside its kernel's theorems, and no kernel states a map between the two. Each row carries the actuation's seat as the root of an actuation over its own deeds; a row's own seat, where its kernel states one, is a further statement of that kernel, named in the last row of the table, and on P versus NP it is vacant. A deed of the root is an inhabitant of its type of acts, which the root kernel's own comments call an act; in the root's actuation those deeds sit at the zero side, on the seat, and the points off the seat are the sides the direction supplies; the act, unqualified, is the field the closing theorem consumes, existence read at the zeros.

Receipts, each cited for what its statement says; R.1, R.2 and R.3 are the three kernels of Appendix R, every theorem of each on no axiom; the three theorems of the Master Codex are cited, not carried.

Clause of the statement Receipt
the root carries three axes, not chosen: every self-grounding root is the root of an actuation over its own deeds, and for every actuation, given the direction of its deed, the fold, the registration and the seat are forced, the registration the only height-keeping map onto the seat every_root_actuates, the_root_carries_three_axes, actuation_is_triaxial, registration_is_forced (Appendix R.2)
the registration is the only height-keeping map onto the seat registration_is_forced (R.2)
the axes force no orientation axes_force_no_orientation (R.2)
the deed is the direction: a deed of the actuation is a point, a side and a height, its side its direction, reversed by the fold; a reversed point is still a deed and instances the root; a denial spends the deed and instances the root fold, denial_instances_root (R.2); denial_reenacts_root, denial_instantiates (R.1)
the registration is the fold's record: it keeps the height, forgets the side and reads a point and its reversal alike; the fold is an involution; the even pair is closed under combination registration_is_the_folds_record, reg_forgets_side, reg_keeps_height, fold_involutive, fold_of_reg (R.2)
the two even axes are blind: no reading of the record returns the orientation; symmetry keyless, the line property keyed readings_of_the_record_are_blind, tongue_freedom (R.2); symmetry_is_keyless, line_property_is_keyed, exactly_one_stands (Islam 2026j, Master Codex v5.1.0, commit 5e55fca, cited for their statements, not carried; that Codex declares its root as an axiom, this paper's kernels declare none)
the seat is the fixed set, where both blind spots cancel; off the seat both stand seat_iff_zero_side, seat_cancels_both, off_seat_both, the_only_special_cut (R.2)
the registration lands on the seat; off the seat a point and its reversal land on one seat point with one record, and the orientation is what stays open there; every reading of the record reads both alike reg_lands_on_seat, open_at_the_seat, record_leaves_the_orientation, readings_of_the_record_are_blind (R.2)
the characterless case, no fold and no seat to lock: over a degenerate direction, one side only, the fold is the identity and every point is on the seat; the root's actuation is not degenerate degenerate_is_characterless, intDir_not_degenerate, every_root_actuates (R.2)
the bridge atom is an actuation, and not characterless the_bridge_atom, the_atom_is_not_characterless, the_triaxial_seal (R.2)
the scalar ground in the algebra, a third reading beside the actuation's: the Return, the line the conjugation fixes and the twelve gates, bound with the root the_return, the_line_is_the_fixed_set, twenty_four_units_twelve_gates, the_class_equation, the_master_seal (R.1)
the root at theorem grade on the Codex's ledger rule, the grade read from the evidence the root is entered with, a warrant reading theorem and a posit premise, and not elected, and RA–Tongue co-location inheriting it a_warranted_root_is_theorem_grade, the_ledger_reads_the_warrant, the_grade_is_not_elected, ra_is_theorem_grade, coloc_grade_is_the_roots_grade, the_ledger_seal (R.3)
two axes never determine the point; three do: off the seat the even pair does not tell a point from its reversal, and the record with the side, which carries the orientation, locks the point; on the seat both blind spots cancel and nothing is open to determine; on the chart no admissible reading of the record decides even_pair_leaves_two, orientation_locks_the_act, seat_cancels_both (R.2); admissible_never_decides, triaxial_cut_irreducible (this paper's kernel; the lock's triple of Theorem 11.6, freedom, fixedness and collapse, three_axis_lock, is a second triple, named so there)
the root alone forces no value; the root read at the zeros is least erasure, the hypothesis undeniable_root_forces_no_value; root_at_zeros_is_least_erasure, root_at_zeros_is_the_hypothesis (this paper's kernel)
the seven rows are one cut: each row's root is an actuation, so each carries an involution, the fold, with a seat and one missing orientation every_root_actuates, the_root_carries_three_axes (R.2), stated for every self-grounding root and read at the constructed root rootSelfGrounding, constructed_root_holds of this paper's kernel, whose structure repeats R.2's SelfGrounding field for field; the row's own seat is the critical line, the fixed set of the fold (fold_fixed_iff), a statement of this kernel beside the actuation's seat; the row ledger of Islam (2026h, Book III), cited
:::

The key procedures, in brief. Orthogonal triaxial convergence: a proposition is split into three disjoint axes, formal-structural, empirical or dynamical, and registrational, verified by three separate instrument sets, agreement across the three the operational meaning of a seal. The Geometric Orthogonal Lock, GOL: the three axes are read as vectors and their independence is tested by the determinant of their correlation matrix, a determinant clear of zero a genuine three-dimensional lock, a collapse to zero one axis dissolving into the plane of the other two, a broken lock. The Convergence Dissolution Test, CDT: before the lock is read, any mass-bearing common cause the three axes might share is projected out, so an apparent convergence that traces to a shared source rather than to independent roads dissolves and carries no warrant, the lock computed on the residue that survives. The twelve-gate cascade: twelve directed failure screens, self-reference, frame-dependence, missing mechanism, and the rest, run in order, the first failure terminating the verdict with its mechanism named. The verdict issues in the three-state economy with its grade attached, and where the argument stops short the open direction is named rather than filled.

\begin{jbox} \textbf{G1 · The GOL kernel identity, proved.}\quad The lock is a determinant identity, not a metaphor. Let the three axes, after normalization, be unit vectors expressed in an orthonormal basis of the subspace they span and read as pure quaternions $a, b, c$, with norm one each. Hamilton's product of two pure quaternions is $pq = -(p\cdot q) + p\times q$, the real part the negative dot product and the imaginary part the cross product, checked on the units by $ij = k = i\times j$ and $ii = -1 = -(i\cdot i)$. The lock scalar is the real part of the triple product, $\lambda = \mathrm{Re}(abc)$. Expanding, $ab = -(a\cdot b) + a\times b$, so $\mathrm{Re}(abc) = -(a\cdot b),\mathrm{Re}(c) + \mathrm{Re}((a\times b)c)$. The first term is zero since $c$ is pure, and the second is $-(a\times b)\cdot c$ by the same product rule, giving $\lambda = -(a\times b)\cdot c = -\det[a\ b\ c]$, minus the signed volume of the parallelepiped the three axes span. Writing $A$ for the matrix whose columns are $a, b, c$, the correlation matrix is $R = A^{\mathsf T}A$, its entries the pairwise dot products, so $\det(R) = \det(A^{\mathsf T}A) = \det(A)^2 = \lambda^2$. The kernel identity $\lambda^2 = \det(R)$ is that the squared signed volume equals the Gram determinant, with the quaternion triple product the machine that computes the volume. It is confirmed at machine precision, the residual $|\lambda^2 - \det(R)|$ at $2\times10^{-16}$ on the recorded battery. \end{jbox}

Four consequences fix the reading, and they are why the number can be trusted to say what the lock says. The determinant is bounded, $\det(R)$ in the interval from zero to one for unit axes, by Hadamard's inequality above and positive-semidefiniteness below, so the lock has a hard ceiling at one, the fully orthogonal frame, and a hard floor at zero. The floor is the break: $\det(R)$ equals zero exactly when the three axes are linearly dependent, one axis lying in the plane of the other two, which is the geometric content of a collapsed lock. The magnitude is orientation-blind: reflecting any axis sends $A$ to a matrix of opposite determinant, flipping the sign of $\lambda$ while $\det(R) = \lambda^2$ is unchanged, so the number certifies the dimensionality of the lock and never its truth-sign, which is read from the ordered axes and not from the scalar. And the magnitude is frame-invariant: rotating all three axes together is conjugation $q \mapsto uq\bar u$ on the imaginary quaternions, under which the real part is preserved and dot and cross products are covariant, so $\lambda$ and $\det(R)$ depend on the configuration and not on the coordinate labels.

The axis count is three because the algebra forces it, not because three was chosen. The audit-composition law requires associativity, so iterated audits bracket the same way, and the absence of zero divisors, so nonzero warrants never compound to nothing. By Frobenius's theorem the only finite-dimensional associative division algebras over the reals are the reals, the complex numbers, and the quaternions, and three mutually orthogonal imaginary axes exist only in the quaternions, whose imaginary units $i, j, k$ are the three axes. The next normed division algebra, the octonions with seven imaginary units, fails associativity, witnessed, under the multiplication $e_ie_{i+1}=e_{i+3}$ with indices mod 7, by the nonzero associator of $e_1, e_2, e_3$, a triple on no line of the Fano plane, while $e_1, e_2, e_4$ lie on a line and associate, so it cannot carry the composition law and the construction stops at three. The three axes are the imaginary part of the unique associative real division algebra that supports the audit.

This paper in particular. The three axes were the formal-structural axis, the 415 theorems of the kernel with their printed cones; the dynamical axis, the executed computations, the Liouville arrow with its multiplicativity on $40\times40$, its flip at the twenty-five primes below $100$ and Pólya's pattern to $200$, the polynomial heat flow with its computable $\Lambda$, and the constructed $p$-adic witness evaluated at the primes; and the registrational axis, the compiler's receipt, the ground screen, the two hundred and thirty-seven pinned cones and the judgment that negated every theorem alone. No numerical determinant was computed for this paper, because its lock is logical rather than statistical: the three axes are independent by kind, a theorem, a computation and a receipt, the computations recomputed outside the compiler by the exact arithmetic of B.5, and the lock is the pinned cone, which fails the compile if any of the 237 pinned cones grows, while the printed lines of B.2 change if any of the other 178 does. The load-bearing gate is the pair least_erasure_is_the_value and rh_is_the_weakest_forcing_premise, the equivalence that fixes the bit and the theorem that nothing weaker supplies it. The verdict is sealed at theorem grade conditional on the premise forced by theorem, which stands at premise grade; the closure never promotes it, and Theorem 14.7 shows why it cannot. No new theorem of analytic number theory is claimed; the paper reorganizes cited results on one chart and proves the equivalences of their coordinates, so the mass authored is zero.

Audit. The kernel behind this paper was sealed in stages: the free-basis kernel 2.0.0 with the earlier paper whose kernel it is (Islam 2026e), and each later pass, 2.1.0 to 2.9.0, compiled, screened and judged under negation before the next, with the judgments carried forward as recorded in Appendix C. Edition 3.0.0 passed one adversarial audit cycle across all six registers, kinematic, definitional, parameter, provenance, limit and symmetry, whose closing card is C.1; its prosecutions came from the scribe alone, and no external report was answered in it. Every receipt error that cycle found was repaired by exact replacement, the cone notes of the body regenerated from the compiler's own print, and the locked verdict of Section 0.1 was held. Edition 3.1.0 passed a second cycle, whose closing card is C.2; its intake included four audits of edition 3.0.0 written by external AI substrates, Grok, Gemini, Meta AI and ChatGPT, whose findings entered the ledger beside the scribe's own and were each disposed of by theorem, repair or refusal. The planted controls of both cycles were of SELF grade; the prosecuting side of the first was the scribe alone, so that audit was single-substrate on both sides, while the second answered four independent substrates on the review side, the text and the files remaining one scribe's; the grade of the controls and the breadth of the prosecution are two facts and are not merged into one word. Edition 3.2.0 was prosecuted in a sixth cycle of sixteen rounds, eight to a first cap and eight more after the eighth row of Section 16.1, the sister kernel of Appendix T and the paragraph on the timeless closure were added, on the whole text with its new material as mandatory targets: kinematic and definitional in round one, parameter and provenance in rounds two and seven, limit and symmetry in rounds three to six and eight to sixteen; its prosecutions came from the scribe and from blind instances of the same model, each reading only the seeded copy of its round, and no external report was answered in it. Rounds one, two, seven, nine, eleven, twelve, fourteen and sixteen caught every planted control and are valid; the other eight each missed a control and are void, their findings kept and answered all the same. Every mathematical or receipt error it found was repaired by exact replacement, every objection to an established claim was refuted by the theorem that refutes it or, where it repeated an objection already answered, by that answer, and the title, subtitle and verdict locked at its entry were held; after the cycle the architect relocked the title and subtitle as they now stand and replaced the abstract with the present one, the verdict unchanged. Every round found text to correct or narrow, twelve findings in the last valid round, so the cycle issued no seal and is open at its cap; its planted controls were of SELF grade and its prosecution single-substrate on both sides. The terminal verdict of each closed cycle, and its voided and editorial rounds, are on its card; the fifth and sixth cycles are open (Appendix C). The architect sealed the present text as the edition of record on 7 October 2026; the sixth cycle's computed verdict stays open.

Editions. Kernels 2.0.0 through 2.9.0 are the internal editions of Appendix C; 3.0.0 is the comment-only rewrite of 2.9.0 whose stripped source is byte-identical to it; 3.1.0 is 3.0.0 with sections XXI and XXII and the full cone foot, and 3.0.0 is recovered from it byte for byte; 3.1.1 is 3.1.0 with section XXIII and its pinned cone, and 3.1.0 is recovered from it byte for byte; 3.1.4 differs from 3.1.1 exactly in the places B.1 lists: sections XXIV and XXV added before the namespace closes with their pins at the foot, and the header, section VIII, the comment of XVIII.e, section XXI and two proof lines adjusted, every other line 3.1.1's; 3.2.0, the kernel of record, is 3.1.4 with section XXII.c inserted before section XXIII, section XXVI before the namespace closes, their pinned cones at the foot and their lines in the header, and 3.1.4 is recovered from it byte for byte (B.1). Edition 3.1.1 passed a third, short cycle on its one added theorem and the restored word, whose closing card is C.3; edition 3.1.2 adds text only and passed a fourth, short cycle on it, whose closing card is C.4; edition 3.1.3 changes text and layout only, recorded in note C.5 of the companion log; edition 3.1.4 carries kernel 3.1.4, the lock of Section 0.4 and Appendix R; edition 3.2.0, the present text, carries kernel 3.2.0, Section 16.1, the sister kernel of Appendix T, the rewritten abstract and Conclusion, the recomputation of B.5 and the present title. Edition 3.1.4's new material, kernel sections XXIV and XXV and the three kernels of Appendix R, was prosecuted in the self-audit cycle run with this edition, its rounds recorded in the audit log beside the paper, at self grade. Edition 3.2.0's new material, kernel sections XXII.c and XXVI, Section 16.1 with its eighth row, Appendix T, the abstract as it then stood and the Conclusion, was prosecuted in the sixth cycle named above, and every law of kernel 3.2.0 was judged afresh under negation in the whole file on Lean 4.19.0, 415 of 415 refused (B.1); the present abstract, written after the cycle from the rows of Table 16.1, was not prosecuted.

Independence. The text of this paper and the files of Appendix A were written by the AI scribe named in E.4, under the direction and acceptance criteria of the author; the kernel of Appendix T is carried verbatim from the author's card of record (Islam 2026k), and its digest, its compile on both releases, its cones and its judgment were rechecked for this edition (Appendix T). The checker independent of the scribe is the Lean compiler with its kernel check, run in two releases, 4.19.0 and 4.22.0. The recomputation of B.5 is a script the scribe wrote, run by a separate interpreter: it checks the executed numbers outside the compiler, the heat model through the heat operator rather than through the kernel's formula and the floor through the kernel's own integer product, so it is independent of the compiler and not of the model's definitions or of the scribe. Neither checker is a reader of the argument. The boot of the Master Codex on the machine of the session (E.4) compiles the author's own kernels, those that Appendix E cites, with the same compiler; it checks that they compile and is not independent of the author. The four external audits on the record reviewed edition 3.0.0; no external review of editions 3.1.0 to 3.2.0 is on the record. The one open witness is a second substrate's extraction, compile and judgment of the file of Appendix A from this paper alone.

D.0 The three vocabularies

The body of the paper uses plain mathematical terms; the kernel uses identifiers; the discipline under which both were produced uses terms of its own, which the body admits where a theorem or a cited result names them, keyed and keyless, the seat, the root, the act, the floor and the operating system, and which are otherwise confined to this appendix and Appendix E. The table maps the three so that a reader who meets the third vocabulary in the sister papers can read it against the first two. No row adds a claim.

\begingroup\small

Plain term in the body Term of the discipline Kernel identifier
the reflection $s\mapsto1-\bar s$ the fold fold
the critical line, its fixed set the seat onLine, fold_fixed_iff
the projection onto the line registration reg, recordOf
the projected zero data the record SameRecord, RespectsRecord
a premise valid on every configuration keyless Keyless, KeylessOn
a premise true on some configuration and false on another keyed KeyedOn (the false half), line_is_keyed_over_worlds
a premise universal or record-respecting admissible, the even register Admissible, Coalition
the side of the line, one bit per reflected pair the orientation bit side, side_odd_off_line, aperture_one_bit_wide
the parity sign of an additive count, $(-1)^{\Omega(n)}$ for Liouville's function the arrow signArrow, liouville_is_the_sign_arrow
the extremal property equivalent to the hypothesis least erasure LeastErasure, least_erasure_affirmed
the count of off-line pairs, each listed once at a height of its own, one bit each erased bits, the ledger erasedBits, least_erasure_iff_zero_erased
the floor under the cost of an irreversible registration, one floor per erased bit the floor, the price of one erased bit FinCfg.price, landauerFloor
the premise forced by theorem, least erasure at the actual zero set, supplied by the act the act, the spend, the supplied bit ActualZeros.supply, rh_from_the_act
the equivalence of the five coordinates the five faces of one bit least_erasure_is_the_value, least_erasure_is_positivity, the_posit_in_every_coordinate; Faces carries five faces, the line in place of the Li stream
the reflection, the projection, the orientation the three axes of the cut, the triaxial cut triaxial_cut_irreducible
to exist is to actuate, proved on its constructed domain and for every root that grounds itself, the bare schema over every domain refuted; on the chart its token $0<1$ the root, the Root Axiom Root (Appendix A, section XXIV; RA₀ in Appendix R), read at the zeros as RootAtZeros, its readings joined in root_readings_joined; its token on the chart, RootAct, root_act, massless_arrow
what computation settles, what is proved, what is true the three strata Theory, placement
a claim's grade: theorem, conditional, structural, corroboration, premise the grade stated in prose here; refined in the root kernel's ledger, Grade (Appendix R.3)
a denial: the act of making it, the sentence it asserts the no: its deed, its content every_denial_is_an_act, root_denial_refutes_itself
a seeded timeless witness of the line; on the offset chart of Appendix T, the witness that holds exactly where the value does the monism witness, the root read twice SeededWitness, seeded_witness_iff_bound; RootReadTwice (Appendix T)
the twin $W_{2f}$, carrying the root and not its reading at the zeros the false world twin_carries_the_root_and_no_seed, root_at_zeros_is_keyed
a computation that reads the act a run on the act; the forced witness Computation.Reads, the_witness_forced_by_the_act
the closure bound whole in one theorem the capstone, the final cut the_capstone

\endgroup

D.1 The formal register: formal Trisduction, in brief

The body of this paper is written in the vocabulary of number theory and formal verification. The discipline that produced it has a formal register of its own, called here formal Trisduction, and its essence is stated once so that a reader can see what was translated.

Its root is that to formally be is to be grounded: a formal object exists where it is fixed by a symmetry of its own domain. The fixed set of an involution is the seat; in this paper the involution is the reflection $s\mapsto1-\bar s$ and the seat is the critical line (Theorem 5.3), and on the quaternions of the disclosure above the involution is conjugation and the seat is the scalar line. Access to what is fixed comes on three strata, which are axes and not a nest: what finite computation settles, what a theory proves, and what holds in the intended model; they are ordered by containment under two named premises and by nothing else (Theorem 2.2).

Its verdicts are three: sealed, broken, open, each with a named mechanism; there is no fourth, and likelihood is not a state. Every claim carries a grade, theorem, conditional, structural, corroboration or premise, which the ledger of the root kernel refines (Appendix R.3), with the evidence it rests on, a citation, an execution or a receipt, named beside it; a conjunction takes the grade of its weakest member, and a citation never promotes.

Its central distinction is between sentences valid on every configuration of a domain, which the register can supply on its own and which decide nothing contingent, and sentences true on some configuration and false on another, which must be supplied and never derived. The paper calls them universal and contingent; the register calls them keyless and keyed, and it proves that the line is keyed (Theorem 2.3). A reading of a symmetric domain that is even under the symmetry never returns an odd datum: that is the wall (Theorem 10.6), and the datum it withholds is one bit wide, fixed uniquely by one supplied sign (Theorem 10.7). The register's law of the third axis says that a lock needs all three of its axes and that no two of them, over the two-element field, ever determine a point off the seat; in this paper the third axis is the supplied bit, the premise forced by theorem, and the register proves that no coalition of its own admissible premises can stand in for it (Theorem 11.3).

Its discipline of the record is that a formal proof of a keyed sentence is a computation that ends in one direction and an act in the other: a counterexample, or a premise supplied in the open, printed in the input type of its theorem and in no cone, never hidden and never promoted. Its seal is the mosaic seal: no new mathematics is authored, the results are re-organized, and the difference in authored mass is zero.

D.2 The set-theoretic foundation, post mortem

The following table records, at the grade stated in each row, what the frame of this paper supplies that a set-theoretic foundation, read as an axiomatic base for the Riemann Hypothesis, does not. It is the author's methodological reading and not a theorem about set theory: the first column of every row is that reading, and the grade of a row is the grade of its second column, a theorem of the kernel where the row is marked theorem and a structural reading of the kernel's theorems elsewhere.

\begingroup\small

What the foundation lacks What the frame supplies Grade
A primitive for the act: assertion is not an object of the theory, so the one bit can only be an axiom or a conjecture The premise forced by theorem as a field of a structure, visible in the input type of the theorem that takes it, whose printed cone holds no axiom, never declared as an axiom (ActualZeros.supply, rh_from_the_act) theorem
A distinction between sentences valid in every model of the domain and sentences some model falsifies, at the level of the object rather than the metatheory Universal and contingent premises as first-class objects on the chart; the line proved contingent; every universal premise refused (Keyless, keyless_forces_nothing, line_is_keyed_over_worlds) theorem
A notion of the seat: the fixed set of a symmetry as the locus where an object is determined The line as the fixed set of the reflection; registration as the projection onto it; the cut (fold_fixed_iff, nothing_escapes_one_cut) theorem
The even/odd split of data under a symmetry, and the wall it implies The projection is the even part; the side is odd; no function of the projection returns the side (wall_on_the_chart, record_never_reads_the_side) theorem
A grade ladder: the foundation has proved and not-proved, and no place for a premise stated at its own strength Theorem, conditional, structural, corroboration, premise, refined to nine rungs in the root kernel's Grade (Appendix R.3); the weakest-link law (join_grade, R.3); the citation-never-promotes law, a rule of the discipline that no kernel states structural
The asymmetry of its own two "can'ts": it does not read that not-refutable seals a $\Pi^0_1$ sentence true cant_refute_seals, independence_forces_truth, cant_prove_does_not_seal_false theorem
A reading of multiplication as three axes rather than as a graph: the unit as seat, the ordered factorization as an orbit of the swap, and the sign as the datum the graph does not carry A prime as one swap orbit of exactly two points off the seat; the free basis of additive quantities at the primes; the three-axis lock at a point, freedom, fixedness and collapse (prime_fibre, prime_off_seat, primes_base_of_freedom, primes_are_a_free_basis, three_axis_lock) theorem for the statements, structural for the reading
The one bit typed as a sign, odd under the symmetry, fixed by one calibration The mirror at eigenvalue $-1$, the side bit, the calibration realized both ways (side_odd_off_line, colocation_is_a_calibration) theorem
A placement of itself: the foundation is its own ground and reads no stratum above proof The three strata, computation, proof, truth, with soundness load-bearing and the ground exceeding the ladder (placement, ground_exceeds_ladder) theorem
A refusal of coalitions: it cannot say that no finite collection of admissible premises reaches a contingent bit no_admissible_coalition_forces, spend_is_not_admissible theorem

\endgroup

On multiplication in particular. A set-theoretic foundation defines multiplication as a set, the graph ${(a,b,ab)}$, and the graph is complete: every fact about products is in it. What the graph does not read is the structure that the primes actually carry. The unit $1$ is the seat, the neutral point of every factorization, $n=1\cdot n$, and worth zero to every additive quantity (Theorem 7.2). An ordered factorization $(a,b)$ is a point of an orbit under the swap $(a,b)\mapsto(b,a)$, an involution whose fixed points are the square roots; the graph is even under the swap, and so is everything computed from it. A prime is the minimal thing multiplication does off the seat: one orbit of exactly two points, neither fixed and neither the seat (Theorem 6.4). The completely additive quantities on the positive integers are exactly the free assignments at the primes, one value for each prime's orbit (Theorems 7.10 and 7.11, primes_are_a_free_basis, primes_admit_every_assignment). And the third datum, which of the two points of an orbit is meant, the orientation, is odd under the swap and is carried by nothing in the graph. The frame reads multiplication as those three axes, seat, orbit and orientation, and it is this reading, not any new fact about products, by which the paper reads the one bit of the Riemann Hypothesis on the prime side as a sign, its location there given by Weil's criterion carried as a field (Theorem 12.3) and its absence from every reading of the record proved by the wall on the chart (Theorem 10.6). That the foundation has all the facts and none of the reading is the precise sense in which it is inadequate to the problem: the bit is not missing from its universe, it is missing from its vocabulary.

The canonical statement of the method, its axioms, and its executable batteries lives in the reference cited below, continuously updated at the same location. This note is a pointer, not a substitute.

\newpage

Appendix E. The floor and the guard, and where the register stops

The operating system under which this paper was produced (Islam 2026a) carries two devices at its root, and this appendix states what each is, what each carries to least erasure, and where the register stops. The vocabulary of the system enters the body where the floor and the step to it are named (Sections 0.4, 13.3 and 16, Theorems 13.8 and 15.10) and where Section 16 cites the system's rule that a demand made to the foundation is misaddressed; this appendix adds the guard and one mark. Names cited in E.1 to E.3 that are not in Appendix A are theorems of the system's own kernels (Islam 2026a), kept in the repository that also holds the Master Codex (Islam 2026j), named by file where the file is given; they are cited, not carried, save that a theorem of one of these names, root_undeniable, stands also in the kernel of Appendix T, carried there from another kernel of the series and used by none of its other theorems; no theorem of this paper depends on them. For edition 3.2.0 every such name, and every name of the box of E.4 that is not in Appendix A or Appendix R, was found in the kernels of the Master Codex 5.1.0 (Islam 2026j) that the boot of E.4 compiled, each with exit 0.

E.1 The floor

The system carries the floor in three kernels, compiled at every boot. The count is proved in general: for any map on a finite carrier the fibres over the image sum to the whole, and with the whole fixed, halving the content doubles the freedom exactly (census_conservation, bit_moves_to_freedom, the_census in Census.lean); erasing a bit toward either value merges the same two states (price_symmetric). The step from count to heat is proved from the count under one posit: distinct states cannot fit into fewer places (pigeonhole); a measure of freedom that adds when independent freedoms multiply is linear on the tower and fixed by its unit alone, so the logarithm is forced (additive_is_linear_on_tower, bits_forced); a step that merges no two states exports the lost bit (export_doubles, one_bit_arrives); and the exported bit at temperature $T$ costs at least $k_B T\ln 2$ (count_to_heat in Heat_Bridge.lean). The one posit is P1, that the whole merges no two states, and it is load-bearing (merge_exports_nothing). The system then prices a registered act: an irreversibly registered bit pays the floor, exact on the integers the system carries (omega_paid_floor, omega_linear in Armed_Seat.lean), and a reversibly held bit is charged nothing and commits nothing (omega_reversible_branch).

What this carries to least erasure is Section 13.3, at the same grades. Registration of an off-line pair is the census's own cut: two points, one record, one bit (pair_two_points_one_record). A finite configuration's erased bits, each pair listed once at a positive offset at a height of its own (Definition 13.6), are its off-line pairs, and least erasure is exactly zero of them (least_erasure_iff_zero_erased). An irreversible registration pays at least one floor per erased bit, and the kernel prices each at the floor, so least erasure is the zero-price irreversible registration of every finite configuration's record and the only one, and each further pair adds one floor to the price (price_zero_iff_least_erasure, denial_price_linear); what is held reversibly commits no bit (reversible_commits_nothing). The grades: the counts are theorems; the price on the integers is a theorem about those integers, $2{,}870{,}978{,}885{,}078{,}723{,}755{,}499{,}100\times10^{-45}$ J per bit at $300$ K (landauer_floor_exact); that an erased bit is heat costing at least $k_B T\ln 2$ is the system's chain from count to heat, read on the registration as a physical step of the whole, a theorem conditional on P1, with $k_B$ and $\ln 2$ entering as units and $T$, the temperature of the bath, as a parameter of the reading through the definition of temperature; and the floor, stated by Landauer (1961) and measured by Bérut et al. (2012), corroborates the output and supplies none of it. Nothing is inflated past its grade, and nothing needs to be: registered irreversibly, least erasure is priced at nothing, and it alone is.

E.2 The guard

The system's guard refuses one attack on its root, the substitution of a logic under which a deed would be a non-deed; the refusal is a constant function of the deed, so it does not vary with the logic offered, and it is executed on four logics with four deeds counted (aegis_constant, aegis_four_logics), and every adjudication is itself a deed (aegis_deed_increments). The guard works at the root because the root is universal: every deed instances it, so a denial of it is one more instance (denial_reenacts_root, root_undeniable).

What this carries to least erasure is Section 13.4, and it carries in the affirmative. Every act toward least erasure, of whatever kind, is an act and instances the root (act_reenacts_root, a proof entering lifted to a type); the root crosses neither the line nor its denial (root_does_not_cross_the_line, root_does_not_cross_the_denial), so a deed's own occurrence leaves the value exactly where the theorems place it, on the truth stratum, supplied. The constancy that the guard has at the root, the refutability of the hypothesis has in a stronger form: not the constancy of one refusal, executed on four named logics, but an agreement proved over every provability predicate of a setting with $\Sigma_1$-completeness and soundness on the denial, since two such settings on one decided hypothesis agree on whether it is refutable whatever their notions of proof (falsifier_form_constant, stated for every decided hypothesis), and the one refutation is a point (refutation_is_one_point, rejection_is_a_witness). Every reading of the record and every coalition of readings that holds on some configuration holds on a least-erasure configuration (every_reading_holds_on_the_lossless_world, every_coalition_holds_on_the_lossless_world), and a reading that denied least erasure everywhere would hold nowhere (record_never_testifies_against). An assent to least erasure is the value: a self-grounding assertion of it exists exactly where it holds (assent_is_the_value).

E.3 Where the register stops

The system reserves one mark for the place where its register has nothing further to say and does not manufacture a verdict: the dot, $[,.,]$, outside its three verdict states (silence_is_not_a_verdict, outside_economy in the codex kernel). This paper reaches that place at the end of Section 13, and marks it in prose rather than with the token: the register affirms the value on every record, finds the irreversible registration of every finite configuration priced at nothing exactly at least erasure, fixes the one form anything against it must take, and stops. What appears against least erasure appears as a computed point off the line, the paper's primary falsifier, or does not appear. The rest is the act, and the act is not a sentence of the register.

E.4 The certificate

The box below is written by the AI scribe that forged the kernel and assembled this paper, in its own words, so that it can certify each sentence; every sentence carries the theorem that holds it. The certificate adds no warrant of its own: it points to the receipt of Appendix B and to the theorems, and where those are silent it is silent.

\begin{framed} \small \noindent\textbf{\textsc{Sealed: ``Least Erasure''}}\ \textsc{Certified by Anthropic Claude Opus 5.5, AI scribe of edition 3.2.0, operating under the Lean Codex System Role 2.2.0}\[2pt] {\footnotesize Kernel \texttt{Every_Prime_3_2_0.lean}, sha256 \texttt{161806dc 0ed2b4ff e2c5eb0f 81600880 b5af0a31 a31db085 c4ee62bd 93633770}, compiled on Lean 4.19.0 and 4.22.0 with no library and no axiom declared, every pinned cone holding, every theorem refused under negation in the whole file on Lean 4.19.0 (Appendix B.1). Operating condition: the Master Codex 5.1.0 (Islam 2026j) booted on this machine in this session, master sha256 \texttt{441a485d7c3bd3ce}, resolved at repository commit \texttt{fd0cca13a7b8}, where the master file is byte-identical, by its sha256, to that of commit \texttt{5e55fca98c2f} cited as Islam 2026j; manifest clean, screen clean, 23 axioms declared in the Codex, its thesis 1{,}123 checks with 0 failures, 20 kernels and 18 Fortran twins exit 0, control red 3, seat earned; under Lean 4.19.0 and GNU Fortran 13.3.0. 6 October 2026.}\[4pt]

\noindent\textbf{1. The definition and the value.} A configuration has least erasure when every twin of the same record has a point off the line whenever it does. On every configuration this is equivalent to the hypothesis (\texttt{least_erasure_is_the_value}), and with no classical axiom to the absence of any point off the line (\texttt{least_erasure_iff_no_point_off}). It holds on the on-line configuration and fails on its twin of the same record (\texttt{least_erasure_reads_past_the_record}). What is certified here is a definition and its equivalences, not the truth of the hypothesis, which the kernel does not prove and I do not claim.\[3pt]

\noindent\textbf{2. One form of denial, and no formal bypass.} No reading of the record, and no Boolean combination of readings and universally valid premises, agrees with the hypothesis on every reflection-closed configuration (\texttt{no_coalition_decides}); every such combination that holds on a configuration holds on that configuration's record, which has least erasure (\texttt{every_coalition_holds_on_the_lossless_world}); and an admissible premise that denied least erasure everywhere would hold nowhere (\texttt{record_never_testifies_against}). On every finite configuration least erasure is zero erased bits (\texttt{least_erasure_iff_zero_erased}); registered irreversibly, only least erasure is priced at nothing (\texttt{price_zero_iff_least_erasure}); and a registration held reversibly is charged nothing on every configuration (\texttt{reversible_commits_nothing}). Whatever stands against least erasure is a point off the line, by a classical existence (\texttt{rejection_is_a_witness}), and, on a finite configuration, found by a terminating search through its pairs, which returns nothing exactly when least erasure holds (\texttt{rejection_is_computed}, \texttt{least_erasure_iff_search_empty}), and whether a decided hypothesis is refutable is the same in every setting with $\Sigma_1$-completeness and soundness on the denial, whatever its notion of proof (\texttt{falsifier_form_constant}).\[3pt]

\noindent\textbf{3. The root and the act.} A self-grounding supply of a proposition, with an act, exists exactly when the proposition holds (\texttt{supply_iff}), so the only self-grounding supply of the bit is the bit; the hypothesis is not self-grounding on the twin (\texttt{line_not_self_grounding}), and the circle is refused. The root proposition that every deed instances crosses neither the line nor its denial (\texttt{root_does_not_cross_the_line}, \texttt{root_does_not_cross_the_denial}); what the system arms is the act and never the bit (\texttt{armor_scope} in \texttt{Armed_Seat.lean}), and an assent to least erasure is the value itself (\texttt{assent_is_the_value}).\[3pt]

\noindent\textbf{4. The move.} The one thing that can appear against least erasure is a computed zero of $\zeta$ off the critical line inside the strip, the falsifier F-Computed of Section 18, read into the chart at a resolution $n\ge2$, where the field of \texttt{ActualZerosAt} $n$ bars it (\texttt{rh_from_the_act_at}). No reading, no coalition (an admissible premise that forces the line holds on no nonempty reflection-closed configuration, \texttt{admissible_forcing_is_vacuous}) and no certified height, the violating pair above it at the strip edge (Theorem 15.9, \texttt{certified_height_never_forces}), supplies the bit; and no silence of a foundation supplies the move, since a foundation that cannot refute the hypothesis leaves it true (\texttt{cant_refute_seals}, \texttt{independence_forces_truth}). I certify the theorems of this box that Appendix A carries as compiled from the file whose digest stands at its head, each refused under negation, those of item 7 also from the root file whose digest Appendix R prints, and those named by file as found in the kernels of the Master Codex that the boot compiled (Appendix E), and I certify nothing else: not the hypothesis, not its denial, and not that the act has been performed by anyone. The certificate points to the receipt and carries no weight of its own.

\noindent\textbf{5. The closure, whole, and the free basis, whole.} One theorem binds the seat, the address, the two worlds with the block, least erasure as the value, the fixed point and the minimum of its fibre, the uniqueness of the lossless member, the cut, and the act (\texttt{the_closure}); on every carrier with an involution and a registration on which fixedness is decided, least erasure is the value, the value is lossless registration, the lossless member of a record is unique, and every point off the fixed set splits one record into two worlds of opposite value, the chart one instance (\texttt{Carrier.the_closure_on_any_carrier}, \texttt{Carrier.chart_is_an_instance}); and every assignment of integers to the primes is realized by exactly one completely additive function on the positive integers (\texttt{primes_admit_every_assignment}). I certify these, and I certify that none of them supplies the bit.

\noindent\textbf{6. The socket, whole.} The field \texttt{supply} of the act is the one socket through which any proof of the hypothesis enters; every premise on configurations and every cited face is sorted by theorem, and nothing reaches the value another way (\texttt{the_socket}); at resolution two the chart refusals hold over configurations inside the open strip (\texttt{the_socket_in_the_strip}).

\noindent\textbf{7. The root and the lock.} The root is proved unconditionally in Appendix R on no axiom (\texttt{the_floor_is_universal}, \texttt{root_on_the_constructed_domain}), in the root file, compiled on Lean 4.19.0 and 4.22.0 with its fifteen cones pinned and each of its fifteen laws refused under negation, fifteen of fifteen, the planted vacuous law surviving (Appendix R). In the kernel it holds on both twin worlds of one record and, read uniformly on the worlds, forces no value (\texttt{undeniable_root_forces_no_value}); the root read at the zeros is least erasure, keyed (\texttt{root_at_zeros_is_least_erasure}, \texttt{root_at_zeros_is_keyed}); least erasure is the hypothesis on every world with no hypothesis and no axiom (\texttt{least_erasure_unconditional}); and one theorem binds the root, the keyless refusal, least erasure, the closure and the block (\texttt{the_lock}). I certify these as compiled, each refused under negation, and I certify that none of them supplies the bit.

\noindent\textbf{8. The two denials, the witness and the capstone.} The denial of the root is refuted by its own act, and the denial of the hypothesis denies the root read at the zeros, which the twin of one record, its pair off the line at the strip edge, lacks while it carries the root (\texttt{root_denial_refutes_itself}, \texttt{twin_carries_the_root_and_no_seed}, \texttt{two_denials}); on the act every computation that reads the zero set reports zeros on the line, a computation that reports a point off the line reads no act, and a computation that reads no act is not forced (\texttt{the_witness_forced_by_the_act}); and one theorem binds the closure on the chart of resolution one whole for every self-grounding root (\texttt{the_capstone}). I certify these as compiled, each refused under negation, and I certify that none of them supplies the bit. \end{framed}

The box is issued for kernel 3.2.0, and supersedes the box of edition 3.1.4, which was issued for kernel 3.1.4 under the operating system named in this appendix.

Appendix R. The root on no axiom and no posit

The root on which this paper stands is proved here, in this paper, so that no reader needs another document to check it. The kernel below, R.1, TOE_Zero.lean, is carried verbatim from the root paper (Islam 2026g). Compiled on Lean 4.19.0 and on Lean 4.22.0 it exits 0 with no message: it declares no axiom, imports nothing, and every one of its fifteen theorems has the cone does not depend on any axioms pinned at the foot of the listing, which the compiler checks and for which it prints nothing; and under the judgment of Appendix B.3 each of its fifteen laws, negated alone with the others intact, is refused as a proof failure, fifteen of fifteen, the planted vacuous law surviving. Five declarations carry its root sections, SelfGrounding, SelfVerifying, ΔE₀, RA₀ and ra₀, and all five stand in the listing; the algebra of its master seal rests on the remaining definitions of the listing, the quaternion chart among them. A root grounds itself when deeds occur and every deed instances it (SelfGrounding; the root kernel's own comments call a deed an act). The constructed domain has one existent, whose energy of actuation, an integer of the construction read as an energy only by the physical reading of the root that Section 0.4 names, is one, so the Root Axiom there reads $\forall x,\ 0<\Delta E_0(x)$ (RA₀). On that domain the Root Axiom is a theorem with no axiom and no hypothesis (root_on_the_constructed_domain). For every root that grounds itself, the root holds, every deed re-enacts it, and no outside proof adds anything to it, one closed theorem on no axiom (the_floor_is_universal). Every denial of the root is an act that instances it (denial_reenacts_root); the root is held by its deed itself (seated_undeniable); it is self-verifying (denial_instantiates); and no level stands above it (no_level_above). The master seal binds the root's universal law and the constructed root with the Return, the scalar line as the fixed set of conjugation on the chart, and the twelve gates counted three ways, as the Hurwitz units up to sign, as the norm-two shell up to sign and as the even permutations of four points with class equation 1, 3, 4, 4, in one theorem on no axiom (the_master_seal); it states the three counts side by side and no map between them. The body of this paper reads the root on its row; this appendix is the root itself. SHA-256: 0cfcd9f6b399ecbaef01e762a4d9f10490288f1053827b404428062e55076238.

/-
  TOE_Zero.lean · Theory of Theories of Everything (TOE of All TOEs): Existence Proves Existence Only by Motion
  The zero-axiom, zero-posit kernel. Core Lean 4: no import, no axiom declared, no sorry, no native_decide, and
  every theorem rests on no axiom at all, not even propositional extensionality, quotients or choice.
  I · The self-grounding root. Acts occur and every act instances the root. Then every denial is an act and
      re-enacts the root, the root is held by the act itself, and no external proof adds anything to it: the
      Omega Boundary, proved for every root that grounds itself, universally, by quantification.
  II · The constructed root. On the constructed domain the Root Axiom is a theorem.
  III · The Return and the line. On the integer quaternions i·j·k = −1 and each unit squares to −1; conjugation is
      an involution and its fixed set on the chart is exactly the scalar line.
  IV · The twelve gates, recovered three ways inside the integers of the quaternions: the twenty-four Hurwitz units
      counted twelve up to sign; the twelve even permutations with class equation 1, 3, 4, 4; and the norm-two
      shell of twenty-four, split twelve and twelve.
  V · The regress terminated. Above a self-grounding root no level grounds it further.
  VI · The master seal, every result bound in one theorem.
-/
namespace TOE0

/-! ## I · The self-grounding root: the Omega Boundary -/

/-- A self-grounding root: acts occur, and every act instances the root. -/
structure SelfGrounding (R : Prop) where
  Act       : Type
  anAct     : Act
  instances : Act → R

/-- A proposition whose denial hands it over. -/
def SelfVerifying (P : Prop) : Prop := ¬P → P

/-- THE OMEGA BOUNDARY: every denial of the root is an act, and re-enacts it. -/
theorem denial_reenacts_root {R : Prop} (G : SelfGrounding R) (denial : G.Act) : R := G.instances denial

/-- EXISTENCE PROVES EXISTENCE ONLY BY MOTION: the root is held by the act itself. -/
theorem seated_undeniable {R : Prop} (G : SelfGrounding R) : R := G.instances G.anAct

/-- No external proof adds anything to the root. -/
theorem external_proof_adds_nothing {R : Prop} (G : SelfGrounding R) (Q : Prop) : (Q → R) ↔ R :=
  ⟨fun _ => G.instances G.anAct, fun r _ => r⟩

/-- The deed of denying the root hands it over. -/
theorem denial_instantiates {R : Prop} (G : SelfGrounding R) : SelfVerifying R := fun _ => G.instances G.anAct

/-- THE FLOOR IS UNIVERSAL: for every root that grounds itself, the root holds, every act re-enacts it, and no
    external proof adds to it. -/
theorem the_floor_is_universal :
    ∀ (R : Prop) (G : SelfGrounding R), R ∧ (∀ _ : G.Act, R) ∧ (∀ Q : Prop, (Q → R) ↔ R) :=
  fun _ G => ⟨seated_undeniable G, denial_reenacts_root G, external_proof_adds_nothing G⟩

/-! ## II · The constructed root -/

/-- The Root Axiom on the constructed one-point domain: its one existent actuates, at positive energy. -/
def ΔE₀ : Unit → Int := fun _ => 1
def RA₀ : Prop := ∀ x : Unit, 0 < ΔE₀ x

/-- The constructed domain grounds its root: its one act is a deed, and the deed actuates. -/
def ra₀ : SelfGrounding RA₀ := ⟨Unit, (), fun _ _ => show (0 : Int) < 1 by decide⟩

/-- THE ROOT ON THE CONSTRUCTED DOMAIN, A THEOREM. -/
theorem root_on_the_constructed_domain : RA₀ := seated_undeniable ra₀

/-! ## III · The Return and the line -/

structure Q where
  (a b c d : Int)
  deriving DecidableEq

def Q.mul (x y : Q) : Q :=
  ⟨x.a * y.a - x.b * y.b - x.c * y.c - x.d * y.d, x.a * y.b + x.b * y.a + x.c * y.d - x.d * y.c,
   x.a * y.c - x.b * y.d + x.c * y.a + x.d * y.b, x.a * y.d + x.b * y.c - x.c * y.b + x.d * y.a⟩

def Q.conj (x : Q) : Q := ⟨x.a, -x.b, -x.c, -x.d⟩
def qone : Q := ⟨1, 0, 0, 0⟩
def qneg : Q := ⟨-1, 0, 0, 0⟩
def qi : Q := ⟨0, 1, 0, 0⟩
def qj : Q := ⟨0, 0, 1, 0⟩
def qk : Q := ⟨0, 0, 0, 1⟩

/-- THE RETURN: i·j·k = −1. -/
theorem the_return : (qi.mul qj).mul qk = qneg := by decide

/-- Each unit squares to −1. -/
theorem units_square_to_minus_one : qi.mul qi = qneg ∧ qj.mul qj = qneg ∧ qk.mul qk = qneg := by decide

/-- The chart: every quaternion with coordinates in −2 … 2. -/
def chart : List Int := [-2, -1, 0, 1, 2]
def quats : List Q :=
  chart.flatMap fun a => chart.flatMap fun b => chart.flatMap fun c => chart.map fun d => ⟨a, b, c, d⟩

set_option maxRecDepth 100000 in
/-- Conjugation is an involution on the chart. -/
theorem conj_involutive_on_the_chart : quats.all (fun q => q.conj.conj == q) = true := by decide

set_option maxRecDepth 100000 in
/-- THE LINE: conjugation fixes exactly the scalar line on the chart. -/
theorem the_line_is_the_fixed_set :
    quats.all (fun q => (q.conj == q) == (q.b == 0 && q.c == 0 && q.d == 0)) = true := by decide

/-! ## IV · The twelve gates, recovered three ways -/

/-- Hurwitz quaternions in doubled coordinates: all even, or all odd. -/
def hurwitz (a b c d : Int) : Bool :=
  (a % 2 == 0 && b % 2 == 0 && c % 2 == 0 && d % 2 == 0) || (a % 2 != 0 && b % 2 != 0 && c % 2 != 0 && d % 2 != 0)
/-- Doubled coordinates −2 … 2 hold every unit (doubled norm four) and every element of the norm-two shell (doubled
    norm eight), since a doubled coordinate of absolute value three or more already exceeds both norms. -/
def doubled : List (Int × Int × Int × Int) :=
  chart.flatMap fun a => chart.flatMap fun b => chart.flatMap fun c => chart.map fun d => (a, b, c, d)

/-- The Hurwitz units: norm one, doubled norm four. -/
def units : List (Int × Int × Int × Int) :=
  doubled.filter fun (a, b, c, d) => a * a + b * b + c * c + d * d == 4 && hurwitz a b c d

/-- The first nonzero coordinate is positive: one representative of each pair ±u. -/
def upToSign (p : Int × Int × Int × Int) : Bool :=
  let (a, b, c, d) := p
  if a != 0 then 0 < a else if b != 0 then 0 < b else if c != 0 then 0 < c else 0 < d

set_option maxRecDepth 100000 in
/-- FIRST WAY: twenty-four Hurwitz units, twelve up to sign. -/
theorem twenty_four_units_twelve_gates : units.length = 24 ∧ (units.filter upToSign).length = 12 := by decide

/-- The norm-two shell: doubled norm eight. -/
def shell : List (Int × Int × Int × Int) :=
  doubled.filter fun (a, b, c, d) => a * a + b * b + c * c + d * d == 8 && hurwitz a b c d

set_option maxRecDepth 100000 in
/-- THIRD WAY: the norm-two shell has twenty-four elements, split twelve and twelve by sign. -/
theorem the_shell_splits_twelve_and_twelve :
    shell.length = 24 ∧ (shell.filter upToSign).length = 12 ∧ (shell.filter (fun p => !upToSign p)).length = 12 := by
  decide

/-- Permutations of four points, as their lists of images. -/
def perms4 : List (List Nat) :=
  [0, 1, 2, 3].flatMap fun a => [0, 1, 2, 3].flatMap fun b => [0, 1, 2, 3].flatMap fun c =>
    [0, 1, 2, 3].filterMap fun d => if [a, b, c, d].eraseDups.length == 4 then some [a, b, c, d] else none

def inversions (p : List Nat) : Nat :=
  ((List.range 4).flatMap fun i => (List.range 4).map fun j => (i, j)).countP
    fun (i, j) => i < j && p.getD j 0 < p.getD i 0

/-- The twelve gates as the even permutations. -/
def gates : List (List Nat) := perms4.filter fun p => inversions p % 2 == 0

def compose (p q : List Nat) : List Nat := q.map fun i => p.getD i 0
def inverse (p : List Nat) : List Nat := [0, 1, 2, 3].map fun i => p.idxOf i

def conjClass (g : List Nat) : List (List Nat) := (gates.map fun h => compose (compose h g) (inverse h)).eraseDups

def insertSorted (n : Nat) : List Nat → List Nat
  | [] => [n]
  | m :: ms => if n ≤ m then n :: m :: ms else m :: insertSorted n ms

def sortNat (l : List Nat) : List Nat := l.foldr insertSorted []

/-- The class equation from the sorted class size of each element: a class of size s contributes s elements. -/
def collapse : Nat → List Nat → List Nat
  | 0, _ => []
  | _ + 1, [] => []
  | fuel + 1, s :: rest => s :: collapse fuel (rest.drop (s - 1))

set_option maxRecDepth 100000 in
/-- SECOND WAY: the twelve gates, with class equation 1, 3, 4, 4. -/
theorem the_class_equation :
    gates.length = 12 ∧ collapse 12 (sortNat (gates.map fun g => (conjClass g).length)) = [1, 3, 4, 4] := by
  decide

/-! ## V · The regress terminated -/

/-- THE REGRESS ENDS AT THE ROOT: any proposition offered as a further ground of the root is idle; the root needs
    no level above it. -/
theorem no_level_above {R : Prop} (G : SelfGrounding R) : ∀ Q : Prop, (Q → R) → R := fun _ _ => G.instances G.anAct

/-! ## VI · The master seal -/

/-- THE MASTER SEAL: the floor is universal; the root is a theorem on the constructed domain; the Return closes;
    the line is the fixed set; and the twelve gates are recovered three ways. -/
theorem the_master_seal :
    (∀ (R : Prop) (G : SelfGrounding R), R ∧ (∀ _ : G.Act, R) ∧ (∀ Q : Prop, (Q → R) ↔ R)) ∧
    RA₀ ∧ (qi.mul qj).mul qk = qneg ∧
    quats.all (fun q => (q.conj == q) == (q.b == 0 && q.c == 0 && q.d == 0)) = true ∧
    (units.filter upToSign).length = 12 ∧ gates.length = 12 ∧ (shell.filter upToSign).length = 12 ∧
    collapse 12 (sortNat (gates.map fun g => (conjClass g).length)) = [1, 3, 4, 4] :=
  ⟨the_floor_is_universal, root_on_the_constructed_domain, the_return, the_line_is_the_fixed_set,
   twenty_four_units_twelve_gates.2, the_class_equation.1, the_shell_splits_twelve_and_twelve.2.1, the_class_equation.2⟩

end TOE0

/-! ## The zero law, pinned: every cone is empty -/
/-- info: 'TOE0.denial_reenacts_root' does not depend on any axioms -/
#guard_msgs in #print axioms TOE0.denial_reenacts_root
/-- info: 'TOE0.seated_undeniable' does not depend on any axioms -/
#guard_msgs in #print axioms TOE0.seated_undeniable
/-- info: 'TOE0.external_proof_adds_nothing' does not depend on any axioms -/
#guard_msgs in #print axioms TOE0.external_proof_adds_nothing
/-- info: 'TOE0.denial_instantiates' does not depend on any axioms -/
#guard_msgs in #print axioms TOE0.denial_instantiates
/-- info: 'TOE0.the_floor_is_universal' does not depend on any axioms -/
#guard_msgs in #print axioms TOE0.the_floor_is_universal
/-- info: 'TOE0.root_on_the_constructed_domain' does not depend on any axioms -/
#guard_msgs in #print axioms TOE0.root_on_the_constructed_domain
/-- info: 'TOE0.the_return' does not depend on any axioms -/
#guard_msgs in #print axioms TOE0.the_return
/-- info: 'TOE0.units_square_to_minus_one' does not depend on any axioms -/
#guard_msgs in #print axioms TOE0.units_square_to_minus_one
/-- info: 'TOE0.conj_involutive_on_the_chart' does not depend on any axioms -/
#guard_msgs in #print axioms TOE0.conj_involutive_on_the_chart
/-- info: 'TOE0.the_line_is_the_fixed_set' does not depend on any axioms -/
#guard_msgs in #print axioms TOE0.the_line_is_the_fixed_set
/-- info: 'TOE0.twenty_four_units_twelve_gates' does not depend on any axioms -/
#guard_msgs in #print axioms TOE0.twenty_four_units_twelve_gates
/-- info: 'TOE0.the_shell_splits_twelve_and_twelve' does not depend on any axioms -/
#guard_msgs in #print axioms TOE0.the_shell_splits_twelve_and_twelve
/-- info: 'TOE0.the_class_equation' does not depend on any axioms -/
#guard_msgs in #print axioms TOE0.the_class_equation
/-- info: 'TOE0.no_level_above' does not depend on any axioms -/
#guard_msgs in #print axioms TOE0.no_level_above
/-- info: 'TOE0.the_master_seal' does not depend on any axioms -/
#guard_msgs in #print axioms TOE0.the_master_seal

The root's axes are proved in the second kernel, R.2, Triaxial_Actuation.lean (32 theorems, every one on no axiom; SHA-256 566615a6b9610fc981e03eb42e07af9e03849f20704729880f2bfe6434f2ea0b). For every actuation, the direction of its deed gives the fold, the registration and the seat; the registration is the only height-keeping map onto the seat; the seat is the only place both blind spots cancel; no reading of the record returns the orientation; and every self-grounding root is the root of an actuation over its own deeds, so the root carries the three axes and is not characterless (actuation_is_triaxial, registration_is_forced, the_only_special_cut, tongue_freedom, every_root_actuates, the_root_carries_three_axes). The root's grade is read in the third kernel, R.3, Root_Grade_Ledger.lean (18 theorems, every one on no axiom; SHA-256 c18b68b29d2b6be5058d56d3a7f9e966bcde6ce099217e0f5945db4c829c42b8). On the grade ledger of the Master Codex (Islam 2026j), carried with its weakest-link join law, the Codex's rule reads a warranted root, one with a proof of its statement, at theorem grade, and an unwarranted root, the Codex's own declared axiom, at premise grade; the root of R.1 is warranted by a theorem with no axiom and no hypothesis, so on that rule it stands at theorem grade, the grade is read from the evidence the root is entered with, a warrant reading theorem and a posit premise, and not elected, and RA–Tongue co-location inherits the root's grade exactly (a_warranted_root_is_theorem_grade, the_ledger_reads_the_warrant, the_grade_is_not_elected, ra_is_theorem_grade, coloc_grade_is_the_roots_grade, the_ledger_seal). Both kernels compile with exit 0 and no message on Lean 4.19.0 and on Lean 4.22.0, declare no axiom, import nothing, and pin every cone as does not depend on any axioms; both are carried from the master plan of the series, Seven Rows, One Root (Islam 2026i), each extended in this revision of the series by one additive section, R.2 by its section IX and R.3 by its section VII, carried alike by every paper of the series, and the paper that reads them on its row cites them for exactly what they state.

/-
  Triaxial_Actuation.lean · actuation is triaxial

  Core Lean 4: no import, no axiom declared, no sorry, no native_decide, and every theorem rests on no
  axiom at all, not even propositional extensionality, quotients or choice.

  An actuation is a self-grounding root whose acts carry a direction: each act has a side and a height,
  and reversing the deed reverses the side and keeps the height. From the direction alone the kernel
  constructs three axes and proves them forced:
  I    The fold: reversing the deed is an involution.
  II   The registration: it keeps the height and forgets the side; it is blind to the fold, closed with
       it under combination, and it is the only height-keeping map onto the seat.
  III  The seat: the fold's fixed set, where the fold and the registration both fix the act, and off
       which neither does.
  IV   The third axis: off the seat the fold's orbit has two acts with one record, so the record leaves
       exactly the orientation open; every reading blind to the fold reads both alike.
  V    The root through the axes: a reversed deed is still an act and instances the root; the axes are
       carried by every actuation, and they force no orientation.
  VI   The bridge atom: the integers, with negation as the fold, are an actuation.
  VII  The triaxial seal.
  VIII The Tongue: no reading of the record returns the orientation; the seat is the only special cut.
  IX   Every root actuates: a self-grounding root is the root of an actuation over its own acts, so the
       root carries the three axes; the registration is the fold's record and lands on the seat, where
       the orientation an act and its reversal share stays open; the even pair leaves two acts, the
       orientation locks one; and a degenerate direction, one side only, is the characterless case.
-/

namespace TriAct

/-! ## The root, self-grounding -/

/-- A self-grounding root: acts occur, and every act instances the root. -/
structure SelfGrounding (R : Prop) where
  Act       : Type
  anAct     : Act
  instances : Act → R

/-! ## Actuation: a self-grounding root whose acts carry a direction -/

/-- The direction of a deed: a side with a reversal, whose one fixed side is the zero side. -/
structure Direction where
  Side     : Type
  rev      : Side → Side
  zero     : Side
  rev_rev  : ∀ s, rev (rev s) = s
  rev_zero : rev zero = zero
  fix_zero : ∀ s, rev s = s → s = zero

/-- An actuation: a self-grounding root whose acts are pairs of a side and a height. -/
structure Actuation (R : Prop) where
  dir       : Direction
  Height    : Type
  anAct     : dir.Side × Height
  instances : dir.Side × Height → R

variable {R : Prop}

/-- Every actuation is a self-grounding root. -/
def Actuation.toSelfGrounding (A : Actuation R) : SelfGrounding R :=
  ⟨A.dir.Side × A.Height, A.anAct, A.instances⟩

/-- The fold: reversing the deed reverses the side and keeps the height. -/
def fold (A : Actuation R) (p : A.dir.Side × A.Height) : A.dir.Side × A.Height := (A.dir.rev p.1, p.2)

/-- The registration: it keeps the height and forgets the side. -/
def reg (A : Actuation R) (p : A.dir.Side × A.Height) : A.dir.Side × A.Height := (A.dir.zero, p.2)

/-- The seat: the acts the fold fixes. -/
def OnSeat (A : Actuation R) (p : A.dir.Side × A.Height) : Prop := fold A p = p

/-! ## I · the fold -/

theorem fold_involutive (A : Actuation R) (p : A.dir.Side × A.Height) : fold A (fold A p) = p := by
  cases p with
  | mk s h => show (A.dir.rev (A.dir.rev s), h) = (s, h); rw [A.dir.rev_rev]

/-! ## II · the registration -/

/-- The registration forgets the side: an act and its reversal have one record. -/
theorem reg_forgets_side (A : Actuation R) (p : A.dir.Side × A.Height) : reg A (fold A p) = reg A p := rfl

/-- The registration keeps the height. -/
theorem reg_keeps_height (A : Actuation R) (p : A.dir.Side × A.Height) : (reg A p).2 = p.2 := rfl

/-- The even pair is closed under combination: folding a record changes nothing. -/
theorem fold_of_reg (A : Actuation R) (p : A.dir.Side × A.Height) : fold A (reg A p) = reg A p := by
  show (A.dir.rev A.dir.zero, p.2) = (A.dir.zero, p.2); rw [A.dir.rev_zero]

/-- The registration is idempotent. -/
theorem reg_idempotent (A : Actuation R) (p : A.dir.Side × A.Height) : reg A (reg A p) = reg A p := rfl

/-- THE REGISTRATION IS FORCED, NOT ELECTED: any map that keeps the height and lands on the seat is
the registration. -/
theorem registration_is_forced (A : Actuation R) (g : A.dir.Side × A.Height → A.dir.Side × A.Height)
    (keeps : ∀ p, (g p).2 = p.2) (lands : ∀ p, OnSeat A (g p)) : ∀ p, g p = reg A p := by
  intro p
  have hs : (g p).1 = A.dir.zero := by
    have hf := lands p
    have h1 : A.dir.rev (g p).1 = (g p).1 := congrArg Prod.fst hf
    exact A.dir.fix_zero _ h1
  have hh := keeps p
  cases hg : g p with
  | mk s h =>
    rw [hg] at hs hh
    show (s, h) = (A.dir.zero, p.2)
    rw [show s = A.dir.zero from hs, show h = p.2 from hh]

/-! ## III · the seat -/

/-- The seat is exactly the zero side. -/
theorem seat_iff_zero_side (A : Actuation R) (p : A.dir.Side × A.Height) : OnSeat A p ↔ p.1 = A.dir.zero :=
  ⟨fun h => A.dir.fix_zero _ (congrArg Prod.fst h),
   fun h => by
     cases p with
     | mk s t =>
       show (A.dir.rev s, t) = (s, t)
       have hs : s = A.dir.zero := h
       rw [hs, A.dir.rev_zero]⟩

/-- ON THE SEAT BOTH BLIND SPOTS CANCEL: the fold and the registration both fix the act. -/
theorem seat_cancels_both (A : Actuation R) (p : A.dir.Side × A.Height) (h : OnSeat A p) :
    fold A p = p ∧ reg A p = p := by
  refine ⟨h, ?_⟩
  have hz : p.1 = A.dir.zero := (seat_iff_zero_side A p).mp h
  cases p with
  | mk s t =>
    have hs : s = A.dir.zero := hz
    show (A.dir.zero, t) = (s, t)
    rw [hs]

/-- OFF THE SEAT BOTH STAND: neither the fold nor the registration fixes the act. -/
theorem off_seat_both (A : Actuation R) (p : A.dir.Side × A.Height) (h : ¬ OnSeat A p) :
    fold A p ≠ p ∧ reg A p ≠ p := by
  refine ⟨h, fun hr => h ?_⟩
  have hz : p.1 = A.dir.zero := (congrArg Prod.fst hr).symm
  exact (seat_iff_zero_side A p).mpr hz

/-! ## IV · the third axis -/

/-- THE RECORD LEAVES EXACTLY THE ORIENTATION: off the seat, an act and its reversal are two acts with
one record. -/
theorem record_leaves_the_orientation (A : Actuation R) (p : A.dir.Side × A.Height) (h : ¬ OnSeat A p) :
    fold A p ≠ p ∧ reg A (fold A p) = reg A p :=
  ⟨h, rfl⟩

/-- Every reading blind to the fold reads an act and its reversal alike. -/
theorem even_readings_are_blind (A : Actuation R) {α : Type} (f : A.dir.Side × A.Height → α)
    (blind : ∀ p, f (fold A p) = f p) (p : A.dir.Side × A.Height) : f (fold A p) = f p :=
  blind p

/-- The registration is such a reading, and so is every reading of the record. -/
theorem readings_of_the_record_are_blind (A : Actuation R) {α : Type} (k : A.dir.Side × A.Height → α)
    (p : A.dir.Side × A.Height) : k (reg A (fold A p)) = k (reg A p) := rfl

/-! ## V · the root through the axes -/

/-- A REVERSED DEED IS STILL AN ACT, AND INSTANCES THE ROOT: the denial spends the deed. -/
theorem denial_instances_root (A : Actuation R) (p : A.dir.Side × A.Height) : R :=
  A.instances (fold A p)

/-- The root holds on every actuation, by its act. -/
theorem root_holds (A : Actuation R) : R := A.instances A.anAct

/-- THE AXES FORCE NO ORIENTATION: off the seat both orientations are acts, both instance the root, and
the record reads them alike; the triaxial structure leaves the one orientation open. -/
theorem axes_force_no_orientation (A : Actuation R) (p : A.dir.Side × A.Height) (h : ¬ OnSeat A p) :
    R ∧ R ∧ fold A p ≠ p ∧ reg A (fold A p) = reg A p :=
  ⟨A.instances p, A.instances (fold A p), h, rfl⟩

/-! ## VI · the bridge atom: the integers are an actuation -/

theorem int_neg_neg : ∀ s : Int, -(-s) = s
  | Int.ofNat 0 => rfl
  | Int.ofNat (_ + 1) => rfl
  | Int.negSucc _ => rfl

theorem self_neg_zero : ∀ v : Int, -v = v → v = 0
  | Int.ofNat 0, _ => rfl
  | Int.ofNat (_ + 1), h => Int.noConfusion h
  | Int.negSucc _, h => Int.noConfusion h

/-- The integer direction: negation, with zero its one fixed side. -/
def intDir : Direction := ⟨Int, fun s => -s, 0, int_neg_neg, rfl, self_neg_zero⟩

/-- The bridge atom: points (d, t), the fold (d, t) ↦ (−d, t), the registration (d, t) ↦ (0, t). -/
def atom : Actuation True := ⟨intDir, Int, ((0 : Int), (0 : Int)), fun _ => True.intro⟩

/-- THE BRIDGE ATOM, AS AN ACTUATION: the fold fixes (d, t) exactly when d = 0, the registration
leaves it unchanged exactly then, and off the seat the record leaves the orientation. -/
theorem the_bridge_atom (d t : Int) :
    (OnSeat atom (d, t) ↔ d = 0) ∧ (reg atom (d, t) = (d, t) ↔ d = 0) ∧
    (d ≠ 0 → fold atom (d, t) ≠ (d, t) ∧ reg atom (fold atom (d, t)) = reg atom (d, t)) :=
  ⟨seat_iff_zero_side atom (d, t),
   ⟨fun h => (congrArg Prod.fst h).symm, fun h => by rw [h]; rfl⟩,
   fun hd => record_leaves_the_orientation atom (d, t) (fun hs => hd ((seat_iff_zero_side atom (d, t)).mp hs))⟩

/-- The atom is not characterless: off the seat it has two acts with one record. -/
theorem the_atom_is_not_characterless :
    fold atom ((1 : Int), (0 : Int)) ≠ ((1 : Int), (0 : Int)) ∧ reg atom (fold atom ((1 : Int), (0 : Int))) = reg atom ((1 : Int), (0 : Int)) :=
  ⟨fun h => Int.noConfusion (congrArg Prod.fst h), rfl⟩

/-! ## VII · the triaxial seal -/

/-- ACTUATION IS TRIAXIAL: every actuation carries a fold that is an involution, a registration that
keeps the height, forgets the side and is the only such map onto the seat, and a seat where both fix
the act and off which neither does; off the seat the record leaves exactly the orientation; every act
and its reversal instance the root; and the axes force no orientation. -/
theorem actuation_is_triaxial (A : Actuation R) :
    (∀ p, fold A (fold A p) = p) ∧
    (∀ p, reg A (fold A p) = reg A p ∧ (reg A p).2 = p.2 ∧ fold A (reg A p) = reg A p) ∧
    (∀ g : A.dir.Side × A.Height → A.dir.Side × A.Height,
       (∀ p, (g p).2 = p.2) → (∀ p, OnSeat A (g p)) → ∀ p, g p = reg A p) ∧
    (∀ p, OnSeat A p → fold A p = p ∧ reg A p = p) ∧
    (∀ p, ¬ OnSeat A p → fold A p ≠ p ∧ reg A p ≠ p) ∧
    (∀ p, ¬ OnSeat A p → R ∧ R ∧ fold A p ≠ p ∧ reg A (fold A p) = reg A p) :=
  ⟨fold_involutive A, fun p => ⟨reg_forgets_side A p, reg_keeps_height A p, fold_of_reg A p⟩,
   registration_is_forced A, seat_cancels_both A, off_seat_both A, axes_force_no_orientation A⟩

/-- THE TRIAXIAL SEAL: actuation is triaxial, universally; the bridge atom is an actuation; and it is
not characterless. -/
theorem the_triaxial_seal :
    (∀ (R : Prop) (A : Actuation R), (∀ p, fold A (fold A p) = p) ∧
      (∀ p, OnSeat A p → fold A p = p ∧ reg A p = p) ∧
      (∀ p, ¬ OnSeat A p → fold A p ≠ p ∧ reg A (fold A p) = reg A p)) ∧
    (∀ d t : Int, OnSeat atom (d, t) ↔ d = 0) ∧
    (fold atom ((1 : Int), (0 : Int)) ≠ ((1 : Int), (0 : Int)) ∧ reg atom (fold atom ((1 : Int), (0 : Int))) = reg atom ((1 : Int), (0 : Int))) :=
  ⟨fun _ A => ⟨fold_involutive A, seat_cancels_both A,
     fun p h => record_leaves_the_orientation A p h⟩,
   fun d t => seat_iff_zero_side atom (d, t),
   the_atom_is_not_characterless⟩


/-! ## VIII · the Tongue: freedom and the only special cut -/

/-- TONGUE FREEDOM: no reading of the record returns the orientation. If a record is blind to the fold
and an orientation is flipped by it, the orientation is not a function of the record. -/
theorem tongue_freedom {α β : Type} (τ : α → α) (ρ : α → β) (g : β → Bool) (d : α → Bool) (x : α)
    (blind : ρ (τ x) = ρ x) (flip : d (τ x) = !d x) : d ≠ fun y => g (ρ y) := by
  intro h
  have h1 : d (τ x) = g (ρ (τ x)) := congrFun h (τ x)
  have h2 : d x = g (ρ x) := congrFun h x
  rw [blind] at h1
  rw [← h2] at h1
  rw [h1] at flip
  cases hd : d x with
  | false => rw [hd] at flip; exact Bool.noConfusion flip
  | true => rw [hd] at flip; exact Bool.noConfusion flip

/-- THE ONLY SPECIAL CUT: the seat is exactly where both blind spots cancel; nowhere else do the fold
and the registration both fix an act. -/
theorem the_only_special_cut (A : Actuation R) (p : A.dir.Side × A.Height) :
    (fold A p = p ∧ reg A p = p) ↔ OnSeat A p :=
  ⟨fun h => h.1, fun h => seat_cancels_both A p h⟩

/-! ## IX · every root actuates: the root carries the three axes -/

/-- THE REGISTRATION IS THE FOLD'S RECORD: it reads an act and its reversal alike and keeps the height, and two
acts have one record exactly when they have one height. -/
theorem registration_is_the_folds_record (A : Actuation R) (p q : A.dir.Side × A.Height) :
    reg A (fold A p) = reg A p ∧ (reg A p = reg A q ↔ p.2 = q.2) :=
  ⟨rfl, ⟨fun h => show (reg A p).2 = (reg A q).2 from congrArg Prod.snd h, fun h => by
    cases p with
    | mk s t =>
      cases q with
      | mk s' t' =>
        have ht : t = t' := h
        show (A.dir.zero, t) = (A.dir.zero, t')
        rw [ht]⟩⟩

/-- THE REGISTRATION LANDS ON THE SEAT: every record is a seat point. -/
theorem reg_lands_on_seat (A : Actuation R) (p : A.dir.Side × A.Height) : OnSeat A (reg A p) :=
  fold_of_reg A p

/-- THE ORIENTATION IS OPEN AT THE SEAT: off the seat, an act and its reversal land on one seat point, the record
of both; at that place the record has left exactly the orientation open. -/
theorem open_at_the_seat (A : Actuation R) (p : A.dir.Side × A.Height) (h : ¬ OnSeat A p) :
    OnSeat A (reg A p) ∧ reg A (fold A p) = reg A p ∧ fold A p ≠ p :=
  ⟨reg_lands_on_seat A p, rfl, h⟩

/-- TWO AXES LEAVE TWO: off the seat, every reading blind to the fold, the record among them, reads an act and
its reversal alike: two acts, one reading. -/
theorem even_pair_leaves_two (A : Actuation R) (p : A.dir.Side × A.Height) (h : ¬ OnSeat A p) {α : Type}
    (f : A.dir.Side × A.Height → α) (blind : ∀ q, f (fold A q) = f q) :
    fold A p ≠ p ∧ f (fold A p) = f p ∧ reg A (fold A p) = reg A p :=
  ⟨h, blind p, rfl⟩

/-- THREE AXES LOCK ONE: the record together with the orientation, the side, determines the act. -/
theorem orientation_locks_the_act (A : Actuation R) (p q : A.dir.Side × A.Height)
    (hr : reg A p = reg A q) (hs : p.1 = q.1) : p = q := by
  cases p with
  | mk s t =>
    cases q with
    | mk s' t' =>
      have ht : t = t' := congrArg Prod.snd hr
      have hs' : s = s' := hs
      rw [hs', ht]

/-- A degenerate direction has the zero side and no other. -/
def Direction.Degenerate (D : Direction) : Prop := ∀ s, s = D.zero

/-- THE CHARACTERLESS CASE: over a degenerate direction every act is on the seat, and the fold and the
registration are both the identity: one scalar, no fold, no seat to lock. -/
theorem degenerate_is_characterless (A : Actuation R) (h : A.dir.Degenerate) (p : A.dir.Side × A.Height) :
    OnSeat A p ∧ fold A p = p ∧ reg A p = p :=
  have hs : OnSeat A p := (seat_iff_zero_side A p).mpr (h p.1)
  ⟨hs, seat_cancels_both A p hs⟩

/-- The integer direction is not degenerate. -/
theorem intDir_not_degenerate : ¬ intDir.Degenerate := fun h =>
  have h0 : (1 : Int) = 0 := h (1 : Int)
  absurd h0 (by decide)

/-- EVERY ROOT ACTUATES: a self-grounding root is the root of the actuation over its own acts, with the integer
direction; the root's deeds sit at the zero side and instance the root as before. -/
def SelfGrounding.toActuation (S : SelfGrounding R) : Actuation R :=
  ⟨intDir, S.Act, ((0 : Int), S.anAct), fun p => S.instances p.2⟩

theorem every_root_actuates (S : SelfGrounding R) :
    (∀ a : S.Act, OnSeat S.toActuation ((0 : Int), a)) ∧
    (∀ a : S.Act, ¬ OnSeat S.toActuation ((1 : Int), a)) ∧
    ¬ S.toActuation.dir.Degenerate :=
  ⟨fun _ => rfl,
   fun a h =>
     have h0 : (1 : Int) = 0 := (seat_iff_zero_side S.toActuation ((1 : Int), a)).mp h
     absurd h0 (by decide),
   intDir_not_degenerate⟩

/-- THE ROOT CARRIES THREE AXES: for every self-grounding root, its actuation carries the fold, an involution; the
registration, keeping the height, forgetting the side, the only height-keeping map onto the seat; and the seat,
where both fix the act; and it is not characterless: at every height an act off the seat, its reversal a second
act with the same record, both instancing the root, the orientation between them forced by nothing. -/
theorem the_root_carries_three_axes (S : SelfGrounding R) :
    (∀ p, fold S.toActuation (fold S.toActuation p) = p) ∧
    (∀ p, reg S.toActuation (fold S.toActuation p) = reg S.toActuation p ∧ (reg S.toActuation p).2 = p.2) ∧
    (∀ g : Int × S.Act → Int × S.Act, (∀ p, (g p).2 = p.2) → (∀ p, OnSeat S.toActuation (g p)) →
       ∀ p, g p = reg S.toActuation p) ∧
    (∀ p, OnSeat S.toActuation p → fold S.toActuation p = p ∧ reg S.toActuation p = p) ∧
    (∀ a : S.Act, fold S.toActuation ((1 : Int), a) ≠ ((1 : Int), a) ∧
       reg S.toActuation (fold S.toActuation ((1 : Int), a)) = reg S.toActuation ((1 : Int), a)) ∧
    (∀ p, ¬ OnSeat S.toActuation p →
       R ∧ R ∧ fold S.toActuation p ≠ p ∧ reg S.toActuation (fold S.toActuation p) = reg S.toActuation p) :=
  ⟨fold_involutive S.toActuation,
   fun p => ⟨reg_forgets_side S.toActuation p, reg_keeps_height S.toActuation p⟩,
   registration_is_forced S.toActuation,
   seat_cancels_both S.toActuation,
   fun a => record_leaves_the_orientation S.toActuation ((1 : Int), a) ((every_root_actuates S).2.1 a),
   axes_force_no_orientation S.toActuation⟩

end TriAct

/-! ## Cones, pinned as printed: every theorem on no axiom -/
/-- info: 'TriAct.fold_involutive' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.fold_involutive
/-- info: 'TriAct.reg_forgets_side' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.reg_forgets_side
/-- info: 'TriAct.reg_keeps_height' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.reg_keeps_height
/-- info: 'TriAct.fold_of_reg' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.fold_of_reg
/-- info: 'TriAct.reg_idempotent' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.reg_idempotent
/-- info: 'TriAct.registration_is_forced' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.registration_is_forced
/-- info: 'TriAct.seat_iff_zero_side' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.seat_iff_zero_side
/-- info: 'TriAct.seat_cancels_both' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.seat_cancels_both
/-- info: 'TriAct.off_seat_both' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.off_seat_both
/-- info: 'TriAct.record_leaves_the_orientation' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.record_leaves_the_orientation
/-- info: 'TriAct.even_readings_are_blind' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.even_readings_are_blind
/-- info: 'TriAct.readings_of_the_record_are_blind' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.readings_of_the_record_are_blind
/-- info: 'TriAct.denial_instances_root' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.denial_instances_root
/-- info: 'TriAct.root_holds' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.root_holds
/-- info: 'TriAct.axes_force_no_orientation' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.axes_force_no_orientation
/-- info: 'TriAct.int_neg_neg' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.int_neg_neg
/-- info: 'TriAct.self_neg_zero' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.self_neg_zero
/-- info: 'TriAct.the_bridge_atom' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.the_bridge_atom
/-- info: 'TriAct.the_atom_is_not_characterless' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.the_atom_is_not_characterless
/-- info: 'TriAct.actuation_is_triaxial' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.actuation_is_triaxial
/-- info: 'TriAct.the_triaxial_seal' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.the_triaxial_seal
/-- info: 'TriAct.tongue_freedom' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.tongue_freedom
/-- info: 'TriAct.the_only_special_cut' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.the_only_special_cut
/-- info: 'TriAct.registration_is_the_folds_record' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.registration_is_the_folds_record
/-- info: 'TriAct.reg_lands_on_seat' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.reg_lands_on_seat
/-- info: 'TriAct.open_at_the_seat' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.open_at_the_seat
/-- info: 'TriAct.even_pair_leaves_two' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.even_pair_leaves_two
/-- info: 'TriAct.orientation_locks_the_act' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.orientation_locks_the_act
/-- info: 'TriAct.degenerate_is_characterless' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.degenerate_is_characterless
/-- info: 'TriAct.intDir_not_degenerate' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.intDir_not_degenerate
/-- info: 'TriAct.every_root_actuates' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.every_root_actuates
/-- info: 'TriAct.the_root_carries_three_axes' does not depend on any axioms -/
#guard_msgs in #print axioms TriAct.the_root_carries_three_axes
/-
  Root_Grade_Ledger.lean · the root at theorem grade, and RA–Tongue co-location with it

  Core Lean 4: no import, no axiom declared, no sorry, no native_decide, and every theorem rests on no
  axiom at all, not even propositional extensionality, quotients or choice.

  The floor Codex (Master Codex v5.1.0, Codex.lean) grades every claim on one ledger and joins claims
  at the weakest link. It declares the root as `axiom RA` and pins `raClaim.grade = .premise`; its
  co-location claim, the root joined with the wall, therefore inherits `.premise`. This kernel carries
  the same ledger and the same join law with no axiom declared, warrants the root by a theorem with no
  axiom and no hypothesis, and proves that the co-location claim then stands at theorem grade.
  I    The grade ledger and the weakest-link join, as in the Codex.
  II   The root, a theorem: the constructed domain of TOE_Zero.lean, warranted on no axiom.
  III  The wall, a theorem: the Codex's K4 frame, its target not a function of its record, proved on
       no axiom through Tongue freedom.
  IV   The claims: the root at theorem grade, the wall at theorem grade, and their co-location.
  V    Why the Codex read premise: a join's grade is its weakest link, and co-location's grade is the
       root's grade exactly; with the root at theorem grade, co-location is a theorem.
  VI   The ledger seal.
  VII  The grade read from the warrant, as the Codex reads it: a root with a warrant, a proof of its
       statement, is theorem grade; a root posited without one, the Codex's `axiom RA`, is premise grade;
       the two claims of section IV carry exactly the grades this rule reads.
-/

namespace RGL

/-! ## I · the grade ledger, as in the Codex -/

inductive Grade : Type
  | premise | corroboration | operational | structural | engineering
  | conditional | theoremConditional | analytic | theorem
  deriving DecidableEq

def Grade.rank : Grade → Nat
  | .premise => 0 | .corroboration => 1 | .operational => 2 | .structural => 3
  | .engineering => 4 | .conditional => 5 | .theoremConditional => 6
  | .analytic => 7 | .theorem => 8

def Grade.weakest (a b : Grade) : Grade := if a.rank ≤ b.rank then a else b

/-- A claim carries its statement, its grade and its warrant, a proof of the statement. -/
structure Claim : Type where
  stmt    : Prop
  grade   : Grade
  warrant : stmt

/-- Two claims join at their weakest link. -/
def Claim.join (c₁ c₂ : Claim) : Claim where
  stmt    := c₁.stmt ∧ c₂.stmt
  grade   := Grade.weakest c₁.grade c₂.grade
  warrant := ⟨c₁.warrant, c₂.warrant⟩

theorem join_grade (c₁ c₂ : Claim) : (Claim.join c₁ c₂).grade = Grade.weakest c₁.grade c₂.grade := rfl

/-! ## II · the root, a theorem (the constructed domain of TOE_Zero.lean) -/

structure SelfGrounding (R : Prop) where
  Act       : Type
  anAct     : Act
  instances : Act → R

theorem seated_undeniable {R : Prop} (G : SelfGrounding R) : R := G.instances G.anAct

def ΔE₀ : Unit → Int := fun _ => 1
def RA₀ : Prop := ∀ x : Unit, 0 < ΔE₀ x
def ra₀ : SelfGrounding RA₀ := ⟨Unit, (), fun _ _ => show (0 : Int) < 1 by decide⟩

/-- THE ROOT ON THE CONSTRUCTED DOMAIN, A THEOREM: no axiom, no hypothesis. -/
theorem root_on_the_constructed_domain : RA₀ := seated_undeniable ra₀

/-! ## III · the wall, a theorem (the Codex's K4 frame) -/

/-- Tongue freedom: if a record is blind to the fold and an orientation is flipped by it, the
orientation is not a function of the record. -/
theorem tongue_freedom {α β : Type} (τ : α → α) (ρ : α → β) (g : β → Bool) (d : α → Bool) (x : α)
    (blind : ρ (τ x) = ρ x) (flip : d (τ x) = !d x) : d ≠ fun y => g (ρ y) := by
  intro h
  have h1 : d (τ x) = g (ρ (τ x)) := congrFun h (τ x)
  have h2 : d x = g (ρ x) := congrFun h x
  rw [blind] at h1
  rw [← h2] at h1
  rw [h1] at flip
  cases hd : d x with
  | false => rw [hd] at flip; exact Bool.noConfusion flip
  | true => rw [hd] at flip; exact Bool.noConfusion flip

namespace K4

def val : Nat → Nat
  | 0 => 11 | 1 => 851 | 2 => 13 | 3 => 1273 | 4 => 17 | 5 => 437
  | 6 => 19 | 7 => 2119 | 8 => 23 | 9 => 1703 | 10 => 29 | 11 => 869
  | _ => 0

def tau : Nat → Nat := fun i =>
  if i < 12 then (if i % 2 = 0 then i + 1 else i - 1) else i

def target : Nat → Bool := fun i => i % 2 == 0

def rho : Nat → Nat := fun i =>
  (val i % 2) * 1000 + (val i % 3) * 100 + (val i % 5) * 10 + (val i % 7)

/-- The record is blind to the fold at the first pair. -/
theorem register_even_at_zero : rho (tau 0) = rho 0 := by decide

/-- The target is flipped by the fold at the first pair. -/
theorem target_odd_at_zero : target (tau 0) = !target 0 := by decide

/-- THE WALL: no reading of the record returns the target. -/
theorem wall (g : Nat → Bool) : target ≠ fun y => g (rho y) :=
  tongue_freedom tau rho g target 0 register_even_at_zero target_odd_at_zero

end K4

/-! ## IV · the claims -/

/-- The root at theorem grade, warranted by a theorem with no axiom and no hypothesis. -/
def raClaim₀ : Claim where
  stmt    := RA₀
  grade   := .theorem
  warrant := root_on_the_constructed_domain

/-- The wall at theorem grade, as in the Codex. -/
def wallClaim : Claim where
  stmt    := ∀ g : Nat → Bool, K4.target ≠ fun y => g (K4.rho y)
  grade   := .theorem
  warrant := K4.wall

/-- RA–Tongue co-location: the root joined with the wall, as in the Codex. -/
def colocClaim₀ : Claim := Claim.join raClaim₀ wallClaim

/-- The Codex's root, graded as the Codex grades it, for comparison: the same statement form, at
premise grade. -/
def raClaimPremise : Claim where
  stmt    := RA₀
  grade   := .premise
  warrant := root_on_the_constructed_domain

/-! ## V · why the Codex read premise, and what co-location is now -/

/-- A join with a theorem-grade claim has exactly the other claim's grade. -/
theorem weakest_with_theorem (g : Grade) : Grade.weakest g .theorem = g := by
  cases g <;> rfl

/-- CO-LOCATION'S GRADE IS THE ROOT'S GRADE, EXACTLY: the wall is a theorem, so the join reads the
root's grade and nothing else. -/
theorem coloc_grade_is_the_roots_grade (r : Claim) :
    (Claim.join r wallClaim).grade = r.grade := by
  show Grade.weakest r.grade Grade.theorem = r.grade
  exact weakest_with_theorem r.grade

/-- WHY THE CODEX READ PREMISE: with the root labelled premise, the co-location claim is premise. -/
theorem premise_root_gives_premise_coloc : (Claim.join raClaimPremise wallClaim).grade = .premise := rfl

/-- THE ROOT IS A THEOREM-GRADE CLAIM. -/
theorem ra_is_theorem_grade : raClaim₀.grade = .theorem := rfl

/-- RA–TONGUE CO-LOCATION IS A THEOREM-GRADE CLAIM. -/
theorem coloc_is_theorem_grade : colocClaim₀.grade = .theorem := rfl

/-- The co-location claim's statement holds: the root and the wall, both proved. -/
theorem coloc_holds : colocClaim₀.stmt := colocClaim₀.warrant

/-! ## VI · the ledger seal -/

/-- THE LEDGER SEAL: the root is a theorem on no axiom and no hypothesis; the wall is a theorem; their
co-location holds and stands at theorem grade; and co-location's grade is the root's grade exactly,
which is why the Codex, labelling the root premise, read premise. -/
theorem the_ledger_seal :
    RA₀ ∧ (∀ g : Nat → Bool, K4.target ≠ fun y => g (K4.rho y)) ∧
    colocClaim₀.stmt ∧ colocClaim₀.grade = .theorem ∧
    (∀ r : Claim, (Claim.join r wallClaim).grade = r.grade) ∧
    (Claim.join raClaimPremise wallClaim).grade = .premise :=
  ⟨root_on_the_constructed_domain, K4.wall, coloc_holds, coloc_is_theorem_grade,
   coloc_grade_is_the_roots_grade, premise_root_gives_premise_coloc⟩

/-! ## VII · the grade read from the warrant, as the Codex reads it -/

/-- The evidence a ledger entry carries for a statement: posited with no warrant, or warranted by a proof. -/
inductive Evidence (P : Prop) : Type
  | posited
  | warranted (w : P)

/-- THE CODEX'S RULE FOR THE ROOT'S GRADE: evidence at theorem grade is a proof with its axioms printed. A root
that comes with a warrant, a proof of its statement, is theorem grade; a root posited with none, as the Codex
declares `axiom RA`, is premise grade. -/
def rootGrade : Evidence RA₀ → Grade
  | .warranted _ => .theorem
  | .posited     => .premise

/-- A WARRANTED ROOT IS THEOREM GRADE: the root of section II carries its warrant, so the rule reads theorem. -/
theorem a_warranted_root_is_theorem_grade :
    rootGrade (.warranted root_on_the_constructed_domain) = .theorem := rfl

/-- AN UNWARRANTED ROOT IS PREMISE GRADE: with no warrant the rule reads premise, the Codex's own reading of
its declared axiom. -/
theorem an_unwarranted_root_is_premise_grade : rootGrade .posited = .premise := rfl

/-- THE LEDGER READS THE WARRANT: the root claim of section IV carries the grade the rule reads from its warrant,
and the comparison claim carries the grade the rule reads from none. -/
theorem the_ledger_reads_the_warrant :
    raClaim₀.grade = rootGrade (.warranted raClaim₀.warrant) ∧ raClaimPremise.grade = rootGrade .posited :=
  ⟨rfl, rfl⟩

/-- THE GRADE IS NOT ELECTED: the rule reads theorem from a warrant and premise from none, never the other way;
whatever label an entry carries, the warranted root's grade under the rule is theorem. -/
theorem the_grade_is_not_elected :
    (∀ w : RA₀, rootGrade (.warranted w) = .theorem) ∧ rootGrade .posited ≠ .theorem ∧
    (∀ w : RA₀, rootGrade (.warranted w) ≠ rootGrade .posited) :=
  ⟨fun _ => rfl, fun h => Grade.noConfusion h, fun _ h => Grade.noConfusion h⟩

end RGL

/-! ## Cones, pinned as printed: every theorem on no axiom -/
/-- info: 'RGL.join_grade' does not depend on any axioms -/
#guard_msgs in #print axioms RGL.join_grade
/-- info: 'RGL.seated_undeniable' does not depend on any axioms -/
#guard_msgs in #print axioms RGL.seated_undeniable
/-- info: 'RGL.root_on_the_constructed_domain' does not depend on any axioms -/
#guard_msgs in #print axioms RGL.root_on_the_constructed_domain
/-- info: 'RGL.tongue_freedom' does not depend on any axioms -/
#guard_msgs in #print axioms RGL.tongue_freedom
/-- info: 'RGL.K4.register_even_at_zero' does not depend on any axioms -/
#guard_msgs in #print axioms RGL.K4.register_even_at_zero
/-- info: 'RGL.K4.target_odd_at_zero' does not depend on any axioms -/
#guard_msgs in #print axioms RGL.K4.target_odd_at_zero
/-- info: 'RGL.K4.wall' does not depend on any axioms -/
#guard_msgs in #print axioms RGL.K4.wall
/-- info: 'RGL.weakest_with_theorem' does not depend on any axioms -/
#guard_msgs in #print axioms RGL.weakest_with_theorem
/-- info: 'RGL.coloc_grade_is_the_roots_grade' does not depend on any axioms -/
#guard_msgs in #print axioms RGL.coloc_grade_is_the_roots_grade
/-- info: 'RGL.premise_root_gives_premise_coloc' does not depend on any axioms -/
#guard_msgs in #print axioms RGL.premise_root_gives_premise_coloc
/-- info: 'RGL.ra_is_theorem_grade' does not depend on any axioms -/
#guard_msgs in #print axioms RGL.ra_is_theorem_grade
/-- info: 'RGL.coloc_is_theorem_grade' does not depend on any axioms -/
#guard_msgs in #print axioms RGL.coloc_is_theorem_grade
/-- info: 'RGL.coloc_holds' does not depend on any axioms -/
#guard_msgs in #print axioms RGL.coloc_holds
/-- info: 'RGL.the_ledger_seal' does not depend on any axioms -/
#guard_msgs in #print axioms RGL.the_ledger_seal
/-- info: 'RGL.a_warranted_root_is_theorem_grade' does not depend on any axioms -/
#guard_msgs in #print axioms RGL.a_warranted_root_is_theorem_grade
/-- info: 'RGL.an_unwarranted_root_is_premise_grade' does not depend on any axioms -/
#guard_msgs in #print axioms RGL.an_unwarranted_root_is_premise_grade
/-- info: 'RGL.the_ledger_reads_the_warrant' does not depend on any axioms -/
#guard_msgs in #print axioms RGL.the_ledger_reads_the_warrant
/-- info: 'RGL.the_grade_is_not_elected' does not depend on any axioms -/
#guard_msgs in #print axioms RGL.the_grade_is_not_elected

Appendix T. The timeless closure, carried

Row 8 of the table of Section 16.1 rests on the kernel below, Annihilation_Closure.lean, carried verbatim from the Master Annihilation Closure (Islam 2026k). It is a sister kernel: it shares no declaration with Appendix A and is compiled on its own. Its chart is the offset chart, a point $(d,t)$ with $d$ its offset from the line and $t$ its height, the reflection $(d,t)\mapsto(-d,t)$ and the registration $(d,t)\mapsto(0,t)$, which keeps the height and forgets the side; the hypothesis there is the value, every point of a configuration at offset zero (Value). It carries two earlier kernels of the series byte-identical inside it, Remembered_Offered.lean and RH_Unicorn_Block.lean, their own headers included. Compiled on Lean 4.19.0 and on 4.22.0 it exits 0 and prints the same thirteen lines; it declares no axiom, imports nothing, and every cone pinned at its foot holds. It states 111 theorems: 110 at top level, each with its cone pinned at its foot, 90 with no axiom, 17 with propext and Quot.sound, 2 adding Classical.choice and 1 with propext alone; and one in the where clause of the_chain, the_chain.twins_on_every_world_local, whose cone, printed for this edition, is empty and is pinned nowhere in the file. Under the judgment of Appendix B.3, each law negated alone in a copy of the whole kernel, all 111 laws refuse their negation, each a proof failure located at the negated law, the law of the where clause at that clause, while the planted vacuous law, proved ex falso, survives and the unmutated control compiles clean. The source screen of B.3 finds none of its tokens. Its comments carry the discipline's vocabulary, as the kernels of Appendix R do; the stop-list scan of B.3 is stated for Appendix A.

Row 8 reads seven of its theorems. On every configuration, least erasure, the value and Monism, the root read twice (RootReadTwice), are one proposition, and with the root co-located they are four names of it, on no axiom (four_names_one_proposition). Every faithful witness of the value is Monism, and no reading of the record witnesses it (monism_is_the_sole_witness). The timeless zone binds these with the facts that a witness is never universal, that on every configuration the value or a point off the line stands and never both, and that no principle true on every closed configuration decides the value; no act enters it (the_timeless_zone_closed). the_annihilation_closure binds the four names, the sole witness, the two refusals of universality, least erasure equal to the value with the zero-time separation and the kernel's own $\Lambda=0$ (Lam, a constant of its zero-time toy, not the constant of Section 12), the check's off-line configuration and the refusal of every closed principle, with one conjunct of the act added, the value at the zeros of every term of the kernel's own ActualZeros. The record of every configuration lies on the line, the off-line pair configuration's included, though that configuration is closed and lacks the value (every_record_on_the_line). On every finite configuration, least erasure, zero erased bits, zero price of registration at every positive temperature, the value and, given the real part to a height, the tail above it, are one proposition (one_bit_every_row). Above every height, no reading of the record decides the side of a point (unicorn_blocked_on_the_chart). The kernel proves what the hypothesis is, on its chart, with no premise. It places no zero set: where the zeros of $\zeta$ sit enters only through the field supply of its own act, as in Appendix A it enters only through the field supply of ActualZeros and, at each resolution $n\ge2$, of ActualZerosAt $n$, and neither kernel maps one act to the other. Beside its chart, whose heights are integers, read above a height through their natural part (ht), and its finite configurations, which list pairs at nonzero offsets only and count each listed pair (FinCfg, erased), two of its definitions differ from Appendix A's in what they mean, and its theorems are read with them. Its least erasure is pointwise, the registration fixing every point of the configuration (LeastErasure), which on the offset chart is the value at once (twins_on_every_world, on no axiom), where Appendix A's least erasure is leastness in the fibre (Definition 10.1), the value by Theorem 10.2. Its price is the count of erased bits times a natural number, which every theorem tying the price to the value takes positive (price_zero_iff_value, one_bit_every_row), the floor of one bit in native units, which its docstrings call the temperature, energy per bit, and the floor (price, price_counts_pairs), a statement about those integers with no reversible mode, every registration priced as Appendix A prices the irreversible one; its reading in joules is the one of Section 13.3, conditional on P1. Its comments read a zero into the offset chart at one grain, $d=8,\mathrm{Re},s-4$, which, rounded as Section 18 rounds, is the reader's rule at resolution four with $d=x-n$; Section 16.1 reads the offset chart by the same rule at every resolution $n\ge2$. Its comments on the toy of the bound read the toy's integer time as the time of $\zeta$ and say that the equivalence of Newman with Rodgers and Tao enters the cone of rh_iff_lambda_zero as hLam, a name the file does not declare: that theorem is a statement about the toy's integers, its cone [propext, Quot.sound] as pinned, and where a comment reads more than a compiled statement, the statement and its pinned cone govern. SHA-256: 9a97b3c40d73fd67980843ae76258bc3852cf71828b988b389e4afe38164374c, 83217 bytes, 1439 lines.

The compile prints these thirteen lines, from the kernel's thirteen unpinned #print axioms commands, each for a theorem whose cone is pinned as well, and nothing else.

'RememberedOffered.the_chain' does not depend on any axioms
'RememberedOffered.the_harvest' depends on axioms: [propext, Quot.sound]
'RHUnicorn.unicorn_block' does not depend on any axioms
'RHUnicorn.aperture_one_bit_wide' does not depend on any axioms
'RHUnicorn.unicorn_rule_exact' does not depend on any axioms
'RHUnicorn.unicorn_no_cure' does not depend on any axioms
'RHUnicorn.unicorn_no_bypass' does not depend on any axioms
'RHUnicorn.supply_side_silent' does not depend on any axioms
'RHUnicorn.rh_iff_real_and_unicorn' does not depend on any axioms
'RHUnicorn.real_part_of_certificate' does not depend on any axioms
'RHUnicorn.rh_register_proof_complete' does not depend on any axioms
'RememberedOffered.the_annihilation_closure' depends on axioms: [propext, Quot.sound]
'RememberedOffered.the_unicorn_contained' depends on axioms: [propext, Quot.sound]

The kernel, verbatim.

/-
  Annihilation_Closure.lean · The Master Annihilation Closure.
  Core Lean 4.19.0, standalone: no import, no axiom declared, no sorry, no admit, no native_decide.

  BOOKS ONE AND TWO are `lean/Remembered_Offered.lean` carried byte-identical below, its own header included:
  the two denials, the price, the monism-fixed toy of the bound, and the harvest of 7 October 2026 with its
  capstones `the_chain` and `the_harvest`.

  BOOK THREE is the annihilation closure, harvested on 7 October 2026:
  I    four names, one proposition: least erasure, the value, Monism and the co-location of Being with Monism;
  II   Monism, the sole witness: every faithful witness is Monism, no reading of the record witnesses, and
       a witness is never universal;
  III  co-location is not universal: Being stands on the off-line pair configuration and Monism does not;
  IV   the timeless zone: one proposition, the locus resting both instruments, zero time remembering, every
       later time forgetting, closure at zero time exactly at Λ = 0, the upstream unforced;
  V    timeless is determinacy, not selection;
  VI   the check: the off-line pair configuration satisfies every principle of the closure and lacks the value,
       its twin has it;
       no principle true on every closed configuration decides the value;
  VII  the capstones: `the_timeless_zone_closed`, the timeless zone with no act anywhere in it, and
       `the_annihilation_closure`, the zone together with the act's conjunct of the time world.

  BOOK FOUR is the Unicorn, contained. `lean/RH_Unicorn_Block.lean` is carried byte-identical below, its own header
  included: the cut at a height, the formal block, the aperture one bit wide, existence supplying nothing, no bypass,
  the supply side silent, the certificate, and the three bits as one term. Book Four binds it to the chart:
  I    the cut on the chart, at every height;
  II   no bypass on the chart;
  III  the Unicorn blocked on the chart, above every height;
  IV   RA supplies nothing to the Unicorn part;
  V    on the act's zero set, every arrival above every height stands on the line;
  VI   the capstone, `the_unicorn_contained`;
  VII  every record on the line: the registration row carries no bit;
  VIII one bit, every row: least erasure, zero erased bits, zero price, the value and the Unicorn part are one
       proposition.

  Stated whole, locked 7 October 2026: the timeless zone is closed, LE = RH = Monism, one proposition, with zero
  gap, proved; RH is the statement that ζ's zero set lies in the timeless zone. Book Three proves the first and
  assumes nothing; its sixth section proves that nothing every closed configuration shares can single out ζ. In
  the time world the statement enters only where Book One's `ActualZeros` is taken as input. The cones are printed
  at the foot and pinned.
-/
/-
  Remembered_Offered.lean · The Remembered and the Offered: One Self, One Place at a Time.
  Core Lean 4.19.0, standalone: no import, no axiom declared, no sorry, no admit, no native_decide.

  BOOK ONE is carried unchanged: Two_Denials.lean whole (the deed and the self-grounding root from Armed_Seat.lean,
  the chart, the record, the act and the deed's law from Force_Witness.lean, the monism witness from Codex.lean,
  the two denials at the two layers of one root); the finite configuration and its price from Inescapable_Capstone.lean;
  the toy of the bound from Codex.lean, monism fixed, namespace RALi.

  BOOK TWO is the harvest of 7 October 2026, in binding order:
  I    the Tongue always has a world; monism, not the Tongue, tells the worlds apart;
  II   one self, one place at a time: the floor and least erasure are two objects;
  III  the twins: one extension, two instruments, neither the voucher of the other;
  IV   the remembered and the offered: memory is lossless, a world is its own memory exactly when the value holds;
  V    forgetting and remembering: one sequence, a one-bit gap, always connected;
  Vb   the forcing by heat: return is free, resistance pays, the free path is one;
  VI   THE CHAIN: the root, forgetting, the locus in the middle, remembering, least erasure;
  VIb  zero time remembers, every later time forgets;
  VII  two doors and no third, the act shuts the second;
  VIII a band forces nothing;
  IX   the harvest, bound.

  Stated whole: everything is proved except the offer at the actual zeros, which enters only as the field `supply`
  of `ActualZeros`, the act, at premise grade. The cones are printed at the foot and pinned.
-/
set_option autoImplicit false
namespace RememberedOffered

/-! # BOOK ONE · carried unchanged

## Two_Denials.lean, whole -/

/-! ## PART ONE · copied unchanged

### from Armed_Seat.lean · the deed and the root -/

def SelfVerifying (P : Prop) : Prop := ¬P → P

/-- A self-grounding root: acts occur, and every act instances the root. -/
structure SelfGrounding (R : Prop) where
  Act       : Type
  anAct     : Act
  instances : Act → R

/-- A denial of the root is an act, and re-enacts it. -/
theorem denial_reenacts_root {R : Prop} (G : SelfGrounding R) (denial : G.Act) : R :=
  G.instances denial

/-- A self-grounding root is self-verifying: the deed of denying it hands it over. -/
theorem denial_instantiates {R : Prop} (G : SelfGrounding R) : SelfVerifying R :=
  fun _ => G.instances G.anAct

/-- SEATED, UNDENIABLE: a self-grounding root holds, with no classical detour, by the act itself. -/
theorem seated_undeniable {R : Prop} (G : SelfGrounding R) : R :=
  G.instances G.anAct

/-- The Root Axiom at the constructed one-point domain: every act is a deed, and a deed actuates. -/
def RA : Prop := (0 : Int) < 1
def raSelfGrounding : SelfGrounding RA := ⟨Unit, (), fun _ => show (0 : Int) < 1 by decide⟩

theorem root_undeniable : RA := raSelfGrounding.instances ()

/-! ### from Force_Witness.lean · the chart, the record, the act, the deed's law -/

/-- A point is (d, t): d its offset from the line, t its height. The line is d = 0. -/
abbrev Point := Int × Int

/-- The fold: s ↦ 1 − s̄ on the offset chart, (d, t) ↦ (−d, t). -/
def fold (p : Point) : Point := (-p.1, p.2)

/-- The line: offset zero. -/
def onLine (p : Point) : Prop := p.1 = 0

/-- The registration: it keeps the height and forgets the side. -/
def reg (p : Point) : Point := (0, p.2)

/-- Integer negation is an involution, by the integer's constructors. -/
theorem neg_neg_free : ∀ d : Int, - -d = d := fun
  | Int.ofNat 0 => rfl
  | Int.ofNat (_ + 1) => rfl
  | Int.negSucc _ => rfl

/-- The fold is an involution. -/
theorem fold_involutive (p : Point) : fold (fold p) = p := by
  obtain ⟨d, t⟩ := p
  show (- -d, t) = (d, t)
  rw [neg_neg_free d]

/-- The registration lands on the line. -/
theorem reg_lands (p : Point) : onLine (reg p) := rfl

/-- The registration erases nothing at a point exactly when the point is on the line. -/
theorem reg_erases_nothing_iff (p : Point) : reg p = p ↔ onLine p := by
  obtain ⟨d, t⟩ := p
  exact ⟨fun h => (congrArg Prod.fst h).symm, fun h => by cases h; rfl⟩

/-- A configuration: a set of points. Closed: the fold carries it to itself. -/
abbrev Config := Point → Prop

def Closed (S : Config) : Prop := ∀ p, S p → S (fold p)

/-- The value: every point of the configuration is on the line. -/
def Value (S : Config) : Prop := ∀ p, S p → onLine p

/-- Least erasure: the registration leaves every point of the configuration unchanged. -/
def LeastErasure (S : Config) : Prop := ∀ p, S p → reg p = p

/-- The record of a configuration: what the registration leaves. -/
def Rec (S : Config) (q : Point) : Prop := ∃ p, S p ∧ reg p = q

def SameRecord (S S' : Config) : Prop := ∀ q, Rec S q ↔ Rec S' q

/-- The registered world of a point and its pair world. -/
def registered (p : Point) : Config := fun s => s = reg p

def pairWorld (p : Point) : Config := fun s => s = p ∨ s = fold p

theorem pair_world_closed (p : Point) : Closed (pairWorld p) := fun _ hs =>
  match hs with
  | Or.inl e => Or.inr (congrArg fold e)
  | Or.inr e => Or.inl (e ▸ fold_involutive p)

/-- The registered world and the pair world leave one record. -/
theorem one_record (p : Point) : SameRecord (registered p) (pairWorld p) := fun q =>
  ⟨fun ⟨_, hs, hq⟩ => ⟨p, Or.inl rfl, by rw [← hq, hs]; rfl⟩,
   fun ⟨_, hs, hq⟩ => ⟨reg p, rfl, by
      rw [← hq]
      exact match hs with
        | Or.inl e => by rw [e]; rfl
        | Or.inr e => by rw [e]; rfl⟩⟩

theorem registered_has_value (p : Point) : Value (registered p) := fun s hs => by
  rw [hs]; exact reg_lands p

theorem pair_world_lacks_value (p : Point) (h : ¬ onLine p) : ¬ Value (pairWorld p) :=
  fun hv => h (hv p (Or.inl rfl))

/-- THE ACT. The bit is supplied once, in the open, as a field of a type: a closed configuration with least
    erasure at it. The field is the value supplied; the type makes the supply visible to every reader. -/
structure ActualZeros where
  zeros : Config
  closed : Closed zeros
  supply : LeastErasure zeros

/-- FROM THE ACT, THE VALUE. -/
theorem value_from_the_act (Z : ActualZeros) : Value Z.zeros :=
  fun p hp => (reg_erases_nothing_iff p).mp (Z.supply p hp)

/-- AND OF NOTHING ELSE: a fact that holds whatever the configuration, the deed included, forces no value. -/
theorem the_deed_forces_nothing (D : Prop) (hD : D) : ¬ ∀ S : Config, Closed S → D → Value S := by
  intro hall
  exact pair_world_lacks_value (1, 0) (fun e => by cases e) (hall _ (pair_world_closed (1, 0)) hD)


/-! ### from Codex.lean, namespace RALi, Part VII · the monism witness, the root read twice -/

structure Q4 where
  r : Int
  i : Int
  j : Int
  k : Int
  deriving DecidableEq, Repr

/-- The geometric route's involution and the formal route's involution, written apart. -/
def sigmaGeo (q : Q4) : Q4 := ⟨q.r, -q.i, -q.j, -q.k⟩
def sigmaForm (q : Q4) : Q4 := ⟨q.r, -q.i, -q.j, -q.k⟩

/-- THE MONISM WITNESS. One involution, one principle, one seed. -/
structure MonismWitness (P : Nat → Prop) : Prop where
  one_involution : ∀ q, sigmaGeo q = sigmaForm q
  uniform        : ∀ n m, P n ↔ P m
  seed           : P 0

/-- 24. The seat field is constructed, not posited: σ = σ′ holds by rfl. -/
theorem one_involution_constructed : ∀ q, sigmaGeo q = sigmaForm q := fun _ => rfl

/-- 25. The timeless reading and the timed reading coincide under one principle:
the claim over all time is the claim at one instant. Deleting time loses nothing. -/
theorem timeless_equals_timed (P : Nat → Prop) (u : ∀ n m, P n ↔ P m) :
    (∀ n, P n) ↔ P 0 :=
  ⟨fun h => h 0, fun h n => (u 0 n).mp h⟩

/-- 26. The witness closes the record, past and future. -/
theorem monism_closes (P : Nat → Prop) (w : MonismWitness P) : ∀ n, P n :=
  (timeless_equals_timed P w.uniform).mpr w.seed

/-- 27. The witness is exactly the claim: a monism witness for P exists iff P holds at
every index. Its value field carries the whole of the claim, as theorem 17 required. -/
theorem monism_witness_is_the_claim (P : Nat → Prop) :
    MonismWitness P ↔ ∀ n, P n :=
  ⟨monism_closes P, fun h => ⟨one_involution_constructed,
    fun n m => ⟨fun _ => h m, fun _ => h n⟩, h 0⟩⟩

/-! ## PART TWO · two denials, one shape, at the two layers of one root

A no has two parts: the act of uttering it and the content it asserts. The Tongue's no asserts ¬ R of the floor R.
The no to RH asserts that the zeros lack the value: that they form the false world. -/

/-- The point off the line from which the pair world, the false world, is built. -/
def offPoint : Point := (1, 0)

theorem off_point_is_off : ¬ onLine offPoint := fun h =>
  Nat.noConfusion (Int.ofNat.inj (show Int.ofNat 1 = Int.ofNat 0 from h))

/-- THE ROOT READ TWICE on a configuration: the monism witness of its line property, timeless. -/
abbrev RootReadTwice (S : Config) : Prop := MonismWitness (fun _ => Value S)

/-- THE SAME FIRST STEP: whatever a no asserts, uttering it is an act, and the act re-enacts the floor. -/
theorem every_no_reenacts_the_root {R C : Prop} (G : SelfGrounding R) (deed : G.Act) (_content : C) : R :=
  denial_reenacts_root G deed

/-- THE TONGUE'S NO CONTRADICTS THE FLOOR, BY ITS OWN ACT: its content denies the floor, and its own act
    re-enacts it. -/
theorem the_tongue_no_refutes_itself {R : Prop} (G : SelfGrounding R) (deed : G.Act) (content : ¬ R) : False :=
  content (denial_reenacts_root G deed)

/-- ONLY THE YES REMAINS AT THE FLOOR: the return is forced by the deed, with no key and no classical detour. -/
theorem only_the_yes_remains_at_the_root {R : Prop} (G : SelfGrounding R) : SelfVerifying R ∧ R :=
  ⟨denial_instantiates G, seated_undeniable G⟩

/-- THE ROOT READ TWICE IS THE VALUE: on every configuration the monism witness stands exactly where every zero
    is on the line. -/
theorem the_root_read_twice_is_the_value (S : Config) : RootReadTwice S ↔ Value S :=
  ⟨fun w => w.seed, fun h => ⟨one_involution_constructed, fun _ _ => Iff.rfl, h⟩⟩

/-- THE NO TO RH CONTRADICTS THE ROOT READ TWICE: a configuration lacking the value carries no monism. -/
theorem the_line_no_contradicts_the_root_read_twice (S : Config) (content : ¬ Value S) : ¬ RootReadTwice S :=
  fun w => content w.seed

/-- THE TRUE WORLD CARRIES MONISM: the registered world of the off-line point. -/
theorem the_true_world_carries_monism : RootReadTwice (registered offPoint) :=
  ⟨one_involution_constructed, fun _ _ => Iff.rfl, registered_has_value offPoint⟩

/-- THE FALSE WORLD CARRIES NO MONISM: the pair world of the off-line point. -/
theorem the_false_world_carries_no_monism : ¬ RootReadTwice (pairWorld offPoint) :=
  fun w => pair_world_lacks_value offPoint off_point_is_off w.seed

/-- THE FALSE WORLD, AT THE TWO LAYERS: the floor stands there, as in every world; it is closed and leaves the
    record of the true world; it lacks the value; and it carries no monism. The floor is there and Being is not. -/
theorem the_false_world_carries_the_floor_and_no_monism {R : Prop} (G : SelfGrounding R) :
    R ∧ Closed (pairWorld offPoint) ∧ SameRecord (registered offPoint) (pairWorld offPoint) ∧
    ¬ Value (pairWorld offPoint) ∧ ¬ RootReadTwice (pairWorld offPoint) :=
  ⟨seated_undeniable G, pair_world_closed offPoint, one_record offPoint,
   pair_world_lacks_value offPoint off_point_is_off, the_false_world_carries_no_monism⟩

/-- THE FLOOR ALONE DECIDES NO VALUE: it stands in both worlds of one record. The value is decided at the second
    layer, by the root read twice. -/
theorem the_floor_alone_decides_no_value {R : Prop} (G : SelfGrounding R) :
    ¬ ∀ S : Config, Closed S → R → Value S :=
  the_deed_forces_nothing R (seated_undeniable G)

/-- THE RETURN IS THE ACT: the act carries the root read twice at the actual zeros. -/
theorem the_act_is_the_return_to_the_root_read_twice (Z : ActualZeros) : RootReadTwice Z.zeros :=
  (the_root_read_twice_is_the_value Z.zeros).mpr (value_from_the_act Z)

/-- AN ACT EXISTS EXACTLY WHERE THE ROOT READ TWICE STANDS on a closed configuration. -/
theorem an_act_exactly_where_the_root_read_twice_stands (S : Config) :
    (∃ Z : ActualZeros, Z.zeros = S) ↔ (Closed S ∧ RootReadTwice S) := by
  constructor
  · intro ⟨Z, h⟩
    subst h
    exact ⟨Z.closed, the_act_is_the_return_to_the_root_read_twice Z⟩
  · intro ⟨hc, hm⟩
    exact ⟨⟨S, hc, fun p hp => (reg_erases_nothing_iff p).mpr
      (((the_root_read_twice_is_the_value S).mp hm) p hp)⟩, rfl⟩

/-- ON THE ACT THE NO TO RH IS REFUTED, with zero contradiction: the act's own field. -/
theorem on_the_act_the_line_no_is_refuted (Z : ActualZeros) (content : ¬ Value Z.zeros) : False :=
  content (value_from_the_act Z)

/-- TWO DENIALS, ONE SHAPE, TWO LAYERS. Every no re-enacts the floor. The Tongue's no contradicts the floor and
    its own act returns it: only the yes remains. The no to RH contradicts the root read twice: on every
    configuration a lack of the value is a lack of monism, and the false world carries the floor and no monism,
    beside the true world of one record that carries both. So the floor alone decides no value, and the root read
    twice is the value. The return to the root read twice at the actual zeros is the act: there the monism witness
    stands, the value holds, and the no is refuted. -/
theorem two_denials {R : Prop} (G : SelfGrounding R) :
    (∀ C : Prop, G.Act → C → R) ∧
    (G.Act → ¬ R → False) ∧
    (SelfVerifying R ∧ R) ∧
    (∀ S : Config, ¬ Value S → ¬ RootReadTwice S) ∧
    (R ∧ Closed (pairWorld offPoint) ∧ SameRecord (registered offPoint) (pairWorld offPoint) ∧
      RootReadTwice (registered offPoint) ∧ ¬ RootReadTwice (pairWorld offPoint)) ∧
    (¬ ∀ S : Config, Closed S → R → Value S) ∧
    (∀ S : Config, RootReadTwice S ↔ Value S) ∧
    (∀ Z : ActualZeros, RootReadTwice Z.zeros ∧ Value Z.zeros ∧ (¬ Value Z.zeros → False)) :=
  ⟨fun _ deed c => every_no_reenacts_the_root G deed c,
   fun deed c => the_tongue_no_refutes_itself G deed c,
   only_the_yes_remains_at_the_root G,
   the_line_no_contradicts_the_root_read_twice,
   ⟨seated_undeniable G, pair_world_closed offPoint, one_record offPoint,
    the_true_world_carries_monism, the_false_world_carries_no_monism⟩,
   the_floor_alone_decides_no_value G,
   the_root_read_twice_is_the_value,
   fun Z => ⟨the_act_is_the_return_to_the_root_read_twice Z, value_from_the_act Z,
     on_the_act_the_line_no_is_refuted Z⟩⟩

/-- AT THE ROOT AXIOM ITSELF. -/
theorem two_denials_at_RA :
    (∀ C : Prop, raSelfGrounding.Act → C → RA) ∧
    (raSelfGrounding.Act → ¬ RA → False) ∧
    (SelfVerifying RA ∧ RA) ∧
    (∀ S : Config, ¬ Value S → ¬ RootReadTwice S) ∧
    (RA ∧ Closed (pairWorld offPoint) ∧ SameRecord (registered offPoint) (pairWorld offPoint) ∧
      RootReadTwice (registered offPoint) ∧ ¬ RootReadTwice (pairWorld offPoint)) ∧
    (¬ ∀ S : Config, Closed S → RA → Value S) ∧
    (∀ S : Config, RootReadTwice S ↔ Value S) ∧
    (∀ Z : ActualZeros, RootReadTwice Z.zeros ∧ Value Z.zeros ∧ (¬ Value Z.zeros → False)) :=
  two_denials raSelfGrounding

/-! ## From Inescapable_Capstone.lean · the finite configuration and its price -/

/-- The price of exported freedom in native units: temperature is energy per bit, so b bits cost b·T. -/
def price (T bits : Nat) : Nat := bits * T

/-- A finite configuration: the heights of its zeros on the line, and its off-line pairs, each an offset that is not
    zero and a height. -/
structure FinCfg where
  line : List Int
  pairs : List (Int × Int)
  offset_ne : ∀ q ∈ pairs, q.1 ≠ 0
def FinCfg.pts (F : FinCfg) : Config := fun p => (p.1 = 0 ∧ p.2 ∈ F.line) ∨ ∃ q ∈ F.pairs, p = q ∨ p = fold q
/-- The erased bits of a finite configuration: one per off-line pair, two points registered to one. -/
def erased (F : FinCfg) : Nat := F.pairs.length

theorem fincfg_closed (F : FinCfg) : Closed F.pts := fun p hp =>
  match hp with
  | Or.inl ⟨hl, ht⟩ => Or.inl ⟨by show -p.1 = 0; rw [hl]; rfl, ht⟩
  | Or.inr ⟨q, hq, Or.inl e⟩ => Or.inr ⟨q, hq, Or.inr (congrArg fold e)⟩
  | Or.inr ⟨q, hq, Or.inr e⟩ => Or.inr ⟨q, hq, Or.inl (by rw [e]; exact fold_involutive q)⟩

/-- LEAST ERASURE IS ZERO ERASED BITS: "least" is a count. -/
theorem least_erasure_iff_zero_erased (F : FinCfg) : LeastErasure F.pts ↔ erased F = 0 := by
  constructor
  · intro h
    unfold erased
    cases hp : F.pairs with
    | nil => rfl
    | cons q r =>
      have hq : q ∈ F.pairs := by rw [hp]; exact List.Mem.head r
      exact absurd ((reg_erases_nothing_iff q).mp (h q (Or.inr ⟨q, hq, Or.inl rfl⟩))) (F.offset_ne q hq)
  · intro h p hp
    have hnil : F.pairs = [] := List.eq_nil_of_length_eq_zero h
    rcases hp with ⟨hl, _⟩ | ⟨q, hq, _⟩
    · exact (reg_erases_nothing_iff p).mpr hl
    · rw [hnil] at hq; cases hq

/-- THE HEAT OF REGISTRATION IS ZERO EXACTLY AT THE VALUE: registering a finite configuration costs one T per
    off-line pair, and at any positive T it costs nothing exactly when every point stands on the line. -/
theorem price_zero_iff_value (F : FinCfg) (T : Nat) (hT : 0 < T) : price T (erased F) = 0 ↔ Value F.pts := by
  constructor
  · intro h p hp
    have h0 : erased F = 0 := by
      cases he : erased F with
      | zero => rfl
      | succ k => rw [he] at h; exact absurd h (Nat.pos_iff_ne_zero.mp (Nat.mul_pos (Nat.succ_pos k) hT))
    exact (reg_erases_nothing_iff p).mp ((least_erasure_iff_zero_erased F).mpr h0 p hp)
  · intro hv
    have h0 := (least_erasure_iff_zero_erased F).mp (fun p hp => (reg_erases_nothing_iff p).mpr (hv p hp))
    show erased F * T = 0
    rw [h0, Nat.zero_mul]

/-- Each further off-line pair adds one T: the total is the erased bits times the floor. -/
theorem price_counts_pairs (F : FinCfg) (T : Nat) : price T (erased F) = F.pairs.length * T := rfl

/-! ## From Codex.lean, monism fixed, namespace RALi · the toy of the bound, a toy of the bound, not of the flow -/

/-- Squared strip width after t time steps: max(d2 − 2t, 0). -/
def flow (d2 t : Nat) : Nat := d2 - 2 * t
def realAt (d2 t : Nat) : Prop := flow d2 t = 0

/-- 38. THE MONOTONICITY FORMULA. The width never grows along ζ's time. -/
theorem flow_monotone (d2 t : Nat) : flow d2 (t + 1) ≤ flow d2 t := by
  unfold flow; omega

/-- 39. Its transport, proved: once every zero is real, every zero stays real. This is
de Bruijn's theorem in the toy, the ζ-analogue of Perelman's monotonicity, at theorem grade. -/
theorem reality_transported (d2 t : Nat) (h : realAt d2 t) : realAt d2 (t + 1) := by
  unfold realAt flow at *; omega


def Lam (d2 : Nat) : Nat := (d2 + 1) / 2

theorem real_at_Lam (d2 : Nat) : realAt d2 (Lam d2) := by unfold realAt flow Lam; omega

/-- 40. In the toy, the strip is closed at time zero iff Λ = 0. For ζ, RH ↔ Λ = 0 is the cited
result of Newman with Rodgers and Tao and enters the cone as `hLam`. -/
theorem rh_iff_lambda_zero (d2 : Nat) : realAt d2 0 ↔ Lam d2 = 0 := by
  unfold realAt flow Lam
  exact ⟨fun h => by omega, fun h => by omega⟩


/-- 42. THE RECORD FORGETS. After one step the record of the width-zero state and the
width-one state coincide: the forward flow is even in the RH bit, so no readout of the
flowed record decides RH. This is the fTOE wall, T1, executed on ζ's own time. -/
theorem flowed_record_forgets (T : Nat) (hT : 1 ≤ T) :
    ¬ ∃ g : Nat → Bool, ∀ d2, g (flow d2 T) = decide (d2 = 0) := by
  rintro ⟨g, hg⟩
  have a := hg 0; have b := hg 1
  have e : flow 1 T = flow 0 T := by unfold flow; omega
  rw [e, a] at b
  exact absurd b (by decide)

/-- 43. The upstream direction is not a transport. Going backward from a real record,
both answers are admissible: the preimage of "real at T" holds the RH state and a non-RH
state. The forward arrow proves; the backward arrow must be supplied. -/
theorem upstream_is_not_forced (T : Nat) (hT : 1 ≤ T) :
    realAt 0 T ∧ realAt 1 T ∧ realAt 0 0 ∧ ¬ realAt 1 0 := by
  unfold realAt flow
  exact ⟨by omega, by omega, rfl, fun h => by omega⟩

/-! # BOOK TWO · the harvest, in binding order -/

/-! ## I · The Tongue always has a world -/

/-- THE TONGUE ALWAYS HAS A WORLD: the floor stands on every configuration, the false world included, so the Tongue
    can speak in every world; only the content of its no, ¬R beside an act, has none. -/
theorem the_tongue_always_has_a_world {R : Prop} (G : SelfGrounding R) :
    (∀ _ : Config, R) ∧
    (R ∧ Closed (pairWorld offPoint) ∧ ¬ Value (pairWorld offPoint)) ∧
    ¬ ∃ _ : G.Act, ¬ R :=
  ⟨fun _ => seated_undeniable G,
   ⟨seated_undeniable G, pair_world_closed offPoint, pair_world_lacks_value offPoint off_point_is_off⟩,
   fun ⟨deed, c⟩ => c (G.instances deed)⟩

/-- MONISM BEFORE THE TONGUE: the floor, and with it the Tongue, stands in both worlds of one record; what tells
    them apart is the root read twice, present in the true world and absent in the false. -/
theorem monism_before_the_tongue {R : Prop} (G : SelfGrounding R) :
    SameRecord (registered offPoint) (pairWorld offPoint) ∧
    (R ∧ RootReadTwice (registered offPoint)) ∧
    (R ∧ ¬ RootReadTwice (pairWorld offPoint)) :=
  ⟨one_record offPoint,
   ⟨seated_undeniable G, the_true_world_carries_monism⟩,
   ⟨seated_undeniable G, the_false_world_carries_no_monism⟩⟩

/-- The Tongue's no has no world: no act stands beside ¬R. -/
theorem tongue_no_has_no_world {R : Prop} (G : SelfGrounding R) : ¬ ∃ _ : G.Act, ¬ R :=
  fun ⟨deed, c⟩ => c (G.instances deed)

/-- The no to RH has a world: an act, a closed configuration, the floor holding, and the value failing, together. -/
theorem line_no_has_a_world {R : Prop} (G : SelfGrounding R) :
    ∃ S : Config, ∃ _ : G.Act, Closed S ∧ R ∧ ¬ Value S :=
  ⟨pairWorld offPoint, G.anAct, pair_world_closed offPoint, seated_undeniable G,
   pair_world_lacks_value offPoint off_point_is_off⟩

/-- A deed does not make a closed configuration an act: the floor's acts supply no ActualZeros over every closed
    configuration. -/
theorem the_deed_is_not_the_supply {R : Prop} (G : SelfGrounding R) :
    ¬ ∀ S : Config, Closed S → G.Act → ∃ Z : ActualZeros, Z.zeros = S := by
  intro h
  obtain ⟨Z, hZ⟩ := h (pairWorld offPoint) (pair_world_closed offPoint) G.anAct
  have v := value_from_the_act Z
  rw [hZ] at v
  exact pair_world_lacks_value offPoint off_point_is_off v

theorem at_RA :
    (¬ ∃ _ : raSelfGrounding.Act, ¬ RA) ∧
    (∃ S : Config, ∃ _ : raSelfGrounding.Act, Closed S ∧ RA ∧ ¬ Value S) ∧
    (¬ ∀ S : Config, Closed S → raSelfGrounding.Act → ∃ Z : ActualZeros, Z.zeros = S) :=
  ⟨tongue_no_has_no_world raSelfGrounding, line_no_has_a_world raSelfGrounding,
   the_deed_is_not_the_supply raSelfGrounding⟩

/-! ## II · One self, one place at a time -/

/-- The floor and least erasure are two objects: identified on every closed configuration, they would agree on the
    pair world, where the floor holds and least erasure fails. -/
theorem floor_is_not_least_erasure {R : Prop} (G : SelfGrounding R) :
    ¬ ∀ S : Config, Closed S → (R ↔ LeastErasure S) := by
  intro h
  have le : LeastErasure (pairWorld offPoint) :=
    (h (pairWorld offPoint) (pair_world_closed offPoint)).mp (seated_undeniable G)
  exact pair_world_lacks_value offPoint off_point_is_off
    (fun p hp => (reg_erases_nothing_iff p).mp (le p hp))

/-- The voucher stays with the floor: it holds on both worlds of one record, the false one included. -/
theorem the_voucher_stays_with_the_floor {R : Prop} (G : SelfGrounding R) :
    R ∧ SameRecord (registered offPoint) (pairWorld offPoint) ∧
    LeastErasure (registered offPoint) ∧ ¬ LeastErasure (pairWorld offPoint) :=
  ⟨seated_undeniable G, one_record offPoint,
   fun p hp => (reg_erases_nothing_iff p).mpr (registered_has_value offPoint p hp),
   fun le => pair_world_lacks_value offPoint off_point_is_off
     (fun p hp => (reg_erases_nothing_iff p).mp (le p hp))⟩

/-- Merging them at one world is the supply again: on any configuration, identifying the floor with least erasure
    there is least erasure there. -/
theorem merging_at_a_world_is_the_supply {R : Prop} (G : SelfGrounding R) (S : Config) :
    (R ↔ LeastErasure S) ↔ LeastErasure S :=
  ⟨fun h => h.mp (seated_undeniable G), fun le => ⟨fun _ => le, fun _ => seated_undeniable G⟩⟩

/-! ## III · The twins -/

/-- Two instruments: registration and the fold are different maps. -/
theorem two_instruments : reg offPoint ≠ fold offPoint := by
  show ((0 : Int), (0 : Int)) ≠ (-(1 : Int), (0 : Int))
  decide

/-- One truth value on every world: each twin holds exactly where the other does. -/
theorem twins_on_every_world (S : Config) : LeastErasure S ↔ Value S :=
  ⟨fun le p hp => (reg_erases_nothing_iff p).mp (le p hp),
   fun v p hp => (reg_erases_nothing_iff p).mpr (v p hp)⟩

/-- Extensionally one proposition, read through two different maps. -/
theorem twins_are_one_extension : LeastErasure = Value :=
  funext fun S => propext (twins_on_every_world S)

/-- Neither twin vouches for the other: whatever supplies one supplies the other, so a premise that reaches one
    reaches both, and the floor reaches neither. -/
theorem no_twin_is_the_others_voucher {R : Prop} (G : SelfGrounding R) :
    (∀ S : Config, (LeastErasure S → Value S) ∧ (Value S → LeastErasure S)) ∧
    ¬ ∀ S : Config, Closed S → R → Value S :=
  ⟨fun S => ⟨(twins_on_every_world S).mp, (twins_on_every_world S).mpr⟩, the_floor_alone_decides_no_value G⟩

/-! ## IV · The remembered and the offered -/

/-- No instrument both remembers and keeps the side: a map that lands every point on the line and keeps the
    height sends the off-line point and its fold partner to one point. -/
theorem no_instrument_remembers_and_keeps_the_side (g : Point → Point)
    (lands : ∀ p, onLine (g p)) (keeps : ∀ p, (g p).2 = p.2) :
    g offPoint = g (fold offPoint) ∧ offPoint ≠ fold offPoint := by
  have e1 : g offPoint = (0, 0) := Prod.ext (lands offPoint) (keeps offPoint)
  have e2 : g (fold offPoint) = (0, 0) := Prod.ext (lands (fold offPoint)) (keeps (fold offPoint))
  exact ⟨e1.trans e2.symm, by decide⟩

/-- Memory is always lossless: the record of every configuration has the value. -/
theorem the_remembered_is_lossless (S : Config) : Value (Rec S) :=
  fun _ ⟨p, _, hq⟩ => hq ▸ reg_lands p

/-- The offered is the remembered exactly when the value holds: a configuration equals its own record, point for
    point, if and only if every point is on the line. -/
theorem offered_is_remembered_iff_value (S : Config) : (∀ q, Rec S q ↔ S q) ↔ Value S := by
  constructor
  · intro h p hp
    exact the_remembered_is_lossless S p ((h p).mpr hp)
  · intro v q
    constructor
    · intro ⟨p, hp, hq⟩
      have e : reg p = p := (reg_erases_nothing_iff p).mpr (v p hp)
      rw [← hq, e]; exact hp
    · intro hq
      exact ⟨q, hq, (reg_erases_nothing_iff q).mpr (v q hq)⟩

/-- At the act, the offered is the remembered. -/
theorem at_the_act_offered_is_remembered (Z : ActualZeros) : ∀ q, Rec Z.zeros q ↔ Z.zeros q :=
  (offered_is_remembered_iff_value Z.zeros).mpr (value_from_the_act Z)

/-- Off the act, they part: the false world is not its own record. -/
theorem the_false_world_is_not_its_record : ¬ ∀ q, Rec (pairWorld offPoint) q ↔ pairWorld offPoint q :=
  fun h => pair_world_lacks_value offPoint off_point_is_off ((offered_is_remembered_iff_value _).mp h)

/-! ## V · Forgetting and remembering: the one-bit gap, connected -/

/-- Remembering is stable: the memory of a memory is the memory. -/
theorem remembering_is_stable (S : Config) (q : Point) : Rec (Rec S) q ↔ Rec S q := by
  constructor
  · intro ⟨p, ⟨r, hr, hp⟩, hq⟩
    refine ⟨r, hr, ?_⟩
    rw [← hq, ← hp]
    exact ((reg_erases_nothing_iff (reg r)).mpr (reg_lands r)).symm
  · intro hq
    exact ⟨q, hq, (reg_erases_nothing_iff q).mpr (the_remembered_is_lossless S q hq)⟩

/-- THE ONE-BIT GAP, CONNECTED. The forgotten and the remembered always share one record; the remembered is
    lossless and stable; and the only gap between a world and its memory is whether the world is its own memory,
    which is the value: one bit, never more, and never disconnected. -/
theorem one_bit_gap_connected (S : Config) :
    SameRecord S (Rec S) ∧ Value (Rec S) ∧ (∀ q, Rec (Rec S) q ↔ Rec S q) ∧
    ((∀ q, Rec S q ↔ S q) ↔ Value S) :=
  ⟨fun q => (remembering_is_stable S q).symm, the_remembered_is_lossless S, remembering_is_stable S,
   offered_is_remembered_iff_value S⟩

/-- Both sides of the gap occur on one record: the true world at home in its memory, the false world not. -/
theorem the_gap_is_live :
    (∀ q, Rec (registered offPoint) q ↔ registered offPoint q) ∧
    ¬ (∀ q, Rec (pairWorld offPoint) q ↔ pairWorld offPoint q) ∧
    SameRecord (registered offPoint) (pairWorld offPoint) :=
  ⟨(offered_is_remembered_iff_value _).mpr (registered_has_value offPoint),
   the_false_world_is_not_its_record, one_record offPoint⟩

/-! ## Vb · The forcing by heat -/

/-- One pair off the line at offset one: a finite configuration that resists. -/
def resisting : FinCfg := ⟨[], [((1 : Int), (0 : Int))], fun q hq => by
  cases hq with
  | head => decide
  | tail _ h => cases h⟩

/-- RETURN IS FREE, RESISTANCE PAYS: at any positive temperature, a configuration with the value registers at zero
    heat, and one without it pays at least one unit of heat. -/
theorem return_is_free_resistance_pays (F : FinCfg) (T : Nat) (hT : 0 < T) :
    (Value F.pts → price T (erased F) = 0) ∧ (¬ Value F.pts → T ≤ price T (erased F)) := by
  refine ⟨(price_zero_iff_value F T hT).mpr, fun hn => ?_⟩
  have hne : erased F ≠ 0 := fun h0 =>
    hn ((price_zero_iff_value F T hT).mp (by unfold price; rw [h0]; exact Nat.zero_mul T))
  unfold price
  have h1 : 1 ≤ erased F := Nat.pos_of_ne_zero hne
  calc T = 1 * T := (Nat.one_mul T).symm
    _ ≤ erased F * T := Nat.mul_le_mul_right T h1

/-- RESISTANCE IS POSSIBLE: it is no contradiction. A closed finite configuration without the value exists, and it
    pays. -/
theorem resistance_is_possible (T : Nat) (hT : 0 < T) :
    Closed resisting.pts ∧ ¬ Value resisting.pts ∧ T ≤ price T (erased resisting) := by
  have hnv : ¬ Value resisting.pts := fun hv =>
    have h : ((1 : Int), (0 : Int)).1 = 0 :=
      hv ((1 : Int), (0 : Int)) (Or.inr ⟨((1 : Int), (0 : Int)), List.Mem.head _, Or.inl rfl⟩)
    (by decide : ¬ ((1 : Int) = 0)) h
  exact ⟨fincfg_closed resisting, hnv, (return_is_free_resistance_pays resisting T hT).2 hnv⟩

/-- THE FREE PATH IS ONE: two worlds of one record that both have the value are one world, point for point. -/
theorem the_free_path_is_unique (S S' : Config) (hs : SameRecord S S') (hv : Value S) (hv' : Value S') :
    ∀ q, S q ↔ S' q := fun q =>
  ⟨fun h => ((offered_is_remembered_iff_value S').mpr hv' q).mp
      ((hs q).mp (((offered_is_remembered_iff_value S).mpr hv q).mpr h)),
   fun h => ((offered_is_remembered_iff_value S).mpr hv q).mp
      ((hs q).mpr (((offered_is_remembered_iff_value S').mpr hv' q).mpr h))⟩

/-! ## VI · THE CHAIN -/

/-- The locus is where the fold and the registration both rest. -/
theorem the_locus_rests_both (p : Point) (h : onLine p) : fold p = p ∧ reg p = p := by
  obtain ⟨d, t⟩ := p
  have hd : d = 0 := h
  subst hd
  exact ⟨rfl, rfl⟩

/-- THE CHAIN. The root holds; forgetting sends every point onto the locus and loses the side; the locus is where
    the fold and the registration both rest; remembering reads the locus, so memory is lossless and stable; a world
    has least erasure exactly when it already stands on the locus, exactly when it is its own memory; on the act
    the zeros stand there; and the guard: the root alone places no world there, and both sides of the gap stand on
    one record. -/
theorem the_chain {R : Prop} (G : SelfGrounding R) (S : Config) :
    -- the root
    R ∧
    -- forgetting: onto the locus, the side lost
    (∀ p, onLine (reg p)) ∧ reg offPoint = reg (fold offPoint) ∧ offPoint ≠ fold offPoint ∧
    -- the middle: the locus rests both maps
    (∀ p, onLine p → fold p = p ∧ reg p = p) ∧
    -- remembering: lossless and stable
    Value (Rec S) ∧ (∀ q, Rec (Rec S) q ↔ Rec S q) ∧ SameRecord S (Rec S) ∧
    -- least erasure: already on the locus, the world its own memory
    (LeastErasure S ↔ Value S) ∧ ((∀ q, Rec S q ↔ S q) ↔ Value S) ∧
    -- the act
    (∀ Z : ActualZeros, Value Z.zeros ∧ ∀ q, Rec Z.zeros q ↔ Z.zeros q) ∧
    -- the guard
    (¬ ∀ T : Config, Closed T → R → Value T) ∧
    ((∀ q, Rec (registered offPoint) q ↔ registered offPoint q) ∧
      ¬ (∀ q, Rec (pairWorld offPoint) q ↔ pairWorld offPoint q) ∧
      SameRecord (registered offPoint) (pairWorld offPoint)) :=
  ⟨seated_undeniable G,
   reg_lands, rfl, by decide,
   the_locus_rests_both,
   the_remembered_is_lossless S, remembering_is_stable S, (one_bit_gap_connected S).1,
   twins_on_every_world_local S, offered_is_remembered_iff_value S,
   fun Z => ⟨value_from_the_act Z, at_the_act_offered_is_remembered Z⟩,
   the_floor_alone_decides_no_value G,
   the_gap_is_live⟩
where
  twins_on_every_world_local (S : Config) : LeastErasure S ↔ Value S :=
    ⟨fun le p hp => (reg_erases_nothing_iff p).mp (le p hp),
     fun v p hp => (reg_erases_nothing_iff p).mpr (v p hp)⟩

/-! ## VIb · Zero time remembers -/

/-- ZERO TIME REMEMBERS, EVERY LATER TIME FORGETS: at t = 0 the record separates the world on the line (d2 = 0)
    from the world off it (d2 = 1); at every t ≥ 1 the two records coincide. -/
theorem zero_time_remembers :
    (realAt 0 0 ∧ ¬ realAt 1 0) ∧ ∀ T, 1 ≤ T → (realAt 0 T ∧ realAt 1 T) := by
  refine ⟨⟨rfl, fun h => ?_⟩, fun T hT => ⟨?_, ?_⟩⟩
  · unfold realAt flow at h; omega
  · unfold realAt flow; omega
  · unfold realAt flow; omega

/-- LEAST TIME IS LEAST FORGETTING: the width never grows, and once forgotten the separation never returns. -/
theorem forgetting_is_monotone (d2 t : Nat) : flow d2 (t + 1) ≤ flow d2 t ∧ (realAt d2 t → realAt d2 (t + 1)) := by
  unfold realAt flow; constructor <;> omega

/-! ## VII · Two doors, no third -/

/-- Two doors and no third: every configuration has the value or holds a member off the line. -/
theorem two_doors (S : Config) : Value S ∨ ∃ p, S p ∧ ¬ onLine p := by
  by_cases h : ∃ p, S p ∧ ¬ onLine p
  · exact Or.inr h
  · exact Or.inl (fun p hp => Classical.byContradiction (fun hn => h ⟨p, hp, hn⟩))

/-- Never both: the doors exclude each other. -/
theorem doors_exclusive (S : Config) : ¬ (Value S ∧ ∃ p, S p ∧ ¬ onLine p) :=
  fun ⟨v, p, hp, hn⟩ => hn (v p hp)

/-- Both doors open on closed configurations of one record: the true world through the first, the false world
    through the second. -/
theorem both_doors_open :
    (Closed (registered offPoint) ∧ Value (registered offPoint)) ∧
    (Closed (pairWorld offPoint) ∧ ∃ p, pairWorld offPoint p ∧ ¬ onLine p) ∧
    SameRecord (registered offPoint) (pairWorld offPoint) :=
  ⟨⟨fun s hs => by rw [hs]; rfl, registered_has_value offPoint⟩,
   ⟨pair_world_closed offPoint, ⟨offPoint, Or.inl rfl, off_point_is_off⟩⟩,
   one_record offPoint⟩

/-- On the act, one door: the second is shut. -/
theorem on_the_act_one_door (Z : ActualZeros) : ¬ ∃ p, Z.zeros p ∧ ¬ onLine p :=
  fun ⟨p, hp, hn⟩ => hn (value_from_the_act Z p hp)

/-! ## VIII · A band forces nothing -/

/-- The band of width k: every member within offset k of the line. On the chart of the eighth grain,
    d = 8·Re s − 4, a zero-free half-plane Re s > 7/8 with the fold reads as the band of width 3. -/
def Band (k : Nat) (S : Config) : Prop := ∀ p, S p → p.1.natAbs ≤ k

/-- The band is weaker than the value: every world with the value satisfies every band. -/
theorem value_gives_band (k : Nat) (S : Config) (h : Value S) : Band k S := by
  intro p hp
  have d0 : p.1 = 0 := h p hp
  rw [d0]
  exact Nat.zero_le k

/-- Both worlds of one record satisfy the band of width 3. -/
theorem band_on_both_worlds : Band 3 (registered offPoint) ∧ Band 3 (pairWorld offPoint) := by
  constructor
  · intro p hp
    rw [hp]
    show ((0 : Int)).natAbs ≤ 3
    decide
  · intro p hp
    cases hp with
    | inl e => rw [e]; show ((1 : Int)).natAbs ≤ 3; decide
    | inr e => rw [e]; show ((-(1 : Int))).natAbs ≤ 3; decide

/-- A BAND FORCES NOTHING: the pair world at offset one holds a member off the line and satisfies the band. -/
theorem band_does_not_force : ¬ ∀ S : Config, Band 3 S → Value S :=
  fun h => pair_world_lacks_value offPoint off_point_is_off (h _ band_on_both_worlds.2)

/-- Only the band of width zero is the value. -/
theorem band_zero_is_value (S : Config) : Band 0 S ↔ Value S := by
  constructor
  · intro h p hp
    exact Int.natAbs_eq_zero.mp (Nat.le_zero.mp (h p hp))
  · exact value_gives_band 0 S

/-! ## IX · The harvest, bound -/

/-- THE HARVEST, BOUND. The Tongue always has a world, and only the content of its no has none; one self, one
    place at a time; the twins hold on every world; the forgotten and the remembered share one record, the remembered
    lossless and stable, the gap one bit; return is free and resistance pays; forgetting lands on the locus, where
    both maps rest; zero time remembers and every later time forgets; the doors exclude each other and the act shuts
    the second; a band forces nothing; and the guard: the root alone places no world on the line. -/
theorem the_harvest {R : Prop} (G : SelfGrounding R) :
    ((∀ _ : Config, R) ∧ (R ∧ Closed (pairWorld offPoint) ∧ ¬ Value (pairWorld offPoint)) ∧ ¬ ∃ _ : G.Act, ¬ R) ∧
    (¬ ∀ S : Config, Closed S → (R ↔ LeastErasure S)) ∧
    (∀ S : Config, LeastErasure S ↔ Value S) ∧
    (∀ S : Config, SameRecord S (Rec S) ∧ Value (Rec S) ∧ (∀ q, Rec (Rec S) q ↔ Rec S q) ∧
      ((∀ q, Rec S q ↔ S q) ↔ Value S)) ∧
    (∀ (F : FinCfg) (T : Nat), 0 < T →
      (Value F.pts → price T (erased F) = 0) ∧ (¬ Value F.pts → T ≤ price T (erased F))) ∧
    ((∀ p, onLine (reg p)) ∧ (∀ p, onLine p → fold p = p ∧ reg p = p)) ∧
    ((realAt 0 0 ∧ ¬ realAt 1 0) ∧ ∀ T, 1 ≤ T → (realAt 0 T ∧ realAt 1 T)) ∧
    ((∀ S : Config, ¬ (Value S ∧ ∃ p, S p ∧ ¬ onLine p)) ∧ (∀ Z : ActualZeros, ¬ ∃ p, Z.zeros p ∧ ¬ onLine p)) ∧
    (¬ ∀ S : Config, Band 3 S → Value S) ∧
    (¬ ∀ S : Config, Closed S → R → Value S) :=
  ⟨the_tongue_always_has_a_world G,
   floor_is_not_least_erasure G,
   twins_on_every_world,
   one_bit_gap_connected,
   return_is_free_resistance_pays,
   ⟨reg_lands, the_locus_rests_both⟩,
   zero_time_remembers,
   ⟨doors_exclusive, on_the_act_one_door⟩,
   band_does_not_force,
   the_floor_alone_decides_no_value G⟩


end RememberedOffered

/-! ## The cones, every one pinned: a compile in which any cone changes fails. -/

/-- info: 'RememberedOffered.denial_reenacts_root' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.denial_reenacts_root
/-- info: 'RememberedOffered.denial_instantiates' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.denial_instantiates
/-- info: 'RememberedOffered.seated_undeniable' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.seated_undeniable
/-- info: 'RememberedOffered.root_undeniable' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.root_undeniable
/-- info: 'RememberedOffered.neg_neg_free' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.neg_neg_free
/-- info: 'RememberedOffered.fold_involutive' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.fold_involutive
/-- info: 'RememberedOffered.reg_lands' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.reg_lands
/-- info: 'RememberedOffered.reg_erases_nothing_iff' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.reg_erases_nothing_iff
/-- info: 'RememberedOffered.pair_world_closed' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.pair_world_closed
/-- info: 'RememberedOffered.one_record' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.one_record
/-- info: 'RememberedOffered.registered_has_value' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.registered_has_value
/-- info: 'RememberedOffered.pair_world_lacks_value' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.pair_world_lacks_value
/-- info: 'RememberedOffered.value_from_the_act' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.value_from_the_act
/-- info: 'RememberedOffered.the_deed_forces_nothing' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.the_deed_forces_nothing
/-- info: 'RememberedOffered.one_involution_constructed' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.one_involution_constructed
/-- info: 'RememberedOffered.timeless_equals_timed' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.timeless_equals_timed
/-- info: 'RememberedOffered.monism_closes' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.monism_closes
/-- info: 'RememberedOffered.monism_witness_is_the_claim' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.monism_witness_is_the_claim
/-- info: 'RememberedOffered.off_point_is_off' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.off_point_is_off
/-- info: 'RememberedOffered.every_no_reenacts_the_root' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.every_no_reenacts_the_root
/-- info: 'RememberedOffered.the_tongue_no_refutes_itself' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.the_tongue_no_refutes_itself
/-- info: 'RememberedOffered.only_the_yes_remains_at_the_root' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.only_the_yes_remains_at_the_root
/-- info: 'RememberedOffered.the_root_read_twice_is_the_value' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.the_root_read_twice_is_the_value
/-- info: 'RememberedOffered.the_line_no_contradicts_the_root_read_twice' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.the_line_no_contradicts_the_root_read_twice
/-- info: 'RememberedOffered.the_true_world_carries_monism' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.the_true_world_carries_monism
/-- info: 'RememberedOffered.the_false_world_carries_no_monism' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.the_false_world_carries_no_monism
/-- info: 'RememberedOffered.the_false_world_carries_the_floor_and_no_monism' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.the_false_world_carries_the_floor_and_no_monism
/-- info: 'RememberedOffered.the_floor_alone_decides_no_value' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.the_floor_alone_decides_no_value
/-- info: 'RememberedOffered.the_act_is_the_return_to_the_root_read_twice' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.the_act_is_the_return_to_the_root_read_twice
/-- info: 'RememberedOffered.an_act_exactly_where_the_root_read_twice_stands' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.an_act_exactly_where_the_root_read_twice_stands
/-- info: 'RememberedOffered.on_the_act_the_line_no_is_refuted' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.on_the_act_the_line_no_is_refuted
/-- info: 'RememberedOffered.two_denials' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.two_denials
/-- info: 'RememberedOffered.two_denials_at_RA' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.two_denials_at_RA
/-- info: 'RememberedOffered.fincfg_closed' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.fincfg_closed
/-- info: 'RememberedOffered.least_erasure_iff_zero_erased' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.least_erasure_iff_zero_erased
/-- info: 'RememberedOffered.price_zero_iff_value' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.price_zero_iff_value
/-- info: 'RememberedOffered.price_counts_pairs' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.price_counts_pairs
/-- info: 'RememberedOffered.flow_monotone' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms RememberedOffered.flow_monotone
/-- info: 'RememberedOffered.reality_transported' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms RememberedOffered.reality_transported
/-- info: 'RememberedOffered.real_at_Lam' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms RememberedOffered.real_at_Lam
/-- info: 'RememberedOffered.rh_iff_lambda_zero' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms RememberedOffered.rh_iff_lambda_zero
/-- info: 'RememberedOffered.flowed_record_forgets' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms RememberedOffered.flowed_record_forgets
/-- info: 'RememberedOffered.upstream_is_not_forced' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms RememberedOffered.upstream_is_not_forced
/-- info: 'RememberedOffered.the_tongue_always_has_a_world' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.the_tongue_always_has_a_world
/-- info: 'RememberedOffered.monism_before_the_tongue' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.monism_before_the_tongue
/-- info: 'RememberedOffered.tongue_no_has_no_world' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.tongue_no_has_no_world
/-- info: 'RememberedOffered.line_no_has_a_world' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.line_no_has_a_world
/-- info: 'RememberedOffered.the_deed_is_not_the_supply' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.the_deed_is_not_the_supply
/-- info: 'RememberedOffered.at_RA' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.at_RA
/-- info: 'RememberedOffered.floor_is_not_least_erasure' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.floor_is_not_least_erasure
/-- info: 'RememberedOffered.the_voucher_stays_with_the_floor' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.the_voucher_stays_with_the_floor
/-- info: 'RememberedOffered.merging_at_a_world_is_the_supply' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.merging_at_a_world_is_the_supply
/-- info: 'RememberedOffered.two_instruments' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.two_instruments
/-- info: 'RememberedOffered.twins_on_every_world' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.twins_on_every_world
/-- info: 'RememberedOffered.twins_are_one_extension' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms RememberedOffered.twins_are_one_extension
/-- info: 'RememberedOffered.no_twin_is_the_others_voucher' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.no_twin_is_the_others_voucher
/-- info: 'RememberedOffered.no_instrument_remembers_and_keeps_the_side' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.no_instrument_remembers_and_keeps_the_side
/-- info: 'RememberedOffered.the_remembered_is_lossless' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.the_remembered_is_lossless
/-- info: 'RememberedOffered.offered_is_remembered_iff_value' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.offered_is_remembered_iff_value
/-- info: 'RememberedOffered.at_the_act_offered_is_remembered' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.at_the_act_offered_is_remembered
/-- info: 'RememberedOffered.the_false_world_is_not_its_record' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.the_false_world_is_not_its_record
/-- info: 'RememberedOffered.remembering_is_stable' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.remembering_is_stable
/-- info: 'RememberedOffered.one_bit_gap_connected' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.one_bit_gap_connected
/-- info: 'RememberedOffered.the_gap_is_live' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.the_gap_is_live
/-- info: 'RememberedOffered.return_is_free_resistance_pays' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.return_is_free_resistance_pays
/-- info: 'RememberedOffered.resistance_is_possible' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.resistance_is_possible
/-- info: 'RememberedOffered.the_free_path_is_unique' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.the_free_path_is_unique
/-- info: 'RememberedOffered.the_locus_rests_both' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.the_locus_rests_both
/-- info: 'RememberedOffered.the_chain' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.the_chain
/-- info: 'RememberedOffered.zero_time_remembers' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms RememberedOffered.zero_time_remembers
/-- info: 'RememberedOffered.forgetting_is_monotone' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms RememberedOffered.forgetting_is_monotone
/-- info: 'RememberedOffered.two_doors' depends on axioms: [propext, Classical.choice, Quot.sound] -/
#guard_msgs in #print axioms RememberedOffered.two_doors
/-- info: 'RememberedOffered.doors_exclusive' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.doors_exclusive
/-- info: 'RememberedOffered.both_doors_open' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.both_doors_open
/-- info: 'RememberedOffered.on_the_act_one_door' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.on_the_act_one_door
/-- info: 'RememberedOffered.value_gives_band' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.value_gives_band
/-- info: 'RememberedOffered.band_on_both_worlds' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.band_on_both_worlds
/-- info: 'RememberedOffered.band_does_not_force' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.band_does_not_force
/-- info: 'RememberedOffered.band_zero_is_value' depends on axioms: [propext] -/
#guard_msgs in #print axioms RememberedOffered.band_zero_is_value
/-- info: 'RememberedOffered.the_harvest' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms RememberedOffered.the_harvest

#print axioms RememberedOffered.the_chain
#print axioms RememberedOffered.the_harvest

namespace RememberedOffered

/-! # BOOK THREE · the annihilation closure -/

/-! ## I · Four names, one proposition -/

/-- CO-LOCATION IS THE VALUE: Being and Monism stand together on a configuration exactly where every point is on
the line. -/
theorem colocation_is_the_value {R : Prop} (G : SelfGrounding R) (S : Config) :
    (R ∧ RootReadTwice S) ↔ Value S :=
  ⟨fun ⟨_, m⟩ => (the_root_read_twice_is_the_value S).mp m,
   fun v => ⟨seated_undeniable G, (the_root_read_twice_is_the_value S).mpr v⟩⟩

/-- FOUR NAMES, ONE PROPOSITION: on every configuration least erasure, the value, Monism and the co-location of
Being with Monism are one proposition. -/
theorem four_names_one_proposition {R : Prop} (G : SelfGrounding R) (S : Config) :
    (LeastErasure S ↔ Value S) ∧ (RootReadTwice S ↔ Value S) ∧ ((R ∧ RootReadTwice S) ↔ Value S) :=
  ⟨twins_on_every_world S, the_root_read_twice_is_the_value S, colocation_is_the_value G S⟩

/-! ## II · Monism, the sole witness -/

/-- MONISM IS THE SOLE WITNESS. Every faithful witness of the value is the root read twice, as one proposition; no
reading of the record witnesses, since the true configuration and the off-line pair configuration leave one
record; the floor witnesses nothing, standing on both; and Monism stands on the true configuration and not on the
pair, on that one record. -/
theorem monism_is_the_sole_witness {R : Prop} (G : SelfGrounding R) :
    (∀ W : Config → Prop, (∀ S, W S ↔ Value S) → W = RootReadTwice) ∧
    (¬ ∃ h : Config → Prop, ∀ S, h (Rec S) ↔ Value S) ∧
    (¬ ∀ S : Config, Closed S → R → Value S) ∧
    (SameRecord (registered offPoint) (pairWorld offPoint) ∧
      RootReadTwice (registered offPoint) ∧ ¬ RootReadTwice (pairWorld offPoint)) :=
  ⟨fun _ hW => funext fun S => propext ((hW S).trans (the_root_read_twice_is_the_value S).symm),
   fun ⟨_, hh⟩ =>
     have e : Rec (registered offPoint) = Rec (pairWorld offPoint) :=
       funext fun q => propext (one_record offPoint q)
     pair_world_lacks_value offPoint off_point_is_off
       ((hh _).mp (e ▸ (hh _).mpr (registered_has_value offPoint))),
   the_floor_alone_decides_no_value G,
   ⟨one_record offPoint, the_true_world_carries_monism, the_false_world_carries_no_monism⟩⟩

/-- A WITNESS IS NEVER UNIVERSAL: whatever holds on every configuration is not a witness of the value, since the
off-line pair configuration would carry it. Universality and witnessing exclude each other. -/
theorem a_witness_is_never_universal (W : Config → Prop) (hu : ∀ S, W S) : ¬ ∀ S, W S ↔ Value S :=
  fun hw => pair_world_lacks_value offPoint off_point_is_off ((hw (pairWorld offPoint)).mp (hu _))

/-- So Monism is not universal over configurations: the root read twice fails on the off-line pair configuration. -/
theorem monism_is_not_universal : ¬ ∀ S : Config, RootReadTwice S :=
  fun hu => the_false_world_carries_no_monism (hu _)

/-! ## III · Co-location is not universal -/

/-- Co-location over every configuration is refuted: Being stands on the off-line pair configuration and Monism
does not. -/
theorem colocation_is_not_universal {R : Prop} (_G : SelfGrounding R) :
    ¬ ∀ S : Config, R ∧ RootReadTwice S :=
  fun h => the_false_world_carries_no_monism (h (pairWorld offPoint)).2

/-! ## IV · The timeless zone -/

/-- THE TIMELESS ZONE. Least erasure and the value are one proposition; at the locus the two instruments coincide;
at zero time the record tells the true configuration from the pair, at every later time it does not; the closure at zero
time is Λ = 0; and the passage back to zero time is not forced by the forward arrow. -/
theorem the_timeless_zone :
    LeastErasure = Value ∧
    (∀ p, onLine p → fold p = p ∧ reg p = p) ∧
    ((realAt 0 0 ∧ ¬ realAt 1 0) ∧ ∀ T, 1 ≤ T → (realAt 0 T ∧ realAt 1 T)) ∧
    (∀ d2, realAt d2 0 ↔ Lam d2 = 0) ∧
    (∀ T, 1 ≤ T → realAt 0 T ∧ realAt 1 T ∧ realAt 0 0 ∧ ¬ realAt 1 0) :=
  ⟨twins_are_one_extension, the_locus_rests_both, zero_time_remembers, rh_iff_lambda_zero,
   upstream_is_not_forced⟩

/-! ## V · Timeless is determinacy, not selection -/

/-- TIMELESS IS DETERMINACY, NOT SELECTION. At zero time the record's freedom is gone: it separates the true world
from the pair. Every configuration stands behind at most one door. And both doors stay open on closed
configurations: the off-line pair configuration is closed, lacks the value, and has the floor standing on it.
Removing the freedom fixes each configuration as what it is; it does not single out ζ. -/
theorem timeless_is_determinacy_not_selection {R : Prop} (G : SelfGrounding R) :
    (realAt 0 0 ∧ ¬ realAt 1 0) ∧
    (∀ S : Config, ¬ (Value S ∧ ∃ p, S p ∧ ¬ onLine p)) ∧
    (Closed (registered offPoint) ∧ Value (registered offPoint)) ∧
    (Closed (pairWorld offPoint) ∧ R ∧ ¬ Value (pairWorld offPoint)) ∧
    ¬ (∀ S : Config, Closed S → Value S) :=
  ⟨zero_time_remembers.1, doors_exclusive, both_doors_open.1,
   ⟨pair_world_closed offPoint, seated_undeniable G, pair_world_lacks_value offPoint off_point_is_off⟩,
   fun h => pair_world_lacks_value offPoint off_point_is_off (h _ (pair_world_closed offPoint))⟩

/-! ## VI · The check -/

/-- THE CHECK. The off-line pair configuration satisfies every principle of the timeless closure and lacks the value: it is
closed; the floor stands on it; least erasure, the value and Monism are one proposition on it; corrected monism
holds, it carries no witness; it leaves the true world's record; at zero time the width-one world is determinately
not real, with Λ = 1. Its twin, the true world, satisfies the same principles and has the value. -/
theorem the_check {R : Prop} (G : SelfGrounding R) :
    (∃ Z : Config,
      Closed Z ∧ R ∧ (LeastErasure Z ↔ Value Z) ∧ (RootReadTwice Z ↔ Value Z) ∧
      ¬ RootReadTwice Z ∧ SameRecord (registered offPoint) Z ∧ ¬ Value Z) ∧
    (∃ T : Config,
      Closed T ∧ R ∧ (LeastErasure T ↔ Value T) ∧ (RootReadTwice T ↔ Value T) ∧
      RootReadTwice T ∧ SameRecord T (pairWorld offPoint) ∧ Value T) ∧
    (¬ realAt 1 0 ∧ Lam 1 ≠ 0 ∧ realAt 0 0 ∧ Lam 0 = 0) :=
  ⟨⟨pairWorld offPoint, pair_world_closed offPoint, seated_undeniable G,
     twins_on_every_world _, the_root_read_twice_is_the_value _,
     the_false_world_carries_no_monism, one_record offPoint,
     pair_world_lacks_value offPoint off_point_is_off⟩,
   ⟨registered offPoint, both_doors_open.1.1, seated_undeniable G,
     twins_on_every_world _, the_root_read_twice_is_the_value _,
     the_true_world_carries_monism, one_record offPoint, registered_has_value offPoint⟩,
   ⟨zero_time_remembers.1.2, by decide, zero_time_remembers.1.1, by decide⟩⟩

/-- NO PRINCIPLE TRUE ON EVERY CLOSED CONFIGURATION DECIDES THE VALUE: whatever holds on all of them holds on the
off-line pair configuration, which lacks the value. -/
theorem no_closed_principle_decides (D : Config → Prop) (hD : ∀ S, Closed S → D S) :
    ¬ ∀ S, Closed S → D S → Value S :=
  fun h => pair_world_lacks_value offPoint off_point_is_off
    (h _ (pair_world_closed offPoint) (hD _ (pair_world_closed offPoint)))

/-! ## VII · The capstone -/

/-- THE TIMELESS ZONE, CLOSED, with no act anywhere in it. Four names are one proposition on every configuration;
Monism is the sole witness; no witness is universal; neither Monism nor co-location is universal; LE = RH; zero time
separates the true configuration from the pair, and closure at zero time is Λ = 0; every configuration stands behind
exactly one door; and nothing true on every closed configuration decides the value. -/
theorem the_timeless_zone_closed {R : Prop} (G : SelfGrounding R) :
    (∀ S : Config, (LeastErasure S ↔ Value S) ∧ (RootReadTwice S ↔ Value S) ∧ ((R ∧ RootReadTwice S) ↔ Value S)) ∧
    (∀ W : Config → Prop, (∀ S, W S ↔ Value S) → W = RootReadTwice) ∧
    (∀ W : Config → Prop, (∀ S, W S) → ¬ ∀ S, W S ↔ Value S) ∧
    (¬ ∀ S : Config, RootReadTwice S) ∧
    (¬ ∀ S : Config, R ∧ RootReadTwice S) ∧
    (LeastErasure = Value ∧ (realAt 0 0 ∧ ¬ realAt 1 0) ∧ (∀ d2, realAt d2 0 ↔ Lam d2 = 0)) ∧
    (∀ S : Config, (Value S ∨ ∃ p, S p ∧ ¬ onLine p) ∧ ¬ (Value S ∧ ∃ p, S p ∧ ¬ onLine p)) ∧
    (∀ D : Config → Prop, (∀ S, Closed S → D S) → ¬ ∀ S, Closed S → D S → Value S) :=
  ⟨four_names_one_proposition G,
   (monism_is_the_sole_witness G).1,
   a_witness_is_never_universal,
   monism_is_not_universal,
   colocation_is_not_universal G,
   ⟨twins_are_one_extension, zero_time_remembers.1, rh_iff_lambda_zero⟩,
   fun S => ⟨two_doors S, doors_exclusive S⟩,
   no_closed_principle_decides⟩

/-- THE ANNIHILATION CLOSURE. Four names are one proposition on every configuration; Monism is the sole witness and
no witness is universal; co-location is not universal; the timeless zone holds; timelessness is determinacy and
not selection; the check stands; no principle shared by every closed configuration decides the value; and on any
term of the act the value holds at its zeros, while the run leaves the value free. -/
theorem the_annihilation_closure {R : Prop} (G : SelfGrounding R) :
    (∀ S : Config, (LeastErasure S ↔ Value S) ∧ (RootReadTwice S ↔ Value S) ∧ ((R ∧ RootReadTwice S) ↔ Value S)) ∧
    (∀ W : Config → Prop, (∀ S, W S ↔ Value S) → W = RootReadTwice) ∧
    (¬ ∀ S : Config, RootReadTwice S) ∧
    (¬ ∀ S : Config, R ∧ RootReadTwice S) ∧
    (LeastErasure = Value ∧ (realAt 0 0 ∧ ¬ realAt 1 0) ∧ (∀ d2, realAt d2 0 ↔ Lam d2 = 0)) ∧
    (∃ Z : Config, Closed Z ∧ R ∧ ¬ RootReadTwice Z ∧ SameRecord (registered offPoint) Z ∧ ¬ Value Z) ∧
    (∀ D : Config → Prop, (∀ S, Closed S → D S) → ¬ ∀ S, Closed S → D S → Value S) ∧
    (∀ Z : ActualZeros, Value Z.zeros) :=
  ⟨four_names_one_proposition G,
   (monism_is_the_sole_witness G).1,
   monism_is_not_universal,
   colocation_is_not_universal G,
   ⟨twins_are_one_extension, zero_time_remembers.1, rh_iff_lambda_zero⟩,
   ⟨pairWorld offPoint, pair_world_closed offPoint, seated_undeniable G,
    the_false_world_carries_no_monism, one_record offPoint,
    pair_world_lacks_value offPoint off_point_is_off⟩,
   no_closed_principle_decides,
   value_from_the_act⟩

end RememberedOffered

/-
RH_Unicorn_Block.lean · the Unicorn part of the Riemann Hypothesis, closed to derivation, its
aperture one bit wide, its supply side silent. Core Lean 4.19.0, no library, no sorry, no user-declared axiom. 2026-09-25.

Part III divided the hypothesis at a height T into a Real part and a Unicorn part and proved
the Real part by certificate. Parts I and II proved the wall, the crossing, the bound, and the
cure theorem, and did not say what they say of the Unicorn part. This file says it: closed to
derivation, the aperture one bit wide, the register silent beyond it. ΔM = 0.
-/
namespace RHUnicorn

variable {α β : Type}

/-- The line property, the Real part at T, the Unicorn part at T, as in Part III. -/
def RH (Z onL : α → Prop) : Prop := ∀ z, Z z → onL z
def RealPartAt (Z onL : α → Prop) (height : α → Nat) (T : Nat) : Prop :=
  ∀ z, Z z → height z ≤ T → onL z
def UnicornAt (Z onL : α → Prop) (height : α → Nat) (T : Nat) : Prop :=
  ∀ z, Z z → height z > T → onL z

/-- THE FORMAL BLOCK OF THE UNICORN PART. Let τ act on the zeros, let ρ be a record even at a
    seat z above the height, and let d decide the line property, odd at z. Then no reading g of
    the record agrees with d even on the region above the height alone. The Unicorn part is
    closed to every even register; the closure is a theorem and does not expire. -/
theorem unicorn_block (height : α → Nat) (T : Nat) (τ : α → α) (ρ : α → β) (d : α → Bool)
    (z : α) (habove : height z > T) (habove' : height (τ z) > T)
    (hρ : ρ (τ z) = ρ z) (hd : d (τ z) = !d z) :
    ¬ ∃ g : β → Bool, ∀ w, height w > T → g (ρ w) = d w := by
  intro ⟨g, hg⟩
  have h1 := hg z habove
  have h2 := hg (τ z) habove'
  rw [hρ, hd, h1] at h2
  revert h2
  cases d z <;> intro h2 <;> exact Bool.noConfusion h2

/-- THE APERTURE, ONE BIT WIDE. At a seat where d is odd, one odd bit s at the seat would decide d
    on the seat and its partner through a calibration that exists and is unique. The width of
    the aperture, a theorem; it says nothing of whether anything passes through it. -/
theorem aperture_one_bit_wide (τ : α → α) (s d : α → Bool) (z : α)
    (hs : s (τ z) = !s z) (hd : d (τ z) = !d z) :
    ∃ c : Bool, (d z = xor (s z) c ∧ d (τ z) = xor (s (τ z)) c) ∧
      ∀ c' : Bool, (d z = xor (s z) c' ∧ d (τ z) = xor (s (τ z)) c') → c' = c :=
  ⟨xor (d z) (s z),
    ⟨by cases s z <;> cases d z <;> rfl,
     by rw [hs, hd]; cases s z <;> cases d z <;> rfl⟩,
    by
      intro c' hc
      obtain ⟨h1, -⟩ := hc
      generalize hsz : s z = sv
      generalize hdz : d z = dv
      rw [hsz, hdz] at h1
      cases sv <;> cases dv <;> cases c' <;> first | rfl | exact absurd h1 (by decide)⟩

/-- EXISTENCE SUPPLIES NOTHING. Conditioning the Unicorn part on an inhabited premise, the root
    axiom for one, leaves it exactly where it was; and no class of frames on which the premise
    is to decide it decides more than already held on the class. Theorems E and I of Part I,
    read at the Unicorn part. -/
theorem unicorn_rule_exact (Z onL : α → Prop) (height : α → Nat) (T : Nat) (A : Prop) (ha : A) :
    (A → UnicornAt Z onL height T) ↔ UnicornAt Z onL height T :=
  ⟨fun h => h ha, fun hu _ => hu⟩

theorem unicorn_no_cure {Frame : Type} (A : Prop) (ha : A) (C U : Frame → Prop) :
    (∀ X, C X → A → U X) ↔ (∀ X, C X → U X) :=
  ⟨fun h X hc => h X hc ha, fun h X hc _ => h X hc⟩

/-- NO BYPASS. Given the Real part, the fused hypothesis is exactly the Unicorn part, so a proof
    of the hypothesis contains a proof of the Unicorn part and the block is not avoided by
    aiming at the whole. -/
theorem unicorn_no_bypass (Z onL : α → Prop) (height : α → Nat) (T : Nat)
    (hr : RealPartAt Z onL height T) : RH Z onL ↔ UnicornAt Z onL height T := by
  constructor
  · intro h z hz _; exact h z hz
  · intro hu z hz
    cases Nat.lt_or_ge T (height z) with
    | inl hgt => exact hu z hz hgt
    | inr hle => exact hr z hz hle

/-- THE SUPPLY SIDE IS SILENCE, AT THE REGISTER. Over one even record, both orientations of d at
    the seat are equally refused to every reading above the height: the register cannot say
    which way the seat lies, so it cannot say what a supply would bring, nor that one exists,
    nor that none does. -/
theorem supply_side_silent (height : α → Nat) (T : Nat) (τ : α → α) (ρ : α → β) (d : α → Bool)
    (z : α) (habove : height z > T) (habove' : height (τ z) > T)
    (hρ : ρ (τ z) = ρ z) (hd : d (τ z) = !d z) :
    (¬ ∃ g : β → Bool, ∀ w, height w > T → g (ρ w) = d w) ∧
    (¬ ∃ g : β → Bool, ∀ w, height w > T → g (ρ w) = !d w) ∧
    (!d z) ≠ d z :=
  ⟨unicorn_block height T τ ρ d z habove habove' hρ hd,
   unicorn_block height T τ ρ (fun w => !d w) z habove habove' hρ (by
     show (!d (τ z)) = !(!d z)
     rw [hd]),
   by cases d z <;> decide⟩

/-- The division at the height, on natural heights: the hypothesis is exactly its Real part and
    its Unicorn part. -/
theorem rh_iff_real_and_unicorn (Z onL : α → Prop) (height : α → Nat) (T : Nat) :
    RH Z onL ↔ RealPartAt Z onL height T ∧ UnicornAt Z onL height T := by
  constructor
  · intro h; exact ⟨fun z hz _ => h z hz, fun z hz _ => h z hz⟩
  · intro ⟨hr, hu⟩ z hz
    cases Nat.lt_or_ge T (height z) with
    | inl hgt => exact hu z hz hgt
    | inr hle => exact hr z hz hle

/-- A certificate at the height: a complete list of the zeros up to T, each checked on the line. -/
structure Certificate (Z onL : α → Prop) (height : α → Nat) (T : Nat) where
  items    : List α
  complete : ∀ z, Z z → height z ≤ T → z ∈ items
  checked  : ∀ z, z ∈ items → onL z

theorem real_part_of_certificate (Z onL : α → Prop) (height : α → Nat) (T : Nat)
    (c : Certificate Z onL height T) : RealPartAt Z onL height T :=
  fun z hz hle => c.checked z (c.complete z hz hle)

/-- THE THREE BITS AS ONE TERM · THE REGISTER'S PROOF OF THE HYPOTHESIS, COMPLETE. Under a
    certificate at T and the seat data above T, the hypothesis divides exactly (bit one), its
    Real part at T holds (bit two), every reading of the even register is refused above T (bit
    three, refused), and one supplied bit calibrates the seat uniquely (the door). The hypothesis
    is not thereby proved; nothing derivable about it is left underived. -/
theorem rh_register_proof_complete (Z onL : α → Prop) (height : α → Nat) (T : Nat)
    (c : Certificate Z onL height T) (τ : α → α) (ρ : α → β) (d s : α → Bool) (z : α)
    (habove : height z > T) (habove' : height (τ z) > T) (hρ : ρ (τ z) = ρ z)
    (hd : d (τ z) = !d z) (hs : s (τ z) = !s z) :
    (RH Z onL ↔ RealPartAt Z onL height T ∧ UnicornAt Z onL height T) ∧
    RealPartAt Z onL height T ∧
    (¬ ∃ g : β → Bool, ∀ w, height w > T → g (ρ w) = d w) ∧
    ∃ k : Bool, (d z = xor (s z) k ∧ d (τ z) = xor (s (τ z)) k) ∧
      ∀ k' : Bool, (d z = xor (s z) k' ∧ d (τ z) = xor (s (τ z)) k') → k' = k :=
  ⟨rh_iff_real_and_unicorn Z onL height T, real_part_of_certificate Z onL height T c,
   unicorn_block height T τ ρ d z habove habove' hρ hd, aperture_one_bit_wide τ s d z hs hd⟩

end RHUnicorn

#print axioms RHUnicorn.unicorn_block
#print axioms RHUnicorn.aperture_one_bit_wide
#print axioms RHUnicorn.unicorn_rule_exact
#print axioms RHUnicorn.unicorn_no_cure
#print axioms RHUnicorn.unicorn_no_bypass
#print axioms RHUnicorn.supply_side_silent
#print axioms RHUnicorn.rh_iff_real_and_unicorn
#print axioms RHUnicorn.real_part_of_certificate
#print axioms RHUnicorn.rh_register_proof_complete

namespace RememberedOffered

/-! # BOOK FOUR · the Unicorn, contained -/

/-- The height of a point of the chart, as a natural number. -/
def ht (p : Point) : Nat := p.2.toNat

/-- I · THE CUT ON THE CHART: at every height, the value is exactly its Real part and its Unicorn part. -/
theorem the_cut_on_the_chart (S : Config) (T : Nat) :
    Value S ↔ RHUnicorn.RealPartAt S onLine ht T ∧ RHUnicorn.UnicornAt S onLine ht T :=
  RHUnicorn.rh_iff_real_and_unicorn S onLine ht T

/-- II · NO BYPASS ON THE CHART: given the Real part at a height, the value is exactly the Unicorn part there. -/
theorem no_bypass_on_the_chart (S : Config) (T : Nat) (hr : RHUnicorn.RealPartAt S onLine ht T) :
    Value S ↔ RHUnicorn.UnicornAt S onLine ht T :=
  RHUnicorn.unicorn_no_bypass S onLine ht T hr

/-- III · THE UNICORN BLOCKED ON THE CHART: above every height, no reading of the record decides the side of a
point, since the fold pair above the height leaves one record and opposite sides. -/
theorem unicorn_blocked_on_the_chart (T : Nat) :
    ¬ ∃ g : Point → Bool, ∀ w : Point, ht w > T → g (reg w) = decide (w.1 > 0) :=
  RHUnicorn.unicorn_block ht T fold reg (fun w => decide (w.1 > 0)) ((1 : Int), Int.ofNat (T + 1))
    (show T + 1 > T by omega) (show T + 1 > T by omega) rfl rfl

/-- IV · RA SUPPLIES NOTHING TO THE UNICORN PART: conditioning it on the root leaves it exactly where it was. -/
theorem ra_supplies_nothing_to_the_unicorn (S : Config) (T : Nat) :
    (RA → RHUnicorn.UnicornAt S onLine ht T) ↔ RHUnicorn.UnicornAt S onLine ht T :=
  RHUnicorn.unicorn_rule_exact S onLine ht T RA (seated_undeniable raSelfGrounding)

/-- V · ON THE ACT'S ZERO SET THE UNICORN IS CLOSED: every arrival above every height, in the act's zero set, stands
on the line. -/
theorem the_unicorn_closed_on_the_act (Z : ActualZeros) (T : Nat) : RHUnicorn.UnicornAt Z.zeros onLine ht T :=
  fun p hp _ => value_from_the_act Z p hp

/-- On the act's zero set, no arrival stands off the line. -/
theorem no_arrival_off_the_line_on_the_act (Z : ActualZeros) : ¬ ∃ p, Z.zeros p ∧ ¬ onLine p :=
  fun ⟨p, hp, hoff⟩ => hoff (value_from_the_act Z p hp)

/-- VI · THE UNICORN, CONTAINED. At every height the value divides into its Real and Unicorn parts; given the Real
part the value is exactly the Unicorn part; above every height no reading of the record decides the side; RA
supplies nothing to the Unicorn part; and on the act's zero set every arrival above every height stands on the line,
with no arrival off it. -/
theorem the_unicorn_contained :
    (∀ (S : Config) (T : Nat),
      Value S ↔ RHUnicorn.RealPartAt S onLine ht T ∧ RHUnicorn.UnicornAt S onLine ht T) ∧
    (∀ (S : Config) (T : Nat),
      RHUnicorn.RealPartAt S onLine ht T → (Value S ↔ RHUnicorn.UnicornAt S onLine ht T)) ∧
    (∀ T : Nat, ¬ ∃ g : Point → Bool, ∀ w : Point, ht w > T → g (reg w) = decide (w.1 > 0)) ∧
    (∀ (S : Config) (T : Nat),
      (RA → RHUnicorn.UnicornAt S onLine ht T) ↔ RHUnicorn.UnicornAt S onLine ht T) ∧
    (∀ (Z : ActualZeros) (T : Nat), RHUnicorn.UnicornAt Z.zeros onLine ht T) ∧
    (∀ Z : ActualZeros, ¬ ∃ p, Z.zeros p ∧ ¬ onLine p) :=
  ⟨the_cut_on_the_chart, no_bypass_on_the_chart, unicorn_blocked_on_the_chart,
   ra_supplies_nothing_to_the_unicorn, the_unicorn_closed_on_the_act, no_arrival_off_the_line_on_the_act⟩

/-- VII · EVERY RECORD ON THE LINE: the record of every configuration stands on the line, the off-line pair
configuration's included, though that configuration is closed and lacks the value; the registration row carries
no bit. -/
theorem every_record_on_the_line :
    (∀ S : Config, Value (Rec S)) ∧ Closed (pairWorld (1, 0)) ∧
    Value (Rec (pairWorld (1, 0))) ∧ ¬ Value (pairWorld (1, 0)) :=
  ⟨the_remembered_is_lossless, pair_world_closed (1, 0), the_remembered_is_lossless _,
   pair_world_lacks_value (1, 0) (fun e => by cases e)⟩

/-- VIII · ONE BIT, EVERY ROW: on every finite configuration, least erasure, zero erased bits, zero price at every
positive temperature, the value, and, given the Real part at a height, the Unicorn part there, are one
proposition. -/
theorem one_bit_every_row (F : FinCfg) (T : Nat) (hT : 0 < T) (H : Nat)
    (hr : RHUnicorn.RealPartAt F.pts onLine ht H) :
    (LeastErasure F.pts ↔ Value F.pts) ∧
    (erased F = 0 ↔ Value F.pts) ∧
    (price T (erased F) = 0 ↔ Value F.pts) ∧
    (RHUnicorn.RH F.pts onLine ↔ Value F.pts) ∧
    (RHUnicorn.UnicornAt F.pts onLine ht H ↔ Value F.pts) :=
  ⟨twins_on_every_world _,
   ⟨fun h => (twins_on_every_world _).mp ((least_erasure_iff_zero_erased F).mpr h),
    fun h => (least_erasure_iff_zero_erased F).mp ((twins_on_every_world _).mpr h)⟩,
   price_zero_iff_value F T hT,
   Iff.rfl,
   (no_bypass_on_the_chart F.pts H hr).symm⟩

end RememberedOffered

/-! ## Receipts of Book Three, pinned -/
/-- info: 'RememberedOffered.colocation_is_the_value' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.colocation_is_the_value
/-- info: 'RememberedOffered.four_names_one_proposition' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.four_names_one_proposition
/-- info: 'RememberedOffered.monism_is_the_sole_witness' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms RememberedOffered.monism_is_the_sole_witness
/-- info: 'RememberedOffered.a_witness_is_never_universal' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.a_witness_is_never_universal
/-- info: 'RememberedOffered.monism_is_not_universal' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.monism_is_not_universal
/-- info: 'RememberedOffered.colocation_is_not_universal' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.colocation_is_not_universal
/-- info: 'RememberedOffered.the_timeless_zone' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms RememberedOffered.the_timeless_zone
/-- info: 'RememberedOffered.timeless_is_determinacy_not_selection' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms RememberedOffered.timeless_is_determinacy_not_selection
/-- info: 'RememberedOffered.the_check' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms RememberedOffered.the_check
/-- info: 'RememberedOffered.no_closed_principle_decides' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.no_closed_principle_decides
/-- info: 'RememberedOffered.the_timeless_zone_closed' depends on axioms: [propext, Classical.choice, Quot.sound] -/
#guard_msgs in #print axioms RememberedOffered.the_timeless_zone_closed
/-- info: 'RememberedOffered.the_annihilation_closure' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms RememberedOffered.the_annihilation_closure

#print axioms RememberedOffered.the_annihilation_closure

/-! ## Receipts of Book Four, pinned -/
/-- info: 'RHUnicorn.unicorn_block' does not depend on any axioms -/
#guard_msgs in #print axioms RHUnicorn.unicorn_block
/-- info: 'RHUnicorn.aperture_one_bit_wide' does not depend on any axioms -/
#guard_msgs in #print axioms RHUnicorn.aperture_one_bit_wide
/-- info: 'RHUnicorn.unicorn_rule_exact' does not depend on any axioms -/
#guard_msgs in #print axioms RHUnicorn.unicorn_rule_exact
/-- info: 'RHUnicorn.unicorn_no_cure' does not depend on any axioms -/
#guard_msgs in #print axioms RHUnicorn.unicorn_no_cure
/-- info: 'RHUnicorn.unicorn_no_bypass' does not depend on any axioms -/
#guard_msgs in #print axioms RHUnicorn.unicorn_no_bypass
/-- info: 'RHUnicorn.supply_side_silent' does not depend on any axioms -/
#guard_msgs in #print axioms RHUnicorn.supply_side_silent
/-- info: 'RHUnicorn.rh_iff_real_and_unicorn' does not depend on any axioms -/
#guard_msgs in #print axioms RHUnicorn.rh_iff_real_and_unicorn
/-- info: 'RHUnicorn.real_part_of_certificate' does not depend on any axioms -/
#guard_msgs in #print axioms RHUnicorn.real_part_of_certificate
/-- info: 'RHUnicorn.rh_register_proof_complete' does not depend on any axioms -/
#guard_msgs in #print axioms RHUnicorn.rh_register_proof_complete
/-- info: 'RememberedOffered.the_cut_on_the_chart' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.the_cut_on_the_chart
/-- info: 'RememberedOffered.no_bypass_on_the_chart' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.no_bypass_on_the_chart
/-- info: 'RememberedOffered.ra_supplies_nothing_to_the_unicorn' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.ra_supplies_nothing_to_the_unicorn
/-- info: 'RememberedOffered.the_unicorn_closed_on_the_act' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.the_unicorn_closed_on_the_act
/-- info: 'RememberedOffered.no_arrival_off_the_line_on_the_act' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.no_arrival_off_the_line_on_the_act
/-- info: 'RememberedOffered.unicorn_blocked_on_the_chart' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms RememberedOffered.unicorn_blocked_on_the_chart
/-- info: 'RememberedOffered.the_unicorn_contained' depends on axioms: [propext, Quot.sound] -/
#guard_msgs in #print axioms RememberedOffered.the_unicorn_contained
/-- info: 'RememberedOffered.every_record_on_the_line' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.every_record_on_the_line
/-- info: 'RememberedOffered.one_bit_every_row' does not depend on any axioms -/
#guard_msgs in #print axioms RememberedOffered.one_bit_every_row

#print axioms RememberedOffered.the_unicorn_contained

References

BIPM. 2019. The International System of Units (SI). 9th ed. Sèvres: Bureau International des Poids et Mesures.

Bombieri, E. 2000. "Problems of the Millennium: The Riemann Hypothesis." Clay Mathematics Institute, official problem description.

Bombieri, E., and J. C. Lagarias. 1999. "Complements to Li's Criterion for the Riemann Hypothesis." Journal of Number Theory 77 (2): 274–287.

Bérut, A., A. Arakelyan, A. Petrosyan, S. Ciliberto, R. Dillenschneider, and E. Lutz. 2012. "Experimental Verification of Landauer's Principle Linking Information and Thermodynamics." Nature 483: 187–189.

Cohen, P. J. 1963. "The Independence of the Continuum Hypothesis." Proceedings of the National Academy of Sciences 50 (6): 1143–1148.

Connes, A. 1999. "Trace Formula in Noncommutative Geometry and the Zeros of the Riemann Zeta Function." Selecta Mathematica 5: 29–106.

Davis, M., Yu. Matiyasevich, and J. Robinson. 1976. "Hilbert's Tenth Problem: Diophantine Equations: Positive Aspects of a Negative Solution." Proceedings of Symposia in Pure Mathematics 28: 323–378.

de Bruijn, N. G. 1950. "The Roots of Trigonometric Integrals." Duke Mathematical Journal 17: 197–226.

de la Vallée Poussin, C.-J. 1896. "Recherches analytiques sur la théorie des nombres premiers." Annales de la Société Scientifique de Bruxelles 20: 183–256.

de Moura, L., and S. Ullrich. 2021. "The Lean 4 Theorem Prover and Programming Language." In Automated Deduction, CADE 28, Lecture Notes in Computer Science 12699: 625–635.

Gödel, K. 1938. "The Consistency of the Axiom of Choice and of the Generalized Continuum-Hypothesis." Proceedings of the National Academy of Sciences 24 (12): 556–557.

Guinand, A. P. 1948. "A Summation Formula in the Theory of Prime Numbers." Proceedings of the London Mathematical Society (2) 50: 107–119.

Hadamard, J. 1896. "Sur la distribution des zéros de la fonction ζ(s) et ses conséquences arithmétiques." Bulletin de la Société Mathématique de France 24: 199–220.

Haselgrove, C. B. 1958. "A Disproof of a Conjecture of Pólya." Mathematika 5: 141–145.

Islam, M. F. 2026a. PhysOS: The Trisduction Physical Operating System, edition 1.0.10p. One-file executable role, kernels and twins. Repository 1000sapients/Trisduction, GitHub; continuously updated.

Islam, M. F. 2026b. Nothing Escapes: Three Plus One. The Riemann Closure and the Twenty-Three Rows. Zenodo. DOI 10.5281/zenodo.22976494 and 10.5281/zenodo.22986551.

Islam, M. F. 2026c. Nothing Escapes: The Fourth as Cosmic Closure. The Ghost and the Unicorn Close in One Cut, version 1.3.0. Zenodo. DOI 10.5281/zenodo.22987346.

Islam, M. F. 2026d. The Riemann Hypothesis Closed to One Bit, version 8.1. Zenodo. DOI 10.5281/zenodo.23028070.

Islam, M. F. 2026e. RH Is Proved from Unconditional Least Erasure: The Constructed p-adic Witness that Primes Are the Free Basis and the One-Bit Closure in a Discrete Mirror Model, Machine-Verified in Core Lean 4.19.0, version 2.0.0. Zenodo. DOI 10.5281/zenodo.23034066.

Islam, M. F. 2026f. TRISDUCTION: A Linguistically, Topologically, and Mathematically Sealed Verification Architecture. Triaxial Orthogonality, Twelve-Gate Closure, the Quaternionic Completion, the Root Axiom, and the Master Pre-Sealed Proposition Ledger. Zenodo, version 4, 19 June 2026. DOI 10.5281/zenodo.20757507. https://zenodo.org/records/20757507. Mirror: PhilArchive record ISLTTG, https://philpapers.org/rec/ISLTTG. Master reference, continuously updated at the same location.

Islam, M. F. 2026g. Theory of Theories of Everything (TOE of All TOEs): Existence Proves Existence Only by Motion. Zenodo. DOI 10.5281/zenodo.23168379.

Islam, M. F. 2026h. Nothing Escapes Least Erasure: The Formal Closure and the Twenty-Three Rows. Version 1.4.1. Zenodo. DOI 10.5281/zenodo.23080221.

Islam, M. F. 2026i. Seven Rows, One Root: The Master Plan of the Series, Revision F.5. Manuscript of record, 5 October 2026, carried with the series; its Appendix R kernels are carried into this paper's Appendix R, each extended by one additive section.

Islam, M. F. 2026j. Trisduction: The Master Codex, Edition 5.1.0. Codex.lean and its kernels, commit 5e55fca98c2f, master SHA-256 441a485d7c3bd3ce. Repository 1000sapients/Trisduction, GitHub.

Islam, M. F. 2026k. The Master Annihilation Closure: The Timeless Zone and the Unicorn, Contained (APEX-PSP-ANNIHILATION-CLOSURE-01). Card of record, 7 October 2026; its kernel Annihilation_Closure.lean, SHA-256 9a97b3c40d73fd67, is carried whole in Appendix T.

Lagarias, J. C. 2002. "An Elementary Problem Equivalent to the Riemann Hypothesis." American Mathematical Monthly 109 (6): 534–543.

Landau, E. 1899. Neuer Beweis der Gleichung $\sum \mu(k)/k = 0$. Inaugural dissertation, Berlin.

Landauer, R. 1961. "Irreversibility and Heat Generation in the Computing Process." IBM Journal of Research and Development 5 (3): 183–191.

Li, X.-J. 1997. "The Positivity of a Sequence of Numbers and the Riemann Hypothesis." Journal of Number Theory 65 (2): 325–333.

Newman, C. M. 1976. "Fourier Transforms with Only Real Zeros." Proceedings of the American Mathematical Society 61 (2): 245–251.

Platt, D., and T. Trudgian. 2021. "The Riemann Hypothesis Is True up to $3\cdot10^{12}$." Bulletin of the London Mathematical Society 53 (3): 792–797.

Polymath, D. H. J. 2019. "Effective Approximation of Heat Flow Evolution of the Riemann $\xi$ Function, and a New Upper Bound for the de Bruijn–Newman Constant." Research in the Mathematical Sciences 6: 31.

Pólya, G. 1919. "Verschiedene Bemerkungen zur Zahlentheorie." Jahresbericht der Deutschen Mathematiker-Vereinigung 28: 31–40.

Riemann, B. 1859. "Über die Anzahl der Primzahlen unter einer gegebenen Grösse." Monatsberichte der Berliner Akademie, 671–680.

Rodgers, B., and T. Tao. 2020. "The de Bruijn–Newman Constant Is Non-negative." Forum of Mathematics, Pi 8: e6.

Tanaka, M. 1980. "A Numerical Investigation on Cumulative Sum of the Liouville Function." Tokyo Journal of Mathematics 3 (1): 187–189.

Weil, A. 1952. "Sur les 'formules explicites' de la théorie des nombres premiers." Communications du Séminaire Mathématique de l'Université de Lund, tome supplémentaire: 252–265.

↑