Disjoint sum of finsets #
This file defines the disjoint sum of two finsets as Finset (α ⊕ β)
. Beware not to confuse with
the Finset.sum
operation which computes the additive sum.
Main declarations #
Finset.disjSum
:s.disjSum t
is the disjoint sum ofs
andt
.
Disjoint sum of finsets.
Equations
- Finset.disjSum s t = { val := Multiset.disjSum s.val t.val, nodup := (_ : Multiset.Nodup (Multiset.disjSum s.val t.val)) }
Instances For
@[simp]
theorem
Finset.val_disjSum
{α : Type u_1}
{β : Type u_2}
(s : Finset α)
(t : Finset β)
:
(Finset.disjSum s t).val = Multiset.disjSum s.val t.val
@[simp]
theorem
Finset.empty_disjSum
{α : Type u_1}
{β : Type u_2}
(t : Finset β)
:
Finset.disjSum ∅ t = Finset.map Function.Embedding.inr t
@[simp]
theorem
Finset.disjSum_empty
{α : Type u_1}
{β : Type u_2}
(s : Finset α)
:
Finset.disjSum s ∅ = Finset.map Function.Embedding.inl s
@[simp]
theorem
Finset.card_disjSum
{α : Type u_1}
{β : Type u_2}
(s : Finset α)
(t : Finset β)
:
Finset.card (Finset.disjSum s t) = Finset.card s + Finset.card t
theorem
Finset.disjoint_map_inl_map_inr
{α : Type u_1}
{β : Type u_2}
(s : Finset α)
(t : Finset β)
:
Disjoint (Finset.map Function.Embedding.inl s) (Finset.map Function.Embedding.inr t)
@[simp]
theorem
Finset.map_inl_disjUnion_map_inr
{α : Type u_1}
{β : Type u_2}
(s : Finset α)
(t : Finset β)
:
Finset.disjUnion (Finset.map Function.Embedding.inl s) (Finset.map Function.Embedding.inr t)
(_ : Disjoint (Finset.map Function.Embedding.inl s) (Finset.map Function.Embedding.inr t)) = Finset.disjSum s t
theorem
Finset.disjSum_mono
{α : Type u_1}
{β : Type u_2}
{s₁ : Finset α}
{s₂ : Finset α}
{t₁ : Finset β}
{t₂ : Finset β}
(hs : s₁ ⊆ s₂)
(ht : t₁ ⊆ t₂)
:
Finset.disjSum s₁ t₁ ⊆ Finset.disjSum s₂ t₂
theorem
Finset.disjSum_mono_left
{α : Type u_1}
{β : Type u_2}
(t : Finset β)
:
Monotone fun s => Finset.disjSum s t
theorem
Finset.disjSum_ssubset_disjSum_of_ssubset_of_subset
{α : Type u_1}
{β : Type u_2}
{s₁ : Finset α}
{s₂ : Finset α}
{t₁ : Finset β}
{t₂ : Finset β}
(hs : s₁ ⊂ s₂)
(ht : t₁ ⊆ t₂)
:
Finset.disjSum s₁ t₁ ⊂ Finset.disjSum s₂ t₂
theorem
Finset.disjSum_ssubset_disjSum_of_subset_of_ssubset
{α : Type u_1}
{β : Type u_2}
{s₁ : Finset α}
{s₂ : Finset α}
{t₁ : Finset β}
{t₂ : Finset β}
(hs : s₁ ⊆ s₂)
(ht : t₁ ⊂ t₂)
:
Finset.disjSum s₁ t₁ ⊂ Finset.disjSum s₂ t₂
theorem
Finset.disjSum_strictMono_left
{α : Type u_1}
{β : Type u_2}
(t : Finset β)
:
StrictMono fun s => Finset.disjSum s t