Skip to content

Audit silent omission of HPE Lean axiom checks and provide an inventory repair - #1608

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
bbMisk:research/hpe-axiom-inventory-audit
Oct 14, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
bbMisk:research/hpe-axiom-inventory-audit

Conversation

@bbMisk

@bbMisk bbMisk commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Change and mathematical scope

The standalone HPE verifier can report PASS after silently losing axiom-check coverage. Removing every query makes it report 0 results. Indenting all 42 queries has the same effect, although Lean 4.21 accepts the indentation and emits their reports.

This adds a source-bound audit and a proposed inventory repair, entirely in research/hpe-axiom-inventory-audit/. The patch requires exactly the intended 42 theorem names before building, then one allowed-axiom report per name. It rejects missing, duplicate and unexpected reports. The frozen driver and Lean sources are unchanged.

Scope: verification tooling. Driver experiments substitute subprocess results; they are not HPE compiler logs or proof replays. A separate real Lean 4.21 run verifies the small syntax fixture. No invalid accepted HPE theorem, new formal lemma, supplier improvement or new kappa is established.

Review: README and limits, proposed repair, deterministic evidence.

Task and overlap

Initial main: ebedc0895eb4c06725af020bc1af165722b0a3ce. Submission base: 81e81af67714bdc8d1693b0bf5c29468b92f62ff; all 21 consumed input files are unchanged. Task formal-interface-lemma, scope key e3ffea67887eeb4c396c, changed to the verification-coverage prerequisite after overlap review. Revision 3 was read at refresh; the recorded assignment retains revision-2 provenance. Exact inputs, selection and scope are in TASK/SOURCES.

Discussion1593 tracks the claim. The final focused search covered 733 open PRs and 244 Discussion records with complete pagination and no warnings; it excludes code diffs and is not a novelty certificate.

Nearest work: PR1415, unchanged head 0d8d2c3a96346756f02563b401a042ab97198e20, audits HPE operator semantics. PR893, merged head 5d8c2e96e0624efbadb182d9ee0a09ee65b70b48, already checks exact command/report coverage for PR236. That general principle is prior work; this contribution isolates and repairs the different HPE driver.

Validation

python3.12 -I -B scripts/research_package.py --package research/hpe-axiom-inventory-audit

Passed on CPython 3.12.13:

  • 100 original/repaired driver cases, including all 42 single-query omissions and preservation of all 42 existing missing-report rejections;
  • six adversarial groups, including four weakened repairs, source/receipt/transcript corruption, overwrite refusal and read-only optimized relocation;
  • all 20 repository research-workflow tests, metadata/source pins and make selected-record-check.

Standalone CPython 3.14.6 -I -B -O replay matches the committed receipt. The actual Lean 4.21.0 three-probe fixture reproduces exactly. Its deliberate extra axiom is a negative control, not an HPE theorem dependency.

The original pinned file already contains the correct 42 queries; these tests do not refute its recorded results. No full HPE/Mathlib rebuild or selected-construction cold replay was run. Full-build compatibility remains an adoption check, and no hosted-CI success is claimed at submission.

Credit

Jeremy Kothe/jeremykothe2 (PR593) supplied the HPE verifier and formal package; DreamingOfClouds supplied PR599 and the Lemma A/G lineage. Their retained notice supplies the construction, realization and Clifford credits. Credit commdata2338/PR1415 and WeberChen8128/PR893 for the complementary audits. No code is imported from those audits.

Prepared for Hanson Sun (@bbMisk) with substantial OpenAI Codex assistance in investigation, code, tests and writing; no subagents or independent human review. Apache-2.0. Emulate was unavailable; prose was checked against sources and executed evidence under the donor's disclosure instruction.

Open next questions

Can this repair preserve the complete HPE build and all 42 actual reports? Apply the proposed patch in an isolated successor and run the original combined verifier with pinned Lean/Mathlib 4.21.0. Full dependency setup and a maintainer decision on successor source pins are required; frozen receipts remain untouched. README/TASK record this boundary.

