fix: binderNameHint with simp#12380
Conversation
|
Thanks! Unfortunately this touches code that's very deep in the stack, and fixes a problem with a (relatively) less critical component. So unless the changes deep down are clearly inconsequential to all the other components that may rely on the current ordering, this may be a problem for this PR. |
|
I don't see a reason why the binder names from |
|
For an explanation why this change makes sense: In a call of |
|
Right, I'm not worried about the change to isdefeq that only changes naming, but the one to kabstract |
|
Mathlib CI status (docs):
|
|
Reference manual CI status:
|
|
Oh, right; well I'd say that the previous behavior of /--
error: unsolved goals
case h
⊢ ?h + 1 = 3
case h
⊢ Nat
---
error: No goals to be solved
-/
#guard_msgs in
example : True := by
apply (fun (n : Nat) (h : Nat.succ n = 3) => trivial)
· rewrite [Nat.succ_eq_add_one]
· sorryThat's because it previously had the arguments to /-- error: No goals to be solved -/
#guard_msgs in
example : True := by
apply (fun (n : Nat) (h : 0 ≤ Nat.succ n) => trivial)
· generalize Nat.succ _ = a
simp
· exact 0I'm pretty sure that |
|
The main user of kabstract is rw, right? Making things more like they are with simp is probably a good sign. So is if nothing breaks in existing code. It's useful to capture this corner case with a test (using Although I wouldn't be surprised if someone out there expects rw to instantiate MVars in the value of that's what it takes... |
This PR fixes the behavior of rewriting foralls with
simpandbinderNameHint.See discussion at https://leanprover.zulipchat.com/#narrow/channel/113488-general/topic/binderNameHint.20.26.20simp/with/572625591