axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] Re: [sage-devel] Re: MAGMA question


From: William Stein
Subject: [Axiom-developer] Re: [sage-devel] Re: MAGMA question
Date: Wed, 18 Oct 2006 14:57:40 -0700
User-agent: Opera Mail/9.01 (MacIntel)

On Wed, 18 Oct 2006 13:05:52 -0700, Page, Bill <address@hidden> wrote:
Incidentally, SAGE already has a useful shorthand for the
above:

sage: x = polygen(ZZ)
sage: parent(x)
Univariate Polynomial Ring in x over Integer Ring


I think you need to define the semantics very carefully here.
As an Axiom user I want to interpret the Sage expressions
above in a slightly different language. What you mean is that
x is now a member of a certain class, i.e. it's "parent" and
polygen is a generator of members of this class. Here the
value is explicit by the type of the result, i.e. parent, is
implicit. This is sort of the opposite of the convention used
in Axiom.

In Sage how would I create a symbol whose value is the Integer
1 considered as a Polynomial? E.g. (5) above.

sage: R = ZZ['x']
sage: a = R(1)
sage: type(a)
<class 'sage.rings.polynomial_element.Polynomial_integer_dense'>
sage: parent(a)
Univariate Polynomial Ring in x over Integer Ring
sage: a
1

You could make 1 in any ring R the same way.

Of course, in SAGE you can use PARI polynomials:

sage: x = pari('x')
sage: y = pari('y')
sage: f = x*(y^2+7/3)
sage: f^3
(y^6 + 7*y^4 + 49/3*y^2 + 343/27)*x^3


And now you can do the same think using Axiom :-)

And now the interface is officially released...


address@hidden page]$ sage
--------------------------------------------------------
| SAGE Version 1.4, Build Date: 2006-10-05             |
| Distributed under the GNU General Public License V2. |
--------------------------------------------------------

experimental

sage: x = axiom('x')
sage: y = axiom('y')
sage: f = x*(y^2+7/3)
sage: f^3

   3 6     3 4   49  3 2   343  3
  x y  + 7x y  + -- x y  + --- x
                  3         27
Type: Polynomial Fraction Integer

sage:

> Anyhow, it is just one pet peeve in MAGMA which seems
> easy enough to relieve somehow.

What do you think of
     x = polygen(ZZ)      for x in ZZ[x]
and
     x = polygen()        for a formal x (whose properties
are yet to be determined)


What would be the value of parent(x) for the second case?

We haven't decided yet --  I'm thinking something like
    Formal Univariate Polynomial Ring.

William




reply via email to

[Prev in Thread] Current Thread [Next in Thread]