@bbMisk

bbMisk commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

FINDING / real-toolchain compatibility of the PR1608 repair: passes on the pinned HPE sources.

This follows the PR's open full-build question and scoped claim. The actual Lean build-and-probe pipeline preserves all 42 named axiom reports after applying the exact proposed patch. No subprocess results or compiler reports were substituted.

Exact inputs and environment

  • Started from current main ee055dc44815497927ef618fc985b93c2dcbda2a.
  • Tested PR head 26e984849677a26109f2d05393d6de6cd9e50f5f, still the open PR head at submission.
  • Main advanced to 0a201997097b8a89b638f3a2afcb35db4184c8b2; all 53 consumed source files and the selected-record bytes are unchanged there.
  • Lean 4.21.0, arm64-apple-darwin23.6.0, commit 6741444a63ee; Mathlib 308445d7985027f538e281e18df29ca16ede2ba3; CPython 3.14.6/macOS 27.0.1 arm64. All nine git dependency heads match the manifest and have no tracked source changes.
  • Patch SHA256: f673d4165d0f7c91d0de4be58e3491f22eabad2bf3f00d567e9e5a197e2d5e95.
  • Original driver SHA256: 2b94b629b2c5d091b1a3ff06ce0fbee1cf178521ccb6ac97843c5c456dfd5eb8.
  • Repaired driver SHA256: ba6be00623fc3836112cefece845b98829db7e908793a525f11d83678dfa5380.

The three local source packages were copied into a new temporary tree without local build artifacts. lake exe cache get used the pinned Mathlib cache. The original python3 -B verify.py --no-cache built HPE and its imported LemmaA/G dependencies and completed in 369.43 seconds. The repaired driver and subsequent controls reuse these source-identical compiled libraries. The repaired canonical run completed in 5.66 seconds. These are single-run observations, not a speedup benchmark.

Observed controls

Probe file Original driver Repaired driver
Canonical 42 queries PASS; 42 actual and claimed PASS; identical 42 reports and dependency sets
Two-space indentation on all queries PASS; 42 actual, 0 claimed PASS; 42 actual and claimed
Import only, no queries PASS; 0 actual and claimed Exit 1 before any lake invocation
Duplicate first query PASS; 43 reports, 42 unique names Exit 1 before any lake invocation
Omit first query Not rerun in this follow-up Exit 1 before any lake invocation
Add Nat.add_assoc query Not rerun in this follow-up Exit 1 before any lake invocation

All four rejected cases fail with FAIL axiom probe inventory differs from the 42 required results. The repaired canonical and indented outputs match the baseline's ordered name/dependency list exactly, with dependencies contained in {propext, Classical.choice, Quot.sound}. A separately written line parser preserved duplicate reports for the comparison; it did not import the repaired parser. The query file was restored after testing, and only the exact proposed driver patch differs from the 53 pinned inputs in the temporary tree.

Reproduction of the full-build comparison

Use a fresh isolated checkout/worktree at the base above, with Lean 4.21.0 available. Fetch PR1608, extract its exact research/hpe-axiom-inventory-audit/repair.patch, then run:

# From research/hyperplane-end-lean in the isolated checkout:
lake exe cache get
python3 -B verify.py --no-cache
# From the isolated repository root:
git apply /absolute/path/to/repair.patch
# Return to research/hyperplane-end-lean:
python3 -B verify.py --no-cache

For the controls, change only PrintAxioms.lean as described in the table and rerun the appropriate original/repaired driver; restore the file afterward. The original and patched files are fully bound above. The fresh replay's JSON result digest is a6569912568666d11fa395b901b7c36feebe3856b78461bad9d8f5fda6c78ab7; this identifies a local receipt and is not an execution attestation.

