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 Sup s and Inf s. Typical examples are real, nat, int 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 bdd_above and bdd_below to express this boundedness, prove their basic properties, and then go on to prove most useful properties of Sup and Inf in conditionally complete lattices.
To differentiate the statements between complete lattices and conditionally complete lattices, we prefix Inf and Sup in the statements by c, giving cInf and cSup. For instance, Inf_le is a statement in complete lattices ensuring Inf s ≤ x, while cInf_le is the same statement in conditionally complete lattices with an additional assumption that s is bounded below.
Equations
Equations
- sup : α → α → α
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
- le_trans : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
- lt_iff_le_not_le : (∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a) . "order_laws_tac"
- le_antisymm : ∀ (a b : α), a ≤ b → b ≤ a → a = b
- le_sup_left : ∀ (a b : α), a ≤ a ⊔ b
- le_sup_right : ∀ (a b : α), b ≤ a ⊔ b
- sup_le : ∀ (a b c : α), a ≤ c → b ≤ c → a ⊔ b ≤ c
- inf : α → α → α
- inf_le_left : ∀ (a b : α), a ⊓ b ≤ a
- inf_le_right : ∀ (a b : α), a ⊓ b ≤ b
- le_inf : ∀ (a b c : α), a ≤ b → a ≤ c → a ≤ b ⊓ c
- Sup : set α → α
- Inf : set α → α
- le_cSup : ∀ (s : set α) (a : α), bdd_above s → a ∈ s → a ≤ conditionally_complete_lattice.Sup s
- cSup_le : ∀ (s : set α) (a : α), s.nonempty → a ∈ upper_bounds s → conditionally_complete_lattice.Sup s ≤ a
- cInf_le : ∀ (s : set α) (a : α), bdd_below s → a ∈ s → conditionally_complete_lattice.Inf s ≤ a
- le_cInf : ∀ (s : set α) (a : α), s.nonempty → a ∈ lower_bounds s → a ≤ conditionally_complete_lattice.Inf s
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 Inf and Sup 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
- le_trans : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
- lt_iff_le_not_le : (∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a) . "order_laws_tac"
- le_antisymm : ∀ (a b : α), a ≤ b → b ≤ a → a = b
- le_sup_left : ∀ (a b : α), a ≤ a ⊔ b
- le_sup_right : ∀ (a b : α), b ≤ a ⊔ b
- sup_le : ∀ (a b c : α), a ≤ c → b ≤ c → a ⊔ b ≤ c
- inf : α → α → α
- inf_le_left : ∀ (a b : α), a ⊓ b ≤ a
- inf_le_right : ∀ (a b : α), a ⊓ b ≤ b
- le_inf : ∀ (a b c : α), a ≤ b → a ≤ c → a ≤ b ⊓ c
- Sup : set α → α
- Inf : set α → α
- le_cSup : ∀ (s : set α) (a : α), bdd_above s → a ∈ s → a ≤ conditionally_complete_linear_order.Sup s
- cSup_le : ∀ (s : set α) (a : α), s.nonempty → a ∈ upper_bounds s → conditionally_complete_linear_order.Sup s ≤ a
- cInf_le : ∀ (s : set α) (a : α), bdd_below s → a ∈ s → conditionally_complete_linear_order.Inf s ≤ a
- le_cInf : ∀ (s : set α) (a : α), s.nonempty → a ∈ lower_bounds s → a ≤ conditionally_complete_linear_order.Inf s
- le_total : ∀ (a b : α), a ≤ b ∨ b ≤ a
- decidable_le : decidable_rel has_le.le
- decidable_eq : decidable_eq α
- decidable_lt : decidable_rel has_lt.lt
- max : α → α → α
- max_def : conditionally_complete_linear_order.max = max_default . "reflexivity"
- min : α → α → α
- min_def : conditionally_complete_linear_order.min = min_default . "reflexivity"
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 Inf and Sup 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
- le_trans : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
- lt_iff_le_not_le : (∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a) . "order_laws_tac"
- le_antisymm : ∀ (a b : α), a ≤ b → b ≤ a → a = b
- le_sup_left : ∀ (a b : α), a ≤ a ⊔ b
- le_sup_right : ∀ (a b : α), b ≤ a ⊔ b
- sup_le : ∀ (a b c : α), a ≤ c → b ≤ c → a ⊔ b ≤ c
- inf : α → α → α
- inf_le_left : ∀ (a b : α), a ⊓ b ≤ a
- inf_le_right : ∀ (a b : α), a ⊓ b ≤ b
- le_inf : ∀ (a b c : α), a ≤ b → a ≤ c → a ≤ b ⊓ c
- Sup : set α → α
- Inf : set α → α
- le_cSup : ∀ (s : set α) (a : α), bdd_above s → a ∈ s → a ≤ conditionally_complete_linear_order_bot.Sup s
- cSup_le : ∀ (s : set α) (a : α), s.nonempty → a ∈ upper_bounds s → conditionally_complete_linear_order_bot.Sup s ≤ a
- cInf_le : ∀ (s : set α) (a : α), bdd_below s → a ∈ s → conditionally_complete_linear_order_bot.Inf s ≤ a
- le_cInf : ∀ (s : set α) (a : α), s.nonempty → a ∈ lower_bounds s → a ≤ conditionally_complete_linear_order_bot.Inf s
- le_total : ∀ (a b : α), a ≤ b ∨ b ≤ a
- decidable_le : decidable_rel has_le.le
- decidable_eq : decidable_eq α
- decidable_lt : decidable_rel has_lt.lt
- max : α → α → α
- max_def : conditionally_complete_linear_order_bot.max = max_default . "reflexivity"
- min : α → α → α
- min_def : conditionally_complete_linear_order_bot.min = min_default . "reflexivity"
- bot : α
- bot_le : ∀ (x : α), ⊥ ≤ x
- cSup_empty : conditionally_complete_linear_order_bot.Sup ∅ = ⊥
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 Inf and Sup by a c everywhere. The same statements should hold in both worlds, sometimes with additional assumptions of nonemptiness or boundedness.
A complete lattice is a conditionally complete lattice, as there are no restrictions on the properties of Inf and Sup in a complete lattice.
Equations
- conditionally_complete_lattice_of_complete_lattice = {sup := complete_lattice.sup _inst_1, le := complete_lattice.le _inst_1, lt := complete_lattice.lt _inst_1, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_sup_left := _, le_sup_right := _, sup_le := _, inf := complete_lattice.inf _inst_1, inf_le_left := _, inf_le_right := _, le_inf := _, Sup := complete_lattice.Sup _inst_1, Inf := complete_lattice.Inf _inst_1, le_cSup := _, cSup_le := _, cInf_le := _, le_cInf := _}
Equations
- conditionally_complete_linear_order_of_complete_linear_order = {sup := conditionally_complete_lattice.sup conditionally_complete_lattice_of_complete_lattice, le := conditionally_complete_lattice.le conditionally_complete_lattice_of_complete_lattice, lt := conditionally_complete_lattice.lt conditionally_complete_lattice_of_complete_lattice, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_sup_left := _, le_sup_right := _, sup_le := _, inf := conditionally_complete_lattice.inf conditionally_complete_lattice_of_complete_lattice, inf_le_left := _, inf_le_right := _, le_inf := _, Sup := conditionally_complete_lattice.Sup conditionally_complete_lattice_of_complete_lattice, Inf := conditionally_complete_lattice.Inf conditionally_complete_lattice_of_complete_lattice, le_cSup := _, cSup_le := _, cInf_le := _, le_cInf := _, le_total := _, decidable_le := complete_linear_order.decidable_le _inst_1, decidable_eq := complete_linear_order.decidable_eq _inst_1, decidable_lt := complete_linear_order.decidable_lt _inst_1, max := complete_linear_order.max _inst_1, max_def := _, min := complete_linear_order.min _inst_1, min_def := _}
A well founded linear order is conditionally complete, with a bottom element.
Equations
- h.conditionally_complete_linear_order_with_bot c hc = {sup := max i, le := linear_order.le i, lt := linear_order.lt i, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_sup_left := _, le_sup_right := _, sup_le := _, inf := min i, inf_le_left := _, inf_le_right := _, le_inf := _, Sup := λ (s : set α), dite (upper_bounds s).nonempty (λ (hs : (upper_bounds s).nonempty), h.min (upper_bounds s) hs) (λ (hs : ¬(upper_bounds s).nonempty), c), Inf := λ (s : set α), dite s.nonempty (λ (hs : s.nonempty), h.min s hs) (λ (hs : ¬s.nonempty), c), le_cSup := _, cSup_le := _, cInf_le := _, le_cInf := _, le_total := _, decidable_le := linear_order.decidable_le i, decidable_eq := linear_order.decidable_eq i, decidable_lt := linear_order.decidable_lt i, max := max i, max_def := _, min := min i, min_def := _, bot := c, bot_le := _, cSup_empty := _}
Equations
- order_dual.conditionally_complete_lattice α = {sup := lattice.sup (order_dual.lattice α), le := lattice.le (order_dual.lattice α), lt := lattice.lt (order_dual.lattice α), le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_sup_left := _, le_sup_right := _, sup_le := _, inf := lattice.inf (order_dual.lattice α), inf_le_left := _, inf_le_right := _, le_inf := _, Sup := Sup (order_dual.has_Sup α), Inf := Inf (order_dual.has_Inf α), le_cSup := _, cSup_le := _, cInf_le := _, le_cInf := _}
Equations
- order_dual.conditionally_complete_linear_order α = {sup := conditionally_complete_lattice.sup (order_dual.conditionally_complete_lattice α), le := conditionally_complete_lattice.le (order_dual.conditionally_complete_lattice α), lt := conditionally_complete_lattice.lt (order_dual.conditionally_complete_lattice α), le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_sup_left := _, le_sup_right := _, sup_le := _, inf := conditionally_complete_lattice.inf (order_dual.conditionally_complete_lattice α), inf_le_left := _, inf_le_right := _, le_inf := _, Sup := conditionally_complete_lattice.Sup (order_dual.conditionally_complete_lattice α), Inf := conditionally_complete_lattice.Inf (order_dual.conditionally_complete_lattice α), le_cSup := _, cSup_le := _, cInf_le := _, le_cInf := _, le_total := _, decidable_le := linear_order.decidable_le (order_dual.linear_order α), decidable_eq := linear_order.decidable_eq (order_dual.linear_order α), decidable_lt := linear_order.decidable_lt (order_dual.linear_order α), max := max (order_dual.linear_order α), max_def := _, min := min (order_dual.linear_order α), min_def := _}
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 Sup_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 Inf_eq_of_forall_ge_of_forall_gt_exists_lt
for a version in complete lattices.
b < Sup 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 complete_lattice case.
Inf 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 complete_lattice 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 sup 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 inf 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 indexed supremum of two functions are comparable if the functions are pointwise comparable
The indexed infimum of two functions are comparable if the functions are pointwise comparable
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 supr_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 infi_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]
.
Equations
- pi.conditionally_complete_lattice = {sup := lattice.sup pi.lattice, le := lattice.le pi.lattice, lt := lattice.lt pi.lattice, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_sup_left := _, le_sup_right := _, sup_le := _, inf := lattice.inf pi.lattice, inf_le_left := _, inf_le_right := _, le_inf := _, Sup := Sup pi.has_Sup, Inf := Inf pi.has_Inf, le_cSup := _, cSup_le := _, cInf_le := _, le_cInf := _}
When b < Sup 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_cSup
.
When b < supr f
, there is an element i
such that b < f i
.
When Inf 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_cInf_lt
When infi f < a
, there is an element i
such that f i < a
.
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' satisfies b ≤ b'.
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 Sup of a non-empty set is its least upper bound for a conditionally complete lattice with a top.
The Inf of a bounded-below set is its greatest lower bound for a conditionally complete lattice with a top.
Equations
- with_top.complete_linear_order = {sup := lattice.sup with_top.lattice, le := linear_order.le with_top.linear_order, lt := linear_order.lt with_top.linear_order, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_sup_left := _, le_sup_right := _, sup_le := _, inf := lattice.inf with_top.lattice, inf_le_left := _, inf_le_right := _, le_inf := _, Sup := Sup with_top.has_Sup, le_Sup := _, Sup_le := _, Inf := Inf with_top.has_Inf, Inf_le := _, le_Inf := _, top := order_top.top with_top.order_top, bot := order_bot.bot with_top.order_bot, le_top := _, bot_le := _, le_total := _, decidable_le := linear_order.decidable_le with_top.linear_order, decidable_eq := linear_order.decidable_eq with_top.linear_order, decidable_lt := linear_order.decidable_lt with_top.linear_order, max := max with_top.linear_order, max_def := _, min := min with_top.linear_order, min_def := _}
A monotone function into a conditionally complete lattice preserves the ordering properties of
Sup
and Inf
.
Relation between Sup
/ Inf
and finset.sup'
/ finset.inf'
#
Like the Sup
of a conditionally_complete_lattice
, finset.sup'
also requires the set to be
non-empty. As a result, we can translate between the two.
Complete lattice structure on with_top (with_bot α)
#
If α
is a conditionally_complete_lattice
, then we show that with_top α
and with_bot α
also inherit the structure of conditionally complete lattices. Furthermore, we show
that with_top (with_bot α)
naturally inherits the structure of a complete lattice. Note that
for α a conditionally complete lattice, Sup
and Inf
both return junk values
for sets which are empty or unbounded. The extension of Sup
to with_top α
fixes
the unboundedness problem and the extension to with_bot α
fixes the problem with
the empty set.
This result can be used to show that the extended reals [-∞, ∞] are a complete lattice.
Adding a top element to a conditionally complete lattice gives a conditionally complete lattice
Equations
- with_top.conditionally_complete_lattice = {sup := lattice.sup with_top.lattice, le := lattice.le with_top.lattice, lt := lattice.lt with_top.lattice, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_sup_left := _, le_sup_right := _, sup_le := _, inf := lattice.inf with_top.lattice, inf_le_left := _, inf_le_right := _, le_inf := _, Sup := Sup with_top.has_Sup, Inf := Inf with_top.has_Inf, le_cSup := _, cSup_le := _, cInf_le := _, le_cInf := _}
Adding a bottom element to a conditionally complete lattice gives a conditionally complete lattice
Equations
- with_bot.conditionally_complete_lattice = {sup := lattice.sup with_bot.lattice, le := lattice.le with_bot.lattice, lt := lattice.lt with_bot.lattice, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_sup_left := _, le_sup_right := _, sup_le := _, inf := lattice.inf with_bot.lattice, inf_le_left := _, inf_le_right := _, le_inf := _, Sup := Sup with_bot.has_Sup, Inf := Inf with_bot.has_Inf, le_cSup := _, cSup_le := _, cInf_le := _, le_cInf := _}
Equations
- with_top.with_bot.complete_lattice = {sup := lattice.sup with_top.lattice, le := lattice.le with_top.lattice, lt := lattice.lt with_top.lattice, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_sup_left := _, le_sup_right := _, sup_le := _, inf := lattice.inf with_top.lattice, inf_le_left := _, inf_le_right := _, le_inf := _, Sup := Sup with_top.has_Sup, le_Sup := _, Sup_le := _, Inf := Inf with_top.has_Inf, Inf_le := _, le_Inf := _, top := bounded_order.top with_top.bounded_order, bot := bounded_order.bot with_top.bounded_order, le_top := _, bot_le := _}
Equations
- with_top.with_bot.complete_linear_order = {sup := complete_lattice.sup with_top.with_bot.complete_lattice, le := complete_lattice.le with_top.with_bot.complete_lattice, lt := complete_lattice.lt with_top.with_bot.complete_lattice, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_sup_left := _, le_sup_right := _, sup_le := _, inf := complete_lattice.inf with_top.with_bot.complete_lattice, inf_le_left := _, inf_le_right := _, le_inf := _, Sup := complete_lattice.Sup with_top.with_bot.complete_lattice, le_Sup := _, Sup_le := _, Inf := complete_lattice.Inf with_top.with_bot.complete_lattice, Inf_le := _, le_Inf := _, top := complete_lattice.top with_top.with_bot.complete_lattice, bot := complete_lattice.bot with_top.with_bot.complete_lattice, le_top := _, bot_le := _, le_total := _, decidable_le := linear_order.decidable_le with_top.linear_order, decidable_eq := linear_order.decidable_eq with_top.linear_order, decidable_lt := linear_order.decidable_lt with_top.linear_order, max := max with_top.linear_order, max_def := _, min := min with_top.linear_order, min_def := _}
Subtypes of conditionally complete linear orders #
In this section we give conditions on a subset of a conditionally complete linear order, to ensure that the subtype is itself conditionally complete.
We check that an ord_connected
set satisfies these conditions.
TODO There are several possible variants; the conditionally_complete_linear_order
could be changed
to conditionally_complete_linear_order_bot
or complete_linear_order
.
has_Sup
structure on a nonempty subset s
of an object with has_Sup
. This definition is
non-canonical (it uses default s
); it should be used only as here, as an auxiliary instance in the
construction of the conditionally_complete_linear_order
structure.
has_Inf
structure on a nonempty subset s
of an object with has_Inf
. This definition is
non-canonical (it uses default s
); it should be used only as here, as an auxiliary instance in the
construction of the conditionally_complete_linear_order
structure.
For a nonempty subset of a conditionally complete linear order to be a conditionally complete
linear order, it suffices that it contain the Sup
of all its nonempty bounded-above subsets, and
the Inf
of all its nonempty bounded-below subsets.
See note [reducible non-instances].
Equations
- subset_conditionally_complete_linear_order s h_Sup h_Inf = {sup := lattice.sup (distrib_lattice.to_lattice ↥s), le := lattice.le (distrib_lattice.to_lattice ↥s), lt := lattice.lt (distrib_lattice.to_lattice ↥s), le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_sup_left := _, le_sup_right := _, sup_le := _, inf := lattice.inf (distrib_lattice.to_lattice ↥s), inf_le_left := _, inf_le_right := _, le_inf := _, Sup := Sup (subset_has_Sup s), Inf := Inf (subset_has_Inf s), le_cSup := _, cSup_le := _, cInf_le := _, le_cInf := _, le_total := _, decidable_le := linear_order.decidable_le infer_instance, decidable_eq := linear_order.decidable_eq infer_instance, decidable_lt := linear_order.decidable_lt infer_instance, max := max infer_instance, max_def := _, min := min infer_instance, min_def := _}
The Sup
function on a nonempty ord_connected
set s
in a conditionally complete linear
order takes values within s
, for all nonempty bounded-above subsets of s
.
The Inf
function on a nonempty ord_connected
set s
in a conditionally complete linear
order takes values within s
, for all nonempty bounded-below subsets of s
.
A nonempty ord_connected
set in a conditionally complete linear order is naturally a
conditionally complete linear order.