Opened 10 years ago

Closed 9 years ago

#10807 closed defect (fixed)

Modular Symbols trouble restoring saved objects

Reported by: jonhanke Owned by: craigcitro
Priority: major Milestone: sage-5.0
Component: modular forms Keywords: modular symbols, pickling
Cc: was, jonhanke, cremona Merged in: sage-5.0.beta4
Authors: David Loeffler Reviewers: Marco Streng
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

There is trouble reconstructing saved modular forms/symbols eigenform information:

sage: chi_tmp = DirichletGroup(105, RationalField())(kronecker_character_upside_down(105))
sage: MS = ModularSymbols(chi_tmp, 2)
sage: CS = MS.cuspidal_subspace()
sage: NS = CS.new_subspace()
sage: t = cputime()
sage: new_eigenspace_list = NS.decomposition()
sage: print "  This took " + str(cputime(t)) + " seconds."
  This took 7.296595 seconds.
sage: save(NS, 'NS105.sobj')
KeyboardInterrupt
sage: NS1 = load('NS105.sobj')
sage:
sage: NS[0].q_eigenform(15, 'a')
q + (-1/10*a^3 - 3/10*a^2 + 2/5*a + 3/5)*q^2 + (1/10*a^3 + 3/10*a^2 + 3/5*a - 3/5)*q^3 + q^4 + (-1/5*a^3 - 3/5*a^2 - 1/5*a + 1/5)*q^5 + (1/10*a^3 + 4/5*a^2 + \
3/5*a - 3/5)*q^6 + (1/2*a^2 + a + 1)*q^7 + (1/10*a^3 + 3/10*a^2 - 2/5*a - 3/5)*q^8 + (-1/5*a^3 - 3/5*a^2 - 6/5*a - 9/5)*q^9 + (-1/2*a^2 - a + 3)*q^10 + (-1/5*\
a^3 - 3/5*a^2 - 6/5*a - 4/5)*q^11 + (1/10*a^3 + 3/10*a^2 + 3/5*a - 3/5)*q^12 - 4*q^13 + (1/5*a^3 + 3/5*a^2 + 11/5*a + 9/5)*q^14 + O(q^15)
sage:
sage:
sage: NS1[0].q_eigenform(15, 'b')
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (20, 0))
...

I'd like to use this mechanism to store tables of modular forms/symbols, so any suggestions for a workaround are appreciated! =)

Attachments (1)

trac_10807.patch (1.3 KB) - added by davidloeffler 9 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 10 years ago by jonhanke

  • Summary changed from Modular Symbols trouble restorng saved objects to Modular Symbols trouble restoring saved objects

comment:2 Changed 10 years ago by jonhanke

Also, the system_of_eigenvalues() routine doesn't appear to be working properly...

sage: chi_tmp = DirichletGroup(105, RationalField())(kronecker_character_upside_down(105))
sage: MS = ModularSymbols(chi_tmp, 2)
sage: CS = MS.cuspidal_subspace()
sage: NS = CS.new_subspace()
sage: F0 = NS[0]
sage: F0.system_of_eigenvalues(2)
---------------------------------------------------------------------------
ArithmeticError                           Traceback (most recent call last)

/Users/jonhanke/Documents/SAGE/<ipython console> in <module>()

/Users/jonhanke/Documents/SAGE/sage-4.6/local/lib/python2.6/site-packages/sage/modular/hecke/module.pyc in system_of_eigenvalues(self, n, name)
   1595             [1, x, -x - 2, -x - 1, 0, -x - 1, -3, -2*x - 1, 3*x + 2, 0]
   1596         """
-> 1597         return [self.eigenvalue(m, name=name) for m in range(1,n+1)]
   1598
   1599     def weight(self):

/Users/jonhanke/Documents/SAGE/sage-4.6/local/lib/python2.6/site-packages/sage/modular/hecke/module.pyc in eigenvalue(self, n, name)
   1192         """
   1193         if not self.is_simple():
-> 1194             raise ArithmeticError, "self must be simple"
   1195         n = int(n)
   1196         try:

ArithmeticError: self must be simple

However I am able to get Hecke eigenvalues from the q_eigenform() method. Is there a better way of doing this?

comment:3 Changed 10 years ago by jonhanke

  • Cc cremona added

comment:4 Changed 9 years ago by davidloeffler

This is a side-effect of the following, lower-level bug:

sage: M = ModularSymbols(11)
sage: M.category()
Category of Hecke modules over Rational Field
sage: loads(dumps(M)).category()
Category of vector spaces over Rational Field

Changed 9 years ago by davidloeffler

comment:5 Changed 9 years ago by davidloeffler

  • Status changed from new to needs_review

Here's a patch which sorts out the issue with restoring saved objects. The system_of_eigenvalues issue is a separate bug -- please open a separate ticket for that!

comment:6 Changed 9 years ago by davidloeffler

  • Authors changed from Jonathan Hanke to David Loeffler

comment:7 Changed 9 years ago by mstreng

  • Reviewers set to Marco Streng
  • Status changed from needs_review to positive_review

comment:8 Changed 9 years ago by jdemeyer

  • Merged in set to sage-5.0.beta4
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.