/-
Copyright (c) 2022 Eric Wieser. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser

! This file was ported from Lean 3 source module data.dfinsupp.multiset
! leanprover-community/mathlib commit 23aa88e32dcc9d2a24cca7bc23268567ed4cd7d6
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.Data.Dfinsupp.Order

/-!
# Equivalence between `multiset` and `ℕ`-valued finitely supported functions

> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
> Any changes to this file require a corresponding PR to mathlib4.

This defines `dfinsupp.to_multiset` the equivalence between `Π₀ a : α, ℕ` and `multiset α`, along
with `multiset.to_dfinsupp` the reverse equivalence.

Note that this provides a computable alternative to `finsupp.to_multiset`.
-/

variable {α : Type _} {β : α → Type _}

namespace Dfinsupp

/- warning: dfinsupp.add_zero_class' -> Dfinsupp.addZeroClass' is a dubious translation:
lean 3 declaration is
  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : AddZeroClass.{u2} β], AddZeroClass.{max u1 u2} (Dfinsupp.{u1, u2} α (fun (a : α) => β) (fun (i : α) => AddZeroClass.toHasZero.{u2} β _inst_1))
but is expected to have type
  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : AddZeroClass.{u2} β], AddZeroClass.{max u2 u1} (Dfinsupp.{u1, u2} α (fun (a : α) => β) (fun (i : α) => AddZeroClass.toZero.{u2} ((fun (_a : α) => β) i) _inst_1))
Case conversion may be inaccurate. Consider using '#align dfinsupp.add_zero_class' Dfinsupp.addZeroClass'ₓ'. -/
/-- Non-dependent special case of `dfinsupp.add_zero_class` to help typeclass search. -/
instance addZeroClass' {β} [AddZeroClass β] : AddZeroClass (Π₀ a : α, β) :=
  @Dfinsupp.addZeroClass α (fun _ => β) _
#align dfinsupp.add_zero_class' Dfinsupp.addZeroClass'

variable [DecidableEq α]

/- warning: dfinsupp.to_multiset -> Dfinsupp.toMultiset is a dubious translation:
lean 3 declaration is
  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α], AddMonoidHom.{u1, u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α))))))
but is expected to have type
  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α], AddMonoidHom.{u1, u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))
Case conversion may be inaccurate. Consider using '#align dfinsupp.to_multiset Dfinsupp.toMultisetₓ'. -/
/-- A computable version of `finsupp.to_multiset`. -/
def toMultiset : (Π₀ a : α, ℕ) →+ Multiset α :=
  Dfinsupp.sumAddHom fun a : α => Multiset.replicateAddMonoidHom a
#align dfinsupp.to_multiset Dfinsupp.toMultiset

/- warning: dfinsupp.to_multiset_single -> Dfinsupp.toMultiset_single is a dubious translation:
lean 3 declaration is
  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (a : α) (n : Nat), Eq.{succ u1} (Multiset.{u1} α) (coeFn.{succ u1, succ u1} (AddMonoidHom.{u1, u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α))))))) (fun (_x : AddMonoidHom.{u1, u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α))))))) => (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) -> (Multiset.{u1} α)) (AddMonoidHom.hasCoeToFun.{u1, u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α))))))) (Dfinsupp.toMultiset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) (Dfinsupp.single.{u1, 0} α (fun (a : α) => Nat) (fun (a : α) (b : α) => _inst_1 a b) (fun (i : α) => Nat.hasZero) a n)) (Multiset.replicate.{u1} α n a)
but is expected to have type
  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (a : α) (n : Nat), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) => Multiset.{u1} α) (Dfinsupp.single.{u1, 0} α (fun (_a : α) => Nat) (fun (a : α) (b : α) => _inst_1 a b) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero) a n)) (FunLike.coe.{succ u1, succ u1, succ u1} (AddMonoidHom.{u1, u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (fun (_x : Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) => Multiset.{u1} α) _x) (AddHomClass.toFunLike.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (AddZeroClass.toAdd.{u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (AddZeroClass.toAdd.{u1} (Multiset.{u1} α) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (AddMonoidHomClass.toAddHomClass.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoidHom.addMonoidHomClass.{u1, u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))))) (Dfinsupp.toMultiset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) (Dfinsupp.single.{u1, 0} α (fun (a : α) => Nat) (fun (a : α) (b : α) => _inst_1 a b) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero) a n)) (Multiset.replicate.{u1} α n a)
Case conversion may be inaccurate. Consider using '#align dfinsupp.to_multiset_single Dfinsupp.toMultiset_singleₓ'. -/
@[simp]
theorem toMultiset_single (a : α) (n : ℕ) :
    toMultiset (Dfinsupp.single a n) = Multiset.replicate n a :=
  Dfinsupp.sumAddHom_single _ _ _
#align dfinsupp.to_multiset_single Dfinsupp.toMultiset_single

end Dfinsupp

namespace Multiset

variable [DecidableEq α]

/- warning: multiset.to_dfinsupp -> Multiset.toDfinsupp is a dubious translation:
lean 3 declaration is
  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α], AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))
