Chu Commandbeing revised May 2006

The chu command evaluates the chu space expression and returns a chu space.
The chu command requires use of the lambda command.The Tcl chu command evalutes expressions over chu spaces. A chu space is represnted as a matrix over an alphabet of size K. The theory of chu spaces is concerned mainly with finite spaces over finite alphabets. Since all finite alphabets can be equated with any well known alphabet, chu spaces conventionally use the integers as the alphabet. Since the more interesting chu space operators are of order O(k^{n2}) for an alphabet of size K, for practical purposes the alphabet is restricted to single decimal digits. Rows of a Chu space are synonomously called points as they generally represent points in an algebraic space. Columns of a Chu space are synonomously called states because they represent event states in concurrent event theory. The duality between algebraic points and concurrent event states is a key aspect of the study of Chu spaces. Rows which consist entirely of one symbol are called constant as they represent a right zero for the algbraic space.
The class of chu spaces for K=2 is of special interest as these spaces can be used to represent algebraic structures based on the idea of relation. Binary relations, partially ordered sets, lattices, graphs and tolopolgies are all represented in this class. Chu operators can be used to generate a lattice from a poset, or to determine whether one graph is a subgraph of another. It is not the purpose of this page to explain the mathematics of chu spaces, but simply to explain how to use the [chu] command. Because chu spaces are a general method of representing algebraic structures, they are used by different schools of enquiry who use a subset of the operators pertinent to their particular sphere of interest. The three main areas are, concurrent processes, which use the choice and sequence operators(U,:), linear logic and the algebra of morphism which uses implication (o), and relational theory which uses the unary operator query (?). So the operators in chu expressions should not be expected to form a cohesive algebraic structure as a whole.
unique  The unique options causes the returned space to have all duplicate rows and columns reduced to single instances. Many operations return unique spaces by default but some operatos like => customarily return nonunique (multi) spaces. 
multi  The multi option prevents the result space from being reduced by default unique behaviour. This is defualt behaviour for implication and its derivative operators o, *, =>. 
~  The transpose operator performs the usual transposition of the chu space matrix. The operator ~ is used instead of the conventioanl __ for several reasons. __ is conventionally used to mean bottom (or undefined) in functional languages and is also used to mean undefined word in many expression parsers. In chu space theory the transpose is normally written A^{__} which does not translate so well into the ASCII of programming. Finally ~ has a slightly more intuitive feel because ~~A <=>A. 
?  The query (? A)operator returns the smallest space containg rows of A which is continuous under deletion of points or duplication of A. It contains all constants of the alphabet. For K=2 ?A is the closure under union and intersection of the points of (A union {constants 0 and 1} ) which is a lattice (or topology). 
!  The bang operator is the dual operator of query. !A <=>~?~A 
#  Product. A # B has rows which are all the combinations of rows of A followed by rows of B. Product is a general algebraic operator. 
+  Sum is the dual of #. A + B <=> ~ ( ~A # ~B) 
o  Implication enumerates all the morphisms between the two spaces. It returns a space in multi form by default. 
*  This is the kind of dual of implication. A * B <=> ~( A o ~B). It returns a multi form space by default. 
=>  A => B is equivalent to !A o B. 
:  Sequence. ":" has been used instead of the conventional ";" as ; is a special Tcl character. This is a concurrent event operator. 
U  Choice is another concurrent event operator 
0  is the empty set, having no points and 1 state. 
1  is the singleton set, having 1 point and k states. 1 represents the single point of discrete states over k. 1+1 is called 2, having 2 points and k^{2}states and is the discrete topology. 2+1 is the same as 1+2 and is called 3 and so on. These spaces, p, are the largest unique spaces of p points over k symbols. They have p points and k^{p} states and represent the discrete topology and have no constraints on their structure. Because they are so large it is convenient to reduce them to symbolic representation whenever possible. 
For example the chu space represented by the integer constant n is: { "set k" "set null $n" "expr {pow($k,$n)}" "set m {} for { set r 0} { $r < $n} {incr r} { set point "" for {set c 0} { $c < pow($k,$n) } {incr c} { append point [expr { $c/integer(pow($k,$n$r1)) } ] } lappend m $point } set m" }
para( expr, p, s)  where expr is a Tcl expression using the parametric variables %p (for point) and %s (for state) and %k. p and s are evaluted to integers, and then expr is evaluted using p and s as the bounds of the space. The value of K is assumed from the current context of the chu command. The expr is forced to integer modulo K.
For example para(%p+%s,4,4) is the cyclic group order 4 if K=4. 
data( list)  where list is a list of items representing explicit row digits. The number of list items is the number of points in the space. All the items in the list must be of equal length.
For example data("0123 1230 2301 3012") is also the cyclic group order 4. 
CG  is the cyclic group, having k points. 
MM  is the muliplicative monoid, having k points 