Thank you, I get the solution by using N.<i> = NumberField(x^2+1) S.<x,y> = PolynomialRing(QQ,order='lex')
is the variable x in the first line a dummy one, i.e. has nothing to do with the x in the second line? Sorry, I am new to Sage and sometimes I get confused. If CC is not appropriate for this kind of problems we are discussing, for what computational reason can CC be used in sage or any other computer algebra system? Best Regards, On Monday, February 17, 2014 1:08:30 PM UTC-5, luisfe wrote: > > > > 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.
