Repository navigation
Formalize source-bound CK cleanup-prefix scalar reordering in Lean - #1086
Conversation
|
100-PR batch review at This remains open after scoped triage. Next review step: Source check is only part of this formalization; requires Lean 4.27.0 kernel build and complete axiom/statement coverage. Installed toolchains differ. This is a specific continuation point, not a rejection or a request to redo already recorded checks. Completed local evidence is retained separately from outstanding whole-head obligations. Batch review, attribution and evidence. Thank you for the contribution. |
|
Follow-up to the review continuation in #1086 (comment). At head Our follow-up found two omissions in the explicit named axiom inventory and has now recorded all 22 theorem statements and axiom sets using the exact official Lean 4.27.0 release. The targeted audit imported retained build artifacts after source/configuration SHA256 and Lake trace/sidecar checks; it did not rebuild or independently kernel-recheck the proof sources. The restored compiler matches the historical executable SHA256 and release commit. Historical artifact SHA256 values were not independently retained; Lake cache hashes are noncryptographic local provenance, not signed attestations. The retained clean build remains the source-level kernel-build evidence. For a maintainer clean replay, use The supplementary evidence is included below so it is available without local files. The original preparation-only comment has been omitted from the displayed audit script; executable lines are unchanged. Toolchain: To reproduce after the pinned build above, save the displayed script as Audit script: all 22 named theorem statements and axiom setsimport CKFixture
set_option pp.universes true
set_option pp.explicit true
#check CleanupPrefix.commute_sound
#print axioms CleanupPrefix.commute_sound
#check CleanupPrefix.disjoint_commute
#print axioms CleanupPrefix.disjoint_commute
#check CleanupPrefix.run_append
#print axioms CleanupPrefix.run_append
#check CleanupPrefix.cross_prefix
#print axioms CleanupPrefix.cross_prefix
#check CleanupPrefix.pull_sound
#print axioms CleanupPrefix.pull_sound
#check CleanupPrefix.pull_split
#print axioms CleanupPrefix.pull_split
#check CleanupPrefix.extract_sound
#print axioms CleanupPrefix.extract_sound
#check CleanupPrefix.extract_recipe_order
#print axioms CleanupPrefix.extract_recipe_order
#check CleanupPrefix.extract_disjoint
#print axioms CleanupPrefix.extract_disjoint
#check CleanupPrefix.sourceExtract_sound
#print axioms CleanupPrefix.sourceExtract_sound
#check CleanupPrefix.extract_in_context
#print axioms CleanupPrefix.extract_in_context
#check CleanupPrefix.sourceExtract_in_context
#print axioms CleanupPrefix.sourceExtract_in_context
#check CleanupPrefix.suffix_unselected_of_bounds
#print axioms CleanupPrefix.suffix_unselected_of_bounds
#check CleanupPrefix.CK.checked
#print axioms CleanupPrefix.CK.checked
#check CleanupPrefix.CK.selected_order
#print axioms CleanupPrefix.CK.selected_order
#check CleanupPrefix.CK.prefix_filter
#print axioms CleanupPrefix.CK.prefix_filter
#check CleanupPrefix.CK.recipe_below_cut
#print axioms CleanupPrefix.CK.recipe_below_cut
#check CleanupPrefix.CK.suffix_above_cut
#print axioms CleanupPrefix.CK.suffix_above_cut
#check CleanupPrefix.CK.suffix_unselected
#print axioms CleanupPrefix.CK.suffix_unselected
#check CleanupPrefix.CK.stable_remainder
#print axioms CleanupPrefix.CK.stable_remainder
#check CleanupPrefix.CK.scalar_rewrite
#print axioms CleanupPrefix.CK.scalar_rewrite
#check CleanupPrefix.CK.source_coefficient_rewrite
#print axioms CleanupPrefix.CK.source_coefficient_rewriteComplete supplementary output (22 statements, 22 axiom records) |
This adds a source-bound Lean proof of the scalar cleanup-prefix rewrite used by the CK
hyperplane_endconstructor. It proves that moving selected gates to the front in recipe order preserves the scalar program, including arbitrary input states, disjoint self-adds, and unsorted selections.The concrete instance checks all 2,869 original instructions, 34 selected cleanup gates, and 19,084 original-prefix commutation pairs. Its original selection certificate (#626 at
66849e1475c930fd7732b1a0067ffee7e1e95f60) is retained byte-for-byte, so advancing the repository selection does not invalidate this historical audit. All actual constructor, recipe, and inventory inputs remain hash-pinned. Changes are confined toresearch/cleanup-prefix-lean/.Validation:
sorry,native_decide, or additional axioms were found.abdc6a7002abdbcd9e21bfc5e1a795784deacfdf; final patch application and all 28 resulting files were checked again after documentation finalization.Scope and trust: this proves a scalar reordering theorem with associative/commutative addition and arbitrary multiplication, with an
Intinstance supplied. Python source/JSON binding and generation remain an explicit trusted bridge. Rational/complex interpretations, the complete multiplication theorem, frame/accounting and all-size/analytic-transfer obligations are outside this contribution. No new κ or frontier change is claimed.This builds on the commuting-prefix constructors in #601/#608, HPE formal interfaces in #593/#599, and the #622/#623/#626 construction lineage. Substantial OpenAI Codex assistance was used for implementation and separate-agent review; no human review is claimed. See README.md, REVIEW.md, FINAL-REVIEW.json and ACCEPTANCE.json in the package for reproducible commands, exact pins, evidence, limitations and finding resolutions.