On 3/20/07, Nick Alexander <[EMAIL PROTECTED]> wrote:
>
> My guess is that the pari conversion code is not being careful with
> the variable names, but I haven't really tried it.  Makes it pretty
> hard to work with number fields, no?
>
> Nick
>
> sage: (QQ['x'].0^2 + 1).is_irreducible()
>  True
>
> sage: (QQ['a'].0^2 + 1).is_irreducible()
> ---------------------------------------------------------------------------
> <type 'exceptions.NotImplementedError'>   Traceback (most recent call
> last)

I don't know what email you're responding to or what version
of SAGE you're using, but the above example works fine for
me (no error) with sage-2.3:

rank4:~ was$ sage
----------------------------------------------------------------------
| SAGE Version 2.3, Release Date: 2007-03-06                         |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: (QQ['a'].0^2 + 1).is_irreducible()
True

> the pari conversion code is not being careful with
> the variable names, but I haven't really tried it.  Makes it pretty
> hard to work with number fields, no?

Regarding that comment, you have to be very very careful with
coercing to PARI -- in particular you often do *not* want to preserve
the variable name, since in PARI certain natural variables names
(which you would want to use in SAGE) do not work like you might
think they would.  Also, the actual variable name has an impact
sometimes on how it behaves in PARI, e.g., x is different than t
in some contexts.   For example,

sage: pari(QQ['I'].0)
<class 'gen.PariError'>                   Traceback (most recent call last)
...
<class 'gen.PariError'>:  (8)
sage: (QQ['I'].0^2 + 1).is_irreducible()
True

As you can see, you do not want to just coerce the polynomial
to PARI when doing the irreducibility test, since, e.g., the variable
named "I" isn't allowed in PARI.

William

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

Reply via email to