PartiallyOrderedSets/IsLattice - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : PartiallyOrderedSets/IsLattice

PartiallyOrderedSets

  

IsLattice

  

checks where a poset is a lattice or not

 

Calling Sequence

Parameters

Description

Examples

References

Compatibility

Calling Sequence

IsLattice(P)

Parameters

P

-

PartiallyOrderedSet

Description

• 

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.

Examples

> 

with⁡PartiallyOrderedSets&colon;

> 

U≔1&comma;2&comma;3&colon;

> 

T≔3&comma;4&comma;5&comma;6&comma;7&comma;8&comma;9&colon;

> 

divisibility≔x&comma;y↦irem⁡y&comma;x=0

divisibility≔x&comma;y↦irem⁡y&comma;x=0

(1)

Create a poset from a set and a non-strict partial order

> 

V≔∅&colon;leq≔`<=`&colon;empty_poset≔PartiallyOrderedSet⁡V&comma;leq

empty_poset≔< a poset with 0 elements >

(2)

Check whether this poset is a  lattice

> 

IsLattice⁡empty_poset

true

(3)

Create a poset from a set and an adjacency list of a partial order regarded as a directed graph

> 

adjList5≔map2⁡map&comma;`+`&comma;Array⁡1&comma;4&comma;7&comma;2&comma;6&comma;3&comma;4&comma;5&comma;6&comma;7&comma;2

adjList5≔3&comma;6&comma;94&comma;856789

(4)
> 

poset5≔PartiallyOrderedSet⁡convert⁡T&comma;list&comma;adjList5

poset5≔< a poset with 7 elements >

(5)

Display this poset

> 

DrawGraph⁡poset5

Check whether this poset is a  lattice

> 

IsLattice⁡poset5

false

(6)

Create a poset from a set and a directed graph

> 

G≔GraphTheory:-Graph⁡directed&comma;1&comma;2&comma;3&comma;4&comma;5&comma;6&comma;1&comma;1&comma;1&comma;2&comma;1&comma;3&comma;1&comma;4&comma;1&comma;5&comma;1&comma;6&comma;2&comma;2&comma;2&comma;4&comma;2&comma;6&comma;3&comma;3&comma;3&comma;5&comma;3&comma;6&comma;4&comma;4&comma;4&comma;6&comma;5&comma;5&comma;5&comma;6&comma;6&comma;6

G≔Graph 1: a directed graph with 6 vertices, 11 arcs, and 6 self-loops

(7)
> 

poset6≔PartiallyOrderedSet⁡G

poset6≔< a poset with 6 elements >

(8)

Display this poset

> 

DrawGraph⁡poset6

Check whether this poset is a  lattice

> 

IsLattice⁡poset6

true

(9)

Create a poset from a set an adjacency matrix of the transitive reduction of a partial order on that set

> 

poset7≔PartiallyOrderedSet⁡convert⁡U&comma;list&comma;1|1|0&comma;0|1|1&comma;0|0|1&comma;input=transitivereduction

poset7≔< a poset with 3 elements >

(10)

Display this poset

> 

DrawGraph⁡poset7

Check whether this poset is a  lattice

> 

IsLattice⁡poset7

true

(11)

Create a poset from a set and an adjacency list of the transitive reduction of a partial order on that set

> 

poset8≔PartiallyOrderedSet⁡1&comma;2&comma;3&comma;4&comma;5&comma;6&comma;Array⁡1&comma;2&comma;3&comma;2&comma;4&comma;3&comma;5&comma;4&comma;6&comma;5&comma;6&comma;6&comma;input=transitivereduction

poset8≔< a poset with 6 elements >

(12)

Display this poset

> 

DrawGraph⁡poset8

Check whether this poset is a  lattice

> 

IsLattice⁡poset8

true

(13)

Define a polyhedral set and get its dimension

> 

t≔PolyhedralSets:-ExampleSets:-Octahedron⁡

t≔&lcub;Coordinates&colon;x1&comma;x2&comma;x3Relations&colon;−x1−x2−x3≤1&comma;−x1−x2+x3≤1&comma;−x1+x2−x3≤1&comma;−x1+x2+x3≤1&comma;x1−x2−x3≤1&comma;x1−x2+x3≤1&comma;x1+x2−x3≤1&comma;x1+x2+x3≤1

(14)
> 

d≔PolyhedralSets:-Dimension⁡t

d≔3

(15)

Collect the s of this polyhedral set

> 

t_faces≔seq⁡op⁡PolyhedralSets:-Faces⁡t&comma;dimension=i&comma;i=−0..d&colon;

> 

t_faces≔t_facesunionPolyhedralSets:-ExampleSets:-EmptySet⁡d&colon;

> 

FL≔convert⁡t_faces&comma;list&colon;

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&comma;i=1..nops⁡FL&comma;inclusion

polyhedral_poset≔< a poset with 28 elements >

(16)

Display this poset

> 

DrawGraph⁡polyhedral_poset

Check whether this poset is a lattice

> 

IsLattice⁡polyhedral_poset

true

(17)

Create a poset from a set and an adjacency matrix of a partial order regarded as a directed graph

> 

M≔Matrix⁡1&comma;1&comma;1&comma;1&comma;1&comma;0&comma;1&comma;1&comma;0&comma;1&comma;0&comma;0&comma;1&comma;0&comma;1&comma;0&comma;0&comma;0&comma;1&comma;1&comma;0&comma;0&comma;0&comma;0&comma;1&colon;

> 

poset9≔PartiallyOrderedSet⁡seq⁡1..5&comma;M

poset9≔< a poset with 5 elements >

(18)

Display this poset

> 

DrawGraph⁡poset9

Check whether this poset is a  lattice

> 

IsLattice⁡poset9

true

(19)

 

Create a poset from a set and a non-strict partial order

> 

Z≔1&comma;2&comma;3&comma;4&comma;5&comma;6&comma;10&comma;12&comma;15&comma;20&comma;30&comma;60

Z≔1&comma;2&comma;3&comma;4&comma;5&comma;6&comma;10&comma;12&comma;15&comma;20&comma;30&comma;60

(20)
> 

poset10≔PartiallyOrderedSet⁡Z&comma;divisibility

poset10≔< a poset with 12 elements >

(21)

Display this poset

> 

DrawGraph⁡poset10

Check whether this poset is a  lattice

> 

IsLattice⁡poset10

true

(22)

Create a poset from a set and a non-strict partial order

> 

ZZ≔1&comma;2&comma;3&comma;4&comma;5&comma;6&comma;12&comma;15&comma;60

ZZ≔1&comma;2&comma;3&comma;4&comma;5&comma;6&comma;12&comma;15&comma;60

(23)
> 

poset11≔PartiallyOrderedSet⁡ZZ&comma;divisibility

poset11≔< a poset with 9 elements >

(24)

Display this poset

> 

DrawGraph⁡poset11

Check whether this poset is a  lattice

> 

IsLattice⁡poset11

true

(25)

References

  

Richard P. Stanley: Enumerative Combinatorics 1. 1997, Cambridge Studies in Advanced Mathematics. Vol. 49. Cambridge University Press.

Compatibility

• 

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]