PartiallyOrderedSets/PartiallyOrderedSet - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : PartiallyOrderedSets/PartiallyOrderedSet

PartiallyOrderedSets

  

PartiallyOrderedSet

  

creates a poset

 

Calling Sequence

Parameters

Options

Description

Examples

References

Compatibility

Calling Sequence

PartiallyOrderedSet(S,C)

PartiallyOrderedSet(S,C,reflopts)

PartiallyOrderedSet(S,M)

PartiallyOrderedSet(S,M,inputopts,reflopts)

PartiallyOrderedSet(S,L)

PartiallyOrderedSet(S,L,inputopts,reflopts)

PartiallyOrderedSet(G)

PartiallyOrderedSet(G,inputopts,reflopts)

Parameters

S

-

set

C

-

binary comparison function that compares two elements and returns a boolean

M

-

Matrix

L

-

list

G

-

GraphTheory:-Graph

reflopts

-

(optional) option of the form reflexive = r, where r is checktrue, checkfalse, checkeither, or useclosure

inputopts

-

(optional) option of the form input = i, where i is transitiveclosure or transitivereduction

Options

• 

reflexive = checktrue, checkfalse, checkeither (default), or useclosure

  

If the option reflexive = checktrue (resp. reflexive = checkfalse) is used, the poset will be checked for reflexivity (resp. antireflexivity) and return an error if the condition is unmet.

  

If the option reflexive = checkeither is used (the default), Maple will check if the poset meets either condition, and produce an error if neither is met.

  

If the option reflexive = useclosure is used, no checks are applied; the relation will be adjusted to make every element relate to itself.

  

In each case, the relation that is stored and used in computations is the reflexive closure of the relation given.

• 

input = transitiveclosure (default) or transitivereduction

  

If the option input = transitiveclosure (resp. input = transitivereduction) is used, Maple will verify that the specified relation is the transitive closure (resp. transitive reduction) of a partial ordering, and issue an error if the condition is unmet.

Description

• 

The command PartiallyOrderedSet(S,C) returns the partially ordered set P whose elements are the members of S and relations as defined by the function C.

• 

The command PartiallyOrderedSet(S,M) returns the partially ordered set P whose elements are the members of S and relations as defined by the adjacency matrix M.

• 

The command PartiallyOrderedSet(S,L) returns the partially ordered set P whose elements are the members of S and relations as defined by the adjacency list L.

• 

The command PartiallyOrderedSet(G) returns the partially ordered set P whose elements are the vertices of G and relations as defined by the edges in G. Any such edges must be directed, otherwise an error is issued.

Assumptions

• 

The elements of L must be members of S. Otherwise, an error is raised.

Remarks

• 

A poset object encoding a poset P records two attributes: a list of the elements of P and a representation of the relation between elements of P. This representation can be stored as a binary relation, adjacency list, and/or adjacency matrix.

• 

These relational representations are used to speedup certain computations such as those required by the commands MaximalChains and MaximalAntichains.

Terminology

• 

A non-strict partial order, often simply termed partial order is a homogeneous binary relation <= on a set P that is reflexive, anti-symmetric, and transitive.

• 

A strict partial order is a homogeneous binary relation < on a set P that is irreflexive, anti-symmetric, and transitive.

• 

We observe that every non-strict partial order can be converted trivially into a strict partial order, and vice versa. In what follows, we use the term partial order refers to non-strict partial order.

• 

A partially ordered set, or poset for short, is a pair (P, <=) where P is a set and <= is a partial order on P. The poset (P, <=) defines a directed graph whose vertices are the elements of P and (a,b) is a directed edge whenever a <= b holds. Conversely, a poset can be defined from a directed graph, assuming that the defined binary relation is anti-symmetric, and transitive, and, either reflexive, or irreflexive. Consequently, a poset can be given by an adjacency list or an adjacency matrix of a directed graph. In practice, it is also convenient to define its transitive reduction, see this latter term below.

• 

We say that two posets are equal (resp. isomorphic) whenever they are equal (resp. isomorphic) as directed graphs.

• 

The connected components of a poset are the connected components of its associated directed graph

• 

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.

• 

The partial order  <= is said total whenever any two elements of P are comparable.

• 

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.

• 

