R=BooleanPolynomialRing(100,['x'+str(i) for i in [1..100]]) R.inject_variables() # if you don't really need the identifiers in Python's namespace, better skip this
On Dec 5, 6:18 am, Subhadeep Banik <monsieurlel...@gmail.com> wrote: > If I have a boolean expression of a certain number of variables, how > do I define a polynomial ring with them.. For example, let > (x0,x1,x2,x3,x4,x5,x6,x7) be a set of variables, and I have an > expression S = x0 + x1*x3 + x7 > I need to define the polynomial ring > R.<x0,x1,x3,x7>=BooleanPolynomialRing(4) > > This exercise is fine, if the number of variables is small , but what > is the solution if the number of variables is large. > > Thank You > > Subhadeep Banik > ________________________________ > Senior Research Fellow > Applied Statistics Unit > Indian Statistical Institute Kolkata > Phone : 91 9433037829 (M) > 91 33 - 25741829 (H) -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org