PartiallyOrderedSets/AreEqual - 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/AreEqual

PartiallyOrderedSets

  

AreEqual

  

checks whether two posets are equal or not

 

Calling Sequence

Parameters

Description

Examples

References

Compatibility

Calling Sequence

AreEqual(P1,P2)

Parameters

P1

-

PartiallyOrderedSet

P2

-

PartiallyOrderedSet

Description

• 

The command AreEqual(P1, P2) checks whether the partially ordered sets P1 and P2 have the same elements and the same relations. To be more precise, let us denote by V the underlying set of P1, by R1 (resp. R2 ) the binary relation on V defining P1 (resp. P2). The posets P1 and P2 are equal whenever V is also the underlying set of P2 and for any two elements a and b in V,  R1(a,b) holds if and only if R2(a,b) holds.

Remarks

• 

AreEqual(P1, P2) will generate and store the transitive reductions of P1 and P2.

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. 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.

• 

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

Examples

> 

with⁡PartiallyOrderedSets&colon;

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 >

(1)

Check whether the empty poset is equal to itself

> 

AreEqual⁡empty_poset&comma;empty_poset

true

(2)

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

> 

S≔1&comma;2&comma;3&comma;4&comma;5&colon;poset1≔PartiallyOrderedSet⁡S&comma;leq

poset1≔< a poset with 5 elements >

(3)

Display this poset

> 

DrawGraph⁡poset1

Check whether the empty poset is equal to this latter poset

> 

AreEqual⁡empty_poset&comma;poset1

false

(4)

Create a poset from a set and a strict partial order

> 

lneq≔`<`&colon;poset1_1≔PartiallyOrderedSet⁡S&comma;lneq

poset1_1≔< a poset with 5 elements >

(5)

Display this poset

> 

DrawGraph⁡poset1_1

Check whether two posets are equal

> 

AreEqual⁡poset1&comma;poset1_1

true

(6)

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

> 

divisibility≔x&comma;y↦irem⁡y&comma;x=0&colon;T≔3&comma;4&comma;5&comma;6&comma;7&comma;8&comma;9&colon;

> 

poset2≔PartiallyOrderedSet⁡T&comma;divisibility

poset2≔< a poset with 7 elements >

(7)

Display this poset

> 

DrawGraph⁡poset2

Check whether two posets are equal

> 

AreEqual⁡poset1&comma;poset2

false

(8)

References

  

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

Compatibility

• 

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

• 

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

See Also

PartiallyOrderedSets[AreIsomorphic]

PartiallyOrderedSets[PartiallyOrderedSet]

PartiallyOrderedSets[ToGraph]