# The Pushout of Two Modular Forms Spaces

Published:

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:

$P_1 := \mathcal{M}_4(\mathrm{SL}_2(\mathbb{Z})) = \mathbb{C}E_4;$ $P_2 := \mathcal{M}_6(\mathrm{SL}_2(\mathbb{Z})) = \mathbb{C}E_6;$ $Q:= \mathcal{M}_*(\mathrm{SL}_2(\mathbb{Z})) = \bigoplus_{k\in \mathbb{Z}} \mathcal{M}_k(\mathrm{SL}_2(\mathbb{Z})).$

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: