File: Mathlib/Data/Finsupp/Defs.lean

full_name: Finsupp
code: /-- `Finsupp α M`, denoted `α →₀ M`, is the type of functions `f : α → M` such that
  `f x = 0` for all but finitely many `x`. -/
structure Finsupp (α : Type*) (M : Type*) [Zero M] where
  /-- The support of a finitely supported function (aka `Finsupp`). -/
  support : Finset α
  /-- The underlying function of a bundled finitely supported function (aka `Finsupp`). -/
  toFun : α → M
  /-- The witness that the support of a `Finsupp` is indeed the exact locus where its
  underlying function is nonzero. -/
  mem_support_toFun : ∀ a, a ∈ support ↔ toFun a ≠ 0
goal: Type (max u_13 u_14)

full_name: Finsupp.toFun
code: /-- `Finsupp α M`, denoted `α →₀ M`, is the type of functions `f : α → M` such that
  `f x = 0` for all but finitely many `x`. -/
structure Finsupp (α : Type*) (M : Type*) [Zero M] where
  /-- The support of a finitely supported function (aka `Finsupp`). -/
  support : Finset α
  /-- The underlying function of a bundled finitely supported function (aka `Finsupp`). -/
  toFun : α → M
  /-- The witness that the support of a `Finsupp` is indeed the exact locus where its
  underlying function is nonzero. -/
  mem_support_toFun : ∀ a, a ∈ support ↔ toFun a ≠ 0
goal: α → M

full_name: Finsupp.support
code: /-- `Finsupp α M`, denoted `α →₀ M`, is the type of functions `f : α → M` such that
  `f x = 0` for all but finitely many `x`. -/
structure Finsupp (α : Type*) (M : Type*) [Zero M] where
  /-- The support of a finitely supported function (aka `Finsupp`). -/
  support : Finset α
  /-- The underlying function of a bundled finitely supported function (aka `Finsupp`). -/
  toFun : α → M
  /-- The witness that the support of a `Finsupp` is indeed the exact locus where its
  underlying function is nonzero. -/
  mem_support_toFun : ∀ a, a ∈ support ↔ toFun a ≠ 0
goal: Finset α

full_name: Finsupp.mem_support_toFun
code: /-- `Finsupp α M`, denoted `α →₀ M`, is the type of functions `f : α → M` such that
  `f x = 0` for all but finitely many `x`. -/
structure Finsupp (α : Type*) (M : Type*) [Zero M] where
  /-- The support of a finitely supported function (aka `Finsupp`). -/
  support : Finset α
  /-- The underlying function of a bundled finitely supported function (aka `Finsupp`). -/
  toFun : α → M
  /-- The witness that the support of a `Finsupp` is indeed the exact locus where its
  underlying function is nonzero. -/
  mem_support_toFun : ∀ a, a ∈ support ↔ toFun a ≠ 0
goal: a ∈ self.support ↔ self.toFun a ≠ 0

full_name: «_aux_Mathlib_Data_Finsupp_Defs___macroRules_term_→₀__1»
code: @[inherit_doc]
infixr:25 " →₀ " => Finsupp
goal: Lean.Macro

full_name: _aux_Mathlib_Data_Finsupp_Defs___unexpand_Finsupp_1
code: @[inherit_doc]
infixr:25 " →₀ " => Finsupp
goal: Lean.PrettyPrinter.Unexpander

full_name: Finsupp.instFunLike
code: instance instFunLike : FunLike (α →₀ M) α M 
goal: FunLike (α →₀ M) α M

full_name: Finsupp.instCoeFun
code: /-- Helper instance for when there are too many metavariables to apply the `DFunLike` instance
directly. -/
instance instCoeFun : CoeFun (α →₀ M) fun _ => α → M 
goal: CoeFun (α →₀ M) fun x => α → M

full_name: Finsupp.ext
code: @[ext]
theorem ext {f g : α →₀ M} (h : ∀ a, f a = g a) : f = g 
goal: f = g

full_name: Finsupp.ne_iff
code: lemma ne_iff {f g : α →₀ M} : f ≠ g ↔ ∃ a, f a ≠ g a 
goal: f ≠ g ↔ ∃ a, f a ≠ g a

full_name: Finsupp.coe_mk
code: @[simp, norm_cast]
theorem coe_mk (f : α → M) (s : Finset α) (h : ∀ a, a ∈ s ↔ f a ≠ 0) : ⇑(⟨s, f, h⟩ : α →₀ M) = f 
goal: ⇑{ support := s, toFun := f, mem_support_toFun := h } = f

full_name: Finsupp.instZero
code: instance instZero : Zero (α →₀ M) 
goal: Zero (α →₀ M)

full_name: Finsupp.coe_zero
code: @[simp, norm_cast] lemma coe_zero : ⇑(0 : α →₀ M) = 0 
goal: ⇑0 = 0

full_name: Finsupp.zero_apply
code: theorem zero_apply {a : α} : (0 : α →₀ M) a = 0 
goal: 0 a = 0

full_name: Finsupp.support_zero
code: @[simp]
theorem support_zero : (0 : α →₀ M).support = ∅ 
goal: Finsupp.support 0 = ∅

full_name: Finsupp.instInhabited
code: instance instInhabited : Inhabited (α →₀ M) 
goal: Inhabited (α →₀ M)

full_name: Finsupp.mem_support_iff
code: @[simp]
theorem mem_support_iff {f : α →₀ M} : ∀ {a : α}, a ∈ f.support ↔ f a ≠ 0 
goal: a ∈ f.support ↔ f a ≠ 0

full_name: Finsupp.fun_support_eq
code: @[simp, norm_cast]
theorem fun_support_eq (f : α →₀ M) : Function.support f = f.support 
goal: Function.support ⇑f = ↑f.support

full_name: Finsupp.not_mem_support_iff
code: theorem not_mem_support_iff {f : α →₀ M} {a} : a ∉ f.support ↔ f a = 0 
goal: a ∉ f.support ↔ f a = 0

full_name: Finsupp.coe_eq_zero
code: @[simp, norm_cast]
theorem coe_eq_zero {f : α →₀ M} : (f : α → M) = 0 ↔ f = 0 
goal: ⇑f = 0 ↔ f = 0

full_name: Finsupp.ext_iff'
code: theorem ext_iff' {f g : α →₀ M} : f = g ↔ f.support = g.support ∧ ∀ x ∈ f.support, f x = g x 
goal: f = g ↔ f.support = g.support ∧ ∀ x ∈ f.support, f x = g x

full_name: Finsupp.support_eq_empty
code: @[simp]
theorem support_eq_empty {f : α →₀ M} : f.support = ∅ ↔ f = 0 
goal: f.support = ∅ ↔ f = 0

full_name: Finsupp.support_nonempty_iff
code: theorem support_nonempty_iff {f : α →₀ M} : f.support.Nonempty ↔ f ≠ 0 
goal: f.support.Nonempty ↔ f ≠ 0

full_name: Finsupp.card_support_eq_zero
code: theorem card_support_eq_zero {f : α →₀ M} : card f.support = 0 ↔ f = 0 
goal: f.support.card = 0 ↔ f = 0

full_name: Finsupp.instDecidableEq
code: instance instDecidableEq [DecidableEq α] [DecidableEq M] : DecidableEq (α →₀ M) 
goal: DecidableEq (α →₀ M)