The relation b covers a defines a homogeneous binary relation on P which is the transitive reduction of (P, <=). This is also a directed acyclic graph on P often refers as the Hasse diagram of (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.

• 

The element a of P is a maximal element of (P, <=) if for no element b  of P the element a is strictly less than b.  The element a of P is a minimal element of (P, <=) if no element b  of P is strictly less than a.  Observe that if P is not empty then it necessarily admits at least one maximal element and at least one minimal element. Observe also that if P admits a greatest (least) element, then this element is its unique maximal (resp. minimal) element.

• 

Let S be a subset of P and a be an element of P. 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.

• 

A chain decomposition of the poset (P, <=) is a partition of P into disjoint chains. Dilworth's theorem states that the cardinality of an antichain with maximum cardinality is equal to the cardinality of a chain decomposition of minimum cardinality. This common number is by definition the width of the poset (P, <=).

• 

An antichain decomposition of the poset (P, <=) is a partition of P into disjoint antichains. Mirsky's theorem states that the cardinality of a chain with maximum cardinality is equal to the cardinality of antichain decomposition of minimum cardinality. This common number is by definition the height of the poset (P, <=).

• 

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.

• 

The faces of any polyhedral set Q, ordered by set theoretic inclusion, form a lattice L which enjoys three important properties (that are not true in general for an arbitrary lattice): (1)  L is graded, (2) L is ranked, and (3) if the ranks of two faces a > b differ by 2, then there are exactly 2 faces that lie strictly between a and b.

• 

The poset (P, <=) is said to be a face lattice if it is isomorphic to the lattice of the faces of a polyhedral set

Examples

withPartiallyOrderedSets&colon;

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

V&colon;leq`<=`&colon;empty_posetPartiallyOrderedSetV&comma;leq

empty_poset< a poset with 0 elements >

(1)

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

S1&comma;2&comma;3&comma;4&comma;5&colon;poset1PartiallyOrderedSetS&comma;leq

poset1< a poset with 5 elements >

(2)

Display this poset

DrawGraphposet1

Create a poset from a set and a strict partial order

lneq`<`&colon;poset1_1PartiallyOrderedSetS&comma;lneq

poset1_1< a poset with 5 elements >

(3)

Display this poset

DrawGraphposet1_1

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

divisibilityx&comma;yiremy&comma;x=0&colon;T3&comma;4&comma;5&comma;6&comma;7&comma;8&comma;9&colon;

poset2PartiallyOrderedSetT&comma;divisibility&comma;reflexive=checkeither

poset2< a poset with 7 elements >

(4)

Display this poset

DrawGraphposet2

Create a poset from a set and a strict partial order

divisibNEx&comma;yiremy&comma;x=0andyx&colon;

poset2_1PartiallyOrderedSetT&comma;divisibNE&comma;reflexive=checkfalse

poset2_1< a poset with 7 elements >

(5)

Display this poset

DrawGraphposet2_1

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

U1&comma;2&comma;3&colon;

poset3PartiallyOrderedSetU&comma;leq&comma;reflexive=checktrue

poset3< a poset with 3 elements >

(6)

Display this poset

DrawGraphposet3

Create a poset from a set and a strict partial order

poset3_1PartiallyOrderedSetU&comma;lneq&comma;reflexive=useclosure

poset3_1< a poset with 3 elements >

(7)

Display this poset

DrawGraphposet3_1

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

X4&comma;5&comma;6&colon;poset3_2PartiallyOrderedSetX&comma;leq&comma;reflexive=checktrue

poset3_2< a poset with 3 elements >

(8)

Display this poset

DrawGraphposet3_2

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

adjMatrix4Matrix1&comma;1&comma;1&comma;1&comma;1&comma;0&comma;1&comma;1&comma;1&comma;1&comma;0&comma;0&comma;1&comma;1&comma;1&comma;0&comma;0&comma;0&comma;1&comma;1&comma;0&comma;0&comma;0&comma;0&comma;1

adjMatrix41111101111001110001100001

(9)

poset4PartiallyOrderedSetconvertS&comma;list&comma;adjMatrix4

poset4< a poset with 5 elements >

(10)

Display this poset

DrawGraphposet4

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

adjList5map2map&comma;`+`&comma;Array1&comma;4&comma;7&comma;2&comma;6&comma;3&comma;4&comma;5&comma;6&comma;7&comma;2

adjList53&comma;6&comma;94&comma;856789

(11)

poset5PartiallyOrderedSetconvertT&comma;list&comma;adjList5

poset5< a poset with 7 elements >

(12)

Display this poset

DrawGraphposet5

Create a poset from a set and a directed graph

GGraphTheory:-Graphdirected&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

GGraph 1: a directed graph with 6 vertices, 11 arcs, and 6 self-loops

(13)

poset6PartiallyOrderedSetG

poset6< a poset with 6 elements >

(14)

Display this poset

DrawGraphposet6

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

poset7PartiallyOrderedSetconvertU&comma;list&comma;1|1|0&comma;0|1|1&comma;0|0|1&comma;input=transitivereduction

poset7< a poset with 3 elements >

(15)

Display this poset

DrawGraphposet7

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

poset8PartiallyOrderedSet1&comma;2&comma;3&comma;4&comma;5&comma;6&comma;Array1&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 >

(16)

Display this poset

DrawGraphposet8

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

poset8bPartiallyOrderedSet1&comma;2&comma;3&comma;4&comma;5&comma;6&comma;Array1&comma;2&comma;3&comma;4&comma;5&comma;6&comma;2&comma;4&comma;6&comma;3&comma;5&comma;6&comma;4&comma;6&comma;5&comma;6&comma;6&comma;input=transitiveclosure

poset8b< a poset with 6 elements >

(17)

Display this poset

DrawGraphposet8b

Define a polyhedral set and get its dimension

tPolyhedralSets:-ExampleSets:-Octahedron

t&lcub;Coordinates&colon;x1&comma;x2&comma;x3Relations&colon;x1x2x31&comma;x1x2+x31&comma;x1+x2x31&comma;x1+x2+x31&comma;x1x2x31&comma;x1x2+x31&comma;x1+x2x31&comma;x1+x2+x31

(18)

dPolyhedralSets:-Dimensiont

d3

(19)

Collect the faces of this polyhedral set

t_facesseqopPolyhedralSets:-Facest&comma;dimension=i&comma;i=0..d&colon;

t_facest_facesunionPolyhedralSets:-ExampleSets:-EmptySetd&colon;

FLconvertt_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_posetPartiallyOrderedSetseqi&comma;i=1..nopsFL&comma;inclusion

polyhedral_poset< a poset with 28 elements >

(20)

Display this poset

DrawGraphpolyhedral_poset

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

MMatrix1&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;

poset9PartiallyOrderedSetseq1..5&comma;M

poset9< a poset with 5 elements >

(21)

Display this poset

DrawGraphposet9

 

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

Z1&comma;2&comma;3&comma;4&comma;5&comma;6&comma;10&comma;12&comma;15&comma;20&comma;30&comma;60

Z1&comma;2&comma;3&comma;4&comma;5&comma;6&comma;10&comma;12&comma;15&comma;20&comma;30&comma;60

(22)

poset10PartiallyOrderedSetZ&comma;divisibility

poset10< a poset with 12 elements >

(23)

Display this poset

DrawGraphposet10

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

ZZ1&comma;2&comma;3&comma;4&comma;5&comma;6&comma;12&comma;15&comma;60

ZZ1&comma;2&comma;3&comma;4&comma;5&comma;6&comma;12&comma;15&comma;60

(24)

poset11PartiallyOrderedSetZZ&comma;divisibility

poset11< a poset with 9 elements >

(25)

Display this poset

DrawGraphposet11

References

  

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

Compatibility

• 

The PartiallyOrderedSets[PartiallyOrderedSet] command was introduced in Maple 2025.

• 

For more information on Maple 2025 changes, see Updates in Maple 2025.

See Also

PartiallyOrderedSets[AdjacencyList]

PartiallyOrderedSets[AreEqual]

PartiallyOrderedSets[AreIsomorphic]

PartiallyOrderedSets[ConnectedComponents]

PartiallyOrderedSets[DrawGraph]

PartiallyOrderedSets[GreatestElement]

PartiallyOrderedSets[GreatestLowerBound]

PartiallyOrderedSets[Height]

PartiallyOrderedSets[IsAntichain]

PartiallyOrderedSets[IsChain]

PartiallyOrderedSets[IsFaceLattice]

PartiallyOrderedSets[IsGraded]

PartiallyOrderedSets[IsLattice]

PartiallyOrderedSets[IsRanked]

PartiallyOrderedSets[LeastElement]

PartiallyOrderedSets[LeastUpperBound]

PartiallyOrderedSets[LessEqual]

PartiallyOrderedSets[MaximalAntichains]

PartiallyOrderedSets[MaximalChains]

PartiallyOrderedSets[MaximalElements]

PartiallyOrderedSets[MinimalElements]

PartiallyOrderedSets[NumberOfElements]

PartiallyOrderedSets[PartiallyOrderedSet]

PartiallyOrderedSets[Rank]

PartiallyOrderedSets[ToGraph]

PartiallyOrderedSets[TransitiveClosure]

PartiallyOrderedSets[TransitiveReduction]

PartiallyOrderedSets[Width]