Skip to content

Commit

Permalink
feat: some array lemma aliases (#891)
Browse files Browse the repository at this point in the history
  • Loading branch information
fgdorais authored Jul 30, 2024
1 parent e789780 commit 3dfb59c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Batteries/Data/Array/Lemmas.lean
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,15 @@ theorem mapM_empty [Monad m] (f : α → m β) : mapM f #[] = pure #[] := by
rw [mapM, mapM.map]; rfl

@[simp] theorem map_empty (f : α → β) : map f #[] = #[] := mapM_empty ..

/-! ### mem -/

alias not_mem_empty := not_mem_nil

theorem mem_singleton : a ∈ #[b] ↔ a = b := by simp

/-! ### append -/

alias append_empty := append_nil

alias empty_append := nil_append

0 comments on commit 3dfb59c

Please sign in to comment.