full_name: Finsupp.finite_support
code: theorem finite_support (f : α →₀ M) : Set.Finite (Function.support f) 
goal: (Function.support ⇑f).Finite

full_name: Finsupp.support_subset_iff
code: theorem support_subset_iff {s : Set α} {f : α →₀ M} :
    ↑f.support ⊆ s ↔ ∀ a ∉ s, f a = 0 
goal: ↑f.support ⊆ s ↔ ∀ a ∉ s, f a = 0

full_name: Finsupp.equivFunOnFinite_symm_apply_support
code: /-- Given `Finite α`, `equivFunOnFinite` is the `Equiv` between `α →₀ β` and `α → β`.
  (All functions on a finite type are finitely supported.) -/
@[simps]
def equivFunOnFinite [Finite α] : (α →₀ M) ≃ (α → M) 
goal: (Finsupp.equivFunOnFinite.symm f).support = ⋯.toFinset

full_name: Finsupp.equivFunOnFinite_apply
code: /-- Given `Finite α`, `equivFunOnFinite` is the `Equiv` between `α →₀ β` and `α → β`.
  (All functions on a finite type are finitely supported.) -/
@[simps]
def equivFunOnFinite [Finite α] : (α →₀ M) ≃ (α → M) 
goal: ∀ (a : α →₀ M) (a_1 : α), Finsupp.equivFunOnFinite a a_1 = a a_1

full_name: Finsupp.equivFunOnFinite
code: /-- Given `Finite α`, `equivFunOnFinite` is the `Equiv` between `α →₀ β` and `α → β`.
  (All functions on a finite type are finitely supported.) -/
@[simps]
def equivFunOnFinite [Finite α] : (α →₀ M) ≃ (α → M) 
goal: (α →₀ M) ≃ (α → M)

full_name: Finsupp.equivFunOnFinite_symm_apply_toFun
code: /-- Given `Finite α`, `equivFunOnFinite` is the `Equiv` between `α →₀ β` and `α → β`.
  (All functions on a finite type are finitely supported.) -/
@[simps]
def equivFunOnFinite [Finite α] : (α →₀ M) ≃ (α → M) 
goal: ∀ (a : α), (Finsupp.equivFunOnFinite.symm f) a = f a

full_name: Finsupp.equivFunOnFinite_symm_coe
code: @[simp]
theorem equivFunOnFinite_symm_coe {α} [Finite α] (f : α →₀ M) : equivFunOnFinite.symm f = f 
goal: Finsupp.equivFunOnFinite.symm ⇑f = f

full_name: Equiv.finsuppUnique_apply
code: /--
If `α` has a unique term, the type of finitely supported functions `α →₀ β` is equivalent to `β`.
-/
@[simps!]
noncomputable def _root_.Equiv.finsuppUnique {ι : Type*} [Unique ι] : (ι →₀ M) ≃ M 
goal: ∀ (a : ι →₀ M), Equiv.finsuppUnique a = a default

full_name: Equiv.finsuppUnique_symm_apply_support_val
code: /--
If `α` has a unique term, the type of finitely supported functions `α →₀ β` is equivalent to `β`.
-/
@[simps!]
noncomputable def _root_.Equiv.finsuppUnique {ι : Type*} [Unique ι] : (ι →₀ M) ≃ M 
goal: ∀ (a : M), (Equiv.finsuppUnique.symm a).support.val = Multiset.map Subtype.val Finset.univ.val

full_name: Equiv.finsuppUnique_symm_apply_toFun
code: /--
If `α` has a unique term, the type of finitely supported functions `α →₀ β` is equivalent to `β`.
-/
@[simps!]
noncomputable def _root_.Equiv.finsuppUnique {ι : Type*} [Unique ι] : (ι →₀ M) ≃ M 
goal: ∀ (a : M) (a_1 : ι), (Equiv.finsuppUnique.symm a) a_1 = a

full_name: Equiv.finsuppUnique
code: /--
If `α` has a unique term, the type of finitely supported functions `α →₀ β` is equivalent to `β`.
-/
@[simps!]
noncomputable def _root_.Equiv.finsuppUnique {ι : Type*} [Unique ι] : (ι →₀ M) ≃ M 
goal: (ι →₀ M) ≃ M

full_name: Finsupp.unique_ext
code: @[ext]
theorem unique_ext [Unique α] {f g : α →₀ M} (h : f default = g default) : f = g 
goal: f = g

full_name: Finsupp.unique_ext_iff
code: protected theorem unique_ext_iff [Unique α] {f g : α →₀ M} : f = g ↔ f default = g default 
goal: f = g ↔ f default = g default

full_name: Finsupp.single
code: /-- `single a b` is the finitely supported function with value `b` at `a` and zero otherwise. -/
def single (a : α) (b : M) : α →₀ M 
goal: α →₀ M

