-
-
Notifications
You must be signed in to change notification settings - Fork 548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add functionality for S-units to UnitGroup #14963
Comments
Changed keywords from units, S-units to sd51, units, S-units |
comment:4
I started to work on this at sd51 and hope to finish it soon. |
comment:5
It was quite easy to extend the functionality of the UnitGroup class to include S-units, thanks to the pari function bnfsunit (which was already wrapped) and bnfissunit (which was not). The class constructor requires that S not be a list, but it can be a tuple or something from which an element of the number field can be constructed. Note that the pari function bnfsunit only returns the S-unit generators which are not global units, and the bnfissunit returns the exponents in the order (1) global units of infinite order, (2) torsion, (3) other S-units; so some permutation is required. The new method for number fields is S_unit_group and is simiar to unit_group: it caches S-unit groups using the tuple S as key, with separate caches for proof and non-proof options. The old number field method S_units is probably now redundant; I added a note there directing users to S_unit_group for great functionality, as we do for units. |
Author: John Cremona |
This comment has been minimized.
This comment has been minimized.
comment:8
update summary and description |
This comment has been minimized.
This comment has been minimized.
comment:10
This looks good to me. I like the fact that S-units are now neatly integrated into the Did you write this patch on a 32-bit system? I am getting two doctest failures in my 64-bit Sage 5.11.rc0, which are almost certainly due to 32/64-bit differences in PARI (this also occurred in the two dependencies of this ticket). Apart from that, I can only suggest a few cosmetic changes (mostly trailing whitespace). I will upload a reviewer patch and am planning to give this a positive review once doctesting has finished. |
Reviewer: Peter Bruin |
This comment has been minimized.
This comment has been minimized.
comment:13
Replying to @pjbruin:
Yes, I did this on my laptop at the Leiden Sage Days and that's 32-bit. Sorry for not testing on 64-bit too, and thanks for makinf the necessary fixes. Sorry too for the trailing whitspace in my cut-and-paste doctests, I usually remember to get rid of it. And thanks for the positive review!
|
comment:14
This needs to be rebased to #14519. |
comment:15
Replying to @jdemeyer:
I will do that, though it is exceedingly annoying to have to do so in order to satisfy some third party whose patch touched hundreds of files and therefore causes many other people such an inconvenience. There should be a fine for that! |
Attachment: trac_14963-Sunits.patch.gz |
comment:16
Rebasing done, first patch replaced. |
Attachment: trac_14963-reviewer.patch.gz |
comment:17
Reviewer patch updated to make the Tests pass on my 64-bit system, but there might possibly be some doctest failures on 32-bit systems due to different PARI behaviour for 32/64 bits. |
Merged: sage-5.13.beta0 |
In Sage-5.11, there is a lot of functionality for computing with S-units (see #14746) but no support for this in the
UnitGroup
class insage/rings/number_field/unit_group.py
. This ticket adds such support, also adding a wrapper for the PARI functionbnfissunit
.Apply: attachment: trac_14963-Sunits.patch, attachment: trac_14963-reviewer.patch
Depends on #14489
Depends on #14746
Depends on #14519
CC: @sagetrac-mkosters @sagetrac-akoutsianas
Component: number fields
Keywords: sd51, units, S-units
Author: John Cremona
Reviewer: Peter Bruin
Merged: sage-5.13.beta0
Issue created by migration from https://trac.sagemath.org/ticket/14963
The text was updated successfully, but these errors were encountered: