Opened 10 years ago
Closed 9 years ago
#13445 closed defect (fixed)
Cuspidal subspace of modular forms over finite field contains forms that are not cuspidal
Reported by:  Maarten Derickx  Owned by:  Craig Citro 

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 9 years ago by
comment:2 Changed 9 years ago by
Milestone:  sage5.11 → sage5.12 

comment:3 Changed 9 years ago by
Milestone:  sage6.1 → sage6.2 

comment:4 Changed 9 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 9 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 9 years ago by
Branch:  → u/AlexGhitza/ticket/13445 

Created:  Sep 11, 2012, 8:45:36 AM → Sep 11, 2012, 8:45:36 AM 
Modified:  Apr 18, 2014, 11:43:26 PM → Apr 18, 2014, 11:43:26 PM 
comment:7 Changed 9 years ago by
Authors:  → Alex Ghitza 

Commit:  → cf1c1bf671fc4789308500c4805a81a35f016436 
Status:  new → 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 9 years ago by
Milestone:  sage6.2 → sage6.3 

comment:9 Changed 9 years ago by
Reviewers:  → Peter Bruin 

Status:  needs_review → positive_review 
The code looks good and the patchbot is happy.
comment:10 Changed 9 years ago by
Branch:  u/AlexGhitza/ticket/13445 → cf1c1bf671fc4789308500c4805a81a35f016436 

Resolution:  → fixed 
Status:  positive_review → 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 ?