Module: sage.modular.modform.element
Elements of modular forms spaces.
Module-level Functions
[prec=53], [max_imaginary_part=0], [max_asymp_coeffs=40]) |
Return the L-series of the modular form Delta.
This actually returns an interface to Tim Dokchitser's program
for computing with the L-series of the modular form
.
Input:
sage: L = delta_lseries() sage: L(1) 0.0374412812685155
x) |
Return True if x is a modular form.
sage: is_ModularFormElement(5) False sage: is_ModularFormElement(ModularForms(11).0) True
Class: EisensteinSeries
sage: E = EisensteinForms(1,12) sage: E.eisenstein_series() [ 691/65520 + q + 2049*q^2 + 177148*q^3 + 4196353*q^4 + 48828126*q^5 + O(q^6) ] sage: E = EisensteinForms(11,2) sage: E.eisenstein_series() [ 5/12 + q + 3*q^2 + 4*q^3 + 7*q^4 + 6*q^5 + O(q^6) ] sage: E = EisensteinForms(Gamma1(7),2) sage: E.set_precision(4) sage: E.eisenstein_series() [ 1/4 + q + 3*q^2 + 4*q^3 + O(q^4), 1/7*zeta6 - 3/7 + q + (-2*zeta6 + 1)*q^2 + (3*zeta6 - 2)*q^3 + O(q^4), q + (-zeta6 + 2)*q^2 + (zeta6 + 2)*q^3 + O(q^4), -1/7*zeta6 - 2/7 + q + (2*zeta6 - 1)*q^2 + (-3*zeta6 + 1)*q^3 + O(q^4), q + (zeta6 + 1)*q^2 + (-zeta6 + 3)*q^3 + O(q^4) ]
self, parent, vector, t, chi, psi) |
An Eisenstein series.
sage: E = EisensteinForms(1,12) ## indirect doctest sage: E.eisenstein_series() [ 691/65520 + q + 2049*q^2 + 177148*q^3 + 4196353*q^4 + 48828126*q^5 + O(q^6) ] sage: E = EisensteinForms(11,2) sage: E.eisenstein_series() [ 5/12 + q + 3*q^2 + 4*q^3 + 7*q^4 + 6*q^5 + O(q^6) ] sage: E = EisensteinForms(Gamma1(7),2) sage: E.set_precision(4) sage: E.eisenstein_series() [ 1/4 + q + 3*q^2 + 4*q^3 + O(q^4), 1/7*zeta6 - 3/7 + q + (-2*zeta6 + 1)*q^2 + (3*zeta6 - 2)*q^3 + O(q^4), q + (-zeta6 + 2)*q^2 + (zeta6 + 2)*q^3 + O(q^4), -1/7*zeta6 - 2/7 + q + (2*zeta6 - 1)*q^2 + (-3*zeta6 + 1)*q^3 + O(q^4), q + (zeta6 + 1)*q^2 + (-zeta6 + 3)*q^3 + O(q^4) ]
Functions: character,
chi,
L,
M,
new_level,
parameters,
psi,
t
self) |
Return the character associated to self.
sage: EisensteinForms(DirichletGroup(17).0,99).eisenstein_series()[1].character() [zeta16]
self) |
Return the parameter chi associated to self.
sage: EisensteinForms(DirichletGroup(17).0,99).eisenstein_series()[1].chi() [zeta16]
self) |
Return the conductor of self.chi().
sage: EisensteinForms(DirichletGroup(17).0,99).eisenstein_series()[1].L() 17
self) |
Return the conductor of self.psi().
sage: EisensteinForms(DirichletGroup(17).0,99).eisenstein_series()[1].M() 1
self) |
Return level at which self is new.
sage: EisensteinForms(DirichletGroup(17).0,99).eisenstein_series()[1].level() 17 sage: EisensteinForms(DirichletGroup(17).0,99).eisenstein_series()[1].new_level() 17 sage: [ [x.level(), x.new_level()] for x in EisensteinForms(DirichletGroup(60).0^2,2).eisenstein_series() ] [[60, 2], [60, 3], [60, 2], [60, 5], [60, 2], [60, 2], [60, 2], [60, 3], [60, 2], [60, 2], [60, 2]]
self) |
Return chi, psi, and t, which are the defining parameters of self.
sage: EisensteinForms(DirichletGroup(17).0,99).eisenstein_series()[1].parameters() ([zeta16], [1], 1)
self) |
Return the parameter psi associated to self.
sage: EisensteinForms(DirichletGroup(17).0,99).eisenstein_series()[1].psi() [1]
self) |
Return the parameter t associated to self.
sage: EisensteinForms(DirichletGroup(17).0,99).eisenstein_series()[1].t() 1
Special Functions: __init__,
_compute,
_compute_q_expansion,
_EisensteinSeries__compute_general_case,
_EisensteinSeries__compute_weight2_trivial_character,
_EisensteinSeries__defining_parameters
self, X) |
Compute the coefficients of
of the power series of self,
for
in the list
. The results are not cached. (Use
coefficients for cached results).
sage: e = DirichletGroup(11).gen() sage: f = EisensteinForms(e, 3).eisenstein_series()[0] sage: f._compute([3,4,5]) [-9*zeta10^3 + 1, 16*zeta10^2 + 4*zeta10 + 1, 25*zeta10^3 - 25*zeta10^2 + 25*zeta10 - 24]
self, [prec=None]) |
Compute the q-expansion of self to precision prec.
sage: EisensteinForms(11,2).eisenstein_series()[0]._compute_q_expansion(10) 5/12 + q + 3*q^2 + 4*q^3 + 7*q^4 + 6*q^5 + 12*q^6 + 8*q^7 + 15*q^8 + 13*q^9 + O(q^10)
self, X) |
Returns the list coefficients of
of the power series of self,
for
in the list
. The results are not cached. (Use
coefficients for cached results).
General case (except weight 2, trivial character, where this is wrong!)
is a primitive character of conductor
is a primitive character of conductor
We have
, and
with
sage: e = DirichletGroup(11).gen() sage: f = EisensteinForms(e, 3).eisenstein_series()[0] sage: f._EisensteinSeries__compute_general_case([1]) [1] sage: f._EisensteinSeries__compute_general_case([2]) [4*zeta10 + 1] sage: f._EisensteinSeries__compute_general_case([0,1,2]) [15/11*zeta10^3 - 9/11*zeta10^2 - 26/11*zeta10 - 10/11, 1, 4*zeta10 + 1]
self, X) |
Compute coefficients for self an Eisenstein series of the form
. Computes
for each
.
sage: EisensteinForms(14,2).eisenstein_series()[0]._EisensteinSeries__compute_weight2_trivial_character([0]) [1/24] sage: EisensteinForms(14,2).eisenstein_series()[0]._EisensteinSeries__compute_weight2_trivial_character([0,4,11,38]) [1/24, 1, 12, 20]
self) |
Return defining parameters for self.
sage: EisensteinForms(11,2).eisenstein_series()[0]._EisensteinSeries__defining_parameters() (-1/24, [1], [1], Rational Field, 2, 11, 1, 1)
Class: ModularForm_abstract
Functions: base_ring,
character,
coefficients,
group,
level,
padded_list,
prec,
q_expansion,
qexp,
valuation,
weight
self) |
Return the base_ring of self.
sage: (ModularForms(117, 2).13).base_ring() Rational Field sage: (ModularForms(119, 2, base_ring=GF(7)).12).base_ring() Finite Field of size 7
self) |
Return the character of self.
sage: ModularForms(DirichletGroup(17).0^2,2).2.character() [zeta8]
self, X) |
The coefficients a_n of self, for integers n>=0 in the list X. If X is an Integer, return coefficients for indices from 1 to X.
This function caches the results of the compute function.
TESTS:
sage: e = DirichletGroup(11).gen() sage: f = EisensteinForms(e, 3).eisenstein_series()[0] sage: f.coefficients([0,1]) [15/11*zeta10^3 - 9/11*zeta10^2 - 26/11*zeta10 - 10/11, 1] sage: f.coefficients([0,1,2,3]) [15/11*zeta10^3 - 9/11*zeta10^2 - 26/11*zeta10 - 10/11, 1, 4*zeta10 + 1, -9*zeta10^3 + 1] sage: f.coefficients([2,3]) [4*zeta10 + 1, -9*zeta10^3 + 1]
self) |
Return the level of self.
sage: ModularForms(25,4).0.level() 25
self, n) |
Return a list of length n whose entries are the first n coefficients of the q-expansion of self.
sage: CuspForms(1,12).0.padded_list(20) [0, 1, -24, 252, -1472, 4830, -6048, -16744, 84480, -113643, -115920, 534612, -370944, -577738, 401856, 1217160, 987136, -6905934, 2727432, 10661420]
self) |
Return the precision to which self.q_expansion() is currently known. Note that this may be 0.
sage: M = ModularForms(2,14) sage: f = M.0 sage: f.prec() 0
sage: M.prec(20) 20 sage: f.prec() 0 sage: x = f.q_expansion() ; f.prec() 20
self, [prec=None]) |
The
-expansion of the modular form to precision
prec
.
This function takes one argument, which is the integer prec.
We compute the cusp form
.
sage: delta = CuspForms(1,12).0 sage: delta.q_expansion() q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 + O(q^6)
We compute the
-expansion of one of the cusp forms of level 23:
sage: f = CuspForms(23,2).0 sage: f.q_expansion() q - q^3 - q^4 + O(q^6) sage: f.q_expansion(10) q - q^3 - q^4 - 2*q^6 + 2*q^7 - q^8 + 2*q^9 + O(q^10) sage: f.q_expansion(2) q + O(q^2) sage: f.q_expansion(1) O(q^1) sage: f.q_expansion(0) O(q^0)
self, [prec=None]) |
Same as self.q_expansion(prec).
sage: CuspForms(1,12).0.qexp() q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 + O(q^6)
self) |
Return the valuation of self (i.e. as an element of the power series ring in q).
sage: ModularForms(11,2).0.valuation() 1 sage: ModularForms(11,2).1.valuation() 0 sage: ModularForms(25,6).1.valuation() 2 sage: ModularForms(25,6).6.valuation() 7
self) |
Return the weight of self.
sage: (ModularForms(Gamma1(9),2).6).weight() 2
Special Functions: __call__,
__cmp__,
__eq__,
__getitem__,
__getslice__,
_compute,
_ensure_is_compatible,
_latex_,
_repr_
self, x, [prec=None]) |
Evaluate the q-expansion of this modular form at x.
sage: f = ModularForms(DirichletGroup(17).0^2,2).2
sage: f(7) ## indirect doctest -4851*zeta8^2 - 16464*zeta8 + 92372
sage: f(0) 0
self, other) |
Compare self to other. If they are not the same object, but are of the same type, compare them as vectors.
sage: f = ModularForms(DirichletGroup(17).0^2,2).2 sage: g = ModularForms(DirichletGroup(17).0^2,2).1 sage: f == g ## indirect doctest False sage: f == f True
self, other) |
Compare self to other.
sage: f = ModularForms(6,4).0 sage: g = ModularForms(23,2).0 sage: f == g ## indirect doctest False sage: f == f True sage: f == loads(dumps(f)) True
self, n) |
Return the
coefficient of the
-expansion of self.
sage: f = ModularForms(DirichletGroup(17).0^2,2).2 sage: f.__getitem__(10) zeta8^3 - 5*zeta8^2 - 2*zeta8 + 10 sage: f[30] -2*zeta8^3 - 17*zeta8^2 + 4*zeta8 + 29
self, i, j) |
Return a list containing the
through
coefficients of self.
sage: f = ModularForms(DirichletGroup(17).0^2,2).2 sage: f[10:15] [zeta8^3 - 5*zeta8^2 - 2*zeta8 + 10, -zeta8^3 + 11, -2*zeta8^3 - 6*zeta8^2 + 3*zeta8 + 9, 12, 2*zeta8^3 - 7*zeta8^2 + zeta8 + 14]
sage: f.__getslice__(10,15) [zeta8^3 - 5*zeta8^2 - 2*zeta8 + 10, -zeta8^3 + 11, -2*zeta8^3 - 6*zeta8^2 + 3*zeta8 + 9, 12, 2*zeta8^3 - 7*zeta8^2 + zeta8 + 14]
self, X) |
Compute the coefficients of
of the power series of self,
for
in the list
. The results are not cached. (Use
coefficients for cached results).
self, other) |
Make sure self and other are compatible for arithmetic or comparison operations. Raise an error if incompatible, do nothing otherwise.
sage: f = ModularForms(DirichletGroup(17).0^2,2).2 sage: g = ModularForms(DirichletGroup(17).0^2,2).1 sage: h = ModularForms(17,4).0
sage: f._ensure_is_compatible(g)
sage: f._ensure_is_compatible(h) Traceback (most recent call last): ... ArithmeticError: Modular forms must be in the same ambient space.
self) |
Return the LaTeX expression of self.
sage: ModularForms(25,4).0._latex_() 'q + O(q^{6})'
sage: ModularForms(25,4).4._latex_() 'q^{5} + O(q^{6})'
self) |
Return the string representation of self.
sage: ModularForms(25,4).0._repr_() 'q + O(q^6)'
sage: ModularForms(25,4).3._repr_() 'q^4 + O(q^6)'
Class: ModularFormElement
self, parent, x, [check=True]) |
An element of a space of modular forms.
Input:
sage: M = ModularForms(Gamma0(11),2) sage: f = M.0 sage: f.parent() Modular Forms space of dimension 2 for Congruence Subgroup Gamma0(11) of weight 2 over Rational Field
Functions: cuspform_lseries,
modform_lseries
self, [prec=53], [max_imaginary_part=0], [max_asymp_coeffs=40]) |
Return the L-series of the weight k cusp form
f on
.
This actually returns an interface to Tim Dokchitser's program for computing with the L-series of the cusp form.
Input:
sage: f = CuspForms(2,8).0 sage: L = f.cuspform_lseries() sage: L(1) 0.0884317737041015 sage: L(0.5) 0.0296568512531983
Consistency check with delta_lseries (which computes coefficients in pari):
sage: delta = CuspForms(1,12).0 sage: L = delta.cuspform_lseries() sage: L(1) 0.0374412812685155 sage: L = delta_lseries() sage: L(1) 0.0374412812685155
self, [prec=53], [max_imaginary_part=0], [max_asymp_coeffs=40]) |
Return the L-series of the weight
modular form
on
.
This actually returns an interface to Tim Dokchitser's program for computing with the L-series of the modular form.
Input:
We commpute with the L-series of the Eisenstein series
:
sage: f = ModularForms(1,4).0 sage: L = f.modform_lseries() sage: L(1) -0.0304484570583933
Special Functions: __init__,
_add_,
_compute_q_expansion
self, other) |
Add self to other.
sage: f = ModularForms(DirichletGroup(17).0^2,2).2 sage: g = ModularForms(DirichletGroup(17).0^2,2).1 sage: f q + (-zeta8^2 + 2)*q^2 + (zeta8 + 3)*q^3 + (-2*zeta8^2 + 3)*q^4 + (-zeta8 + 5)*q^5 + O(q^6)
sage: g 1 + (-14/73*zeta8^3 + 57/73*zeta8^2 + 13/73*zeta8 - 6/73)*q^2 + (-90/73*zeta8^3 + 64/73*zeta8^2 - 52/73*zeta8 + 24/73)*q^3 + (-81/73*zeta8^3 + 189/73*zeta8^2 - 3/73*zeta8 + 153/73)*q^4 + (72/73*zeta8^3 + 124/73*zeta8^2 + 100/73*zeta8 + 156/73)*q^5 + O(q^6)
sage: f+g ## indirect doctest 1 + q + (-14/73*zeta8^3 - 16/73*zeta8^2 + 13/73*zeta8 + 140/73)*q^2 + (-90/73*zeta8^3 + 64/73*zeta8^2 + 21/73*zeta8 + 243/73)*q^3 + (-81/73*zeta8^3 + 43/73*zeta8^2 - 3/73*zeta8 + 372/73)*q^4 + (72/73*zeta8^3 + 124/73*zeta8^2 + 27/73*zeta8 + 521/73)*q^5 + O(q^6)
self, prec) |
Computes the q-expansion of self to precision prec.
sage: f = EllipticCurve('37a').modular_form() sage: f.q_expansion() ## indirect doctest q - 2*q^2 - 3*q^3 + 2*q^4 - 2*q^5 + O(q^6)
sage: f._compute_q_expansion(10) q - 2*q^2 - 3*q^3 + 2*q^4 - 2*q^5 + 6*q^6 - q^7 + 6*q^9 + O(q^10)
Class: ModularFormElement_elliptic_curve
self, parent, E) |
Modular form attached to an elliptic curve as an element of a space of modular forms.
sage: E = EllipticCurve('5077a') sage: f = E.modular_form() sage: f q - 2*q^2 - 3*q^3 + 2*q^4 - 4*q^5 + O(q^6) sage: f.q_expansion(10) q - 2*q^2 - 3*q^3 + 2*q^4 - 4*q^5 + 6*q^6 - 4*q^7 + 6*q^9 + O(q^10) sage: f.parent() Modular Forms space of dimension 423 for Congruence Subgroup Gamma0(5077) of weight 2 over Rational Field
sage: E = EllipticCurve('37a') sage: f = E.modular_form() ; f q - 2*q^2 - 3*q^3 + 2*q^4 - 2*q^5 + O(q^6) sage: f == loads(dumps(f)) True
Functions: elliptic_curve
self) |
Return elliptic curve associated to self.
sage: E = EllipticCurve('11a') sage: f = E.modular_form() sage: f.elliptic_curve() Elliptic Curve defined by y^2 + y = x^3 - x^2 - 10*x - 20 over Rational Field sage: f.elliptic_curve() is E True
Special Functions: __init__,
_compute_element,
_compute_q_expansion
self) |
Compute self as a linear combination of the basis elements of parent.
sage: EllipticCurve('11a1').modular_form()._compute_element() [1, 0] sage: EllipticCurve('389a1').modular_form()._compute_element() [1, -2, -2, 2, -3, 4, -5, 0, 1, 6, -4, -4, -3, 10, 6, -4, -6, -2, 5, -6, 10, 8, -4, 0, 4, 6, 4, -10, -6, -12, 4, 8, 0]
self, prec) |
The
-expansion of the modular form to precision
prec
.
This function takes one argument, which is the integer prec.
sage: E = EllipticCurve('11a') ; f = E.modular_form() sage: f._compute_q_expansion(10) q - 2*q^2 - q^3 + 2*q^4 + q^5 + 2*q^6 - 2*q^7 - 2*q^9 + O(q^10)
sage: f._compute_q_expansion(30) q - 2*q^2 - q^3 + 2*q^4 + q^5 + 2*q^6 - 2*q^7 - 2*q^9 - 2*q^10 + q^11 - 2*q^12 + 4*q^13 + 4*q^14 - q^15 - 4*q^16 - 2*q^17 + 4*q^18 + 2*q^20 + 2*q^21 - 2*q^22 - q^23 - 4*q^25 - 8*q^26 + 5*q^27 - 4*q^28 + O(q^30)
sage: f._compute_q_expansion(10) q - 2*q^2 - q^3 + 2*q^4 + q^5 + 2*q^6 - 2*q^7 - 2*q^9 + O(q^10)
Class: Newform
self, parent, component, names, [check=True]) |
TODO
Input:
Functions: abelian_variety,
element,
hecke_eigenvalue_field,
modular_symbols,
number
self) |
Find an element of the ambient space of modular forms which represents this newform.
NOTE: This can be quite expensive.
self) |
Return the field generated over the rationals by the coefficients of this newform.
self, [sign=0]) |
Return the subspace with the specified sign of the space of modular symbols corresponding to this newform.
Special Functions: __cmp__,
__eq__,
__init__,
_compute,
_compute_q_expansion,
_defining_modular_symbols,
_name
self, X) |
Compute the coefficients of
of the power series of self,
for
in the list
. The results are not cached. (Use
coefficients for cached results).
self, prec) |
Return the q-expansion of self.