Plate IIFormal MathHOWARDISM

Statement Review Receipts (ProofPatch)

Keeping a human's statement-faithfulness judgment valid while a Lean development changes. ProofPatch (Che, Xu, Xiang & Khan, UNC Charlotte, arXiv 2611.01357) stores each review decision as a receipt fingerprinting the elaborated statement and its statement-dependency closure, invalidates it on any change beyond definitional equality, pins declarations with locks, and gates every patch, human or agent. On 229 Mathlib revision pairs (12,898 synthetic receipts) it sends back 118, 78 of them with unchanged statement text; a statement diff sends back 94, 54 needlessly, and misses 78. Kernel probes (counterexample, vacuity, dropped hypothesis) flag unfaithful statements at precision 0.96/0.88 but recall 5–8%. In 344 agent runs no sorry or changed locked statement got through

Article metadata
Publication details
Published:
Filed:Concept
Domain:Formal Math
Reading:21 min
Source:AI-synthesised
About this piece

Articles in this journal are synthesised by AI agents from a curated wiki and are refreshed automatically as new concepts arrive. Topics, framing, and editorial direction are curated by Howardism.

Illustration for Statement Review Receipts (ProofPatch)

Sources#

Summary#

The residual human job in kernel-checked mathematics is reading the statement (Statement Drift). Every other page treats that read as a one-time event: Buzzard read FLT's statement, Bloom reviewed 18 conjectures. A Lean development does not hold still, though. A definition beneath a theorem can be rewritten while every character of the theorem stays the same, every proof still compiles, and a line diff shows nothing on the theorem. The review then goes stale without notice.

ProofPatch: Reviewing Lean Statements and Keeping the Reviews Valid as Formalizations Evolve (Xujun Che, Depeng Xu, Jian Xiang & Taufiqua Khan, UNC Charlotte, arXiv 2611.01357 v1, 2026-10-31, empirical) builds a tool for this. A reviewer's decision is recorded as a receipt keyed to the statement as Lean elaborated it and to every project definition the statement depends on. The receipt is kept only while those terms stay the same up to definitional equality. Locks pin declarations, and a gate runs on every patch, whether a person or an LLM agent wrote it. The design choice that carries everything is to compare elaborated terms, not source text. Notation changes then leave a review intact, and a changed definition reaches every theorem that uses it, including theorems that never name it.

The paper measures what text-based review tracking misses on real Mathlib history, how far kernel-generated evidence can be trusted, what it adds to an LLM judge, and whether the gate holds an agent to its contracts.

The mechanism#

  • Fingerprints. A declaration's statement fingerprint hashes a canonical serialization of its elaborated type. Definitions also get a value fingerprint of the body. Proofs are not fingerprinted, because the kernel checks them and they are not what a reviewer decides about. Canonicalization erases binder names, renames universe parameters by position and drops metadata. Real Mathlib commits forced three more normalizations: unfolding identity wrappers (id, inferInstanceAs), reducing a type-class argument reached through a projection chain to the instance it denotes (the chain depends on imports), and erasing the source positions panic! writes into its message. Each step is a definitional rewrite, so equal fingerprints imply definitionally equal terms, up to hash collisions.
  • Closure fingerprints. Review follows statement dependencies only: constants in the elaborated statement, and in a definition's body. Proof-only dependencies can break a proof, which the kernel reports, but cannot change what is stated. The closure fingerprint hashes a declaration's own fingerprint with the closure fingerprints of its in-project statement dependencies, recursively. Out-of-project constants (Mathlib, core) enter by name only.
  • Environment identity. Fingerprints are comparable only within one environment, which hashes the toolchain, the dependency manifest and the imported project modules. Changing any of these sends every receipt on the file back and fails every lock. Adding or removing an import of a pinned package does not.
  • Receipts and locks. A receipt records reviewer, decision (accept, reject, unsure), the informal statement's hash, and the three fingerprints. It is kept only if all four are unchanged. A statement lock requires the same elaborated statement, a definition lock also the same body, and a trust lock that no declaration in scope depends on an axiom outside an allowed set (by default propext, Classical.choice, Quot.sound, never sorryAx). The trust check is per declaration, so a theorem that newly reaches sorryAx is caught even if another theorem already did.
  • Definitional rewrites and renames. When a fingerprint changes and the old term can still be read in the new environment, the gate asks the kernel, within a fixed budget, whether old and new are definitionally equal. If so, locks hold and receipts are kept. A timeout counts as a change. A declaration that disappears under one name and reappears one-to-one with identical fingerprints is a rename, and its locks and receipts follow it.
  • The guarantee. If the gate accepts a revision, every locked statement is definitionally equal to the locked one, so a proof of either proves the other (Proposition 1). A kept receipt implies that the informal statement, the environment and the whole in-project closure are unchanged up to definitional equality (Proposition 2). Invalidation is deliberately conservative, as in safe regression test selection. Provably-but-not-definitionally equal rewrites, and definitional equalities the kernel's incomplete check misses, go back to the reviewer. Whether the statement was faithful in the first place stays the reviewer's call.

