Computing the Zariski closure of a subgroup of SL(n,Z) Suppose $\Gamma$ is a finitely generated subgroup of $SL(n,\mathbb{Z})$, given as a list of generators. We would like to (somewhat efficiently) try to compute the Zariski closure of $\Gamma$, which is a (real) algebraic group. The method should be computer assisted but rigorous. 
In the cases we are considering, $\Gamma$ will usually be Zariski dense in $SL(n,\mathbb{R})$,      so the algorithm we are looking for should be optimized for that case. Also we would like just to know the answer, so having the program run forever if $\Gamma$ is not Zariski dense in $SL(n,\mathbb{R})$ is fine for us: we will just analyze that example further. 
We can probably come up with some ad-hoc method for doing this, but I was wondering if anyone on MO has some interesting ideas or references. 
 A: If you expect the subgroup to be Zariski-dense, there is a simple algorithm which works most of the time: compute the modular projection modulo a set of $m.$ If the projection is onto for any $m > 3,$ the subgroup is Zariski dense (This is a theorem of  T. Weigel -- I think there is a weaker version due to Alex Lubotzky: Lubotzky, Alexander(IL-HEBR)
One for almost all: generation of SL(n,p) by subsets of SL(n,Z). Algebra, K-theory, groups, and education (New York, 1997), 125–128, 
Contemp. Math., 243, Amer. Math. Soc., Providence, RI, 1999. 
20G30 ). To check that the modular projection is onto is not trivial, and really depends on where you get your groups. In many cases you can use Zalesskii-Serezhkn's characterization (if the generators are transvection), or something like Chris Hall's theorem should work for $SL(n)$ (Hall, Chris(1-MI)
Big symplectic or orthogonal monodromy modulo l. (English summary) 
Duke Math. J. 141 (2008), no. 1, 179–203.  -- he treats the symplectic case, but the SL case should not be harder, there you just need irreducibility and the normalizer to contain a transvection). In general, there is the Neumann-Praeger algorithm to see if a set of matrices generate $SL(n, p)$ -- there may be better algorithms implemented in Magma (for Neumann-Praeger, see the paper by these authors).
A: An algorithm which computes the Zariski closure of a finitely
generated matrix group is available in H. Derksen, E. Jeandel, P.
Koiran `Quantum automata and algebraic groups', Journal of
Symbolic Computation 39 (2005) 357–37.
Note that there are some inaccuracies in the paper (e.g. the
statement of Theorem 11).
A: In fact, the last word on this is my recent paper; but the punchline is that the subgroup is Zariski-dense if and only if there are two non-commuting elements, such that the Galois group of the characteristic polynomial of one of them is the full symmetric group.
A: This is going to be too long for a comment but not really an "answer". Suppose for example that the Zariski closure is connected and that $\Gamma$ is torsion free (this can be achieved by passing to a finite index subgroup of the finitely generated group $\Gamma$, but I do not know how to do it algorithmically). Given a generator $\theta $ of infinite order, take the Zariski closure $C(\theta)$ of the group generated by $\theta$; this is an abelian infinite Zariski closed  subgroup and hence determines an element $X$ in the Lie algebra. You can take the smallest module in the Lie algebra generated by conjugates of $X$ by elements $w$ of $\Gamma$; since you are dealing with a finite dimensional space, you need only look at finitely many words $w$ in the generators. This gives the Lie algebra of the Zariski closure, and the corresponding Lie group should be the Zariski closure. 
