$ \newcommand{\qPochhammer}[3][\infty]{\left( #2;#3 \right)_{#1}} \newcommand{\setQ}{\mathbb{Q}} $ Via jupytext this file can be shown as a jupyter notebook.
This notebook demonstrates the finding and verification of some identities involving the Goellnitz-Gordon functions.
)cd ..
)read input/jfricas-test-support.input )quiet
The current FriCAS default directory is /home/hemmecke/backup/git/qeta All user variables and function definitions have been cleared. All )browse facility databases have been cleared. Internally cached functions and constructors have been cleared. )clear completely is finished. The current FriCAS default directory is /home/hemmecke/backup/git/qeta/tmp
Do no execute the following if you are in a jFriCAS notebook.
)set output algebra on
)set output formatted off
Goellnitz-Gordon identities $G$, $H$¶
-------------------------------------------------------------------
--setup
-------------------------------------------------------------------
We start with some boilerplate code. We will work with with the rational numbers as coefficient domain.
C ==> QQ
)set mess type off
The following command determines how many terms of a series will be shown on output. You can change it if you want to see more.
)set stream calc 15
$G$ and $H$ are the Gordon-Göllnitz functions.
\begin{align*} G(q) &= \sum_{n=0}^\infty \frac{q^{n^2}\qPochhammer[n]{-q}{q^2}}{\qPochhammer[n]{q^2}{q^2}} = \prod_{n=0}^\infty \frac{1}{(1-q^{8n+1})(1-q^{8n+4})(1-q^{8n+7})} = \frac{\qPochhammer{q^8}{q^8}}{\qPochhammer{q,q^7}{q^8} \qPochhammer{q^4}{q^4}} \\ H(q) &= \sum_{n=0}^\infty \frac{q^{n(n+2)}\qPochhammer[n]{-q}{q^2}}{\qPochhammer[n]{q^2}{q^2}} = \prod_{n=0}^\infty \frac{1}{(1-q^{8n+3})(1-q^{8n+4})(1-q^{8n+5})} = \frac{\qPochhammer{q^8}{q^8}}{\qPochhammer{q^3,q^5}{q^8} \qPochhammer{q^4}{q^4}} \end{align*}
In QEta we represent $G(q)$ and $H(q)$ by two macros.
Here qP stands for the (infinite) qPochhammer product.
gg(q) ==> purify(qP(q^8) / qP(q^4) / qP[q,q^7,q^8]) :: SPEX(C)
hh(q) ==> purify(qP(q^8) / qP(q^4) / qP[q^3,q^5,q^8]) :: SPEX(C)
Krishna Alladi showed \begin{align*} G(-q^2)-q H(-q^2) &= \frac{\qPochhammer{q}{q^2}}{\qPochhammer{-q^2}{q^2}}. \end{align*}
In this notebook, we proof this identity, by turning the terms into modular functions for $\Gamma_1(32)$ and showing that the $q$-expansions (after bringing everything to the left-hand side) have a positive order at every cusp of $\Gamma_1(32)$ and thus must be the zero function.
Furthermore, QEta is not only able to find the above identity automatically, but also the following identities \begin{align*} \frac{1}{H(-q^2)} - \frac{q}{G(-q^2)} &= \frac{\qPochhammer{q}{q} \qPochhammer{q^4}{q^4} \qPochhammer{q^8}{q^8}} {\qPochhammer{q^2}{q^2} \qPochhammer{q^{16}}{q^{16}}^2}, \\ \frac{(G(-q^2) - q H(-q^2))^2}{G(-q^2) + q H(-q^2)} &= \frac{\qPochhammer{q}{q}^3}{\qPochhammer{q^2}{q^2}^3}. \end{align*}
By bringing the left-hand side to the right, Alladi's identity is equivalent to showing that the following expression vanishes identically at all cusps of $\Gamma_1(32)$.
alladilhs := gg(-q^2) - qPower(1) * hh(-q^2);
alladirhs := purify (qP(q,q^2) / qP(-q^2, q^2));
alladi := alladilhs - alladirhs
Note that the right-hand side is automatically transformed
into an equal quotient of $q$-Pochhammer symbols by the
purify function.
The expression looks a little simpler when expressed in generalized eta-quotients.
qPower(-1/8) * etaExpression alladi
-------------------------------------------------------------------
--endsetup
-------------------------------------------------------------------
-------------------------------------------------------------------
--test:Goellnitz-Gordon-G-H
-------------------------------------------------------------------
Verify Alladi relation of $G(-q^2)$ and $H(-q^2)$¶
Unfortunately, Alladi's identity is not a modular fuction for $\Gamma_1(32)$.
In the following, we use the macro MG when referring to
properties of $\Gamma_1(32)$. In order to abbreviate notation,
we use the macro qModular? from qetamacros.input.
MG ==> MGAMMA1 32
qModular?(C,MG)(alladi)
alladi
We turn Alladi's identity into a modular function for $\Gamma_1(32)$ by dividing by the right-hand side term.
modalladi := alladi / alladirhs
assertTrue(qModular?(C,MG) modalladi)
It is easy to compute that the expansion at infinity shows no poles.
spexMA1(C,MG)(modalladi)
However, this is not enough. For verifying that the above modular function is zero, it must be expanded at all cusps of $\Gamma_1(32)$ (not only at $\infty$) and it must be shown to vanish at each cusp.
We start with the cusps (or corresponding transformation matrices).
gammas := cuspMatrices() $ MG
spitzen := map(cusp, gammas)
The expansion at cusps other than $\infty$ may require an extension
of the coefficient domain. The following code determines the
extension CX of the domain $C$ (rational numbers) by a certain
root of unity.
xiord := minRootOfUnity(C,MG)(modalladi)
EXTENDEDCOEFFICIENTRING(C, xiord, CX, xi);
The 32 shown above means that it is enough to adjoin to
$\setQ$ a primitive 32-th root of unity $\xi$,
i.e. CX$=\setQ[\xi]$.
We can determine the pole orders (i.e. the negation of the orders)
of the terms of modalladi by the function qetaGrades and realize
that there are poles at the cusps different from $\infty$.
We use the macro qGrades from qetamacros.input instead, in order
to simplify notation.
qGrades(C,MG)(modalladi)
Since the terms have poles not only at infinity,
we must look at all cusps.
The macro spexMAn hides some technical details, but eventually
computes the $q$-expansions at each of the cusps that are represented
by the variable gammas with coefficients in CX for the group given
by MG.
an := spexMAn(gammas,CX,MG)(modalladi)
assertTrue(zero? an)
If you want to see the expansions of the terms at all the cusps, you can achieve it like this.
as := [spexMAn(gammas,CX,MG)(m) for m in support modalladi]; #as
as.1
as.2
as.3
coefficients modalladi
z := as.1 - as.2 - as.3
assertTrue(zero? z)
Find Alladi relation for $G(-q^2)$ and $H(-q^2)$¶
Let $q=\exp(2\pi i \tau)$. If we divide $G(-q^2)$ and $q H(q)$ by $q^{\frac{1}{8}}$, we arrive at generalized eta-quotients.
qPower(-1/8) * etaExpression(gg(-q^2))
qPower(-1/8) * etaExpression(qPower(1) * hh(-q^2))
Let us denote those eta-quotient by $g_{-2}(\tau)$ and $h_{-2}(\tau)$, respecively.
specgm2 := lift(etaExpression(gg(-q^2)) :: QSPEC)
spechm2 := lift(etaExpression(hh(-q^2)) :: QSPEC)
Since neither $g_{-2}(\tau)$ nor $h_{-2}(\tau)$ are modular for $\Gamma_1(32)$, we find eta-quotients, that we multiply to these functions so that the products are modular function for $\Gamma_1(32)$.
QEta provides the function etaCofactorNoPoles (abbreviated by
the macro cofact) in order to compute such an eta-quotient.
Clearly, in general, such an eta-quotient need not be unique,
thus this function allows to specifiy the search space for
the eta-functions that are allowed to be used for the cofactor.
That is encoded below in the variable idxs.
Here we want an eta-quotient that possibly only contains $\eta(\tau)$, $\eta(2\tau)$, and $\eta(4\tau)$. The cofactor is computed with no restrictions on the places of the poles, i.e., the result might have poles at any cusp.
idxs := etaFunctionIndices 4
cofac(idxs, spex) ==> cofact(MG)(idxs, spex::SPEC, 1, 0, [])
s1specg := cofac(idxs, specgm2)
s1spech := cofac(idxs, spechm2)
As it turns out, it can be done by the same eta-quotient
cofactor s1specg=s1spech.
Incidentally, this is exactly the inverse of the right-hand
side of Alladi's identity.
s1spec := s1specg;
spexmong1m2 := (s1spec * specgm2) :: SPEXMON;
spexmonh1m2 := (s1spec * spechm2) :: SPEXMON;
spexmon1s := [spexmong1m2, spexmonh1m2]
As claimed, by multiplication with the computed eta-quotient, we obtain modular functions for $\Gamma_1(32)$.
[qModular?(C,MG)(x) for x in spexmon1s]
Let us call the above functions $g_{-2}^{(1)}$ and $h_{-2}^{(1)}$ and let us compute their pole orders at the cusps of $\Gamma_1(32)$.
Since we aim at computing a polynomial $p$ such that $p(g_{-2}^{(1)}(\tau),h_{-2}^{(1)}(\tau))=0$, we only need to consider the cusps where at least one of the functions has a pole.
qgrd1ss := qGrades(C,MG)(spexmon1s)
poscomponent1s := [i for i in 1..#qgrd1ss.1 |_
qgrd1ss.1.i > 0 or qgrd1ss.2.i > 0]
The orders of $g_{-2}^{(1)}$ and $h_{-2}^{(1)}$ at the cusps corresponding to these components can easily be computed.
trfs := [gammas.i for i in poscomponent1s];
qGrades(C,MG)(spexmon1s, trfs)
For the multisamba algorithm to run, we need an element with proper poles at all these cusps. Fortunately, this is the case here.
In order to work with the $q$-expansion of the above functions, we need an extension of the coefficient field (the rational numbers).
xiord := minRootOfUnity(C,MG)(spexmon1s)
EXTENDEDCOEFFICIENTRING(C, xiord, CX, xi);
Obviously, we must adjoin a 32-th root of unity (denoted by $\xi$)
to the rational numbers.
The field $\setQ[\xi]$ is represented by CX.
This time we only work with a subset of the expansions at all cusps,
namely those that correspond to the cusps given through trfs.
a1s := [spexMAn(trfs,CX,MG)(x) for x in spexmon1s];
a1s.1
a1s.2
matrix [qetaGrades x for x in a1s]
We can now compute the modular polynomial for these expansions.
modPolynomial ==> modularPolynomial $ QEtaModularEquation(CX, An(trfs)(CX))
)time on
mp := modPolynomial(a1s)
)time off
Indeed, plugging in the series expansions of
$g_{-2}^{(1)}$ and $h_{-2}^{(1)}$ at all the cusps of
$\Gamma_1(32)$ gives a positive order and, therefore,
proves that the polynomial is an identity for
$g_{-2}^{(1)}$ and $h_{-2}^{(1)}$.
We must set the variable trfs to all cusps of
$\Gamma_1(32))$, which was previously stored in gammas.
an1s := [spexMAn(gammas,CX,MG)(spexmon) for spexmon in spexmon1s];
zser := evalAn(gammas,CX)(mp, ['x,'y], an1s)
assertTrue(zero? zser)
With the above polynomial, we have, therefore, found Alladi's identity, by purely algebraic and algorithmic means.
Find relation for $\frac{1}{G(-q^2)}$ and $\frac{1}{H(-q^2)}$¶
In contrast to the previous section, we now allow to choose from all eta functions $\eta(d\tau)$ for $d$ being a divisor of 32.
idxs := etaFunctionIndices 32
s2specg := cofac(idxs, specgm2)
s2spech := cofac(idxs, spechm2)
As it turns out, it can be done by the same eta-quotient cofactor. We now repeat the same process as in the previous section, but due to a different cofactor, we get a different result.
s2spec := s2specg;
spexmong2m2 := (s2spec * specgm2) :: SPEXMON;
spexmonh2m2 := (s2spec * spechm2) :: SPEXMON;
spexmon2s := [spexmong2m2, spexmonh2m2]
[qModular?(C,MG)(x) for x in spexmon2s]
Let us call the above functions $g_{-2}^{(2)}$ and $h_{-2}^{(2)}$ and let us compute their pole orders at the cusps of $\Gamma_1(32)$.
Since we aim at computing a polynomial $p$ such that $p(g_{-2}^{(2)}(\tau),h_{-2}^{(2)}(\tau))=0$, we only need to consider the cusps where at least one of the functions has a pole.
qgrd2ss := qGrades(C,MG)(spexmon2s)
poscomponent2s := [i for i in 1..#qgrd2ss.1 |_
qgrd2ss.1.i > 0 or qgrd2ss.2.i > 0]
The orders of $g_{-2}^{(2)}$ and $h_{-2}^{(2)}$ at these cusps can easily be computed.
trfs := [gammas.i for i in poscomponent2s]
qGrades(C,MG)(spexmon2s,trfs)
For the multisamba algorithm to run, we need an element with proper poles at all these cusps. So instead of computing a modular polynomial $p$ with $p(g_{-2}^{(2)}(\tau), h_{-2}^{(2)}(\tau))=0$, we compute a polynomial $p_2$ such that $p_2(g_{-2}^{(2)}(\tau) h_{-2}^{(2)}(\tau), h_{-2}^{(2)}(\tau))=0$ and reconstruct a polynomial $p$ from $p_2$.
spexmon2Xs := [spexmong2m2 * spexmonh2m2, spexmonh2m2];
qGrades(C,MG)(spexmon2Xs,trfs)
a2s := [spexMAn(trfs,CX,MG)(x) for x in spexmon2Xs];
a2s.1
a2s.2
matrix [qetaGrades x for x in a2s]
modPolynomial ==> modularPolynomial$QEtaModularEquation(CX, An(trfs)(CX))
)time on
mp2 := modPolynomial(a2s)
)time off
Now we remind ourselves that the variable x actually stands for the product $g_{-2}^{(2)} h_{-2}^{(2)}$.
mp := eval(mp2, [x=g*h, y=h])
To get the minimal polynomial, we drop the extraneous factor $h$.
fl := factorList factor mp; #fl
fl.1
p := fl.2.factor
Indeed, plugging in the series expansions of $g_{-2}^{(2)}$ and $h_{-2}^{(2)}$ at all the cusps of $\Gamma_1(32)$ gives a positive order and, therefore, proves that the polynomial is an identity for $g_{-2}^{(2)}$ and $h_{-2}^{(2)}$.
an2s := [spexMAn(gammas,CX,MG)(x) for x in spexmon2s];
zser := evalAn(gammas,CX)(p, [g,h], an2s)
assertTrue(zero? zser)
Let us translate polynomial to a nicer form by dividing by the product of the variables.
assertEquals(p/(g*h), 1 + 1/g -1/h)
Indeed, if we plug in the series expansions, we get 0 as above.
xg2 := an2s.1; xh2 := an2s.2; one:=1$An(gammas)(CX);
zser := one + one/xg2 - one/xh2
assertTrue(zero? zser)
The above can be translated back into an identity for $G(-q^2)$ and $H(-q^2)$.
Note that \begin{align*} g_{-2}^{(2)}(\tau)&=s_2(\tau) g_{-2}(\tau) \\ h_{-2}^{(2)}(\tau)&=s_2(\tau) h_{-2}(\tau) \end{align*} where
prefix(g[-2]::OF,[tau]) = q^((-1/8)::OF)*'G(-q^2)
prefix(h[-2]::OF,[tau]) = q^(( 7/8)::OF)*'H(-q^2)
prefix(s[2]::OF,[tau]) = s2spec = qExpression s2spec
So we derive from \begin{align*} \frac{1}{h_{-2}^{(2)}(\tau)} - \frac{1}{g_{-2}^{(2)}(\tau)} &=1 \end{align*} the following identities. \begin{align*} \frac{1}{h_{-2}(\tau)} - \frac{1}{g_{-2}(\tau)} &= \frac{\eta(\tau)\eta(4\tau)\eta(8\tau)} {\eta(2\tau) \eta(16\tau)} \\ \frac{1}{H(-q^2)} - \frac{q}{G(-q^2)} &= \frac{\qPochhammer{q}{q} \qPochhammer{q^4}{q^4} \qPochhammer{q^8}{q^8}} {\qPochhammer{q^2}{q^2} \qPochhammer{q^{16}}{q^{16}}^2} \end{align*}
Find a relation for the product $G(-q^2) H(-q^2)$¶
The relation $gh + h - g$ that we have found above, looks suspiciously like the relation $y - x + 1$ relation, i.e. like the relation that Alladi originally found. Let us try to verify, that the above relation of the inverses is actually not new.
We do this by showing that the product $G(-q^2) H(-q^2)$ is (up to a factor of a fractional $q$ power) a simple eta-quotient and cancels nicely with the other involved eta-quotient from the last section, so that Alladi's relation is obtained.
Let us consider the product $g_{-2}(\tau) h_{-2}(\tau)$ and determine an eta-quotient $s_\infty(\tau)$ such that the product \begin{gather*} u(\tau) = s_\infty(\tau) g_{-2}(\tau) h_{-2}(\tau). \end{gather*} gives a modular function $u(\tau)$ for $\Gamma_1(32)$ that has pole at most at infinity.
idxs := etaFunctionIndices 16
specgm2 * spechm2
sspecghinf := cofactInf(MG)(idxs, specgm2 * spechm2, 1, 0);
prefix(s[oo]::OF,[tau]) = sspecghinf
specu := sspecghinf * specgm2 * spechm2
prefix('u,[tau])$OF = specu
qModular?(C,MG)(specu)
Compute the expansion of $u(\tau)$ at all cusps of $\Gamma_1(32)$.
u := specMAn(gammas,CX,MG)(specu)
assertTrue(zero?(u - 1$An(gammas)(CX)))
We are lucky, we have just shown, by an expansions at the cusps that $u(\tau)=1$, i.e., \begin{gather*} g_{-2}(\tau) h_{-2}(\tau)=\frac{1}{s_\infty(\tau)}. \end{gather*}
So \begin{gather*} s_2(\tau) g_{-2}(\tau) - s_2(\tau) h_{-2}(\tau) = s_2(\tau)^2 g_{-2}(\tau) h_{-2}(\tau) \end{gather*} becomes \begin{gather*} g_{-2}(\tau) - h_{-2}(\tau) = s_2(\tau) g_{-2}(\tau) h_{-2}(\tau) = \frac{ s_2(\tau)}{s_\infty(\tau)}. \end{gather*}
And indeed $q^{\frac{1}{8}} \frac{ s_2(\tau)}{s_\infty(\tau)}$ agrees with the right-hand side of Alladi's identity.
qspecrhs2 := (s2spec /sspecghinf) :: QSPEC
assertEquals(qPower(1/8) * qspecrhs2, alladirhs)
In other words, we recover the identity found by Alladi.
Find other relation for $G(-q^2)$ and $H(-q^2)$¶
In contrast to the previous sections, we now allow only eta-functions $\eta(\tau)$ and $\eta(2\tau)$ in a cofactor. Clearly, it may happen that we are unlucky, but here we are successful.
idxs := etaFunctionIndices 2
s3specg := cofac(idxs, specgm2)
s3spech := cofac(idxs, spechm2)
As it turns out, it can be done by the same eta-quotient
cofactor s3specg=s3spech.
s3spec := s3specg;
spexmon3gm2 := (s3spec * specgm2) :: SPEXMON;
spexmon3hm2 := (s3spec * spechm2) :: SPEXMON;
spexmon3s := [spexmon3gm2, spexmon3hm2]
[qModular?(C,MG) x for x in spexmon3s]
Let us call the above functions $g_{-2}^{(3)}$ and $h_{-2}^{(3)}$ and let us compute their pole orders at the cusps of $\Gamma_1(32)$.
Since we aim at computing a polynomial $p$ such that $p(g_{-2}^{(3)}(\tau),h_{-2}^{(3)}(\tau))=0$, we only need to consider the cusps where at least one of the functions has a pole.
qgrd3ss := qGrades(C,MG)(spexmon3s)
poscomponent3s := [i for i in 1..#qgrd3ss.1 |_
qgrd3ss.1.i > 0 or qgrd3ss.2.i > 0]
The orders of $g_{-2}^{(3)}$ and $h_{-2}^{(3)}$ at the cusps corresponding to these components can easily be computed.
trfs := [gammas.i for i in poscomponent3s];
qGrades(C,MG)(spexmon3s, trfs)
For the multisamba algorithm to run, we need an element with proper poles at all these cusps. Fortunately, this is the case here.
a3s := [spexMAn(trfs,CX,MG)(x) for x in spexmon3s];
a3s.1
a3s.2
matrix [qetaGrades x for x in a3s]
modPolynomial ==> modularPolynomial$QEtaModularEquation(CX, An(trfs)(CX))
)time on
mp3 := modPolynomial(a3s)
)time off
Indeed, plugging in the series expansions of $g_{-2}^{(3)}$ and $h_{-2}^{(3)}$ at all the cusps of $\Gamma_1(32)$ gives a positive order and, therefore, proves that the polynomial is an identity for $g_{-2}^{(3)}$ and $h_{-2}^{(3)}$.
an3s := [spexMAn(gammas,CX,MG)(x) for x in spexmon3s];
zser := evalAn(gammas,CX)(mp3::Pol(CX), [x,y], an3s)
assertTrue(zero? zser)
Let us translate it to a nicer form by dividing by the sum of the variables.
assertEquals(mp3/(x+y), (x-y)^2/(x+y) - 1)
Indeed, if we plug in the series expansions, we get 0 as above.
xg2 := an3s.1; xh2 := an3s.2; one:=1$An(gammas)(CX);
(xg2-xh2)^2/(xg2+xh2) - one
assertTrue(zero?((xg2-xh2)^2/(xg2+xh2) - one))
By plugging in $s_3(\tau) g_{-2}(\tau)$ for $x$ and $s_3(\tau) h_{-2}(\tau)$ for $y$ we get after cancelling common factors: \begin{align*} g_{-2}(\tau) + h_{-2}(\tau) &= s_3(\tau) (g_{-2}(\tau) - h_{-2}(\tau))^2 \end{align*} where
prefix(s[3]::OF, [tau]) = s3spec
And after plugging in the right-hand side from the identity of Alladi, we get \begin{align*} g_{-2}(\tau) + h_{-2}(\tau) &= \frac{\eta(2\tau)^3}{\eta(\tau)\eta(4\tau)^2} \end{align*}
which is \begin{align*} G(-q^2) + q H(-q^2) &= \frac{\qPochhammer{q^2}{q^2}^3} {\qPochhammer{q}{q} \qPochhammer{q^4}{q^4}^2}. \end{align*}
Although, by construction, that is already a proven identity, we can recheck it as we did for Alladi's identity.
spexmonrhs3 := eqSPEC([[1,-1],[2,3],[4,-2]]) :: SPEX(C);
formula3 := (specgm2 :: SPEX(C)) + (spechm2 :: SPEX(C)) - spexmonrhs3;
modformula3 := formula3 / spexmonrhs3
qModular?(C,MG) modformula3
an3 := spexMAn(gammas,CX,MG)(modformula3)
assertTrue(zero? an3)
-------------------------------------------------------------------
--endtest
-------------------------------------------------------------------
Modular Equations for $R(q)$ and $R(q^2)$¶
-------------------------------------------------------------------
--test:RamanujanGoellnitzGordonModularPolynomials-32
-------------------------------------------------------------------
Let $R(q):= q^{\frac{1}{2}} \frac{H(q)}{G(q)}$ as defined in formula (1.1) in On the Ramanujan-Göllnitz-Gordon Continued Fraction by Heng Huat Chan and Sen-Shan Huang. We show (ii) of Theorem 2.2 of this article, which is \begin{gather*} u^2 = w \frac{1-w}{1+w} \end{gather*} where $u$ stands for $R(q)$ and $w$ stands for $R(q^2)$ in our notation by means of computing a modular polynomial with the multisamba algorithm.
In this section we compute the modular polynomial between $R(q)$ and $R(q^2)$. We have to find a modular polynomial between the following two eta-quotients.
hh(q)
n := 2;
r1spec := lift((hh(q)/gg(q))::QSPEC); -- R(q)
numer(r1spec::QSPEC)::OF / (denom(r1spec::QSPEC)::OF)
r2spec := dilate(r1spec, n); -- R(q^n)
rspecs := [r1spec, r2spec]
However, the first quotient, i.e. $R(q)$ is not a modular function for $\Gamma_1(16)$.
[modular?(x) $ MGAMMA1(16) for x in rspecs]
So instead, we consider $R(q^2)$ and $R(q^4)$ as modular functions for $\Gamma_1(32)$.
rrspexmons := [dilate(x,2)::SPEXMON for x in rspecs]
From now on, we work with the group $\Gamma_1(32)$.
MG ==> MGAMMA1 32;
gammas := cuspMatrices()$MG
[qModular?(C,MG) x for x in rrspexmons]
We compute a data structure that contains enough information to
compute the pole orders (qetaGrades) of the respective
$q$-expansions at the cusps without computing the actual series.
qgrdss := qGrades(C,MG)(rrspexmons)
Cusps that correspond to non-poles in the series expansions for both $R(q^2)$ and $R(q^4)$ can be excluded for the computation of the modular polynomial between the two.
poscomponents := [i for i in 1..#qgrdss.1 | qgrdss.1.i > 0 or qgrdss.2.i > 0]
trfs := [gammas.i for i in poscomponents]
#trfs
If we look at the pole orders of the remaining cusps, $R(q^2)$ has positive pole order at all these cusps.
vgrdss := [vector qGrades(C,MG)(x,gammas) for x in rrspexmons];
[[x.i for i in poscomponents] for x in vgrdss]
For the expansions at the remaining cusps, the coefficient ring must be extended. From the data we have, we conclude that an extension by an 8-th root of unity (we call it $\xi$) is enough.
xiord := minRootOfUnity(C,MG)(rrspexmons,trfs)
EXTENDEDCOEFFICIENTRING(C, xiord, CX8, xi);
ans := [spexMAn(trfs,CX8,MG)(x) for x in rrspexmons];
matrix [qetaGrades x for x in ans]
The modular polynomial between $x=R(q)$ and $y=R(q^2)$ can easily be computed.
modPolynomial ==> modularPolynomial$QEtaModularEquation(CX8, An(trfs)(CX8))
)time on
mp := modPolynomial(ans)
)time off
There is only one factor.
)clear prop u v
fl := factorList factor eval(mp,[x=u,y=w]); #fl
modpol := fl.1.factor
Clearly, that is equal to formula (ii) in Theorem 2.2 of the article On the Ramanujan-Göllnitz-Gordon Continued Fraction by Heng Huat Chan and Sen-Shan Huang..
assertEquals(modpol, numer(u^2 - w*(1-w)/(1+w)))
(modpol, numer(u^2 - w*(1-w)/(1+w)))
We can again check the result at all cuspe of $\Gamma_1(32)$. We set the transformation matrices such that they correspond to all cusps.
xiord := minRootOfUnity(C,MG)(rrspexmons)
EXTENDEDCOEFFICIENTRING(C, xiord, CX, xi);
ans := [spexMAn(gammas,CX,MG)(x) for x in rrspexmons];
matrix [qetaGrades x for x in ans]
zser := evalAn(gammas,CX)(modpol::Pol(C), [u,w], ans)
assertTrue(zero? zser)
-------------------------------------------------------------------
--endtest
-------------------------------------------------------------------