full_name: Finsupp.single_apply
code: theorem single_apply [Decidable (a = a')] : single a b a' = if a = a' then b else 0 
goal: (Finsupp.single a b) a' = if a = a' then b else 0

full_name: Finsupp.single_apply_left
code: theorem single_apply_left {f : α → β} (hf : Function.Injective f) (x z : α) (y : M) :
    single (f x) y (f z) = single x y z 
goal: (Finsupp.single (f x) y) (f z) = (Finsupp.single x y) z

full_name: Finsupp.single_eq_set_indicator
code: theorem single_eq_set_indicator : ⇑(single a b) = Set.indicator {a} fun _ => b 
goal: ⇑(Finsupp.single a b) = {a}.indicator fun x => b

full_name: Finsupp.single_eq_same
code: @[simp]
theorem single_eq_same : (single a b : α →₀ M) a = b 
goal: (Finsupp.single a b) a = b

full_name: Finsupp.single_eq_of_ne
code: @[simp]
theorem single_eq_of_ne (h : a ≠ a') : (single a b : α →₀ M) a' = 0 
goal: (Finsupp.single a b) a' = 0

full_name: Finsupp.single_eq_update
code: theorem single_eq_update [DecidableEq α] (a : α) (b : M) :
    ⇑(single a b) = Function.update (0 : _) a b 
goal: ⇑(Finsupp.single a b) = Function.update 0 a b

full_name: Finsupp.single_eq_pi_single
code: theorem single_eq_pi_single [DecidableEq α] (a : α) (b : M) : ⇑(single a b) = Pi.single a b 
goal: ⇑(Finsupp.single a b) = Pi.single a b

full_name: Finsupp.single_zero
code: @[simp]
theorem single_zero (a : α) : (single a 0 : α →₀ M) = 0 
goal: Finsupp.single a 0 = 0

full_name: Finsupp.single_of_single_apply
code: theorem single_of_single_apply (a a' : α) (b : M) :
    single a ((single a' b) a) = single a' (single a' b) a 
goal: Finsupp.single a ((Finsupp.single a' b) a) = (Finsupp.single a' (Finsupp.single a' b)) a

full_name: Finsupp.support_single_ne_zero
code: theorem support_single_ne_zero (a : α) (hb : b ≠ 0) : (single a b).support = {a} 
goal: (Finsupp.single a b).support = {a}

full_name: Finsupp.support_single_subset
code: theorem support_single_subset : (single a b).support ⊆ {a} 
goal: (Finsupp.single a b).support ⊆ {a}

full_name: Finsupp.single_apply_mem
code: theorem single_apply_mem (x) : single a b x ∈ ({0, b} : Set M) 
goal: (Finsupp.single a b) x ∈ {0, b}

full_name: Finsupp.range_single_subset
code: theorem range_single_subset : Set.range (single a b) ⊆ {0, b} 
goal: Set.range ⇑(Finsupp.single a b) ⊆ {0, b}

full_name: Finsupp.single_injective
code: /-- `Finsupp.single a b` is injective in `b`. For the statement that it is injective in `a`, see
`Finsupp.single_left_injective` -/
theorem single_injective (a : α) : Function.Injective (single a : M → α →₀ M) 
goal: Function.Injective (Finsupp.single a)

full_name: Finsupp.single_apply_eq_zero
code: theorem single_apply_eq_zero {a x : α} {b : M} : single a b x = 0 ↔ x = a → b = 0 
goal: (Finsupp.single a b) x = 0 ↔ x = a → b = 0

full_name: Finsupp.single_apply_ne_zero
code: theorem single_apply_ne_zero {a x : α} {b : M} : single a b x ≠ 0 ↔ x = a ∧ b ≠ 0 
goal: (Finsupp.single a b) x ≠ 0 ↔ x = a ∧ b ≠ 0

full_name: Finsupp.mem_support_single
code: theorem mem_support_single (a a' : α) (b : M) : a ∈ (single a' b).support ↔ a = a' ∧ b ≠ 0 
goal: a ∈ (Finsupp.single a' b).support ↔ a = a' ∧ b ≠ 0

full_name: Finsupp.eq_single_iff
code: theorem eq_single_iff {f : α →₀ M} {a b} : f = single a b ↔ f.support ⊆ {a} ∧ f a = b 
goal: f = Finsupp.single a b ↔ f.support ⊆ {a} ∧ f a = b

full_name: Finsupp.single_eq_single_iff
code: theorem single_eq_single_iff (a₁ a₂ : α) (b₁ b₂ : M) :
    single a₁ b₁ = single a₂ b₂ ↔ a₁ = a₂ ∧ b₁ = b₂ ∨ b₁ = 0 ∧ b₂ = 0 
goal: Finsupp.single a₁ b₁ = Finsupp.single a₂ b₂ ↔ a₁ = a₂ ∧ b₁ = b₂ ∨ b₁ = 0 ∧ b₂ = 0

full_name: Finsupp.single_left_injective
code: /-- `Finsupp.single a b` is injective in `a`. For the statement that it is injective in `b`, see
`Finsupp.single_injective` -/
theorem single_left_injective (h : b ≠ 0) : Function.Injective fun a : α => single a b 
goal: Function.Injective fun a => Finsupp.single a b

full_name: Finsupp.single_left_inj
code: theorem single_left_inj (h : b ≠ 0) : single a b = single a' b ↔ a = a' 
goal: Finsupp.single a b = Finsupp.single a' b ↔ a = a'

full_name: Finsupp.support_single_ne_bot
code: theorem support_single_ne_bot (i : α) (h : b ≠ 0) : (single i b).support ≠ ⊥ 
goal: (Finsupp.single i b).support ≠ ⊥

full_name: Finsupp.support_single_disjoint
code: theorem support_single_disjoint {b' : M} (hb : b ≠ 0) (hb' : b' ≠ 0) {i j : α} :
    Disjoint (single i b).support (single j b').support ↔ i ≠ j 
goal: Disjoint (Finsupp.single i b).support (Finsupp.single j b').support ↔ i ≠ j

full_name: Finsupp.single_eq_zero
code: @[simp]
theorem single_eq_zero : single a b = 0 ↔ b = 0 
goal: Finsupp.single a b = 0 ↔ b = 0

full_name: Finsupp.single_swap
code: theorem single_swap (a₁ a₂ : α) (b : M) : single a₁ b a₂ = single a₂ b a₁ 
goal: (Finsupp.single a₁ b) a₂ = (Finsupp.single a₂ b) a₁

full_name: Finsupp.instNontrivial
code: instance instNontrivial [Nonempty α] [Nontrivial M] : Nontrivial (α →₀ M) 
goal: Nontrivial (α →₀ M)

full_name: Finsupp.unique_single
code: theorem unique_single [Unique α] (x : α →₀ M) : x = single default (x default) 
goal: x = Finsupp.single default (x default)

full_name: Finsupp.unique_single_eq_iff
code: @[simp]
theorem unique_single_eq_iff [Unique α] {b' : M} : single a b = single a' b' ↔ b = b' 
goal: Finsupp.single a b = Finsupp.single a' b' ↔ b = b'

full_name: Finsupp.apply_single
code: lemma apply_single [AddCommMonoid N] [AddCommMonoid P]
    {F : Type*} [FunLike F N P] [AddMonoidHomClass F N P] (e : F)
    (a : α) (n : N) (b : α) :
    e ((single a n) b) = single a (e n) b 
goal: e ((Finsupp.single a n) b) = (Finsupp.single a (e n)) b

full_name: Finsupp.support_eq_singleton
code: theorem support_eq_singleton {f : α →₀ M} {a : α} :
    f.support = {a} ↔ f a ≠ 0 ∧ f = single a (f a) 
goal: f.support = {a} ↔ f a ≠ 0 ∧ f = Finsupp.single a (f a)

full_name: Finsupp.support_eq_singleton'
code: theorem support_eq_singleton' {f : α →₀ M} {a : α} :
    f.support = {a} ↔ ∃ b ≠ 0, f = single a b 
goal: f.support = {a} ↔ ∃ b, b ≠ 0 ∧ f = Finsupp.single a b

full_name: Finsupp.card_support_eq_one
code: theorem card_support_eq_one {f : α →₀ M} :
    card f.support = 1 ↔ ∃ a, f a ≠ 0 ∧ f = single a (f a) 
goal: f.support.card = 1 ↔ ∃ a, f a ≠ 0 ∧ f = Finsupp.single a (f a)

full_name: Finsupp.card_support_eq_one'
code: theorem card_support_eq_one' {f : α →₀ M} :
    card f.support = 1 ↔ ∃ a, ∃ b ≠ 0, f = single a b 
goal: f.support.card = 1 ↔ ∃ a b, b ≠ 0 ∧ f = Finsupp.single a b

full_name: Finsupp.support_subset_singleton
code: theorem support_subset_singleton {f : α →₀ M} {a : α} : f.support ⊆ {a} ↔ f = single a (f a) 
goal: f.support ⊆ {a} ↔ f = Finsupp.single a (f a)

full_name: Finsupp.support_subset_singleton'
code: theorem support_subset_singleton' {f : α →₀ M} {a : α} : f.support ⊆ {a} ↔ ∃ b, f = single a b 
goal: f.support ⊆ {a} ↔ ∃ b, f = Finsupp.single a b

full_name: Finsupp.card_support_le_one
code: theorem card_support_le_one [Nonempty α] {f : α →₀ M} :
    card f.support ≤ 1 ↔ ∃ a, f = single a (f a) 
goal: f.support.card ≤ 1 ↔ ∃ a, f = Finsupp.single a (f a)

full_name: Finsupp.card_support_le_one'
code: theorem card_support_le_one' [Nonempty α] {f : α →₀ M} :
    card f.support ≤ 1 ↔ ∃ a b, f = single a b 
goal: f.support.card ≤ 1 ↔ ∃ a b, f = Finsupp.single a b

full_name: Finsupp.equivFunOnFinite_single
code: @[simp]
theorem equivFunOnFinite_single [DecidableEq α] [Finite α] (x : α) (m : M) :
    Finsupp.equivFunOnFinite (Finsupp.single x m) = Pi.single x m 
goal: Finsupp.equivFunOnFinite (Finsupp.single x m) = Pi.single x m

full_name: Finsupp.equivFunOnFinite_symm_single
code: @[simp]
theorem equivFunOnFinite_symm_single [DecidableEq α] [Finite α] (x : α) (m : M) :
    Finsupp.equivFunOnFinite.symm (Pi.single x m) = Finsupp.single x m 
goal: Finsupp.equivFunOnFinite.symm (Pi.single x m) = Finsupp.single x m

full_name: Finsupp.update
code: /-- Replace the value of a `α →₀ M` at a given point `a : α` by a given value `b : M`.
If `b = 0`, this amounts to removing `a` from the `Finsupp.support`.
Otherwise, if `a` was not in the `Finsupp.support`, it is added to it.

This is the finitely-supported version of `Function.update`. -/
def update (f : α →₀ M) (a : α) (b : M) : α →₀ M 
goal: α →₀ M

full_name: Finsupp.coe_update
code: @[simp, norm_cast]
theorem coe_update [DecidableEq α] : (f.update a b : α → M) = Function.update f a b 
goal: ⇑(f.update a b) = Function.update (⇑f) a b

full_name: Finsupp.update_self
code: @[simp]
theorem update_self : f.update a (f a) = f 
goal: f.update a (f a) = f

full_name: Finsupp.zero_update
code: @[simp]
theorem zero_update : update 0 a b = single a b 
goal: Finsupp.update 0 a b = Finsupp.single a b

full_name: Finsupp.support_update
code: theorem support_update [DecidableEq α] [DecidableEq M] :
    support (f.update a b) = if b = 0 then f.support.erase a else insert a f.support 
goal: (f.update a b).support = if b = 0 then f.support.erase a else insert a f.support

full_name: Finsupp.support_update_zero
code: @[simp]
theorem support_update_zero [DecidableEq α] : support (f.update a 0) = f.support.erase a 
goal: (f.update a 0).support = f.support.erase a

full_name: Finsupp.support_update_ne_zero
code: theorem support_update_ne_zero [DecidableEq α] (h : b ≠ 0) :
    support (f.update a b) = insert a f.support 
goal: (f.update a b).support = insert a f.support

full_name: Finsupp.support_update_subset
code: theorem support_update_subset [DecidableEq α] [DecidableEq M] :
    support (f.update a b) ⊆ insert a f.support 
goal: (f.update a b).support ⊆ insert a f.support

full_name: Finsupp.update_comm
code: theorem update_comm (f : α →₀ M) {a₁ a₂ : α} (h : a₁ ≠ a₂) (m₁ m₂ : M) :
    update (update f a₁ m₁) a₂ m₂ = update (update f a₂ m₂) a₁ m₁ 
goal: (f.update a₁ m₁).update a₂ m₂ = (f.update a₂ m₂).update a₁ m₁

full_name: Finsupp.update_idem
code: @[simp] theorem update_idem (f : α →₀ M) (a : α) (b c : M) :
    update (update f a b) a c = update f a c 
goal: (f.update a b).update a c = f.update a c

full_name: Finsupp.erase
code: /--
`erase a f` is the finitely supported function equal to `f` except at `a` where it is equal to `0`.
If `a` is not in the support of `f` then `erase a f = f`.
-/
def erase (a : α) (f : α →₀ M) : α →₀ M 
goal: α →₀ M

full_name: Finsupp.support_erase
code: @[simp]
theorem support_erase [DecidableEq α] {a : α} {f : α →₀ M} :
    (f.erase a).support = f.support.erase a 
goal: (Finsupp.erase a f).support = f.support.erase a

full_name: Finsupp.erase_same
code: @[simp]
theorem erase_same {a : α} {f : α →₀ M} : (f.erase a) a = 0 
goal: (Finsupp.erase a f) a = 0

full_name: Finsupp.erase_ne
code: @[simp]
theorem erase_ne {a a' : α} {f : α →₀ M} (h : a' ≠ a) : (f.erase a) a' = f a' 
goal: (Finsupp.erase a f) a' = f a'

full_name: Finsupp.erase_apply
code: theorem erase_apply [DecidableEq α] {a a' : α} {f : α →₀ M} :
    f.erase a a' = if a' = a then 0 else f a' 
goal: (Finsupp.erase a f) a' = if a' = a then 0 else f a'

full_name: Finsupp.erase_single
code: @[simp]
theorem erase_single {a : α} {b : M} : erase a (single a b) = 0 
goal: Finsupp.erase a (Finsupp.single a b) = 0

full_name: Finsupp.erase_single_ne
code: theorem erase_single_ne {a a' : α} {b : M} (h : a ≠ a') : erase a (single a' b) = single a' b 
goal: Finsupp.erase a (Finsupp.single a' b) = Finsupp.single a' b

full_name: Finsupp.erase_of_not_mem_support
code: @[simp]
theorem erase_of_not_mem_support {f : α →₀ M} {a} (haf : a ∉ f.support) : erase a f = f 
goal: Finsupp.erase a f = f

full_name: Finsupp.erase_zero
code: @[simp, nolint simpNF] -- Porting note: simpNF linter claims simp can prove this, it can not
theorem erase_zero (a : α) : erase a (0 : α →₀ M) = 0 
goal: Finsupp.erase a 0 = 0

full_name: Finsupp.erase_eq_update_zero
code: theorem erase_eq_update_zero (f : α →₀ M) (a : α) : f.erase a = update f a 0 
goal: Finsupp.erase a f = f.update a 0

full_name: Finsupp.erase_update_of_ne
code: theorem erase_update_of_ne (f : α →₀ M) {a a' : α} (ha : a ≠ a') (b : M) :
    erase a (update f a' b) = update (erase a f) a' b 
goal: Finsupp.erase a (f.update a' b) = (Finsupp.erase a f).update a' b

full_name: Finsupp.erase_idem
code: theorem erase_idem (f : α →₀ M) (a : α) :
    erase a (erase a f) = erase a f 
goal: Finsupp.erase a (Finsupp.erase a f) = Finsupp.erase a f

full_name: Finsupp.update_erase_eq_update
code: @[simp] theorem update_erase_eq_update (f : α →₀ M) (a : α) (b : M) :
    update (erase a f) a b = update f a b 
goal: (Finsupp.erase a f).update a b = f.update a b

full_name: Finsupp.erase_update_eq_erase
code: @[simp] theorem erase_update_eq_erase (f : α →₀ M) (a : α) (b : M) :
    erase a (update f a b) = erase a f 
goal: Finsupp.erase a (f.update a b) = Finsupp.erase a f

full_name: Finsupp.onFinset
code: /-- `Finsupp.onFinset s f hf` is the finsupp function representing `f` restricted to the finset `s`.
The function must be `0` outside of `s`. Use this when the set needs to be filtered anyways,
otherwise a better set representation is often available. -/
def onFinset (s : Finset α) (f : α → M) (hf : ∀ a, f a ≠ 0 → a ∈ s) : α →₀ M 
goal: α →₀ M

full_name: Finsupp.coe_onFinset
code: @[simp, norm_cast] lemma coe_onFinset (s : Finset α) (f : α → M) (hf) : onFinset s f hf = f 
goal: ⇑(Finsupp.onFinset s f hf) = f

full_name: Finsupp.onFinset_apply
code: @[simp]
theorem onFinset_apply {s : Finset α} {f : α → M} {hf a} : (onFinset s f hf : α →₀ M) a = f a 
goal: (Finsupp.onFinset s f hf) a = f a

full_name: Finsupp.support_onFinset_subset
code: @[simp]
theorem support_onFinset_subset {s : Finset α} {f : α → M} {hf} :
    (onFinset s f hf).support ⊆ s 
goal: (Finsupp.onFinset s f hf).support ⊆ s

full_name: Finsupp.mem_support_onFinset
code: theorem mem_support_onFinset {s : Finset α} {f : α → M} (hf : ∀ a : α, f a ≠ 0 → a ∈ s) {a : α} :
    a ∈ (Finsupp.onFinset s f hf).support ↔ f a ≠ 0 
goal: a ∈ (Finsupp.onFinset s f hf).support ↔ f a ≠ 0

full_name: Finsupp.support_onFinset
code: theorem support_onFinset [DecidableEq M] {s : Finset α} {f : α → M}
    (hf : ∀ a : α, f a ≠ 0 → a ∈ s) :
    (Finsupp.onFinset s f hf).support = s.filter fun a => f a ≠ 0 
goal: (Finsupp.onFinset s f hf).support = Finset.filter (fun a => f a ≠ 0) s

full_name: Finsupp.ofSupportFinite
code: /-- The natural `Finsupp` induced by the function `f` given that it has finite support. -/
noncomputable def ofSupportFinite (f : α → M) (hf : (Function.support f).Finite) : α →₀ M 
goal: α →₀ M

full_name: Finsupp.ofSupportFinite_coe
code: theorem ofSupportFinite_coe {f : α → M} {hf : (Function.support f).Finite} :
    (ofSupportFinite f hf : α → M) = f 
goal: ⇑(Finsupp.ofSupportFinite f hf) = f

full_name: Finsupp.instCanLift
code: instance instCanLift : CanLift (α → M) (α →₀ M) (⇑) fun f => (Function.support f).Finite 
goal: CanLift (α → M) (α →₀ M) DFunLike.coe fun f => (Function.support f).Finite

full_name: Finsupp.mapRange
code: /-- The composition of `f : M → N` and `g : α →₀ M` is `mapRange f hf g : α →₀ N`,
which is well-defined when `f 0 = 0`.

This preserves the structure on `f`, and exists in various bundled forms for when `f` is itself
bundled (defined in `Data/Finsupp/Basic`):

* `Finsupp.mapRange.equiv`
* `Finsupp.mapRange.zeroHom`
* `Finsupp.mapRange.addMonoidHom`
* `Finsupp.mapRange.addEquiv`
* `Finsupp.mapRange.linearMap`
* `Finsupp.mapRange.linearEquiv`
-/
def mapRange (f : M → N) (hf : f 0 = 0) (g : α →₀ M) : α →₀ N 
goal: α →₀ N

full_name: Finsupp.mapRange_apply
code: @[simp]
theorem mapRange_apply {f : M → N} {hf : f 0 = 0} {g : α →₀ M} {a : α} :
    mapRange f hf g a = f (g a) 
goal: (Finsupp.mapRange f hf g) a = f (g a)

full_name: Finsupp.mapRange_zero
code: @[simp]
theorem mapRange_zero {f : M → N} {hf : f 0 = 0} : mapRange f hf (0 : α →₀ M) = 0 
goal: Finsupp.mapRange f hf 0 = 0

full_name: Finsupp.mapRange_id
code: @[simp]
theorem mapRange_id (g : α →₀ M) : mapRange id rfl g = g 
goal: Finsupp.mapRange id ⋯ g = g

full_name: Finsupp.mapRange_comp
code: theorem mapRange_comp (f : N → P) (hf : f 0 = 0) (f₂ : M → N) (hf₂ : f₂ 0 = 0) (h : (f ∘ f₂) 0 = 0)
    (g : α →₀ M) : mapRange (f ∘ f₂) h g = mapRange f hf (mapRange f₂ hf₂ g) 
goal: Finsupp.mapRange (f ∘ f₂) h g = Finsupp.mapRange f hf (Finsupp.mapRange f₂ hf₂ g)

full_name: Finsupp.support_mapRange
code: theorem support_mapRange {f : M → N} {hf : f 0 = 0} {g : α →₀ M} :
    (mapRange f hf g).support ⊆ g.support 
goal: (Finsupp.mapRange f hf g).support ⊆ g.support

full_name: Finsupp.mapRange_single
code: @[simp]
theorem mapRange_single {f : M → N} {hf : f 0 = 0} {a : α} {b : M} :
    mapRange f hf (single a b) = single a (f b) 
goal: Finsupp.mapRange f hf (Finsupp.single a b) = Finsupp.single a (f b)

full_name: Finsupp.support_mapRange_of_injective
code: theorem support_mapRange_of_injective {e : M → N} (he0 : e 0 = 0) (f : ι →₀ M)
    (he : Function.Injective e) : (Finsupp.mapRange e he0 f).support = f.support 
goal: (Finsupp.mapRange e he0 f).support = f.support

full_name: Finsupp.embDomain
code: /-- Given `f : α ↪ β` and `v : α →₀ M`, `Finsupp.embDomain f v : β →₀ M`
is the finitely supported function whose value at `f a : β` is `v a`.
For a `b : β` outside the range of `f`, it is zero. -/
def embDomain (f : α ↪ β) (v : α →₀ M) : β →₀ M 
goal: β →₀ M

full_name: Finsupp.support_embDomain
code: @[simp]
theorem support_embDomain (f : α ↪ β) (v : α →₀ M) : (embDomain f v).support = v.support.map f 
goal: (Finsupp.embDomain f v).support = Finset.map f v.support

full_name: Finsupp.embDomain_zero
code: @[simp]
theorem embDomain_zero (f : α ↪ β) : (embDomain f 0 : β →₀ M) = 0 
goal: Finsupp.embDomain f 0 = 0

full_name: Finsupp.embDomain_apply
code: @[simp]
theorem embDomain_apply (f : α ↪ β) (v : α →₀ M) (a : α) : embDomain f v (f a) = v a 
goal: (Finsupp.embDomain f v) (f a) = v a

full_name: Finsupp.embDomain_notin_range
code: theorem embDomain_notin_range (f : α ↪ β) (v : α →₀ M) (a : β) (h : a ∉ Set.range f) :
    embDomain f v a = 0 
goal: (Finsupp.embDomain f v) a = 0

full_name: Finsupp.embDomain_injective
code: theorem embDomain_injective (f : α ↪ β) : Function.Injective (embDomain f : (α →₀ M) → β →₀ M) 
goal: Function.Injective (Finsupp.embDomain f)

full_name: Finsupp.embDomain_inj
code: @[simp]
theorem embDomain_inj {f : α ↪ β} {l₁ l₂ : α →₀ M} : embDomain f l₁ = embDomain f l₂ ↔ l₁ = l₂ 
goal: Finsupp.embDomain f l₁ = Finsupp.embDomain f l₂ ↔ l₁ = l₂

full_name: Finsupp.embDomain_eq_zero
code: @[simp]
theorem embDomain_eq_zero {f : α ↪ β} {l : α →₀ M} : embDomain f l = 0 ↔ l = 0 
goal: Finsupp.embDomain f l = 0 ↔ l = 0

full_name: Finsupp.embDomain_mapRange
code: theorem embDomain_mapRange (f : α ↪ β) (g : M → N) (p : α →₀ M) (hg : g 0 = 0) :
    embDomain f (mapRange g hg p) = mapRange g hg (embDomain f p) 
goal: Finsupp.embDomain f (Finsupp.mapRange g hg p) = Finsupp.mapRange g hg (Finsupp.embDomain f p)

full_name: Finsupp.single_of_embDomain_single
code: theorem single_of_embDomain_single (l : α →₀ M) (f : α ↪ β) (a : β) (b : M) (hb : b ≠ 0)
    (h : l.embDomain f = single a b) : ∃ x, l = single x b ∧ f x = a 
goal: ∃ x, l = Finsupp.single x b ∧ f x = a

full_name: Finsupp.embDomain_single
code: @[simp]
theorem embDomain_single (f : α ↪ β) (a : α) (m : M) :
    embDomain f (single a m) = single (f a) m 
goal: Finsupp.embDomain f (Finsupp.single a m) = Finsupp.single (f a) m

full_name: Finsupp.zipWith
code: /-- Given finitely supported functions `g₁ : α →₀ M` and `g₂ : α →₀ N` and function `f : M → N → P`,
`Finsupp.zipWith f hf g₁ g₂` is the finitely supported function `α →₀ P` satisfying
`zipWith f hf g₁ g₂ a = f (g₁ a) (g₂ a)`, which is well-defined when `f 0 0 = 0`. -/
def zipWith (f : M → N → P) (hf : f 0 0 = 0) (g₁ : α →₀ M) (g₂ : α →₀ N) : α →₀ P 
goal: α →₀ P

full_name: Finsupp.zipWith_apply
code: @[simp]
theorem zipWith_apply {f : M → N → P} {hf : f 0 0 = 0} {g₁ : α →₀ M} {g₂ : α →₀ N} {a : α} :
    zipWith f hf g₁ g₂ a = f (g₁ a) (g₂ a) 
goal: (Finsupp.zipWith f hf g₁ g₂) a = f (g₁ a) (g₂ a)

full_name: Finsupp.support_zipWith
code: theorem support_zipWith [D : DecidableEq α] {f : M → N → P} {hf : f 0 0 = 0} {g₁ : α →₀ M}
    {g₂ : α →₀ N} : (zipWith f hf g₁ g₂).support ⊆ g₁.support ∪ g₂.support 
goal: (Finsupp.zipWith f hf g₁ g₂).support ⊆ g₁.support ∪ g₂.support

full_name: Finsupp.zipWith_single_single
code: @[simp]
theorem zipWith_single_single (f : M → N → P) (hf : f 0 0 = 0) (a : α) (m : M) (n : N) :
    zipWith f hf (single a m) (single a n) = single a (f m n) 
goal: Finsupp.zipWith f hf (Finsupp.single a m) (Finsupp.single a n) = Finsupp.single a (f m n)

full_name: Finsupp.instAdd
code: instance instAdd : Add (α →₀ M) 
goal: Add (α →₀ M)

full_name: Finsupp.coe_add
code: @[simp, norm_cast] lemma coe_add (f g : α →₀ M) : ⇑(f + g) = f + g 
goal: ⇑(f + g) = ⇑f + ⇑g

full_name: Finsupp.add_apply
code: theorem add_apply (g₁ g₂ : α →₀ M) (a : α) : (g₁ + g₂) a = g₁ a + g₂ a 
goal: (g₁ + g₂) a = g₁ a + g₂ a

full_name: Finsupp.support_add
code: theorem support_add [DecidableEq α] {g₁ g₂ : α →₀ M} :
    (g₁ + g₂).support ⊆ g₁.support ∪ g₂.support 
goal: (g₁ + g₂).support ⊆ g₁.support ∪ g₂.support

full_name: Finsupp.support_add_eq
code: theorem support_add_eq [DecidableEq α] {g₁ g₂ : α →₀ M} (h : Disjoint g₁.support g₂.support) :
    (g₁ + g₂).support = g₁.support ∪ g₂.support 
goal: (g₁ + g₂).support = g₁.support ∪ g₂.support

full_name: Finsupp.single_add
code: @[simp]
theorem single_add (a : α) (b₁ b₂ : M) : single a (b₁ + b₂) = single a b₁ + single a b₂ 
goal: Finsupp.single a (b₁ + b₂) = Finsupp.single a b₁ + Finsupp.single a b₂

full_name: Finsupp.instAddZeroClass
code: instance instAddZeroClass : AddZeroClass (α →₀ M) 
goal: AddZeroClass (α →₀ M)

full_name: Finsupp.instIsLeftCancelAdd
code: instance instIsLeftCancelAdd [IsLeftCancelAdd M] : IsLeftCancelAdd (α →₀ M) 
goal: IsLeftCancelAdd (α →₀ M)

full_name: Finsupp.addEquivFunOnFinite
code: /-- When ι is finite and M is an AddMonoid,
  then Finsupp.equivFunOnFinite gives an AddEquiv -/
noncomputable def addEquivFunOnFinite {ι : Type*} [Finite ι] :
    (ι →₀ M) ≃+ (ι → M) 
goal: (ι →₀ M) ≃+ (ι → M)

full_name: AddEquiv.finsuppUnique
code: /-- AddEquiv between (ι →₀ M) and M, when ι has a unique element -/
noncomputable def _root_.AddEquiv.finsuppUnique {ι : Type*} [Unique ι] :
    (ι →₀ M) ≃+ M 
goal: (ι →₀ M) ≃+ M

full_name: AddEquiv.finsuppUnique_symm
code: lemma _root_.AddEquiv.finsuppUnique_symm {M : Type*} [AddZeroClass M] (d : M) :
    AddEquiv.finsuppUnique.symm d = single () d 
goal: AddEquiv.finsuppUnique.symm d = Finsupp.single () d

full_name: Finsupp.instIsRightCancelAdd
code: instance instIsRightCancelAdd [IsRightCancelAdd M] : IsRightCancelAdd (α →₀ M) 
goal: IsRightCancelAdd (α →₀ M)

full_name: Finsupp.instIsCancelAdd
code: instance instIsCancelAdd [IsCancelAdd M] : IsCancelAdd (α →₀ M) 
goal: IsCancelAdd (α →₀ M)

full_name: Finsupp.singleAddHom
code: /-- `Finsupp.single` as an `AddMonoidHom`.

See `Finsupp.lsingle` in `LinearAlgebra/Finsupp` for the stronger version as a linear map. -/
@[simps]
def singleAddHom (a : α) : M →+ α →₀ M 
goal: M →+ α →₀ M

full_name: Finsupp.singleAddHom_apply
code: /-- `Finsupp.single` as an `AddMonoidHom`.

See `Finsupp.lsingle` in `LinearAlgebra/Finsupp` for the stronger version as a linear map. -/
@[simps]
def singleAddHom (a : α) : M →+ α →₀ M 
goal: (Finsupp.singleAddHom a) b = Finsupp.single a b

full_name: Finsupp.applyAddHom_apply
code: /-- Evaluation of a function `f : α →₀ M` at a point as an additive monoid homomorphism.

See `Finsupp.lapply` in `LinearAlgebra/Finsupp` for the stronger version as a linear map. -/
@[simps apply]
def applyAddHom (a : α) : (α →₀ M) →+ M 
goal: (Finsupp.applyAddHom a) g = g a

full_name: Finsupp.applyAddHom
code: /-- Evaluation of a function `f : α →₀ M` at a point as an additive monoid homomorphism.

See `Finsupp.lapply` in `LinearAlgebra/Finsupp` for the stronger version as a linear map. -/
@[simps apply]
def applyAddHom (a : α) : (α →₀ M) →+ M 
goal: (α →₀ M) →+ M

full_name: Finsupp.coeFnAddHom
code: /-- Coercion from a `Finsupp` to a function type is an `AddMonoidHom`. -/
@[simps]
noncomputable def coeFnAddHom : (α →₀ M) →+ α → M 
goal: (α →₀ M) →+ α → M

full_name: Finsupp.coeFnAddHom_apply
code: /-- Coercion from a `Finsupp` to a function type is an `AddMonoidHom`. -/
@[simps]
noncomputable def coeFnAddHom : (α →₀ M) →+ α → M 
goal: ∀ (a : α →₀ M) (a_1 : α), Finsupp.coeFnAddHom a a_1 = a a_1

full_name: Finsupp.update_eq_single_add_erase
code: theorem update_eq_single_add_erase (f : α →₀ M) (a : α) (b : M) :
    f.update a b = single a b + f.erase a 
goal: f.update a b = Finsupp.single a b + Finsupp.erase a f

full_name: Finsupp.update_eq_erase_add_single
code: theorem update_eq_erase_add_single (f : α →₀ M) (a : α) (b : M) :
    f.update a b = f.erase a + single a b 
goal: f.update a b = Finsupp.erase a f + Finsupp.single a b

full_name: Finsupp.single_add_erase
code: theorem single_add_erase (a : α) (f : α →₀ M) : single a (f a) + f.erase a = f 
goal: Finsupp.single a (f a) + Finsupp.erase a f = f

full_name: Finsupp.erase_add_single
code: theorem erase_add_single (a : α) (f : α →₀ M) : f.erase a + single a (f a) = f 
goal: Finsupp.erase a f + Finsupp.single a (f a) = f

full_name: Finsupp.erase_add
code: @[simp]
theorem erase_add (a : α) (f f' : α →₀ M) : erase a (f + f') = erase a f + erase a f' 
goal: Finsupp.erase a (f + f') = Finsupp.erase a f + Finsupp.erase a f'

full_name: Finsupp.eraseAddHom
code: /-- `Finsupp.erase` as an `AddMonoidHom`. -/
@[simps]
def eraseAddHom (a : α) : (α →₀ M) →+ α →₀ M 
goal: (α →₀ M) →+ α →₀ M

full_name: Finsupp.eraseAddHom_apply
code: /-- `Finsupp.erase` as an `AddMonoidHom`. -/
@[simps]
def eraseAddHom (a : α) : (α →₀ M) →+ α →₀ M 
goal: (Finsupp.eraseAddHom a) f = Finsupp.erase a f

full_name: Finsupp.induction
code: @[elab_as_elim]
protected theorem induction {p : (α →₀ M) → Prop} (f : α →₀ M) (h0 : p 0)
    (ha : ∀ (a b) (f : α →₀ M), a ∉ f.support → b ≠ 0 → p f → p (single a b + f)) : p f 
goal: p f

full_name: Finsupp.induction₂
code: theorem induction₂ {p : (α →₀ M) → Prop} (f : α →₀ M) (h0 : p 0)
    (ha : ∀ (a b) (f : α →₀ M), a ∉ f.support → b ≠ 0 → p f → p (f + single a b)) : p f 
goal: p f

full_name: Finsupp.induction_linear
code: theorem induction_linear {p : (α →₀ M) → Prop} (f : α →₀ M) (h0 : p 0)
    (hadd : ∀ f g : α →₀ M, p f → p g → p (f + g)) (hsingle : ∀ a b, p (single a b)) : p f 
goal: p f

full_name: Finsupp.add_closure_setOf_eq_single
code: @[simp]
theorem add_closure_setOf_eq_single :
    AddSubmonoid.closure { f : α →₀ M | ∃ a b, f = single a b } = ⊤ 
goal: AddSubmonoid.closure {f | ∃ a b, f = Finsupp.single a b} = ⊤

full_name: Finsupp.addHom_ext
code: /-- If two additive homomorphisms from `α →₀ M` are equal on each `single a b`,
then they are equal. -/
theorem addHom_ext [AddZeroClass N] ⦃f g : (α →₀ M) →+ N⦄
    (H : ∀ x y, f (single x y) = g (single x y)) : f = g 
goal: f = g

full_name: Finsupp.addHom_ext'
code: /-- If two additive homomorphisms from `α →₀ M` are equal on each `single a b`,
then they are equal.

We formulate this using equality of `AddMonoidHom`s so that `ext` tactic can apply a type-specific
extensionality lemma after this one.  E.g., if the fiber `M` is `ℕ` or `ℤ`, then it suffices to
verify `f (single a 1) = g (single a 1)`. -/
@[ext high]
theorem addHom_ext' [AddZeroClass N] ⦃f g : (α →₀ M) →+ N⦄
    (H : ∀ x, f.comp (singleAddHom x) = g.comp (singleAddHom x)) : f = g 
goal: f = g

full_name: Finsupp.mulHom_ext
code: theorem mulHom_ext [MulOneClass N] ⦃f g : Multiplicative (α →₀ M) →* N⦄
    (H : ∀ x y, f (Multiplicative.ofAdd <| single x y) = g (Multiplicative.ofAdd <| single x y)) :
    f = g 
goal: f = g

full_name: Finsupp.mulHom_ext'
code: @[ext]
theorem mulHom_ext' [MulOneClass N] {f g : Multiplicative (α →₀ M) →* N}
    (H : ∀ x, f.comp (AddMonoidHom.toMultiplicative (singleAddHom x)) =
              g.comp (AddMonoidHom.toMultiplicative (singleAddHom x))) :
    f = g 
goal: f = g

full_name: Finsupp.mapRange_add
code: theorem mapRange_add [AddZeroClass N] {f : M → N} {hf : f 0 = 0}
    (hf' : ∀ x y, f (x + y) = f x + f y) (v₁ v₂ : α →₀ M) :
    mapRange f hf (v₁ + v₂) = mapRange f hf v₁ + mapRange f hf v₂ 
goal: Finsupp.mapRange f hf (v₁ + v₂) = Finsupp.mapRange f hf v₁ + Finsupp.mapRange f hf v₂

full_name: Finsupp.mapRange_add'
code: theorem mapRange_add' [AddZeroClass N] [FunLike β M N] [AddMonoidHomClass β M N]
    {f : β} (v₁ v₂ : α →₀ M) :
    mapRange f (map_zero f) (v₁ + v₂) = mapRange f (map_zero f) v₁ + mapRange f (map_zero f) v₂ 
goal: Finsupp.mapRange ⇑f ⋯ (v₁ + v₂) = Finsupp.mapRange ⇑f ⋯ v₁ + Finsupp.mapRange ⇑f ⋯ v₂

full_name: Finsupp.embDomain.addMonoidHom
code: /-- Bundle `Finsupp.embDomain f` as an additive map from `α →₀ M` to `β →₀ M`. -/
@[simps]
def embDomain.addMonoidHom (f : α ↪ β) : (α →₀ M) →+ β →₀ M 
goal: (α →₀ M) →+ β →₀ M

full_name: Finsupp.embDomain.addMonoidHom_apply
code: /-- Bundle `Finsupp.embDomain f` as an additive map from `α →₀ M` to `β →₀ M`. -/
@[simps]
def embDomain.addMonoidHom (f : α ↪ β) : (α →₀ M) →+ β →₀ M 
goal: (Finsupp.embDomain.addMonoidHom f) v = Finsupp.embDomain f v

full_name: Finsupp.embDomain_add
code: @[simp]
theorem embDomain_add (f : α ↪ β) (v w : α →₀ M) :
    embDomain f (v + w) = embDomain f v + embDomain f w 
goal: Finsupp.embDomain f (v + w) = Finsupp.embDomain f v + Finsupp.embDomain f w

full_name: Finsupp.instNatSMul
code: /-- Note the general `SMul` instance for `Finsupp` doesn't apply as `ℕ` is not distributive
unless `β i`'s addition is commutative. -/
instance instNatSMul : SMul ℕ (α →₀ M) 
goal: SMul ℕ (α →₀ M)

full_name: Finsupp.instAddMonoid
code: instance instAddMonoid : AddMonoid (α →₀ M) 
goal: AddMonoid (α →₀ M)

full_name: Finsupp.instAddCommMonoid
code: instance instAddCommMonoid [AddCommMonoid M] : AddCommMonoid (α →₀ M) 
goal: AddCommMonoid (α →₀ M)

full_name: Finsupp.instNeg
code: instance instNeg [NegZeroClass G] : Neg (α →₀ G) 
goal: Neg (α →₀ G)

full_name: Finsupp.coe_neg
code: @[simp, norm_cast] lemma coe_neg [NegZeroClass G] (g : α →₀ G) : ⇑(-g) = -g 
goal: ⇑(-g) = -⇑g

full_name: Finsupp.neg_apply
code: theorem neg_apply [NegZeroClass G] (g : α →₀ G) (a : α) : (-g) a = -g a 
goal: (-g) a = -g a

full_name: Finsupp.mapRange_neg
code: theorem mapRange_neg [NegZeroClass G] [NegZeroClass H] {f : G → H} {hf : f 0 = 0}
    (hf' : ∀ x, f (-x) = -f x) (v : α →₀ G) : mapRange f hf (-v) = -mapRange f hf v 
goal: Finsupp.mapRange f hf (-v) = -Finsupp.mapRange f hf v

full_name: Finsupp.mapRange_neg'
code: theorem mapRange_neg' [AddGroup G] [SubtractionMonoid H] [FunLike β G H] [AddMonoidHomClass β G H]
    {f : β} (v : α →₀ G) :
    mapRange f (map_zero f) (-v) = -mapRange f (map_zero f) v 
goal: Finsupp.mapRange ⇑f ⋯ (-v) = -Finsupp.mapRange ⇑f ⋯ v

full_name: Finsupp.instSub
code: instance instSub [SubNegZeroMonoid G] : Sub (α →₀ G) 
goal: Sub (α →₀ G)

full_name: Finsupp.coe_sub
code: @[simp, norm_cast] lemma coe_sub [SubNegZeroMonoid G] (g₁ g₂ : α →₀ G) : ⇑(g₁ - g₂) = g₁ - g₂ 
goal: ⇑(g₁ - g₂) = ⇑g₁ - ⇑g₂

full_name: Finsupp.sub_apply
code: theorem sub_apply [SubNegZeroMonoid G] (g₁ g₂ : α →₀ G) (a : α) : (g₁ - g₂) a = g₁ a - g₂ a 
goal: (g₁ - g₂) a = g₁ a - g₂ a

full_name: Finsupp.mapRange_sub
code: theorem mapRange_sub [SubNegZeroMonoid G] [SubNegZeroMonoid H] {f : G → H} {hf : f 0 = 0}
    (hf' : ∀ x y, f (x - y) = f x - f y) (v₁ v₂ : α →₀ G) :
    mapRange f hf (v₁ - v₂) = mapRange f hf v₁ - mapRange f hf v₂ 
goal: Finsupp.mapRange f hf (v₁ - v₂) = Finsupp.mapRange f hf v₁ - Finsupp.mapRange f hf v₂

full_name: Finsupp.mapRange_sub'
code: theorem mapRange_sub' [AddGroup G] [SubtractionMonoid H] [FunLike β G H] [AddMonoidHomClass β G H]
    {f : β} (v₁ v₂ : α →₀ G) :
    mapRange f (map_zero f) (v₁ - v₂) = mapRange f (map_zero f) v₁ - mapRange f (map_zero f) v₂ 
goal: Finsupp.mapRange ⇑f ⋯ (v₁ - v₂) = Finsupp.mapRange ⇑f ⋯ v₁ - Finsupp.mapRange ⇑f ⋯ v₂

full_name: Finsupp.instIntSMul
code: /-- Note the general `SMul` instance for `Finsupp` doesn't apply as `ℤ` is not distributive
unless `β i`'s addition is commutative. -/
instance instIntSMul [AddGroup G] : SMul ℤ (α →₀ G) 
goal: SMul ℤ (α →₀ G)

full_name: Finsupp.instAddGroup
code: instance instAddGroup [AddGroup G] : AddGroup (α →₀ G) 
goal: AddGroup (α →₀ G)

full_name: Finsupp.instAddCommGroup
code: instance instAddCommGroup [AddCommGroup G] : AddCommGroup (α →₀ G) 
goal: AddCommGroup (α →₀ G)

full_name: Finsupp.single_add_single_eq_single_add_single
code: theorem single_add_single_eq_single_add_single [AddCommMonoid M] {k l m n : α} {u v : M}
    (hu : u ≠ 0) (hv : v ≠ 0) :
    single k u + single l v = single m u + single n v ↔
      (k = m ∧ l = n) ∨ (u = v ∧ k = n ∧ l = m) ∨ (u + v = 0 ∧ k = l ∧ m = n) 
goal: Finsupp.single k u + Finsupp.single l v = Finsupp.single m u + Finsupp.single n v ↔
  k = m ∧ l = n ∨ u = v ∧ k = n ∧ l = m ∨ u + v = 0 ∧ k = l ∧ m = n

full_name: Finsupp.support_neg
code: @[simp]
theorem support_neg [AddGroup G] (f : α →₀ G) : support (-f) = support f 
goal: (-f).support = f.support

full_name: Finsupp.support_sub
code: theorem support_sub [DecidableEq α] [AddGroup G] {f g : α →₀ G} :
    support (f - g) ⊆ support f ∪ support g 
goal: (f - g).support ⊆ f.support ∪ g.support

full_name: Finsupp.erase_eq_sub_single
code: theorem erase_eq_sub_single [AddGroup G] (f : α →₀ G) (a : α) : f.erase a = f - single a (f a) 
goal: Finsupp.erase a f = f - Finsupp.single a (f a)

full_name: Finsupp.update_eq_sub_add_single
code: theorem update_eq_sub_add_single [AddGroup G] (f : α →₀ G) (a : α) (b : G) :
    f.update a b = f - single a (f a) + single a b 
goal: f.update a b = f - Finsupp.single a (f a) + Finsupp.single a b