Let $G$ be a group generated by a set $X$, and $H$ a subgroup of $G$. A set $T$ of right coset representatives for $H$ in $G$ is called a
right transversal .
We always assume that $1\in T$. Then
$G=\bigsqcup_{t\in T}Ht$
For all $x\in G$, there exists $\overline{x}\in T$ such that $Hx = H\overline{x}$. The map $G\rightarrow T\ (x\mapsto \overline{x})$ is called a transversal function .
For all $h\in H$, there exist $x_1,\cdots, x_k \in X$ such that $h={x_1}^{\varepsilon_1}\cdots {x_k}^{\varepsilon_k}$. Where $\varepsilon_1,\cdots,\varepsilon_k\in \{-1,1\}$. Set
$t_i:= \left\{
\begin{array}{ll}
1 & (i=0),\\
\overline{t_{i-1}{x_i}^{\varepsilon_i}}=\overline{{x_1}^{\varepsilon_1} \cdots {x_i}^{\varepsilon_i}} & (i\geq 1)
\end{array}\right.$
Then
$h =
(t_0{x_1}^{\varepsilon_1}\overline{t_0{x_1}^{\varepsilon_1}}^{-1}) \cdots
(t_{k-1}{x_k}^{\varepsilon_k}\overline{t_{k-1}{x_k}^{\varepsilon_k}}^{-1})t_k$
Since $t_k=\overline{h}=1$, we have
$h = (t_0{x_1}^{\varepsilon_1}\overline{t_0{x_1}^{\varepsilon_1}}^{-1}) \cdots
(t_{k-1}{x_k}^{\varepsilon_k}\overline{t_{k-1}{x_k}^{\varepsilon_k}}^{-1})$
If $\varepsilon_i=-1$, then
$\begin{array}{rcl}
t_{i-1}{x_i}^{\varepsilon_i}\overline{t_{i-1}{x_i}^{\varepsilon_i}}^{-1}
&=& t_{i-1}{x_i}^{-1}\overline{t_{i-1}{x_i}^{-1}}^{-1}\\
&=& \left(\overline{t_{i-1}x_i^{-1}}x_it_{i-1}^{-1}\right)^{-1}\\
&=& \left(t_ix_i\overline{t_ix_i}^{-1}\right)^{-1}
\end{array}$
Hence,
$H=\langle\ tx\overline{tx}^{-1}\ |\ t\in T,\ x\in X\rangle$
From now on, set
$F:=F(X)$ the free group generated by $X$
$N:=\mathrm{NC}_{F(X)}(R)$ the normal closure of $R$ in $F(X)$
$G=\langle X\ |\ R \rangle = F/N$
$H\leq G$
$\pi:F\rightarrow F/N=G$ the natural projection
$E:=\pi^{-1}(H)$
$1 \in T\subseteq F$ the set of right coset representatives for $E$ in $F$
In this case, the map
$
\begin{array}{ccc}
E\backslash F & \rightarrow & H\backslash G\\
E w & \mapsto & H\pi(w)
\end{array}
$
is bijective. Let $Y$ be the set whose elements are indexed as follows:
$Y:=\{y_{t,x}\ |\ t\in T,\ x\in X,\ tx \neq \overline{tx}\}$
From now on,
we will assume that $T$ is prefix closed.
We will show that the group surjection
$\begin{array}{cccc}
\varphi:& F(Y) & \rightarrow & E\\
& y_{t,x} & \mapsto & tx\overline{tx}^{-1}
\end{array}$
is an isomorphism. We extend the definition as follows:
$\displaystyle{y_{t,\ x^{\varepsilon}}:=
\left\{
\begin{array}{ll}
y_{t,\ x} & (\varepsilon = 1,\ tx\neq \overline{tx})\\
y_{\overline{tx^{-1}},\ x}^{-1} & (\varepsilon = -1,\ tx^{-1}\neq \overline{tx^{-1}})\\
1 & (tx^{\varepsilon}=\overline{tx^{\varepsilon}})
\end{array}
\right.}$
Denote by $W(X)$ the free monoid generated by $X\sqcup X^{-1}$, and define a map $\sigma:T\times W(X)\rightarrow F(Y)$ by
$\sigma(t,w):= y_{t_0,\ x_1^{\varepsilon_1}}\cdots y_{t_{r-1},\ x_r^{\varepsilon_r}}$
where $w = x_1^{\varepsilon_1}\cdots x_r^{\varepsilon_r}\ (\varepsilon_1,\ \cdots,\ \varepsilon_r\in\{-1,\ 1\} )$, $t_i:=\overline{tx_1^{\varepsilon_1}\cdots x_i^{\varepsilon_i}}$.
It is easy to see that
$\begin{array}{rl}
\sigma(t,x) = y_{t,x} & (t\in T,\ x\in X)\\
\sigma(t,uv)= \sigma(t,u)\sigma(\overline{tu},v) & (t\in T,\ u,v\in W(X))
\end{array}$
For $t\in T$, define
$\rho_t: F\rightarrow F(Y)$ via $\rho_t(w):=\sigma(t,w)$ for $w\in F$.
To show that $\rho_t$ is well-defined, it is enough to prove that
$\sigma(t,uxx^{-1}v)=\sigma(t,ux^{-1}xv) = \sigma(t,uv)$
for $t\in T$, $u,v\in W(X)$ and $x\in X$. By definition,
$\begin{array}{lll}
\sigma(t,uxx^{-1}v) &=& \sigma(t,u)\sigma(\overline{tu},x)\sigma(\overline{tux},x^{-1})\sigma(\overline{tu},v)\\
&=& \sigma(t,u)y_{\overline{tu},x}y_{\overline{tux},x^{-1}}\sigma(\overline{tu},v)\\
&=& \sigma(t,u)y_{\overline{tu},x}y_{\overline{\overline{tux}x^{-1}},x}^{-1}\sigma(\overline{tu},v)\\
&=& \sigma(t,u)y_{\overline{tu},x}y_{\overline{tu},x}^{-1}\sigma(\overline{tu},v)\\
&=& \sigma(t,u)\sigma(\overline{tu},v) = \sigma(t,uv)\\
\sigma(t,ux^{-1}xv) &=& \sigma(t,u)\sigma(\overline{tu},x^{-1})\sigma(\overline{tux^{-1}},x)\sigma(\overline{tu},v)\\
&=& \sigma(t,u)y_{\overline{tu},x^{-1}}y_{\overline{tux^{-1}},x}\sigma(\overline{tu},v)\\
&=& \sigma(t,u)y_{\overline{\overline{tu}x^{-1}},x}^{-1}y_{\overline{tux^{-1}},x}\sigma(\overline{tu},v)\\
&=& \sigma(t,u)y_{\overline{tux^{-1}},x}^{-1}y_{\overline{tux^{-1}},x}\sigma(\overline{tu},v)\\
&=& \sigma(t,u)\sigma(\overline{tu},v) = \sigma(t,uv)
\end{array}$
Since $\rho_1(uv)=\rho_1(u)\rho_{\overline{u}}(v)\ (u,v\in F)$, $\rho_1|_E:E\rightarrow F(Y)$ is a group homomorphism.
We will show that
$\rho_1(tx\overline{tx}^{-1})=y_{t,x}\quad (t\in T,\ x\in X)$
Since $T$ is prefix closed, for any $t=x_1^{\varepsilon_1}\cdots x_k^{\varepsilon_k}\in T$, we have
$t_i=x_1^{\varepsilon_1}\cdots x_i^{\varepsilon_i}\in T\quad (i=0,1,\cdots ,k)$
In particular,
$
\begin{array}{lrll}
& t_{i-1}x_i^{\varepsilon_i} &=& \overline{t_{i-1}x_i^{\varepsilon_i}}\quad (i=0,1,\cdots ,k)
\\
\therefore & \rho_1(t) &=& 1
\\
\therefore & 1 &=& \rho_1(1) = \rho_1(tt^{-1}) = \rho_1(t)\rho_t(t^{-1}) = \rho_t(t^{-1})
\\
\therefore & \rho_1(tx\overline{tx}^{-1}) &=& \rho_1(t)\rho_t(x)\rho_{\overline{tx}}(\overline{tx}^{-1})\\
& &=& \rho_t(x)\\
& &=& y_{t,x}\\
\end{array}
$
Hence,
$\rho_1\varphi = id_E$
This implies that $\varphi:F(Y)\rightarrow E$ is an isomorphism of groups.
[Cor]
If $m:=|X|<\infty,\ n:=|T|<\infty$, then $E$ is a free group of rank $mn-n+1$.
Define
$\varphi: T\setminus \{1\} \rightarrow \{(t,x)\in T\times X\ |\ tx= \overline{tx}\}$
via
$\varphi(t):=\left\{
\begin{array}{ll}
(t,x_r) & (\varepsilon_r = -1)\\
(tx_r^{-1},x_r) & (\varepsilon_r = 1)
\end{array}\right.$,
where $t=x_1^{\varepsilon_1}\cdots x_r^{\varepsilon_r}$ is the reduced expression.
It is enough to show that $\varphi$ is bijective. Define
$\psi: \{(t,x)\in T\times X\ |\ tx= \overline{tx}\} \rightarrow T\setminus \{1\}$
via
$\psi(t,x):=\left\{
\begin{array}{ll}
t & (\varepsilon_r = -1,\ x = x_r)\\
tx & (\text{otherwise})
\end{array}\right.$,
where $t=x_1^{\varepsilon_1}\cdots x_r^{\varepsilon_r}$ is the reduced expression.
It is easy to show that $\psi=\varphi^{-1}$.
Set
$S:=\{\rho_1(twt^{-1})\ |\ t\in T,\ w\in R\}$,
then the induced group homomorphism $\overline{\varphi}:\langle Y\ |\ S\rangle \rightarrow H$ is an isomorphism:
$\begin{xy}
<0em,0em>*+{F(Y)}="fy",
<7em,0em>*+{E}="e",
<0em,-5em>*+{\langle Y\ |\ S\rangle}="h1",
<7em,-5em>*+{H}="h",
<3.5em,-2.5em>*+{\circlearrowleft}="c",
"fy";"e" **@{-} ?>*@{>} ?<>(.5)*!/_0.6em/{\varphi},
"fy";"h1" **@{-} ?>*@{>>},
"e";"h" **@{-} ?>*@{>>},
"h1";"h" **@{-} ?>*@{>} ?<>(.5)*!/_0.6em/{\overline{\varphi}}
\end{xy}$
It is enough to show that $\varphi(\mathrm{NC}_{F(Y)}(S))=N(=\mathrm{NC}_{F(X)}(R))$.
For $t\in T,\ w\in R$, we have $twt^{-1}\in N\leq E$. Hence
$\begin{array}{ll}
& \varphi(\rho_1(twt^{-1}))=twt^{-1}\in N\\
\therefore & \varphi(S)\subseteq N\\
\therefore & \varphi(\mathrm{NC}_{F(Y)}(S))\subseteq N
\end{array}$
$N$ is generated by elements of the form $uwu^{-1}$ $(u\in F,\ w\in R)$. For $u\in F,\ w\in R$,
there exists $v\in E,\ t\in T$ such that $u = vt$. Hence
$\rho_1(uwu^{-1})=\rho_1(v(twt^{-1})v^{-1})=\rho_1(v)\rho_1(twt^{-1})\rho_1(v)^{-1}\in \mathrm{NC}_{F(Y)}(S)$.
$\therefore\ \rho_1(N)\subseteq \mathrm{NC}_{F(Y)}(S)$.
$\therefore\ N=\varphi\rho_1(N)\subseteq \varphi(\mathrm{NC}_{F(Y)}(S))$.
For $t\in T,\ w\in R$,
$\rho_{\overline{tw}}(t^{-1})=\rho_1(t)^{-1}$
$\rho_{\overline{tw}}(t^{-1})=\rho_{\overline{(twt^{-1})t}}(t^{-1})=
\rho_{\overline{\overline{twt^{-1}}t}}(t^{-1})=\rho_{t}(t^{-1})=\rho_1(t)^{-1}$
Hence
$\rho_1(twt^{-1})=\rho_1(t)\rho_t(w)\rho_{\overline{tw}}(t^{-1})=\rho_1(t)\rho_t(w)\rho_1(t)^{-1}$.
This shows that the set $S$ can be replaced by the follwing set:
$\{\rho_t(w)\ |\ t\in T,\ w\in R\}$.