30.5 Second Example

As a second example, after loading the files NCGB.m, SmallBasis3.m and RemoveRedundent.m, we can execute the following commands to compute a Gröbner Basis for the set of relations {x2 - a,x3 - b}:

In[3]:= SetKnowns[a,b,x]  
 
In[4]:= NCMakeGB[{x**x-a,x**x**x-b},10]  
Out[4]= {-a + x ** x, -b + a ** x, -b + x ** a, -a ** a + b ** x,  
>    -a ** b + b ** a, -a ** a + x ** b, -b ** b + a ** a ** a}

Now, one might want to find a smaller generating set for the ideal specified above. The following command does that and took 9 seconds using the C++ version of the code.

In[5]:= SmallBasis[%4,{},3]  
Out[5]= {a ** x -> b, x ** x -> a}

Alternatively, one can use the command RemoveRedundent to generate the same result in 2 seconds. There are two steps which need to be performed before calling RemoveRedundent.

In[6]:= WhatAreNumbers[]  
Out[6]= {1, 2, 3, 4, 5, 6, 7}  
In[7]:= WhatIsHistory[%]

Out[7]= {{1, a ** x -> b, {0, 0}, {}}, {2, x ** x -> a, {0, 0}, {}},  
>    {3, b ** x -> a ** a, {1, 2}, {}}, {4, x ** a -> b, {2, 2}, {1}},  
>    {5, x ** b -> a ** a, {4, 1}, {3}}, {6, b ** a -> a ** b, {3, 2}, {1}},  
>    {7, a ** a ** a -> b ** b, {3, 4}, {}}}

The call to RemoveRedundent is:

In[8]:= RemoveRedundent[%4,Out[12]]  
Out[8]= {a ** x -> b, x ** x -> a}