lean4-htt/tests/lean/run/grind_getElem.lean
Kim Morrison 2b0b1e013f
feat: further generic GetElem lemmas (#8465)
This PR adds further lemmas about `LawfulGetElem`, including marking
some with `@[grind]`.
2025-05-24 12:58:29 +00:00

10 lines
283 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.

set_option grind.warning false
reset_grind_attrs%
attribute [grind]
List.length_cons List.length_nil
List.getElem_cons
List.getElem?_cons List.getElem?_nil
example {l : List α} : l[i]? = some a ↔ ∃ h : i < l.length, l[i] = a := by
induction l generalizing i <;> grind