In the previous post, I discussed about some changes made in the code for the graded ring of modular forms in SageMath. However, there was one lacking feature and it was the pushout of two modular forms space. I will explain this feature in this post.

Recall that our goal here was to give the class ModularFormsRing a ring structure. In other words, we want to be able to add, substract and multiply two given modular forms. This was implemented in SageMath by creating a new element class called GradedModularFormElement:

To make the above example consistent with the actual implementation of modular forms in SageMath, we needed to implement the pushout of two modular forms spaces. In SageMath, the pushout of two parents \(P_1\) and \(P_2\) is a third parent \(Q\) such that \(P_1 \hookrightarrow Q\) and \(P_2 \hookrightarrow Q\). In our case, letâ€™s take for example the following parents:

We observe that \(P_1\) and \(P_2\) can both be embbeded into the ring \(Q\). So, it would be desirable to have that the sum of an element of \(P_1\) with an element of \(P_2\) would return and element of \(Q\). In SageMath, \(P_1\) and \(P_2\) are two instances of the class ModularFormsSpace. Hence, to make the pushout feature works, we simply added the following method:

Thus, the code above makes the following example works:

In this post, I will give an overview of my work for the SageMath open-source mathematical software. If you are new to this blog, I suggest that you start reading from the first post.

In this post I will briefly explain what is a partition of a positive integer and how it is possible to relate this theory to quasimodular forms via the Bloch-Okounkov theorem.

In this post, I will explain an algorithmic way to write any modular form \(f \in \mathcal{M}_*(\Gamma)\) as a polynomial in the generators of the graded ring \(\mathcal{M}_*(\Gamma)\) (\(\Gamma = \Gamma_0(N), \Gamma_1(N)\) or \(\mathrm{SL}_2(\mathbb{Z})\)).