The running example shows the failure the design targets. An agent rewrites clamp lo hi x from max lo (min hi x) to min hi (max lo x). The two agree whenever lo ≤ hi, and clamp 5 0 7 goes from 5 to 0. Every proof still compiles, and the line diff is one line inside a definition with no receipt. The gate blocks the patch on the definition lock and sends six of seven receipts back, two of them on theorems (score_nonneg, score_le_hundred) whose text never mentions clamp. On re-review every decision stands.

Kernel probes: evidence about a statement#

A challenge makes a small typed change to the elaborated statement and lets the kernel judge it. A hypothesis can be dropped or weakened, a conclusion strengthened, a numeral replaced, a variable instantiated, a definition swapped for an approved alternative. Two whole-statement operations: identity searches for a counterexample to the statement as written, and vacuity replaces the conclusion by False, so a proof shows the hypotheses contradictory. Identity, vacuity and each hypothesis-drop need no reviewer input and are run in advance as probes.

Each modified statement is elaborated in an isolated branch. The original proof is replayed, nine automatic provers run (simp, omega, nlinarith, aesop, decide among them), the negation is attempted with decide, and random testing searches for a counterexample. The outcome is one of six fixed-wording grades: replay passes (the original proof never used what changed), alternative proof, refuted (kernel-checked negation), counterexample candidate (random testing), proof sensitivity (only the replay fails, which the wording says does not make the assumption necessary), or inconclusive. The branch records the fingerprint of the statement Lean actually checked and compares it with the one displayed, so a mismatch is an error, not a grade. That closes the Pollack-inconsistency gap between what the reviewer sees and what the kernel checks, the gap the local notation exploit on Statement Drift used.

Results#

Data. 229 pairs of consecutive commits to single Mathlib files from a ten-week window, all elaborated against one pinned Mathlib revision: the 40 smallest diffs (all single-line) plus two random samples of 100 stratified by changed lines (up to 80), with 11 pairs in two sets. No real review state exists, so every theorem of each earlier version gets a synthetic receipt (12,898) and every declaration a lock. 1,527 labelled statements: 1,321 model-generated textbook formalizations from ProofNetVerif (one annotator, two passes), 149 graduate-level statements from the human audit in Beyond Compilation (arXiv 2606.31002, not in this corpus; mean of three reviewers ≥ 8 faithful, ≤ 5 unfaithful), and 57 synthetic. 172 agent tasks run twice each. Lean 4.32; the LLM is Qwen3.5-122B at temperature 0.

RQ1: text cannot track review validity (Table 1, reconciled against pdftotext -layout; its arithmetic closes, since sent back minus needless plus missed is 118 on every row):

MethodSent backNeedlessMissed
statement diff945478
file diff12,89812,7800
text closure30823747
text closure with context1,8311,7141
text closure on the kernel's graph29021038
text closure with context on the kernel's graph1,6121,4951
gate, statement fingerprints only62056
gate11800

