-
Notifications
You must be signed in to change notification settings - Fork 432
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
Unexpected kernel error involving two structures #6354
Comments
I just hit a similar example:
|
Minimized the example further: structure A where
p: Prop
q: True
example := (λ ⟨_,_⟩ ↦ True.intro : (A.mk (And True True) (by exact True.intro)).p → True) This at least excludes it from being an issue with structure instance notation ( Edit: It appears there is a bug in |
…Closure This PR fixes a bug in `Lean.Meta.Closure` that would introduce under-applied delayed assignment metavariables, which would keep them from ever getting instantiated. This bug affected `match` elaboration when the expected type contains postponed elaboration problems, for example tactic blocks. Closes leanprover#6354
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
Expected behavior: No errors.
Actual behavior:
(kernel) declaration has metavariables '_example'
Mysteriously (to me), any one of the following changes make the error disappear:
by exact True.intro
byTrue.intro
⟨_,_⟩
by_
p
,q
intoB
(orq'
intoA
)I originally encountered this example when playing with Mathlib definitions and then simplified it. I don't see how it could be reduced further.
Context
I asked about this on Zulip.
A similar issue is #5925 (pointed out by @kim-em).
If these two issues indeed have the same underlying cause, the present example is maybe simpler to investigate.
Versions
Originally tested on Lean version 4.15.0-nightly-2024-11-15, also still persists on today's version at https://live.lean-lang.org/:
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: