P = poset R
P = poset(G, cmp)
P = poset(G, R)
P = poset(G, R, M)
This method creates a Poset by defining the set and giving the order relations between the elements in the set. The function assumes that each element in the ground set $G$ is distinct and operates by taking the transitive and reflexive closure of the relations in $R$. The function returns an error if the input relations are incompatible with creating a poset.
|
|
|
It is unnecessary to pass the ground set if every vertex of the poset is a member of at least one relation in $R$.
|
Sometimes it is easier to create a poset by passing the ground set and a binary function which compares elements in the ground set.
|
|
|
And, in other cases, it may be easy to find all relations in the poset. In this case, if the matrix encoding all the relations is passed to the poset method, then it is not necessary to compute the transitive closure. However, it should be noted that the method makes no checks on either the relations or the matrix in this case.
|
|
|
|
|
In the previous example the vertices of the poset were RingElements. In fact, the Posets package does not require the vertices to be of any particular type. However, this also means when the package makes calls to external methods, it sometimes must relabel the vertices (usually to the index of the vertex in $G$).
The option AntisymmetryStrategy determines how the method checks the input relations for antisymmetry (a necessary condition for a poset). The default, "rank", checks that the RelationMatrix has maximal rank. The choice "digraph" uses the isCyclic method on the Digraph of the given relations. Last, the choice "none" skips the check all together.
Care should be taken when using the AntisymmetryStrategy option. If "none" is specified but the relations are cyclic, then the returned Poset will not actually be a Poset. In this case, the behavior of the package is unknown.
The object poset is a method function with options.