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 tis the disjoint sum ofsandt.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
theorem Finset.gc_map_inl_toLeft {α : Type u_1} {β : Type u_2} :
GaloisConnection (fun (x : Finset α) => map Function.Embedding.inl x) toLeft
theorem Finset.gc_map_inr_toRight {α : Type u_1} {β : Type u_2} :
GaloisConnection (fun (x : Finset β) => map Function.Embedding.inr x) toRight
@[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} {u : Finset (α ⊕ β)} {a : α} [DecidableEq α] [DecidableEq β] :
@[simp]
theorem Finset.toLeft_insert_inr {α : Type u_1} {β : Type u_2} {u : Finset (α ⊕ β)} {b : β} [DecidableEq α] [DecidableEq β] :
@[simp]
theorem Finset.toRight_insert_inl {α : Type u_1} {β : Type u_2} {u : Finset (α ⊕ β)} {a : α} [DecidableEq α] [DecidableEq β] :
@[simp]
theorem Finset.toRight_insert_inr {α : Type u_1} {β : Type u_2} {u : Finset (α ⊕ β)} {b : β} [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.
Equations
Instances For
theorem Finset.fold_disjSum {α : Type u_1} {β : Type u_2} {γ : Type u_3} (s : Finset α) (t : Finset β) (f : α ⊕ β → γ) (b₁ b₂ : γ) (op : γ → γ → γ) [Std.Commutative op] [Std.Associative op] :