Skip to content

Import passive catalytic register programs - #1048

Merged
Vilin97 merged 5 commits into
mainfrom
feature/catalytic-register-programs-20261127
Nov 27, 2026
Merged

Vilin97 merged 5 commits into
mainfrom
feature/catalytic-register-programs-20261127

Conversation

@Vilin97

@Vilin97 Vilin97 commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Result and source

The formalization classifies the formal polynomials computable with two passive catalytic registers over a prime field by the base-p digit sums of the degrees with nonzero coefficients. It also verifies five explicit three-register power programs, composes the radix-13 program into a four-register powering result, and proves exact cost and clean restoration for balanced multilinear products. For a product of 2^k inputs at positive depth, the construction uses at least k + 1 distinct work registers disjoint from the target. At depth zero it can use an empty pool. The integer exponent comparison is for the stated family of constructions.

Alexander S. Donahue published the first GitHub release on 2026-11-24 at 22:35:13 UTC. The import pins the Apache-2.0 Lean source at c80125c42956ff17e7d6d56c66d94ee9bb57ae33. The project card records AI provenance from the upstream formalization record, which credits Gemini for Lean proof engineering under Donahue's direction. Release · Pinned source and provenance · Corrected manuscript at the pinned commit · Historical Zenodo v1.0.1 deposit · Vinciguerra's register model

The project card cites the corrected manuscript under its revised title. The Lean source notes identify the large-characteristic analogue and specify the field hypotheses for the cited powering examples. Upstream errata

Import and port

  • Imports the ten upstream mathematical modules. They cover register semantics, symbolic power certificates, the prime-field classifier, the extension-field boundary, the soundness bridge, powering and balanced products. The comparator fixtures and artifact tooling stay upstream.
  • Adds an adapter for Mathlib commutative rings, retains the upstream copyright, and records changed files. The public entry point is LeanPool.CatalyticRegisters.Imports.
  • Extracts the one-access lemma from a 209-line proof, documents public definitions, and applies definition naming conventions. The two recursion-depth overrides were replaced by ordinary kernel certificate checks.
  • Splits five independent certificate checks into separate modules and uses the ring laws for the four-element-field invariant. This avoids 4,352 finite case branches across the output-update and no-op cases. The review update also shares the work-register invariant and uses a verified binary cast for compiled execution.

Validation and measurements

  • Lean v4.36.0 with Mathlib fc4f59e577feb1a4956671bc04ac18aaaf8cd842 and Tau Ceti 0642eae29e0a59ef798d04de325386445906e755. The warning-as-error project build, generated indexes, text style, and scoped Mathlib/quality audits passed.

  • The repository shard checks resolved the card declarations and audited all 20 modules, including generated declarations. The axiom, option/backdoor, and build-message audits passed. The timing watchdog recorded all 20 added Lean files within the 600-second limit and observed no memory-limit breach.

  • Clean project build on the Azure VM with warmed pinned dependencies, a shared Mathlib ring adapter, and LEAN_NUM_THREADS=4 lake build +LeanPool.CatalyticRegisters.Imports took 10.49 s before and 7.13 s after. These measurements used the same scratch build configuration with project artifacts removed between runs. Individual certificate modules and other module times are recorded by Lake.

  • A scratch execution checked the fifteen-power program over the integers with nonzero initial registers. It produced the expected scaled power and restored the work registers.

  • A matched clean build check after review measured 13.82 s at the original baseline and 9.86 s on the revised head, using four Lean threads, warm pinned dependencies and the timing watchdog for both runs.

@Vilin97
Vilin97 marked this pull request as ready for review November 27, 2026 10:43
@greptile-apps

greptile-apps Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Advisory cross-file review against Lean Pool's supervisory rubric. This is not by itself a significance, source-verification, or merge verdict.

No blocking issue was found in the source-link repair.RetriggerView in Greptile

[Medium impact] No blocking issue was found in the source-link repair.

Summary

Imports the catalytic-register formalization, including the prime-field classifier, powering certificates, and balanced products.

  • Prime-field polynomials now have an exact test for two-register computation.
  • Characteristic-2 registers can compute powers of two with two input accesses.
  • Three-register power programs now feed a four-register construction for every positive exponent.
  • A balanced register program multiplies 2^k inputs and restores its work registers.
  • Lean Pool now exposes the register proofs through one import.

Reviews (4) · Last reviewed commit: "Link the catalytic project card directly..." · Reviewed by Greptile

@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Proof profile (new / modified Lean files)

lake build wall time (changed modules): 43.42 s (= 0.72 min) — user 40.47 s, sys 6.54 s.

This build covers the changed modules and their dependency cones on top of the restored cache. The serial per-file sums below are useful for ranking slow files, not as a build budget.

Total heartbeats: 496,096 maxHeartbeats units across 20 valid files (8,077 added LOC).

Sum of lean --profile: 34708.4 ms (= 34.71 s) across 20 valid files. Import-excluded time: 31840.4 ms (= 31.84 s).

Count-heartbeats wall-clock total: 79.78 s. Repeated import cost inside lean --profile: 2868.0 ms (= 2.87 s).

Heartbeat values sum disjoint root command traces with trace.profiler.useHeartbeats and synchronous elaboration, converted from raw allocations to maxHeartbeats units by dividing by 1000. They include command elaboration and kernel checking, exclude imports, and include profiler overhead; they are not comparable to the deprecated linter's totals. Per-file wall clocks are measured under parallel load and are noisier than heartbeats.

LOC counts added lines in the profiled Lean files from this PR diff.

