next | previous | forward | backward | up | top | index | toc | Macaulay2 web site

compare -- returns boolean value for whether an element is less than another

Synopsis

Description

This function simply looks at two elements in P, and determines what if any relation exists between them.
i1 : P = poset ({a,b,c}, {(a,b), (a,c)});
i2 : compare (P,a,c)

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

o3 = false
i4 : compare (P,b,c)

o4 = false

Caveat

Note that if two elements are not comparable, compare still returns a value of false.

Ways to use compare :

  • compare(Poset,Thing,Thing)