Zulip Chat Archive

Stream: mathlib4

Topic: kernel metavariable bug


Yongyi Chen (Nov 10 2023 at 03:13):

MWE:

import Mathlib.GroupTheory.Subgroup.Basic

def what_happened [Group G] : Subgroup G where
  carrier := { g | g : G }
  mul_mem' := by sorry
  one_mem' := sorry
  inv_mem' | a, b => sorry

Replace the by sorry with sorry and the bug disappears. Weird.

Jireh Loreaux (Nov 10 2023 at 03:15):

I'm not sure what you are doing with inv_mem', but that's definitely the cause of the problem.

Jireh Loreaux (Nov 10 2023 at 03:15):

What inductive type are you trying to destruct there?

Yongyi Chen (Nov 10 2023 at 03:18):

I had a more complicated carrier but reduced it for the purposes of the MWE. Deconstruction works here still: a has type G and b has type a = x✝.

Jireh Loreaux (Nov 10 2023 at 03:33):

Oh, I see, you're using the alternate set notation. I misread that the first time. I'm betting it's a bug in the elaborator for that notation. I'll see if I can hunt it down.

Jireh Loreaux (Nov 10 2023 at 03:45):

Hmmm... I don't see the problem. I think @Kyle Miller has played a bit with binder predicates and this kind of thing before though, so perhaps he has an idea.


Last updated: Dec 20 2023 at 11:08 UTC