| 1 | initial version |
The simplest is to work over boolean polynomials
sage: B.<a,b> = BooleanPolynomialRing(2)
sage: (a+b+1)^2
a + b + 1
But you can also use the more general quotient of polynomial rings (notice that in GF(2) a equals -a)
sage: R.<a,b> = PolynomialRing(GF(2), 'a,b')
sage: Rbar = R.quotient([a^2+a, b^2+b])
sage: abar,bbar = Rbar.gens()
sage: abar
abar
sage: (abar+bbar+1)^2
abar + bbar + 1
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.