# Elements of Drinfeld modular forms rings#

This module defines the elements of the class DrinfeldModularFormsRing.

EXAMPLES:

sage: from drinfeld_modular_forms import DrinfeldModularFormsRing
sage: q = 3
sage: A = GF(q)['T']
sage: K.<T> = Frac(A)
sage: M = DrinfeldModularFormsRing(K, 2)  # rank 2
sage: M.inject_variables()
Defining g1, g2
sage: g1.parent()
Ring of Drinfeld modular forms of rank 2 over Fraction Field of Univariate Polynomial Ring in T over Finite Field of size 3


A graded Drinfeld modular form is a sum of modular forms having potentially different weights:

sage: F = g1*g2 + g2
sage: F.is_drinfeld_modular_form()
False
sage: F.homogeneous_components()
{8: g2, 10: g1*g2}
sage: H = g1^4*g2^9 + T*g1^8*g2^8 + (T^2 - 1)*g1^28*g2^3
sage: H.is_drinfeld_modular_form()
True
sage: H.weight()
80


Rank 2 two case

In the rank 2 case, on can compute the expansion at infinity of any graded Drinfeld modular form:

sage: g1.expansion()
1 + ((2*T^3+T)*u^2) + O(u^7)
sage: g2.expansion()
u^2 + 2*u^6 + O(u^8)
sage: F.expansion()
2*u^2 + ((2*T^3+T)*u^4) + u^6 + O(u^8)


To access the $$i$$-th coefficient of the expansion:

sage: F
T^9 + 2*T
sage: F[0:15]  # i = 0...14
[0, 0, 2, 0, 2*T^3 + T, 0, 1, 0, 0, 0, 2*T^6 + 2*T^4 + 2*T^2, 0, 0, 0, 2]


It is also possible to create the ring of Drinfeld modular forms with arbitrary type using the option has_type=True:

sage: q = 3
sage: A = GF(q)['T']
sage: K.<T> = Frac(A)
sage: M = DrinfeldModularFormsRing(K, 2, has_type=True)
sage: M.gens()
[g1, h]
sage: M.inject_variables()
Defining g1, h
sage: h.weight()
4
sage: h.expansion()
u + u^5 + ((2*T^3+T)*u^7) + O(u^8)
sage: M.coefficient_form(1)
g1
sage: M.coefficient_form(2)
h^2


AUTHORS:

• David Ayotte (2022): initial version

class drinfeld_modular_forms.element.DrinfeldModularFormsRingElement(parent, polynomial)#

Bases: ModuleElement

Element class of rings of Drinfeld modular forms.

EXAMPLES:

sage: from drinfeld_modular_forms import DrinfeldModularFormsRing
sage: A = GF(3)['T']; K = Frac(A); T = K.gen()
sage: M = DrinfeldModularFormsRing(K, 2)
sage: M.inject_variables()
Defining g1, g2
sage: (T^2 + 1)*(g1 + g1*g2)
(T^2 + 1)*g1*g2 + (T^2 + 1)*g1
sage: (g1).parent()
Ring of Drinfeld modular forms of rank 2 over Fraction Field of Univariate Polynomial Ring in T over Finite Field of size 3
sage: g2 in M
True

coefficient(n)#

Return the $$n$$-coefficient of the graded Drinfeld form.

This method is only implemented when the rank is 2.

EXAMPLES:

sage: from drinfeld_modular_forms import DrinfeldModularFormsRing
sage: A = GF(3)['T']; K = Frac(A)
sage: M = DrinfeldModularFormsRing(K, 2)
sage: M.inject_variables()
Defining g1, g2
sage: g1
2*T^3 + T
sage: g1[0:16]
[1, 0, 2*T^3 + T, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2*T^3 + T, 0]
sage: g2
T^9 + 2*T^3

expansion(name='u')#

Return the expansion at infinity of the graded Drinfeld form.

Currently only implemented in rank 2.

OUTPUT: a lazy power series over the base ring.

EXAMPLES:

sage: from drinfeld_modular_forms import DrinfeldModularFormsRing
sage: A = GF(3)['T']; K = Frac(A)
sage: M = DrinfeldModularFormsRing(K, 2)
sage: M.inject_variables()
Defining g1, g2
sage: g1.expansion()
1 + ((2*T^3+T)*u^2) + O(u^7)
sage: g2.expansion()
u^2 + 2*u^6 + O(u^8)
sage: F = (g1 + g2)*g1
sage: F.expansion()
1 + ((T^3+2*T+1)*u^2) + ((T^6+T^4+2*T^3+T^2+T)*u^4) + 2*u^6 + O(u^7)

homogeneous_components()#

Return the homogeneous components of this graded Drinfeld modular form.

