#10677: Improve PARI interface for relative number fields
------------------------------+---------------------------------------------
Reporter: jdemeyer | Owner: davidloeffler
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-4.6.2
Component: number fields | Keywords: pari rnf
Author: Jeroen Demeyer | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------------+---------------------------------------------
Comment(by mstreng):
Replying to [comment:7 jdemeyer]:
> The following is a proper example of a PARI relative number field
element::
> {{{
> Mod(Mod(y, y^3 + 17)*x + Mod(1, y^3 + 17), x^2 - y)
> }}}
Of course, sorry about that.
I don't know how much work it is, but as you are adding extra examples
anyway, perhaps you could fix this:
{{{
sage: K.<a> = QuadraticField(-5)
sage: p = pari("Mod(x,x^2+7)")
sage: K(p)
a
sage: K(p)^2
-5
sage: p^2
Mod(-7, x^2 + 7)
}}}
The same issue is there with your code:
{{{
sage: y = PolynomialRing(QQ,'y').gen()
sage: K.<a> = NumberField(y^3+17)
sage: x = PolynomialRing(K,'x').gen()
sage: L.<b> = NumberField(x^2-a)
sage: q = pari("Mod(Mod(y, y^3 + 19)*x + Mod(1, y^3 + 23), x^2 - y + 1)")
sage: L(q)
a*b
}}}
I think K(p) and L(q) should raise errors.
> There is an example in my patch in
`sage/rings/number_field/number_field_element.pyx`, line 3316. But it
might be a good idea to expand this.
Great! I'd say
* at least one example with the completely written out correct form of
PARI, in case idiots like me swap the moduli around again.
* at least one example with the incorrect moduli that raises an error
(like my examples in this comment).
* at least one example in the documentation of the {{{__init__}}} method
of {{{NumberFieldElement}}} (because that is where your new code is).
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10677#comment:10>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.