-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
simp doesn't rewrite in definitions because of unassigned metavariables #4613
Comments
The change in #4482 is only applied to |
I don't think it's feasible to generalize universe metavariables in definitions before elaborating the value. As mentioned in #4482, that will lead to huge inconveniences. I don't think that the rule "don't have universe metavariables around" is the right solution here. Here is a (somewhat contrived) example using theorem. theorem bar (n m : Nat) : n = m → n = m := by
have : ∀ (α : Type _) (x y : α), x = y → x = y := by
intros α x y h
simp only [id h] -- error. The proof works if you remove `id`
exact this Nat n m I might be completely misunderstanding why the behavior here happens, but my understanding is as follows: Feel free to mark this as |
@fpvandoorn Note that the |
The motivation is simplicity. |
Ok, this happens only rarely in Mathlib, so I think the fallout will be limited. After that I think the only issue is in definitions. |
Prerequisites
Please put an X between the brackets as you perform the following steps:
https://github.com/leanprover/lean4/issues
Avoid dependencies to Mathlib or Batteries.
https://live.lean-lang.org/#project=lean-nightly
(You can also use the settings there to switch to “Lean nightly”)
Description
The following code fails:
The trace message is
Note that the unassigned metavariable is the universe metavariable of
ι
Expected behavior:
simp only [id h]
should succeed, just likesimp only [h]
already does.Related Issues
#4398 is basically the same issue, and #4493 didn't really fix the underlying issue.
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered: