fix: prove the valuations submodule closure fields in Hadwiger - #507
Merged
Merged
Conversation
The fixed (non-hole) definition `valuations` shipped its three Submodule membership-closure fields as `sorry`. Since the target theorem's type mentions `valuations`, every submitted `hadwiger` proof had `sorryAx` in its transitive dependency closure, and the comparator's axiom check rejected all submissions -- including complete, sorry-free ones. Same defect class as the Conway knot contamination repaired in leanprover#372. Prove `add_mem'`/`zero_mem'`/`smul_mem'` (routine: continuity and each valuation clause are preserved under sum and scalar multiple), drop the stale "left as sorry" wording from the docstring and manifest notes, and regenerate the hadwiger workspace. The statement surface (`E`, `IsValuation`, the carrier, and the target statement) is byte-identical. `valuations` stays out of the holes deliberately: a solver-replaceable submodule of the same type could have rank n + 1 trivially, destroying the content of the target. Verified: `#print axioms LeanEval.ConvexGeometry.valuations` (in-tree and against the regenerated ChallengeDeps) now reports exactly [propext, Classical.choice, Quot.sound]; the generated workspace builds with the only remaining sorries being the intentional target holes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Problem
hadwigeris currently unsolvable by construction: no submission — including a completely valid,sorry-free formalization of Hadwiger's theorem — can be accepted by the comparator.The fixed (non-hole) definition
valuationsinLeanEval/ConvexGeometry/Hadwiger.leanshipped its threeSubmodulemembership-closure fields assorry:The target theorem's type is
Module.finrank ℝ (valuations n) = n + 1, so every accepted declaration with the required type hasvaluations— and thereforesorryAx— in its transitive dependency closure, regardless of what the submitted proof term looks like. The comparator's recursive axiom check walks type-and-value dependencies and rejects any axiom outsidepermitted_axioms(propext,Quot.sound,Classical.choice), so every submission fails. There is no submission-side workaround: the type is fixed bySolution.lean, andLeanEval.ConvexGeometry.valuationscannot be redeclared. (This is the same defect class that was repaired for the Conway knot problems in #372.)Fix
Prove the three closure fields in the trusted source (they are routine: continuity is preserved by
+/•, each invariance clause is preserved pointwise, and the inclusion–exclusion identity is linear inf), drop the now-stale "left assorry" wording from the module docstring and manifest notes, and regenerate thegenerated/hadwigerworkspace.The statement surface is untouched:
E,IsValuation, thevaluationscarrier, and thehadwigertarget statement are all byte-identical. Only the three proof fields (Prop-valued, proof-irrelevant) gained real proofs. Deliberately not addingvaluationsto the holes: making it solver-replaceable would let a submission swap in a different submodule of the same type whose rank is triviallyn + 1, destroying the mathematical content of the target.Verification
lake build LeanEval.ConvexGeometry.Hadwiger— clean; the only remainingsorrywarning is the@[eval_problem]target theorem itself.#print axioms LeanEval.ConvexGeometry.valuations(both in the source tree and inside the regenerated workspace againstChallengeDeps):[propext, Classical.choice, Quot.sound]— exactly the permitted set, nosorryAx.lake buildingenerated/hadwigersucceeds;ChallengeDepsbuilds with nosorrywarnings (previously the taintedvaluationswarned there). The onlysorrywarnings are the intentional holes (Challenge.leanstatement, solver placeholder inSubmission.lean).lake exe lean-eval validate-manifestandlake exe lean-eval check-problem-buildpass.Possible follow-up (not in this PR)
check-problem-buildtolerates all "declaration usessorry" warnings because target holes legitimately containsorry. A generation-time audit that walks the trusted (non-hole) declarations of each generated workspace and rejectssorryAxthere would have caught this class of bug (Hadwiger here, Conway knots in #372) before publication.🤖 Generated with Claude Code