On Monday, February 17, 2014 6:39:38 PM UTC+1, [email protected] wrote:
>
> OK, I tried the following:
>
> S.<i,x,y> = PolynomialRing(QQ,order='lex')
> I = ideal(i^2+1,(1+i)*x+y,x+(1-i)*y-(1-i))
> G = I.groebner_basis()
> G
>
> would give me
>
> [i - x - 1, x^2 + 2*x + 2, y - 2]
>
> which are the results. But I am confused; why I can't get the result when I 
> try 
> to get a polynomial ring in the field of complex numbers implemented by sage? 
> Also,
> does adding i**2+1=0 really extend the rational numbers to complex number 
> field?
>
>
The problem with CC is that it is an *inexact field. *If you do 
computations with coefficients in CC, you will end up with roundup errors. 
For instance, buchberger algorithm to compute Grobner basis would yield the 
ideal (1) with high probability.

In the case, you are not computing on the complex numbers, only on the 
gaussian rationals. Essentially, you are working on QQ[i] without naming 
it. In this case your solutions live on QQ[i] so it is not a problem.

Consider the following example:  

system x^2+i+y^3,   y^4-x

sage: S.<i,x,y>=PolynomialRing(QQ,order='lex')
sage: I=Ideal(x^2+i+y^3, y^4-x)
sage: I.groebner_basis()
[i + y^8 + y^3, x - y^4]

Then, y is any of the 8 roots of the polynomial *'i + y^8 + y^3*', and for 
each one of these roots, *x=y^4*. So you get 8 pairs (x,y) of solutions.

By the way, the suggestion given by John Perry is to do:

sage: N.<i> = NumberField(x^2+1)
sage: S.<x,y>=PolynomialRing(QQ,order='lex')

if you do this, then 

sage: i^2
-1

you are really working on QQ[i]

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to