Compare commits

...

1 Commits

Author SHA1 Message Date
Kim Morrison
52bf709fc4 chore: add grind annotations for List.not_mem_nil 2025-09-22 10:03:39 +02:00
3 changed files with 4 additions and 1 deletions

View File

@@ -371,6 +371,7 @@ abbrev getElem?_mkArray := @getElem?_replicate
/-! ### mem -/
@[grind ]
theorem not_mem_empty (a : α) : ¬ a #[] := by simp
@[simp, grind =] theorem mem_push {xs : Array α} {x y : α} : x xs.push y x xs x = y := by

View File

@@ -392,7 +392,7 @@ theorem get!_eq_getElem! [Inhabited α] (l : List α) (i) : l.get! i = l[i]! :=
/-! ### mem -/
@[simp] theorem not_mem_nil {a : α} : ¬ a [] := nofun
@[simp, grind ] theorem not_mem_nil {a : α} : ¬ a [] := nofun
@[simp, grind =] theorem mem_cons : a b :: l a = b a l :=
fun h => by cases h <;> simp [Membership.mem, *],

View File

@@ -907,6 +907,8 @@ theorem getElem?_singleton {a : α} {i : Nat} : #v[a][i]? = if i = 0 then some a
grind_pattern getElem_mem => xs[i] xs
@[grind ]
theorem not_mem_empty (a : α) : ¬ a #v[] := nofun
@[simp, grind =] theorem mem_push {xs : Vector α n} {x y : α} : x xs.push y x xs x = y := by