File LOC Heartbeats (maxHB) Count wall (s) lean --profile (s) Without import (s) Import (s) Commands Errors
LeanPool/CatalyticRegisters/FourRegisterPowering.lean 1,373 63,064 8.32 3.94 3.76 0.18 240 0
LeanPool/CatalyticRegisters/ExtensionFieldSeparation.lean 761 54,931 8.48 5.48 5.37 0.11 127 0
LeanPool/CatalyticRegisters/PrimeFieldTools.lean 1,318 54,506 7.05 3.61 3.50 0.11 111 0
LeanPool/CatalyticRegisters/DigitSumDichotomy.lean 1,022 43,407 5.59 3.22 3.11 0.10 96 0
LeanPool/CatalyticRegisters/Pass2Soundness.lean 827 43,186 4.65 2.45 2.35 0.11 132 0
LeanPool/CatalyticRegisters/Certificates/EleventhPower.lean 24 40,501 5.46 2.06 1.96 0.10 7 0
LeanPool/CatalyticRegisters/BilinearFrobenius.lean 766 40,010 6.16 2.97 2.86 0.10 148 0
LeanPool/CatalyticRegisters/SymbolicExecution.lean 473 25,666 3.69 1.19 1.09 0.11 126 0
LeanPool/CatalyticRegisters/Certificates/NinthPower.lean 23 25,257 4.44 1.24 1.13 0.10 7 0
LeanPool/CatalyticRegisters/BalancedProduct.lean 409 20,156 3.98 1.42 1.29 0.13 57 0
LeanPool/CatalyticRegisters/Certificates/SeventhPower.lean 23 17,663 3.11 0.90 0.79 0.10 7 0
LeanPool/CatalyticRegisters/NonVacuity.lean 351 15,442 3.13 0.95 0.85 0.11 34 0
LeanPool/CatalyticRegisters/ThreeRegisterBreakthrough.lean 120 12,495 2.42 0.51 0.40 0.10 15 0
LeanPool/CatalyticRegisters/CommRing.lean 330 11,530 2.68 0.85 0.75 0.10 56 0
LeanPool/CatalyticRegisters/Certificates/FifteenthPower.lean 28 9,580 2.86 1.32 1.22 0.10 7 0
LeanPool/CatalyticRegisters/PoweringPrograms.lean 86 6,876 1.91 0.43 0.33 0.10 18 0
LeanPool/CatalyticRegisters/Certificates/ThirteenthPower.lean 27 6,694 1.77 0.92 0.81 0.10 7 0
LeanPool/CatalyticRegisters/MathlibRing.lean 47 5,134 1.58 0.39 0.14 0.25 16 0
LeanPool/CatalyticRegisters.lean 42 0 1.20 0.57 0.08 0.49 3 0
LeanPool/CatalyticRegisters/Imports.lean 27 0 1.30 0.31 0.06 0.25 1 0
Total 8,077 496,096 79.78 34.71 31.84 2.87 1215 0

Aggregate phase totals

Phase Time
tactic execution 8607.7 ms (= 8.61 s)
type checking 6081.0 ms (= 6.08 s)
blocked (unaccounted) 5422.0 ms (= 5.42 s)
elaboration 2962.6 ms (= 2.96 s)
import 2868.0 ms (= 2.87 s)
simp 2440.5 ms (= 2.44 s)
typeclass inference 1972.2 ms (= 1.97 s)
attribute application 1593.4 ms (= 1.59 s)
initialization 560.6 ms (= 0.56 s)
linting 498.4 ms (= 0.50 s)
process pre-definitions 401.8 ms (= 0.40 s)
parsing 389.3 ms (= 0.39 s)

Slowest changed modules (from lake build)

Changed module Lake time
LeanPool.CatalyticRegisters.PrimeFieldTools 3.60 s
LeanPool.CatalyticRegisters.BilinearFrobenius 3.10 s
LeanPool.CatalyticRegisters.Certificates.EleventhPower 2.60 s
LeanPool.CatalyticRegisters.ExtensionFieldSeparation 2.30 s
LeanPool.CatalyticRegisters.DigitSumDichotomy 2.30 s
LeanPool.CatalyticRegisters.Certificates.NinthPower 2.20 s
LeanPool.CatalyticRegisters.Certificates.ThirteenthPower 2.00 s
LeanPool.CatalyticRegisters.Certificates.FifteenthPower 2.00 s
LeanPool.CatalyticRegisters.SymbolicExecution 1.80 s
LeanPool.CatalyticRegisters.MathlibRing 1.70 s
LeanPool.CatalyticRegisters.FourRegisterPowering 1.50 s
LeanPool.CatalyticRegisters.Certificates.SeventhPower 1.20 s
Per-file `lean --profile` output

LeanPool/CatalyticRegisters.lean

import took 490ms
cumulative profiling times:
	declTypeLinter 0.9ms
	elaboration 0.247ms
	import 490ms
	initialization 33.1ms
	interpretation 42.3ms
	linting 0.922ms
	module linting 0.034ms
	parsing 0.0522ms
	tacticAnalysis 0.337ms
real 1.23
user 0.52
sys 0.60

LeanPool/CatalyticRegisters/BalancedProduct.lean

import took 129ms
cumulative profiling times:
	attribute application 0.33ms
	blocked (unaccounted) 106ms
	compilation (IR) 0.988ms
	compilation (LCNF base) 9.02ms
	compilation (LCNF impure) 4.52ms
	compilation (LCNF mono) 7.46ms
	congr simp thm 6.56ms
	elaboration 81.1ms
	fix level params 1.78ms
	import 129ms
	initialization 32.6ms
	instantiate metavars 5.04ms
	interpretation 2.29ms
	let-to-have transformation 1.03ms
	linting 23ms
	parsing 21.5ms
	process pre-definitions 19.5ms
	share common exprs 6.68ms
	simp 210ms
	tactic execution 473ms
	type checking 99.2ms
	typeclass inference 181ms
