fix: enumeration type noConfusion was not registered

This commit fixes issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/.28kernel.29.20function.20expected.20.2EnoConfusion/near/284634050
This commit is contained in:
Leonardo de Moura 2022-06-01 17:57:16 -07:00
parent 9a273b85a3
commit 32db316166
2 changed files with 14 additions and 0 deletions

View file

@ -114,6 +114,7 @@ where
hints := ReducibilityHints.abbrev
}
setReducibleAttribute declName
modifyEnv fun env => markNoConfusion env declName
def mkNoConfusion (declName : Name) : MetaM Unit := do
if (← isEnumType declName) then

View file

@ -0,0 +1,13 @@
inductive MyBool :=
| MyTrue
| MyFalse
inductive T :=
| mk (b: MyBool) (u: Unit)
inductive isTrue: T → Type :=
| intro: isTrue (.mk .MyTrue ())
example {τ: T} (h: isTrue τ): Unit :=
match τ, h with
| .mk .MyTrue (), .intro => ()