Opened 9 years ago
Closed 8 years ago
#13445 closed defect (fixed)
Cuspidal subspace of modular forms over finite field contains forms that are not cuspidal
Reported by:  mderickx  Owned by:  craigcitro 

Priority:  major  Milestone:  sage6.3 
Component:  modular forms  Keywords:  
Cc:  Merged in:  
Authors:  Alex Ghitza  Reviewers:  Peter Bruin 
Report Upstream:  N/A  Work issues:  
Branch:  cf1c1bf (Commits, GitHub, GitLab)  Commit:  cf1c1bf671fc4789308500c4805a81a35f016436 
Dependencies:  Stopgaps: 
Description
Executing:
M=ModularForms(Gamma1(29),base_ring=GF(29)) S=M.cuspidal_subspace() S.basis()
gives:
[ 1 + O(q^6), q + O(q^6), q^2 + O(q^6), q^3 + O(q^6), q^4 + O(q^6), q^5 + O(q^6), O(q^6), O(q^6), O(q^6), O(q^6), O(q^6), O(q^6), O(q^6), O(q^6), O(q^6), O(q^6), O(q^6), O(q^6), O(q^6), O(q^6), O(q^6), O(q^6) ]
The first element is clearly not cuspidal
Change History (10)
comment:1 Changed 8 years ago by
comment:2 Changed 8 years ago by
 Milestone changed from sage5.11 to sage5.12
comment:3 Changed 8 years ago by
 Milestone changed from sage6.1 to sage6.2
comment:4 Changed 8 years ago by
Smaller example:
sage: M = ModularForms(Gamma1(11), base_ring=GF(11)) sage: S = M.cuspidal_subspace() sage: S.basis() [ 1 + O(q^6) ]
comment:5 Changed 8 years ago by
Even smaller example:
sage: M = ModularForms(Gamma0(11), base_ring=GF(11)); M Modular Forms space of dimension 2 for Congruence Subgroup Gamma0(11) of weight 2 over Finite Field of size 11 sage: M.basis() [ 1 + q^2 + q^3 + q^4 + q^5 + O(q^6), q + 9*q^2 + 10*q^3 + 2*q^4 + q^5 + O(q^6) ] sage: S = M.cuspidal_subspace() sage: S.basis() [ 1 + q^2 + q^3 + q^4 + q^5 + O(q^6) ]
comment:6 Changed 8 years ago by
 Branch set to u/AlexGhitza/ticket/13445
 Created changed from 09/11/12 08:45:36 to 09/11/12 08:45:36
 Modified changed from 04/18/14 23:43:26 to 04/18/14 23:43:26
comment:7 Changed 8 years ago by
 Commit set to cf1c1bf671fc4789308500c4805a81a35f016436
 Status changed from new to needs_review
The issue was in sage.modular.modform.ambient_R.py
, where q_integral_basis
was used for positive characteristic base rings. However, q_integral_basis
does not guarantee that its output is in the format exhibited by q_expansion_basis
, i.e. starting with a basis for the cuspidal subspace and completed to a basis of the entire space.
The modified code now computes an integral basis for the cuspidal subspace and then completes it to an integral basis of the whole space. This strategy works for rings of prime power characteristic (e.g. finite fields or integers modulo a prime power, the two main use cases currently in Sage).
New commits:
cf1c1bf  fix basis of spaces of modular forms in positive characteristic

comment:8 Changed 8 years ago by
 Milestone changed from sage6.2 to sage6.3
comment:9 Changed 8 years ago by
 Reviewers set to Peter Bruin
 Status changed from needs_review to positive_review
The code looks good and the patchbot is happy.
comment:10 Changed 8 years ago by
 Branch changed from u/AlexGhitza/ticket/13445 to cf1c1bf671fc4789308500c4805a81a35f016436
 Resolution set to fixed
 Status changed from positive_review to closed
Looking at sage/modular/modform/cuspidal_submodule.py, it seems that the cuspidal submodule is just defined by
So it implicitly assumes that the cusp forms come first in the listing of the basis.
On the other hand, the "is_cuspidal" method just checks that the element is in the cuspidal submodule. Is there a way to really check if something is cuspidal ?