PartiallyOrderedSets
IsLattice
checks where a poset is a lattice or not
Calling Sequence
Parameters
Description
Examples
References
Compatibility
IsLattice(P)
P
-
PartiallyOrderedSet
The command IsLattice(P) checks whether the partially ordered set P is a lattice or not.
Remarks
IsLattice 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, <=). Two elements a and b of P are said comparable if either a <= b or b <= a holds, otherwise a and b are said incomparable.
A subset C of P is called a chain if any two elements of C are comparable. A chain C of P is said maximal if P does not admit another chain D of which C would be a proper subset.
A subset C of P is called an antichain if any two distinct elements of C are incomparable. An antichain C of P is said maximal if P does not admit another antichain D of which C would be a proper subset. We note that any singleton of P is both a chain and an antichain.
The element a of P is strictly less than the element b of P if a <= b and a \342\211\240 b both hold.
The element b of P covers the element a of P if a is strictly less than b and for no element c of P, distinct from both a and b, both a <= c and c <= b hold.
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.
From now on, we assume that P is finite.
We call rank function on the poset (P, <=) any function r defined on P, taking integer values and so that for any two elements a and b of P, if b covers a then r(b) = r(a) + 1 holds.
The poset (P, <=) is said graded if it admits a rank function.
The poset (P, <=) is said ranked if all its maximal chains have the same cardinality.
We note that the terms graded poset and ranked poset have slightly different definitions in some textbooks, like the ones of Richard Stanley. We refer to the wikipedia pages of ranked poset and graded poset for a discussion on these terminology issues.
The poset (P, <=) is said a meet-semilattice if for any two elements a and b of P the {a, b} admits a greatest lower bound. The poset (P, <=) is said a join-semilattice if for any two elements a and b of P the {a, b} admits admits a least upper bound.
The poset (P, <=) is said a lattice if it is both a join- and a meet-semilattice. If (P, <=) is a lattice, then every non-empty subset S of P has a least upper bound and a greatest lower bound.
with⁡PartiallyOrderedSets:
U≔1,2,3:
T≔3,4,5,6,7,8,9:
divisibility≔x,y↦irem⁡y,x=0
Create a poset from a set and a non-strict partial order
V≔∅:leq≔`<=`:empty_poset≔PartiallyOrderedSet⁡V,leq
empty_poset≔< a poset with 0 elements >
Check whether this poset is a lattice
IsLattice⁡empty_poset
true
Create a poset from a set and an adjacency list of a partial order regarded as a directed graph
adjList5≔map2⁡map,`+`,Array⁡1,4,7,2,6,3,4,5,6,7,2
adjList5≔3,6,94,856789
poset5≔PartiallyOrderedSet⁡convert⁡T,list,adjList5
poset5≔< a poset with 7 elements >
Display this poset
DrawGraph⁡poset5
IsLattice⁡poset5
false
Create a poset from a set and a directed graph
G≔GraphTheory:-Graph⁡directed,1,2,3,4,5,6,1,1,1,2,1,3,1,4,1,5,1,6,2,2,2,4,2,6,3,3,3,5,3,6,4,4,4,6,5,5,5,6,6,6
G≔Graph 1: a directed graph with 6 vertices, 11 arcs, and 6 self-loops
poset6≔PartiallyOrderedSet⁡G
poset6≔< a poset with 6 elements >
DrawGraph⁡poset6
IsLattice⁡poset6
Create a poset from a set an adjacency matrix of the transitive reduction of a partial order on that set
poset7≔PartiallyOrderedSet⁡convert⁡U,list,1|1|0,0|1|1,0|0|1,input=transitivereduction
poset7≔< a poset with 3 elements >
DrawGraph⁡poset7
IsLattice⁡poset7
Create a poset from a set and an adjacency list of the transitive reduction of a partial order on that set
poset8≔PartiallyOrderedSet⁡1,2,3,4,5,6,Array⁡1,2,3,2,4,3,5,4,6,5,6,6,input=transitivereduction
poset8≔< a poset with 6 elements >
DrawGraph⁡poset8
IsLattice⁡poset8
Define a polyhedral set and get its dimension
t≔PolyhedralSets:-ExampleSets:-Octahedron⁡
t≔{Coordinates:x1,x2,x3Relations:−x1−x2−x3≤1,−x1−x2+x3≤1,−x1+x2−x3≤1,−x1+x2+x3≤1,x1−x2−x3≤1,x1−x2+x3≤1,x1+x2−x3≤1,x1+x2+x3≤1
d≔PolyhedralSets:-Dimension⁡t
d≔3
Collect the s of this polyhedral set
t_faces≔seq⁡op⁡PolyhedralSets:-Faces⁡t,dimension=i,i=−0..d:
t_faces≔t_facesunionPolyhedralSets:-ExampleSets:-EmptySet⁡d:
FL≔convert⁡t_faces,list:
Construct the face lattice of that polyhedral set
inclusion := proc(x,y) PolyhedralSets:-`subset`(FL[x],FL[y]) end proc:
polyhedral_poset≔PartiallyOrderedSet⁡seq⁡i,i=1..nops⁡FL,inclusion
polyhedral_poset≔< a poset with 28 elements >
DrawGraph⁡polyhedral_poset
IsLattice⁡polyhedral_poset
Create a poset from a set and an adjacency matrix of a partial order regarded as a directed graph
M≔Matrix⁡1,1,1,1,1,0,1,1,0,1,0,0,1,0,1,0,0,0,1,1,0,0,0,0,1:
poset9≔PartiallyOrderedSet⁡seq⁡1..5,M
poset9≔< a poset with 5 elements >
DrawGraph⁡poset9
IsLattice⁡poset9
Z≔1,2,3,4,5,6,10,12,15,20,30,60
poset10≔PartiallyOrderedSet⁡Z,divisibility
poset10≔< a poset with 12 elements >
DrawGraph⁡poset10
IsLattice⁡poset10
ZZ≔1,2,3,4,5,6,12,15,60
poset11≔PartiallyOrderedSet⁡ZZ,divisibility
poset11≔< a poset with 9 elements >
DrawGraph⁡poset11
IsLattice⁡poset11
Richard P. Stanley: Enumerative Combinatorics 1. 1997, Cambridge Studies in Advanced Mathematics. Vol. 49. Cambridge University Press.
The PartiallyOrderedSets[IsLattice] command was introduced in Maple 2025.
For more information on Maple 2025 changes, see Updates in Maple 2025.
See Also
PartiallyOrderedSets[AreIsomorphic]
PartiallyOrderedSets[GreatestElement]
PartiallyOrderedSets[GreatestLowerBound]
PartiallyOrderedSets[IsFaceLattice]
PartiallyOrderedSets[IsGraded]
PartiallyOrderedSets[IsRanked]
PartiallyOrderedSets[LeastUpperBound]
PartiallyOrderedSets[LessEqual]
PartiallyOrderedSets[PartiallyOrderedSet]
PartiallyOrderedSets[Rank]
Download Help Document