EXAMPLES:

sage: from drinfeld_modular_forms import DrinfeldModularFormsRing
sage: A = GF(3)['T']; K = Frac(A)
sage: M = DrinfeldModularFormsRing(K, 2)
sage: M.inject_variables()
Defining g1, g2
sage: F = g1 + g1^2 + g1*g2^2 + g2^4
sage: D = F.homogeneous_components(); D
{2: g1, 4: g1^2, 18: g1*g2^2, 32: g2^4}
sage: D
g2^4

is_drinfeld_modular_form()#

Return whether self is a Drinfeld modular form.

We recall that elements of Drinfeld modular forms ring are not necessarily modular forms as they may have mixed weight components.

EXAMPLES:

sage: from drinfeld_modular_forms import DrinfeldModularFormsRing
sage: A = GF(3)['T']; K = Frac(A)
sage: M = DrinfeldModularFormsRing(K, 2)
sage: M.inject_variables()
Defining g1, g2
sage: f = g1^5*g2^2  # homogeneous polynomial
sage: f.is_drinfeld_modular_form()
True
sage: g = g1 + g2  # mixed weight components
sage: g.is_drinfeld_modular_form()
False

is_one()#

Return True whether the given graded Drinfeld form is the multiplicative identity.

EXAMPLES:

sage: from drinfeld_modular_forms import DrinfeldModularFormsRing
sage: A = GF(3)['T']; K = Frac(A)
sage: M = DrinfeldModularFormsRing(K, 2)
sage: u = M.one()
sage: u.is_one()
True
sage: (M.0).is_one()
False

is_zero()#

Return True whether the given graded Drinfeld form is the additive identity.

EXAMPLES:

sage: from drinfeld_modular_forms import DrinfeldModularFormsRing
sage: A = GF(3)['T']; K = Frac(A)
sage: M = DrinfeldModularFormsRing(K, 2)
sage: z = M.zero()
sage: z.is_zero()
True
sage: f = M.0
sage: f.is_zero()
False
sage: (f - f).is_zero()
True
sage: (0 * M.0).is_zero()
True

polynomial()#

Return self as a multivariate polynomial over the generators of the ring.

OUTPUT:

A multivariate polynomial over the base ring.

EXAMPLES:

sage: from drinfeld_modular_forms import DrinfeldModularFormsRing
sage: A = GF(3)['T']; K = Frac(A)
sage: M = DrinfeldModularFormsRing(K, 2)
sage: M.inject_variables()
Defining g1, g2
sage: P1 = g1.polynomial();
sage: P2 = g2.polynomial();
sage: P2^2 + P1^2 + P1
g2^2 + g1^2 + g1
sage: P1.parent()
Multivariate Polynomial Ring in g1, g2 over Fraction Field of Univariate Polynomial Ring in T over Finite Field of size 3


The degree of each variables corresponds to the weight of the generator:

sage: P1.degree()
2
sage: P2.degree()
8

rank()#

Return the rank of the graded Drinfeld form.

EXAMPLES:

sage: from drinfeld_modular_forms import DrinfeldModularFormsRing
sage: A = GF(3)['T']; K = Frac(A)
sage: M2 = DrinfeldModularFormsRing(K, 2)
sage: (M2.0).rank()
2
sage: M5 = DrinfeldModularFormsRing(K, 5)
sage: (M5.0 + M5.3).rank()
5

type_m()#

Return the type of the graded Drinfeld form.

Recall that the type is the integer $$m$$ such that

$f(\gamma(w)) = \mathrm{det}(\gamma)^m j(\gamma, w)^k f(w).$

This method is only implemented when the rank is two.

EXAMPLES:

sage: from drinfeld_modular_forms import DrinfeldModularFormsRing
sage: A = GF(11)['T']; K = Frac(A)
sage: M = DrinfeldModularFormsRing(K, 2, has_type=True)
sage: M.inject_variables()
Defining g1, h
sage: F = g1*h^9
sage: F.type_m()
9
sage: (h^11).type_m()
1
sage: g1.type_m()
0

weight()#

Return the weight of self.

EXAMPLES:

sage: from drinfeld_modular_forms import DrinfeldModularFormsRing
sage: A = GF(3)['T']; K = Frac(A)
sage: M = DrinfeldModularFormsRing(K, 2)
sage: M.inject_variables()
Defining g1, g2
sage: g1.weight()
2
sage: g2.weight()
8
sage: f = g1^5*g2^2
sage: f.weight()
26


If the form is not modular, then the method returns an error:

sage: f = g1 + g2
sage: f.weight()
Traceback (most recent call last):
...
ValueError: the given ring element is not a Drinfeld modular form