Skip to Content.
Sympa Menu

texmacs-users - Re: [TeXmacs] SAGE

Subject: mailing-list for TeXmacs Users

List archive

Re: [TeXmacs] SAGE


Chronological Thread 
  • From: "Mike Hansen" <address@hidden>
  • To: address@hidden
  • Subject: Re: [TeXmacs] SAGE
  • Date: Wed, 28 Nov 2007 03:29:45 -0600
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ZZnQCAAg08pG9GzJRN/Dn3cRUISqa+h0cKHulNtULSVOwpo6dMjYdSSFaDcdcoSARVCJnZLSp7yq8ko/or75OH4cbFXA6phpVQ63gDZpTXt97wpBUqEc/P++3bWshjqh+Xs4cax/GhJFW0o04qEHkTccDe4HvJS9FG+CqozTpng=

For the interfaces that Sage provides, it does little to no parsing.
Instead, it creates a Sage (Python) object which corresponds to an
object/variable in the other CAS. It talks to the other CASs through
a pseudo-tty interface. Here's an example Sage session using the
Magma interface:

sage: P.<x> = PolynomialRing(ZZ)
sage: f = x^2 + x +1
sage: type(f)
<type
'sage.rings.polynomial.polynomial_integer_dense_ntl.Polynomial_integer_dense_ntl'>
sage: f^2
x^4 + 2*x^3 + 3*x^2 + 2*x + 1
sage: g = magma(f)
sage: g
x^2 + x + 1
sage: type(g) #The Python type of g
<class 'sage.interfaces.magma.MagmaElement'>
sage: g.name() #The name of the variable in the Magma session
'_sage_[2]'
sage: g^2
x^4 + 2*x^3 + 3*x^2 + 2*x + 1
sage: g+4*x
x^2 + 5*x + 1
sage: g.BaseRing()
Integer Ring
sage: g.Factorization()

[
<_x^2 + _x + 1, 1>
]

sage: g.LeadingTerm()
x^2
sage: g.Derivative()
2*x + 1
sage: g.IsMonic()
true
sage: S5 = magma.SymmetricGroup(5)
sage: S5

Symmetric group acting on a set of cardinality 5
Order = 120 = 2^3 * 3 * 5
(1, 2, 3, 4, 5)
(1, 2)
sage: S5.Order()
120
sage: S5.IsAbelian()
false

Sage also interfaces with some CASs through a C-library interface (for
example, Pari and Singular).

The Sage plugin is based on the Python plugin since Sage is written in
Python. Since the plugin is in Python also you can do some neat
things like inspect the objects that are returned / created. There is
some information on it here: http://wiki.sagemath.org/TeXmacs . One
thing that it doesn't do is handle TeXmacs' 2D math input.

--Mike

On Nov 28, 2007 3:00 AM, Bas Spitters <address@hidden> wrote:
> Dear Mike,
>
> Interesting.
>
> After sending the message, I imagined that this would be an interesting and
> perhaps more uniform way of interfacing with CASs. Looking (only) at the
> screen shot I imagine that sage returns some kind of structured output for
> CASs. I once spend some time doing a magma plugin for texmacs, but gave up
> when having to parse multiline ascii. Magma should just return some
> structured output (tex/ XML/ texmacs...). It seems that Sage provides this
> for a number of systems (including magma).
>
> Perhaps, you can explain a bit more about your Sage plugin so that people
> can
> expand on it. [I will have to apologise in advance for lacking the time for
> this myself at this point.]
>
> Bas
>
>
> On Wednesday 28 November 2007 09:38:39 Mike Hansen wrote:
> > Hello,
> >
> > I'm a Sage developer (who happened to write the Sage plug-in for
> > TeXmacs). While one of the goals is to make it so that computer
> > algebra systems can work together, I don't view that as its primary
> > goal. Sage's goal is to create a free, open-source viable alternative
> > to Magma, Mathematica, Maple, and MATLAB. Part of this involves
> > making use of existing open source math software, but a lot of it is
> > implementing new functionality that fills in the missing gaps.
> >
> > I would like to see the Sage plugin for TeXmacs expanded upon, but I
> > personally have too many other things to work on at the moment.
> >
> > --Mike
> >
> > On Nov 28, 2007 2:22 AM, Bas Spitters <address@hidden> wrote:
> > > Hello,
> > >
> > > Sage
> > >
> > > http://www.sagemath.org
> > >
> > > presents itself as a texmacs competitor:
> > >
> > > http://www.sagemath.org/screen_shots/.html/sage_vs_texmacs.html
> > >
> > > mostly for interfacing with computer algebra systems. Did anyone look at
> > > it? Perhaps they have ideas (or even code) that could be useful for
> > > texmacs too.
> > >
> > > Bas
>
>
>



Archive powered by MHonArc 2.6.19.

Top of Page