but is expected to have type
  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α], AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))
Case conversion may be inaccurate. Consider using '#align multiset.to_dfinsupp Multiset.toDfinsuppₓ'. -/
/-- A computable version of `multiset.to_finsupp` -/
def toDfinsupp : Multiset α →+ Π₀ a : α, ℕ
    where
  toFun s :=
    { toFun := fun n => s.count n
      support' := Trunc.mk ⟨s, fun i => (em (i ∈ s)).imp_right Multiset.count_eq_zero_of_not_mem⟩ }
  map_zero' := rfl
  map_add' s t := Dfinsupp.ext fun _ => Multiset.count_add _ _ _
#align multiset.to_dfinsupp Multiset.toDfinsupp

/- warning: multiset.to_dfinsupp_apply -> Multiset.toDfinsupp_apply is a dubious translation:
lean 3 declaration is
  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Multiset.{u1} α) (a : α), Eq.{1} Nat (coeFn.{succ u1, succ u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (fun (_x : Dfinsupp.{u1, 0} α (fun (i : α) => Nat) (fun (i : α) => Nat.hasZero)) => α -> Nat) (Dfinsupp.hasCoeToFun.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (coeFn.{succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (fun (_x : AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) => (Multiset.{u1} α) -> (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero))) (AddMonoidHom.hasCoeToFun.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s) a) (Multiset.count.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a s)
but is expected to have type
  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Multiset.{u1} α) (a : α), Eq.{1} ((fun (i : α) => (fun (_a : α) => Nat) i) a) (FunLike.coe.{succ u1, succ u1, 1} (Dfinsupp.{u1, 0} α (fun (i : α) => (fun (_a : α) => Nat) i) (fun (i : α) => (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero) i)) α (fun (_x : α) => (fun (i : α) => (fun (_a : α) => Nat) i) _x) (Dfinsupp.funLike.{u1, 0} α (fun (a : α) => (fun (_a : α) => Nat) a) (fun (i : α) => (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero) i)) (FunLike.coe.{succ u1, succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (fun (_x : Multiset.{u1} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) _x) (AddHomClass.toFunLike.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddZeroClass.toAdd.{u1} (Multiset.{u1} α) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (AddZeroClass.toAdd.{u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (AddMonoidHomClass.toAddHomClass.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHom.addMonoidHomClass.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s) a) (Multiset.count.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a s)
Case conversion may be inaccurate. Consider using '#align multiset.to_dfinsupp_apply Multiset.toDfinsupp_applyₓ'. -/
@[simp]
theorem toDfinsupp_apply (s : Multiset α) (a : α) : s.toDfinsupp a = s.count a :=
  rfl
#align multiset.to_dfinsupp_apply Multiset.toDfinsupp_apply

/- warning: multiset.to_dfinsupp_support -> Multiset.toDfinsupp_support is a dubious translation:
lean 3 declaration is
  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Multiset.{u1} α), Eq.{succ u1} (Finset.{u1} α) (Dfinsupp.support.{u1, 0} α (fun (a : α) => Nat) (fun (a : α) (b : α) => _inst_1 a b) (fun (i : α) => Nat.hasZero) (fun (i : α) (x : Nat) => Ne.decidable.{1} Nat (fun (a : Nat) (b : Nat) => Nat.decidableEq a b) x (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero)))) (coeFn.{succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (fun (_x : AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) => (Multiset.{u1} α) -> (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero))) (AddMonoidHom.hasCoeToFun.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s)) (Multiset.toFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s)
but is expected to have type
  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Multiset.{u1} α), Eq.{succ u1} (Finset.{u1} α) (Dfinsupp.support.{u1, 0} α (fun (a : α) => Nat) (fun (a : α) (b : α) => _inst_1 a b) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero) (fun (i : α) (x : Nat) => instDecidableNot (Eq.{1} Nat x (OfNat.ofNat.{0} Nat 0 (Zero.toOfNat0.{0} Nat (LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)))) (instDecidableEqNat x (OfNat.ofNat.{0} Nat 0 (Zero.toOfNat0.{0} Nat (LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero))))) (FunLike.coe.{succ u1, succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (fun (_x : Multiset.{u1} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) _x) (AddHomClass.toFunLike.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddZeroClass.toAdd.{u1} (Multiset.{u1} α) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (AddZeroClass.toAdd.{u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (AddMonoidHomClass.toAddHomClass.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHom.addMonoidHomClass.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s)) (Multiset.toFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s)
Case conversion may be inaccurate. Consider using '#align multiset.to_dfinsupp_support Multiset.toDfinsupp_supportₓ'. -/
@[simp]
theorem toDfinsupp_support (s : Multiset α) : s.toDfinsupp.support = s.toFinset :=
  (Finset.filter_eq_self _).mpr fun x hx => count_ne_zero.mpr <| Multiset.mem_toFinset.1 hx
#align multiset.to_dfinsupp_support Multiset.toDfinsupp_support

/- warning: multiset.to_dfinsupp_replicate -> Multiset.toDfinsupp_replicate is a dubious translation:
lean 3 declaration is
  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (a : α) (n : Nat), Eq.{succ u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (coeFn.{succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (fun (_x : AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) => (Multiset.{u1} α) -> (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero))) (AddMonoidHom.hasCoeToFun.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) (Multiset.replicate.{u1} α n a)) (Dfinsupp.single.{u1, 0} α (fun (a : α) => Nat) (fun (a : α) (b : α) => _inst_1 a b) (fun (i : α) => Nat.hasZero) a n)
but is expected to have type
  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (a : α) (n : Nat), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.replicate.{u1} α n a)) (FunLike.coe.{succ u1, succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (fun (_x : Multiset.{u1} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) _x) (AddHomClass.toFunLike.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddZeroClass.toAdd.{u1} (Multiset.{u1} α) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (AddZeroClass.toAdd.{u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (AddMonoidHomClass.toAddHomClass.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHom.addMonoidHomClass.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) (Multiset.replicate.{u1} α n a)) (Dfinsupp.single.{u1, 0} α (fun (a : α) => Nat) (fun (a : α) (b : α) => _inst_1 a b) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero) a n)
Case conversion may be inaccurate. Consider using '#align multiset.to_dfinsupp_replicate Multiset.toDfinsupp_replicateₓ'. -/
@[simp]
theorem toDfinsupp_replicate (a : α) (n : ℕ) :
    toDfinsupp (Multiset.replicate n a) = Dfinsupp.single a n :=
  by
  ext i
  dsimp [to_dfinsupp]
  simp [count_replicate, eq_comm]
#align multiset.to_dfinsupp_replicate Multiset.toDfinsupp_replicate

/- warning: multiset.to_dfinsupp_singleton -> Multiset.toDfinsupp_singleton is a dubious translation:
lean 3 declaration is
  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (a : α), Eq.{succ u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (coeFn.{succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (fun (_x : AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) => (Multiset.{u1} α) -> (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero))) (AddMonoidHom.hasCoeToFun.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) (Singleton.singleton.{u1, u1} α (Multiset.{u1} α) (Multiset.hasSingleton.{u1} α) a)) (Dfinsupp.single.{u1, 0} α (fun (a : α) => Nat) (fun (a : α) (b : α) => _inst_1 a b) (fun (i : α) => Nat.hasZero) a (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))
but is expected to have type
  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (a : α), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Singleton.singleton.{u1, u1} α (Multiset.{u1} α) (Multiset.instSingletonMultiset.{u1} α) a)) (FunLike.coe.{succ u1, succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (fun (_x : Multiset.{u1} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) _x) (AddHomClass.toFunLike.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddZeroClass.toAdd.{u1} (Multiset.{u1} α) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (AddZeroClass.toAdd.{u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (AddMonoidHomClass.toAddHomClass.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHom.addMonoidHomClass.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) (Singleton.singleton.{u1, u1} α (Multiset.{u1} α) (Multiset.instSingletonMultiset.{u1} α) a)) (Dfinsupp.single.{u1, 0} α (fun (a : α) => Nat) (fun (a : α) (b : α) => _inst_1 a b) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero) a (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))
Case conversion may be inaccurate. Consider using '#align multiset.to_dfinsupp_singleton Multiset.toDfinsupp_singletonₓ'. -/
@[simp]
theorem toDfinsupp_singleton (a : α) : toDfinsupp {a} = Dfinsupp.single a 1 := by
  rw [← replicate_one, to_dfinsupp_replicate]
#align multiset.to_dfinsupp_singleton Multiset.toDfinsupp_singleton

/- warning: multiset.equiv_dfinsupp -> Multiset.equivDfinsupp is a dubious translation:
lean 3 declaration is
  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α], AddEquiv.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (Multiset.hasAdd.{u1} α) (AddZeroClass.toHasAdd.{u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)))
but is expected to have type
  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α], AddEquiv.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.instAddMultiset.{u1} α) (Dfinsupp.instAddDfinsuppToZero.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))
Case conversion may be inaccurate. Consider using '#align multiset.equiv_dfinsupp Multiset.equivDfinsuppₓ'. -/
/-- `multiset.to_dfinsupp` as an `add_equiv`. -/
@[simps apply symm_apply]
def equivDfinsupp : Multiset α ≃+ Π₀ a : α, ℕ :=
  AddMonoidHom.toAddEquiv Multiset.toDfinsupp Dfinsupp.toMultiset
    (by
      ext x : 1
      simp)
    (by
      refine' @Dfinsupp.addHom_ext α (fun _ => ℕ) _ _ _ _ _ _ fun i hi => _
      simp)
#align multiset.equiv_dfinsupp Multiset.equivDfinsupp

/- warning: multiset.to_dfinsupp_to_multiset -> Multiset.toDfinsupp_toMultiset is a dubious translation:
lean 3 declaration is
  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Multiset.{u1} α), Eq.{succ u1} (Multiset.{u1} α) (coeFn.{succ u1, succ u1} (AddMonoidHom.{u1, u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α))))))) (fun (_x : AddMonoidHom.{u1, u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α))))))) => (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) -> (Multiset.{u1} α)) (AddMonoidHom.hasCoeToFun.{u1, u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α))))))) (Dfinsupp.toMultiset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) (coeFn.{succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (fun (_x : AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) => (Multiset.{u1} α) -> (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero))) (AddMonoidHom.hasCoeToFun.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s)) s
