Zero Paradox — Lean 4 Source
Lean 4 + Mathlib proofs for the Zero Paradox framework. The central result is T-SNAP (Binary Snap: join c₀ c₁ = c₁), derived from standard join-semilattice axioms. For full project context see README.md at the repository root.
Source layout
As of v3.0 the source is organized by domain - ZeroParadox/<Domain>/<Name>.lean (e.g. Order/, Valuation/, Ordinal/, Settheory/, Category/, Computability/, State/, Information/, Multihomed/, Reals/, Algebra/) - all under a single flat ZeroParadox namespace. Earlier versions used a flat ZeroParadox/ZPx_*.lean layout with per-layer namespaces; those file paths and namespace prefixes are retired. The complete old→new file/declaration mapping is recorded in ssot.json, and SHA-pinned permalinks to earlier commits remain valid. Followed an old blob/main link that broke? Report it in the v3.0 reorg link-integrity thread.
Build
lake build
Clean build: zero errors, zero warnings across all files. Some files set maxHeartbeats 400000 due to heavy import chains (p-adics + Hilbert space machinery).
Lint policy: weak.linter.mathlibStandardSet is on, so the build flags genuine hygiene issues (unused variables, deprecated tactics, etc.). The pure Mathlib-contribution house-style linters (line length, show-for-readability, file-level set_option, duplicate namespace) are relaxed in lakefile.toml — they govern Mathlib PRs, not a standalone research repo. The native_decide linter stays on (it trusts the compiler, not just the kernel); no file currently uses native_decide.
File Overview and Dependency Order
Core chain
| File | Key result | Depends on |
|---|---|---|
Lattice.lean |
ZPSemilattice typeclass (A1–A4); partial order (T1); ⊥ minimum (T2); monotonicity (T3) |
— |
Padic.lean |
OntologicalStates free inductive (AX-B1 — modelling commitment, not derived); ultrametric (T1); clopen balls (T2); topological irreversibility (C3) |
Lattice |
Surprisal.lean |
BinaryState free inductive; MachinePhase; L-RUN (c₀ ≠ c₁, so the step from ⊥ of MachinePhase (c₀) to c₁ is a state change off it); TQ-IH (the same fact read from c₁); L-INF in two charts: depth chart, l_inf: surprisal is unbounded in the depth n, and every value surprisal n is a finite real (its codomain is ℝ); point chart: at the point 0 of Q₂, which lies in every ball 2ⁿℤ₂, the complexity cxQ2 of the instance q2InfinitudeFloor (ZeroParadox/Valuation/InfinitudeFloor.lean) is ⊤ (infinitude_forces_infinite_complexity) and equals the supremum of the members’ climbing values (infinite_complexity_is_infinitude_of_zeros); the additive 2-adic valuation is likewise ⊤ at 0, as standard (AddValuation.map_zero; Mathlib’s ℤ-valued Padic.valuation reads 0 there). That ⊥ of MachinePhase (c₀) corresponds to that point is a reading (a design identification), not a theorem and not an equation between carriers |
Lattice, Padic |
StateSpace.lean |
TransitionMap; transition operator T: Q₂ → ℂⁿ; orthogonal snap shift (T4); non-decreasing norms (T5) |
Lattice, Padic |
Snap.lean |
MachinePhase ZPSemilattice instance; T-SNAP (join c₀ c₁ = c₁); DA-2 (successor null); da1_minimal_path (axiom-free) |
Lattice–StateSpace |
SetTheoryAFA.lean |
AFAStructure typeclass; T-EXEC (Quine atom = ⊥, axiom-free); cc1_derived (CC-1 as theorem); t_exec_triple_iff: Quine atom ↔ (= ⊥ ∧ join identity) |
Lattice |
Kleene.lean |
KleeneStructure typeclass (a requirement, not a derived bridge; its identity reading is retired, and that ⊥ runs is the occurrence commitment); kleene_fixed_point_exists (Kleene’s second recursion theorem, via Mathlib fixed_point₂); selfApply_partrec (self-application is partial computable); T-COMP (Quine atom ↔ (bottom ∧ join identity); with da2_bottom_characterization the three-way equivalence; the computational face enters as a class field, not a clause); da1_closed_concrete : IsQuineAtom(⊥ : MachinePhase) |
Snap, SetTheoryAFA |
SemilatticeInstance.lean |
t_iz_complete (all four T-IZ steps: Cauchy convergence + DA-2 + the Lean counterpart of DA-1’s Path 1 in a KleeneStructure (da1_computational) + T-SNAP); h_strict_from_r1_t3 (strict valuation growth derived, not assumed) |
Lattice, Padic, Snap, Kleene |
Categorical extension (self-contained; depends on Snap conceptually, not formally)
| File | Key result | Depends on |
|---|---|---|
Category.lean |
ZPCategory and ZPSurprisal typeclasses; T6 (informational singularity); T7 (Categorical Zero Paradox); ForkCat concrete instance |
Lattice |
CategoricalBridge.lean |
Functors F_B–F_D (F_A via the NatSLat instance); T-H2 (singularity compatibility); T-H3 (four separately proved domain facts, conjoined, none derived from another or from a functor); nnreal_initial_grounding standalone ℝ≥0 witness |
Category, Surprisal, StateSpace |
Axiom Profile
Each file contains a section PurityCheck ... end PurityCheck block with #print axioms for key theorems.
- Lattice–Category:
propext,Quot.soundonly, or fully axiom-free for computable results (e.g.l_runproved bydecide) - CategoricalBridge, Kleene:
[propext, Classical.choice, Quot.sound]—Classical.choiceenters through Mathlib’s Kleene/computability machinery (Code,Partrec), not throughZPSemilatticeorAFAStructure - WheelFrac (wheel of fractions
⊙_S A), two profiles in one file:instWheel,inf_ne_botand the other wheel and fork declarations report at most[propext, Quot.sound],Classical.choice-free;cmAdd,cmMuland the common-meadow declarations through either report[propext, Classical.choice, Quot.sound], asRat.addandRat.muldo;cmInvand the common-meadow declarations that use only it report[propext, Quot.sound], asRat.invdoes. The Carlström wheel-of-fractions construction (⊙_S A = (A × A)/≡_Sis aWheelfor any commutative ringAand multiplicative submonoidS) is fully constructive; no choice needed. This proves the construction half of the wheel conjecture inZeroParadox/Algebra/Wheel.lean§VIII; the pinning half, stated there, stays open.
Honest Scope Boundaries
The framework is explicit about what is and is not Lean-verified. Two boundaries are worth noting upfront:
Category.lean T6-b/c — The Lean proofs for T6-b (strict surprisal inequality) and T6-c (subadditivity along chains) verify only Nat.zero_le _ (non-negativity by type). The K-specific content — strict inequality and subadditivity of Kolmogorov complexity — is outside Lean scope and explicitly noted as such in the file’s inline scope note. Importantly, T6-b/c are not load-bearing for any subsequent formal result. The load-bearing singularity claim — that surprisal diverges along sequences approaching ⊥ — is separately proved in t2_diverges using Q₂’s specific structure, without K.
Snap.lean / Surprisal.lean — DA-1 Path 2 — L-INF formally proves that surprisal is unbounded in the depth n (l_inf), each value a finite real since the codomain is ℝ; the point chart is infinitude_forces_infinite_complexity at the instance q2InfinitudeFloor, where the complexity cxQ2 at the point 0 of Q₂ is ⊤; that ⊥ of MachinePhase (c₀) corresponds to that point is a reading (a design identification), not a theorem. The step from unbounded surprisal to executing is not a consequence of L-INF and is not DA-1: it is a bridge principle of its own, which the framework does not adopt and which is not the occurrence commitment (ZP-E, DA-1 Path 2). Kleene.lean carries the Lean counterparts of DA-1’s Paths 1 and 3 together (da1_paths_unified): ⊥ is the AFA Quine atom, and the class names a code satisfying IsComputationalQuine. That is a conjunction, not a proof that the two paths are one fact, and the computational side enters as a KleeneStructure requirement. DA-1 itself is closed given DP-2 (da1_minimal_path, Snap.lean); its precondition, that the configuration reaching P₀ is executing, is the occurrence commitment, which DA-1 consumes and does not supply.
The inline scope notes in each file document what is and is not Lean-verified.