# QPochhammer function simplification?

Consider the function

$$(a;q)_n=\begin{cases} 1&n=0,\\ (1-a)(1-aq)\cdots(1-aq^{n-1})&n=1,2,\dots,\\ [(1-aq^{-1})(1-aq^{-2})\cdots(1-aq^n)]^{-1}&n=-1,-2,\dots \end{cases}$$

which in Mathematica is denoted as QPochhammer[a, q, n], and its infinite product cousin:

$$(a;q)_\infty=\prod_{k=0}^\infty (1-aq^k)$$

which in Mathematica reads QPochhammer[a, q].

There exists the following relation among the finite product and infinite product expressions:

$$(a;q)_n=\frac{(a;q)_\infty}{(aq^n;q)_\infty}$$

which means that we should have

QPochhammer[x, q]/QPochhammer[q^n x, q] == QPochhammer[x, q, n]


True

However, Mathematica does not produce any output for this input at all. Trying something like

QPochhammer[x, q]/QPochhammer[q^n x, q]//FullSimplify


does not return QPochhammer[x, q, n] either. It seems that Mathematica is completely oblivious about this relation. Is there any way to get Mathematica to simplify these expressions properly? In general, I am interested in giving Mathematica a ratio of two infinite QPochhammer functions and let it determine if a reduction to a finite version exists. Can this be done? Thanks for any suggestion!

• AFAICT, Mathematica does not know this identity; it certainly is missing from MathematicalFunctionData[QPochhammer, "ArgumentSimplifications"]. Commented May 24, 2016 at 20:16
• Would using TransformationFunctions be ok?
– chuy
Commented May 24, 2016 at 20:53
• @chuy I guess so, but I don't quite understand yet how to use it here. Commented May 24, 2016 at 21:05
• @TheVee You are right! q is implied to be between zero and 1, while n is implied to be an integer. For other values the relation is not defined. Therefore, I would expect Mathematica to produce a ConditionalExpression object during the simplification. However, not even the following leads to the desired simplification: Assuming[0 < q < 1 && n \[Element] Integers, QPochhammer[x, q]/QPochhammer[q^n x, q] // FullSimplify]. So Mathematica effectively behaves as if it was in fact completely oblivious of this relation. Commented May 24, 2016 at 21:26
• Based on my experience with $q$-stuff in Mathematica, the symbolics still leave a lot to be desired. (The damn thing often can't recognize $q$-hypergeometrics as easily as it does for normal ones.) In that vein: do you already have a copy of Koekoek and Swarttouw? Commented Jun 4, 2016 at 16:17

It is even worse. While

FullSimplify[Product[(1 - q^k z), {k, 0, n - 1}]/Product[(1 - q^k z), {k, 1, n - 1}]]


yields 1-z ,

FullSimplify[QPochhammer[z, q, n]/QPochhammer[q z, q, n - 1]]


just returns the input. On the other hand,

FullSimplify[(1 - q) QGamma[x + 1, q]/QGamma[x, q]]


returns 1 - q^x .