Module docstring
{"# 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 express these using the BddAbove and BddBelow predicates, which we use 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.
","Extension of sSup and sInf from a preorder α to WithTop α and WithBot α
","### 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.
","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.
"}