lean4-htt/tests/lean/run/grind_canon_bug.lean
Leonardo de Moura cb9f198f01
fix: grind canonicalizer (#6585)
This PR fixes a bug in the `grind` canonicalizer.
2025-01-09 02:23:46 +00:00

13 lines
337 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

open List
attribute [grind =] getElem_cons_zero
attribute [grind =] getElem?_cons_zero
example (h : (a :: t)[0]? = some b) : (a :: t)[0] = b := by
grind -- ✓
example [Inhabited α] : ∀ {l : List α} {i : Nat}, l[i]? = some b → l[i]! = b
| a::t, 0, _ => by
rw [getElem!_pos _ _ sorry]
grind
| _::l, _+1, e => sorry