Macaulay2 » Documentation
Packages » Posets :: compare
next | previous | forward | backward | up | index | toc

compare -- compares two elements in a poset

Synopsis

Description

This method determines if two elements are comparable and further if $a$ is less than or equal to $b$ in $P$.

i1 : P = poset {{a,b},{a,c}};
i2 : compare(P, a, b)

o2 = true
i3 : compare(P, c, a)

o3 = false

If two elements are incomparable, then the result is false.

i4 : compare(P, b, c)

o4 = false

Ways to use compare :

For the programmer

The object compare is a method function.