| 1 | initial version |
You can use the substitute (or subs) method. I like using a Python dict as its argument:
sage: R.<a,b,c,d> = BooleanPolynomialRing()
sage: S = R.gens()
sage: f = a*b + b*c
sage: f.subs({a:1})
b*c + b
sage: f.subs({S[0]:1})
b*c + b
sage: f.subs({S[0]:1, S[2]:a})
a*b + b
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.