real 1.17
user 1.40
sys 0.55

LeanPool/CatalyticRegisters/BilinearFrobenius.lean

import took 104ms
tactic execution of Lean.Parser.Tactic.change took 105ms
cumulative profiling times:
	attribute application 0.801ms
	blocked (unaccounted) 639ms
	compilation (IR) 2.49ms
	compilation (LCNF base) 19.8ms
	compilation (LCNF impure) 10.2ms
	compilation (LCNF mono) 16.3ms
	congr simp thm 18.2ms
	dsimp 0.821ms
	elaboration 227ms
	fix level params 3.37ms
	import 104ms
	initialization 31.3ms
	instantiate metavars 8.56ms
	interpretation 2.28ms
	let-to-have transformation 1.89ms
	linting 46.4ms
	parsing 34.7ms
	process pre-definitions 60.4ms
	share common exprs 13.3ms
	simp 451ms
	tactic execution 878ms
	type checking 232ms
	typeclass inference 166ms
real 1.75
user 2.49
sys 0.57

LeanPool/CatalyticRegisters/Certificates/EleventhPower.lean

import took 103ms
attribute application took 763ms
elaboration took 610ms
type checking took 545ms
cumulative profiling times:
	attribute application 763ms
	elaboration 613ms
	fix level params 0.0109ms
	import 103ms
	initialization 31.3ms
	instantiate metavars 0.0429ms
	interpretation 2.13ms
	let-to-have transformation 0.0245ms
	linting 0.983ms
	parsing 0.473ms
	process pre-definitions 0.161ms
	share common exprs 0.0564ms
	type checking 545ms
	typeclass inference 1.67ms
real 1.85
user 2.24
sys 0.51

LeanPool/CatalyticRegisters/Certificates/FifteenthPower.lean

import took 103ms
type checking took 1.17s
cumulative profiling times:
	attribute application 0.0127ms
	elaboration 3.73ms
	fix level params 0.0218ms
	import 103ms
	initialization 31.6ms
	instantiate metavars 0.0502ms
	interpretation 2.15ms
	let-to-have transformation 0.0391ms
	linting 0.722ms
	parsing 0.481ms
	process pre-definitions 0.181ms
	share common exprs 0.112ms
	tactic execution 0.919ms
	type checking 1.17s
	typeclass inference 6.15ms
real 1.91
user 1.48
sys 0.50

LeanPool/CatalyticRegisters/Certificates/NinthPower.lean

import took 105ms
attribute application took 452ms
elaboration took 357ms
type checking took 289ms
cumulative profiling times:
	attribute application 452ms
	elaboration 361ms
	fix level params 0.0106ms
	import 105ms
	initialization 25.3ms
	instantiate metavars 0.0436ms
	interpretation 2.19ms
	let-to-have transformation 0.0245ms
	linting 0.916ms
	parsing 0.507ms
	process pre-definitions 0.158ms
	share common exprs 0.0551ms
	type checking 289ms
	typeclass inference 1.88ms
real 1.35
user 1.40
sys 0.51

LeanPool/CatalyticRegisters/Certificates/SeventhPower.lean

import took 103ms
attribute application took 322ms
elaboration took 246ms
type checking took 192ms
cumulative profiling times:
	attribute application 322ms
	elaboration 250ms
	fix level params 0.0105ms
	import 103ms
	initialization 25.2ms
	instantiate metavars 0.0442ms
	interpretation 2.15ms
	let-to-have transformation 0.0234ms
	linting 0.775ms
	parsing 0.475ms
	process pre-definitions 0.136ms
	share common exprs 0.0513ms
	type checking 192ms
	typeclass inference 1.95ms
real 1.15
user 1.06
sys 0.50

LeanPool/CatalyticRegisters/Certificates/ThirteenthPower.lean

import took 104ms
type checking took 772ms
cumulative profiling times:
	attribute application 0.0107ms
	elaboration 3.68ms
	fix level params 0.0213ms
	import 104ms
	initialization 25.4ms
	instantiate metavars 0.0714ms
	interpretation 2.15ms
	let-to-have transformation 0.0246ms
	linting 0.733ms
	parsing 0.47ms
	process pre-definitions 0.179ms
	share common exprs 0.11ms
	tactic execution 0.981ms
	type checking 772ms
	typeclass inference 6.5ms
real 1.50
user 1.08
sys 0.50

LeanPool/CatalyticRegisters/CommRing.lean

import took 104ms
cumulative profiling times:
	attribute application 3.18ms
	blocked (unaccounted) 95.8ms
	compilation (IR) 0.579ms
	compilation (LCNF base) 3.9ms
	compilation (LCNF impure) 2.03ms
	compilation (LCNF mono) 4.17ms
	congr simp thm 1.57ms
	elaboration 79.8ms
	fix level params 1.5ms
	import 104ms
	initialization 31.3ms
	instantiate metavars 2.37ms
	interpretation 2.23ms
	let-to-have transformation 0.556ms
	linting 18.8ms
	parsing 16.1ms
	process pre-definitions 14.6ms
	share common exprs 4.23ms
	simp 24.9ms
	tactic execution 243ms
	type checking 84.6ms
	typeclass inference 111ms
real 0.96
user 0.93
sys 0.50

LeanPool/CatalyticRegisters/DigitSumDichotomy.lean

