Opened 12 years ago
Closed 12 years ago
#10450 closed defect (fixed)
Problem computing Hecke matrices on subspaces of modular forms spaces
Reported by: | David Loeffler | Owned by: | Craig Citro |
---|---|---|---|
Priority: | major | Milestone: | sage-4.6.2 |
Component: | modular forms | Keywords: | hecke operator |
Cc: | Merged in: | sage-4.6.2.alpha3 | |
Authors: | David Loeffler | Reviewers: | Alex Ghitza |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
Sage seems to have trouble computing Hecke matrices on subspaces of Gamma1 modular forms spaces, which is absurd, since it has no trouble computing Hecke matrices on the parent spaces:
sage: S = CuspForms(Gamma1(22)) sage: S.new_submodule().hecke_matrix(5) --------------------------------------------------------------------------- NotImplementedError Traceback (most recent call last) /home/masiao/<ipython console> in <module>() /usr/local/sage/sage-4.6/local/lib/python2.6/site-packages/sage/modular/hecke/module.pyc in hecke_matrix(self, n) 1288 raise IndexError, "n must be positive." 1289 if not self._hecke_matrices.has_key(n): -> 1290 T = self._compute_hecke_matrix(n) 1291 T.set_immutable() 1292 self._hecke_matrices[n] = T /usr/local/sage/sage-4.6/local/lib/python2.6/site-packages/sage/modular/modform/space.pyc in _compute_hecke_matrix(self, n) 1311 """ 1312 if hasattr(self, '_compute_q_expansion_basis'): -> 1313 return hecke.HeckeModule_generic._compute_hecke_matrix(self, n) 1314 else: 1315 return hecke.HeckeSubmodule._compute_hecke_matrix(self, n) /usr/local/sage/sage-4.6/local/lib/python2.6/site-packages/sage/modular/hecke/module.pyc in _compute_hecke_matrix(self, n, **kwds) 214 215 if arith.is_prime(n): --> 216 return self._compute_hecke_matrix_prime(n, **kwds) 217 218 F = arith.factor(n) /usr/local/sage/sage-4.6/local/lib/python2.6/site-packages/sage/modular/modform/space.pyc in _compute_hecke_matrix_prime(self, p, prec) 1281 eps = self.character() 1282 if eps is None: -> 1283 raise NotImplementedError 1284 try: 1285 return hecke_operator_on_qexp.hecke_operator_on_basis(B, p, NotImplementedError:
Attachments (3)
Change History (12)
comment:1 Changed 12 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 12 years ago by
Authors: | → David Loeffler |
---|---|
Status: | new → needs_review |
comment:3 Changed 12 years ago by
Status: | needs_review → needs_info |
---|
This looks good with one exception: we (still) can't have the action of Tn with n not squarefree:
sage: CuspForms(Gamma1(22), 2).new_submodule().hecke_matrix(9) ... NotImplementedError: either character or _compute_hecke_matrix_prime_power must be overloaded in a derived class
Do you want to try to fix this here as well, or put this into a new ticket?
comment:4 Changed 12 years ago by
Status: | needs_info → needs_review |
---|
Here's a new patch which should correct the prime power case as well. The new version does all of the factoring tricks etc at the level of the ambient space (or, where possible, its eisenstein or cuspidal submodule), and just restricts the answer to the given subspace at the end. Along the way, I've fixed a tiny bug in eisenstein_submodule
and cuspidal_submodule
, and added is_eisenstein
and is_cuspidal
, for generic mod forms spaces.
comment:5 Changed 12 years ago by
Great stuff, and good catch on the two missing return statements.
Of course, these would never have made it in if there were doctests to check those parts of the code. May I suggest adding some now? Here is an easy example:
sage: M = ModularForms(6, 10) sage: S = M.cuspidal_submodule() sage: W = S.span_of_basis(S.basis()[0:2]) sage: W.cuspidal_submodule() Modular Forms subspace of dimension 2 of Modular Forms space of dimension 11 for Congruence Subgroup Gamma0(6) of weight 10 over Rational Field
and something along the same lines for eisenstein_submodule
.
Changed 12 years ago by
Attachment: | trac_10450-extra_doctests.patch added |
---|
comment:7 Changed 12 years ago by
Reviewers: | → Alex Ghitza |
---|---|
Status: | needs_review → positive_review |
Looks good to me.
comment:9 Changed 12 years ago by
Merged in: | → sage-4.6.2.alpha3 |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
Here's a 1/1/1 fix: one line, one comment and one doctest.