Hi Niels,

On Sun, 20 Sep 2009 15:45:37 +0200
x x <niels.lub...@gmail.com> wrote:

> 
> Sage is a great project in my opinion, and i hope to contribute, when
> i am more familiar with sage and python. I am not sure whether this
> belongs to sage-support or sage-devel, since i don't understand the
> architecture, in particular relating  to the Symbolic expressions.
> 
> That being said, i still don't understand what Symbolic expressions
> are.

Symbolic expressions are where sin(x), x^y, etc. live. In systems like
Maple or MMA, everything is a symbolic expression. This let's you do
formal symbol manipulation without worrying about the mathematical
background. Sage also let's the user work with algebraic structures,
similar to Axiom, Magma, etc. 

> >> sage: t = Mod(3,5)
> >> sage: t.parent()
> >> Ring of integers modulo 5
> >> sage: u = SR(t)
> >> sage: u
> >> 3
> >> sage: u.parent()
> >> Symbolic Ring
> >> sage: u.pyobject().parent()
> >> Ring of integers modulo 5
> 
> In this example t is defined over  "Ring of integers modulo 5", which
> is great, because i heard about this before. It is wrapped in a SR,
> for some reason, and afterwards the ring can be retrieved. No problem.

Say you want to work with t^n for some unspecified number n. You can do
this:

sage: var('n')
n
sage: u^n
3^n

After you're done computing, substituting a value for n will evaluate
the expression:

sage: (u^n).subs(n=5)
3
sage: res = (u^n).subs(n=5)
sage: res.parent()
Symbolic Ring

You can use .pyobject() on res to go back to working in Ring of
integers modulo 5.

<snip>
> So from a mathematical point of view, it seems that a symbolic ring is
> the polynomial ring with ground field determined by the coefficients
> (?).  

"Symbolic ring" is an unfortunate name. It doesn't mean much from the
"mathematical point of view." It's just where all the symbolic stuff
live in Sage. Maybe we should call it symbolic parent.

> Is this consistent with all the functions taking symbolic
> expressions without a ring specified?

I don't understand this question.

> >If you really want polynomials, you need to do
> >something like
> >
> >sage: R.<x> = CC[]
> >sage: x^2+1
> >
> >and go from there, I think.  That is occasionally annoying to those
> >of us who primarily teach undergraduates, but essential for many of
> >the applications of Sage.
> 
> It seems to me that not specifying the ring explicitly is even more
> difficult to teach. At least i hope so, because i don't understand it
> yet.

AFAICT, most non mathematician users prefer to work with symbols
instead of using the algebraic structures directly.

> As i understand "solve" differs from "roots" in that is solves systems
> of equation instead of a single equation. In solve it is not even
> possible to specify a ring, and only can solve in ""Symbolic""
> expressions.

The function solve() is meant to correspond to the solve command in
Maple and MMA, which try to find "solutions" to whatever you throw at
them. Here is the documentation for solve in Maple:

http://www.maplesoft.com/support/help/view.aspx?path=solve

ATM, Sage calls various functions in maxima to do this. As discussed in
this thread, this doesn't work very well.


Cheers,
Burcin


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to