File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
src/sage/modular/quasimodform Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -294,6 +294,45 @@ def __bool__(self):
294
294
"""
295
295
return bool (self ._polynomial )
296
296
297
+ def depth (self ):
298
+ r"""
299
+ Return the depth of the given quasimodular form.
300
+
301
+ Note that the quasimodular form must be homogeneous of weight
302
+ `k`. Recall that the *depth* is the integer `p` such that
303
+
304
+ .. MATH::
305
+
306
+ f = f_0 + f_1 E_2 + \cdots + f_p E_2^p,
307
+
308
+ where `f_i` is a modular form of weight `k - 2i` and `f_p` is
309
+ nonzero.
310
+
311
+ EXAMPLES::
312
+
313
+ sage: QM = QuasiModularForms(1)
314
+ sage: E2, E4, E6 = QM.gens()
315
+ sage: E2.depth()
316
+ 1
317
+ sage: F = E4^2 + E6*E2 + E4*E2^2 + E2^4
318
+ sage: F.depth()
319
+ 4
320
+ sage: QM(7/11).depth()
321
+ 0
322
+
323
+ TESTS::
324
+
325
+ sage: QM = QuasiModularForms(1)
326
+ sage: (QM.0 + QM.1).depth()
327
+ Traceback (most recent call last):
328
+ ...
329
+ ValueError: the given graded quasiform is not an homogeneous element
330
+ """
331
+ if not self .is_homogeneous ():
332
+ raise ValueError ("the given graded quasiform is not an "
333
+ "homogeneous element" )
334
+ return self ._polynomial .degree ()
335
+
297
336
def is_zero (self ):
298
337
r"""
299
338
Return whether the given quasimodular form is zero.
You can’t perform that action at this time.
0 commit comments