The first step is to put motUnknown and Tp[motUnknown] in the order. If the variable motUnknown is already in the order, then nothing is done. Otherwise, the two variables are put in the order in a graded piece just after the knowns. For example, if the old order is a < b < c ≪ x < xT ≪ y then the new order would be a < b < c ≪ motUnknown < motUnknownT ≪ x < xT ≪ y.
The default options are also set at this stage.
The next step is to go through the polynomials and to collect on knowns and on monomials consisting only of knowns. The NCAlgebra command NCCollectOnVariables looks for knowns and collects terms around them. For instance, given xyax + zax, NCCollectOnVariables would return (xy + z)ax. The first set of candidates for motivated unknowns is to extract what is collected to either side of the known. The program now keeps a list of pairs {P, C} where P is the polynomial on which NCCollectOnVariables was called and C is one of the things collected to either side of the knowns. The resulting list has all such pairs related to the given list of polynomials.
Note that if nothing can be collected, no entries are returned and our algorithm cannot find a motivated unknown.
The next step is to look at the number of unknowns in the candidates for motivated unknowns and to try to eliminate some without running a Grobner basis algorithm. This step counts the number of unknowns in the candidate (C in the pair described above) and compares it to the number of unknowns in the polynomial that motivated it (P above). Since the idea is that the candidate C will reduce P to a function of one variable, we can eliminate the pair if C has less unknowns than P. This is exactly what this step does.
It also eliminates pairs where C is just one variable.
Here we eliminate purely numerical terms from the candidates for motivated unknowns. Thus if our candidates starts as xy + 1 we instead take as our candidate xy. I’m not sure if this step is still necessary, but in the past there were difficulties matching when the candidate had a numerical term.
To turn off this step, redefine NCXKillConstantTerms to be the identity function, i.e. NCXKillConstantTerms[list_] := list.
Now we sort the candidates by their length, where by length we mean the number of terms in the polynomial. It generally turns out that the smallest polynomials are more likely to work, so by sorting in such a way that the polynomials with the least number of terms come first, we will probably find the motivated unknown (if one exists) earlier than if we had a random order.
Sometimes it turns out that we need to find the motivated unknown, we actually need to multiply the polynomial P by some monomial on the left and/or right. Then this new polynomial will admit a motivated unknown. This step adds new pairs {P’, C’} where P’ is a LPR where P is from the original list and L and R are monomials. L and R are dtermined in the following way. Given a pair {P, C} from the original list we find all prefixes L of the leading term of C and all suffixes R of the leading term of C. Prefixes of a monomial M are monomials on the left of M and suffixes are monomials on the right. Thus the monomial xyz has prefixes x, xy, and xyz and has suffixes z, yz, and xyz. We add to our list pairs {LP, C}, {PR, C}, and {LPR, C}. These candidate pairs are added at the end of the list so that they are tried after the candidates without multiplying through by monomials.
This option needs to be hcanged so that lists can be multiplied through solely on the left or solely on the right.
In order to turn this on, give the option MultiplyByMonomials -> True.
We now can step through out list and try each to see if the candidate is, in fact, a good motivated unknown. Given a pair {P, C} we run NCProcess on the union of the P, polynomials with 2 terms (these we shall think of as important polynomials since they include relations defining inverses and symmetry), and the rules C → motUnknown and CT → motUnknownT . If it finds a motivated unknown that works (i.e. eliminates all other unknowns), then it stops and returns the pair {P,C}.
Most of these steps can be eliminated by setting the appropriate option. See manual for details in setting options.