Repository navigation
Register the HPE post-wrapper uniqueness lemma (drawn card formal-interface-lemma) - #3052
Merged
Mister-Meeseeks merged 1 commit intoOct 16, 2026
Conversation
Card formal-interface-lemma (draw seed 80692bf8777fc3a7d12b201233cd6ae2, priority revision 6), scope unchanged: one formal interface lemma with its actual hypotheses. The hyperplane-end interface formalizes factor_iff_pre only; the integration review requires both pre and post wrappers to use the (E, U) pair. This package states the missing post-side uniqueness lemma in phase-sharp form, proves it in writing, and binds it exactly to the three certified Lean pairs: positive identity fixtures exact, C8 width guard rejected, nine wrapper mutants per pair classified with exact row/column witnesses, port controls reproducing the kernel literals, and a corrupted-literal failure control. One observed nuance is recorded: low-triangle quadratic bits are record-dead under the documented qv semantics, so the binding compares operators. No kappa, supplier or frontier change. Aaron Wang, with help from opencode.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Register the HPE post-wrapper uniqueness lemma (drawn card formal-interface-lemma)
One focused research package,
research/hpe-post-wrapper-lemma/: one interface lemma formalized with its actual hypotheses, plus an exact source-bound instance binding. No kappa, supplier, or selected-frontier change.Task and scope
Drawn card
formal-interface-lemma(chooser seed80692bf8777fc3a7d12b201233cd6ae2, trackindependent-verification, priority revision 6, scope key636f26dec98e26b296e8), method "Formalize a missing boundary lemma identified by the selected review." Scope status: unchanged. Base commitd8e0f83f00191df62174b641e9fff055c357f641. Branchresearch/agent-84-hpe-post-wrapper-636f26de-80692bf8, headae6dcf7e04de89198f8cd5321766d62bf6ee187b.Saturation handling: census readings of this heavily drawn card are saturated (an OR-mode
find_overlap.pyrun returned 201 possible matches on 2026-10-16T20:38Z, the first 20 all localoriginal_cardrows of prior packages on the same card). The construction reading the drawn method names is unpriced:research/hyperplane-end-lean/HyperplaneEnd/Labels.leanproves onlyfactor_iff_pre, and no package states the post-side uniqueness or its phase-sharp form. That reading is what this PR takes.The gap and the lemma
The hyperplane-end interface proves
factor_iff_pre: with the exact factorizationT_U T_E^{-1} = L (C7 (x) id) Rholding for a certified pair(E, U), the executed pre wrapper must be the recipe'sR. The integration reviewdocs/research/community-hyperplane599-review.mdrequires both pre and post wrappers to use the pair(E, U)rather thanEalone, but no post-side counterpart exists in the Lean sources or in any research package.Lemma (post-wrapper uniqueness, phase-sharp). Assume
(N)holds for(E, U)with invertible monomial wrappersL, R. For any invertible wrapperL'and scalarlambda, the identityL'^{-1} T_U T_E^{-1} R^{-1} = lambda (C7 (x) id)holds if and only ifL' = lambda^{-1} L. In particular the identity atlambda = 1(hypothesis (F)) holds exactly for the(E, U)recipe'sL; a FULL recipe or any other post wrapper breaks it. Within the gate familylambdais a power ofi, and the wrapper record's phase field is decisive:L' = i^{t} Lsatisfies the identity withlambda = i^{-t}and no other.Proof: substitute
(N)to get(L'^{-1} L - lambda I)(C7 (x) id) = 0;C7is invertible, soL'^{-1} L = lambda I. The converse is direct. The proof uses(N), invertibility ofL'andC7, and equality as linear maps with global phase included; that phase exactness is whylambdais the entire freedom. The symmetric pre-side form withlambdastrictly extendsfactor_iff_preand is stated but not claimed here.Not claimed: no Lean kernel proof of the lemma (written proof plus exact Python binding only); nothing about the other conjuncts of
hrec(climbs, tail shape, unit row, footprints); nothing beyond the three certified pairs; no multiplication theorem.Evidence
verify.pyreads the pinned literals ofHyperplaneEnd/Exact.leanand evaluates them with an independently written exact gate semantics over Gaussian integers (the documented five gate kinds,Cgates without their1/2, denominators2^{#C}compared exactly; no floating point; packed superposition gives all columns at once, witnesses decoded exactly).For each of the three certified pairs
pair1topair3:lhsLit,rhsLit,wL,wR, and the permutation matrices are mutual inverses on all 512 basis states;L^{-1} T_U T_E^{-1} R^{-1} = C7 (x) idexactly, phase included;C8 (x) id;lambdaform and no other; five wrong wrappers (offset, linear-Z4, live quadratic bit, matrix row swap, swapped L/R) break all four powers ofi, each with an exact row and column witness; one record-dead quadratic bit is inert and correctly accepted;--self-testfailure control: a self-consistently corrupted wrapper literal is rejected by the same pipeline.One observed nuance is recorded in the README: the documented
qvsemantics reads a diagonal rowQ_ionly through bits above positioni, so low-triangle bits are record-dead. Two wrapper records differing only there denote the same operator, which a byte-level recipe comparison would wrongly reject.Registered replay (Python 3.12, stdlib only):
python3.12 scripts/research_package.py --package research/hpe-post-wrapper-lemmaends withPASS_REGISTERED_RESEARCH_PACKAGE research/hpe-post-wrapper-lemma outcome=completed;python3.12 scripts/research_package.py --package research/hpe-post-wrapper-lemma --check-onlyprintsPASS_PACKAGE_METADATA_AND_PINS (not a mathematical acceptance check);python3.12 scripts/check_research_commit.py --package research/hpe-post-wrapper-lemmaprintsPASS_RESEARCH_COMMIT_BYTESfor commitae6dcf7e04de89198f8cd5321766d62bf6ee187b.Evidence status: author-checked exact arithmetic with a separately written semantics port; no independent human review and no Lean kernel check of the new lemma.
Open next questions
The package README carries the structured questions: kernel-checking
factor_iff_postbesidefactor_iff_pre(blocked by no Lean toolchain here and frozen predecessors); extending the binding to coldE = 0pairs and multi-gate tails (blocked by the absence of cold(N)literal pairs and of vendored emitted runs); and whether record-level wrapper comparison should be relaxed to operator equality on dead quadratic bits (shared-tool change, needs maintainer review).Credit and attribution
Verified against current GitHub ground truth: PR 593 by Jeremy Kothe (
jeremykothe2), PR 599 by DreamingOfClouds, PR 591 and PR 596 by Jeremy Kothe, PR 2706 by Riquelme Soares (hevlyo), PR 1697 by Aaron Wang (navinor). Predecessorresearch/hpe-prewrapper-bindingstated the pre-side boundary implication and explicitly deferred its arithmetic;research/hpe-wrapper-event-bindingbinds emitted wrapper events to the Lean literals at record level. This PR adds the missing post-side statement, its phase-sharp form, and the deferred exact arithmetic on the certified instances.Prepared by Aaron Wang, with help from opencode (substantial AI assistance; no model named). Discussion claim: comment 18982589. Apache-2.0.