On 2015-05-04 14:39, Bruno Grenet wrote:
Dear all,
1. In number fields, some elements are considered as prime, which is
not mathematically correct:
|
sage:S.<x>=NumberField(x^2+5)
sage:S(11).is_prime()
True
This is really due to S.ideal(11) returning a *fractional* ideal. I
think it's difficult to change that now.
2. When one defines a number field as above, one cannot define a new
number field anymore:
|
sage:S.<x>=NumberField(x^2+5)
sage:R.<y>=NumberField(x^2+7)
Traceback(most recent call last):
...
ValueError:variable names must be alphanumeric,but one is'Rational
Field'which isnot.
When defining R, x is not a polynomial variable, but an element of S.
The line
R.<y> = NumberField(x^2+7)
really is
R.<y> = NumberField(S(2))
The only bug here might be that the error message is very confusing. It
comes from
sage: S(2).polynomial(QQ)
ValueError: variable names must be alphanumeric, but one is 'Rational
Field' which is not.
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.