On Oct 28, 11:57 am, DuleOrlovic <duleorlo...@gmail.com> wrote:
> I forget to add few more equations to system ie. {x^4-x,y^4-y,z^4-z}
> in reason to have solution in GF(4) and zero dimensional ideal, so I
> answered my question.
> But, I have another issue.
> When I use quotient ring Q, J.groebner_basis() does not return
> completely reduced basis.
> Also, with quotient ring Q, J.variety() returns ValueError: Could not
> detect ring.
>
> Code:
> K.<alpha>=GF(4)
> R.<a,b,c>=PolynomialRing(K,3,order='lex')
> Q.<x,y,z>=R.quotient(sage.rings.ideal.FieldIdeal(R))
> R.inject_variables()
> Q.inject_variables()
> F=[a^3+a+c,b+c,a^4-a,b^4-b,c^4-c]
> G=[x^3+x+z,y+z]
> I=Ideal(F)
> J=Ideal(G)
> print I.groebner_basis()
> print J.groebner_basis()
>    Defining a, b, c
>    Defining x, y, z
>    [a^2 + a + c^2 + c, a*c + c^2 + c, b + c, c^3 + c^2 + c]
>    [x^2 + x*z + x, x*z + z^2 + z, y + z, z^3 + z^2 + z]
> J.variety()
>    Traceback (click to the left of this block for traceback)
>    ...
>    ValueError: Could not detect ring.

Computing with generic quotient rings I am afraid that will be slow
and that will yield to various errors. Specially as in this case,
where the ideal is not prime (you are looking for solutions in GF(4)).
Your code tries to compute the grobner basis of an ideal in a ring
that is not an integer domain...

I would work instead with the ideal

J=sage.rings.ideal.FieldIdeal(R) + Ideal([a^3+a+c, a+c])
sage: J
Ideal (a^4 + a, b^4 + b, c^4 + c, a^3 + a + c, a + c) of Multivariate
Polynomial Ring in a, b, c over Finite Field in alpha of size 2^2

of all the relevant equations and translate here the meaning of what
you want to do

sage: J.groebner_basis()
[a, b^4 + b, c]

sage: J.variety()
[{a: 0, b: 0, c: 0}, {a: 0, b: 1, c: 0}, {a: 0, b: alpha, c: 0}, {a:
0, b: alpha + 1, c: 0}]

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to