One way of interpreting the question might be: *Is the property of being congruence a topological property? Ie, is it detected at the level of Riemann surfaces $\mathcal{H}/\Gamma$?*


My motivation is that I'm looking for an efficient algorithm to test if a given finite index subgroup of $SL\_2(\mathbb{Z})$ is congruence.


The best algorithm I'm aware of is [Hsu's algorithm](http://www.ams.org/journals/proc/1996-124-05/S0002-9939-96-03496-X/S0002-9939-96-03496-X.pdf), but this only tests if a finite index subgroup of $\text{PSL}\_2(\mathbb{Z})$ is congruence.


Given a finite index $\Gamma\le\text{SL}\_2(\mathbb{Z})$, the image of $\Gamma$ in $\text{PSL}\_2(\mathbb{Z})$ is congruence if and only if $\pm\Gamma$ is congruence. Here, $\pm\Gamma$ is the subgroup generated by $\Gamma$ and $-I$.


Let $\ell$ be the "Wolhfart level" of $\Gamma$ - that is, $\ell$ is the least common multiple of the cusp widths of $\mathcal{H}/\Gamma$. Then, a classical theorem of Wolhfart/Klein says that $\pm\Gamma$ is congruence if and only if it contains $\Gamma(\ell)$, equivalently if it contains $\pm\Gamma(\ell)$ (this theorem is actually quoted incorrectly in many sources, where the $\pm$ in $\pm\Gamma$ is ignored!!)


**The first question is:** Is testing for congruence in $\text{PSL}\_2(\mathbb{Z})$ enough? Ie, if $\pm\Gamma$ is congruence, then must $\Gamma$ be congruence?


Of course this is only relevant if $-I\notin\Gamma$, in which case $\pm\Gamma = \Gamma\times\{\pm I\}$, and $\pm\Gamma(\ell) = \Gamma(\ell)\times\{\pm I\}$. Intersecting $\Gamma$ with $\pm\Gamma(\ell)$, there are two cases:


A) If $\ell = 2$, then if $\pm\Gamma$ is congruence, it must contain $\Gamma(2) = \pm\Gamma(2)$, so $\Gamma\cap\Gamma(2)$ has index 2 in $\Gamma(2)$, with quotient an 2-torsion abelian group, but the maximal 2-torsion abelian quotient of $\Gamma(2)$ is $\Gamma(2)/\Gamma(4) = C\_2\times C\_2\times C\_2$, hence $\Gamma$ contains $\Gamma(4)$ and is congruence.


In particular, this shows that the Sanov subgroup - the index 12 subgroup of $\text{SL}\_2(\mathbb{Z})$ generated by
$$\begin{bmatrix} 1&2\\0&1
\end{bmatrix} \quad\text{and}\quad\begin{bmatrix} 1&0\\2&1
\end{bmatrix}$$
is congruence, even though the cusp widths are all 2 and it doesn't contain $\Gamma(2)$.


B) If $\ell\ge 3$, then again $\Gamma\cap\pm\Gamma(\ell)$ has index 2 inside $\pm\Gamma(\ell)$, and certainly any index 2 subgroup of $\pm\Gamma(\ell)$ can appear, and so the question reduces to:


**Reformulation of question:** For any $\ell\ge 3$, is every index 2 subgroup of $\pm\Gamma(\ell)$ a congruence subgroup?


**or equivalently:** For any $\ell\ge 3$, is the composite $\Gamma(\ell)'\Gamma(\ell)^2$ congruence? (the first is the commutator subgroup, the second is the subgroup of squares)


I don't even know of a reasonable way to computationally test this, since without Wolhfart/Klein's result, one might a priori have to test non-containment of infinitely many $\Gamma(n)$'s to prove that some $\Gamma$ is noncongruence.


Of course, if the answer is negative, then naturally one might ask:


**Is there an efficient algorithm to test whether a given finite index subgroup of $\text{SL}\_2(\mathbb{Z})$ is congruence?**



Can a index 2 subgroup of $\pm\Gamma(n)\le \text{SL}_2(\mathbb{Z})$ be noncongruence?
* For the first question: it can happen that $\pm \Gamma$ is congruence but $\Gamma$ is not; there is a beautiful paper on this phenomenon, with lots of examples, by Kiming, Schütt and Verril [here](http://onlinelibrary.wiley.com/doi/10.1112/jlms/jdq062/abstract).
* For the second question, the existence of an efficient algorithm: I set this once as a fourth-year research project to a Warwick undergrad, Tom Hamilton. Tom successfully generalised Hsu's algorithm to subgroups of SL2 instead of PSL2. You can read our paper on this [here](https://doi.org/10.1112/S1461157013000338); the algorithm is implemented in recent versions of Sage.


In fact, in Sage there is a function which, given a finite-index subgroup of SL2Z containing -1, will enumerate all index 2 subgroups of that group not containing -1 (i.e. all liftings of $\Gamma / \{\pm 1\}$ to SL2Z). Using this, one can show (for instance) that there is an index 2 subgroup of $\pm \Gamma(7)$ which is non-congruence. It's generated by the following matrices:



```
(
[-1 -7]  [-48   7]  [209 -56]  [113 -35]  [ 55 -21]  [-120   49]
[ 0 -1], [ -7   1], [ 56 -15], [ 42 -13], [ 21  -8], [ -49   20],

[-15   7]  [ 239 -140]  [113 -70]  [-232  161]  [-181  133]  [-8  7]
[-28  13], [  70  -41], [ 21 -13], [ -49   34], [ -49   36], [-7  6],

[  76 -105]  [-169  238]  [ 43 -63]  [ 309 -490]  [ 134 -217]
[  21  -29], [ -49   69], [ 28 -41], [  70 -111], [  21  -34],

[-281  476]  [-230  399]  [-15  28]  [-97 231]  [ 218 -525]
[ -49   83], [ -49   85], [ -7  13], [-21  50], [  49 -118],

[ 279 -763]  [ 22 -63]  [-118  399]  [-29 112]  [ 139 -609]  [-36 175]
[  49 -134], [  7 -20], [ -21   71], [ -7  27], [  21  -92], [ -7  34],

[-43 252]
[ -7  41]
)

```

