Hi!
On Oct 29, 4:34 pm, vpv <[EMAIL PROTECTED]> wrote:
> The dimension of the ideal of the groebner basis of the new system is
> 4 and not 0? Why?
Since you are still in a ring with 8 (and not 4) variables.
<snip>
> What i do next i set:
>
> x[0]=P(0)
> x[1]=P(1)
>
> x[4]=P(1)
> x[5]=P(0)
>
> Then my new system is:
>
> sage: e
>
> [x2*x7 + x2 + x3*x6 + x3*x7 + x3,
> x3*x7 + x3 + x7,
> x2*x7 + x6 + 1,
> x3*x6 + x3*x7 + x3 + x6 + 1,
> x2*x7 + x3*x6 + x7,
> x2*x6 + x2*x7 + x3*x7 + x3,
> x2*x7 + x2 + x3*x7 + x3 + x7,
> x2*x6 + x3*x6 + x3,
> x2*x7 + x3 + x6 + x7 + 1,
> x2*x6 + x2 + x3*x7,
> x2*x6 + x2 + x3*x6 + x3 + x7]
Apparently x2,x3,... are still generators of your original polynomial
ring P -- and P has 8 variables, even though the new system of
polynomials e uses only four of them. Defining a new ring with only
the "surviving" variables has the expected result:
sage: P.<x2,x3,x6,x7> = PolynomialRing(GF(2), 4, 'x',order='lex')
sage: e = [x2*x7 + x2 + x3*x6 + x3*x7 + x3,
....: x3*x7 + x3 + x7,
....: x2*x7 + x6 + 1,
....: x3*x6 + x3*x7 + x3 + x6 + 1,
....: x2*x7 + x3*x6 + x7,
....: x2*x6 + x2*x7 + x3*x7 + x3,
....: x2*x7 + x2 + x3*x7 + x3 + x7,
....: x2*x6 + x3*x6 + x3,
....: x2*x7 + x3 + x6 + x7 + 1,
....: x2*x6 + x2 + x3*x7,
....: x2*x6 + x2 + x3*x6 + x3 + x7]
sage: I=ideal(e)
sage: I.dimension()
0
sage: I2=ideal(I.groebner_basis())
sage: V=I2.variety()
sage: V
[{x2: 0, x7: 0, x6: 1, x3: 0}]
Substitution of variables in a polynomial ideal *and* carrying it to a
smaller polynomial ring seems to be a common problem.
The subs-method does the substitution but keeps the ring:
sage: I.subs({x2:0})
Ideal (x2*x7 + x2 + x3*x6 + x3*x7 + x3, x3*x7 + x3 + x7, x2*x7 + x6 +
1, x3*x6 + x3*x7 + x3 + x6 + 1, x2*x7 + x3*x6 + x7, x2*x6 + x2*x7 +
x3*x7 + x3, x2*x7 + x2 + x3*x7 + x3 + x7, x2*x6 + x3*x6 + x3, x2*x7 +
x3 + x6 + x7 + 1, x2*x6 + x2 + x3*x7, x2*x6 + x2 + x3*x6 + x3 + x7) of
Multivariate Polynomial Ring in x2, x3, x6, x7 over Finite Field of
size 2
Question to everybody:
Is there a method that substitutes, say, x2=0 and returns an ideal in
a polynomial ring over x3, x6, x7?
If not, do you agree that such method (called, say, "specialisation")
would be useful?
Cheers
Simon
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---