[GAP Forum] EuclideanRemainder returns strange error

Philipp Schneider philipp_s at gmx.de
Sat May 2 11:16:23 BST 2009


Dear Forum,
the following error is driving me crazy:

let
R:=PolynomialRing(Rationals,["x"]);
x:=IndeterminatesOfPolynomialRing(R)[1];

and let the function test be defined as follows

test := function(a,b)
    return EuclideanRemainder(a,b);
end;

then test(x^2,One(R)) returns 0;

now let
lt:=f->LeadingTermOfPolynomial(f,MonomialLexOrdering());

and
test2 := function(a,b)
    return EuclideanRemainder(lt(a),lt(b));
end;

then
lt(x^2)=x^2 and lt(One(R)) = One(R);
returns true;

but test2(x^2,One(R)) raises the error:
Error, no method found! For debugging hints type ?Recovery from 
NoMethodFound
Error, no 3rd choice method found for `QuotientRemainder' on 3 arguments 
called from
<compiled or corrupted call value>  called from
<compiled or corrupted call value>  called from
QuotientRemainder( R, r, m ) called from
EuclideanRemainder( DefaultRing( [ r, m ] ), r, m ) called from
EuclideanRemainder( lt( a ), lt( b ) ) called from
...
Entering break read-eval-print loop ...
you can 'quit;' to quit to outer loop, or
you can 'return;' to continue


Does anybody have an explanation for this?

Greeting,
Philipp Schneider



More information about the Forum mailing list