# Equations and random subgroups in compact groups

EDIT: Here is a more specific question.

Let $G$ be a compact group and let $w$ be a word in $d$ variables. Then the solution set $S$ of the equation of $w=1$ is a closed subset of the product $G^d$ of $d$ copies of $G$; we equip $G^d$ with Haar measure $\mu$. Suppose that $\mu(S) > 0$. Does it follow that $S$ has non-empty interior?

(N.B. there are closed subsets of compact groups with positive measure and empty interior, e.g. you can put a fat Cantor set in the circle group; I just don't know if they can be solution sets of group equations.)

===============================

Let $G$ be a compact group (I am mainly interested in the profinite case). Pick a sequence of $d$ elements (where $d$ is either finite or $\omega$) independently at random (w.r.t. Haar measure) and look at the subgroup $\Gamma_d$ they generate. What can we say about $\Gamma_d$ almost surely, or at least with positive probability?

One context I've seen this question is with random finite generation of profinite groups: for a large class of topologically finitely generated profinite groups (including for instance all such groups that are pro-soluble), there exists $d$ such that $\Gamma_d$ is dense with positive probability. So we could condition on this and ask about properties of random dense $d$-generator subgroups. More generally, if $G$ is second-countable then $\Gamma_{\omega}$ is almost surely dense (since the generating set is almost surely dense). This doesn't say much about what $\Gamma_d$ looks like as a group, though.

It seems to me a natural tool to study $\Gamma_d$ is words/equations. Specifically, if $E$ is the set of word maps whose kernel in $G^{\omega}$ has measure $0$, then the generators will almost surely fail to satisfy any equation in $E$. If $E$ is all word maps that are not trivial on free groups, then $\Gamma_{\omega}$ is almost surely free. I suspect this covers quite a large class of profinite groups, giving a probabilistic argument for the existence of dense free subgroups (which may be difficult to construct explicitly from a profinite presentation).

What happens with equations where the solution set has positive measure? Do we have a 0-1 law for the probability that a variety contains a finite-index subgroup of $\Gamma_d$?

I am mainly looking for examples of previous work here, as I am sure someone else has had this idea before.