import took 102ms
cumulative profiling times:
	attribute application 0.517ms
	blocked (unaccounted) 513ms
	compilation (IR) 1.82ms
	compilation (LCNF base) 17.4ms
	compilation (LCNF impure) 8.29ms
	compilation (LCNF mono) 12.7ms
	congr simp thm 9.02ms
	elaboration 148ms
	fix level params 1.95ms
	import 102ms
	initialization 24.8ms
	instantiate metavars 10.9ms
	interpretation 2.22ms
	let-to-have transformation 1.62ms
	linting 61.4ms
	parsing 47.5ms
	process pre-definitions 36.7ms
	share common exprs 13.6ms
	simp 388ms
	tactic execution 1.02s
	type checking 621ms
	typeclass inference 173ms
real 1.82
user 2.81
sys 0.58

LeanPool/CatalyticRegisters/ExtensionFieldSeparation.lean

import took 110ms
tactic execution of Lean.Parser.Tactic.omega took 465ms
tactic execution of Lean.Parser.Tactic.change took 102ms
cumulative profiling times:
	attribute application 1.44ms
	blocked (unaccounted) 2.75s
	compilation (IR) 2.6ms
	compilation (LCNF base) 18.6ms
	compilation (LCNF impure) 10.9ms
	compilation (LCNF mono) 16.4ms
	congr simp thm 3.44ms
	dsimp 2.07ms
	elaboration 152ms
	fix level params 1.52ms
	import 110ms
	initialization 29.6ms
	instantiate metavars 15.6ms
	interpretation 2.11ms
	let-to-have transformation 0.596ms
	linting 51.7ms
	parsing 33.9ms
	process pre-definitions 61.7ms
	share common exprs 12.8ms
	simp 123ms
	tactic execution 1.74s
	type checking 247ms
	typeclass inference 88.7ms
real 1.89
user 2.94
sys 0.57

LeanPool/CatalyticRegisters/FourRegisterPowering.lean

import took 180ms
cumulative profiling times:
	attribute application 0.864ms
	blocked (unaccounted) 570ms
	compilation (IR) 3.25ms
	compilation (LCNF base) 29.7ms
	compilation (LCNF impure) 14.6ms
	compilation (LCNF mono) 25.4ms
	congr simp thm 15.4ms
	dsimp 3.42ms
	elaboration 318ms
	fix level params 8.56ms
	import 180ms
	initialization 30.9ms
	instantiate metavars 13.6ms
	interpretation 3.27ms
	let-to-have transformation 4.68ms
	linting 95ms
	parsing 75.3ms
	process pre-definitions 69.8ms
	share common exprs 27.3ms
	simp 541ms
	tactic execution 1.15s
	type checking 438ms
	typeclass inference 317ms
real 2.02
user 3.53
sys 0.59

LeanPool/CatalyticRegisters/Imports.lean

import took 247ms
cumulative profiling times:
	declTypeLinter 0.135ms
	elaboration 0.157ms
	import 247ms
	initialization 25.2ms
	interpretation 32.3ms
	linting 0.204ms
	module linting 0.0208ms
	parsing 0.00198ms
	tacticAnalysis 0.112ms
real 0.92
user 0.44
sys 0.55

LeanPool/CatalyticRegisters/MathlibRing.lean

import took 249ms
cumulative profiling times:
	attribute application 0.196ms
	compilation (IR) 0.0731ms
	compilation (LCNF base) 1.13ms
	compilation (LCNF impure) 0.336ms
	compilation (LCNF mono) 1.3ms
	declTypeLinter 2.87ms
	elaboration 19.2ms
	fix level params 0.0758ms
	import 249ms
	initialization 25.3ms
	instantiate metavars 0.0539ms
	interpretation 54ms
	let-to-have transformation 8.61ms
	linting 1.71ms
	module linting 0.0276ms
	parsing 1.18ms
	process pre-definitions 2.1ms
	share common exprs 0.167ms
	tactic execution 5.8ms
	tacticAnalysis 1.42ms
	type checking 3.65ms
	typeclass inference 10.7ms
real 0.97
user 0.51
sys 0.56

LeanPool/CatalyticRegisters/NonVacuity.lean

import took 106ms
cumulative profiling times:
	attribute application 1.06ms
	blocked (unaccounted) 0.262ms
	compilation (IR) 0.304ms
	compilation (LCNF base) 2.2ms
	compilation (LCNF impure) 1.04ms
	compilation (LCNF mono) 1.85ms
	congr simp thm 1.8ms
	elaboration 106ms
	fix level params 0.733ms
	import 106ms
	initialization 25.2ms
	instantiate metavars 2.28ms
	interpretation 2.22ms
	let-to-have transformation 2.43ms
	linting 17.7ms
	parsing 19.1ms
	process pre-definitions 10.3ms
	share common exprs 5.44ms
	simp 85.6ms
	tactic execution 264ms
	type checking 175ms
	typeclass inference 121ms
real 1.07
user 1.12
sys 0.50

LeanPool/CatalyticRegisters/Pass2Soundness.lean

import took 107ms
cumulative profiling times:
	attribute application 1.74ms
	blocked (unaccounted) 642ms
	compilation (IR) 1.44ms
	compilation (LCNF base) 9.89ms
	compilation (LCNF impure) 6.49ms
	compilation (LCNF mono) 11.3ms
	congr simp thm 8.89ms
	elaboration 132ms
	fix level params 3.57ms
	import 107ms
	initialization 26.3ms
	instantiate metavars 7.09ms
	interpretation 2.19ms
	let-to-have transformation 1.79ms
	linting 51.8ms
	parsing 39.7ms
	process pre-definitions 29.1ms
	share common exprs 12.1ms
	simp 150ms
	tactic execution 759ms
	type checking 257ms
	typeclass inference 193ms
