On Jun 17, 5:34 pm, William Stein <wst...@gmail.com> wrote:
> 2009/6/17 Robert Bradshaw <rober...@math.washington.edu>:
>
>
>
> > On Jun 17, 2009, at 4:05 AM, John Cremona wrote:
>
> >> I think is is easier, both on the eye and for a beginner to
> >> understand:
>
> >> sage: x = polygen(ZZ)
> >> sage: f = 2*x**2 - x
> >> sage: f.factor()
> >> x * (2*x - 1)
>
> > Perhaps. I like the R[var] notation because it's a direct translation
> > of the mathematical notation.
>
> I love the R[var] notation too.  I remember making it up and being very 
> pleased.

Sure.   However you cannot do R=ZZ[t] but must do R=ZZ['t'], and then
do something else to get the variable t to be assigned to the variable
which prints as 't'.  that means either R.<t>=ZZ['t']  (which to a
mathematician looks like double definition), or t = ZZ['t'].gen(0)
which looks rather less mathematical (and does not end up giving the
ring a name).

Why can't these computers just know what we mean!

>
> >  Note the default variable name:
>
> > sage: t = polygen(ZZ)
> > sage: t
> > x
>
> yes, that's good to point out.  To make it t:
>
> sage: t = polygen(ZZ,'t')
> sage: t
> t
>

Ahah!   I think I have only ever used x, so I had not noticed that....

John Cremona

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

Reply via email to