CYCLOTOMIC VALUATION OF q -POCHHAMMER SYMBOLS AND q -INTEGRALITY OF BASIC HYPERGEOMETRIC SERIES

. — We give a formula for the cyclotomic valuation of q -Pochhammer symbols in terms of (generalized) Dwork maps. We also obtain a criterion for the q -integrality of basic hypergeometric series in terms of certain step functions, which generalize Christol step functions. This provides suitable q -analogs of two results proved by Christol: a formula for the p -adic valuation of Pochhammer symbols and a criterion for the N -integrality of hypergeometric series.


Introduction
Factorial ratios form a remarkable class of sequences appearing regularly in combinatorics, number theory (e.g.[3,7,9,21]), mathematical physics and geometry (e.g.[5,10,12]).They are sequences of rational numbers of the form where v and w are non-negative integers, and e := (e 1 , . . ., e v ) and f := (f 1 , . . ., f w ) are vectors whose coordinates are positive integers.Understanding how arithmetic properties of factorial ratios may depend on the integer parameters e i and f i leads to interesting and challenging problems.Landau [19] introduced the step function and proved that the p-adic valuation of factorial ratios is given by This result generalizes the classical Legendre formula: v p (n!) = ∞ ℓ=1 n/p ℓ .Surprisingly, certain basic properties of the Landau function ∆ e,f turn out to characterize fundamental arithmetic properties of the corresponding factorial ratio and its generating series.Indeed, assuming for simplicity that i e i = j f j , we have the following results.
Choosing for example e = (30, 1) and f = (15,10,6), a straightforward computation shows that the corresponding sequence takes integer values, does not have the p-Lucas property for all primes, and has an algebraic generating series.At first sight, proving this result is not easy: for example, Rodriguez-Villegas [20] observed that the degree of algebraicity is 483 840.
These results have been generalized, replacing factorials by Pochhammer symbols and factorial ratios by hypergeometric sequences.We recall that the Pochhammer symbol (x) n , also called rising factorial, is defined as if n ≥ 1 and (x) 0 = 1, so that (1) n = n! and Given α ∈ Q \ Z ≤0 and p a prime such that v p (α) ≥ 0, Christol [11] provided the following formula ( ‡) for the p-adic valuation of Pochhammer symbols: where D p (α) is defined as the unique rational number whose denominator is not divisible by p and such that pD p (α) − α belongs to {0, . . ., p − 1}.The maps α → D p (α) were first introduced by Dwork [15] and are now referred to as Dwork maps.When α = 1, we have D p (1) = 1 and we retrieve Legendre's formula.Note also that if v p (α) < 0, then we simply have v p ((α) n ) = nv p (α).
( †) This means that the power series ] is algebraic over the field Q(x). (‡) More exactly, Formula (1.3) is a reformulation with floor functions of Christol's result, as given in [14,Section 5.3].
sequences and their generating series have attracted a lot of attention since the time of Gauss.According to (1.2), the study of factorial ratios reduces to the study of certain hypergeometric sequences.Again, understanding how arithmetic properties of hypergeometric sequences may depend on the rational parameters α i and β j leads to fascinating questions.
We let d α,β denote the least common multiple of the denominators of the parameters α i and β j .In [11], Christol introduced new step functions ξ α,β (a, •), for every a ∈ {1, . . ., d α,β } coprime to d α,β , which play the same role for hypergeometric sequences as the Landau function ∆ e,f does for factorial ratios.We refer the reader to Section 5.1 for a definition.
Analogs of (i)-(iii) have been respectively obtained by Christol [11], Adamczewski, Bell, and Delaygue [2], and Beukers and Heckman [6]  ( §) .We point out that, for the analog of (i), it is more natural to consider N -integrality of the sequence (Q α,β (n)) n≥0 , that is to ask whether there exists a non-zero integer a such that a n Q α,β (n) ∈ Z for all n ≥ 0. Also, for the analog of (ii), it is more natural to consider the p-Lucas property for all but finitely many primes in a given residue class modulo d α,β .Finally, the required conditions about the Landau function must now be satisfied by the Christol functions ξ α,β (a, •) for all a ∈ {1, . . ., d α,β } coprime to d α,β .In particular, the analog of (i) proved by Christol [11] reads as follows.
A remarkable feature of (i)-(iii) and of the results proved in [11,2,6] is that they provide simple algorithms, given in terms of suitable step functions, that allow one to decide whether certain fundamental arithmetic properties of factorial ratios and hypergeometric sequences hold ( ¶) .
1.1.Main results.-In this paper, our main objective is to prove q-analogs of Formula (1.3) and Theorem C. From now on, we let q denote a fixed transcendental complex number.
We are going to define suitable q-analogs of the Pochhammer symbol (α) n and of the hypergeometric term Q α,β (n), which belong to the field Q(q).In this framework, the p-adic valuations are replaced by the cyclotomic valuations, while the notion of N -integrality is replaced by q-integrality.For every positive integer b, we let φ b (q) ∈ Z[q] denote the bth cyclotomic polynomial and v φ b stands for the valuation of Q(q) associated with φ b (q) (see Section 2.1 for a definition).A sequence (R(q; n)) n≥0 with values in Q(q) and first term R(q; 0) = 1 is said to be q-integral if there exists C(q) ∈ Z[q] \ {0} such that C(q) n R(q; n) ∈ Z[q] for all n ≥ 0.
For every positive integer n, the q-analog of the integer n is defined as §) We refer the reader to [11,2,6] for precise statements.The reformulation in terms of Christol step functions of the famous interlacing criterion of Beukers and Heckmann can be found in [14]. (¶) We also refer the reader to [4] for more general results about integrality of A-hypergeometric series.
while keeping in mind that this ratio belongs to Z[q].It follows that [n] q = b≥2, b|n φ b (q) , which specializes as We recall that φ b (1) = 1 if b is divisible by at least two distinct primes, while φ p ℓ (1) = p when p is a prime and ℓ is a positive integer.We deduce that This formula shows that, in some sense, the arithmetic of q-analogs is finer than that of integers.The q-analog of n! is defined as Given α = r/s a rational number, the q-analog of the Pochhammer symbol (α) n is most often defined as (see, for instance, [16]) where we let (a; q) n := n−1 i=0 (1 − aq i ) denote the q-Pochhammer symbol (also called the q-shifted factorial).Substituting q by q s , we obtain a slightly different q-analog of (α) n : (1.7) (q r ; q s ) n (1 − q s ) n ∈ Q(q) .We note that lim q→1 (q α ; q) n (1 − q) n = lim q→1 (q r ; q s ) n (1 − q s ) n = (α) n .The latter has several advantages which are discussed in Section 2. In the end, it is sufficient for our discussion to consider q-Pochhammer symbols of the form where r and s are two integers, s = 0.This product is non-zero if and only if r/s / ∈ Z ≤0 or n ≤ −r/s.The usual extension to negative arguments n is given by which is well-defined if and only if r/s / ∈ Z >0 or n > −r/s.
Our first main result, which provides a q-analog of Formula (1.3) as well as its extension to negative arguments, involves a generalization of Dwork maps where the prime number p is replaced by an arbitrary positive integer b.Given a positive integer b and a rational number α whose denominator is coprime to b, we show in Section 3.1 that there exists a unique Let n ∈ Z be such that (q r ; q s ) n is well-defined and non-zero.Then we have and 0 otherwise.Hence we can easily derive from Theorem 1.1 a formula for the φ b -valuation of the q-analog of (α) n given in (1.7).
Our second main result is a q-analog of Theorem C. It involves new step functions Ξ r,t (b, •), b ∈ {1, . . ., d r,t }, which generalize Christol step functions.They are introduced in Section 5, where we also show that Ξ r,t (b, •) = ξ α,β (a, •) for b coprime to d r,t and ba ≡ 1 mod d r,t .Thus, we only define new functions for b not coprime to d r,t .The appearance of these new functions makes the proof of Theorem 1.3 substantially more tricky than that of Theorem C. Theorem 1.3.-We continue with the previous notation and assumptions.We also assume that s 1 , . . ., s v are positive.Then the two following assertions are equivalent.
A generalization of Theorem 1.3 with no restriction on the parameters s 1 , . . ., s v ∈ Z \ {0} is stated as Theorem 5.5 in Section 5.4.
Remark 1.4.-Strictly speaking, Q r,t (q; n) is not a q-analog of the hypergeometric term Q α,β (n).Instead, (1.7) shows that a suitable q-analog can be defined as Indeed, we have Since the q-integrality of (Q r,t (q; n)) n≥0 is equivalent to that of (Q ′ r,t (q; n)) n≥0 , we find more convenient to work with the simpler expression Q r,t (q; n).
We infer from (1.10) that the q-integrality of the sequence (Q r,t (q; n)) n≥0 implies the Nintegrality of the sequence (Q α,β (n)) n≥0 .This is consistent with Theorems 1.3 and C since Ξ r,t (b, •) = ξ α,β (a, •) when ba ≡ 1 mod d r,t .However, the converse result does not always hold true, depending on the behaviour of Ξ r,t (b, •) for b not coprime to d r,t .
1.2.Organization of the paper.-In Section 2, we discuss our choice for the q-analog of the Pochhammer symbol (α) n and show how to relate our results on q-hypergeometric sequences to basic hypergeometric series, as they are usually defined.In Section 3, we extend the definition of Dwork maps to arbitrary integers b and prove some of their basic properties.We also prove Theorem 1.1, as well as a formula for the cyclotomic valuation of q-hypergeometric terms.The latter is given in terms of certain step functions ∆ r,t b , which are introduced in this section.In Section 4, we deduce a first criterion for the q-integrality of q-hypergeometric sequences, which depends on the behaviour of ∆ r,t b for all but finitely many integers b.We also discuss the extension of this result to negative arguments n.These first criteria for q-integrality are not very satisfactory because they imply checking certain properties of an infinite number of step functions.We fill this gap in Section 5, where we introduce the finitely many step functions Ξ r,t (b, •), b ∈ {1, . . ., d r,t }, and prove Theorem 1.3.Finally, we provide some illustrations of Theorem 1.3 in Section 6.