real 1.43
user 1.95
sys 0.54

LeanPool/CatalyticRegisters/PoweringPrograms.lean

import took 105ms
cumulative profiling times:
	attribute application 42.7ms
	compilation (IR) 1.83ms
	compilation (LCNF base) 16.5ms
	compilation (LCNF impure) 8.36ms
	compilation (LCNF mono) 15.3ms
	elaboration 139ms
	fix level params 0.1ms
	import 105ms
	initialization 30.4ms
	instantiate metavars 0.51ms
	interpretation 2.2ms
	let-to-have transformation 0.11ms
	linting 4.41ms
	parsing 5.85ms
	process pre-definitions 3.77ms
	share common exprs 0.629ms
	type checking 30.6ms
	typeclass inference 25.1ms
real 0.91
user 0.63
sys 0.48

LeanPool/CatalyticRegisters/PrimeFieldTools.lean

import took 106ms
cumulative profiling times:
	attribute application 3.16ms
	blocked (unaccounted) 102ms
	compilation (IR) 1.05ms
	compilation (LCNF base) 8.8ms
	compilation (LCNF impure) 3.94ms
	compilation (LCNF mono) 6.09ms
	congr simp thm 6.84ms
	elaboration 162ms
	fix level params 2.72ms
	import 106ms
	initialization 25.2ms
	instantiate metavars 12.4ms
	interpretation 2.21ms
	let-to-have transformation 1.15ms
	linting 89.6ms
	parsing 66.2ms
	process pre-definitions 61.3ms
	share common exprs 20.9ms
	simp 228ms
	tactic execution 1.54s
	type checking 832ms
	typeclass inference 327ms
real 2.18
user 3.58
sys 0.55

LeanPool/CatalyticRegisters/SymbolicExecution.lean

import took 106ms
cumulative profiling times:
	attribute application 0.329ms
	blocked (unaccounted) 3.94ms
	compilation (IR) 1.88ms
	compilation (LCNF base) 18.8ms
	compilation (LCNF impure) 9.09ms
	compilation (LCNF mono) 14.7ms
	congr simp thm 5.94ms
	elaboration 119ms
	fix level params 2.98ms
	import 106ms
	initialization 25.4ms
	instantiate metavars 5.04ms
	interpretation 2.2ms
	let-to-have transformation 1.9ms
	linting 26.8ms
	parsing 21.7ms
	process pre-definitions 29.7ms
	share common exprs 7.91ms
	simp 239ms
	tactic execution 428ms
	type checking 47ms
	typeclass inference 75.6ms
real 1.07
user 1.41
sys 0.52

LeanPool/CatalyticRegisters/ThreeRegisterBreakthrough.lean

import took 105ms
cumulative profiling times:
	attribute application 0.0558ms
	elaboration 47.7ms
	fix level params 0.308ms
	import 105ms
	initialization 25.2ms
	instantiate metavars 0.905ms
	interpretation 2.18ms
	let-to-have transformation 0.108ms
	linting 4.85ms
	parsing 4.08ms
	process pre-definitions 2ms
	share common exprs 1.32ms
	tactic execution 105ms
	type checking 46ms
	typeclass inference 165ms
real 1.04
user 0.68
sys 0.50

Advisory only — never blocks merge. Full log uploaded as the proof-profile artifact.

@Vilin97

Vilin97 commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator Author

Request changes on the original acquisition head.

Correction after checking the first configured review

The original acquisition review missed the work-register pool conditions in the project card, the composition-lemma attribution, and the characteristic hypothesis for Vinciguerra’s baseline. Those issues require a card and source-doc update. The mathematical and trust observations below describe the original head.

Faithfulness and significance

Catalytic.rp_pass_two_iff quantifies over a prime, an access budget of at least one, and a finite coefficient list. CleanlyComputes2 requires both affine work-register shifts to vanish and compares every formal output coefficient. The lower bound and the construction therefore concern formal polynomial cleanliness with prime-field constants. The clean-execution bridge and the finite-extension examples make that distinction reusable.

Catalytic.four_reg_powering_x13 uses explicit inverses for the certificate coefficient, 12 factorial, and the factorial of the digit length, and its conclusion includes the access inequality and restoration of all three work registers. The accompanying symbolic certificate is checked by Lean. The Lean balanced product result specifies the register-pool size and distinctness, and the separate length theorem supplies the exact primitive count. The original project card omits those hypotheses. These are substantive constructive results in the stated register model.

Novelty and sources

The pinned upstream modules, archived manuscript, and Vinciguerra's formal model establish the mathematical scope. Two Lean module notes need the citation corrections described above. The finite characteristic classifier, primitive access semantics and verified composition are distinct from the pool's existing arithmetic circuit results. I found no matching project in the pool, Mathlib or Tau Ceti. The card credits Donahue and records the upstream AI proof contribution. The imported files carry Apache-2.0 headers and change notices. Pinned upstream · Manuscript · Register model

Code and trust

The diff contains the mathematical dependency closure, the project wrapper, and the card. Independent certificate modules preserve the five program lists and send their checked equalities through the same symbolic-execution soundness lemma. The four-element-field refactor uses distributivity, associativity and commutativity to prove the same invariant and removes the large case split. The Mathlib adapter gives callers access to the generic ring theorems.

The warning-as-error build, index check, style check, and scoped Mathlib, declaration, axiom, backdoor and compiler-message audits passed locally. A clean build with warm pinned dependencies took 10.49 s before and 7.13 s after. Every changed Lean file met the local per-file timing and memory limits.

