Re: Working modulo 2

*To*: mathgroup at smc.vnet.net*Subject*: [mg92089] Re: Working modulo 2*From*: "David Park" <djmpark at comcast.net>*Date*: Sat, 20 Sep 2008 04:55:36 -0400 (EDT)*References*: <gavt0g$g4u$1@smc.vnet.net>

expr = 7 + x + 4 y + 4 x y + 3 z + 2 x z + 4 y z + 4 x y z expr /. x_Integer :> Mod[x, 2] 1 + x + z Or better: PolynomialMod[expr, 2] 1 + x + z There are various methods to search the documentation. One convenient method is to evaluate ?*keyword* to obtain all the commands that contain the keyword. So ?*Polynomial* gives us a list of functions that includes PolynomialMod. -- David Park djmpark at comcast.net http://home.comcast.net/~djmpark/ "me13013" <me13013 at gmail.com> wrote in message news:gavt0g$g4u$1 at smc.vnet.net... > Howdy, > > How does one reduce a polynomial's coefficients modulo 2? For > example, I have a function that sums several polynomials, and > currently produces a result like this: > 7 + x + 4 y + 4 x y + 3 z + 2 x z + 4 y z + 4 x y z > I want to reduce this to > 1 + x + z > > I thought I might be able to do this by somehow coercing the terms > into a list and then doing Sum[L[[i]],{i,1,Length[L]},Modulus->2], but > no such luck. > > Any ideas? > > Thanks, > Bob H >