Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The is_old method from sage.modular.modform.element.ModularFormElement doesn't work correctly #13156

Closed
SnarkBoojum mannequin opened this issue Jun 23, 2012 · 8 comments

Comments

@SnarkBoojum
Copy link
Mannequin

SnarkBoojum mannequin commented Jun 23, 2012

sage: E=ModularForms(3,12).cuspidal_subspace()
sage: f=E.gens()[0]
sage: g=f-f
sage: g.is_old()
False

This is definitely a case where sage returns a wrong answer.

Component: modular forms

Keywords: sd51

Author: David Loeffler

Reviewer: Alex Ghitza

Merged: sage-5.11.rc0

Issue created by migration from https://trac.sagemath.org/ticket/13156

@loefflerd
Copy link
Mannequin

loefflerd mannequin commented Jul 22, 2013

comment:1

I traced this back to a problem with the __call__ method's membership testing code for modular forms subspaces. The problem is that it expects imprecise q-expansions, and fails badly when given the zero q-expansion as argument.

@loefflerd
Copy link
Mannequin

loefflerd mannequin commented Jul 22, 2013

comment:2

Test case for the underlying bug:


sage: R.<q> = QQ[[]]                                           
sage: ModularForms(2, 8)(q^20 + q^120)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-101-f1640b98a1fd> in <module>()
----> 1 ModularForms(Integer(2), Integer(8))(q**Integer(20) + q**Integer(120))

/storage/masiao/sage-5.11.beta3/local/lib/python2.7/site-packages/sage/modular/modform/space.pyc in __call__(self, x, check)
   1147                 x_potential = self.free_module().linear_combination_of_basis(x_potential)
   1148                 x_potential = element.ModularFormElement(self, x_potential)
-> 1149                 for i in range(int(W.degree()), x.prec()):
   1150                     if x_potential[i] != x[i]:
   1151                         raise ValueError, "q-expansion does not correspond to a form in self"

TypeError: range() integer end argument expected, got PlusInfinity.

@loefflerd
Copy link
Mannequin

loefflerd mannequin commented Jul 22, 2013

Changed keywords from none to sd51

@loefflerd
Copy link
Mannequin

loefflerd mannequin commented Jul 23, 2013

patch against 5.11.beta3

@loefflerd
Copy link
Mannequin

loefflerd mannequin commented Jul 23, 2013

Author: David Loeffler

@loefflerd
Copy link
Mannequin

loefflerd mannequin commented Jul 23, 2013

comment:3

Attachment: trac_13156.patch.gz

@loefflerd loefflerd mannequin added the s: needs review label Jul 23, 2013
@aghitza
Copy link
Contributor

aghitza commented Jul 23, 2013

Reviewer: Alex Ghitza

@aghitza aghitza added this to the sage-5.11 milestone Jul 23, 2013
@jdemeyer
Copy link
Contributor

Merged: sage-5.11.rc0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants