The set lattice #
This file provides usual set notation for unions and intersections, a CompleteLattice
instance
for Set α
, and some more set constructions.
Main declarations #
Set.iUnion
: indexed union. Union of an indexed family of sets.Set.iInter
: indexed intersection. Intersection of an indexed family of sets.Set.sInter
: set intersection. Intersection of sets belonging to a set of sets.Set.sUnion
: set union. Union of sets belonging to a set of sets.Set.sInter_eq_biInter
,Set.sUnion_eq_biInter
: Shows that⋂₀ s = ⋂ x ∈ s, x
and⋃₀ s = ⋃ x ∈ s, x
.Set.completeAtomicBooleanAlgebra
:Set α
is aCompleteAtomicBooleanAlgebra
with≤ = ⊆
,< = ⊂
,⊓ = ∩
,⊔ = ∪
,⨅ = ⋂
,⨆ = ⋃
and\
as the set difference. SeeSet.BooleanAlgebra
.Set.kernImage
: For a functionf : α → β
,s.kernImage f
is the set ofy
such thatf ⁻¹ y ⊆ s
.Set.seq
: Union of the image of a set under a sequence of functions.seq s t
is the union off '' t
over allf ∈ s
, wheret : Set α
ands : Set (α → β)
.Set.iUnion_eq_sigma_of_disjoint
: Equivalence between⋃ i, t i
andΣ i, t i
, wheret
is an indexed family of disjoint sets.
Naming convention #
In lemma names,
⋃ i, s i
is callediUnion
⋂ i, s i
is callediInter
⋃ i j, s i j
is callediUnion₂
. This is aniUnion
inside aniUnion
.⋂ i j, s i j
is callediInter₂
. This is aniInter
inside aniInter
.⋃ i ∈ s, t i
is calledbiUnion
for "boundediUnion
". This is the special case ofiUnion₂
wherej : i ∈ s
.⋂ i ∈ s, t i
is calledbiInter
for "boundediInter
". This is the special case ofiInter₂
wherej : i ∈ s
.
Notation #
⋃
:Set.iUnion
⋂
:Set.iInter
⋃₀
:Set.sUnion
⋂₀
:Set.sInter
Complete lattice and complete Boolean algebra instances #
Notation for Set.sInter
Intersection of a set of sets.
Equations
- Set.«term⋂₀_» = Lean.ParserDescr.node `Set.term⋂₀_ 110 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "⋂₀ ") (Lean.ParserDescr.cat `term 110))
Instances For
Notation for Set.sUnion
. Union of a set of sets.
Equations
- Set.«term⋃₀_» = Lean.ParserDescr.node `Set.term⋃₀_ 110 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "⋃₀ ") (Lean.ParserDescr.cat `term 110))
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Notation for Set.iUnion
. Indexed union of a family of sets
Equations
- One or more equations did not get rendered due to their size.
Instances For
Notation for Set.iInter
. Indexed intersection of a family of sets
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Union and intersection over an indexed family of sets #
Equations
- Set.instOrderTopSetInstLESet = OrderTop.mk (_ : ∀ (a : Set α), a ⊆ Set.univ)
This rather trivial consequence of subset_iUnion
is convenient with apply
, and has i
explicit for this purpose.
This rather trivial consequence of iInter_subset
is convenient with apply
, and has i
explicit for this purpose.
This rather trivial consequence of subset_iUnion₂
is convenient with apply
, and has i
and
j
explicit for this purpose.
This rather trivial consequence of iInter₂_subset
is convenient with apply
, and has i
and
j
explicit for this purpose.
Unions and intersections indexed by Prop
#
Bounded unions and intersections #
A specialization of subset_iUnion₂
.
A specialization of iInter₂_subset
.
⋃₀
and 𝒫
form a Galois connection.
mapsTo
#
restrictPreimage
#
InjOn
#
SurjOn
#
BijOn
#
image
, preimage
#
The Set.image2
version of Set.image_eq_iUnion
Disjoint sets #
Intervals #
If t
is an indexed family of sets, then there is a natural map from Σ i, t i
to ⋃ i, t i
sending ⟨i, x⟩
to x
.
Equations
- Set.sigmaToiUnion t x = { val := ↑x.snd, property := (_ : ↑x.snd ∈ ⋃ (i : α), t i) }
Instances For
Equivalence between a disjoint union and a dependent sum.
Equations
- Set.unionEqSigmaOfDisjoint h = (Equiv.ofBijective (Set.sigmaToiUnion t) (_ : Function.Bijective (Set.sigmaToiUnion t))).symm