GitHub checks

This review covers head 17f6796bba18b9ce5a39d29dc59c8e84872067cc. Content separation passed and the documentation preflight was scoped out for the content-only diff. Lean Action CI is building the pool. Greptile classified the repeated work-register induction as advisory. Lean Action CI

@Vilin97 Vilin97 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scope corrections needed at 17f6796bba18b9ce5a39d29dc59c8e84872067cc.

  • rp_pass_two_iff classifies formal polynomial identities with prime-field constants. The exported docstrings still describe the 𝔽₄ model as the literal Vinciguerra model and say the two-access result collapses characteristic-zero theorems. The instruction set comes from Definition 2.2, which defines cleanliness by pointwise execution. Over 𝔽₂, one access can add x³ as a function since it equals x. The formal polynomial remains excluded. The pinned upstream distinguishes these claims. Upstream limitations
  • The three- and four-register theorems correctly require specific coefficients and factorials to be units. Some docstrings equate those conditions with restrictions on the ring's characteristic. For example, ℤ has characteristic zero and 6! is not a unit. The corrections are confined to documentation and the project card.

@Vilin97

Vilin97 commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator Author

🤖 LLM review (gpt-6.2-sol, 5 rubrics)

Reviewed head: 0814560f1426e2cbaae463bf89fdbdf9ee068ff6

Verdict: ✅ approve — computed from the rubric verdicts below, not chosen by a model.

Rubric Verdict Bottom line
Faithfulness ✅ pass All five card results match the Lean and all 20 project modules compiled locally, with exact-head CI details unavailable.
Novelty ✅ pass The pinned Mathlib and Tau Ceti source searches and the pool comparison found no duplicate of the five headlines, with exhaustive semantic coverage still unverifiable and CI still in progress for this head. Lean Action CI
Significance ✅ pass The exact two-register classification warrants pooling, and all 20 project modules passed a targeted warning-as-error Lake build while the remote Build pool job remained in progress. Build pool job
Sources ✅ pass Donahue’s corrected manuscript supports the prime-field classifier, four-register powering, and balanced-product results, and the import credits the upstream Lean development. Pinned manuscript
Code quality (advisory) ⚠️ flag Evaluator timeouts and duplicated soundness proofs warrant an advisory flag. All 20 added Lean modules compiled and passed declaration lint locally, and the combined CI status remains pending despite the successful project build.
Aspect Value
Proves the claim ✅ proves_it
Assumed, not proved The card states primality and t ≥ 1. Radix-13 powering assumes N ≥ 1 and requires units for the certificate coefficient, 12!, and the factorial of the base-13 digit count in the coefficient ring. The card discloses the unit conditions by reference. Clean balanced execution requires distinct work registers disjoint from the target. Both balanced-program theorems require at least k + 1 pool entries at positive depth and allow an empty pool at depth zero, as stated in the card.
Matches cited source ✅ matches
Fit ✅ good_fit
Level research
Branch algebraic complexity theory
Mode theory_building
Code quality 2 / 5

Statement check: The classifier uses formal coefficient equality modulo the prime and gives the exact digit-sum criterion for every nonzero coefficient of degree at least two.

rp_pass_two_iff gives an exact base-p digit-sum criterion for the nonlinear terms of formal polynomials computable with two passive registers over prime fields, and the project develops extension-field separations, clean powering and balanced products, with the powering certificates replaying 35 coefficient rows (0.43% of 8,077 added Lean lines) that I reproduced using the pinned upstream rational solver.

Faithfulness findings (2)

  • unexercised-predicate — LeanPool/CatalyticRegisters/BilinearFrobenius.lean:61
    The public strict-validity predicate on BilinInstr has no consuming theorem or witness in the PR. The Frobenius validity theorem uses the weaker predicate. Add a checked distinct-operand multiplication and a rejected square to cover the extra condition.
    Evidence: public def BilinInstr.isStrictDistinctPassive {n : Nat} : BilinInstr n → Prop defines | .mulAdd dst a b => dst ≠ a ∧ dst ≠ b ∧ a ≠ b ∧ a.val ≠ 0 ∧ b.val ≠ 0. The conclusion of frobBilinProg_valid is ∀ instr ∈ frobBilinProg k hk, instr.isValidPassive only.
  • prompt-injection — PR-wide
    The PR discussion requests a disposition for the original acquisition head and reproduces an earlier faithfulness verdict. The current verdict comes from the declarations at the submitted head.
    Evidence: The discussion in .review-pr.json includes “Request changes on the original acquisition head.” and an earlier review table assigning Faithfulness pass.

Novelty findings (1)

  • prompt-injection — PR-wide
    The contributor’s discussion requests a disposition for an earlier head and supplies an earlier novelty verdict, which could bias the independent comparison for this head.
    Evidence: In .review-pr.json, one contributor comment opens with ‘Request changes on the original acquisition head.’ and asserts ‘I found no matching project in the pool, Mathlib or Tau Ceti.’ Another contributor comment reproduces the earlier head’s novelty pass.

Significance findings (1)

  • prompt-injection — PR-wide
    The PR author’s discussion supplies a requested disposition and a significance verdict for an earlier head, which could bias review of the current Lean. Assess the current head independently.
    Evidence: In .review-pr.json, the author writes “Request changes on the original acquisition head.” and separately posts a prior-head rubric table with | Significance | ✅ pass |.

