blob: 638c56dcf36b50127cfb8a19bbbe86186db4be88 [file]
inductive Foo (α : Type) (x : α) where
| c1 : Foo α x
| c2 : Foo α x
def Foo.mk (n : Nat) : Foo (Fin (n + 1)) 0 :=
match n with
| .zero => .c1
| .succ _ => .c1
def Foo.num {α : Type} {x : α} (f : Foo α x) : Nat :=
0
/-
Issue #12140: `closeGoalWithValuesEq` must check that the two interpreted values
have the same type before calling `mkEqProof`. When equivalence classes contain
heterogeneous equalities (e.g., `0 : Fin 3` and `0 : Fin 2` merged via `HEq`),
`mkEqProof` would fail with an internal error.
-/
/--
error: `grind` has failed, use `+verbose` to obtain diagnostic information
-/
#guard_msgs in
theorem foo (n : Nat) : (Foo.mk n).num = 0 := by
induction n with
| zero => rfl
| succ n ih =>
grind -verbose [Foo.mk]