PartiallyOrderedSets
LeastUpperBound
returns, if it exists, the least upper bound of a subset of the underlying set of a poset
Calling Sequence
Parameters
Description
Examples
References
Compatibility
LeastUpperBound(P,E1,E2)
LeastUpperBound(P,L)
LeastUpperBound(P,E1,E2,opts)
LeastUpperBound(P,L,opts)
P
-
PartiallyOrderedSet
E1
element of the PartiallyOrderedSet P
E2
L
container (a combination of nested lists or sets) of elements of the PartiallyOrderedSet P
opts
(optional) either or both options of the form nosharedupperbounds = s and multiplesharedupperbounds = s where s is a non-integer expression to return if there are no shared upper bounds or multiple shared upper bounds respectively
The command LeastUpperBound(P,E1,E2) returns the least upper bound of the pair consisting of the elements E1 and E2 in the poset P, if this least upper bound exists, otherwise NULL is returned.
The command LeastUpperBound(P,L) returns the least upper bound of the subset L of the underlying set of P, if this least upper bound exists, otherwise NULL is returned.
If nosharedupperbounds = s (resp. multiplesharedupperbounds = s) is provided, and if no least upper bound exists because no shared upper bounds exist (resp. because multiple shared upper bounds exist) then s is returned.
Remarks
LeastUpperBound will generate and store the transitive closure of P.
Terminology
A partially ordered set, or poset for short, is a pair (P, <=) where P is a set and <= is a partial order on P.
From now on, we fix a poset (P, <=).
Let S be a subset of P and a be an element of S. We say that a is a greatest element (resp. least element) of S if for every element b of S we have b <= a (resp. a <= b). Observe that if S has a greatest element (resp. least element) then it is unique.
We say that a is an upper bound (resp. lower bound) of S if if for every element b of S we have b <= a (resp. a <= b). Observe that a need not be in S in order to be an upper bound (resp. lower bound) of S.
We say that a is the infimum of S, or the greatest lower bound of S, if a is the greatest element among all lower bounds of S.
We say that a is the supremum of S, or the lest upper bound of S, if a is the least element among all upper bounds of S.
with⁡PartiallyOrderedSets:
leq≔`<=`:
Create a poset from a set and a non-strict partial order
S≔1,2,3,4,5:poset1≔PartiallyOrderedSet⁡S,leq
poset1≔< a poset with 5 elements >
Display this poset
DrawGraph⁡poset1
Compute a least upper bound of two elements
LeastUpperBound⁡poset1,3,4
4
Compute a least upper bound of a subset
LeastUpperBound⁡poset1,3,4,5
5
divisibility≔x,y↦irem⁡y,x=0:T≔3,4,5,6,7,8,9:
poset2≔PartiallyOrderedSet⁡T,divisibility
poset2≔< a poset with 7 elements >
DrawGraph⁡poset2
Compute a least upper bound of two elements, if it exists
LeastUpperBound⁡poset2,5,7
Compute a least upper bound of two elements, if it exists, and specifiy a resulting message, if it does not
LeastUpperBound⁡poset2,5,7,nosharedupperbounds=no shared upper bounds
no shared upper bounds
LeastUpperBound⁡poset2,3,9
9
Richard P. Stanley: Enumerative Combinatorics 1. 1997, Cambridge Studies in Advanced Mathematics. Vol. 49. Cambridge University Press.
The PartiallyOrderedSets[LeastUpperBound] command was introduced in Maple 2025.
For more information on Maple 2025 changes, see Updates in Maple 2025.
See Also
PartiallyOrderedSets[GreatestElement]
PartiallyOrderedSets[GreatestLowerBound]
PartiallyOrderedSets[LeastElement]
PartiallyOrderedSets[MaximalElements]
PartiallyOrderedSets[MinimalElements]
PartiallyOrderedSets[PartiallyOrderedSet]
Download Help Document