Choices for the q-analogs of Pochhammer symbols and hypergeometric functions
The notion of q-analog is loosely defined: for a(q) to be a q-analog of a term a, one only requires that a(q) tends to a as q tends to 1.While everyone agrees with the definition of [n] q and [n]! q , this requires a fair amount of choice for more general expressions.Depending on the nature of the properties one wishes to study, one may have to make one choice rather than another.In this section, we discuss in more detail our own choices for the q-analogs of Pochhammer symbols and hypergeometric series, as well as how our results translate when considering other natural q-analogs.
2.1.Cyclotomic valuations and q-valuation.-We recall that, for every positive integer b, φ b (q) ∈ Z[q] stands for the bth cyclotomic polynomial.It is well-known that φ b (q) is irreducible over Z[q].If R and S belong to Z[q]\{0}, then we let v φ b (R) denote the φ b -valuation of R, that is the largest non-negative integer ν such that φ b (q) ν divides R. We also set v φ b (0) := +∞.The φ b -valuation extends naturally to Q(q) by setting We also let v q denote the valuation of Q(q) which is associated with the irreducible polynomial q in the same way.
2.2.q-Analogs of Pochhammer symbols.-We explain now why we prefer to choose as q-analog of the Pochammer symbol (α) n , α = r/s, instead of the more standard There are three main reasons for our preference.The first one, which was already mentioned in the introduction, is that we find it more natural to work in the field Q(q) instead of working in the field ∪ s≥1 Q(q 1/s ) and dealing with non-integer powers of q.The second one is that it offers more flexibility.For example, ) n , and provide three different q-analogs of (1/2) n .The third one comes from the useful Equality (1.2), which we recall here for the reader's convenience: With the choice of (q α ; q) n /(1 − q) n , we do not obtain a nice q-deformation of (2.3).Indeed, take for instance d = 2, so that The q-analog of the left-hand side of (2.3) is (q; q) 2n (1 − q) 2n = (q; q 2 ) n (q 2 ; q 2 ) n (1 − q) 2n = (−q 1/2 ; q) n (−q; q) n (q 1/2 ; q) n (1 − q) n (q; q) n (1 − q) n , therefore introducing minus signs in q-Pochhammer symbols.In contrast, the choice (q r ; q s ) n /(1 − q s ) n ensures the following nice q-deformation of (2.3): -Let d be a positive integer.Since q is transcendental over Q, there is an isomorphism of Z-modules given by In particular, Z[q 1/d ] is a Euclidean ring whose irreducible elements are of the form P (q 1/d ) where P (q) is an irreducible polynomial in Z[q].The isomorphism ϕ extends to an isomorphism between the rings of Laurent polynomials Z[q −1/d , q 1/d ] and Z[q −1 , q], as well as between the fields Q(q 1/d ) and Q(q).In particular, if we let v b,s denote the valuation in Q(q 1/s ) associated with the irreducible polynomial φ b (q 1/s ) ∈ Z[q 1/s ] and if we take α = r/s, then we obtain that v b,s (( This shows that there is no loss of generality when choosing (2.1) as q-analog of (α) n .
Thus, we have three different natural q-analogs of the generalized hypergeometric series F α,β (x).We observe that both F (1) α,β (q; x) and F (2) α,β (q; x) have coefficients in Q(q 1/d ), where d = d α,β is the least common multiple of the denominators of the rational numbers α i and β j .In contrast, F r,t (q; x) has coefficients in Q(q) and there exist infinitely many vectors r and t such that lim Indeed, if r = ((r 1 , s 1 ), . . ., (r v , s v )) and t = ((t 1 , u 1 ), . . ., (t w , u w )) is such a pair of vectors, then for each pair (a, b) occurring either in r or in t, we can choose a non-zero integer k and replace (a, b) by (ka, kb).
2.4.q-Integrality and q 1/d -integrality for basic hypergeometric series.-A power series ] is said to be q-integral if the sequence formed by its coefficients is q-integral, or, in other words, if there exists Similarly, we say that a power series Now, we show how Theorem 1.3 can be used to study the q 1/d -integrality of F α,β (q; x) and F (2) α,β (q; x), as well as the q-integrality of F r,t (q; x).Recall that Setting r := ((dα 1 , d), . . ., (dα v , d)) and t := ((dβ 1 , d), . . ., (dβ w , d)), we obtain that Note that for q-integrality, we can omit factors of the form h(q) n with h(q) ∈ Q(q) such as It follows that F α,β (q; x) is q 1/d -integral if and only if Q r,t (q; n) is q-integral and for some integer a, that is α,β (q; x) is q 1/d -integral ⇐⇒ (Q r,t (q; n)) n≥0 is q-integral and w ≥ v.We also deduce that 2.5.Irreducible factors of q-Pochhammer symbols and q-integrality of q-hypergeometric sequences.-Throughout this paper, we work only with ratios of products of terms of the form (q r ; q s ) n and (1 − q s ), where r and s are integers, s = 0, and n is an integer.
Let us first recall that, for every positive integer a, we have Let n ∈ Z.It follows that any ratio of products of terms of the form (q r ; q s ) n and (1 − q s ), where r and s are integers and s = 0, has a unique decomposition of the form where v q,n , v 1,n , . . .are integers and v b,n = 0 for all but finitely many positive integers b.
The integer v q,n is the q-valuation of this ratio and, for every b ≥ 1, the integer v b,n is its φ b -valuation.
Remark 2.2.-A term of the form (2.8) belongs to Z[q] if and only if the integers v q,n , v 1,n , v 2,n , . . .are all non-negative.When only the integers v 1,n , v 2,n , . . .are non-negative, then it belongs to Z[q −1 , q].
2.5.1.The q-valuation of q-Pochhammer symbols.-Let n be a positive integer and r and s be two integers, s = 0. Let us assume that (q r ; q s ) n is well-defined and non-zero.We let N := {i ∈ {0, . . ., n − 1} : r + is < 0}.Then we have We deduce the following results.(i) When r and s are non-negative, then v q ((q r ; q s ) n ) = 0.
(ii) When r is negative and s positive, then the sequence (v q ((q r ; q s ) n )) n≥0 remains bounded.
(iii) When s is negative, then (2.9) Now, let n be a negative integer.We can derive similar results from the expression (q r ; q s ) n = 1 (q r−s ; q −s ) −n • In particular, we get that (v q ((q r ; q s ) n )) n≤0 remains bounded if s is negative, and (2.10) 2.5.2.Asymptotics for cyclotomic and q-valuations of q-hypergeometric terms.-Let us consider the q-hypergeometric sequence which we assume to be well-defined and not eventually zero.We first infer from (2.7) that for every positive integer b.Let N 1 := {i ∈ {1, . . ., v} : s i < 0}, N 2 := {j ∈ {1, . . ., w} : u j < 0}, and s = i∈N 1 s i − j∈N 2 u j .Using (i)-(iii) above, we deduce that (2.12) It follows from (2.8), Remark 2.2, and Equalities (2.11) and (2.12), that The discussion of Section 2.5.1 also shows how to derive similar results for q-hypergeometric sequences of the form (Q r,t (q; n)) n≤0 .

