2026-08-01 Bounds for Ordered Sets

The essential idea from the previous post on orders is that comparing the elements of a set gives rise to relations between them and adding a “sense” (a measure that quantifies the relation mathematically) to the relation allows for the ordering of elements within the set. Taking only those ordered sets where elements can be related to themselves (irreflexive) and where not every element is related to another in the set (partial), taking subsets of such posets and checking if any notable properties emerge from them is interesting exercise, so let’s start there.

Subsets of ordered sets #

Take a subset YY of an partially ordered set XX with relation RR on it. In XX :

The set of all lower bounds is defined as:

Y={xX(yY) xRy}Y^{\ell} = \{ x \in X \mid (\forall y \in Y)\ x R y \} (the set of all values in X that bound the subset Y from below)

and the set of all upper bounds as:

Yu={xX(yY)yRx}Y^u = \{x \in X | (\forall y \in Y) y R x \}

(the set of all values in X that bound the subset Y from above)

Note that all of these arises from nothing more than taking a subset of the original partially set and using the relation RR to relate members of the original set XX and the subsets YY . Because XX is an ordered set using a binary relation RR , the sets of bounds are also ordered in two directions - lower and upper.

When the set of upper bounds Yu^u has a least element, it is the least upper bound of YY which is given by xx :

(xX[((yY)yRx    xRx)])(\forall x' \in X [((\forall y \in Y) y R x' \iff x R x')])

Considering the dual, the set of lower bounds Yl^l has a greatest element or the greatest lower bound and is given by xx :

(xX[((yY)xRy    xRx)])(\forall x' \in X [((\forall y \in Y) x' R y \iff x' R x)])

In literature, the least upper bound is the supremum (written as sup YY ) of the subset YY and the greatest lower bound is the infimum of Y
(written as inf YY )

Important points to note are:

An poset X has a bottom element if there exists X\bot \in X (called bottom) with the property that Rx\bot R x for all x X\in X . The dual element in X is a top element which if exists is defined as xRx R \top for all xxx \in x . For the set of upper bounds Yu^u , the least upper bound or supremum == \top and the set of lower bounds Yu_u , the greatest lower bound or infimum == \bot .

Lattices #

So far, the definitions of subsets of posets have meant any subset of a poset XX . Now if the definition were to narrowed down to every two-element (or doubleton) subset of XX , then a structure called a lattice emerges from XX only if:

A poset XX is a join-semilattice (or upper-semilattice) in which x,yX\forall x, y \in X , xyx \vee y exists. The dual holds for meet-s semilattices (lower-semilattices) i.e. x,yX\forall x, y \in X , xyx \wedge y .

For a subsets SXS \subseteq X :

If both S\bigvee S , S\bigwedge S exist for all SXS \subseteq X , the XX is a complete lattice.

Filters #

A principal filter or principal up-set on a poset XX generated by an element yy is defined as:

y={zXyRz}\uparrow y = \{ z \in X | y R z \}

y\uparrow y is everything in the poset that is “at” or “above” y (at because y R y by definition).

The set of upper bounds of two element set, {x,y}uisgivenby\{x, y\}^{u} is given by y$ since x R y, nothing “below” YY can be an upper bound. Since the least element of y\uparrow y is y, xy=yx \vee y = y .

A principal down-set on a poset XX generated by an element zz is defined as:

x={zXxRz}\downarrow x = \{ z \in X | x R z \}

x\downarrow x is everything in the poset that is “at” or “below” x (at because again x R x by definition).

The set of lower bounds of two element set, {x,y}l\{x, y\}^{l} is given by x\downarrow x as nothing “below” x can be a lower bound. Since the least element of $x is x, xx=xx \wedge x = x .

Hasse diagrams #

This far, diagrams for definitions have shown abstract versions of posets, their subsets, upper/lower bounds. One representation of specific posets are Hasse diagrams. A Hasse diagram for a poset XX with x,yXx, y \in X is done as follows:

  1. Each xXx \in X is represented by a small circle.
  2. For each pair x \lessdot y (y covers x i.e. y immediately succeeds x when ordered using RR ), a line from x to y is drawn
    1. and 2. must adhere to the following:
    • when x RR y, the circle depicting x is lower than the one
      depicting y
    • the lines joining circles may cross each other but the circles depicting elements much never intersect lines.

This Hasse diagram is a representation of poset X={(a,d),(b,e),(b,d),(b,f),(c,f),(c,g),(d,h),(e,h),(e,i),(f,i),(g,i)}X = \{(a, d), (b, e), (b, d), (b, f), (c, f), (c, g), (d, h), (e, h), (e, i), (f, i), (g, i)\}

Moving upward from an circle depicting an element shows the transitive relations e.g. b R e R h     \implies b R h. Elements e and d are not ordered by RR (ded \hspace{0.2em}|| \hspace{0.2em} e ). The reflexivity of elements is implied.

Lattices as an Algebraic Structure #

A mathematical or a computational entity has an algebraic structure when it is comprised of:

Sets themselves have identities that any set must follow. As ordered sets with other features, lattices are algebraic structures too,a denoted by L;,⟨L; \vee, \wedge⟩

The following rules are equivalent for all lattices from poset XX , where x,yXx, y\in X :

  1. x R y
  2. x \vee y = y
  3. x \wedge y = x

and give rise to the following axioms with x,y,zXx, y, z \in X :

The four axioms hold for their dual versions where \vee and \wedge are exchanged.

Next #

Chapter 2 of the Lattices and Order has far more details on the topic of lattices if you are interested. A thorough understanding of these definitions should, hopefully, be enough to dig through how a lattice structure has been added to OCaml’s type system to build OxCaml in the next post.

It’s thanks to Claude credits that I could come up with the illustrative diagrams very easily.