Disjoint sum of multisets #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file defines the disjoint sum of two multisets as multiset (α ⊕ β)
. Beware not to confuse
with the multiset.sum
operation which computes the additive sum.
Main declarations #
multiset.disj_sum
:s.disj_sum t
is the disjoint sum ofs
andt
.
Disjoint sum of multisets.
Equations
- s.disj_sum t = multiset.map sum.inl s + multiset.map sum.inr t
@[simp]
theorem
multiset.zero_disj_sum
{α : Type u_1}
{β : Type u_2}
(t : multiset β) :
0.disj_sum t = multiset.map sum.inr t
@[simp]
theorem
multiset.disj_sum_zero
{α : Type u_1}
{β : Type u_2}
(s : multiset α) :
s.disj_sum 0 = multiset.map sum.inl s
@[simp]
theorem
multiset.card_disj_sum
{α : Type u_1}
{β : Type u_2}
(s : multiset α)
(t : multiset β) :
⇑multiset.card (s.disj_sum t) = ⇑multiset.card s + ⇑multiset.card t
theorem
multiset.disj_sum_strict_mono_left
{α : Type u_1}
{β : Type u_2}
(t : multiset β) :
strict_mono (λ (s : multiset α), s.disj_sum t)