QAuxiliaryTools

qetatool.spad line 149 [edit on github]

Miscellaneous tools to deal with polynomials.

clearDenominator: Polynomial Fraction Integer -> Polynomial Integer

clearDenominator(p) multiplies the polynomial p over rational numbers with the least common multiple of the denominator of all its coefficients and returns the result as a polynomial over the integers.

fromEtaToQPochhammer: (NonNegativeInteger, Fraction Polynomial Integer, String, String) -> Record(frf: Fraction Polynomial Integer, texpo: Integer)

fromEtaToQPochhammer(m,rf,e,u) returns [np/dp, ne-de] where [np,ne]:=fromEtaToQPochhammer(m,numer(rf),e,u), [dp,de]:=fromEtaToQPochhammer(m,denom(rf),e,u).

fromEtaToQPochhammer: (NonNegativeInteger, Polynomial Integer, String, String) -> Record(fpol: Polynomial Integer, texpo: Integer)

fromEtaToQPochhammer(m,p,e,u) is like the inverse of fromQPochhammerToEta. The variable t corresponds to exp(pi*i*tau/12) and q=t^24. fromEtaToPochhammer(m,p,e,u) returns [r,n] where r is a polynomial in q and the ui such that p and r*t^n correspond to the same q-series expansion. r is 0 if p cannot be expressed in such a way.

fromQPochhammerToEta: (NonNegativeInteger, Fraction Polynomial Integer, String, String) -> Record(frf: Fraction Polynomial Integer, texpo: Integer)

fromQPochhammerToEta(m,rf,u,e) returns [np/dp, ne-de] where [np,ne]:=fromQPochhammerToEta(m,numer(rf),u,e), [dp,de]:=fromQPochhammerToEta(m,denom(rf),u,e).

fromQPochhammerToEta: (NonNegativeInteger, Polynomial Integer, String, String) -> Record(fpol: Polynomial Integer, texpo: Integer)

fromQPochhammerToEta(m,p,u,e) expresses p (given as a polynomial in variables ui and q where the ui correspond to the Euler functions of level m https://en.wikipedia.org/wiki/Euler_function) into an expression in variables ei (corresponding to eta(i*tau)). The result [r,n] is expressed as a polynomial r in the ei and an exponent n of t (corresponding to exp(pi*i*tau/12)) such that p and r*t^n correspond to the same q-series expansion (with q=t^24). r is 0 if p cannot be expressed in such a way. This function mainly helps to translate the representation of Somos at url{https://web.archive.org/web/20190709153133/http://eta.math.georgetown.edu/eta07.gp} in terms of Euler functions to our representation in terms of eta functions. The variable q corresponds to exp(2*pi*i*tau).

index: (String, String) -> List Integer

index(s,i) returns the list integers encoded in the string s (and separated by one underscore) when the initial string i is removed. The function returns the empty list if the string does not start with the initial or has not the right format. It can be considered as the inverse of indexedSymbol.

indexedSymbol: (String, List Integer) -> Symbol

indexedSymbol(s, l) returns a symbol with a name that starts with the string s and is directly followed by the numbers of l separated by underscores (“__”).

indexedSymbols: (String, List Integer) -> List Symbol

indexedSymbols(s, l) returns indexedSymbols(s, [[n] for n in l]).

indexedSymbols: (String, List List Integer) -> List Symbol

indexedSymbols(s, ll) returns [indexedSymbol(s,l) for l in ll].

indexedSymbols: (String, NonNegativeInteger) -> List Symbol

indexedSymbols(s, n) returns indexedSymbols(s, [i for i in 1..n])

integerPrimitivePart: Polynomial Fraction Integer -> Polynomial Integer

integerPrimitivePart(p) returns primitivePart(clearDenominator(p)).

level: (List String, String) -> Integer

level(vs,i) checks whether each of the strings in vs is of the form id or id_g.with d and g positive integers and 0<=g<=d and returns the lcm of all d. In case of error, the function returns -1.

level: (List Symbol, String) -> Integer

level(vars,i) returns level([string v for v in vars],i).