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 b 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 that n is positive and returns a number k 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 where m is half of the product of the elements from lmods.

contains?: (AInterval Fraction Integer, Float) -> Boolean

contains?(x,i) returns true if inf(i)<x<sup(i) and false otherwise.

countRoots: (SparseUnivariatePolynomial Fraction Integer, AInterval Fraction Integer) -> Integer

countRoots(p,i) returns the number of roots of the squarefree polynomial p in the interval i.

dedekindSum: (Integer, Integer) -> Fraction Integer

dedekindSum(p,q) returns for two relatively prime integers p and q 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 for q<0 the smallest odd n such that $|q^n|<n!$ and $0<sum_{k=0}^n q^k/k!$.

fractionalBernoulli1: Fraction Integer -> Fraction Integer

fractionalBernoulli1(x) computes t - 1/2 where t is 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 t is 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 vs by the LLL algorithm (only the first n entries are relevant for LLL).

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 if m and n are even, 2 if m is even and n is odd, 3 if m and n are odd, 4 if m is odd and n is 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 z in {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 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 value x 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 value x 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 value x 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 value x 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 in ll is not empty and ll has the same length n and 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 t a Hall divisor (https://en.wikipedia.org/wiki/Hall_subgroup) of m returns 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 v onto any of the basis vectors from v and returns the resulting vector. It subtracts only integer multiples of basis elements from v where for any b from basis v is replaced by v-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) returns true iff the eta-quotient corresponding to r is 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 v of r such that matrixModular(nn)*v is 0.

numberOfGaps: (PositiveInteger, List PositiveInteger) -> NonNegativeInteger

numberOfGaps(n, l) computes reduce(+, [floor(x/n) for x in l], 0).

primePower: (PositiveInteger, PositiveInteger) -> NonNegativeInteger

primePower(d, p) returns e such that gcd(d/p^e, p)=1, i.e. the highest power e such 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 e is as follows. e=0 means t=0, e=1 means that t has no integer denominator, e=2 means that the numerator of t has more than 2 terms, e=3 means that the number is rational instead of irrational, e=4 means that in t=(a+b*sqrt(c))/d, the value a is not an integer, e=5 means that in t=(a+b*sqrt(c))/d, the value c is not an integer.

readInputFromFile: FileName -> InputForm

readInputFromFile(fname) reads the first non-empty and non-comment line of the file given by fname 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) returns r such that expPiI(x)=sign(r)*exp(-%pi*sqrt(abs(r))) in case that x is of the form x=(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 where s=1 if odd?(a/d) and s=-1 if even(a/d).

sawTooth: Fraction Integer -> Fraction Integer

sawTooth(x) is 0 if x is 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=m1 and rec.triang=m2 such that mat=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 where 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 p 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) returns z 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]] 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 m from 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 m1 on top of m2 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 by fname where var and value are replaced by the actual strings given in the argument to this function. The directory directory(fname) is created if it does not exist.