Opened 8 years ago
Last modified 4 months ago
#15829 new enhancement
Ray class groups and Hecke characters
Reported by:  pbruin  Owned by:  

Priority:  major  Milestone:  sagewishlist 
Component:  number fields  Keywords:  ray class group, pari, Hecke character, Sage Days 81, sd87 
Cc:  ArgaezG, cremona, davidloeffler, slelievre  Merged in:  
Authors:  Robert Harron  Reviewers:  
Report Upstream:  N/A  Work issues:  
Branch:  public/ticket/15829 (Commits, GitHub, GitLab)  Commit:  d3b2b34ea3e52ff6c815377157a53aa846f1d8cd 
Dependencies:  Stopgaps: 
Description (last modified by )
Sage's support for ray class groups of number fields and Hecke characters is currently limited to NumberFieldFractionalIdeal.ray_class_number()
.
The purpose of this ticket is to implement ray class groups and Hecke characters using PARI's bnrinit0()
and related functions.
Change History (62)
comment:1 Changed 8 years ago by
 Cc ArgaezG cremona added
comment:2 Changed 7 years ago by
 Milestone changed from sage6.2 to sage6.3
comment:3 Changed 7 years ago by
 Milestone changed from sage6.3 to sage6.4
comment:4 Changed 5 years ago by
 Branch set to u/robharron/ray_class_groups_and_hecke_chars
 Description modified (diff)
 Keywords Hecke character Sage Days 81 added
 Milestone changed from sage6.4 to sage7.4
 Summary changed from Ray class groups to Ray class groups and Hecke characters
comment:5 Changed 5 years ago by
 Commit set to 8a0fd9b7275111c03d2e6181d0e9ec6355abda2a
comment:6 Changed 5 years ago by
 Commit changed from 8a0fd9b7275111c03d2e6181d0e9ec6355abda2a to 1670ee7b8f328d822002e8ee1b819f5a5ee3ec96
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
1670ee7  Initial version of ray class groups and Hecke characters.

comment:7 Changed 5 years ago by
 Commit changed from 1670ee7b8f328d822002e8ee1b819f5a5ee3ec96 to 45bae9d5580d4b3171fe530b6f9123c38433a271
Branch pushed to git repo; I updated commit sha1. New commits:
45bae9d  Minor fixes.

comment:8 Changed 5 years ago by
I've pushed some code with some basic functionality for computing ray class groups, Hecke characters, and their Lfunctions. I'll be working on this over the next week at Sage Days 81. First off is a rewrite to avoid keeping track of an ideal representing a ray class.
comment:9 Changed 5 years ago by
 Commit changed from 45bae9d5580d4b3171fe530b6f9123c38433a271 to b54ceb01131212c61372fcb43224c34a4898a15e
Branch pushed to git repo; I updated commit sha1. New commits:
b54ceb0  Rewrite using pari extended ideals as values.

comment:10 Changed 5 years ago by
 Commit changed from b54ceb01131212c61372fcb43224c34a4898a15e to a909b07b5c872681e46d9fdbcea8ba6faa0cbdd8
Branch pushed to git repo; I updated commit sha1. New commits:
a909b07  Rewrite again: ray class group no longer carries around any values. Will implement separately a function returning a representative ideal.

comment:11 Changed 5 years ago by
 Commit changed from a909b07b5c872681e46d9fdbcea8ba6faa0cbdd8 to c7bed46eae4089dd8272eca6695d67ff10324b71
Branch pushed to git repo; I updated commit sha1. New commits:
c7bed46  Add a bunch of doctests (complete for number_field.py) and fix some bugs.

comment:12 Changed 5 years ago by
 Commit changed from c7bed46eae4089dd8272eca6695d67ff10324b71 to 52cc996e578e3b14cda325ac91bc59a96078e1fa
comment:13 Changed 5 years ago by
 Commit changed from 52cc996e578e3b14cda325ac91bc59a96078e1fa to 9fb9c3e369b16d3d05fce86e018ebfd5787fca18
comment:14 Changed 5 years ago by
 Commit changed from 9fb9c3e369b16d3d05fce86e018ebfd5787fca18 to e1c1a0adf4a7cfe82202d1257a0a11001b0c94c4
Branch pushed to git repo; I updated commit sha1. New commits:
e1c1a0a  Implement conversion between pari's ordering of real places and Sage's

comment:15 Changed 5 years ago by
 Commit changed from e1c1a0adf4a7cfe82202d1257a0a11001b0c94c4 to 1bf632d2627632277ae0514e789fb94c7c58560e
Branch pushed to git repo; I updated commit sha1. New commits:
1bf632d  Implement further Hecke character functionality (not very efficiently).