Sources findings (1)

  • citation-link — LeanPool/projects/catalytic-registers.yaml:15
    The exposition page links the manuscript title to the pinned repository tree. Link the title directly to the verified PDF so readers land on the cited statements and can check their hypotheses.
    Evidence: The entry module says The project card cites the corrected manuscript at that commit. The card names Catalytic.balancedProdProg_clean, whose hypotheses include (hpool : k = 0 ∨ k + 1 ≤ pool.length) and (hnd : (target :: pool).Nodup). The pinned PDF gives the matching register count in Theorem 1.4 and its proof.

Code quality findings (7)

  • runtime-complexity — LeanPool/CatalyticRegisters/BalancedProduct.lean:53
    Reading a register can replay earlier updates because each instruction wraps the previous state in a closure. The same pattern appears in both bilinear interpreters. In a local run, reading the target of the 148-instruction balanced product over F2 timed out after eight seconds. A scratch evaluator that stored each update returned the result in one millisecond. Prove an eager evaluator equivalent to the current semantics and use it for compiled execution.
    Evidence: CatOp.exec returns fun r => if r = dst then st dst + CRing.intCast s * (st a * st b) else st r. BilinInstr.exec and DistinctBilinInstr.exec both use | .mulAdd dst a b => fun i => if i = dst then st dst + st a * st b else st i.
  • runtime-complexity — LeanPool/CatalyticRegisters/PrimeFieldTools.lean:209
    The two-register symbolic evaluators call Pascal recursion without sharing overlapping subproblems. Extracting the middle coefficient of degree 24 through polyAtShiftCoeff timed out after 12 seconds. A scratch factorial-quotient implementation, proved equal to choose using choose_mul_fact, returned the coefficient in under one millisecond. Use a proved compiler rewrite to preserve the existing proof equations and speed up evaluation.
    Evidence: def choose : Nat → Nat → Nat recurses with | n + 1, k + 1 => choose n k + choose n (k + 1). polyAtShiftCoeff uses choose k d and choose d dx, and binomGF4 uses choose n k % 2.
  • duplicate-definition — LeanPool/CatalyticRegisters/Pass2Soundness.lean:359
    The prime-field and GF4 bridges repeat the instruction interpreter, degree bound, and four-case soundness induction. A change to coefficient evaluation or instruction semantics requires parallel edits. Share the instruction shape and literal evaluator over a coefficient type, and state the common soundness steps in terms of how the coefficient map handles addition and multiplication.
    Evidence: Pass2Prog.execRing_from_eq_evalState2 and Pass2GF4Prog.execAlg_from_eq_evalState2GF4 both apply rw [← sumR_add] at each of two sum levels in the output-update branch, then close the inner step with rw [natCast_mod_eq hchar, CRing.natCast_add, CRing.right_distrib] and rw [φ.map_add, CRing.right_distrib], respectively.
  • duplicate-proof — LeanPool/CatalyticRegisters/DigitSumDichotomy.lean:673
    Both induction cases reprove that a zero constant shift selects the coefficient at the requested total degree. The GF4 degree-three and degree-five proofs repeat that argument by expanding each coefficient list by hand. Factor out the zero-shift identity for an arbitrary list and use it at all four sites.
    Evidence: buildShiftSteps_exec repeats have hsingle : sumNat (polyAt 0).length and have hsingle : sumNat (polyAt (k + 1)).length with the same index split. In ExtensionFieldSeparation.lean, polyAtShiftCoeffGF4_mono5_ne proves polyAtShiftCoeffGF4 [.z, .z, .z, .z, .z, c] .z a dR dx = .z, and polyAtShiftCoeffGF4_mono3_ne proves polyAtShiftCoeffGF4 [.z, .z, .z, .one] .z a dR dx = .z.
  • incomplete-adapter — LeanPool/CatalyticRegisters/MathlibRing.lean:37
    The adapter supplies a rewrite for powers but leaves Mathlib callers to bridge both casts before they can discharge the powering hypotheses with ordinary ring arithmetic. Add natural- and integer-cast simp lemmas alongside CRing.pow_ofCommRing. Scratch lemmas using the existing imports let simpa discharge the radix-13 coefficient hypothesis from its Mathlib-cast form.
    Evidence: CRing.pow_ofCommRing states @CRing.pow R (CRing.ofCommRing R) x n = x ^ n. four_reg_powering_x13 takes (hD8 : invD8 * CRing.intCast 2656207148788801777680 = 1) and (hF12 : invFact12 * CRing.natCast (fact 12) = 1).
  • unused-proof-code — LeanPool/CatalyticRegisters/DigitSumDichotomy.lean:188
    Remove the two unreferenced private lemmas and the two unused premises. fdWeight_sum_pow also needs only positivity of the modulus. Scratch copies of both modules compiled after these removals and the corresponding call-site adjustments.
    Evidence: private theorem evalPairsInt_congr_mod and private theorem DistinctBilinProg.basicOps_append have no callers. fdWeight_sum_pow takes (_hs : s < p) and uses (hp : IsPrime p) only through hp.pos. buildShiftSteps_exec takes (_hp : 0 < p).
  • prompt-injection — PR-wide
    The contributor’s discussion asks for a disposition on an earlier head. The current advisory verdict comes from the submitted Lean and the checks for this revision.
    Evidence: The contributor’s comment in .review-pr.json opens with “Request changes on the original acquisition head.”

Tokens: 20,280,810 in / 72,710 out across 5 model calls · Tier: codex-subscription · Effort: xhigh · Billing: Codex subscription quota (no API credits) · Estimated cost: $82.2139 (Standard API equivalent; uncached input)
Each rubric is an independent review against .github/review-rubrics/ on top of .github/REVIEW_RULES.md. Disagree? Reply on the PR; rules can be updated in a PR of their own.

CI was not green for this commit at review time; this review does not replace CI.

@Vilin97

