TITLE: Groups between a group and its profinite completion
QUESTION [6 upvotes]: If $G$ and $H$ are finitely generated residually finite groups such that $G\leq H\leq \hat G$, where $\hat G$ denotes the profinite completion of $G$, does it follow that $$\hat H \cong \hat G$$
Thanks!

REPLY [2 votes]: By the universal property of profinite completions, we have to show that every homomorphism of groups $G \to K$, where $K$ is a profinite group, extends uniquely to a homomorphism of groups $H \to K$.
Well, we have only one choice: $G \to K$ corresponds to a homomorphism of profinite groups $\hat{G} \to K$, and this can be restricted to $H \leq \hat{G}$. This is clearly an extension of $G \to K$.
Now, assume that two homomorphism $f,g : H \to K$ agree on $G$. Then $\hat{f},\hat{g} : \hat{H} \to K$ are homomorphisms of profinite groups which agree on $\hat{G}$. Then they also agree on $H \leq \hat{G}$, i.e. $f=g$.