comment:16 Changed 5 years ago by
 Commit changed from 1bf632d2627632277ae0514e789fb94c7c58560e to 24e9eab5b54f70411eb9b45d665809fa12055db4
Branch pushed to git repo; I updated commit sha1. New commits:
24e9eab  Mostly add docs to hecke_character.py; also circumvent an upstream pari bug.

comment:17 Changed 5 years ago by
 Commit changed from 24e9eab5b54f70411eb9b45d665809fa12055db4 to ad75ee1359fb6cdfe04b4900892d5c9164e8bcdd
Branch pushed to git repo; I updated commit sha1. New commits:
ad75ee1  First pass at implementing the computation of ray class fields via pari.

comment:18 Changed 5 years ago by
 Commit changed from ad75ee1359fb6cdfe04b4900892d5c9164e8bcdd to 8cd4e030b0bb3d4301ac9617a9fc3bd9f9640c86
Branch pushed to git repo; I updated commit sha1. New commits:
8cd4e03  Fix ray class fields corresponding to subgroups of ray class group.

comment:19 Changed 5 years ago by
 Branch changed from u/robharron/ray_class_groups_and_hecke_chars to public/15829
 Commit changed from 8cd4e030b0bb3d4301ac9617a9fc3bd9f9640c86 to c5ed1df1dc301274e6458ff87a261ccfadc7534f
rebased on 7.6.b3
New commits:
c5ed1df  Merge branch 'u/robharron/ray_class_groups_and_hecke_chars' in 7.6.b3

comment:20 Changed 5 years ago by
 Commit changed from c5ed1df1dc301274e6458ff87a261ccfadc7534f to b9f6e287a5261c67f0ea7642c3ff79ca819be771
Branch pushed to git repo; I updated commit sha1. New commits:
b9f6e28  trac 15829 one doc detail

comment:21 Changed 5 years ago by
Is there an estimate for when this will be ready for review?
comment:22 Changed 5 years ago by
Hi John,
No plan right now, I've been swamped. If there are people very interested in seeing this move forward, I can try to carve more time out for it. It's pretty much functional, but still requires several doctests.
comment:23 Changed 5 years ago by
One thing which could work well would be for a potential user to try it out and come with some doctests of their own. I have a student who might do that but he is a novice at Sage development and I would have to walk him through the process of building this branch of Sage. I'll see what I can do  but we do have a use in mind. Thanks.
comment:24 Changed 5 years ago by
Yes, that would work well. There are several doctests already, especially for the more important functions, but it's definitely not complete. I'll try to take a look at the code soon to see what big things if any really need to be done. There are certainly some changes that would be good to do if a newer version of pari has been added to sage since last I worked on this. And hopefully, I won't get confused by the rebasing that occurred, as I know little about this git+trac stuff!
comment:25 followup: ↓ 26 Changed 5 years ago by
I checked out the branch, which had been rebased to 7.6.beta3, and merged in 7.6.beta4; no problem with the merge but the resulting code did not build: there was a cython compilation error in the file cypari2/gen.pyx. I don't have time to troubleshoot this...
comment:26 in reply to: ↑ 25 Changed 5 years ago by
Replying to cremona:
I checked out the branch, which had been rebased to 7.6.beta3, and merged in 7.6.beta4; no problem with the merge but the resulting code did not build: there was a cython compilation error in the file cypari2/gen.pyx. I don't have time to troubleshoot this...
This is my fault, I did the merge, but I do not know how to fix that.
comment:27 Changed 4 years ago by
 Keywords sd87 added
