Skip to content

Commit

Permalink
feat: add lemma Finsupp.erase_apply (#11242)
Browse files Browse the repository at this point in the history
Adds a lemma
  • Loading branch information
BoltonBailey committed Mar 14, 2024
1 parent 3d9e3df commit 18ecf71
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Mathlib/Data/Finsupp/Defs.lean
Expand Up @@ -661,6 +661,11 @@ theorem erase_ne {a a' : α} {f : α →₀ M} (h : a' ≠ a) : (f.erase a) a' =
classical simp only [erase, coe_mk, h, ite_false]
#align finsupp.erase_ne Finsupp.erase_ne

theorem erase_apply [DecidableEq α] {a a' : α} {f : α →₀ M} :
f.erase a a' = if a' = a then 0 else f a' := by
rw [erase, coe_mk]
convert rfl

@[simp]
theorem erase_single {a : α} {b : M} : erase a (single a b) = 0 := by
ext s; by_cases hs : s = a
Expand Down

0 comments on commit 18ecf71

Please sign in to comment.