Theory of conditionally complete lattices. #
A conditionally complete lattice is a lattice in which every non-empty bounded subset s
has a least upper bound and a greatest lower bound, denoted below by sSup s
and sInf s
.
Typical examples are ℝ
, ℕ
, and ℤ
with their usual orders.
The theory is very comparable to the theory of complete lattices, except that suitable
boundedness and nonemptiness assumptions have to be added to most statements.
We introduce two predicates BddAbove
and BddBelow
to express this boundedness, prove
their basic properties, and then go on to prove most useful properties of sSup
and sInf
in conditionally complete lattices.
To differentiate the statements between complete lattices and conditionally complete
lattices, we prefix sInf
and sSup
in the statements by c
, giving csInf
and csSup
.
For instance, sInf_le
is a statement in complete lattices ensuring sInf s ≤ x
,
while csInf_le
is the same statement in conditionally complete lattices
with an additional assumption that s
is bounded below.
A conditionally complete lattice is a lattice in which every nonempty subset which is bounded above has a supremum, and every nonempty subset which is bounded below has an infimum. Typical examples are real numbers or natural numbers.
To differentiate the statements from the corresponding statements in (unconditional) complete lattices, we prefix sInf and subₛ by a c everywhere. The same statements should hold in both worlds, sometimes with additional assumptions of nonemptiness or boundedness.
- sup : α → α → α
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
- inf : α → α → α
- sSup : Set α → α
- sInf : Set α → α
a ≤ sSup s
for alla ∈ s
.- csSup_le : ∀ (s : Set α) (a : α), Set.Nonempty s → a ∈ upperBounds s → sSup s ≤ a
sSup s ≤ a
for alla ∈ upperBounds s
. sInf s ≤ a
for alla ∈ s
.- le_csInf : ∀ (s : Set α) (a : α), Set.Nonempty s → a ∈ lowerBounds s → a ≤ sInf s
a ≤ sInf s
for alla ∈ lowerBounds s
.
Instances
A conditionally complete linear order is a linear order in which every nonempty subset which is bounded above has a supremum, and every nonempty subset which is bounded below has an infimum. Typical examples are real numbers or natural numbers.
To differentiate the statements from the corresponding statements in (unconditional) complete linear orders, we prefix sInf and sSup by a c everywhere. The same statements should hold in both worlds, sometimes with additional assumptions of nonemptiness or boundedness.
- sup : α → α → α
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
- inf : α → α → α
- sSup : Set α → α
- sInf : Set α → α
- csSup_le : ∀ (s : Set α) (a : α), Set.Nonempty s → a ∈ upperBounds s → sSup s ≤ a
- le_csInf : ∀ (s : Set α) (a : α), Set.Nonempty s → a ∈ lowerBounds s → a ≤ sInf s
A
ConditionallyCompleteLinearOrder
is total.- decidableLE : DecidableRel fun (x x_1 : α) => x ≤ x_1
In a
ConditionallyCompleteLinearOrder
, we assume the order relations are all decidable. - decidableEq : DecidableEq α
In a
ConditionallyCompleteLinearOrder
, we assume the order relations are all decidable. - decidableLT : DecidableRel fun (x x_1 : α) => x < x_1
In a
ConditionallyCompleteLinearOrder
, we assume the order relations are all decidable. If a set is not bounded above, its supremum is by convention
sSup ∅
.If a set is not bounded below, its infimum is by convention
sInf ∅
.
Instances
Equations
- One or more equations did not get rendered due to their size.
A conditionally complete linear order with Bot
is a linear order with least element, in which
every nonempty subset which is bounded above has a supremum, and every nonempty subset (necessarily
bounded below) has an infimum. A typical example is the natural numbers.
To differentiate the statements from the corresponding statements in (unconditional)
complete linear orders, we prefix sInf
and sSup
by a c everywhere. The same statements should
hold in both worlds, sometimes with additional assumptions of nonemptiness or
boundedness.
- sup : α → α → α
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
- inf : α → α → α
- sSup : Set α → α
- sInf : Set α → α
- csSup_le : ∀ (s : Set α) (a : α), Set.Nonempty s → a ∈ upperBounds s → sSup s ≤ a
- le_csInf : ∀ (s : Set α) (a : α), Set.Nonempty s → a ∈ lowerBounds s → a ≤ sInf s
- decidableLE : DecidableRel fun (x x_1 : α) => x ≤ x_1
- decidableEq : DecidableEq α
- decidableLT : DecidableRel fun (x x_1 : α) => x < x_1
- bot : α
⊥
is the least elementThe supremum of the empty set is
⊥
Instances
Equations
- ConditionallyCompleteLinearOrderBot.toOrderBot = OrderBot.mk ⋯
A complete lattice is a conditionally complete lattice, as there are no restrictions on the properties of sInf and sSup in a complete lattice.
Equations
- CompleteLattice.toConditionallyCompleteLattice = let __src := inst; ConditionallyCompleteLattice.mk ⋯ ⋯ ⋯ ⋯
Equations
- CompleteLinearOrder.toConditionallyCompleteLinearOrderBot = let __src := CompleteLattice.toConditionallyCompleteLattice; ConditionallyCompleteLinearOrderBot.mk ⋯ ⋯
A well founded linear order is conditionally complete, with a bottom element.
Equations
- IsWellOrder.conditionallyCompleteLinearOrderBot α = let __src := LinearOrder.toLattice; ConditionallyCompleteLinearOrderBot.mk ⋯ ⋯
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Create a ConditionallyCompleteLattice
from a PartialOrder
and sup
function
that returns the least upper bound of a nonempty set which is bounded above. Usually this
constructor provides poor definitional equalities. If other fields are known explicitly, they
should be provided; for example, if inf
is known explicitly, construct the
ConditionallyCompleteLattice
instance as
instance : ConditionallyCompleteLattice my_T :=
{ inf := better_inf,
le_inf := ...,
inf_le_right := ...,
inf_le_left := ...
-- don't care to fix sup, sInf
..conditionallyCompleteLatticeOfsSup my_T _ }
Equations
- conditionallyCompleteLatticeOfsSup α bddAbove_pair bddBelow_pair isLUB_sSup = ConditionallyCompleteLattice.mk ⋯ ⋯ ⋯ ⋯
Instances For
Create a ConditionallyCompleteLattice
from a PartialOrder
and inf
function
that returns the greatest lower bound of a nonempty set which is bounded below. Usually this
constructor provides poor definitional equalities. If other fields are known explicitly, they
should be provided; for example, if inf
is known explicitly, construct the
ConditionallyCompleteLattice
instance as
instance : ConditionallyCompleteLattice my_T :=
{ inf := better_inf,
le_inf := ...,
inf_le_right := ...,
inf_le_left := ...
-- don't care to fix sup, sSup
..conditionallyCompleteLatticeOfsInf my_T _ }
Equations
- conditionallyCompleteLatticeOfsInf α bddAbove_pair bddBelow_pair isGLB_sInf = ConditionallyCompleteLattice.mk ⋯ ⋯ ⋯ ⋯
Instances For
A version of conditionallyCompleteLatticeOfsSup
when we already know that α
is a lattice.
This should only be used when it is both hard and unnecessary to provide inf
explicitly.
Equations
- conditionallyCompleteLatticeOfLatticeOfsSup α isLUB_sSup = let __src := conditionallyCompleteLatticeOfsSup α ⋯ ⋯ isLUB_sSup; ConditionallyCompleteLattice.mk ⋯ ⋯ ⋯ ⋯
Instances For
A version of conditionallyCompleteLatticeOfsInf
when we already know that α
is a lattice.
This should only be used when it is both hard and unnecessary to provide sup
explicitly.
Equations
- conditionallyCompleteLatticeOfLatticeOfsInf α isGLB_sInf = let __src := conditionallyCompleteLatticeOfsInf α ⋯ ⋯ isGLB_sInf; ConditionallyCompleteLattice.mk ⋯ ⋯ ⋯ ⋯
Instances For
A greatest element of a set is the supremum of this set.
A least element of a set is the infimum of this set.
Introduction rule to prove that b
is the supremum of s
: it suffices to check that b
is larger than all elements of s
, and that this is not the case of any w<b
.
See sSup_eq_of_forall_le_of_forall_lt_exists_gt
for a version in complete lattices.
Introduction rule to prove that b
is the infimum of s
: it suffices to check that b
is smaller than all elements of s
, and that this is not the case of any w>b
.
See sInf_eq_of_forall_ge_of_forall_gt_exists_lt
for a version in complete lattices.
b < sSup s
when there is an element a
in s
with b < a
, when s
is bounded above.
This is essentially an iff, except that the assumptions for the two implications are
slightly different (one needs boundedness above for one direction, nonemptiness and linear
order for the other one), so we formulate separately the two implications, contrary to
the CompleteLattice
case.
sInf s < b
when there is an element a
in s
with a < b
, when s
is bounded below.
This is essentially an iff, except that the assumptions for the two implications are
slightly different (one needs boundedness below for one direction, nonemptiness and linear
order for the other one), so we formulate separately the two implications, contrary to
the CompleteLattice
case.
If all elements of a nonempty set s
are less than or equal to all elements
of a nonempty set t
, then there exists an element between these sets.
The supremum of a singleton is the element of the singleton
The infimum of a singleton is the element of the singleton
If a set is bounded below and above, and nonempty, its infimum is less than or equal to its supremum.
The sSup
of a union of two sets is the max of the suprema of each subset, under the
assumptions that all sets are bounded above and nonempty.
The sInf
of a union of two sets is the min of the infima of each subset, under the assumptions
that all sets are bounded below and nonempty.
The supremum of an intersection of two sets is bounded by the minimum of the suprema of each set, if all sets are bounded above and nonempty.
The infimum of an intersection of two sets is bounded below by the maximum of the infima of each set, if all sets are bounded below and nonempty.
The supremum of insert a s
is the maximum of a
and the supremum of s
, if s
is
nonempty and bounded above.
The infimum of insert a s
is the minimum of a
and the infimum of s
, if s
is
nonempty and bounded below.
Introduction rule to prove that b
is the supremum of f
: it suffices to check that b
is larger than f i
for all i
, and that this is not the case of any w<b
.
See iSup_eq_of_forall_le_of_forall_lt_exists_gt
for a version in complete lattices.
Introduction rule to prove that b
is the infimum of f
: it suffices to check that b
is smaller than f i
for all i
, and that this is not the case of any w>b
.
See iInf_eq_of_forall_ge_of_forall_gt_exists_lt
for a version in complete lattices.
Nested intervals lemma: if f
is a monotone sequence, g
is an antitone sequence, and
f n ≤ g n
for all n
, then ⨆ n, f n
belongs to all the intervals [f n, g n]
.
Nested intervals lemma: if [f n, g n]
is an antitone sequence of nonempty
closed intervals, then ⨆ n, f n
belongs to all the intervals [f n, g n]
.
Introduction rule to prove that b
is the supremum of s
: it suffices to check that
b
is an upper bound- every other upper bound
b'
satisfiesb ≤ b'
.
Equations
- Pi.conditionallyCompleteLattice = let __src := Pi.instLattice; let __src_1 := Pi.supSet; let __src_2 := Pi.infSet; ConditionallyCompleteLattice.mk ⋯ ⋯ ⋯ ⋯
When b < sSup s
, there is an element a
in s
with b < a
, if s
is nonempty and the order
is a linear order.
Indexed version of the above lemma exists_lt_of_lt_csSup
.
When b < iSup f
, there is an element i
such that b < f i
.
When sInf s < b
, there is an element a
in s
with a < b
, if s
is nonempty and the order
is a linear order.
Indexed version of the above lemma exists_lt_of_csInf_lt
When iInf f < a
, there is an element i
such that f i < a
.
When every element of a set s
is bounded by an element of a set t
, and conversely, then
s
and t
have the same supremum. This holds even when the sets may be empty or unbounded.
When every element of a set s
is bounded by an element of a set t
, and conversely, then
s
and t
have the same infimum. This holds even when the sets may be empty or unbounded.
Lemmas about a conditionally complete linear order with bottom element #
In this case we have Sup ∅ = ⊥
, so we can drop some Nonempty
/Set.Nonempty
assumptions.
The sSup
of a non-empty set is its least upper bound for a conditionally
complete lattice with a top.
The sInf
of a bounded-below set is its greatest lower bound for a conditionally
complete lattice with a top.
Equations
- One or more equations did not get rendered due to their size.
A version of WithTop.coe_sSup'
with a more convenient but less general statement.
A version of WithTop.coe_sInf'
with a more convenient but less general statement.
A monotone function into a conditionally complete lattice preserves the ordering properties of
sSup
and sInf
.
Supremum/infimum of Set.image2
#
A collection of lemmas showing what happens to the suprema/infima of s
and t
when mapped under
a binary function whose partial evaluations are lower/upper adjoints of Galois connections.
Complete lattice structure on WithTop (WithBot α)
#
If α
is a ConditionallyCompleteLattice
, then we show that WithTop α
and WithBot α
also inherit the structure of conditionally complete lattices. Furthermore, we show
that WithTop (WithBot α)
and WithBot (WithTop α)
naturally inherit the structure of a
complete lattice. Note that for α
a conditionally complete lattice, sSup
and sInf
both return
junk values for sets which are empty or unbounded. The extension of sSup
to WithTop α
fixes
the unboundedness problem and the extension to WithBot α
fixes the problem with
the empty set.
This result can be used to show that the extended reals [-∞, ∞]
are a complete linear order.
Adding a top element to a conditionally complete lattice gives a conditionally complete lattice
Equations
- WithTop.conditionallyCompleteLattice = let __src := WithTop.lattice; let __src_1 := WithTop.instSupSet; let __src_2 := WithTop.instInfSet; ConditionallyCompleteLattice.mk ⋯ ⋯ ⋯ ⋯
Adding a bottom element to a conditionally complete lattice gives a conditionally complete lattice
Equations
- WithBot.conditionallyCompleteLattice = let __src := WithBot.lattice; ConditionallyCompleteLattice.mk ⋯ ⋯ ⋯ ⋯
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.