The cyclotomic valuation of basic hypergeometric terms
In this section, we introduce some generalizations of Dwork maps and Landau functions.They provide suitable tools to respectively compute the φ b -valuation of the q-Pochhammer symbol (q r ; q s ) n and of q-hypergeometric terms.Our approach takes its source in the works of Dwork [15], Katz [18], and Christol [11].Precise formulas and properties for the p-adic valuation of Pochhammer symbols (r/s) n were given by Delaygue, Rivoal, and Roques [14] in order to prove the integrality of coefficients of some mirror maps.In this section, we generalize those formulas, yielding finer results in analogy with (1.6).We also show that our results extend naturally to negative arguments n, and we derive new formulas that could be used to simplify the proofs in [14, Chapter 5] considerably.Furthermore, the formula holds true for every integer a satisfying ab ≡ 1 mod d(α).
Following Christol [11], we introduce some notation which allows us to simplify the expression of D b (α) when b is large enough.For every real number x, we let {x} denote its fractional part and we set For every rational number α, we also define Furthermore, we have This proves the expected formula for D b (α) by uniqueness.Now, let us assume that b ≥ n α .Then we have |α/b| ≤ 1/d(α) and (even if α is an integer) If α is positive, then it follows that we obtain that |α/b| < 1/d(α).Hence, either α is an integer and In all cases, we obtain the expected result.
We end this section with a simple rule about composition of Dwork maps.Let n be an integer such that (q r ; q s ) n is well-defined and non-zero.Then we have It follows that when b divides both r and s, then c = b, b ′ = 1 and δ b (r, s, n/b) = n, as expected since φ b (q) divides each factor 1 − q r+is .In particular, this is the case when b = 1.
In order to prove Proposition 3.8 for negative n, we need the following lemma.It is also used in the proof of our criterion for the q-integrality of q-hypergeometric sequences.Lemma 3.9.-Let r, s, and n be integers with s = 0, and let b be a positive integer.Then we have Proof.-We set c := gcd(r, s, b) and write b = cb ′ and s = cs ′ .Both sides of Equation (3.5) are 0 when gcd(s ′ , b ′ ) = 1, so we can assume that s ′ and b ′ are coprime.Set α := r/s so that 1 − α = (r − s)/(−s).We have Let us first consider the case where α / ∈ Z. Then ⌊α⌋ = −⌊1 − α⌋ and the right hand-side of (3.6) becomes as expected.
It remains to consider the case where α ∈ Z.
which yields the equivalences Combined with (3.6), this yields (3.5) and ends the proof of the lemma.
Proof of Proposition 3.8.-Set r ′ = r/c.We first consider the case n ≥ 0. We assume that (q r ; q s ) n is non-zero, that is α / ∈ Z ≤0 or n ≤ −α.We observe that b | (r + is) if and only if b ′ | (r ′ + is ′ ).Since we have gcd(r ′ , s ′ , b ′ ) = 1, if b ′ and s ′ are not coprime, then b ∤ (r + is) and v φ b ((q r ; q s ) n ) = 0.
We now assume that b ′ and s ′ are coprime.We need to find, among the powers of q in the product defining (q r ; q s ) n , which are multiples of b.We have the following equivalences:  1).By Lemma 3.7, since both sides of Inequality (3.9) belong to (0, 1], we obtain that as expected. We now assume that n < 0 and that (q r ; q s ) n is well-defined, that is α / ∈ Z >0 or n > −α.We have (q r ; q s ) n = 1 (q r−s ; q −s ) −n • Using the non-negative case, we get that v φ b ((q r ; q s ) n ) = −δ b (r−s, −s, −n/b).By Lemma 3.9, the latter is equal to δ b (r, s, n/b).This ends the proof.
We introduce now some step functions that generalize the Landau functions mentioned in the introduction.Definition 3.10.-We continue with the notation of Section 3.2.For every integer b, we define the (upper semi-continuous) step function ∆ r,t b : R → R by: As a direct consequence of Proposition 3.8, we deduce the following result.

