[sage-support] Re: bug/feature in subs() for polynomials in a polynomial ring over a polynomial ring

2014-02-17 Thread Dima Pasechnik
On 2014-02-17, Marc Mezzarobba wrote: > Dima Pasechnik wrote: >> sage: r0=QQ['a1,a2'] >> sage: a1,a2=r0.gens() >> sage: r=r0['x1,x2'] > [...] >> I am using such a ring as I want to treat ai as parameters, i.e. I >> would like monomial expansions in xi alone. >> Perhaps there is a better way to acc

[sage-support] Re: Getting an error with .g_algebra() when trying to build a Weyl algebra

2014-02-17 Thread Dima Pasechnik
On 2014-02-17, Douglas Weathers wrote: > The rabbit hole led me to this discussion > > https://groups.google.com/forum/#!topic/sage-devel/QoboPuLUmw8 > > from a couple of years ago, and I see that the ticket > > http://trac.sagemath.org/ticket/4539#no1 > > has been merged into SAGE 5 (I have 6.0).

[sage-support] Re: groebner bases of polynomials with complex coefficients

2014-02-17 Thread john_perry_usm
The actual computation I had in mind requires a somewhat more convoluted: sage: R = QQ[sqrt(-1)] sage: RI = R.gens()[0] # necessary, since Sage's I is symbolic, and causes issues sage: S. = PolynomialRing(R,order='lex') sage: SI = S.ideal((1+RI)*x+y,x+(1-RI)*y-(1-RI)) sage: SI.groebner_basis() [x

[sage-support] Re: groebner bases of polynomials with complex coefficients

2014-02-17 Thread sahin508
Thank you, I get the solution by using N. = NumberField(x^2+1) S. = 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

[sage-support] Getting an error with .g_algebra() when trying to build a Weyl algebra

2014-02-17 Thread Douglas Weathers
The rabbit hole led me to this discussion https://groups.google.com/forum/#!topic/sage-devel/QoboPuLUmw8 from a couple of years ago, and I see that the ticket http://trac.sagemath.org/ticket/4539#no1 has been merged into SAGE 5 (I have 6.0). So when I try the example in the Google group I get

[sage-support] Re: groebner bases of polynomials with complex coefficients

2014-02-17 Thread luisfe
On Monday, February 17, 2014 6:39:38 PM UTC+1, sahi...@gmail.com wrote: > > OK, I tried the following: > > S. = 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 result

[sage-support] Re: groebner bases of polynomials with complex coefficients

2014-02-17 Thread sahin508
OK, I tried the following: S. = 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 fie

[sage-support] Re: groebner bases of polynomials with complex coefficients

2014-02-17 Thread john_perry_usm
ACK! Make sure I=sqrt(-1) first! john perry On Monday, February 17, 2014 10:37:30 AM UTC-6, sahi...@gmail.com wrote: > > Hi: > > I am trying to obtain solution of a system of polynomial equations with > complex coefficients without success. For example, when I try > > S. = PolynomialRing(CC,ord

[sage-support] Re: groebner bases of polynomials with complex coefficients

2014-02-17 Thread john_perry_usm
Instead of CC, try using QQ[i]. That works for me, giving the basis [x + 4/25, y - 24/25] john perry On Monday, February 17, 2014 10:37:30 AM UTC-6, sahi...@gmail.com wrote: > > Hi: > > I am trying to obtain solution of a system of polynomial equations with > complex coefficients without su

[sage-support] groebner bases of polynomials with complex coefficients

2014-02-17 Thread sahin508
Hi: I am trying to obtain solution of a system of polynomial equations with complex coefficients without success. For example, when I try S. = PolynomialRing(CC,order='lex') I = ideal((1+i)*x+y,x+(1-i)*y-(1-i)) G = I.groebner_basis() I see this error: AttributeError: 'Ideal_generic' object ha

[sage-support] Re: bug/feature in subs() for polynomials in a polynomial ring over a polynomial ring

2014-02-17 Thread Marc Mezzarobba
Dima Pasechnik wrote: > sage: r0=QQ['a1,a2'] > sage: a1,a2=r0.gens() > sage: r=r0['x1,x2'] [...] > I am using such a ring as I want to treat ai as parameters, i.e. I > would like monomial expansions in xi alone. > Perhaps there is a better way to accomplish this? The best I can think of is p.map_

[sage-support] bug/feature in subs() for polynomials in a polynomial ring over a polynomial ring

2014-02-17 Thread Dima Pasechnik
Substituting variables for constants in R[x1,x2], where R=QQ[a1,a2] does not work as expected: sage: r0=QQ['a1,a2'] sage: a1,a2=r0.gens() sage: r=r0['x1,x2'] sage: x1,x2=r.gens() sage: p=a1*a2*x1^2+a2*x2; p a1*a2*x1^2 + a2*x2 sage: p.subs(x1=1,a1=2) # this is nonsense; a1 remains a2*x2 + a1*a2 It

[sage-support] Re: missing "share" links in page with sage cells

2014-02-17 Thread Ken Levasseur
I also converted by hand but hope to put together a script in my spare time. Will let you know if I'm successful in finding the time. Ken -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails