Unions of finite sets #
This file defines the union of a family t : α → Finset β
of finsets bounded by a finset
s : Finset α
.
Main declarations #
Finset.disjUnion
: Given a hypothesish
which states that finsetss
andt
are disjoint,s.disjUnion t h
is the set such thata ∈ disjUnion s t h
iffa ∈ s
ora ∈ t
; this does not require decidable equality on the typeα
.Finset.biUnion
: Finite unions of finsets; given an indexing functionf : α → Finset β
and ans : Finset α
,s.biUnion f
is the union of all finsets of the formf a
fora ∈ s
.
TODO #
Remove Finset.biUnion
in favour of Finset.sup
.
def
Finset.disjiUnion
{α : Type u_1}
{β : Type u_2}
(s : Finset α)
(t : α → Finset β)
(hf : (↑s).PairwiseDisjoint t)
:
Finset β
disjiUnion s f h
is the set such that a ∈ disjiUnion s f
iff a ∈ f i
for some i ∈ s
.
It is the same as s.biUnion f
, but it does not require decidable equality on the type. The
hypothesis ensures that the sets are disjoint.
Equations
- s.disjiUnion t hf = { val := s.val.bind (Finset.val ∘ t), nodup := ⋯ }
Instances For
@[simp]
theorem
Finset.disjiUnion_val
{α : Type u_1}
{β : Type u_2}
(s : Finset α)
(t : α → Finset β)
(h : (↑s).PairwiseDisjoint t)
:
@[simp]
@[simp]
theorem
Finset.mem_disjiUnion
{α : Type u_1}
{β : Type u_2}
{s : Finset α}
{t : α → Finset β}
{b : β}
{h : (↑s).PairwiseDisjoint t}
:
@[simp]
theorem
Finset.coe_disjiUnion
{α : Type u_1}
{β : Type u_2}
{s : Finset α}
{t : α → Finset β}
{h : (↑s).PairwiseDisjoint t}
:
@[simp]
theorem
Finset.disjiUnion_cons
{α : Type u_1}
{β : Type u_2}
(a : α)
(s : Finset α)
(ha : a ∉ s)
(f : α → Finset β)
(H : (↑(cons a s ha)).PairwiseDisjoint f)
:
@[simp]
theorem
Finset.singleton_disjiUnion
{α : Type u_1}
{β : Type u_2}
{t : α → Finset β}
(a : α)
{h : (↑{a}).PairwiseDisjoint t}
:
theorem
Finset.disjiUnion_disjiUnion
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(s : Finset α)
(f : α → Finset β)
(g : β → Finset γ)
(h1 : (↑s).PairwiseDisjoint f)
(h2 : (↑(s.disjiUnion f h1)).PairwiseDisjoint g)
:
(s.disjiUnion f h1).disjiUnion g h2 = s.attach.disjiUnion (fun (a : { x : α // x ∈ s }) => (f ↑a).disjiUnion g ⋯) ⋯
theorem
Finset.sUnion_disjiUnion
{α : Type u_1}
{β : Type u_2}
{f : α → Finset (Set β)}
(I : Finset α)
(hf : (↑I).PairwiseDisjoint f)
:
@[simp]
theorem
Finset.disjiUnion_filter_eq
{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
(s : Finset α)
(t : Finset β)
(f : α → β)
:
theorem
Finset.disjiUnion_filter_eq_of_maps_to
{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
{s : Finset α}
{t : Finset β}
{f : α → β}
(h : ∀ x ∈ s, f x ∈ t)
:
theorem
Finset.map_disjiUnion
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{f : α ↪ β}
{s : Finset α}
{t : β → Finset γ}
{h : (↑(map f s)).PairwiseDisjoint t}
:
theorem
Finset.disjiUnion_map
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{s : Finset α}
{t : α → Finset β}
{f : β ↪ γ}
{h : (↑s).PairwiseDisjoint t}
:
theorem
Finset.fold_disjiUnion
{α : Type u_1}
{β : Type u_2}
{f : α → β}
{op : β → β → β}
[hc : Std.Commutative op]
[ha : Std.Associative op]
{ι : Type u_4}
{s : Finset ι}
{t : ι → Finset α}
{b : ι → β}
{b₀ : β}
(h : (↑s).PairwiseDisjoint t)
:
def
Finset.biUnion
{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
(s : Finset α)
(t : α → Finset β)
:
Finset β
Finset.biUnion s t
is the union of t a
over a ∈ s
.
(This was formerly bind
due to the monad structure on types with DecidableEq
.)
Instances For
@[simp]
@[simp]
theorem
Finset.coe_biUnion
{α : Type u_1}
{β : Type u_2}
{s : Finset α}
{t : α → Finset β}
[DecidableEq β]
:
@[simp]
theorem
Finset.biUnion_insert
{α : Type u_1}
{β : Type u_2}
{s : Finset α}
{t : α → Finset β}
[DecidableEq β]
[DecidableEq α]
{a : α}
:
@[simp]
theorem
Finset.disjiUnion_eq_biUnion
{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
(s : Finset α)
(f : α → Finset β)
(hf : (↑s).PairwiseDisjoint f)
:
@[simp]
theorem
Finset.singleton_biUnion
{α : Type u_1}
{β : Type u_2}
{t : α → Finset β}
[DecidableEq β]
{a : α}
:
theorem
Finset.biUnion_biUnion
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[DecidableEq β]
[DecidableEq γ]
(s : Finset α)
(f : α → Finset β)
(g : β → Finset γ)
:
theorem
Finset.bind_toFinset
{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
[DecidableEq α]
(s : Multiset α)
(t : α → Multiset β)
:
theorem
Finset.subset_biUnion_of_mem
{α : Type u_1}
{β : Type u_2}
{s : Finset α}
[DecidableEq β]
(u : α → Finset β)
{x : α}
(xs : x ∈ s)
:
@[simp]
theorem
Finset.filter_biUnion
{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
(s : Finset α)
(f : α → Finset β)
(p : β → Prop)
[DecidablePred p]
:
theorem
Finset.biUnion_filter_eq_of_maps_to
{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
[DecidableEq α]
{s : Finset α}
{t : Finset β}
{f : α → β}
(h : ∀ x ∈ s, f x ∈ t)
:
theorem
Finset.image_biUnion
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[DecidableEq β]
[DecidableEq γ]
{f : α → β}
{s : Finset α}
{t : β → Finset γ}
:
theorem
Finset.biUnion_image
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[DecidableEq β]
[DecidableEq γ]
{s : Finset α}
{t : α → Finset β}
{f : β → γ}
:
theorem
Finset.image_biUnion_filter_eq
{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
[DecidableEq α]
(s : Finset β)
(g : β → α)
: