Documentation

Mathlib.Data.DFinsupp.Multiset

Equivalence between Multiset and -valued finitely supported functions #

This defines DFinsupp.toMultiset the equivalence between Π₀ a : α, ℕ and Multiset α, along with Multiset.toDFinsupp the reverse equivalence.

instance DFinsupp.addZeroClass' {α : Type u_1} {β : Type u_2} [AddZeroClass β] :
AddZeroClass (Π₀ (x : α), β)

Non-dependent special case of DFinsupp.addZeroClass to help typeclass search.

Equations
def DFinsupp.toMultiset {α : Type u_1} [DecidableEq α] :
(Π₀ (x : α), ) →+ Multiset α

A DFinsupp version of Finsupp.toMultiset.

Equations
Instances For
    @[simp]
    theorem DFinsupp.toMultiset_single {α : Type u_1} [DecidableEq α] (a : α) (n : ) :
    toMultiset (single a n) = Multiset.replicate n a
    def Multiset.toDFinsupp {α : Type u_1} [DecidableEq α] :
    Multiset α →+ Π₀ (x : α),

    A DFinsupp version of Multiset.toFinsupp.

    Equations
    Instances For
      @[simp]
      theorem Multiset.toDFinsupp_apply {α : Type u_1} [DecidableEq α] (s : Multiset α) (a : α) :
      (toDFinsupp s) a = count a s
      @[simp]
      theorem Multiset.toDFinsupp_support {α : Type u_1} [DecidableEq α] (s : Multiset α) :
      (toDFinsupp s).support = s.toFinset
      @[simp]
      theorem Multiset.toDFinsupp_replicate {α : Type u_1} [DecidableEq α] (a : α) (n : ) :
      toDFinsupp (replicate n a) = DFinsupp.single a n
      @[simp]
      theorem Multiset.toDFinsupp_singleton {α : Type u_1} [DecidableEq α] (a : α) :
      toDFinsupp {a} = DFinsupp.single a 1
      @[simp]
      theorem Multiset.equivDFinsupp_symm_apply {α : Type u_1} [DecidableEq α] (a : Π₀ (x : α), ) :
      equivDFinsupp.symm a = DFinsupp.toMultiset a
      @[simp]
      theorem Multiset.equivDFinsupp_apply {α : Type u_1} [DecidableEq α] (a : Multiset α) :
      equivDFinsupp a = toDFinsupp a
      @[simp]
      theorem Multiset.toDFinsupp_toMultiset {α : Type u_1} [DecidableEq α] (s : Multiset α) :
      DFinsupp.toMultiset (toDFinsupp s) = s
      @[simp]
      theorem Multiset.toDFinsupp_inj {α : Type u_1} [DecidableEq α] {s t : Multiset α} :
      toDFinsupp s = toDFinsupp t s = t
      @[simp]
      theorem Multiset.toDFinsupp_le_toDFinsupp {α : Type u_1} [DecidableEq α] {s t : Multiset α} :
      toDFinsupp s toDFinsupp t s t
      @[simp]
      theorem Multiset.toDFinsupp_lt_toDFinsupp {α : Type u_1} [DecidableEq α] {s t : Multiset α} :
      toDFinsupp s < toDFinsupp t s < t
      @[simp]
      theorem Multiset.toDFinsupp_inter {α : Type u_1} [DecidableEq α] (s t : Multiset α) :
      toDFinsupp (s t) = toDFinsupp s toDFinsupp t
      @[simp]
      theorem Multiset.toDFinsupp_union {α : Type u_1} [DecidableEq α] (s t : Multiset α) :
      toDFinsupp (s t) = toDFinsupp s toDFinsupp t
      @[simp]
      theorem DFinsupp.toMultiset_toDFinsupp {α : Type u_1} [DecidableEq α] (f : Π₀ (x : α), ) :
      Multiset.toDFinsupp (toMultiset f) = f
      @[simp]
      theorem DFinsupp.toMultiset_inj {α : Type u_1} [DecidableEq α] {f g : Π₀ (_a : α), } :
      toMultiset f = toMultiset g f = g
      @[simp]
      theorem DFinsupp.toMultiset_le_toMultiset {α : Type u_1} [DecidableEq α] {f g : Π₀ (_a : α), } :
      toMultiset f toMultiset g f g
      @[simp]
      theorem DFinsupp.toMultiset_lt_toMultiset {α : Type u_1} [DecidableEq α] {f g : Π₀ (_a : α), } :
      toMultiset f < toMultiset g f < g
      @[simp]
      theorem DFinsupp.toMultiset_inf {α : Type u_1} [DecidableEq α] (f g : Π₀ (_a : α), ) :
      toMultiset (f g) = toMultiset f toMultiset g
      @[simp]
      theorem DFinsupp.toMultiset_sup {α : Type u_1} [DecidableEq α] (f g : Π₀ (_a : α), ) :
      toMultiset (f g) = toMultiset f toMultiset g