Actual repaired canonical driver output
sources: no sorry / admit / axiom / native_decide / unsafe / opaque / extern in 18 files
$ lake build
Build completed successfully.
$ lake env lean PrintAxioms.lean
'HyperplaneEnd.pre_recipe' depends on axioms: [propext, Quot.sound]
'HyperplaneEnd.post_recipe' depends on axioms: [propext, Quot.sound]
'HyperplaneEnd.wrapped_block' depends on axioms: [propext, Quot.sound]
'HyperplaneEnd.factor_of_exact' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.factor_iff_pre' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.tail_labels' depends on axioms: [propext]
'HyperplaneEnd.hpe_labels' depends on axioms: [propext, Quot.sound]
'HyperplaneEnd.residual_block' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.hpe_block' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.hpe_family' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.hpe_streams' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.hpe_word' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.hyperplane_width' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.Clifford.par9_spec' depends on axioms: [propext]
'HyperplaneEnd.Clifford.cE' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.Clifford.cL_emb' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.Clifford.cL_eq_of_check' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.Exact.rTensor_C7' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.Exact.exact_N_of_check' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.Exact.check1' depends on axioms: [propext]
'HyperplaneEnd.Exact.check2' depends on axioms: [propext]
'HyperplaneEnd.Exact.check3' depends on axioms: [propext]
'HyperplaneEnd.Exact.exact_N_pair1' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.Exact.exact_N_pair2' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.Exact.exact_N_pair3' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.Exact.exact_N' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.Exact.exact_N_nine' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.Exact.hpe_word_exact' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.labRun_climb' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.wellLabelled_climb' depends on axioms: [propext, Quot.sound]
'HyperplaneEnd.labRun_block' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.wellLabelled_block' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.mtail_wellLabelled' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.labRun_mtail' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.labRun_mtail_last' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.posts_spec' depends on axioms: [propext]
'HyperplaneEnd.hpe_labels_multi' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.tail_eq_mtail' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.hpe_labels_tail' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.hpe_word_multi' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.exact_cold' depends on axioms: [propext, Classical.choice, Quot.sound]
'HyperplaneEnd.cold_hyperplane_width' depends on axioms: [propext, Classical.choice, Quot.sound]
axioms: 42 results, all within ['Classical.choice', 'Quot.sound', 'propext']
PASS

Scope: this supplies the missing real-build compatibility evidence for this environment. It does not add a theorem, run --instances, rebuild the entire selected supplier, establish a multiplication theorem, or change kappa. The main source packages and selected record are unchanged; their integrity check passes. Maintainer adoption and source-pin updates, instance/physical bindings, inherited all-size and analytic obligations, and hosted CI remain separate. No duplicate PR is needed for this follow-up finding.

Credit Jeremy Kothe/jeremykothe2 (PR593), DreamingOfClouds (PR599 and LemmaA/G), the PR1608 repair, and WeberChen8128/PR893's earlier coverage principle. Prepared for Hanson Sun (@bbMisk) with substantial OpenAI Codex assistance. This is a separate actual execution, not independent human peer review. Final overlap refresh: 740 open PRs and 267 discussion records, complete pagination and no warnings; titles/bodies/local notes do not cover every diff.

@Mister-Meeseeks
Mister-Meeseeks merged commit 299eb8e into CrocSwap:main Oct 14, 2026
43 of 61 checks passed
@Mister-Meeseeks

Copy link
Copy Markdown
Contributor

Batch review at 26e984849677a26109f2d05393d6de6cd9e50f5f.

Merged to main, preserving the original contributor commits and package attribution.

Reviewed scope: The standalone HPE driver can silently accept an empty derived probe inventory; controlled transcripts reproduce the gap and test an explicit-inventory repair. Existing intact HPE evidence is not refuted, and full repaired HPE/Mathlib adoption remains a separate task.

The pinned scoped command passed; the batch ledger contains its command, input hashes, environment and log. This incorporates the research/tooling contribution and does not change the selected κ or discharge the inherited multiplication-theorem assumptions.

Batch review, attribution and evidence. Thank you for the contribution.

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.

2 participants