Self-contained proof sharing#
The arithmetic library reached a point where proof composition, rather than arithmetic, was the limiting resource. If a closed dependency proof is copied into every place where its hypothesis is used, a short modular script can expand into a large tree. More seriously, doing that copying correctly requires capture-sensitive substitution through implication, disjunction, existential, universal, and induction scopes.
Peano Lab addresses this with one small, explicit sharing boundary. The solution changes how proof certificates are represented; it does not change what first-order Peano arithmetic can say or prove.
The rule#
The certificate constructor is
Cut(A, B, lemma, body)
and its checking rule is
The four fields are all necessary:
Ais the proposition established by the lemma;Bis the conclusion of the whole node;lemmais a complete proof checked in the ambient context \(\Gamma\);bodyis checked with \(A\) added as hypothesis zero.
The conclusion annotation matters because Peano Lab’s checker is
bidirectional. An elimination often synthesizes its result, while an
introduction such as implication or universal introduction normally needs a
known target. Storing B lets the checker validate an introduction-shaped
body without asking an untrusted caller to infer it. The annotation supplies
no authority: a mismatch between B and the body is rejected.
The same logic-mode flag is used in both branches. A classical lemma cannot be smuggled into an intuitionistic body, and an intuitionistic Cut does not add double-negation elimination.
Dense DAGs: layered lexical sharing#
Per-theorem recursive replay works well for the checked arithmetic library, but a dense dependency DAG can revisit the same ancestor along many paths. The quadratic-reciprocity graph makes the distinction exact: 557 unique specifications and 1,787 direct edges expand to 191,648 theorem occurrences. The forced Cuts, one node per occurrence, and recorded leading introductions alone give a 731,423-node lower bound, beyond the 500,000-node policy. See the hotspot audit.
The preferred unchanged-kernel compiler groups each dependency-depth layer
into a balanced conjunction. Each dependency-curried theorem body occurs
once, later bodies obtain earlier theorems through ordinary AndElimL and
AndElimR, and one existing contextual Cut introduces each package. For QR
this yields a 45-Cut spine. The result is still the ordinary judgment
not a theorem reference or a new checker case. The complete WMI certificate and admission gates remain pending. The construction and synthetic comparison are documented in the layered-bundle design.
Why this is not a theorem oracle#
A theorem oracle would let the checker accept a name, hash, database row, or external callback as evidence. Cut does none of those things. It contains its own formula, lemma proof, conclusion, and body proof. The checker has all the data needed for one self-contained invocation.
Consequently:
a renamed theorem changes no checking rule;
a content hash can detect drift but can never establish truth;
the library and UI remain untrusted name-resolution layers;
a forged lemma branch is rejected when that branch is checked;
a forged body or conclusion annotation is rejected independently.
The trusted base nevertheless did grow. Cut is a kernel proof constructor,
and the checker has a case implementing the displayed rule. Calling it
“derived” explains its mathematical conservativity; it does not move the
implementation outside the soundness boundary. The constructor and checker
case therefore require the same review, mutation tests, malformed-input tests,
and classical-mode tests as every other trusted rule.
What did not change#
Natural-number terms are still built only from \(0\), successor, addition, and multiplication. Formulas still use equality, the first-order connectives, and quantifiers. PA1–PA6 and formula-specific induction are unchanged. No primitive division, gcd, prime predicate, sequence type, product function, or factorization axiom was added.
Proof sharing therefore cannot replace any mathematical rung in the dependency ladder. It makes those rungs practical to compose while leaving their fully expanded first-order statements intact.
Local reasoning remains administrative#
The surface tactics have h : P and suffices h : P are not direct Cut
constructors. They use engine-only LocalHave and LocalSuffices nodes to
schedule two open goals in opposite orders. Before QED, an untrusted
capture-avoiding compiler removes those nodes by proof-hypothesis
substitution. The trusted checker never accepts either administrative class.
This separation is intentional. A library dependency is already a closed, rechecked certificate suited to lexical sharing. A local claim is still being constructed and must retain the established live-goal, undo, and transaction semantics.
The reducer’s public normalization pass reflects this distinction: it contracts implication and universal beta redexes and eliminates the two local schedulers, but preserves trusted Cut nodes.
The resulting trust path#
For a library theorem, the path is now
Only the last arrow grants theorem authority. For the surrounding distinctions between notation, object language, and certificate representation, continue with Language, notation, and trust.