chore: Array.not_mem_empty (#5304)

This commit is contained in:
Kim Morrison 2024-09-11 16:13:24 +10:00 committed by GitHub
parent 325a058893
commit b88cdf6a3e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -147,6 +147,9 @@ theorem anyM_stop_le_start [Monad m] (p : α → m Bool) (as : Array α) (start
theorem mem_def {a : α} {as : Array α} : a ∈ as ↔ a ∈ as.toList :=
⟨fun | .mk h => h, Array.Mem.mk⟩
@[simp] theorem not_mem_empty (a : α) : ¬(a ∈ #[]) := by
simp [mem_def]
/-! # get -/
@[simp] theorem get_eq_getElem (a : Array α) (i : Fin _) : a.get i = a[i.1] := rfl