Zulip Chat Archive
Stream: new members
Topic: Another '(kernel) declaration has metavariables' error
Egor Morozov (Dec 22 2025 at 07:57):
Here is my setup minimized to a mwe.
import Mathlib
example (m : ℕ) : ∑ n ∈ Finset.range m with h : Even n, n = 0 := by
conv_lhs =>
arg 2
intro n
congr
sorry
(Of course, the statement is nonsense, it's just to illustrate the issue.) I get
(kernel) declaration has metavariables '_example'
Is this error smth I should expect here or it is a bug?
Jakub Nowak (Dec 23 2025 at 03:14):
It's a bug I think.
Kyle Miller (Dec 23 2025 at 03:30):
Definitely a bug. Looking at the proof term, somehow there's a Decidable instance that's not getting synthesized. It'd be great if someone could make a mathlib-free #mwe of this. Possibly all someone needs to do is try to use conv => congr on a dependent if.
Jakub Nowak (Dec 23 2025 at 04:45):
Hm, I've had a mathlib free one, but I forgot to post it and I've already closed the tab with it. I'll try to do it again. .-.
Jakub Nowak (Dec 23 2025 at 04:47):
/--
error: unsolved goals
⊢ if h : True then True else True
---
error: (kernel) declaration has metavariables '_example'
-/
#guard_msgs in
example : if h : True then True else True := by
conv =>
fun
intro h
congr
Jakub Nowak (Dec 23 2025 at 04:52):
Kyle Miller said:
Possibly all someone needs to do is try to use
conv => congron a dependentif.
When I looked at it seemed that intro before congr was also needed to trigger the bug.
Jakub Nowak (Dec 23 2025 at 04:55):
For example, first one works, second doesn't:
example : dite True (fun h => True) h := by
conv =>
congr
/--
error: unsolved goals
⊢ if h : True then True else True
---
error: (kernel) declaration has metavariables '_example'
-/
#guard_msgs in
example : (fun h => dite True (fun h => True) h) h := by
conv =>
fun
intro h
congr
Last updated: Feb 28 2026 at 14:05 UTC