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)returns- fractionalBernoulli1(- b) if a is an integer and- bis different from zero, otherwise it returns 1. See eqref{eq:alpha-Schoeneberg-Contribution} in qeta.tex.
- balance: (Integer, Integer) -> Integer
- balance(m, n)supposes that- nis positive and returns a number- ksuch 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 where- mis half of the product of the elements from lmods.
- contains?: (AInterval Fraction Integer, Float) -> Boolean
- contains?(x,i)returns- trueif inf(- i)<x<sup(- i) and- falseotherwise.
- countRoots: (SparseUnivariatePolynomial Fraction Integer, AInterval Fraction Integer) -> Integer
- countRoots(p,i)returns the number of roots of the squarefree polynomial- pin the interval- i.
- dedekindSum: (Integer, Integer) -> Fraction Integer
- dedekindSum(p,q)returns for two relatively prime integers- pand- qthe 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 for- q<0the smallest odd- nsuch that $|q^n|<n!$ and $0<sum_{- k=0}- ^nq^k/k!$.
- fractionalBernoulli1: Fraction Integer -> Fraction Integer
- fractionalBernoulli1(x)computes- t- 1/2 where- tis the fractional part of- x, i.e.- t=- x- floor(- x)
- fractionalBernoulli2: Fraction Integer -> Fraction Integer
- fractionalBernoulli2(x)computes- t^2-- t+ 1/6 where- tis the fractional part of- x, i.e.- t=- x- floor(- x)
- fractionalPart: Fraction Integer -> Fraction Integer
- fractionalPart(x)returns- x- 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 vectors- vsby the- LLLalgorithm (only the first- nentries are relevant for- LLL).
- 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 if- mand- nare even, 2 if- mis even and- nis odd, 3 if- mand- nare odd, 4 if- mis odd and- nis even. This is function- T(- m,- n) from https://fungrim.org/entry/9bda2f/.
- jacobiThetaPermutation: (PositiveInteger, Integer, Integer, Integer, Integer) -> PositiveInteger
- jacobiThetaPermutation(j,a,b,c,d)returns 1 if- j=1,- jacobiThetaPermutation2(- c,- d) if- j=2,- jacobiThetaPermutation2(a+c,- b+d) if- j=3, and- jacobiThetaPermutation2(a,- b) if- j=4. This is function- S_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)returns- zin {0..7} such that $exp(pi- i- z/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 value- xsuch 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 value- xsuch 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 value- xsuch 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 value- xsuch 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 in- llis not empty and- llhas the same length- nand returns a list of lists that is the same as listOfLists(transpose(matrix(- ll))).
- makedir: String -> Void
- makedir(s)creates a directory with name- s. This function also creates subdirectories. The directory separator is the forward slash- '/'.
- matrixAtkinLehner: (PositiveInteger, PositiveInteger) -> Matrix Integer
- matrixAtkinLehner(m, t)with- ta Hall divisor (https://en.wikipedia.org/wiki/Hall_subgroup) of- mreturns the 2x2 matrix with entries [[- t, -a], [- m,- t*b]] such that n=m/t and- t*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 of- vonto any of the basis vectors from- vand returns the resulting vector. It subtracts only integer multiples of basis elements from- vwhere for any- bfrom basis- vis replaced by- v-- 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) returns- trueiff the eta-quotient corresponding to- ris a modular function for- Gamma_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 for- R(- 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 extension- vof- rsuch that matrixModular(- nn)- *vis 0.
- numberOfGaps: (PositiveInteger, List PositiveInteger) -> NonNegativeInteger
- numberOfGaps(n, l)computes reduce(+, [floor(- x/n) for- xin- l], 0).
- primePower: (PositiveInteger, PositiveInteger) -> NonNegativeInteger
- primePower(d, p)returns- esuch that- gcd(d/p^e,- p)- =1, i.e. the highest power- esuch that p^e is a factor of- d.
- quadraticIrrational: AlgebraicNumber -> List Integer
- quadraticIrrational(t)returns [a,- b,- c,- d] if- t=(a+b*sqrt(- c))- /d. If that is not the case then it returns a one element list [- e] where the meaning of the value- eis as follows.- e=0means- t=0,- e=1means that- thas no integer denominator,- e=2means that the numerator of- thas more than 2 terms,- e=3means that the number is rational instead of irrational,- e=4means that in- t=(a+b*sqrt(- c))- /d, the value a is not an integer,- e=5means that in- t=(a+b*sqrt(- c))- /d, the value- cis not an integer.
- readInputFromFile: FileName -> InputForm
- readInputFromFile(fname)reads the first non-empty and non-comment line of the file given by- fnameand 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)returns- rsuch that expPiI(- x)=sign(- r)*exp(-%pi*sqrt(abs(- r))) in case that- xis of the form- x=(a+b*sqrt(- c))- /dwith a,- b,- c,- d,a/d integer,- c<0,- b>0,- d>0, and r=s*c*(- b/d)- ^2where- s=1if odd?(a/d) and- s=-1 if even(a/d).
- sawTooth: Fraction Integer -> Fraction Integer
- sawTooth(x)is 0 if- xis an integer and- fractionalBernoulli1(- 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 that- mat=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)- /gwhere- g=- 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) polynomial- paccording to Sturm- 'sTheorem (https://en.wikipedia.org/wiki/Sturm’s_theorem#The_theorem).
- upsilonExponent: (Integer, Integer, Integer, Integer) -> Integer
- upsilonExponent(a,b,c,d)returns- zin {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]] from- SL_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 matrix- mfrom- SL_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)puts- m1on top of- m2while 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 by- fnamewhere- varand- valueare replaced by the actual strings given in the argument to this function. The directory directory(- fname) is created if it does not exist.