In this note, we deal with a construction on finite graphs due to Stallings, exposed in his article *Topology of finite graphs*, admitting some exciting recent generalizations to some graphs of groups (see Henry Wilton’s articles *Elementary free groups are subgroup separable* and *Hall’s theorem for limit groups*) or cube complexes (see Haglund and Wise’s article *A combination theorem for special cube complexes*). A next note will be dedicated to Wise’s construction for Salvetti complexes, and more generally for special cube complexes, but our main result here is:

**Main Theorem:** Finitely generated groups are subgroup separable.

**Definition:** Let be a group and be a subgroup. We say that is *separable* if, for every , there exists a finite-index subgroup containing and such that .

Moreover, if the trivial subgroup is separable, is said *residually finite *or *RF*; if every subgroups of are separable, is said *ERF* (*Extended Residually Finite*); if every finitely-generated subgroups of are separable, is said *subgroupe separable* or *LERF* (*Locally Extended Residually Finite*).

Theses definitions have topological interpretations:

**Definition:** Let be a group. Defining the set of finite-index subgroups as a fundamental system of neighborhoods of the identity element, we get the *profinite topology*. Clearly, endowed with its profinite topology, is a topological group. Moreover, a morphism between two groups endowed with their profinite topologies is automatically continuous.

**Nota Bene:** Because a finite-index subgroup always contains a normal finite-index subgroup (namely ), finite-index subgroups in the definitions of profinite topology and separable subgroup may be supposed normal.

**Lemma:** Let be a group and be a subgroup. Then is separable if and only if it is closed for the profinite topology.

**Proof.** Suppose that is separable and let . By hypothesis, there exists a finite-index subgroup containing but not containing . Then is an open set disjoint from : if there exists , then there exists such that , hence , a contradiction with . Therefore, is closed.

Conversely, suppose that is closed and let . By hypothesis, there exists an open subset, say for some normal finite-index subgroup and , containing and disjoint from . Because we chose normal, is a subgroup of ; clearly, it contains and it is a finite-index subgroup of . Furthermore, it does not contain : indeed, implies , hence , a contradiction. Therefore, is separable.

**Corollary:** A group is residually finite if and only if its profinite topology is Hausdorff.

Genarally, it is not easy to prove that a given subgroup is separable. A useful tool for that is:

**Definition:** Let be a group and be a subgroup. We say that is a *retract* if there exists a morphism (a *retraction*) such that . We say that is a *virtual retract* if it is a retract in some finite-index subgroup of .

**Lemma:** Let be a residually finite group and be a subgroup. If is a virtual retract then it is separable.

**Sketch of proof.** It is sufficient to notice that the image of a (topological) retraction in a Hausdorff topological space is closed. So let be a Hausdorff space and be a retraction. Here, we only work with finitely-generated groups so that profinite topologies are second-countable, therefore it is sufficient to show that is sequentially closed; for the more general case, the same argument works with ultrafilters.

Let be a sequence converging to some . Then, converges to . Because is Hausdorff, we deduce that . Therefore, is sequentially closed.

The construction introduced by Stallings, is the following (recall that an *immersion* is a locally injective simplicial map):

**Theorem:** Let be a finite bouquet of circles, be a finite graph and be an immersion. Just by adding edges to , it is possible to construct a covering and a retraction . Moreover, we get a commutative diagram:

We say that is the *canonical completion* and the *canonical retraction*.

Now, let us see how to conclude thanks to Stallings’ construction:

**Proof of the main theorem:** Let be a finitely generated free groups. We first prove that is residually finite in order to apply the previous lemma.

Let be a bouquet of circles satisfying ; let denote its universal covering. Now, thinking of as a non trivial loop in , let be a finite subgraph containing a lift of . Then, the fundamental group of the canonical completion is a finite-index subgroup of not containing . We just proved that is residually finite.

Now let be a finitely generated subgroup of . Because is residually finite, it is sufficient to prove that is a virtual retract to conclude that is separable.

Again, let us see as the fundamental group of a bouquet of circles and let denote the covering associated to the subgroup . If is a maximal subtree, because is finitely generated, has only finitely many edges; let be a ball containing all theses edges. Then the canonical retraction gives a retraction

so that be a retract in , and therefore a virtual rectract in .

During the proof above, the construction of an immersion with can be made directly. For example, if and :

Notice that the main theorem cannot be extended to the separability of all subgroups, ie. every non-abelian (finitely-generated) free group is not ERF: Suppose by contradiction that there exists an ERF non-abelian free group. Because any quotient of an ERF group is RF, we deduce that any two-generator group is RF, and a fortiori Hopfian. However, we already proved in a previous note that the Baumslag-Solitar group is not Hopfian.

We now turn on the proof of Stallings’ construction. The figure below illustrates an example; the reader is encouraged to keep in mind this particular case in order to visualize how the argument is simple.

**Proof of Stallings’ construction: **Because is an immersion, for any vertex and any label , there is at most one edge labelled starting from or ending at . We want to add edges to so that exactly one edge of any label start from and end at any vertex; such a graph will be a covering of .

Step 1: Let be an edge labelled and let denote the path of oriented edges labelled containing of maximal length (such a path is uniquely defined). Two cases happens: either is a loop, and there is nothing to do, or is not a loop, and we add an edge labelled between the extremities of .

Doing the same thing for every edges of and for every label, we get a graph satisfying: for any vertex and any label , either there is no edge labelled adjacent to , or there are two such edges, one starting from and the other ending at .

Step 2: Let be a vertex and a label. If there is no edge labelled adjacent to , then add a loop labelled based at . Keep going for every every vertex and for every label.

Let denote our new graph. It is a covering extending by construction the immersion , so we have the commutative diagram.

To conclude the proof, let us define a retraction . Of course, we only have to define , where is an edge added to . Two cases happen: either is a loop based at a vertex , and we define , or completes a path to a loop, and we send on (first choose a subdivision of ) so that .

**Nota Bene:** In general, the retraction defined above is not simplicial.