[sage-support] Re: symbolic substitution

2008-06-20 Thread vpv
Thanks for your help! Both solutions worked for me. On Jun 16, 9:56 pm, "William Stein" <[EMAIL PROTECTED]> wrote: > On Mon, Jun 16, 2008 at 9:43 AM, vpv <[EMAIL PROTECTED]> wrote: > > > Hello William, > > > Thanks for your reply! I think I can use your idea to solve my > > problem. I tried to ru

[sage-support] Re: symbolic substitution

2008-06-16 Thread William Stein
On Mon, Jun 16, 2008 at 9:43 AM, vpv <[EMAIL PROTECTED]> wrote: > > Hello William, > > Thanks for your reply! I think I can use your idea to solve my > problem. I tried to run your example in Sage for the case when > x1,x2,x3,x5,x7 are in GF(2). I realized that in that case e1 and e2 > should also

[sage-support] Re: symbolic substitution

2008-06-16 Thread Marshall Hampton
There are probably more elegant ways to do this, but one way is: varstring = '' for i in range(1,101): varstring += 'e' + str(i)+ ',' bool100 = eval('BooleanPolynomialRing(100,"' + varstring[0:-1] + '")') -M. Hampton On Jun 16, 10:43 am, vpv <[EMAIL PROTECTED]> wrote: > Hello William, > >

[sage-support] Re: symbolic substitution

2008-06-16 Thread vpv
Hello William, Thanks for your reply! I think I can use your idea to solve my problem. I tried to run your example in Sage for the case when x1,x2,x3,x5,x7 are in GF(2). I realized that in that case e1 and e2 should also be defined in GF(2). As I need to do a hundred substitutions in which all ei

[sage-support] Re: symbolic substitution

2008-06-15 Thread William Stein
On Sun, Jun 15, 2008 at 5:45 AM, vpv <[EMAIL PROTECTED]> wrote: > > I have two expressions - exp1 and exp2: > > sage: exp1 = (x1*x2+x3) > sage: exp2 = (x1+x3*x5*x7) > sage: exp1 > x1*x2 + x3 > sage: exp2 > x1 + x3*x5*x7 > > I try to substitute exp1 and exp2 for the symbolic variables e1 and e2 > r