# Attempt to prove that every subgroup is an equalizer

I'm trying to prove:

For any subgroup $H$ of $G$, there is a group $T$ and homomorphisms $f,g:G\to T$ such that $f(x)=g(x)$ iff $x\in H$.

My idea is to construct a group which contains two copies of $G$ that intersect at a copy of $H$. After some googling, I found out that such construction is called an almagamated free product $G*_HG$ (with natural inclusions $i,j:H\to G$). This group can also be described as $G*_HG=(G*G)/N$ where $N$ is the normal closure of elements of the form $i(h)j(h)^{-1}$, $h\in H$. Now define $f=q\circ i,g=q\circ j$ where $q:G*G\to(G*G)/N$ is the canonical quotient map.

If $x\in H$, then $i(x)j(x)^{-1}\in N$. So applying $q$ gives $f(x)g(x)^{-1}=1$, i.e., $f(x)=g(x)$. The difficult part is the converse. If $f(x)=g(x)$, then $q(i(x)j(x)^{-1})=1$, so $i(x)j(x)^{-1}\in N$. Is it possible to prove $x\in H$ from here?

I'm quite sure that $f,g$ as defined should work. Because when we did the free product with almagamation at $H$, it should be the "most general", in the sense that nothing outside $H$ is almagamated.

-
There is something not quite right with your notation, because you have the codomain of $i$ and $j$ as $G$, but you then treat $i(h)$, $j(h)$ as elements of $G*G$. It is a fundamental property of the free product $K := G_1 *_H G_2$ with amalgamation, that the subgroups $G_1$ and $G_2$ of $K$ intersect exactly in $H$. The proof of that is technical and is based on a normal form for elements of $K$. –  Derek Holt Oct 30 '12 at 13:42
@DerekHolt, would you have a reference to this result? –  Bryan Jan 29 at 3:45

Define $T:=G \times G$ and $f(a)=(a,a)$ if $a \in H$, $f(a) = (a,0)$ if $a \notin H$, similarly define $g(a)=(a,a)$ if $a \in H$, $g(a) = (0,a)$ if $a \notin H$.
It follows immediately from the definition that $a \in H \iff f(a)=(a,a)=g(a)$.