# Construction of Congruence Homomorphisms

In this section, $K$ is a finite degree extension of $F(x_1, \ldots, x_m)$, where $F$ is $Q$, a number field, or a finite field. Also $m \geq 0$ if char $F$ = 0, and $m > 0$ otherwise.

## `CongruenceImage(G : parameters): GrpMat -> GrpMat, HomGrp, []`

```magma
Virtual  : BoolElt                      Default: false
Prime    : RngIntElt                    Default: 3
Limit    : RngIntElt                    Default: 10
ExtDegree: RngIntElt                    Default: 1
```

If $G$ is a finitely generated subgroup of ${\operatorname{GL}}(n, K)$, then $G$ has a normal subgroup $N$ whose torsion elements are unipotent; so $N$ is torsion-free if $K$ has characteristic 0.

This function constructs a *congruence homomorphism* from $G$ into ${\operatorname{GL}}(n, {\bf F}_{q})$ for some prime power $q$; its kernel is $N$. If char $K$ is positive, then ${\bf F}_{q}$ has the same characteristic.

For a detailed description of the congruence homomorphisms see [[Detinko *et al.*, 2013](../../references.md#cite-recog), Section 3]. The function returns the congruence image $H$, the congruence homomorphism, and the list of images of generators of $G$.

If the optional parameter `Virtual` is set to `true` then the congruence homomorphism satisfies additional properties [[Detinko *et al.*, 2011](../../references.md#cite-tits)]. In particular it can be used to test whether $G$ satisfies the “virtual” properties described in Section [Deciding Virtual Properties of Linear Groups](virtual_tests.md#virtual).

The optional parameter `Prime` applies if $K$ has characteristic 0: if `Prime` is positive, then it is a lower bound for the characteristic of the congruence image; if it is 0 then the function returns a congruence image defined over a field of characteristic 0.

The optional parameter `Limit` applies to groups defined over (rational) function fields. If char $K > 0$, then we consider extensions of $F$ to degree `Limit` only; otherwise we examine tuples in the ring of integers mod `Limit`.

The optional parameter `ExtDegree` applies to groups defined over (algebraic) function fields of positive characteristic: we construct a congruence image over an extension of (at least) this degree of coefficient field.
