Bill Allombert on Wed, 15 Mar 2023 11:15:47 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Unexpected Mod(0,1) == Mod(x,x*(x-1))*Mod(1,y*(y-1))*Mod(1,x+y-1)


On Wed, Mar 15, 2023 at 12:02:43PM +0200, Georgi Guninski wrote:
> I am experimenting with quotients of polynomial rings
> and get unexpected Mod(0,1):
> 
> ? mo=Mod(1,x*(x-1))*Mod(1,y*(y-1))*Mod(1,x+y-1)
> %1 = Mod(Mod(0, y^2 - y), 1)
> ? mo=Mod(x,x*(x-1))*Mod(1,y*(y-1))*Mod(1,x+y-1)
> %2 = Mod(0, 1)
> 
> In sagemath:
> sage: K.<x,y>=QQ[]
> sage: Kquo=K.quotient([x*(x-1),y*(y-1),x+y-1])
> sage: Kquo(x)
> -ybar + 1

K in sage is Q[X,Y].
In PARI/GP the ring is Q(y)[x], so y*(y-1) is invertible.
In GP polynomials are always univariate over a field.

Cheers,
Bill