but is expected to have type
  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Multiset.{u1} α), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) => Multiset.{u1} α) (FunLike.coe.{succ u1, succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (fun (a : Multiset.{u1} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) a) (AddHomClass.toFunLike.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddZeroClass.toAdd.{u1} (Multiset.{u1} α) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (AddZeroClass.toAdd.{u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (AddMonoidHomClass.toAddHomClass.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHom.addMonoidHomClass.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s)) (FunLike.coe.{succ u1, succ u1, succ u1} (AddMonoidHom.{u1, u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (fun (_x : Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) => Multiset.{u1} α) _x) (AddHomClass.toFunLike.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (AddZeroClass.toAdd.{u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (AddZeroClass.toAdd.{u1} (Multiset.{u1} α) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (AddMonoidHomClass.toAddHomClass.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoidHom.addMonoidHomClass.{u1, u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))))) (Dfinsupp.toMultiset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) (FunLike.coe.{succ u1, succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (fun (_x : Multiset.{u1} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) _x) (AddHomClass.toFunLike.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddZeroClass.toAdd.{u1} (Multiset.{u1} α) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (AddZeroClass.toAdd.{u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (AddMonoidHomClass.toAddHomClass.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHom.addMonoidHomClass.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s)) s
Case conversion may be inaccurate. Consider using '#align multiset.to_dfinsupp_to_multiset Multiset.toDfinsupp_toMultisetₓ'. -/
@[simp]
theorem toDfinsupp_toMultiset (s : Multiset α) : s.toDfinsupp.toMultiset = s :=
  equivDfinsupp.symm_apply_apply s
#align multiset.to_dfinsupp_to_multiset Multiset.toDfinsupp_toMultiset

/- warning: multiset.to_dfinsupp_le_to_dfinsupp -> Multiset.toDfinsupp_le_toDfinsupp is a dubious translation:
lean 3 declaration is
  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Multiset.{u1} α) (t : Multiset.{u1} α), Iff (LE.le.{u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (Dfinsupp.hasLe.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero) (fun (i : α) => Nat.hasLe)) (coeFn.{succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (fun (_x : AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) => (Multiset.{u1} α) -> (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero))) (AddMonoidHom.hasCoeToFun.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s) (coeFn.{succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (fun (_x : AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) => (Multiset.{u1} α) -> (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero))) (AddMonoidHom.hasCoeToFun.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) t)) (LE.le.{u1} (Multiset.{u1} α) (Preorder.toLE.{u1} (Multiset.{u1} α) (PartialOrder.toPreorder.{u1} (Multiset.{u1} α) (Multiset.partialOrder.{u1} α))) s t)
but is expected to have type
  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Multiset.{u1} α) (t : Multiset.{u1} α), Iff (LE.le.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) s) (Dfinsupp.instLEDfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero) (fun (i : α) => instLENat)) (FunLike.coe.{succ u1, succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (fun (_x : Multiset.{u1} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) _x) (AddHomClass.toFunLike.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddZeroClass.toAdd.{u1} (Multiset.{u1} α) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (AddZeroClass.toAdd.{u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (AddMonoidHomClass.toAddHomClass.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHom.addMonoidHomClass.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) s) (FunLike.coe.{succ u1, succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (fun (_x : Multiset.{u1} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) _x) (AddHomClass.toFunLike.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddZeroClass.toAdd.{u1} (Multiset.{u1} α) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (AddZeroClass.toAdd.{u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (AddMonoidHomClass.toAddHomClass.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHom.addMonoidHomClass.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) t)) (LE.le.{u1} (Multiset.{u1} α) (Preorder.toLE.{u1} (Multiset.{u1} α) (PartialOrder.toPreorder.{u1} (Multiset.{u1} α) (Multiset.instPartialOrderMultiset.{u1} α))) s t)
Case conversion may be inaccurate. Consider using '#align multiset.to_dfinsupp_le_to_dfinsupp Multiset.toDfinsupp_le_toDfinsuppₓ'. -/
@[simp]
theorem toDfinsupp_le_toDfinsupp (s t : Multiset α) : toDfinsupp s ≤ toDfinsupp t ↔ s ≤ t := by
  simp [Multiset.le_iff_count, Dfinsupp.le_def]
#align multiset.to_dfinsupp_le_to_dfinsupp Multiset.toDfinsupp_le_toDfinsupp

end Multiset

/- warning: dfinsupp.to_multiset_to_dfinsupp -> Dfinsupp.toMultiset_toDfinsupp is a dubious translation:
lean 3 declaration is
  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (f : Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)), Eq.{succ u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (coeFn.{succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (fun (_x : AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) => (Multiset.{u1} α) -> (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero))) (AddMonoidHom.hasCoeToFun.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) (coeFn.{succ u1, succ u1} (AddMonoidHom.{u1, u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α))))))) (fun (_x : AddMonoidHom.{u1, u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α))))))) => (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) -> (Multiset.{u1} α)) (AddMonoidHom.hasCoeToFun.{u1, u1} (Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => Nat.hasZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α))))))) (Dfinsupp.toMultiset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) f)) f
