AssociativeAlgebras NCReductionTwoSided fail
I'm not sure how useful my bug reports for AssociativeAlgebras are, but here's an updated version of the (closed) #2248. This one is even more basic, and I don't understand what the problem is:
i1 : needsPackage "AssociativeAlgebras"
o1 = AssociativeAlgebras
o1 : Package
i2 : R=QQ<|S_2,S_1|>;
i3 : I=ideal(S_1*S_2*S_1-S_2*S_1*S_2);
o3 : Ideal of R
i4 : NCGB(I,75);
Warning: F4 Algorithm not available over current coefficient ring or inhomogeneous ideal.
Converting to Naive algorithm.
1 72
o4 : Matrix R <-- R
i5 : S_2*S_1^2*S_2*S_1-S_1*S_2*S_1^2*S_2
2 2
o5 = S S S S - S S S S
2 1 2 1 1 2 1 2
o5 : R
i6 : NCReductionTwoSided(oo,I)
2 2
o6 = S S S S - S S S S
2 1 2 1 1 2 1 2
o6 : R
the number 75 for NCGB can be increased arbitrarily, with no apparent effect. Obviously the result of o6 should be zero...
I do appreciate the bugs, and I hope to get to some of them over the summer. The result is perhaps not what you expected, but it is working as (currently) intended. The issue is that the call to NCReductionTwoSided(RingElement,Ideal) just passes in the generators of the ideal, without computing a Grobner basis of I (or checking if one has been computed in the cache of I). So, it is trying to reduce o5 with just the generator of I, which it can't due to your term order (the lead term S_2S_1S_2 is not a subword of any term of o5). If you instead assign the return value of NCGB to a variable and then pass that to NCReductionTwoSided, you get the desired answer.
Perhaps we should check the cache of I to see if there is a GB present and use that instead?
oh! I've been using NCReductionTwoSided wrong this whole time! thanks for the clarification.