Ask Your Question

Quotient of Polynomial Ring (Leading Coefficient)

asked 2022-12-01 22:01:12 +0100

Thrash gravatar image

The following yields an error:

sage: R.<x> = Integers(4)[]
sage: Q.<a> = R.quotient(2*x)
TypeError: polynomial must have unit leading coefficient

How can I make it work?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2022-12-02 01:12:57 +0100

updated 2022-12-03 01:44:16 +0100

You could try this:

sage: from sage.rings.quotient_ring import QuotientRing_generic
sage: R.<x> = Integers(4)[]
sage: I = R.ideal(2*x)
sage: Q = QuotientRing_generic(R, I, ['a'])
sage: Q.inject_variables()

but I wouldn't be surprised if some things were broken. Quotients of polynomial rings are well implemented only when the leading coefficient is a unit, as the error message implies.

Edit: this doesn't raise any errors when you define the ring:

sage: R.<x> = ZZ[]
sage: J = R.ideal(2*x, 4)
sage: Q = R.quotient(J)

Maybe you can get somewhere this way.

edit flag offensive delete link more


Thanks! Is it possible/feasible to implement the other case too, especially if the quotient is finite?

Thrash gravatar imageThrash ( 2022-12-02 13:17:15 +0100 )edit

I don't know how hard it would be. As least some of the tools for describing quotients of polynomial rings rely on degree arguments: if you mod out by a polynomial of degree d, you can use polynomials of degree less than d to represent the quotient elements. Anyway, the quotient you're talking about it not finite, right? Each power of x will be nonzero and distinct in the quotient, right?

John Palmieri gravatar imageJohn Palmieri ( 2022-12-02 20:28:50 +0100 )edit

Yes and yes. I first wanted to emphasize the error that occurs with a non-unit leading coefficient. Meanwhile, I've opened another thread to talk about errors occurring in finite rings which aren't principal ideal rings:

Thrash gravatar imageThrash ( 2022-12-02 22:05:43 +0100 )edit

answered 2022-12-02 20:16:44 +0100

Emmanuel Charpentier gravatar image

updated 2022-12-03 13:49:32 +0100

EDIT : this answer is FALSE : see John Palmieri's comment. I leave it for the edification of future (per-)users.

You can also explicitely use the fact that the ring of congruences modulo 4 is a field :

sage: R.<x>=Zmod(4)[]
sage: Q.<a>=R.quotient(2*x)
TypeError                                 Traceback (most recent call last)

[ Snip... ]

TypeError: polynomial must have unit leading coefficient

But :

sage: R.<x>=GF(4)[]
sage: Q.<a>=R.quotient(2*x)
sage: Q
Univariate Polynomial Ring in x over Finite Field in z2 of size 2^2


edit flag offensive delete link more



GF(4) is not the same as Zmod(4). 2 is a zero-divisor in Zmod(4).

John Palmieri gravatar imageJohn Palmieri ( 2022-12-02 20:24:25 +0100 )edit

@John Palmieri : You're right. Editing my (non-answer) for the edification of future |` (per-)users...

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2022-12-03 13:45:47 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2022-12-01 22:01:12 +0100

Seen: 116 times

Last updated: Dec 03 '22