Ask Your Question

Revision history [back]

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

It allows you to work in polynomials over $F_2$ modulo the ideal

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

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

It allows you to work in polynomials over $F_2$ 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