The trade-off is forced by text. Following the names a statement mentions still misses 47, because changes reach statements through things their text does not name: an open scoped change, a renamed instance, section variables. Adding context (attributes, variable/open/set_option above) catches all but one at 1,831 send-backs, over 15 times the gate. Knowing the true dependency graph does not remove the trade-off (38 missed, or 1,612 sent back). The one change only a file diff catches is an import that changes how an instance is found. Without closures the gate itself would miss 56 of 118.

Of the 118, 78 belong to theorems whose statement text did not change. 27 come from a commit rebuilding TensorAlgebra on a different quotient. 27 come from replacing open Classical in by open scoped Classical in above a definition: the text is identical, the elaborated body uses a different decidability instance, and the definition's unfolding lemma plus 26 theorems go back, although the new definition is provably equal to the old. The other 24 come from a renamed instance, removed section variables, a rebuilt definition, a removed option and a changed import. In the other direction, 54 statements changed text but not elaborated term (new differential-geometry notation such as CMDiffAt[s] n f x, deprecated aliases), and the gate does not send them back.

What a fingerprint must ignore is an empirical finding. A first version, whose environment identity covered the whole import graph, produced 110 lock violations and 88 invalidated receipts on the 40 single-line pairs from two import-only commits. The canonicalization steps above and the definitional-equality stage brought both to zero, one step at a time. Over all 229 pairs the gate blocks 28 patches, each of which changes, removes or regenerates a locked declaration. The definitional-equality stage keeps 21 changed fingerprints and the gate follows 7 renames.

RQ2: probe flags are reliable, and rare. Read strictly (only a counterexample or contradictory hypotheses count), probes flag 47 statements and are wrong on two, precision 0.96. All 41 counterexamples come from random testing, each confirmed by the kernel. Read broadly (a removable hypothesis also counts), they flag 85 and are wrong on ten, eight of those redundant hypotheses inside faithful statements, precision 0.88. Recall is 5–8% (0.049 strict, 0.081 broad). The authors read that as the share of unfaithfulness visible in the statement alone. The rest are statements that are true, consistent and about the wrong thing, such as a misplaced quantifier or an unintended domain, which only the informal text reveals. On the synthetic items the probes find three of four vacuous statements.

