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
.Finset.toLeft
: Given a finset of elementsα ⊕ β
, extracts all the elements of the formα
.Finset.toRight
: Given a finset of elementsα ⊕ β
, extracts all the elements of the formβ
.
@[simp]
@[simp]
theorem
Finset.disjoint_map_inl_map_inr
{α : Type u_1}
{β : Type u_2}
(s : Finset α)
(t : Finset β)
:
@[simp]
theorem
Finset.map_inl_disjUnion_map_inr
{α : Type u_1}
{β : Type u_2}
(s : Finset α)
(t : Finset β)
:
theorem
Finset.disjSum_strictMono_left
{α : Type u_1}
{β : Type u_2}
(t : Finset β)
:
StrictMono fun (s : Finset α) => s.disjSum t
Given a finset of elements α ⊕ β
, extract all the elements of the form α
. This
forms a quasi-inverse to disjSum
, in that it recovers its left input.
See also List.partitionMap
.
Instances For
Given a finset of elements α ⊕ β
, extract all the elements of the form β
. This
forms a quasi-inverse to disjSum
, in that it recovers its right input.
See also List.partitionMap
.
Instances For
@[simp]
@[simp]
theorem
Finset.toLeft_image_swap
{α : Type u_1}
{β : Type u_2}
{u : Finset (α ⊕ β)}
[DecidableEq α]
[DecidableEq β]
:
theorem
Finset.toRight_image_swap
{α : Type u_1}
{β : Type u_2}
{u : Finset (α ⊕ β)}
[DecidableEq α]
[DecidableEq β]
:
@[simp]
theorem
Finset.toLeft_insert_inl
{α : Type u_1}
{β : Type u_2}
{a : α}
{u : Finset (α ⊕ β)}
[DecidableEq α]
[DecidableEq β]
:
@[simp]
theorem
Finset.toLeft_insert_inr
{α : Type u_1}
{β : Type u_2}
{b : β}
{u : Finset (α ⊕ β)}
[DecidableEq α]
[DecidableEq β]
:
@[simp]
theorem
Finset.toRight_insert_inl
{α : Type u_1}
{β : Type u_2}
{a : α}
{u : Finset (α ⊕ β)}
[DecidableEq α]
[DecidableEq β]
:
@[simp]
theorem
Finset.toRight_insert_inr
{α : Type u_1}
{β : Type u_2}
{b : β}
{u : Finset (α ⊕ β)}
[DecidableEq α]
[DecidableEq β]
:
theorem
Finset.toLeft_inter
{α : Type u_1}
{β : Type u_2}
{u v : Finset (α ⊕ β)}
[DecidableEq α]
[DecidableEq β]
:
theorem
Finset.toRight_inter
{α : Type u_1}
{β : Type u_2}
{u v : Finset (α ⊕ β)}
[DecidableEq α]
[DecidableEq β]
:
theorem
Finset.toLeft_union
{α : Type u_1}
{β : Type u_2}
{u v : Finset (α ⊕ β)}
[DecidableEq α]
[DecidableEq β]
:
theorem
Finset.toRight_union
{α : Type u_1}
{β : Type u_2}
{u v : Finset (α ⊕ β)}
[DecidableEq α]
[DecidableEq β]
:
theorem
Finset.toLeft_sdiff
{α : Type u_1}
{β : Type u_2}
{u v : Finset (α ⊕ β)}
[DecidableEq α]
[DecidableEq β]
:
theorem
Finset.toRight_sdiff
{α : Type u_1}
{β : Type u_2}
{u v : Finset (α ⊕ β)}
[DecidableEq α]
[DecidableEq β]
:
Finsets on sum types are equivalent to pairs of finsets on each summand.