On 9/13/07, r Rishikesh <[EMAIL PROTECTED]> wrote: > William > > I was looking at q-expansions of newforms in SAGE. I found a > discrepancy between SAGE and the Modular forms database at the website > below. > > > http://modular.fas.harvard.edu:8080/mfd/q_expansion.m?params=[12,%204,%20[]]&number=1 > > Is this a bug, or am I missing something?
It's a bug. Many thanks for reporting this. We're currently working a to improve the modular forms package, which is still very non-full features. I recommend you consider using modular symbols (which are much more mature) in SAGE right now (that said, I'm very glad you used modular forms so you could find the bug you just reported): sage: C = CuspForms(Gamma0(12),4,prec=30) sage: C Cuspidal subspace of dimension 3 of Modular Forms space of dimension 9 for Congruence Subgroup Gamma0(12) of weight 4 over Rational Field sage: C.new_subspace().basis() # wrong output! [ q - 6*q^5 - 4*q^7 + 9*q^9 + 24*q^11 + 14*q^13 - 36*q^15 - 54*q^17 - 40*q^19 + 36*q^21 + 120*q^23 + 55*q^25 - 102*q^29 + O(q^30) ] # Correct answer via modular symbols. sage: ms = ModularSymbols(Gamma0(12), 4, sign=1).cuspidal_subspace().new_subspace() sage: ms.q_eigenform(10) q + 3*q^3 - 18*q^5 + 8*q^7 + 9*q^9 + O(q^10) You can get a basis for newforms with modular symbols by decomposing the space, e.g.,: sage: d = ModularSymbols(Gamma0(43), 2, sign=1).cuspidal_subspace().new_subspace().decomposition() sage: d [ Modular Symbols subspace of dimension 1 of Modular Symbols space of dimension 4 for Gamma_0(43) of weight 2 with sign 1 over Rational Field, Modular Symbols subspace of dimension 2 of Modular Symbols space of dimension 4 for Gamma_0(43) of weight 2 with sign 1 over Rational Field ] sage: for a in d: print a.q_eigenform(10) ....: q - 2*q^2 - 2*q^3 + 2*q^4 - 4*q^5 + 4*q^6 + q^9 + O(q^10) q + alpha*q^2 + -alpha*q^3 + (-alpha + 2)*q^5 + -2*q^6 + (alpha - 2)*q^7 + -2*alpha*q^8 + -q^9 + O(q^10) The bug you just reported is now trac # > > > Rishi > > > > ------------Modular Forms DATABASE version---------------- > // q-expansion of Newform number 1 of degree 1 in Full modular forms > space of level 12, weight 4, and trivial character.. > C := RationalField(); > R<a> := PolynomialRing(C); > h := a-1; > K<a> := quo<R|h>; > R<q> := PowerSeriesRing(K); > f := q + 3*q^3 - 18*q^5 + 8*q^7 + 9*q^9 + 36*q^11 - 10*q^13 - 54*q^15 > + 18*q^17 - 100*q^19 + 24*q^21 + 72*q^23 + 199*q^25 + 27*q^27 - > 234*q^29 - 16*q^31 + 108*q^33 - 144*q^35 - 226*q^37 - 30*q^39 + > 90*q^41 + 452*q^43 - 162*q^45 + 432*q^47 - 279*q^49 + 54*q^51 + > 414*q^53 - 648*q^55 - 300*q^57 - 684*q^59 + 422*q^61 + 72*q^63 + > 180*q^65 + 332*q^67 + 216*q^69 - 360*q^71 + 26*q^73 + 597*q^75 + > 288*q^77 + 512*q^79 + 81*q^81 - 1188*q^83 - 324*q^85 - 702*q^87 - > 630*q^89 - 80*q^91 - 48*q^93 + 1800*q^95 - 1054*q^97 + 324*q^99 + > O(q^100) > ; > > > --------SAGE VERSION--------- > > C=CuspForms(Gamma0(12),4,prec=30) > > C.new_subspace().basis() > > > [ > q - 6*q^5 - 4*q^7 + 9*q^9 + 24*q^11 + 14*q^13 - 36*q^15 - 54*q^17 - > 40*q^19 + 36*q^21 + 120*q^23 + 55*q^25 - 102*q^29 + O(q^30) > ] > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~----------~----~----~----~------~----~------~--~---
