From 4a673947261c3276bce0883f811b2d47dcd1f5fb Mon Sep 17 00:00:00 2001 From: Vasily Ilin Date: Fri, 27 Nov 2026 14:04:36 +0000 Subject: [PATCH] Clarify catalytic register theorem scope in documentation --- .../CatalyticRegisters/DigitSumDichotomy.lean | 7 +++--- .../ExtensionFieldSeparation.lean | 22 +++++++++---------- .../ThreeRegisterBreakthrough.lean | 4 ++-- LeanPool/projects/catalytic-registers.yaml | 13 ++++++----- 4 files changed, 24 insertions(+), 22 deletions(-) diff --git a/LeanPool/CatalyticRegisters/DigitSumDichotomy.lean b/LeanPool/CatalyticRegisters/DigitSumDichotomy.lean index 0022cf347e..9c0967a328 100644 --- a/LeanPool/CatalyticRegisters/DigitSumDichotomy.lean +++ b/LeanPool/CatalyticRegisters/DigitSumDichotomy.lean @@ -40,7 +40,7 @@ namespace Catalytic @[expose] public section -/-! ## 1. Literal 2-Register Passive-Output Model over `๐”ฝ_p` (Vinciguerra Def. 2.2) -/ +/-! ## 1. Passive-output instructions and formal polynomial semantics over `๐”ฝ_p` -/ /-- A primitive instruction of a passive-output 2-register program over `๐”ฝ_p` @@ -965,8 +965,9 @@ theorem char_p_two_access_unbounded_degree (p m : Nat) (hp : IsPrime p) : have := hp.1; omega ยท simp [hdm] at hne -/-- **Corollary T1b (Exact `๐”ฝ_2` Saturation โ€” `x^3` is Uncomputable in 2 Registers for ALL `t`):** -Over `๐”ฝ_2`, `x^3 โˆ‰ RP^{pass}_{๐”ฝ_2}(2, t)` for EVERY `t : Nat`! -/ +/-- **Corollary T1b (Exact `๐”ฝ_2` Saturation โ€” formal `x^3` is impossible in two registers):** +Over `๐”ฝ_2`, `x^3 โˆ‰ RP^{pass}_{๐”ฝ_2}(2, t)` as a formal polynomial for every `t : Nat`. +As a function on `๐”ฝ_2`, `x^3` agrees with `x`. -/ theorem char_2_two_reg_x3_impossible (t : Nat) : ยฌ InRPPass2 2 t (monomial 3) := by intro hmem have hs3 : digitSum 2 3 = 2 := by diff --git a/LeanPool/CatalyticRegisters/ExtensionFieldSeparation.lean b/LeanPool/CatalyticRegisters/ExtensionFieldSeparation.lean index e1a165466b..9bc9027f51 100644 --- a/LeanPool/CatalyticRegisters/ExtensionFieldSeparation.lean +++ b/LeanPool/CatalyticRegisters/ExtensionFieldSeparation.lean @@ -13,22 +13,22 @@ public import LeanPool.CatalyticRegisters.PrimeFieldTools /-! # Theorem T1e: Sharpness of the Prime-Field Hypothesis over `๐”ฝ_4` -Theorem `T1` (`Catalytic.DigitSumDichotomy`) proves that over every **prime field** `๐”ฝ_p`, -`f โˆˆ RP^{pass}_{๐”ฝ_p}(2, t)` iff every monomial degree `d โ‰ฅ 2` in `f` satisfies -`s_p(d) โ‰ค min (p - 1) (t - 1)`. In particular, over `๐”ฝ_2` (`p = 2`), BOTH `x^3` (`s_2(3) = 2`) -and `x^5` (`s_2(5) = 2`) are impossible for every `t`. +Theorem `T1` (`Catalytic.DigitSumDichotomy`) proves that over every **prime field** `๐”ฝ_p` +and for each access budget `t โ‰ฅ 1`, `f โˆˆ RP^{pass}_{๐”ฝ_p}(2, t)` exactly when every monomial +degree `d โ‰ฅ 2` in `f` satisfies `s_p(d) โ‰ค min (p - 1) (t - 1)`. Over `๐”ฝ_2`, `x^3` and `x^5` +are impossible as formal polynomial outputs at any budget. This module constructs the finite extension field `๐”ฝ_4 = ๐”ฝ_2[ฯ‰] / (ฯ‰^2 + ฯ‰ + 1)` as a -concrete 4-element `Char2CRing` and formalizes the literal Vinciguerra Def. 2.2 passive-output -2-register model over `๐”ฝ_4[O, R, x]`, proving **Theorem T1e (Extension-Field Separation)**: +concrete four-element `Char2CRing`. It uses the passive-output instruction set of +Vinciguerra's Definition 2.2 with formal polynomial identities in `๐”ฝ_4[O, R, x]`. +**Theorem T1e (Extension-Field Separation)** gives: 1. `x^5 โˆˆ RP^{pass}_{๐”ฝ_4}(2, 3)` AND `x^5 โˆ‰ RP^{pass}_{๐”ฝ_4}(2, 2)` (exact `t_min = 3`, via `ฯ‰^2 u^5 + ฯ‰ (u + x)^5 + (u + ฯ‰ x)^5 = x^5`), 2. `x^3 โˆˆ RP^{pass}_{๐”ฝ_4}(2, 4)` AND `x^3 โˆ‰ RP^{pass}_{๐”ฝ_4}(2, 3)` (exact `t_min = 4`, via `u^3 + (u + x)^3 + (u + ฯ‰ x)^3 + (u + ฯ‰^2 x)^3 = x^3`), 3. `โˆ€ t : Nat, x^7 โˆ‰ RP^{pass}_{๐”ฝ_4}(2, t)` (because `ฮฑ^7 = ฮฑ` for every `ฮฑ โˆˆ ๐”ฝ_4`, so any clean program necessarily has `[x^7] ฮ”O = [R^6 x] ฮ”O = 0`). -This proves inside Lean 4.35 (with zero Mathlib and zero extra axioms) that the prime-field -restriction in Theorem `T1` is sharp while extension fields still exhibit absolute impossibility -barriers. +The prime-field restriction in Theorem `T1` is sharp. The exclusion of `x^7` over `๐”ฝ_4` +is about formal polynomials. As a function on `๐”ฝ_4`, `x^7` agrees with `x`. -/ namespace Catalytic @@ -103,10 +103,10 @@ theorem GF4.z_pow_succ (n : Nat) : GF4.pow .z (n + 1) = .z := rfl theorem GF4.pow7_eq_self (a : GF4) : GF4.pow a 7 = a := by cases a <;> rfl -/-! ## 2. Literal 2-Register Passive-Output Model over `๐”ฝ_4[O, R, x]` -/ +/-! ## 2. Formal 2-Register Passive-Output Model over `๐”ฝ_4[O, R, x]` -/ /-- -Literal Vinciguerra Def. 2.2 passive-output 2-register instruction over `๐”ฝ_4` +Passive-output 2-register instruction over `๐”ฝ_4` from Vinciguerra's Definition 2.2 (identical instruction set to `Pass2Instr` in `Catalytic.DigitSumDichotomy`): * `addOut poly`: `O โ† O + โˆ‘_k poly[k] * R^k` (0 input accesses) * `addWorkConst c`: `R โ† R + c` (0 input accesses) diff --git a/LeanPool/CatalyticRegisters/ThreeRegisterBreakthrough.lean b/LeanPool/CatalyticRegisters/ThreeRegisterBreakthrough.lean index 334817db06..0cabb46db1 100644 --- a/LeanPool/CatalyticRegisters/ThreeRegisterBreakthrough.lean +++ b/LeanPool/CatalyticRegisters/ThreeRegisterBreakthrough.lean @@ -21,7 +21,7 @@ namespace Catalytic universe u -/-- **Theorem T3a (`x^7 โˆˆ RP^{pass}_R(3, 5)` whenever `576` is invertible, i.e. `char โ‰  2, 3`).** -/ +/-- **Theorem T3a (`x^7 โˆˆ RP^{pass}_R(3, 5)` whenever `576` is a unit in `R`).** -/ theorem three_reg_5call_x7 {R : Type u} [CRing R] (inv576 : R) (hinv : inv576 * CRing.intCast 576 = 1) : Pass3Prog.accesses (Pass3Prog.scaleOut inv576 prog5Power7) = 5 โˆง @@ -30,7 +30,7 @@ theorem three_reg_5call_x7 {R : Type u} [CRing R] โŸจby rw [Pass3Prog.scaleOut_accesses]; exact prog5_x7_accesses, fun x o u v => exec3Poly_certifies_monic prog5Power7 7 576 prog5_x7_cert inv576 hinv x o u vโŸฉ -/-- **Theorem T3b (`x^9 โˆˆ RP^{pass}_R(3, 6)` whenever `382500000` is invertible, i.e. `char โˆ‰ {2,3,5,17}`).** -/ +/-- **Theorem T3b (`x^9 โˆˆ RP^{pass}_R(3, 6)` whenever `382500000` is a unit in `R`).** -/ theorem three_reg_6call_x9 {R : Type u} [CRing R] (invD : R) (hinv : invD * CRing.intCast 382500000 = 1) : Pass3Prog.accesses (Pass3Prog.scaleOut invD prog6Power9) = 6 โˆง diff --git a/LeanPool/projects/catalytic-registers.yaml b/LeanPool/projects/catalytic-registers.yaml index 4af72b5195..8e26452985 100644 --- a/LeanPool/projects/catalytic-registers.yaml +++ b/LeanPool/projects/catalytic-registers.yaml @@ -1,7 +1,7 @@ slug: catalytic-registers title: Passive catalytic register programs over finite fields and commutative rings -summary: Characterizes polynomials computable with two passive catalytic - registers over a prime field using digit sums of their formal exponents. +summary: Characterizes formal polynomial identities computable with two + passive catalytic registers and prime-field constants using base-p digit sums. It verifies explicit three-register powering programs, composes them into a four-register construction, and proves exact costs and clean restoration for a balanced multilinear product program with a sufficiently large pool of @@ -25,14 +25,15 @@ main_declarations: main_results: - declaration: Catalytic.rp_pass_two_iff informal: For a prime p and input-access budget t โ‰ฅ 1, a formal polynomial - over the prime field is computable by a clean passive two-register program - exactly when each exponent at least two with nonzero coefficient has + over the prime field is computable as a formal identity by a clean passive + two-register program with prime-field constants exactly when each exponent + at least two with nonzero coefficient has base-p digit sum at most min(p โˆ’ 1, t โˆ’ 1). - declaration: Catalytic.four_reg_powering_x13 informal: For N โ‰ฅ 1, under the stated invertibility conditions on the certificate coefficient and two factorials, the radix-13 construction - computes the Nth power with four registers. For โ„“ the number of base-13 - digits of N minus one, three times the access count is less than 104 ยท 8^โ„“. + computes the Nth power with four registers. Let โ„“ be one less than the + number of base-13 digits of N. Three times the access count is less than 104 ยท 8^โ„“. - declaration: Catalytic.balancedProdProg_clean informal: With sign +1, the balanced product program adds the product of 2^k inputs to its target and restores every other register. The work