Opened 6 years ago
Closed 5 years ago
#17283 closed defect (fixed)
Check consistency when constructing Dirichlet characters
Reported by:  pbruin  Owned by:  

Priority:  minor  Milestone:  sage6.8 
Component:  modular forms  Keywords:  dirichlet character 
Cc:  Merged in:  
Authors:  Peter Bruin  Reviewers:  JeanPierre Flori 
Report Upstream:  N/A  Work issues:  
Branch:  8ff4302 (Commits)  Commit:  8ff4302876c1d46f0a6b8e27625e34a118f7895c 
Dependencies:  #17317  Stopgaps: 
Description (last modified by )
It is too easy to construct Dirichlet characters with inconsistent values:
sage: k.<i> = CyclotomicField(4) sage: G = DirichletGroup(192) sage: chi = G([i,1,1]); chi # should raise an error since 127 only has order 2 Dirichlet character modulo 192 of conductor 48 mapping 127 > zeta16^4, 133 > 1, 65 > 1 sage: chi(133) # no surprise that this gives an inconsistent answer 1
The check
option (True
by default) should verify that the images of the generators have the correct orders.
Change History (15)
comment:1 Changed 6 years ago by
 Description modified (diff)
comment:2 Changed 6 years ago by
 Description modified (diff)
 Keywords dirichlet character added; dimension removed
 Summary changed from Dimension mismatch in cuspidal_submodule() to Changing the coefficient ring of a Dirichlet character gives a wrong result
comment:3 Changed 6 years ago by
 Description modified (diff)
 Priority changed from major to critical
 Summary changed from Changing the coefficient ring of a Dirichlet character gives a wrong result to Evaluating Dirichlet characters can give wrong results
comment:4 Changed 6 years ago by
 Description modified (diff)
 Keywords modular symbols removed
 Priority changed from critical to minor
 Summary changed from Evaluating Dirichlet characters can give wrong results to Check consistency when constructing Dirichlet characters
comment:5 Changed 6 years ago by
 Branch set to u/pbruin/17283DirichletCharacter_check
 Commit set to 466a77de53e21fc94ed7313f8c7e27056e135446
 Dependencies set to #17317
 Status changed from new to needs_review
comment:6 Changed 6 years ago by
 Commit changed from 466a77de53e21fc94ed7313f8c7e27056e135446 to b25dd8edf6aa871310fff45cf66c61ccc7265822
Branch pushed to git repo; I updated commit sha1. New commits:
b25dd8e  Trac 17283: ensure that multiplicative orders are of type Integer (to fix doctest)

comment:7 Changed 6 years ago by
 Commit changed from b25dd8edf6aa871310fff45cf66c61ccc7265822 to ba9ce419f4300ebda1ac209b6fc050f9f6c9abbf
Branch pushed to git repo; I updated commit sha1. New commits:
ba9ce41  Trac 17283: fix check for Dirichlet character construction, some cleaning up

comment:8 followup: ↓ 10 Changed 5 years ago by
 Reviewers set to JeanPierre Flori
Just a little remark, we could fail faster in case the list of images does not have the right length (in case the orders are not automatically precomputed when Z/nZ is created, I don't remember). And that does not really matters anyway as feeding it with wrong length of images is just asking for trouble.
comment:9 Changed 5 years ago by
 Status changed from needs_review to needs_work
 Work issues set to doc
Could you add a little more about the necessary orders either in the INPUT section or in the TESTS one (that is say more than the orders are not admissible).
The current error string formulation also kind of make it feel like the orders must be exactly the one stated.
comment:10 in reply to: ↑ 8 Changed 5 years ago by
Replying to jpflori:
Just a little remark, we could fail faster in case the list of images does not have the right length (in case the orders are not automatically precomputed when Z/nZ is created, I don't remember).
The unit group of Z/nZ is computed (generators and orders) when the Dirichlet group is constructed.
And that does not really matters anyway as feeding it with wrong length of images is just asking for trouble.
Indeed, it is better to optimise for the case where the input is valid.
comment:11 Changed 5 years ago by
 Commit changed from ba9ce419f4300ebda1ac209b6fc050f9f6c9abbf to 8ff4302876c1d46f0a6b8e27625e34a118f7895c
Branch pushed to git repo; I updated commit sha1. New commits:
8ff4302  Trac 17283: improve error messages and documentation

comment:12 Changed 5 years ago by
 Status changed from needs_work to needs_review
comment:13 Changed 5 years ago by
 Milestone changed from sage6.4 to sage6.8
 Work issues doc deleted
I hope the error messages and documentation are better after the last commit.
comment:14 Changed 5 years ago by
 Status changed from needs_review to positive_review
Yes it is, just did not have a minute to look at it :) And the web interface to git is down:
Internal Server Error ...
Fortunately I've access to a working git repo again!
comment:15 Changed 5 years ago by
 Branch changed from u/pbruin/17283DirichletCharacter_check to 8ff4302876c1d46f0a6b8e27625e34a118f7895c
 Resolution set to fixed
 Status changed from positive_review to closed
The previous inconsistencies reported on this ticket were just because there does not exist a Dirichlet character with the values as in the example...