# Reduction In Quotient Rings (x^2 - x = 0)

Hi,

Thank you for taking the time to read this, it is very much appreciated.

My question concerns how to ensure that a polynomial within a quotient ring has the following property:

 (x^2)k = 0


whereby x is any variable in the quotient ring and k is a positive integer.

This is the way I tried to go about the situation: I created a polynomial ring

P.<x,y,z,w> = PolynomialRing(GF(2), 4, order = 'degrevlex')


Since I am not working within a quotient ring, x^2 (or any of the other three variables) does not 'become' 0. Since I would like the property of x^2 = 0, I decided to create a quotient ring with some field equations:

Q = P.quotient_ring(ideal([var**q - var for var in P.gens()]))


whereby q = P.base_ring.order() . However, when I then created the following polynomial, its parent was still P, so I changed its ring:

f1 = y*z + y*w + w^2
f1 = f1.change_ring(Q)


However, when I print f1, it, w^2 is still w^2 and has not reduced down to 0. I was wondering if I am missing something, please? This gets annoying because I am going to be working with Macaulay Matrices and hence, it is essential that I work within a quotient ring. Maybe I am missing some mathematics since this is all very new to me...

This is my sage input:

sage: P.<x,y,z,w> = PolynomialRing(GF(2), 4, order = 'degrevlex')
sage: q = P.base_ring().order()
sage: Q = P.quotient_ring(ideal([var**q - var for var in P.gens()]))
sage: f1 = y*z + y*w + w^2
sage: f1
y*z + y*w + w^2
sage: f1 = f1.change_ring(Q)
sage: f1
y*z + y*w + w^2


How would go about to ensure that w^2 = 0? I've already tried adding the original polynomial to the field equations when creating the quotient ring and changing its ring afterwards, like so:

sage: P.<x,y,z,w> = PolynomialRing(GF(2), 4, order = 'degrevlex')
sage: q = P.base_ring().order()
sage: f1 = y*z + y*w + w^2
sage: Q = P.quotient_ring(ideal([f1] + [var**q - var for var in P.gens()]))
sage: f1 = f1.change_ring(Q)
sage: f1
y*z + y*w + w^2


But as you can see, nothing happened... Thank you!

edit retag close merge delete

Ok, I believe that by doing

Q(f1).lift()


it works. But this can make the code quite ugly if I need to work exclusively with this Q...is there a better way of doing this, please?

Sort by » oldest newest most voted

The tool you need is called "Boolean polynomial ring". See

It allows you to work in polynomials over the field with two elements, modulo the ideal generated by squares of all the polynomial variables.

Using the degrevlex monomial in Boolean polynomial rings is deprecated. Instead, reverse the order or variables manually and use degneglex.

Define the polynomial ring:

sage: P.<w, z, y, x> = BooleanPolynomialRing(4, order='degneglex')


Define a polynomial:

sage: f = y*z + y*w + w^2


Check the reduction of squares of the variables happens:

sage: f
z*y + w*y + w

more

Perfect! Thank you, you've saved me a considerable amount of time by not having to lift all my polynomials to a quotient ring

1

Really, Brial, formerly PolyBoRi, is the one saving you time! See

If I understand correctly, Sage delegates all boolean polynomial computations to Brial.