Opened 13 years ago
Closed 13 years ago
#6458 closed defect (fixed)
[with patch, positive review] Inverse modulo an ideal in a relative number field
Reported by: | David Loeffler | Owned by: | William Stein |
---|---|---|---|
Priority: | major | Milestone: | sage-4.1.1 |
Component: | number theory | Keywords: | |
Cc: | Merged in: | sage-4.1.1.alpha0 | |
Authors: | David Loeffler | Reviewers: | Nick Alexander |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
This adds a few lines to get inverse_mod
working in the ring of integers of a relative field.
Attachments (2)
Change History (9)
Changed 13 years ago by
Attachment: | trac_6458-relative_ideal_inverse_mod.patch added |
---|
comment:1 Changed 13 years ago by
Summary: | Inverse modulo an ideal in a relative number field → [with patch, needs review] Inverse modulo an ideal in a relative number field |
---|
comment:2 Changed 13 years ago by
Authors: | → David Loeffler |
---|---|
Reviewers: | → Nick Alexander |
Summary: | [with patch, needs review] Inverse modulo an ideal in a relative number field → [with patch, needs work] Inverse modulo an ideal in a relative number field |
These doctests don't actually assert that the results are correct. Could you add the few lines verifying that you're really getting a basis and really getting an inverse?
comment:3 Changed 13 years ago by
Also, I get a doctest failure on sage.math. This could be transient -- this is with a slightly out of date sage build. But there's no way this will work on all architectures, so testing the property will be much better.
sage -t -long devel/sage/sage/rings/number_field/number_field_element.pyx ********************************************************************** File "/scratch/ncalexan/sage-4.0.2.alpha1/devel/sage-main/sage/rings/number_field/number_field_element.pyx", line 3436: sage: OE(b - a).inverse_mod(17*b) Expected: (-25*b + 26)*a + 51*b - 1 Got: (26*b - 25)*a - 51*b - 1
comment:4 Changed 13 years ago by
Summary: | [with patch, needs work] Inverse modulo an ideal in a relative number field → [with new patch, needs review] Inverse modulo an ideal in a relative number field |
---|
Good point; I have uploaded a second patch that adjusts the doctests as you suggest.
comment:5 Changed 13 years ago by
Summary: | [with new patch, needs review] Inverse modulo an ideal in a relative number field → [with patch, positive review] Inverse modulo an ideal in a relative number field |
---|
Beautiful.
comment:6 Changed 13 years ago by
David, the patch trac_6458-relative_ideal_inverse_mod.patch
doesn't have your username. So I'm committing it in your name. Merged both patches in sage-4.1.1-alpha0. I can't close this ticket because I don't have the privilege to do so. Sorry, folks :-(
comment:7 Changed 13 years ago by
Merged in: | → sage-4.1.1.alpha0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
patch against 4.1.alpha2