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 andbis different from zero, otherwise it returns 1. See eqref{eq:alpha-Schoeneberg-Contribution} in qeta.tex.
- balance: (Integer, Integer) -> Integer
balance(m, n)supposes thatnis positive and returns a numberksuch 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 wheremis half of the product of the elements from lmods.
- contains?: (AInterval Fraction Integer, Float) -> Boolean
contains?(x,i)returnstrueif inf(i)<x<sup(i) andfalseotherwise.
- countRoots: (SparseUnivariatePolynomial Fraction Integer, AInterval Fraction Integer) -> Integer
countRoots(p,i)returns the number of roots of the squarefree polynomialpin the intervali.
- dedekindSum: (Integer, Integer) -> Fraction Integer
dedekindSum(p,q)returns for two relatively prime integerspandqthe 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<0the smallest oddnsuch that $|q^n|<n!$ and $0<sum_{k=0}^nq^k/k!$.
- fractionalBernoulli1: Fraction Integer -> Fraction Integer
fractionalBernoulli1(x)computest- 1/2 wheretis the fractional part ofx, i.e.t=x- floor(x)
- fractionalBernoulli2: Fraction Integer -> Fraction Integer
fractionalBernoulli2(x)computest^2-t+ 1/6 wheretis 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 vectorsvsby theLLLalgorithm (only the firstnentries are relevant forLLL).
- jacobiLowerStar: (Integer, Integer) -> Integer
See, for example, Definition 2.26 in the
PhDthesis of Silviu Radu. http://www.risc.jku.at/publications/download/risc_5453/main.pdf
- jacobiThetaPermutation2: (Integer, Integer) -> PositiveInteger
jacobiThetaPermutation2(m,n)return 1 ifmandnare even, 2 ifmis even andnis odd, 3 ifmandnare odd, 4 ifmis odd andnis 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)returnszin {0..7} such that $exp(piiz/4)=varepsilon_{j}\!left(a,b,c,dright)$ 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
PhDthesis 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 valuexsuch 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 valuexsuch 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 valuexsuch 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 valuexsuch 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 inllis not empty andllhas the same lengthnand 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)withta Hall divisor (https://en.wikipedia.org/wiki/Hall_subgroup) ofmreturns 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 ofvonto any of the basis vectors fromvand returns the resulting vector. It subtracts only integer multiples of basis elements fromvwhere for anybfrom basisvis replaced byv-c*bwhere 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) returnstrueiff the eta-quotient corresponding toris 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 extensionvofrsuch that matrixModular(nn)*vis 0.
- numberOfGaps: (PositiveInteger, List PositiveInteger) -> NonNegativeInteger
numberOfGaps(n, l)computes reduce(+, [floor(x/n) forxinl], 0).
- primePower: (PositiveInteger, PositiveInteger) -> NonNegativeInteger
primePower(d, p)returnsesuch thatgcd(d/p^e,p)=1, i.e. the highest poweresuch 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 valueeis as follows.e=0meanst=0,e=1means thatthas no integer denominator,e=2means that the numerator ofthas more than 2 terms,e=3means that the number is rational instead of irrational,e=4means that int=(a+b*sqrt(c))/d, the value a is not an integer,e=5means that int=(a+b*sqrt(c))/d, the valuecis not an integer.
- readInputFromFile: FileName -> InputForm
readInputFromFile(fname)reads the first non-empty and non-comment line of the file given byfnameand 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)returnsrsuch that expPiI(x)=sign(r)*exp(-%pi*sqrt(abs(r))) in case thatxis of the formx=(a+b*sqrt(c))/dwith a,b,c,d,a/d integer,c<0,b>0,d>0, and r=s*c*(b/d)^2wheres=1if odd?(a/d) ands=-1 if even(a/d).
- sawTooth: Fraction Integer -> Fraction Integer
sawTooth(x)is 0 ifxis 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=m1and rec.triang=m2such thatmat=m1*m2according 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)/gwhereg=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) polynomialpaccording to Sturm'sTheorem (https://en.wikipedia.org/wiki/Sturm’s_theorem#The_theorem).
- upsilonExponent: (Integer, Integer, Integer, Integer) -> Integer
upsilonExponent(a,b,c,d)returnszin {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 matrixmfromSL_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)putsm1on top ofm2while 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 byfnamewherevarandvalueare replaced by the actual strings given in the argument to this function. The directory directory(fname) is created if it does not exist.