This is a 1996 vintage example and we should have deleted it except that it contains a lot more info on how categories are labeled than we put in the official doucument. As an example, consider the following set of relations with the multigraded lex order A < B < C0 < D < ACROSS < P1 < P2 << proj1 < proj2 << m1 < m2 << leftm1 < leftm2 << rightm1 < rightm2 << a < b < c < e < f < g. This arose in the demo in Subsection 14.2. So we proceed assuming we have set the order. Suppose eliminatedOriginal has been set so that:
In[4]:= eliminatedOriginal Out[4]= {c - C0 ** m1, g - C0 ** m2, -1 + leftm1 ** m1, leftm1 ** m2, > leftm2 ** m1, -1 + leftm2 ** m2, leftm1 ** A ** m2, > e - leftm2 ** A ** m2, b - leftm1 ** B, f - leftm2 ** B, > -leftm1 + rightm1, -leftm2 + rightm2, a - leftm1 ** A ** m1, > -leftm2 ** A ** m1 + leftm2 ** B ** C0 ** m1, > -1 + m1 ** leftm1 + m2 ** leftm2, > A ** m1 - B ** C0 ** m1 - m1 ** leftm1 ** A ** m1 + > m1 ** leftm1 ** B ** C0 ** m1, > -A ** A ** m1 + A ** B ** C0 ** m1 + B ** C0 ** A ** m1 - > B ** C0 ** B ** C0 ** m1 + m1 ** leftm1 ** A ** A ** m1 - > m1 ** leftm1 ** A ** B ** C0 ** m1 - > m1 ** leftm1 ** B ** C0 ** A ** m1 + > m1 ** leftm1 ** B ** C0 ** B ** C0 ** m1} |
Before demonstrating the Category commands, we apply the RegularOutput command so the reader can see which categories occur. The following command creates a file junk which has a nicely formatted version of the information stored in dummy (see page §).
In[6]:= RegularOutput[%4,"junk"]
Outputting results to the stream OutputStream["junk", 6] Done outputting results to the stream OutputStream["junk", 6] In[7]:= !!junk THE ORDER IS NOW THE FOLLOWING: A < B < C0 < D < ACROSS < P1 < P2 << proj1 < proj2 << m1 < m2 << leftm1 < leftm2 << rightm1 < rightm2 << a < b < c < e < f < g ================================================ ========= THE ALGORITHM HAS SOLVED FOR========== ================================================ THE FOLLOWING VARIABLES HAVE BEEN SOLVED FOR: {c,g,e,b,f,rightm1,rightm2,a} The corresponding rules are the following: c->C0**m1 g->C0**m2 e->leftm2**A**m2 b->leftm1**B f->leftm2**B rightm1->leftm1 rightm2->leftm2 a->leftm1**A**m1 ================================================ ========= USER CREATIONS APPEAR BELOW ========== ================================================ ================================================ ========= UNDIGESTED RELATIONS APPEAR BELOW ==== ================================================ THE FOLLOWING VARIABLES HAVE NOT BEEN SOLVED FOR: {leftm1,leftm2,m1,m2} The expressions with unknown variables { leftm1,m1} and knowns {A,B,C0} --------------------------------------- leftm1**m1->1 m1**leftm1**B**C0**m1-> -A**m1 + B**C0 **m1 + m1**leftm1**A**m1 m1**leftm1**B**C0**B**C0**m1->Aˆ2**m1 + -A**B**C0**m1 + -B**C0**A**m1 + B **C0**B**C0**m1 + -m1**leftm1**Aˆ2**m1 + m1**leftm1**A**B**C0**m1 + m1** leftm1**B**C0**A**m1 The expressions with unknown variables { leftm1,m2} and knowns {A} --------------------------------------- leftm1**m2->0 leftm1**A**m2->0 The expressions with unknown variables { leftm2,m1} and knowns {A,B,C0} --------------------------------------- leftm2**m1->0 leftm2**B**C0**m1->leftm2**A**m1 The expressions with unknown variables { leftm2,m2} and knowns {} --------------------------------------- leftm2**m2->1 The expressions with unknown variables { leftm1,leftm2,m1,m2} and knowns {} --------------------------------------- m2**leftm2->1 + -m1**leftm1 |
Now we illustrate the CreateCategories command. One calls it on the above set of relations with the above order by typing:
In[5]:= CreateCategories[%,dummy]
Out[5]= dummy |
The effect of the above command is to associate the following information to the symbol dummy.
In[6]:= ??dummy
<=== recall Mma does not produce an output in response to ?? one gets a screen display (as follows) Global‘dummy dummy[2] = {{b, leftm1}, {c, m1}, {f, leftm2}, {g, m2}, {leftm1, m1}, {leftm1, m2}, {leftm1, rightm1}, {leftm2, m1}, {leftm2, m2}, {leftm2, rightm2}} dummy[3] = {{a, leftm1, m1}, {e, leftm2, m2}} dummy[4] = {{leftm1, leftm2, m1, m2}} dummy["AllCategories"] = {{b, leftm1}, {c, m1}, {f, leftm2}, {g, m2}, {leftm1, m1}, {leftm1, m2}, {leftm1, rightm1}, {leftm2, m1}, {leftm2, m2}, {leftm2, rightm2}, {a, leftm1, m1}, {e, leftm2, m2}, {leftm1, leftm2, m1, m2}} dummy["nonsingleVars"] = {leftm1, leftm2, m1, m2} dummy["numbers"] = {2, 3, 4} dummy["singleRules"] = {c -> C0 ** m1, g -> C0 ** m2, e -> leftm2 ** A ** m2, b -> leftm1 ** B, f -> leftm2 ** B, rightm1 -> leftm1, rightm2 -> leftm2, a -> leftm1 ** A ** m1} dummy["singleVars"] = {c, g, e, b, f, rightm1, rightm2, a} dummy[{b, leftm1}] = {b -> leftm1 ** B} dummy[{c, m1}] = {c -> C0 ** m1} dummy[{f, leftm2}] = {f -> leftm2 ** B} dummy[{g, m2}] = {g -> C0 ** m2} dummy[{leftm1, m1}] = {leftm1 ** m1 -> 1, m1 ** leftm1 ** B ** C0 ** m1 -> -A ** m1 + B ** C0 ** m1 + m1 ** leftm1 ** A ** m1, m1 ** leftm1 ** B ** C0 ** B ** C0 ** m1 -> A ** A ** m1 - A ** B ** C0 ** m1 - B ** C0 ** A ** m1 + B ** C0 ** B ** C0 ** m1 - m1 ** leftm1 ** A ** A ** m1 + m1 ** leftm1 ** A ** B ** C0 ** m1 + m1 ** leftm1 ** B ** C0 ** A ** m1} dummy[{leftm1, m2}] = {leftm1 ** m2 -> 0, leftm1 ** A ** m2 -> 0} dummy[{leftm1, rightm1}] = {rightm1 -> leftm1} dummy[{leftm2, m1}] = {leftm2 ** m1 -> 0, leftm2 ** B ** C0 ** m1 -> leftm2 ** A ** m1} dummy[{leftm2, m2}] = {leftm2 ** m2 -> 1} dummy[{leftm2, rightm2}] = {rightm2 -> leftm2} dummy[{a, leftm1, m1}] = {a -> leftm1 ** A ** m1} dummy[{e, leftm2, m2}] = {e -> leftm2 ** A ** m2} dummy[{leftm1, leftm2, m1, m2}] = {m2 ** leftm2 -> 1 - m1 ** leftm1} dummy[_] := {} |
One can pick of categories one by one in Mathematica by using the GetCategories command.
In[5]:= GetCategories[{leftm2, m1},dummy]
Out[5]= {leftm2 ** m1 -> 0, leftm2 ** B ** C0 ** m1 -> leftm2 ** A ** m1} In[6]:= GetCategories[{},dummy] Out[6]= {} In[7]:= GetCategories[{leftm1,m1},dummy] Out[7]= {leftm1 ** m1 -> 1, m1 ** leftm1 ** B ** C0 ** m1 -> > -A ** m1 + B ** C0 ** m1 + m1 ** leftm1 ** A ** m1, > m1 ** leftm1 ** B ** C0 ** B ** C0 ** m1 -> > A ** A ** m1 - A ** B ** C0 ** m1 - B ** C0 ** A ** m1 + > B ** C0 ** B ** C0 ** m1 - m1 ** leftm1 ** A ** A ** m1 + > m1 ** leftm1 ** A ** B ** C0 ** m1 + m1 ** leftm1 ** B ** C0 ** A ** m1 > } |