PartiallyOrderedSets
AreEqual
checks whether two posets are equal or not
Calling Sequence
Parameters
Description
Examples
References
Compatibility
AreEqual(P1,P2)
P1
-
PartiallyOrderedSet
P2
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.
with⁡PartiallyOrderedSets:
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 the empty poset is equal to itself
AreEqual⁡empty_poset,empty_poset
true
S≔1,2,3,4,5:poset1≔PartiallyOrderedSet⁡S,leq
poset1≔< a poset with 5 elements >
Display this poset
DrawGraph⁡poset1
Check whether the empty poset is equal to this latter poset
AreEqual⁡empty_poset,poset1
false
Create a poset from a set and a strict partial order
lneq≔`<`:poset1_1≔PartiallyOrderedSet⁡S,lneq
poset1_1≔< a poset with 5 elements >
DrawGraph⁡poset1_1
Check whether two posets are equal
AreEqual⁡poset1,poset1_1
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
AreEqual⁡poset1,poset2
Richard P. Stanley: Enumerative Combinatorics 1. 1997, Cambridge Studies in Advanced Mathematics. Vol. 49. Cambridge University Press.
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]
Download Help Document