but is expected to have type
  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (f : Dfinsupp.{u1, 0} α (fun (a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (FunLike.coe.{succ u1, succ u1, succ u1} (AddMonoidHom.{u1, u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (fun (a : Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) => Multiset.{u1} α) a) (AddHomClass.toFunLike.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (AddZeroClass.toAdd.{u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (AddZeroClass.toAdd.{u1} (Multiset.{u1} α) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (AddMonoidHomClass.toAddHomClass.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoidHom.addMonoidHomClass.{u1, u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))))) (Dfinsupp.toMultiset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) f)) (FunLike.coe.{succ u1, succ u1, succ u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (fun (_x : Multiset.{u1} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) _x) (AddHomClass.toFunLike.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddZeroClass.toAdd.{u1} (Multiset.{u1} α) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (AddZeroClass.toAdd.{u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (AddMonoidHomClass.toAddHomClass.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHom.addMonoidHomClass.{u1, u1} (Multiset.{u1} α) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))))) (Multiset.toDfinsupp.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) (FunLike.coe.{succ u1, succ u1, succ u1} (AddMonoidHom.{u1, u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (fun (_x : Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) => Multiset.{u1} α) _x) (AddHomClass.toFunLike.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (AddZeroClass.toAdd.{u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (AddZeroClass.toAdd.{u1} (Multiset.{u1} α) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (AddMonoidHomClass.toAddHomClass.{u1, u1, u1} (AddMonoidHom.{u1, u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoidHom.addMonoidHomClass.{u1, u1} (Dfinsupp.{u1, 0} α (fun (_a : α) => Nat) (fun (i : α) => LinearOrderedCommMonoidWithZero.toZero.{0} ((fun (_a : α) => Nat) i) Nat.linearOrderedCommMonoidWithZero)) (Multiset.{u1} α) (Dfinsupp.addZeroClass'.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))))) (Dfinsupp.toMultiset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) f)) f
Case conversion may be inaccurate. Consider using '#align dfinsupp.to_multiset_to_dfinsupp Dfinsupp.toMultiset_toDfinsuppₓ'. -/
@[simp]
theorem Dfinsupp.toMultiset_toDfinsupp [DecidableEq α] (f : Π₀ a : α, ℕ) :
    f.toMultiset.toDfinsupp = f :=
  Multiset.equivDfinsupp.apply_symm_apply f
#align dfinsupp.to_multiset_to_dfinsupp Dfinsupp.toMultiset_toDfinsupp