First criteria for q-integrality of basic hypergeometric sequences
In this section, we provide a criterion for the q-integrality of the q-hypergeometric sequences in terms of the Landau functions ∆ r,t b , as well as related results.

4.1.
A first criterion of q-integrality.-Our first result reads as follows.
Proposition 4.1.-We continue with the notation of the previous sections.Let us assume that (Q r,t (q; n)) n≥0 is a well-defined sequence.Then the two following assertions are equivalent.
(i) There exists C(q) ∈ Z[q] \ {0} such that, for every n ≥ 0, C(q (ii) For all but finitely many positive integers b, ∆ r,t b is non-negative on R ≥0 .
According to (2.13), we deduce from Proposition 4.1 the following result.
(ii) For all but finitely many positive integers b, ∆ r,t b is non-negative on R ≥0 .
Throughout this section, we fix r and t, and we write ∆ b as a shorthand for ∆ r,t b .Before proving Proposition 4.1, we need to establish the following lemma about the jumps of Landau step functions.
Furthermore, if b is large enough, then the distance between any two distinct jumps of ∆ b is greater than or equal to 1/b.Proof.-Let us first give a useful expression for ∆ b .For all i and j, we recall that α i = r i /s i and β j = t j /u j .We also set c i := gcd(r i , s i , b), d j := gcd(t j , u j , b), and (4.1) We observe that i ∈ V b if and only if δ b (r i , s i , •) is not the zero function, while j ∈ W b if and only if δ b (t j , u j , •) is not the zero function.It follows that (4.2) Since b/c i is coprime to d(α i ) and b/d j is coprime to d(β j ), we infer from Lemma 3.7 that By Equality (4.2), we first deduce that ∆ b (1) = i∈V b c i − j∈W b d j , and then that for every integer k.This proves the first part of the lemma.
Proof of Proposition 4.1.-We first infer from (2.14) and (3.10) that Assertion (ii) implies Assertion (i).Now, we assume that Assertion (i) holds and we prove Assertion (ii).By ( 4.2.Related criteria for negative arguments.-It is easy to deduce from Proposition 4.1 a criterion for the q-integrality of the sequence (Q r,t (q; −n)) n≥0 .Indeed, for every integer n, we have Q r,t (q; n) = Q t ′ ,r ′ (q; −n) (assuming that both terms are well-defined), where r ′ and t ′ are respectively obtained from r and t by replacing each pair (r, s) in r or t by (r − s, −s).By Lemma 3.9, for every positive integer b, we have Combining Lemma 4.3 and Proposition 4.1, we obtain that the following two assertions are equivalent.
(i) There exists C(q) ∈ Z[q] \ {0} such that, for every n ∈ Z ≤0 , C(q) n Q r,t (q; n) belongs to Z[q −1 , q]. (ii) For all but finitely many positive integers b, ∆ r,t b is non-negative on R ≤0 .A natural question is then to ask whether it is possible to find a non-zero rational fraction C(q) in Q(q) such that C(q) n Q r,t (q; n) is a polynomial for positive and negative n simultaneously.The main problem is that the numerator of C(q) will bring new denominators for negative n and vice versa.It turns out that this problem can be overcome only in the special case where Q r,t (q; n) ∈ Z[q −1 , q] for all integers n.Proposition 4.5.-Let us assume that (Q r,t (q; n)) n∈Z is a well-defined family.Then the three following assertions are equivalent.
q] and all but finitely many positive integers b, ∆ r,t b is 1-periodic.
Proof.-Let us first prove that (i) implies (iii).If we assume (i), then, by the above criteria, for every large enough positive integer b, ∆ b is non-negative on R. By Lemma 4.3, we obtain that ∆ b (1) = 0 and that ∆ b is 1-periodic.Even for small positive integers b, we have where V b , W b , c i and d j are defined as in (4.1).The latter only depend on the congruence class of b modulo d r,t .Hence ∆ b (1) = ∆ b+ld r,t (1), while ∆ b+ld r,t (1) = 0 for l large enough.It follows that ∆ b (1) = 0 and ∆ b is 1-periodic for every positive integer b.In particular, if ∆ b (n/b) < 0 for some positive integers n and b, then there exists a negative integer m such that ∆ b (m/b) < 0. In this case, both the φ b -valuation of Q r,t (q; n) and Q r,t (q; m) are negative, which contradicts (i).It follows that, for every n ∈ N, Q r,t (q; n) ∈ Z[q −1 , q] and (iii) is proved.Now, let us prove that (iii) implies (ii).If (iii) holds, then, reasoning as above, we get that ∆ b is 1-periodic for all positive integers b.For all positive integers n and b, we have Obviously, (ii) implies (i) by choosing C(q) = 1, which ends the proof of the proposition.

4.3.
Small digression on the step function ∆ r,t b .-In this section, we use Proposition 3.3 to simplify the expression of ∆ b (x) when b is large enough.To that end we introduce some additional notation.We continue with the notation introduced in (4.1) and we let n α be defined as in Proposition 3.3.We define a r,t as the maximum of the numbers gcd(r i , s i ) and gcd(t j , u j ) for all i and j.We set n r,t := max{n α : α in α or β} and b r,t := a r,t • n r,t .
Let b ≥ b r,t be a fixed integer.For every i ∈ V b and j ∈ W b , there exist positive integers e i and f j such that be i ≡ c i mod s i and bf j ≡ d j mod u j .

Now, take for example
So we can apply Proposition 3.3 to obtain that D b/c i (α i ) = e i α i if α i / ∈ Z ≤0 and 0 otherwise.Let us consider a slight modification of the function • defined for every x ∈ R by , then e i is invertible modulo s i /c i which is a denominator of α i .It follows that e i α i ∈ Z ≤0 if and only if α i ∈ Z ≤0 .Hence, we deduce from (4.2) that, for all b ≥ b r,t and all x ∈ R, ∆ b (x) is equal to Let d r,t be the least common multiple of the integers s 1 , . . ., s v , u 1 , . . ., u w .If in addition b is coprime to d r,t , then all the numbers c i and d j are equal to 1. Let a in {1, . . ., d r,t } be such that ab ≡ 1 mod d r,t .Then, for all i and j, we can take e i = f j = a, so that Moreover, if all the numbers α i and β j belong to (0, 1], then we have which only depends on the congruence class of b modulo d r,t .

Efficient criteria for q-integrality of basic hypergeometric sequences
To verify the second assertion in Proposition 4.1 and in Corollary 4.2, we need in principle to perform infinitely many tests, checking the non-negativity of the step function ∆ r,t b on R ≥0 for all sufficiently large integers b.This is not entirely satisfactory and the aim of Theorem 1.3 is precisely to reduce the situation to a finite number of similar tests.In this section, we introduce the step functions Ξ r,t (b, •), b ∈ {1, . . ., d r,t }.Then we prove Theorem 1.3.

5.1.
A generalization of Christol step functions.-Following Christol [11], we define a total order on R as follows.For all real numbers x and y, we set x y ⇐⇒ ( x < y or ( x = y and x ≥ y)) .
For every b ∈ {1, . . ., d r,t }, we define the step function Ξ r,t (b, •) as follows.For all i ∈ {1, . . ., v} and j ∈ {1, . . ., w}, we set c i := gcd(r i , s i , b) and d j := gcd(t j , u j , b).We consider, as in (4.1), the sets of indices As we already observed in Section 4.3, for every i ∈ V b and j ∈ W b , there exist positive integers e i and f j such that be i ≡ c i mod s i and bf j ≡ d j mod u j .
For all i, j, we choose such integers e i and f j .We stress that the definition of Ξ r,t (b, •) (see Definition 5.1) does not depend on this choice.Let b be the greatest divisor of b coprime to d r,t and let a be the unique element of {1, . . ., d r,t } satisfying a b ≡ 1 mod d r,t .
Definition 5.1.-For every integer b in {1, . . ., d r,t }, we define the step function Ξ r,t (b, •) : R → R by: 5.2.Comparison with the step functions ξ α,β (a, •) and ∆ r,t b .-The functions Ξ r,t (b, •) can be thought of as a generalization of the functions ξ α,β (a, •) to composite numbers b.Indeed, if we assume that b is coprime to d r,t and that all the ratios α i = r i /s i and β j = t j /u j belong to Q \ Z ≤0 , we claim that Ξ r,t (b, •) = ξ α,β (a, •) where ab ≡ 1 mod d r,t .
Let us prove this claim.If b is coprime to d r,t , then b = b, all the numbers c i and d j are equal to 1, V b = {1, . . .v}, W b = {1, . . ., w}.Hence, for all i and j, we can choose e i = f j = a.Moreover, for all (i, k) ∈ V b × {0, . . ., c i − 1}, we have k = 0. We obtain that Similarly, for all (j, ℓ) ∈ W b × {0, . . ., d j − 1}, we have By (5.1), we get that Let us now compare the step functions Ξ r,t (b, •) and ∆ r,t b .Using Equality (4.2), we can give a new expression for ∆ r,t b (restricted on [0, 1]) which is closer to the definition of the step function Ξ r,t (b, •).Indeed, for every positive integer b and every real number x in [0, 1], we Set c i := gcd(r i , s i , b) and let us assume that there exists an integer e i , 1 ≤ e i ≤ d, such that be i ≡ c i mod s i .Let k i be an integer in {0, . . ., c i − 1} and a be a positive integer.Set Then we have Remark 5.3.-Contrary to what the notation of Lemma 5.2 may suggest, we stress that the latter applies to compare the ordering of both the jumps with positive and negative amplitude of the step functions Ξ r,t (b, •) and ∆ r,t b .
Even when b ≥ b r,t , Formula (4.4) shows that the Landau functions ∆ r,t b depend in principle on b and not only on the congruence class of b modulo d r,t .In contrast, Lemma 5.2 shows that for sufficiently large b, the ≤-ordering of the jumps of ∆ r,t b on [0, 1] is the same as the -ordering of that of Ξ r,t (b, •) on R, where b is the unique representative in {1, . . ., d r,t } of b modulo d r,t .In particular, this ordering only depends on the congruence class of b modulo d r,t .

Now, assume that Γ
Lemma 5.4.-Let r = ((r 1 , s 1 ), . . ., (r v , s v )) and t = ((t 1 , u 1 ), . . ., (t w , u w )) be two vectors with integer coordinates such that, for all (i, j), s i u j = 0 and the ratios r i /s i and t j /u j do not belong to Z ≤0 .Then the two following assertions are equivalent.
(i) For all but finitely many b, ∆ r,t b is non-negative on R ≥0 .(ii) For every b ∈ {1, . . ., d r,t } and all x ∈ R, we have Ξ r,t (b, x) ≥ 0.
The amplitude of such a jump is equal to the multiplicity of the corresponding element in J + b .Similarly, ∆ b has a jump of negative amplitude at each element of the multiset On the other hand, let b denote the unique representative of b in {1, . . ., d r,t } modulo d r,t and let us consider the multisets By Lemma 5.2, the support of J b := J + b ∪ J − b has also cardinality µ.Let Γ 1 ≺ • • • ≺ Γ µ and taking r and t such that Q r,t (q; n) = (q r 1 ; q s 1 ) n • • • (q rv ; q sv ) n (q t 1 ; q u 1 ) n • • • (q tw ; q uw ) n , with r i /s i = α i and t j /u j = β j , Lemma 5.2 ensures the existence of a constant c r,t such that, for every integer b coprime to d r,t and larger than c r,t , we have v φ b (Q r,t (q; n)) = ∆ r,t b (n/b) ≥ 0 .Indeed, for b > c r,t , Lemma 5.2 shows that the ≤-ordering of the jumps of ∆ r,t b on [0, 1] is the same as the -ordering of the ones of Ξ r,t (b, •) on R, where b is the unique representative in {1, . . ., d r,t } of b modulo d r,t .In particular, ∆ r,t b is non-negative on R ≥0 as expected.Hence the denominator of Q r,t (q; n) could only contain cyclotomic polynomials φ b (q) with b ≤ c r,t or b not coprime to d r,t .The situation with such numbers b is much more complicated and strongly depends on the gcd's of the pairs (r i , s i ) and (t j , u j ).
Let us first consider the case where gcd(r i , s i ) = 1 and gcd(t j , u j ) = 1 for all i and j.Let b ∈ {1, . . ., d r,t }, b be the greatest divisor of b coprime to d r,t , and let a be the unique integer in {1, . . ., d r,t } satisfying a b ≡ 1 mod d r,t .Then, following the notation of Section 5.1, we find c i = d j = 1, so that Hence each "classical" jump occurring at aα i (by this, we mean the jumps occurring when b is coprime to d r,t ) either disappears because b is not coprime to s i , or is replaced by a jump at e i α i − ⌊1 − aα i ⌋ when b is coprime to s i .Even in this particular case, we already understand that the new step functions can behave in a very different way than the classical ones.
On the other hand, we have (6.1)(q; q 3 ) n (q 2 ; q 3 ) n (q; q 2 ) n (q; q) n • (q 3 ; q 3 ) n (q 2 ; q 2 ) n = 3n 2n q ∈ Z[q] , which shows that the corresponding q-hypergeometric sequence is obviously q-integral.In order to understand the effect of the extra factors (q 3 ; q 3 ) n and (q 2 ; q 2 ) n , we have to investigate the case where gcd(r i , s i ) = 1.
When gcd(r i , s i ) = 1, we possibly have c i = gcd(r i , s i , b) = 1.In this case, either gcd(s i , b) = c i and the "classical" jump at aα i disappears, or there is an integer e i satisfying be i ≡ c i mod s i and the jump at aα i splits into c i distinct jumps at Let us now return to (6.1) and consider the case where b = 3 .Then, we find that c 3 = 3, V 3 = {3}, and e 3 = 1.This yields jumps with amplitude +1 at all elements of the (multi)set J + 3 = {{1/3, 2/3, 1}}.On the other hand, we have W 3 = {1, 2, 3} and f 1 = f 2 = f 3 = 1, which yields jumps with amplitude −1 at all elements of the multiset J − 3 = {{1/2, 1, 1}}.In the end, we get that (6.2) with m 1 = 1, m 2 = −1, m 3 = 1, and m 4 = −1.It follows that the step function Ξ(3, •) is non-negative on R, as expected.
Given two vectors e := (e 1 , . . ., e v ) and f := (f 1 , . . ., f w ) whose coordinates are positive integers, we define as in [22] the q-analog of the factorial ratio Q e,f (n) as We deduce from (6.3) that Q e,f (q; n) = is the classical Landau function, as defined in (1.1).We easily obtain that Q e,f (q; n) is qintegral if and only if ∆ e,f is non-negative on [0, 1].Note that these properties are also equivalent to the fact that Q e,f (q; n) ∈ Z[q] (see also [22] where a positivity conjecture of the coefficients of these polynomials is proposed).It is therefore much more efficient to work with ∆ e,f than to compute the corresponding Christol functions.The example given in (6.1) corresponds to e = (3) and f = (2, 1), so that ∆ e,f (x) = ⌊3x⌋ − ⌊2x⌋ − ⌊x⌋ .

3. 1 .
A generalization of Dwork maps.-We first extend the definition of the Dwork map D p , replacing the prime number p by an arbitrary positive integer b.For every rational number α, we let d(α) denote the exact positive denominator of α, that is d(α) := min{d ∈ N : α = a/d, a ∈ Z} .Hence d(α) = 1 if and only if α is an integer.We also let n(α) denote the numerator of α, that is the unique integer such that α = n(α)/d(α).For every positive integer b, we consider the multiplicative set S b := {k ∈ Z : gcd(k, b) = 1}.We let S −1 b Z ⊂ Q denote the localization of Z by S b , that is the ring formed by the rational numbers α such that d(α) belongs to S b .Proposition-definition 3.1.-Let b be a positive integer and α be in S −1 b Z.There is a unique element D b (α) of S −1 b Z such that (3.1) bD b (α) − α ∈ {0, . . ., b − 1} .

Remark 3 . 2 .
-Note that the map D b is only defined from S −1 b Z into itself.When b = 1, S −1 b Z = Q and D 1 is just the identity map of Q.In fact, not only D b (α) ∈ S −1 b Z, but, more precisely, Equation (3.2) shows that D b (α) ∈ 1 d(α) Z. Proof.-Let us first assume by contradiction that D b (α) is not unique, and let θ 1 > θ 2 be two distinct elements of S −1 b Z satisfying Equation (3.1).It would yield b ≥ 2 and b(θ 1 − θ 2 ) ∈ {1, . . ., b − 1}.Therefore we would have θ 1 − θ 2 / ∈ S −1 b Z, which would provide a contradiction since S −1 b Z is a ring.Hence D b (α) is unique.Now we prove the existence of D b (α) while establishing (3.2).Since, by assumption, α belongs to S −1 b Z, we have gcd(d(α), b) = 1, and integers a such that ab ≡ 1 mod d(α) do exist.Let a be such an integer and set

Lemma 4 . 3 .
-For every integers k and b ≥ 1, and every real number x, we have

Remark 4 . 4 .
-By Lemma 4.3, ∆ b is non-negative on R ≥0 if and only if ∆ b is non-negative on [0, 1].In addition, when b is coprime to d r,t , then ∆ b (1) = v − w and Assertion (ii) of Proposition 4.1 implies that v ≥ w.
, there exists a positive integer m such that, for every non-negative integer n and every integer b ≥ m, we have ∆ b (n/b) ≥ 0. By Lemma 4.3, we can assume that m is such that, for b ≥ m, the distance between any two distinct jumps of ∆ b is greater than or equal to 1/b.It follows that ∆ b is non-negative on R ≥0 for all b ≥ m, as wanted.

5. 3 .
Ordering of jumps.-The interest of the step-functions Ξ r,t (b, •) is that they keep track of all jumps configurations of the Landau functions ∆ r,t ℓ for large ℓ congruent to b modulo d r,t .More precisely, we have the following result.Lemma 5.2.-For every i ∈ {1, 2}, we let r i and s i be integers with s i = 0 and such thatα i := r i /s i / ∈ Z ≤0 .Set d := lcm(s 1 , s 2 )and let b be an integer such that b > max |r 1 |, |r 2 |, d • |⌊1 − α 1 ⌋ − ⌊1 − α 2 ⌋| .
b≥2, b|n φ b (q) ∆ e,f (n/b) , where ∆ e,f (x) = and c i divides both r i and s i , we have b i > |n(α i )| and hence b i ≥ n α i .By Proposition 3.3, we have D b i (α i ) = e i α i for α i / ∈ Z ≤0 , so that(5.3)