#7260: [with patch; needs review] Inverse mod number field ideals: deal with
several remaining problems
-----------------------------+----------------------------------------------
Reporter: fwclarke | Owner: davidloeffler
Type: defect | Status: new
Priority: major | Milestone: sage-4.2
Component: number fields | Keywords: inverse_mod
Work_issues: | Author:
Reviewer: | Merged:
-----------------------------+----------------------------------------------
At present the function `inverse_mod` (which computes the inverse of
elements of number fields modulo integral ideals) suffers from several
defects.
1. It does not work for elements of relative number fields, though it
does for an element of the rings of integers of such a number field.
2. The behaviour is different depending whether the element's parent is
the number field or the maximal order. Thus with 4.1.2:
{{{
sage: k.<a> = NumberField(x^3 + 11)
sage: R = k.ring_of_integers()
sage: (a + 13).inverse_mod(k.ideal(a^2))
-3*a - 5
sage: R(a + 13).inverse_mod(k.ideal(a^2))
-123*a^2 + 8*a - 104
}}}
This is because the field version of the function applies `small_residue`
to the results of the computation, while the order versions do not.
Moreover
{{{
sage: R(a + 13).inverse_mod(k.ideal(a^2)).parent() == k
True
}}}
when it would make more sense if the inverse of an element of R was an
element of R.
3. Error messages are inconsistent.
The attached patch deals with these defects and also makes the code run a
bit faster in some cases.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7260>
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
-~----------~----~----~----~------~----~------~--~---