#13539: Add inverse_of_unit() for padics
---------------------------+------------------------------------------------
Reporter: saraedum | Owner: roed
Type: enhancement | Status: new
Priority: minor | Milestone: sage-5.4
Component: padics | Keywords:
Work issues: | Report Upstream: N/A
Reviewers: | Authors: Julian Rueth
Merged in: | Dependencies:
Stopgaps: |
---------------------------+------------------------------------------------
Currently, the padics lack an {{{inverse_of_unit()}}} method:
{{{
sage: (-1).inverse_of_unit()
-1
sage: ZpCA(3)(-1).inverse_of_unit()
AttributeError
}}}
The drawback with simply using {{{~}}} is that it puts the result in the
fraction field and it can be annoying to always convert it back to the
original ring when implementing general algorithms for all padics rings
and fields:
{{{
sage: t = ZpCA(3,2)(-1)
sage: t
sage: t.parent()
sage: ~t
sage: (~t).parent()
}}}
The attached patch implements a method {{{inverse_of_unit()}}} and fixes a
conversion error that came up when testing it.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13539>
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.