Up-sets and down-sets #
This file defines upper and lower sets in an order.
Main declarations #
IsUpperSet
: Predicate for a set to be an upper set. This means every element greater than a member of the set is in the set itself.IsLowerSet
: Predicate for a set to be a lower set. This means every element less than a member of the set is in the set itself.UpperSet
: The type of upper sets.LowerSet
: The type of lower sets.upperClosure
: The greatest upper set containing a set.lowerClosure
: The least lower set containing a set.UpperSet.Ici
: Principal upper set.Set.Ici
as an upper set.UpperSet.Ioi
: Strict principal upper set.Set.Ioi
as an upper set.LowerSet.Iic
: Principal lower set.Set.Iic
as a lower set.LowerSet.Iio
: Strict principal lower set.Set.Iio
as a lower set.
Notation #
×ˢ
is notation forUpperSet.prod
/LowerSet.prod
.
Notes #
Upper sets are ordered by reverse inclusion. This convention is motivated by the fact that this
makes them order-isomorphic to lower sets and antichains, and matches the convention on Filter
.
TODO #
Lattice structure on antichains. Order equivalence between upper/lower sets and antichains.
Unbundled upper/lower sets #
Alias of the reverse direction of isLowerSet_preimage_ofDual_iff
.
Alias of the reverse direction of isUpperSet_preimage_ofDual_iff
.
Alias of the reverse direction of isLowerSet_preimage_toDual_iff
.
Alias of the reverse direction of isUpperSet_preimage_toDual_iff
.
Alias of the forward direction of isUpperSet_iff_Ici_subset
.
Alias of the forward direction of isLowerSet_iff_Iic_subset
.
Upper/lower sets and Fibrations #
Alias of Relation.Fibration.isLowerSet_image
.
Alias of Relation.Fibration.isUpperSet_image
.
Bundled upper/lower sets #
The type of upper sets of an order.
An upper set in an order α
is a set such that any element greater than one of its members is
also a member. Also called up-set, upward-closed set.
- carrier : Set α
The carrier of an
UpperSet
. - upper' : IsUpperSet self.carrier
The carrier of an
UpperSet
is an upper set.
Instances For
The carrier of an UpperSet
is an upper set.
The type of lower sets of an order.
A lower set in an order α
is a set such that any element less than one of its members is also
a member. Also called down-set, downward-closed set.
- carrier : Set α
The carrier of a
LowerSet
. - lower' : IsLowerSet self.carrier
The carrier of a
LowerSet
is a lower set.
Instances For
The carrier of a LowerSet
is a lower set.
Order #
Equations
- UpperSet.completeLattice = Function.Injective.completeLattice (⇑OrderDual.toDual ∘ SetLike.coe) ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
Equations
- One or more equations did not get rendered due to their size.
Equations
- LowerSet.completeLattice = Function.Injective.completeLattice SetLike.coe ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
Equations
- One or more equations did not get rendered due to their size.
Complement #
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- UpperSet.instLinearOrder = Lattice.toLinearOrder (UpperSet α)
Equations
- LowerSet.instLinearOrder = Lattice.toLinearOrder (LowerSet α)
Equations
- UpperSet.instCompleteLinearOrder = CompleteLinearOrder.mk ⋯ ⋯ ⋯ ⋯ ⋯ LinearOrder.decidableLE LinearOrder.decidableEq LinearOrder.decidableLT
Equations
- LowerSet.instCompleteLinearOrder = CompleteLinearOrder.mk ⋯ ⋯ ⋯ ⋯ ⋯ LinearOrder.decidableLE LinearOrder.decidableEq LinearOrder.decidableLT
Map #
Principal sets #
The smallest upper set containing a given element.
Equations
- UpperSet.Ici a = { carrier := Set.Ici a, upper' := ⋯ }
Instances For
The smallest upper set containing a given element.
Equations
- UpperSet.Ioi a = { carrier := Set.Ioi a, upper' := ⋯ }
Instances For
Principal lower set. Set.Iic
as a lower set. The smallest lower set containing a given
element.
Equations
- LowerSet.Iic a = { carrier := Set.Iic a, lower' := ⋯ }
Instances For
Strict principal lower set. Set.Iio
as a lower set.
Equations
- LowerSet.Iio a = { carrier := Set.Iio a, lower' := ⋯ }
Instances For
The greatest upper set containing a given set.
Equations
- upperClosure s = { carrier := {x : α | ∃ a ∈ s, a ≤ x}, upper' := ⋯ }
Instances For
The least lower set containing a given set.
Equations
- lowerClosure s = { carrier := {x : α | ∃ a ∈ s, x ≤ a}, lower' := ⋯ }
Instances For
Equations
- instDecidablePredMemUpperClosure = inst
Equations
- instDecidablePredMemLowerClosure = inst
upperClosure
forms a reversed Galois insertion with the coercion from upper sets to sets.
Equations
- One or more equations did not get rendered due to their size.
Instances For
lowerClosure
forms a Galois insertion with the coercion from lower sets to sets.
Equations
- giLowerClosureCoe = { choice := fun (s : Set α) (hs : ↑(lowerClosure s) ≤ s) => { carrier := s, lower' := ⋯ }, gc := ⋯, le_l_u := ⋯, choice_eq := ⋯ }
Instances For
Alias of the forward direction of bddAbove_lowerClosure
.
Alias of the reverse direction of bddAbove_lowerClosure
.
Alias of the reverse direction of bddBelow_upperClosure
.
Alias of the forward direction of bddBelow_upperClosure
.
Set Difference #
The biggest lower subset of a lower set s
disjoint from a set t
.
Equations
- s.sdiff t = { carrier := ↑s \ ↑(upperClosure t), lower' := ⋯ }
Instances For
The biggest lower subset of a lower set s
not containing an element a
.
Equations
- s.erase a = { carrier := ↑s \ ↑(UpperSet.Ici a), lower' := ⋯ }
Instances For
The biggest upper subset of a upper set s
disjoint from a set t
.
Equations
- s.sdiff t = { carrier := ↑s \ ↑(lowerClosure t), upper' := ⋯ }
Instances For
The biggest upper subset of a upper set s
not containing an element a
.
Equations
- s.erase a = { carrier := ↑s \ ↑(LowerSet.Iic a), upper' := ⋯ }