comment:28 Changed 4 years ago by
I'm at sage days 87 rebasing this on top of 8.0.rc1. It runs now, though the doctests are giving different answers, possibly because pari has been updated. Re cypari2: the issue was that the pari interface (if that's the right word) was being separated from sage and so gen.pyx was moved. Now that the separation has been completed, this patch will likely require that the cypari2 package be modified separately (at https://github.com/defeo/cypari2).
comment:29 Changed 4 years ago by
 Branch changed from public/15829 to u/robharron/ray_class_and_hecke_8
 Commit b9f6e287a5261c67f0ea7642c3ff79ca819be771 deleted
comment:30 Changed 4 years ago by
 Commit set to b82cd86e00778fd39028e96b28f9f7948aa99d4c
Branch pushed to git repo; I updated commit sha1. New commits:
b82cd86  Update to Sage 8.0.rc1

comment:31 Changed 4 years ago by
 Milestone changed from sage7.4 to sage8.1
I've pushed a new commit (to a new branch, really) that runs on sage 8.0.rc1. It also requires a change to the cypari2 package; for this I have made a pull request to the package on github (https://github.com/defeo/cypari2/pull/16), and I also opened a ticket there (https://github.com/defeo/cypari2/issues/17).
comment:32 Changed 4 years ago by
 Dependencies set to #23518
comment:33 Changed 4 years ago by
The pull request I made to cypari2 was accepted. I've created a new ticket on trac (#23518) to update the cypari2 version in sage and added it as a dependency of this ticket.
comment:34 Changed 4 years ago by
Does this really require the Dokchitser script? Did you try the new Lfunction package in upstream PARI/GP?
comment:35 Changed 4 years ago by
One day we'll have a proper Lfunctions package in Sage (I am not volunteering but quite a lot of relevant code is being written by LMFDB people). Meanwhile, I am waiting to use this new code and am happy for it to start out using Dokchitser even if an improvement is possible using the new PARI/GP stuff, as that would be a lot of extra work (I think).
comment:36 Changed 4 years ago by
It shouldn't require the script. I only recently noticed that pari could do this, and so I haven't tried it. I don't think it would be difficult to switch to the pari library, but maybe I'll put that low priority since John is awaiting.
And John, sorry this is taking so long, I have a lot of other things on my plate. Have you tried it out? It works (at least on 8.0rc1). There's mostly just a bunch of doctests to write.
comment:37 Changed 4 years ago by
Sorry Rob, I have no right to ask you to work harder than you have been! I have many other things to do, and I had not tested this yet (I was going to wait until there was no dependency on the cypari ticket #23518).
comment:38 Changed 4 years ago by
 Branch changed from u/robharron/ray_class_and_hecke_8 to public/15829
 Commit changed from b82cd86e00778fd39028e96b28f9f7948aa99d4c to b9f6e287a5261c67f0ea7642c3ff79ca819be771
 Dependencies #23518 deleted
Last 10 new commits:
52cc996  Doctests for number_field_ideal.py and improve some error handling.

1246440  Update and expand header of class_group.py

9fb9c3e  Use ray class groups for narrow class group function. Adjust things accordingly.

e1c1a0a  Implement conversion between pari's ordering of real places and Sage's

1bf632d  Implement further Hecke character functionality (not very efficiently).

24e9eab  Mostly add docs to hecke_character.py; also circumvent an upstream pari bug.

ad75ee1  First pass at implementing the computation of ray class fields via pari.

8cd4e03  Fix ray class fields corresponding to subgroups of ray class group.

c5ed1df  Merge branch 'u/robharron/ray_class_groups_and_hecke_chars' in 7.6.b3

b9f6e28  trac 15829 one doc detail

comment:39 Changed 4 years ago by
 Branch changed from public/15829 to public/ticket15829
 Commit changed from b9f6e287a5261c67f0ea7642c3ff79ca819be771 to c2a6b0da4420a79266df5547787cb39795875f37
comment:40 Changed 4 years ago by
 Commit changed from c2a6b0da4420a79266df5547787cb39795875f37 to 55822ad764ee85c007c87242f522a827f28bf2b0
Branch pushed to git repo; I updated commit sha1. New commits:
55822ad  some details

comment:41 Changed 4 years ago by
 Commit changed from 55822ad764ee85c007c87242f522a827f28bf2b0 to fffa54cb4914c7aa1f67c1b8ea1d2e4d56bd6b60
Branch pushed to git repo; I updated commit sha1. New commits:
fffa54c  some details fixed

comment:42 Changed 4 years ago by
 Commit changed from fffa54cb4914c7aa1f67c1b8ea1d2e4d56bd6b60 to f519bda51338bd3af6c1b595879acfb3f154b65a
Branch pushed to git repo; I updated commit sha1. New commits:
f519bda  fixing more doc details

comment:43 Changed 3 years ago by
 Commit changed from f519bda51338bd3af6c1b595879acfb3f154b65a to 1cec5cad8f9a281cc0ef48d78b2744c06a6faa46
Branch pushed to git repo; I updated commit sha1. New commits:
1cec5ca  fixing again some doc details

comment:44 Changed 3 years ago by
 Commit changed from 1cec5cad8f9a281cc0ef48d78b2744c06a6faa46 to 5eb7ef34d1e8dffd135b656c9f96f8ebba94d165
comment:45 Changed 3 years ago by
 Commit changed from 5eb7ef34d1e8dffd135b656c9f96f8ebba94d165 to d0bbd38461ce579ae700d12c7c78b1729acf18d3
Branch pushed to git repo; I updated commit sha1. New commits:
d0bbd38  yet another doc fix

comment:46 Changed 3 years ago by
 Commit changed from d0bbd38461ce579ae700d12c7c78b1729acf18d3 to 024c29c01cdda7d1cd3177e7d5492ce8e6b1c6c4
Branch pushed to git repo; I updated commit sha1. New commits:
024c29c  more doctest fix

comment:47 Changed 3 years ago by
 Commit changed from 024c29c01cdda7d1cd3177e7d5492ce8e6b1c6c4 to 11008dba2b52e009d4d2f5b10a4676541f388868
Branch pushed to git repo; I updated commit sha1. New commits:
11008db  doc fix again...

comment:48 Changed 3 years ago by
 Commit changed from 11008dba2b52e009d4d2f5b10a4676541f388868 to 41aecad9c34dc627e91114293e688a95b5ab4e88
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
41aecad  more doc details corrected

comment:49 Changed 3 years ago by
 Milestone changed from sage8.1 to sage8.3
comment:50 Changed 3 years ago by
Why is this not marked as ready for review? What is left to do?
comment:51 Changed 3 years ago by
well, many failing doctests, and a lot of missing documentation..
comment:52 Changed 3 years ago by
OK, just checking. Rob?
comment:53 Changed 3 years ago by
 Commit changed from 41aecad9c34dc627e91114293e688a95b5ab4e88 to 12d269545b4c3789984eb662b1929ded28b99606
comment:54 Changed 3 years ago by
 Milestone changed from sage8.3 to sage8.4
update milestone 8.3 > 8.4
comment:55 Changed 2 years ago by
 Branch changed from public/ticket15829 to public/ticket/15829
 Commit changed from 12d269545b4c3789984eb662b1929ded28b99606 to caee1d4fee7ed63280674a0fb8a1551bea3b191a
I have made a rebased, squashed and refreshed branch.
New commits:
caee1d4  trac 15829 Ray class groups and Hecke characters

comment:56 Changed 2 years ago by
 Milestone changed from sage8.4 to sage8.8
comment:57 Changed 2 years ago by
 Milestone sage8.8 deleted
As the Sage8.8 release milestone is pending, we should delete the sage8.8 milestone for tickets that are not actively being worked on or that still require significant work to move forward. If you feel that this ticket should be included in the next Sage release at the soonest please set its milestone to the next release milestone (sage8.9).
comment:58 Changed 5 months ago by
 Cc davidloeffler slelievre added
 Milestone set to sagewishlist
comment:59 Changed 5 months ago by
 Commit changed from caee1d4fee7ed63280674a0fb8a1551bea3b191a to 34b628bef4e4b65bc8063a1220af99c751a2700b
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
34b628b  trac 15829 Ray class groups and Hecke characters

comment:60 Changed 5 months ago by
Thanks Frédéric, is this just a rebase?
The branch provides a lot of new functionality.
Do the author and reviewers have time to see this through?
Can the ticket be split into smaller chunks to make the review easier?
The conductor
method of the HeckeCharacter
class has this:
modulus = bnr.bnrconductor(self._log_values_on_gens()) # in a newer version of pari, this is replaced with bnrconductor
Is the comment obsolete since bnrconductor
is already used?
On the other hand, the is_primitive
method goes:
# When a newer version of pari is part of Sage, call # bnrisconductor instead. return self.conductor() == self.modulus()
and the root_number
method goes:
# tryexcept only necessary because of # http://pari.math.ubordeaux.fr/cgibin/bugreport.cgi?bug=1848 # According to Belabas this bug seems to occur because of # a problem dealing with imprimitive characters, thus the code # in the except clause below. Once we incorporate a version # of pari where this bug is fixed, the command in the try # itself should be sufficient. The first example above # (with Q(cubert(3))) fails without the except clause # and so can be used to test if the pari bug has been fixed. try: rn = self.parent().group().pari_bnr().bnrrootnumber(self._log_values_on_gens()) except PariError: chi = self.primitive_character() rn = chi.parent().group().pari_bnr().bnrrootnumber(chi._log_values_on_gens()) return rn.sage()
but it would seem the pari bug in question is long fixed, right?
The examples block for primitive_character
needs care:
 Examples:: + EXAMPLES::
There are some unwanted spaces before ::
in other example blocks.
Is all the commentedout code waiting for some other ticket to be in?
 method
_pari_finite_factors
in the classModulus
 method
_element_constructor_
in the classHeckeCharacterGroup_class
 lots of code in the class
RayClassGroupElement
comment:61 Changed 5 months ago by
 Commit changed from 34b628bef4e4b65bc8063a1220af99c751a2700b to b5ab41da11f3fb3f46bfa9bdae00f4d054419e6c
Branch pushed to git repo; I updated commit sha1. New commits:
b5ab41d  details in hecke_character

comment:62 Changed 4 months ago by
 Commit changed from b5ab41da11f3fb3f46bfa9bdae00f4d054419e6c to d3b2b34ea3e52ff6c815377157a53aa846f1d8cd
Branch pushed to git repo; I updated commit sha1. New commits:
Initial version of ray class groups and Hecke characters.