The reason is that q_expansion_basis returns power series and not modular forms:
sage: M = ModularForms(Gamma0(17), 4) sage: M.basis()[0].parent() Modular Forms space of dimension 6 for Congruence Subgroup Gamma0(17) of weight 4 over Rational Field sage: M.basis()[0] in M True sage: M.q_expansion_basis()[0].parent() Power Series Ring in q over Rational Field Le mercredi 3 octobre 2012 11:20:06 UTC+2, David Loeffler a écrit : > > I just hit this bug in the wild while doing some modular forms > computations: > > masiao@fermat:~$ sage > ---------------------------------------------------------------------- > | Sage Version 5.3, Release Date: 2012-09-08 | > | Type "notebook()" for the browser-based notebook interface. | > | Type "help()" for help. | > ---------------------------------------------------------------------- > sage: M = ModularForms(Gamma0(17), 4) > sage: v = M.q_expansion_basis(prec=10)[0] > sage: v in M > False > > Oddly "M(v)" works if v corresponds to a q-expansion of a form in M, and > raises an error if it doesn't -- as it should do -- so there is something > going wrong in the code for __contains__. Does anyone know what might be > causing this? > > David > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-devel?hl=en.
