A simple example that results in an error:
eqs:[(- a*n2) - a*n1 - 2*a, sqrt(a)*sqrt(- c)*(n2 - n1), b*n4 + n3 +
b*n2 + b*n1 + b + 1];
vars:[n1,n2,n3,n4];
solve(eqs,vars);
Quotient by a polynomial of higher degree
-- an error. To debug this try: debugmode(true);
Comments by Robert Dodier:
Looks like the problem here is that the coefficient sqrt(a)*sqrt(-c) is
being handled incorrectly. If I substitute symbols for those e.g.subst ([sqrt(a) = sqrta, sqrt(-c) = sqrtmc], eqs);
I find solve finds the same result as to_poly_solve.
Maybe it is specifically the presence of sqrt that causes trouble
-- if I change sqrt to foo, solve finds the solution.Please open a bug report for this example and copy these notes into it,
and, if you have time, cross-reference it in other bug reports.
It's not clear if this is the same error as in other cases.
Richard Fateman wrote:
This is closing in on the bug -- we've been there before -- and it has
to do with the interface between programs like ratrep and newvar
and what is on the varlist -- the list of variables in the polynomial(s).
something intermediate to the general representation and polynomial
CRE form notices that the variables c, and sqrt(c) are related,
reduces sqrt(c) ^2 to c.. Find it and you fix umpteen bug reports.
Fixed by commit b6dd08cd (dated 2017-01-13). It would be interesting to review related bugs to see if that commit fixes any other problems.