QEtaAuxiliaryPackage¶
qetaaux.spad line 111 [edit on github]
QEtaAuxiliaryPackage helps to do computations with eta-quotients that are modular functions.
- alphaSchoenebergContribution: (Fraction Integer, Fraction Integer) -> Fraction Integer
alphaSchoenebergContribution(a,b)
returnsfractionalBernoulli1
(b
) if a is an integer andb
is different from zero, otherwise it returns 1. See eqref{eq:alpha-Schoeneberg-Contribution} in qeta.tex.
- balance: (Integer, Integer) -> Integer
balance(m, n)
supposes thatn
is positive and returns a numberk
such that-n/2<k<=n/2
.
- chineseRemainder: (List Polynomial Integer, List Integer) -> Polynomial Integer
chineseRemainder(lpols, lmods)
supposes that each of the input polynomials comes with the same power products. For each power product it lifts the coefficients of the respecitve polynomials via chinese remaindering (lmods are supposed to be pairwise prime) and returns a polynomial with coefficients in the range -m<c<=m wherem
is half of the product of the elements from lmods.
- contains?: (AInterval Fraction Integer, Float) -> Boolean
contains?(x,i)
returnstrue
if inf(i
)<x<sup(i
) andfalse
otherwise.
- countRoots: (SparseUnivariatePolynomial Fraction Integer, AInterval Fraction Integer) -> Integer
countRoots(p,i)
returns the number of roots of the squarefree polynomialp
in the intervali
.
- dedekindSum: (Integer, Integer) -> Fraction Integer
dedekindSum(p,q)
returns for two relatively prime integersp
andq
the Dedekind sum as defined by dedekindSum(p
,q
)=sum(sawTooth(1/q)*sawTooth(p*i/q),i=1
..q
-1).
- expPrecisionOdd: Fraction Integer -> PositiveInteger
expPrecisionOdd(q)
returns forq<0
the smallest oddn
such that $|q^n|<n!$ and $0<sum_{k=0
}^n
q^k/k!$.
- fractionalBernoulli1: Fraction Integer -> Fraction Integer
fractionalBernoulli1(x)
computest
- 1/2 wheret
is the fractional part ofx
, i.e.t
=x
- floor(x
)
- fractionalBernoulli2: Fraction Integer -> Fraction Integer
fractionalBernoulli2(x)
computest^2
-t
+ 1/6 wheret
is the fractional part ofx
, i.e.t
=x
- floor(x
)
- fractionalPart: Fraction Integer -> Fraction Integer
fractionalPart(x)
returnsx
- floor(x
)::Fraction(Integer).
- generalizedDedekindSum: (PositiveInteger, Integer, Integer, Integer, Integer) -> Fraction Integer
generalizedDedekindSum(nn,g,h,p,q)
returns the generalized Dedekind sum as defined in cite[p~673
]{Yang:GeneralizedDedekindEtaFunctions} by generalizedDedekindSum(nn
,g
,h
,p
,q
) = sum(sawTooth((g+i*nn)/(q*nn))*sawTooth((g’+p*i*nn)/(q*nn)),i=1
..q
-1). Condition: one?gcd
(p
,q
).
- interMinimizeVectors: (List Vector Integer, Integer) -> List Vector Integer
interMinimizeVectors(vs,n)
reduces the vectorsvs
by theLLL
algorithm (only the firstn
entries are relevant forLLL
).
- jacobiLowerStar: (Integer, Integer) -> Integer
See, for example, Definition 2.26 in the
PhD
thesis of Silviu Radu. http://www.risc.jku.at/publications/download/risc_5453/main.pdf
- jacobiThetaPermutation2: (Integer, Integer) -> PositiveInteger
jacobiThetaPermutation2(m,n)
return 1 ifm
andn
are even, 2 ifm
is even andn
is odd, 3 ifm
andn
are odd, 4 ifm
is odd andn
is even. This is functionT
(m
,n
) from https://fungrim.org/entry/9bda2f/.
- jacobiThetaPermutation: (PositiveInteger, Integer, Integer, Integer, Integer) -> PositiveInteger
jacobiThetaPermutation(j,a,b,c,d)
returns 1 ifj=1
,jacobiThetaPermutation2
(c
,d
) ifj=2
,jacobiThetaPermutation2
(a+c,b+d
) ifj=3
, andjacobiThetaPermutation2
(a,b
) ifj=4
. This is functionS_j
(a,b
,c
,d
) from https://fungrim.org/entry/9bda2f/.
- jacobiThetaPermutation: (PositiveInteger, Matrix Integer) -> PositiveInteger
jacobiThetaPermutation(j,g)
returns jacobiThetaPermutation(j
,g
(1,1),g
(1,2),g
(2,1),g
(2,2)).
- jacobiThetaUpsilonExponent: (PositiveInteger, Integer, Integer, Integer, Integer) -> Integer
jacobiThetaUpsilonExponent(j,a,b,c,d)
returnsz
in {0..7} such that $exp(pii
z/4
)=varepsilon_{j
}\!
left(a,b
,c
,d
right)$ as defined at https://fungrim.org/entry/03356b/ and https://fungrim.org/entry/3c56c7/.
- jacobiUpperStar: (Integer, Integer) -> Integer
See, for example, Definition 2.26 in the
PhD
thesis of Silviu Radu. http://www.risc.jku.at/publications/download/risc_5453/main.pdf
- kappaSchoeneberg: (PositiveInteger, Integer, Integer, Integer, Integer, Integer, Integer) -> Fraction Integer
kappaSchoeneberg(nn, g, h, a, b, c, d)
returns a valuex
such that eta_{g
,h
}(mat*tau) = exp(2*%pi*%i*x) * eta_{g'
,h'
}(tau) as given at the top of page 673 of cite{Yang_GeneralizedDedekindEtaFunctions_2004
} where mat=matrix[[a,b
],[c
,d
]]. See also eqref{eq:kappa_g-h
-N
-gamma-Schoeneberg}.
- kappaSchoeneberg: (PositiveInteger, Integer, Integer, Matrix Integer) -> Fraction Integer
kappaSchoeneberg(nn, g, h, mat)
returns a valuex
such that eta_{g
,h
}(mat*tau) = exp(2*%pi*%i*x) * eta_{g'
,h'
}(tau) as given at the top of page 673 of cite{Yang_GeneralizedDedekindEtaFunctions_2004
}. See also eqref{eq:kappa_g-h
-N
-gamma-Schoeneberg}.
- kappaYang: (PositiveInteger, Integer, Integer, Integer, Integer, Integer, Integer) -> Fraction Integer
kappaYang(nn, g, h, a, b, c, d)
returns a valuex
such that E_{g
,h
}(mat*tau) = exp(2*%pi*%i*x) * E_{g'
,h'
}(tau) as given in cite[Theorem~1
]{Yang_GeneralizedDedekindEtaFunctions_2004
} where mat = matrix [[a,b
],[c
,d
]]. Condition: not zero?c
.
- kappaYang: (PositiveInteger, Integer, Integer, Matrix Integer) -> Fraction Integer
kappaYang(nn, g, h, mat)
returns a valuex
such that E_{g
,h
}(mat*tau) = exp(2*%pi*%i*x) * E_{g'
,h'
}(tau) as given in cite[Theorem~1
]{Yang_GeneralizedDedekindEtaFunctions_2004
}. Condition: not zero? mat(2,1).
- listTranspose: List List Integer -> List List Integer
listTranspose(ll)
supposes that each list inll
is not empty andll
has the same lengthn
and returns a list of lists that is the same as listOfLists(transpose(matrix(ll
))).
- makedir: String -> Void
makedir(s)
creates a directory with names
. This function also creates subdirectories. The directory separator is the forward slash'/'
.
- matrixAtkinLehner: (PositiveInteger, PositiveInteger) -> Matrix Integer
matrixAtkinLehner(m, t)
witht
a Hall divisor (https://en.wikipedia.org/wiki/Hall_subgroup) ofm
returns the 2x2 matrix with entries [[t
, -a], [m
,t*b
]] such that n=m/t andt*b
+ n*a = 1, see cite{Kohnen_WeierstrassPointsAtInfinity_2004
}.
- minimizeVector: (Vector Integer, List Vector Integer) -> Vector Integer
minizeVector(
v
, basis) computes minimizeVector(v
, basis,\#v
).
- minimizeVector: (Vector Integer, List Vector Integer, Integer) -> Vector Integer
minizeVector(
v
,basis,n
) substracts the projections ofv
onto any of the basis vectors fromv
and returns the resulting vector. It subtracts only integer multiples of basis elements fromv
where for anyb
from basisv
is replaced byv
-c*b
where c=floor(dot(v
(1..n
),b
(1..n
))/dot(b
(1..n
),b
(1..n
))+1/2
).
- modularGamma0?: (PositiveInteger, List Integer) -> Boolean
modularGamma0
(nn
,r
) returnstrue
iff the eta-quotient corresponding tor
is a modular function forGamma_0
(nn
). It is equivalent to zero?(modularGamma0
(nn
,r
)).
- modularGamma0: (PositiveInteger, List Integer) -> Integer
modularGamma0(nn, r)
returns 0 if all conditions are fulfilled. Otherwise it returns a positive number in the range 1 to 4 that corresponds to the condition that is not met. This corresponds to the conditions given forR
(N
,i
,j
,k
,l
) on page 226 of cite{Radu_RamanujanKolberg_2015
} and to the conditions eqref{eq:sum=0
}, eqref{eq:pure-rhoinfinity}, eqref{eq:pure-rho0
}, and eqref{eq:productsquare} in qeta.tex. It is equivalent to check whether there is an extensionv
ofr
such that matrixModular(nn
)*v
is 0.
- numberOfGaps: (PositiveInteger, List PositiveInteger) -> NonNegativeInteger
numberOfGaps(n, l)
computes reduce(+, [floor(x/n
) forx
inl
], 0).
- primePower: (PositiveInteger, PositiveInteger) -> NonNegativeInteger
primePower(d, p)
returnse
such thatgcd
(d/p^e,p
)=1
, i.e. the highest powere
such that p^e is a factor ofd
.
- quadraticIrrational: AlgebraicNumber -> List Integer
quadraticIrrational(t)
returns [a,b
,c
,d
] ift=
(a+b*sqrt(c
))/d
. If that is not the case then it returns a one element list [e
] where the meaning of the valuee
is as follows.e=0
meanst=0
,e=1
means thatt
has no integer denominator,e=2
means that the numerator oft
has more than 2 terms,e=3
means that the number is rational instead of irrational,e=4
means that int=
(a+b*sqrt(c
))/d
, the value a is not an integer,e=5
means that int=
(a+b*sqrt(c
))/d
, the valuec
is not an integer.
- readInputFromFile: FileName -> InputForm
readInputFromFile(fname)
reads the first non-empty and non-comment line of the file given byfname
and parses it into an InputForm.
- readPolynomialFromFile: FileName -> Polynomial Integer
readPolynomialFromFile(fname)
calls readInputFromFile(fname
) and interprets the input as a polynomial.
- readPolynomialListFromFile: FileName -> List Polynomial Integer
readPolynomialListFromFile(fname)
calls readInputFromFile(fname
) and interprets the input as a list of polynomials.
- realExpPiIForm: AlgebraicNumber -> Fraction Integer
realExpPiIForm(x)
returnsr
such that expPiI(x
)=sign(r
)*exp(-%pi*sqrt(abs(r
))) in case thatx
is of the formx=
(a+b*sqrt(c
))/d
with a,b
,c
,d
,a/d integer,c<0
,b>0
,d>0
, and r=s*c*(b/d
)^2
wheres=1
if odd?(a/d) ands=
-1 if even(a/d).
- sawTooth: Fraction Integer -> Fraction Integer
sawTooth(x)
is 0 ifx
is an integer andfractionalBernoulli1
(x
) otherwise.
- signVariations: List Fraction Integer -> Integer
signVariations(lq)
returns the number of sign changes while ignoring zeroes.
- splitMatrix: (Integer, Integer, Integer, Integer) -> Record(red: Matrix Integer, triang: Matrix Integer)
splitMatrix(a, b, c, d)
returns a record rec that contains two matrices rec.red=m1
and rec.triang=m2
such thatmat=m1*m2
according to cide[Lemma~4
.8]{Radu_PhD_2010
}, but in a variation as described in qeta.tex, i.e. such that 0<=m2(1,2)<det(mat)/g
whereg
=gcd
(a,c
) and mat=[[a,b
],[c
,d
]]. Input condition: a*d-b*c>0
.
- splitMatrix: (Matrix Integer, Integer) -> Record(red: Matrix Integer, triang: Matrix Integer)
splitMatrix(mat, delta)
computes splitMatrix(mat
, delta, 1, 0). Input condition: determinant(mat
)>0
.
- splitMatrix: (Matrix Integer, Integer, PositiveInteger, NonNegativeInteger) -> Record(red: Matrix Integer, triang: Matrix Integer)
splitMatrix(mat, delta, m, lambda)
computes splitMatrix(a,b
,c
,d
) where the arguments are the matrix entries of matrix [[delta
, delta*lambda], [0,m
]]*mat. Input condition: determinant(mat
)>0
.
- sturmSequence: SparseUnivariatePolynomial Fraction Integer -> List SparseUnivariatePolynomial Fraction Integer
sturmSequence(p)
computes the Sturm sequence of the (squarefree) polynomialp
according to Sturm's
Theorem (https://en.wikipedia.org/wiki/Sturm’s_theorem#The_theorem).
- upsilonExponent: (Integer, Integer, Integer, Integer) -> Integer
upsilonExponent(a,b,c,d)
returnsz
in {0..23} such that exp(pi*i*z/12) is a multiplier in the transformation of an eta-function by the matrix [[a,b
],[c
,d
]] fromSL_2
(ZZ
). A definition can be found in cite[Lemma~2
.27]{Radu_PhD_2010
} and also as $kappa_{gamma_{delta,m
,lambda}}$ in equation ref{eq:eta_delta-m
-lambda(gamma*tau)} of qeta.tex.
- upsilonExponent: Matrix Integer -> Integer
upsilonExponent(m)
for a matrixm
fromSL_2
(ZZ
) returns upsilonExponent(m
(1,1),m
(1,2),m
(2,1),m
(2,2)).
- verticalConcat: (Matrix Fraction Integer, Matrix Fraction Integer) -> Matrix Fraction Integer
verticalConcat(m1, m2)
putsm1
on top ofm2
while creating a matrix big enough to hold all columns.
- writeValueToFile: (FileName, String, String) -> Void
writeValueToFile(fname,var,value)
writes out the string “var:=value;” to the file given byfname
wherevar
andvalue
are replaced by the actual strings given in the argument to this function. The directory directory(fname
) is created if it does not exist.