[GAP Forum] EuclideanRemainder returns strange error

Philipp Schneider philipp_s at gmx.de
Sat May 2 12:30:27 BST 2009


Well the problem seems to be that I define the ring twice. The following 
reproduces the error:

gap> R:=PolynomialRing(Rationals,["x"]);
PolynomialRing(..., [ x ])
gap> x:=IndeterminatesOfPolynomialRing(R)[1];
x
gap> 
EuclideanRemainder(LeadingTermOfPolynomial(x^2,MonomialLexOrdering()),LeadingTermOfPolynomial(One(R),MonomialGrlexOrdering())); 

0
gap> R:=PolynomialRing(Rationals,["x"]);
PolynomialRing(..., [ x ])
gap> x:=IndeterminatesOfPolynomialRing(R)[1];
x
gap> 
EuclideanRemainder(LeadingTermOfPolynomial(x^2,MonomialLexOrdering()),LeadingTermOfPolynomial(One(R),MonomialGrlexOrdering())); 

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
<function>( <arguments> ) called from read-eval-loop
Entering break read-eval-print loop ...
you can 'quit;' to quit to outer loop, or
you can 'return;' to continue
brk> gap> LogTo();

Greetings,
Philipp Schneider



Philipp Schneider wrote:
> 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
>
> _______________________________________________
> Forum mailing list
> Forum at mail.gap-system.org
> http://mail.gap-system.org/mailman/listinfo/forum
>



More information about the Forum mailing list