Compare commits

...

2 Commits

Author SHA1 Message Date
Kim Morrison
18506cdaf8 fix test 2025-09-15 02:53:18 +02:00
Kim Morrison
28f4799ad1 chore: remove bad grind annotation on eq_nil_of_map_eq_nil 2025-09-12 07:36:44 +02:00
3 changed files with 7 additions and 4 deletions

View File

@@ -1277,7 +1277,9 @@ theorem forall_mem_map {f : α → β} {xs : Array α} {P : β → Prop} :
cases xs
simp
@[grind ]
-- This would be helpful as a `grind` lemma if
-- we could have it fire only once `map f l` and `#[]` are the same equivalence class.
-- Otherwise it is too aggressive.
theorem eq_empty_of_map_eq_empty {f : α β} {xs : Array α} (h : map f xs = #[]) : xs = #[] :=
map_eq_empty_iff.mp h

View File

@@ -1162,7 +1162,9 @@ theorem forall_mem_map {f : α → β} {l : List α} {P : β → Prop} :
@[simp] theorem map_eq_nil_iff {f : α β} {l : List α} : map f l = [] l = [] := by
constructor <;> exact fun _ => match l with | [] => rfl
@[grind ]
-- This would be helpful as a `grind` lemma if
-- we could have it fire only once `map f l` and `[]` are the same equivalence class.
-- Otherwise it is too aggressive.
theorem eq_nil_of_map_eq_nil {f : α β} {l : List α} (h : map f l = []) : l = [] :=
map_eq_nil_iff.mp h

View File

@@ -1,4 +1,3 @@
module
-- Note that `grind_list.lean` uses `reset_grind_attrs%` to clear the grind attributes.
-- This file does not: it is testing the grind attributes in the library.
@@ -456,7 +455,7 @@ theorem map_eq_cons_iff' {f : α → β} {l : List α} :
theorem map_eq_singleton_iff {f : α β} {l : List α} {b : β} :
map f l = [b] a, l = [a] f a = b := by
grind [map_eq_cons_iff]
grind [cases List]
-- FIXME
attribute [local grind] List.map_inj_left in