Zariski density and computing with $S$-integral groups

We generalize our methodology for computing with Zariski dense subgroups of $\mathrm{SL}(n, \mathbb{Z})$ and $\mathrm{Sp}(n, \mathbb{Z})$, to accommodate input dense subgroups $H$ of $\mathrm{SL}(n, \mathbb{Q})$ and $\mathrm{Sp}(n, \mathbb{Q})$. A key task, backgrounded by the Strong Approximation theorem, is computing a minimal congruence overgroup of $H$. Once we have this overgroup, we may describe all congruence quotients of $H$. The case $n=2$ receives particular attention.


INTRODUCTION
In [4,5,6], we developed a methodology for computing with finitely generated Zariski dense subgroups of SL(n, Z) and Sp(n, Z). Our goal now is to generalize this earlier work to handle dense subgroups of SL(n, Q) and Sp(n, Q). We are motivated by applications that involve representations over Q rather than Z. For example, when computing with G ≤ Sp(n, Z), a change of basis is sometimes needed, replacing G by a conjugate in Sp(n, Q); cf. [3].
Let H be a finitely generated subgroup of GL(n, Q). Then H ≤ GL(n, R) where R is a localization Z[1/µ] of Z for some positive µ ∈ Z. Often we take R to be the subring R H of Q generated by the entries of h and h −1 as h runs through a finite generating set for H. Linear groups over Z can be quite different to those over R. As one instance: if µ > 1 then SL(2, R) has the congruence subgroup property (CSP), while SL(2, Z) does not [16,18,21].
For a commutative ring D with 1, let Γ(n, D) denote SL(n, D) or Sp(n, D); if D is the finite field F q of size q, then we write Γ(n, q). Let S = {1/p 1 , . . . , 1/p k } where the p i are the distinct prime divisors of µ > 1. Then R = Z[S] and we call H ≤ Γ(n, R) an Sintegral group. If H has finite index in Γ(n, R), then it is S-arithmetic. Each non-zero ideal I ⊂ R is principal: I = mR for a unique positive integer m coprime to µ. The congruence homomorphism modulo I (namely, the reduction modulo m map) is denoted ϕ m . Thus ϕ m maps R onto Z m := Z/mZ, and by entrywise extension we get a homomorphism Γ(n, R) → Γ(n, Z m ), denoted ϕ m as well. The kernel Γ n,m of ϕ m on Γ(n, R) is the principal congruence subgroup (PCS) of level m. Observe that Γ n,a Γ n,b = Γ n,d and Γ n,a ∩ Γ n,b = Γ n,l where d = gcd(a, b), l = lcm(a, b). A subgroup of Γ(n, R) that contains a PCS is a congruence subgroup. The foregoing terminology and notation may be used for coefficient rings other than Z[S]; e.g., if r and m are positive integers with r dividing m, then ϕ r on Z m is the reduction modulo r map. Throughout, F stands for an arbitrary field, and 1 m , 0 m denote the m × m identity and zero matrices, respectively.
Our main algorithms accept subgroups H ≤ Γ(n, R) that are Zariski dense in Γ(n, C). Algorithms to test density are discussed in [6]. Another input item is the set Π(H) of all primes p ∈ Z such that ϕ p (H) = Γ(n, p). Since H is dense in Γ(n, R), the set Π(H) is finite (by the Strong Approximation theorem [15,Window 9]). See [4,5,6] for algorithms to compute Π(H).
Section 2 focuses on computing the level of H. We generalize the notion of arithmetic closure as in [6] to that of congruence closure cl(H), which exists for any dense H ≤ Γ(n, R). Then we show how to compute the (level of the) unique maximal PCS of Γ(n, R) in cl(H), thereby determining cl(H). Section 2 also provides a thorough treatment of the case n = 2, omitted from [6]. We are then able to compute congruence quotients of H modulo all ideals of R and for all n ≥ 2.
Section 3 reports on experiments performed with our GAP [8] implementation of the main algorithms. To emphasize the utility of such experimentation, we include the solution of a problem originating from further afield in linear group theory.