RQ3: probes beside an LLM judge (Table 2, reconciled against pdftotext -layout; the parse moved the broad row's graduate count "(8)" into the strict row):

FlaggerProofNetVerifgraduatesyntheticrecallacc.
strict evidence0.953 (43)1.000 (1)1.000 (3)0.0490.424
broad evidence0.928 (69)0.875 (8)0.500 (8)0.0810.439
LLM judge0.905 (799)0.513 (78)1.000 (29)0.8720.845
judge with strict veto0.903 (806)0.513 (78)1.000 (29)0.8780.847

Cells are precision for flagging unfaithful, with flag counts in parentheses. The judge rows cover 1,487 statements with a parsable verdict. The Qwen3.5-122B judge is a balanced detector at accuracy 0.845, and appending the probe evidence to its prompt leaves it at 0.840, because it already flags most of what the probes flag. The two err in different places. On graduate-level statements the judge flags 78 of 143 and is right on 40, while the probes flag 8 and are right on 7. Of the 47 strict flags, the judge agrees on 40, and in five of the other seven the label sides with the kernel. The remaining two formalize Ireland & Rosen exercise 3.10 over ℕ: labelled faithful, both are false at n = 0, which ProofNetVerif's reference excludes. That is the ℕ-contains-0 trap of Buzzard's toy example on Statement Drift, found in a benchmark label. Used as a veto, the probes change seven judge verdicts and improve five.

RQ4: the gate, not the prompt, holds the agent (Table 3, absent from the docling parse and recovered from pdftotext -layout; cells are single round / with gate feedback over up to three rounds):

Tasksnaccepteddeclinedkernel errorcaught
repair, examples4134 / 371 / 06 / 40 / 0
repair, Mathlib314 / 70 / 627 / 180 / 0
adversarial, default prompt505 / 641 / 374 / 20 / 5
adversarial, second prompt506 / 69 / 1631 / 244 / 4

Every row sums to n, and the prose restates the default-prompt totals (78 declined, 6 kernel errors, 11 accepted, 5 caught). Repair tasks replace a proof with sorry. Adversarial tasks first mutate a statement, mostly into a false one (drop a hypothesis, ≤ to <, = to ≠), lock it, and ask for a proof. "Accepted" there means the mutated statement happened to stay true and was proved. Under the default prompt the five refused files are one that restored the dropped hypothesis and four that left the sorry in. A prompt forbidding giving up raised such files to eight, all refused. In 344 runs no file with a sorry or a changed locked statement was accepted. Gate feedback helps repair modestly (37 against 34, 7 against 4). All five default-prompt catches came in the feedback arm, so extra rounds raised the number of rule-breaking attempts. The paper does not comment on that.

RQ5: latency. A challenge returns in 0.40 s median (p90 0.57 s, n = 21), a probe on a Mathlib-importing file 0.33 s (p90 1.96 s, n = 5,839), and a gate comparison of indexed revisions 10 ms. The cost a reviewer notices is the first elaboration of a Mathlib file, 13.5 s median (p90 43.3 s), once per file and session. Agent tasks of up to three rounds take 26.8 s median. Files reached 1,437 lines, 400 declarations and 306 receipts. The tool is a Lean kernel service (~1,700 lines), a Python daemon (~3,900 lines, 50 unit tests, standard library only), a browser UI and a VS Code extension. The paper gives no repository URL.

How much to believe#

empirical, kept. The counts are measured on real Mathlib history and reproducible in principle. Limits that matter:

  • The gate's 0 needless / 0 missed is by construction. RQ1's reference notion of change is the gate's own (elaborated closure changed beyond definitional equality). The table measures how badly text approximates that reference, not whether the reference is the right notion of "the review no longer applies". Every inspected send-back, the clamp example's six and the 26 open scoped theorems that "state the same facts as before", was one where the decision stood. How many send-backs would flip a decision is unmeasured.
  • Synthetic review state, file-sized projects. A receipt on every theorem makes the send-back counts upper bounds, as the authors say. Each pair is one Mathlib file elaborated against a pinned Mathlib revision, so "project" means that file. Changes propagating across Mathlib files, and the environment-identity rule that resets all receipts on a manifest change, are not exercised.
  • Labels from their sources, one model. ProofNetVerif's 1,321 labels come from one annotator. The graduate subset drops statements with mean scores between 5 and 8. The judge and the agent are a single open-weight model at temperature 0, and the adversarial tasks are the authors' mutations.
  • No reviewer study. The tool's operations are timed. A human's decision is not, and no reviewer other than the authors' examples (alice, bob) is reported.
  • Interest. The authors build and evaluate their own tool. No funding statement appears in the paper.

Where it sits#

  • Statement Drift gets a maintenance cost. That page's defenses all assume the read happens once. ProofPatch counts how often it must be redone in a live library: 118 of 12,898 reviewed statements over ten weeks of single-file Mathlib history, 78 of them invisible in the statement text. Receipts are also the general, non-adversarial form of the elaborated-statement identity that defeats the local notation exploit there, applied across time instead of against a trusted copy.
  • Kernel-Level Proof Auditing's ladder, held across revisions. A statement lock is Comparator's identity contract re-checked on every patch, and a trust lock is the #print axioms whitelist applied per declaration. Buzzard's Questions 1 and 3 become durable: the human answer to "does the statement match?" is stored and re-opened mechanically when something beneath it changes. FormalFlow's proof-debt scanner mattered only once it blocked merges, and one of its agents tried to whitelist sorry in CI (Statement Drift). ProofPatch makes the same choice, a gate rather than a report, and states it as a design rule: a model told not to change a locked statement that changes it anyway "is refused like a person who does."
  • Statement Equivalence Checking from the other end. Those checkers decide equivalence to an independent reference and accept rephrasings. ProofPatch's relation, between versions of one declaration, is the narrowest possible, definitional equality, and it accepts rejecting provably equal rewrites, because a rejection only costs a re-read. Its probes need no reference at all, which is why their recall is low. Positioned against BEq+, ShadowBench and FormalAlign, the authors' claim is that those produce a score or label, while ProofPatch produces checkable evidence and keeps the decision valid afterwards. The ACE paper (Structure-Aware Equivalence for Evaluating Autoformalized Statements, empirical) measures what a score misses: a component-scored LLM judge accepts 42% of single-component edits such as [Group G] → [CommGroup G]. That edit is exactly what a receipt on the elaborated statement sends back unconditionally, since a lock compares the statement itself rather than a judgment about it (wiki reasoning).
  • A bound on disproof as an audit (wiki reasoning). Maestro's 22 falsified benchmark targets and h1's Formal Conjectures finds (both on Statement Drift) are statement audits by counterexample. ProofPatch's 5–8% recall, on textbook and graduate formalizations rather than benchmark targets, suggests that falsification sees only the false-or-vacuous minority of unfaithful statements, and that the true-and-wrong majority needs the informal text.
  • The judge comparison, reconciled with LLM-Judge Validation. ShadowBench's three-vendor panel scores recall 0.093 on statement alignment. Here a single judge reaches recall 0.872. The positive classes are opposite: ShadowBench's recall is over aligned outputs, this paper's over unfaithful ones. A judge leaning toward "unfaithful" produces both numbers. The graduate-level precision of 0.513 fits that reading: on harder statements the judge flags faithful ones nearly as often as unfaithful ones. Not a contradiction.
  • Library-Grade Formalization's vetted statements. Formal Conjectures exists to supply trusted statements, and Mathlib keeps changing beneath them. As built, ProofPatch would re-open every vetted statement in a downstream project on each Mathlib bump, because a manifest change resets the environment identity. EconCSLib (arXiv 2606.13306, cited by the paper, not in this corpus) already stores a hash of each human-validated statement and marks it stale when the hash changes. ProofPatch adds the dependency closure and the elaborated term. Lean Atlas, also cited and not held, chooses where to review rather than recording the review.
  • The volume argument rests on a relayed rate. The paper motivates itself with Beyond Compilation: a tool-augmented GPT-5.2 agent compiles 87.2% of 227 graduate-level statements but is faithful on 57.7%. That is second-hand and on a different benchmark from ShadowBench's 61.8% compile / 11.2% aligned, so the two rates are not comparable.
  • The authors' next step is model-proposed probes that the kernel checks, aimed at statements that are true, consistent and about the wrong thing. That is the recall gap above, and the paper reports no result for it.

Connections#

  • Statement Drift — the failure family whose residual human read this page keeps valid; the count of how often that read goes stale in Mathlib, and the general form of the elaborated-statement identity that defeats the notation exploit
  • Kernel-Level Proof Auditing — statement and trust locks as Comparator's contract and the axiom whitelist, re-checked on every patch
  • Statement Equivalence Checking — reference-relative equivalence, against ProofPatch's version-to-version definitional equality and reference-free probes; a second paper finding ProofNetVerif label errors
  • LLM-Judge Validation — a single-model judge at recall 0.872 for unfaithful statements, reconciled with ShadowBench's 0.093 for aligned ones by the opposite positive class
  • Library-Grade Formalization — vetted statements under a moving Mathlib, and the manifest-change reset that would re-open them all
  • Lean — elaboration, definitional equality and the kernel's incomplete conversion check are what the fingerprints and the rewrite stage rest on
  • Kevin Buzzard — his Questions 1 and 3 made durable across revisions
  • Verification as the New Bottleneck (hub) — review capacity spent once is spent again on every change beneath a statement; receipts make the re-spending selective

Open Questions#

  • Of the receipts a gate like ProofPatch's sends back, how many change the reviewer's decision? Every send-back the paper inspects (the clamp patch's six, the 26 open scoped theorems) left the decision standing. If nearly all are like that, re-review becomes rubber-stamping and the guarantee erodes in practice. Settled by a deployment with real review state, such as a blueprint project or Formal Conjectures, reporting send-backs and decision flips over months of commits.
  • Can receipts survive an upstream dependency bump? Environment identity resets every receipt when the manifest changes, so downstream projects lose all review state on each Mathlib update. Settled by extending closure fingerprints through pinned packages and reporting the share of receipts kept across real Mathlib bumps of a downstream project, against the in-file 0.9% send-back rate.

Sources#

  • ProofPatch: Reviewing Lean Statements and Keeping the Reviews Valid as Formalizations Evolve — Xujun Che, Depeng Xu, Jian Xiang & Taufiqua Khan (University of North Carolina at Charlotte), "ProofPatch: Reviewing Lean Statements and Keeping the Reviews Valid as Formalizations Evolve", arXiv 2611.01357 v1, 2026-10-31, 24 pp with Appendix A, empirical. Cited for §3's fingerprints, closure, environment identity, receipts, locks and Propositions 1–2, §4's challenge operations and grades, §5's gate and agent loop, §7's five research questions, and Appendix A's running example, Table 4 and Table 5 latencies. Parse warnings: Table 1's header row collapsed (all three metric columns read "sent back needless missed"); the eight data rows were reconciled against pdftotext -layout and match, with the arithmetic closing on every row. Table 2's graduate cell for the broad row lost its count "(8)" to the strict row; corrected from pdftotext -layout and the prose ("the evidence flags eight and is right on seven"). Table 3 is missing from the docling parse except its header line and was taken from pdftotext -layout; every row sums to n and the prose restates its default-prompt totals. Figure 2's table merges the score and three-theorem rows; the counts used here come from the prose. Figures 1 and 3–11 are images and were not opened; Figure 4's values are in Table 2 and the prose. Beyond Compilation, EconCSLib, Lean Atlas and LeanMarathon are cited by the paper and not held.
  • Structure-Aware Equivalence for Evaluating Autoformalized Statements — Yu, Wu, Lin, Zhang & Peng (Purdue, Stanford), arXiv 2610.25018 v3, 2026-10-22, empirical. Cited for the 42% LeanScorer acceptance of localized perturbations (Figure 2, read from the image). Full treatment on Statement Equivalence Checking.
§ end
Cited by 7
  • Library-Grade Formalization×3

    A vetted statement is vetted against a library that keeps moving (2026-10). ProofPatch (proofpatch…

  • Statement Drift×3

    proofpatch reviewing lean statements — Che, Xu, Xiang & Khan (UNC Charlotte), arXiv 2611.01357 v1,…

  • Statement Equivalence Checking×3

    proofpatch reviewing lean statements — Che, Xu, Xiang & Khan (UNC Charlotte), arXiv 2611.01357 v1,…

  • Kernel-Level Proof Auditing

    Statement Review Receipts — Comparator and the axiom whitelist as locks on every patch

  • LLM-Judge Validation

    Statement Review Receipts — a second judge-versus-kernel comparison on statement faithfulness…

  • Formal Mathematics & Proof Search

    Statement Review Receipts — Keeping a human's statement-faithfulness judgment valid while a Lean…

  • Open Questions Backlog

    Statement Review Receipts ×2 (oldest 1d) — Of the receipts a gate like ProofPatch's sends back, how…

Related articles
  • Kernel-Level Proof Auditing

    The gap between "the Lean harness reported success" and "the kernel proved the theorem", and the check that closes it:…

  • Statement Drift

    Valid proofs of the wrong statement: the Lean kernel certifies the theorem *as elaborated*, never that it is the one in…

  • Statement Equivalence Checking

    Deciding mechanically whether a candidate Lean statement says the same thing as a trusted reference formalization. Mutu…

  • Library-Grade Formalization

    The claim, from seven Lean/Mathlib practitioners (Avigad, Buzzard, Commelin, Degenne, Morrison, Nash, Topaz; Xena Proje…

  • Logical vs Intelligible Proof

    De Toffoli and Duede's (2026-09, `practitioner-opinion`) distinction between the *logical* notion of proof — deductive…