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, xand⋃₀ s = ⋃ x ∈ s, x.Set.completeAtomicBooleanAlgebra:Set αis aCompleteAtomicBooleanAlgebrawith≤ = ⊆,< = ⊂,⊓ = ∩,⊔ = ∪,⨅ = ⋂,⨆ = ⋃and\as the set difference. SeeSet.BooleanAlgebra.Set.kernImage: For a functionf : α → β,s.kernImage fis the set ofysuch thatf ⁻¹ y ⊆ s.Set.seq: Union of the image of a set under a sequence of functions.seq s tis the union off '' tover allf ∈ s, wheret : Set αands : Set (α → β).Set.unionEqSigmaOfDisjoint: Equivalence between⋃ i, t iandΣ i, t i, wheretis an indexed family of disjoint sets.
Naming convention #
In lemma names,
⋃ i, s iis callediUnion⋂ i, s iis callediInter⋃ i j, s i jis callediUnion₂. This is aniUnioninside aniUnion.⋂ i j, s i jis callediInter₂. This is aniInterinside aniInter.⋃ i ∈ s, t iis calledbiUnionfor "boundediUnion". This is the special case ofiUnion₂wherej : i ∈ s.⋂ i ∈ s, t iis calledbiInterfor "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 #
Equations
Union and intersection over an indexed family of sets #
Equations
This rather trivial consequence of subset_iUnionis convenient with apply, and has i
explicit for this purpose.
This rather trivial consequence of iInter_subsetis 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 #
A reversed version of iUnion_psigma with a curried map.
A reversed version of iInter_psigma with a curried map.
Bounded unions and intersections #
A specialization of mem_iUnion₂.
A specialization of mem_iInter₂.
A specialization of subset_iUnion₂.
A specialization of iInter₂_subset.
⋃₀ and 𝒫 form a Galois connection.
Alias of Set.sUnionPowersetGI.
⋃₀ and 𝒫 form a Galois insertion.
Instances For
Alias of Set.sUnion_subset_sUnion.
Alias of Set.sInter_subset_sInter.
Lemmas about Set.MapsTo #
Porting note: some lemmas in this section were upgraded from implications to iffs.
restrictPreimage #
InjOn #
SurjOn #
BijOn #
image, preimage #
The Set.image2 version of Set.image_eq_iUnion
Alias of Set.directedOn_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 = ⟨↑x.snd, ⋯⟩
Instances For
Equivalence from the disjoint union of a family of sets forming a partition of β, to β
itself.
Equations
- Set.sigmaEquiv s hs = { toFun := fun (x : (i : α) × ↑(s i)) => match x with | ⟨fst, b⟩ => ↑b, invFun := fun (b : β) => ⟨Exists.choose ⋯, ⟨b, ⋯⟩⟩, left_inv := ⋯, right_inv := ⋯ }
Instances For
Equivalence between a disjoint union and a dependent sum.
Equations
- Set.unionEqSigmaOfDisjoint h = (Equiv.ofBijective (Set.sigmaToiUnion t) ⋯).symm