Skip to content

fix: prove the valuations submodule closure fields in Hadwiger - #507

Merged
kim-em merged 1 commit into
leanprover:mainfrom
Vilin97:fix-hadwiger-valuations-closure
Aug 5, 2026
Merged

fix: prove the valuations submodule closure fields in Hadwiger#507
kim-em merged 1 commit into
leanprover:mainfrom
Vilin97:fix-hadwiger-valuations-closure

Conversation

@Vilin97

@Vilin97 Vilin97 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Problem

hadwiger is 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 valuations in LeanEval/ConvexGeometry/Hadwiger.lean shipped its three Submodule membership-closure fields as sorry:

noncomputable def valuations (n : ℕ) : Submodule ℝ (ConvexBody (E n) → ℝ) where
  carrier := {f | IsValuation f}
  add_mem' := by sorry
  zero_mem' := by sorry
  smul_mem' := by sorry

The target theorem's type is Module.finrank ℝ (valuations n) = n + 1, so every accepted declaration with the required type has valuations — and therefore sorryAx — 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 outside permitted_axioms (propext, Quot.sound, Classical.choice), so every submission fails. There is no submission-side workaround: the type is fixed by Solution.lean, and LeanEval.ConvexGeometry.valuations cannot 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 in f), drop the now-stale "left as sorry" wording from the module docstring and manifest notes, and regenerate the generated/hadwiger workspace.

The statement surface is untouched: E, IsValuation, the valuations carrier, and the hadwiger target statement are all byte-identical. Only the three proof fields (Prop-valued, proof-irrelevant) gained real proofs. Deliberately not adding valuations to the holes: making it solver-replaceable would let a submission swap in a different submodule of the same type whose rank is trivially n + 1, destroying the mathematical content of the target.

Verification

  • lake build LeanEval.ConvexGeometry.Hadwiger — clean; the only remaining sorry warning is the @[eval_problem] target theorem itself.
  • #print axioms LeanEval.ConvexGeometry.valuations (both in the source tree and inside the regenerated workspace against ChallengeDeps):
    [propext, Classical.choice, Quot.sound] — exactly the permitted set, no sorryAx.
  • lake build in generated/hadwiger succeeds; ChallengeDeps builds with no sorry warnings (previously the tainted valuations warned there). The only sorry warnings are the intentional holes (Challenge.lean statement, solver placeholder in Submission.lean).
  • lake exe lean-eval validate-manifest and lake exe lean-eval check-problem-build pass.

Possible follow-up (not in this PR)

check-problem-build tolerates all "declaration uses sorry" warnings because target holes legitimately contain sorry. A generation-time audit that walks the trusted (non-hole) declarations of each generated workspace and rejects sorryAx there would have caught this class of bug (Hadwiger here, Conway knots in #372) before publication.

🤖 Generated with Claude Code

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>
@kim-em
kim-em merged commit bd3dc87 into leanprover:main Aug 5, 2026
1 check passed
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