2. Using the Package

The current version of the package (July 1994) is called Posets22d.m. For 
convenience it's name can be changed, for example, to Posets.m.  It should be 
placed in a directory or folder on Mathematica's search path for input. For 
example, Macintosh users should place it in either the Mathematica or Packages 
folder.  To load the package, type

<<Posets22d.m

or whatever name you have chosen to call it.  To generate a poset, type

Build[<def>,<name>]

where <def> is a "definition" (of one of three types, to be described below), 
and <name> is a string used to identify the poset in subsequent computations.  
If no name is supplied, the  package creates one automatically.  

The elements of a poset may be represented by any object recognized by 
Mathematica,  typically by lists, strings, or integers.  These objects become 
"labels" for elements of the poset.  A poset definition may have any one of 
the following forms: 

(1)  A triple {f, <minlist>, H} , where f is a Mathematica function that 
generates, from an element w of P a list consisting of 
      its immediate successors (or covers); <minlist> is an explicit list of 
of the minimal elements of P; and H is an upper bound
      for the height of the poset (not necessarily the exact height.)

(2)  A pair {<relations>, N} , where N is an integer and <relations> is a set 
of pairs of integers ² N.  This should be an 
      acyclic relation generating the partial order.  It need not be a 
transitive relation, nor must it be a minimal generating set.

(3)  A matrix M, which is the incidence matrix of an acyclic relation 
generating the partial order.  Again, the relation represented by 
      M need not be transitive, nor must it be minimal.

The effect of 

Build[<def>,<name>]

is to generate three fundamental objects associated with the poset:

(1)   An object P[<name>]. This is a list of the elements of P. The elements 
of P[<name>] serve as "labels" for P.  If P is 
       defined by order relations or by an incidence matrix, then the labels 
are just indices, i.e.  P[<name>] = 
       {1,2, ..., Card[P]}. 
       
(2)   An object Rank[<name>]. This is a list showing the rank of each element 
of P.  The rank of an element x is defined as the
       length of the longest chain descending from x. The indexing of 
Rank[<name>] agrees with  that of  P[<name>]. 
              
(3)   An object CoverRelations[<name>]. This is a list of pairs of indices 
{i,j} that defines a minimal generating set for the 
       order relation.

All of the other commands and operations in the package refer to these 
objects. Many other functions and derived objects are available.  For a full 
list, with precise syntax, refer to the "usage" portion of the package itself. 
 An index of all commands may be found at the end of this document.  

In cases where functions depend on results returned by other functions, these 
are called automatically. For example, many functions need to compute 
ZetaP[<name>], the incidence matrix of the transitive closure of the cover 
relation, and this is done automatically when required.  The user need not be 
concerned with the order in which comands are executed.   Once computed, 
objects are "remembered", so that time is not wasted computing them again.

Elements of the poset are always maintained in a "natural", or topologically 
sorted order.  When P is a ranked (or graded) poset, the elements of each rank 
are grouped together, and a separate object PGraded[<name>][[k]] lists the 
elements of rank k. 

By default, messages are produced to indicate the status of computations in 
progress. If you most of these messages to be suppressed, type

Verbose=False;

This notebook was executed with 

Version

2.2d4b

of the package.

Note to Macintosh users.  Because of the large number of graphic displays, it 
is difficult to execute this documentation notebook its entirety on a small 
Macintosh system. We recommend using virtual memory with at least 3MB devoted 
to the front end, and at least 6MB devoted to the kernel.  If this is 
impractical or inconvenient, the notebook can easily be read easily in several 
passes, restarting in between. This advice applies only to the documentation; 
for less elaborate tasks the standard 1.5MB/5MB partition is usually adequate 
to run the package, without virtual memory.

Note to users of other systems.  All of the commands in this document may be 
executed using ordinary XWindows versions of Mathematica  (e.g., on Suns) 
provided the appropriate graphics windows have been initialized. Just load the 
plain ascii version of the package and enter the commands manually.  An 
abbreviated version of this text has been included with the distribution 
files, but it does not function as a "notebook".  The notebook itself should 
run on other systems that support Mathematica with notebooks, but we have not 
tested it on these platforms.