Skip to content

Commit 979c2b4

Browse files
authored
chore: add grind annotations for List.not_mem_nil (#10493)
1 parent b3cd599 commit 979c2b4

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

src/Init/Data/Array/Lemmas.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ abbrev getElem?_mkArray := @getElem?_replicate
371371

372372
/-! ### mem -/
373373

374+
@[grind ←]
374375
theorem not_mem_empty (a : α) : ¬ a ∈ #[] := by simp
375376

376377
@[simp, grind =] theorem mem_push {xs : Array α} {x y : α} : x ∈ xs.push y ↔ x ∈ xs ∨ x = y := by

src/Init/Data/List/Lemmas.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ theorem get!_eq_getElem! [Inhabited α] (l : List α) (i) : l.get! i = l[i]! :=
392392

393393
/-! ### mem -/
394394

395-
@[simp] theorem not_mem_nil {a : α} : ¬ a ∈ [] := nofun
395+
@[simp, grind ←] theorem not_mem_nil {a : α} : ¬ a ∈ [] := nofun
396396

397397
@[simp, grind =] theorem mem_cons : a ∈ b :: l ↔ a = b ∨ a ∈ l :=
398398
⟨fun h => by cases h <;> simp [Membership.mem, *],

src/Init/Data/Vector/Lemmas.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,8 @@ theorem getElem?_singleton {a : α} {i : Nat} : #v[a][i]? = if i = 0 then some a
907907

908908
grind_pattern getElem_mem => xs[i] ∈ xs
909909

910+
911+
@[grind ←]
910912
theorem not_mem_empty (a : α) : ¬ a ∈ #v[] := nofun
911913

912914
@[simp, grind =] theorem mem_push {xs : Vector α n} {x y : α} : x ∈ xs.push y ↔ x ∈ xs ∨ x = y := by

0 commit comments

Comments
 (0)