COMPUTING THE LEVEL OF A DENSE S-INTEGRAL GROUP
Let R = Z[1/µ] for a positive integer µ. If n > 2, or R = Z, then Γ(n, R) has the CSP: the S-arithmetic subgroups of Γ(n, R) are exactly its congruence subgroups.
In [6, §3.3], we defined the arithmetic closure of a dense group in Γ(n, Z), n > 2. As an intersection of congruence subgroups, the arithmetic closure is also called an extended congruence subgroup [22]. We now broaden this concept to congruence closure of any dense group in Γ(n, Q), n ≥ 2. Thereafter we devise algorithms to compute the closure.
If n ≥ 2 then much of [6, §2] carries over from Z to R without complication, simply by avoiding the primes that divide µ; see Section 2.1. We deal with degree 2 specifically in Section 2.2.
2.1. General degree. Let H be a finitely generated dense subgroup of Γ(n, Q) for n ≥ 2, and let R = R H .    As a congruence subgroup, cl(H) contains a largest PCS; let its level be ℓ. Hence cl(H) = Γ n,ℓ H. Furthermore, Γ n,m ≤ cl(H) if and only if ℓ | m. We say that H itself has level ℓ. Proof. Let Γ(n, Q) = SL(n, Q); the proof for Γ(n, Q) = Sp(n, Q) is similar.
Let t ij (a) be the elementary matrix with 1s down the main diagonal, a in off-diagonal position (i, j), and 0s elsewhere. Suppose that p ∈ Π(H) does not divide the level ℓ of H. Then ϕ p (Γ n,ℓ ) contains t ij (1) = ϕ p (t ij (ℓ)) k where k ≡ ℓ −1 mod p. Since the t ij (1) generate SL(n, p), we get ϕ p (cl(H)) = ϕ p (HΓ n,ℓ ) = SL(n, p). The calculation of Π(H) incorporates a test on certain δ H -values; see Theorem 2.9. We call 2 an 'exceptional' prime, because when 2 ≤ n ≤ 4, the arithmetic group H could have even level yet surject onto Γ(n, 2) modulo 2. However, 2 is the single potential disparity between Π(H) and Π(H) when 2 < n ≤ 4. As we will see, new exceptional primes occur when n = 2.
We refer to [6, §2.4.2] for an explanation of the procedure LevelMaxPCS to compute the level ℓ of an arithmetic group H ≤ Γ(n, Z), n > 2. Apart from (a generating set for) H, the other input is a set of primes: in practice, Π(H). Below, we paraphrase the pseudocode for LevelMaxPCS from [6, p. 975].

