fix: prove the mkAppRangeAux equation instead of assuming it - #26
Conversation
`Expr.mkAppRangeAux.eq_def` was an axiom as a workaround for leanprover/lean4#8464. That has merged, so `mkAppRangeAux` is a total definition in the pinned toolchain and its defining equation is provable by `rw [mkAppRangeAux]`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016LdQizBpspiYVC5HNa8dNg
lean4#8464 having merged does more than make the equation provable: it makes `mkAppRangeAux` a total definition, so Lean generates `mkAppRangeAux.eq_def` on demand and there is nothing left for us to state. `Verify/Expr.lean` already opens the private `mkAppRangeAux`, so the `rw [mkAppRangeAux.eq_def]` at its only use site resolves to the generated lemma with no edit -- the generated statement is character-for-character the one removed here. Keeping our own copy would shadow the generated lemma and leave a restatement to maintain by hand against a definition we do not own. `#print axioms Lean.Expr.mkAppRange_eq` reports `[propext, Quot.sound]`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
🤖 Pushed a commit on top — I think we can drop the declaration entirely rather than prove it. lean4#8464 having merged does more than make the equation provable: it makes So keeping our own copy shadows the generated lemma and leaves us maintaining a restatement of a definition we don't own — it would silently drift if the upstream definition ever changed shape, and the Same axiom result you reported, with nothing left behind:
|
This PR replaces the
Expr.mkAppRangeAux.eq_defaxiom inLean4Lean/Verify/Axioms.leanwith a proved theorem. The axiom was a workaround for leanprover/lean4#8464; that has since merged, somkAppRangeAuxis a total definition in the pinned toolchain and its defining equation follows fromrw [mkAppRangeAux]. The statement is unchanged, so the consumer inLean4Lean/Verify/Expr.leanneeds no edits, and no replacement assumptions are introduced:#print axioms Lean.Expr.mkAppRangeAux.eq_defreports onlypropextandQuot.sound.Closes #25
🤖 Prepared with Claude Code