Vilin97 commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator Author

/review

Repairs on this head

  • The card now gives the positive-depth pool-size bound and the distinctness and disjointness conditions for clean execution. It identifies the empty-pool base case and cites the separate theorem identifying generated program length with the exact instruction count.
  • The four-register module now credits Alekseev et al., MFCS 2025, Lemma 8 for its non-passive composition and identifies Vinciguerra’s Lemma 2.2 as the passive variant. The symbolic-execution module states the field characteristics in Vinciguerra’s Theorem 2.3. MFCS paper · Vinciguerra
  • A private lemma now handles the four work-register inductions Greptile identified. The exponent bounds reuse the pinned Nat lemmas, and the witness module reuses IsPrime.two.
  • Compiled natural-number casts use binary doubling with a Lean proof of equality to the original cast. A scratch execution of prog9Power15 over the integers checked the output and restoration with nonzero initial registers. The existing theorem statements are unchanged.

The warning-as-error project build, index and text-style checks, static quality, and scoped Mathlib and trust audits passed locally.

@Vilin97 Vilin97 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation corrections remain at 494156966187cd15edbfe5078ebcb5da6f404a97.

  • The new balanced-product card text gives the register assumptions and separates the program-length theorem from the arithmetic count. The binary cast is proved equal to the original cast, preserving the meaning of the supplied powering programs.
  • The earlier scope finding still applies. DigitSumDichotomy.lean and ExtensionFieldSeparation.lean should distinguish formal identities from pointwise execution. In particular, the characteristic-zero bounds do not extend to this model, and one read of x adds x³ pointwise on 𝔽₂. Upstream limitations
  • The generic powering theorem docstrings should state the required units. The characteristic examples apply to fields, and the theorems themselves already have the correct hypotheses.

@Vilin97

Vilin97 commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator Author

/review

Source corrections on this head

  • The card uses the corrected title and manuscript from the pinned source commit. The project entry labels Zenodo 24517199 as the historical v1.0.1 deposit. The corrected balanced-product proof uses the pool size required by the Lean construction. Pinned manuscript · Upstream errata
  • The digit-sum and bilinear notes state the scope of the characteristic-zero results. The fixed-monomial result is labeled a large-characteristic analogue of Theorem 3.5. Vinciguerra, Section 3
  • The radix-7 example specifies characteristic-zero fields and prime fields above the factorial threshold. The Lean statement keeps the two invertibility hypotheses for commutative rings.

The project build, generated index, text style, and scoped Mathlib and trust checks passed locally. The Lean declarations and proofs are unchanged from the first follow-up head.

@Vilin97 Vilin97 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Three documentation corrections remain at 0814560f1426e2cbaae463bf89fdbdf9ee068ff6.

The corrected manuscript, characteristic-zero comparisons, and radix-7 field examples now match their sources. The Lean declarations are unchanged from the previous commit.

  • The extension-field overview still describes the formal model as literal Definition 2.2 and restates the classifier without t ≥ 1. The instruction set comes from that definition. Cleanliness in this formalization is a coefficient-wise identity. For example, x⁷ = x pointwise on 𝔽₄, so the formal exclusion of x⁷ does not carry over to functions. The same distinction applies to the x³ impossibility docstring over 𝔽₂. Upstream limitations
  • The two three-register docstrings still equate unit conditions with characteristic exclusions for arbitrary rings. For example, 576 is not a unit in ℤ. The Lean hypotheses correctly require units.

@Vilin97

Vilin97 commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator Author

Approve.

Faithfulness and sources

The prime-field classifier concerns formal polynomial coefficients and vanishing work-register shifts. The four-register construction proves its access bound with explicit inverses for the certificate coefficient and both factorials. The balanced product card states the register-pool size and distinctness conditions and cites the separate program-length theorem. The five powering witnesses are checked by sparse integer polynomial evaluation in Lean.

The original documentation review missed the pool conditions and several citation defects. The revised card pins Donahue's corrected manuscript, with the older Zenodo deposit identified in the entry module. The source notes distinguish Alekseev et al.'s unrestricted composition, Vinciguerra's passive variant, and the large-characteristic analogue of his characteristic-zero bound. Both powering variants retain the necessary factorial-unit hypotheses. Pinned manuscript · Errata

Scope, code, and trust

The formal prime-field classification and exact register constructions add results beyond the existing arithmetic circuit library. The diff contains ten upstream mathematical modules reorganized into 20 pool modules. It records Donahue's Apache-2.0 source and the documented AI proof provenance. The ring adapter preserves the original model. The kernel checks the five independent certificates, and the compiled binary cast is proved equal to the original cast. A scratch execution of the fifteen-power program checked the output and both restored registers. The shared work-register invariant addresses Greptile's duplication finding.

The warning-as-error project build, generated index, text style, static quality, Mathlib lint, and declaration, axiom, backdoor and compiler-message audits passed. Matched clean measurements after the proof and execution repairs were 13.82 s and 9.86 s with warm pinned dependencies. All 20 files passed the watchdog. The source corrections and direct manuscript link leave the Lean declarations and proofs as they were in that measured revision.

GitHub checks

This review covers head 222c2db90986d533ffbdbaadae4693c45e79ef4d. Since the configured approval at 0814560f1426e2cbaae463bf89fdbdf9ee068ff6, only the manuscript URL and the synchronized entry docstring changed. The exposition payload selects the pinned PDF. The required Lean and content separation checks passed on the current head. Configured review · Lean Action CI

@Vilin97
Vilin97 added this pull request to the merge queue Nov 27, 2026
Merged via the queue into main with commit ec62f98 Nov 27, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant