Thank you William.  Unfortunately the coefficient command does not
appear to allow me to determine what terms the coefficients are
associated with.  If I had the expression:

a*x^2+b*x*y +c*y^2

 and the b term was zero the output would be [a,c] but I would not
know if the zero element was a, b, or c.  That's why I was trying to
get coeff() to work because it allows me to check for each term
individually.  Is there a way to coerce the groebner_basis() output
into the correct form to allow coeff() to work?

David

On Sep 14, 1:48 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
> On 9/14/07, David Stahl <[EMAIL PROTECTED]> wrote:
>
>
>
> > I am using the sage command groebner_basis().
>
> > David
>
> OK, this just seems like a case of showing you an example will
> answer the question.   Let me know if it doesn't:
>
> sage: P.<a,b,c> = PolynomialRing(QQ,3, order='lex')
> sage: I = sage.rings.ideal.Katsura(P,3) # regenerate to prevent caching
> sage: g = I.groebner_basis()
> sage: g[0].coefficients()
> [84, -40, 1, 1]
> sage: g[1].coefficients()
> [7, 210, -79, 3]
> sage: g[2].coefficients()
> [1, 2, 2, -1]
> sage: g
> [84*c^4 - 40*c^3 + c^2 + c, 7*b + 210*c^3 - 79*c^2 + 3*c, a + 2*b + 2*c - 1]
>
>
>
>
>
> > On Sep 14, 1:05 pm, Martin Albrecht <[EMAIL PROTECTED]>
> > wrote:
> > > On Friday 14 September 2007, David Stahl wrote:
>
> > > > Can anyone tell me how to extract the coefficients from the results of
> > > > groebner()?
>
> > > Dou you mean Ideal.groebner_basis i.e. the SAGE method or
> > > SingularElement.groebner i.e. the Singular command? As you try to call 
> > > coeff
> > > you probably refer tot he Singular function. Singular doesn't have a 
> > > command
> > > coeff but it has a command coef (notice the single 'f'), described here:
>
> > >http://www.singular.uni-kl.de/Manual/3-0-3/sing_175.htm#SEC215
>
> > > Martin
>
> > > --
> > > name: Martin Albrecht
> > > _pgp:http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
> > > _www:http://www.informatik.uni-bremen.de/~malb
> > > _jab: [EMAIL PROTECTED]
>
> --
> William Stein
> Associate Professor of Mathematics
> University of Washingtonhttp://wstein.org


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to