|
31 | 31 |
|
32 | 32 | class QuasiModularFormsElement(ModuleElement):
|
33 | 33 | r"""
|
34 |
| - A quasimodular forms ring element. Such an element is describbed by SageMath |
35 |
| - as a polynomial |
| 34 | + A quasimodular forms ring element. Such an element is described by |
| 35 | + SageMath as a polynomial |
36 | 36 |
|
37 | 37 | .. MATH::
|
38 | 38 |
|
39 |
| - f_0 + f_1 E_2 + f_2 E_2^2 + \cdots + f_m E_2^m |
| 39 | + F = f_0 + f_1 E_2 + f_2 E_2^2 + \cdots + f_m E_2^m |
40 | 40 |
|
41 | 41 | where each `f_i` a graded modular form element
|
42 | 42 | (see :class:`~sage.modular.modform.element.GradedModularFormElement`)
|
43 | 43 |
|
| 44 | + For an integer `k`, we say that `F` is homogeneous of weight `k` if |
| 45 | + it lies in an homogeneous component of degree `k` of the graded ring |
| 46 | + of quasimodular forms. |
| 47 | +
|
44 | 48 | EXAMPLES::
|
45 | 49 |
|
46 | 50 | sage: QM = QuasiModularForms(1)
|
@@ -295,6 +299,45 @@ def __bool__(self):
|
295 | 299 | """
|
296 | 300 | return bool(self._polynomial)
|
297 | 301 |
|
| 302 | + def depth(self): |
| 303 | + r""" |
| 304 | + Return the depth of this quasimodular form. |
| 305 | +
|
| 306 | + Note that the quasimodular form must be homogeneous of weight |
| 307 | + `k`. Recall that the *depth* is the integer `p` such that |
| 308 | +
|
| 309 | + .. MATH:: |
| 310 | +
|
| 311 | + f = f_0 + f_1 E_2 + \cdots + f_p E_2^p, |
| 312 | +
|
| 313 | + where `f_i` is a modular form of weight `k - 2i` and `f_p` is |
| 314 | + nonzero. |
| 315 | +
|
| 316 | + EXAMPLES:: |
| 317 | +
|
| 318 | + sage: QM = QuasiModularForms(1) |
| 319 | + sage: E2, E4, E6 = QM.gens() |
| 320 | + sage: E2.depth() |
| 321 | + 1 |
| 322 | + sage: F = E4^2 + E6*E2 + E4*E2^2 + E2^4 |
| 323 | + sage: F.depth() |
| 324 | + 4 |
| 325 | + sage: QM(7/11).depth() |
| 326 | + 0 |
| 327 | +
|
| 328 | + TESTS:: |
| 329 | +
|
| 330 | + sage: QM = QuasiModularForms(1) |
| 331 | + sage: (QM.0 + QM.1).depth() |
| 332 | + Traceback (most recent call last): |
| 333 | + ... |
| 334 | + ValueError: the given graded quasiform is not an homogeneous element |
| 335 | + """ |
| 336 | + if not self.is_homogeneous(): |
| 337 | + raise ValueError("the given graded quasiform is not an " |
| 338 | + "homogeneous element") |
| 339 | + return self._polynomial.degree() |
| 340 | + |
298 | 341 | def is_zero(self):
|
299 | 342 | r"""
|
300 | 343 | Return whether the given quasimodular form is zero.
|
|
0 commit comments