lean4-htt/tests/elab/grind_ac_inv_issue_2.lean
Leonardo de Moura 2d79ec2883
fix: another grind AC invariant (#13622)
This PR fixes another issue in the `grind` AC invariant checker.
2026-05-03 13:33:13 +00:00

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

module
open List
set_option grind.debug true in
theorem getLast_getLast_eq_getLast_flatten {l : List (List α)}
(hl : l ≠ []) (hl' : l.getLast hl ≠ []) :
(l.getLast hl).getLast hl' =
l.flatten.getLast (flatten_ne_nil_iff.2 ⟨_, getLast_mem hl, hl'⟩) := by
cases eq_nil_or_concat l with grind