LevelMaxPCS(S, Ω)
INPUT: a generating set S for a subgroup H ≤ Γ(n, Q); a set Ω of primes. OUTPUT: an integer r.
For each p ∈ Ω let ν p = 1 and z p = r∈Ω,r =p r.
increment ν p by 1 and repeat.
Proof. This is almost identical to the proof of [6, Theorem 2.22].
Remark 2.7. We obtain a generating set for cl(H) if we know a generating set for each PCS in Γ(n, R); cf. [20]. The computation of π(ℓ) is a separate endeavor, undertaken before running LevelMax-PCS. As noted, in practice π(ℓ) will be input as Π(H). The latter is defined for n = 2 in Section 2.2. We confirm that Π(H) = π(ℓ) by combining Theorems 2.9 and 2.15.
Proof. It is straightforward to check that the proof of [6, Theorem 2.17], for arithmetic H ≤ Γ(n, Z), carries over to the present setting. . We point out that the condition 'q > 3 odd' in this lemma is redundant (i.e., it should be changed to 'q > 1').
LevelMaxPCS enables us to describe all congruence quotients of H ≤ Γ(n, R), i.e., the congruence images ϕ m (H) = ϕ m (cl(H)) for m coprime to µ; the procedure PrimesFor-Dense [6, §3.2] (which accepts a transvection in H and a generating set for H) furnishes all congruence quotients modulo maximal ideals of R. To expand on the former comment, we take H to be a congruence subgroup, of level ℓ. Let a = gcd(m, ℓ), so m = abc where π(b) ⊆ π(a) and gcd(c, a) = gcd(c, ℓ) = 1. Then ϕ m (H) is isomorphic to a subgroup of Γ n,a /Γ n,m × Γ n,c /Γ n,m . Moreover, the first factor in this decomposition has a normal subgroup isomorphic to Γ(n, Z c ) that splits off ϕ m (H). Hence we may further assume that π(m) ⊆ π(ℓ). The congruence quotient HΓ n,a /Γ n,m is then an extension of the PCS of level a in Γ(n, Z m ) by ϕ a (H).
Knowing the level of a congruence subgroup H ≤ Γ(n, R), we can solve other problems for H, such as calculating |Γ(n, R) : H|, and testing membership of g ∈ Γ(n, R) in H (cf. Grunewald and Segal's 'explicitly given' arithmetic Q-groups [7, §3.1]).

Degree 2.
In this subsection, R = Z[1/µ], µ a positive integer, and Γ = SL(2, R). For an integer m > 1 coprime to µ, we denote the PCS ker ϕ m of level m in Γ by Γ m .
Let H ≤ Γ be dense (and finitely generated). As always, cl(H) denotes the congruence closure of H in Γ, with the standard assumption R = R H . The S-arithmetic closure of H in Γ is contained in cl(H), and they can differ only when R = Z.
Our major result for degree 2 is the new specification of the input Π(H) to LevelMaxPCS (otherwise, the operation of this procedure remains entirely the same). We isolate 2, 3, 5 as exceptional primes: 2 and 3 because SL(2, Z p 2 ) for p ∈ {2, 3} has proper supplements to its PCS of level p, and 2, 3, 5 because there can be non-trivial subdirect products of SL(2, Z p ) with subgroups of SL(2, Z r ) for p ∈ {2, 3, 5} and prime r = p. (To reiterate: in degrees greater than 2, only 2 can be an exceptional prime, and then only in degree 3 or 4.)  . Let a, k be positive integers, and let p > 5 be a prime not dividing k. Suppose that U ≤ SL(2, Z p a k ) maps onto SL(2, Z p a ) under the projection ϕ p a of SL(2, Z p a k ) ∼ = SL(2, Z p a ) × SL(2, Z k ) onto its first factor. Then U contains SL(2, Z p a ).
Proof. By hypothesis, U is a subdirect product of A = SL(2, Z p a ) with B = ϕ k (U ), i.e., U ≤ A × B and the component projections of AB onto A and B restricted to U are both surjective. We prove that B ≤ U ; then A ≤ U = A × B.
Suppose that k = r b for a prime r. If B ≤ U then A and B have isomorphic nontrivial quotients. By Lemma 2.11, any non-trivial quotient of A has a quotient isomorphic to PSL(2, p); so r > 3 and PSL(2, p) is a section of ϕ r (SL(2, Z k )) = SL(2, Z r ). But this contradicts Lemma 2.12.
Suppose now that k = r b s where r is a prime r not dividing s. Then ϕ p a r b (U ) = A × ϕ r b (U ) by the previous paragraph. Therefore ϕ p a maps W := U ∩ SL(2, Z p a s ) onto A. We replace U by W , and k by s, then recurse. After exhausting all prime divisors of k, we reach a subgroup of U that contains A. Proof. Assume that ϕ p k−1 (H) = SL(2, Z p k−1 ) for some k ≥ 2, i.e., ϕ p k (H) supplements ker ϕ p k−1 in SL(2, Z p k ). Then ϕ p k (H) = SL(2, Z p k ) by [6,Theorem 2.5]. This proves that ϕ p k (H) = SL(2, Z p k ) for all k ≥ 1, by induction.
We use Theorem 2.15 to find the set E of all p ∈ {2, 3, 5} such that δ H (p) = 1 and p | ℓ.
For X = A or B, let ρ X : A × B → X be the canonical projection map. By assumption, ρ X (U ) = X. Define Suppose that U K = AB. Let a ∈ A, so a = uxy for u ∈ U , x ∈ M , and y ∈ N . Then 1 = ρ B (u)y, which implies that ρ B (u) ∈ N . Therefore ρ A (u) ∈ M . However, a = ρ A (u)x, yielding the contradiction A ⊆ M .
For each p ∈ {2, 3, 5}, it is not difficult to prove that p | ℓ if the stated condition on δ-values holds. We proceed to establish the converse.
Using the GAP package kbmag [9], it may be verified that G 1 and G 2 are thin (i.e., they have infinite index in Γ). We could not decide thinness of G 3 likewise, as the computation fails to terminate.
Relying on [17, Theorem VIII.8], Hsu [10] designed an algorithm to test whether H is a congruence subgroup of Γ. The algorithm is applied in [10, Example 2.5], proving that a certain subgroup of index 10 in Γ is not a congruence subgroup. Indeed, running LevelMaxPCS on this subgroup shows that it has level 1.
Alternatives to the approach in [10] are possible. If we have a membership test and a generating set for each PCS in Γ, then we can decide whether H = cl(H). Or we can inspect finite quotients of H. If H has a simple finite quotient not isomorphic to a subgroup of any SL(2, p), then H is not a congruence subgroup (in [4, §4.2.4], we used this property to justify thinness of subgroups of SL(3, Z)).

EXPERIMENTATION
We discuss experiments conducted with a GAP implementation of the main algorithms. Examples were chosen to demonstrate practicality of the algorithms. Our GAP code is available at https://github.com/hulpke/arithmetic.
Here we limited the selection of parameters in test groups. Longer tables are posted at https://www.math.colostate.edu/˜hulpke/examples/Sintegral.pdf.
For s ∈ Q, let G s = T, K s where 1 . According to [17,Theorem VIII.16], G s = T * K s ∼ = C 2 * C 3 ∼ = PSL(2, Z) is a discrete subgroup of SL(2, R). If s = 1 then G s is thin in SL(2, R). Since G s , G t are GL(2, R)-conjugate only if s = t, the G s are pairwise isomorphic non-conjugate subgroups of SL(2, R).
We ran LevelMaxPCS to compute the level ℓ s of various G s . Then we computed the index |SL(2, Z ℓs ) : ϕ ℓs (G s )| of cl(G s ) in SL(2, R); see Table 1. Despite the large indices, runtimes were negligible.  Since b(s) is a transvection, we can compute Π(H 4 (t, s)) via PrimesForDense. Table 2 displays the level of H 4 (t, s) and the index of its congruence closure in the ambient linear algebraic group Sp(4, R). 3.2.2. SL(4, R). We compute the level of H 4 (t, r) and then |SL(4, R) : cl(H 4 (t, r))|. A sample of this data is compiled in Table 3. Runtimes were negligible. However, computing Π(H 4 (t, r)) is slow, as we do this via the algorithm PrimesNonSurjectiveSL from [5, §4]. This tests irreducibility of an adjoint representation.
If k ∈ Q then H 3 (k) is a thin subgroup of SL(5, R). As usual, we compute the level and index for the congruence closure of several H 3 (k): see Table 4. Does there exist a profinitely dense subgroup of SL(n, Z) generated by two elements?
We answer this question affirmatively. Certain free subgroups of SL(n, Z) for n ≥ 3 are given by Humphries in [11]. Each surjects onto SL(n, p) modulo all primes p. One such group (G 4 in [6, p. 983]) is generated by