I am attempting to work through Shatz and Gallier's [Algebra](https://www.cis.upenn.edu/%7Ejean/algeom/amsalg.html), and I would like help verifying and cleaning up the proof of the following problem:

**Problem:** In an infinite group, prove that the intersection of two subgroups of finite index has finite
index itself.

**Proof:** Let $H, K$ be subgroups of a group $G$. It suffices to show that $(G:H \cap K)\leq (G:H)(G:K).$ Let $C = \{g\_iH\cap K\}, C' = \{g\_j'H\}, C'' = \{g\_k''K\}$ be the sets of distinct left cosets of $H\cap K, H$ and $K$ respectively. Consider the map
\begin{align\*}
 \varphi: C&\hookrightarrow C'\times C'' \\
 g\_iH\cap K &\mapsto (g'\_{j\_i}H,g''\_{k\_i}K)
\end{align\*}
where $g'\_{j\_i}$ and $g''\_{k\_i}$ are such that $g\_iH\cap K \subset g'\_{j\_i}H$ and $g\_iH\cap K \subset g''\_{k\_i}K.$ Check that this map is well-defined: there cannot be two distinct cosets $g'\_{j\_i}H, g'\_{j'\_i}H$ containing $g\_iH\cap K$ as a subset, so we need only make sure $g'\_{j\_i}H$ exists. Choose an element $g\_il$ of $g\_iH\cap K$ and label the coset in $C'$ in which it lies $g'\_{j\_i}H.$ Then $g\_il = g'\_{j\_i}h$ for some $h\in H,$ and for any $l' \in H\cap K$ $g\_il' = g'\_{j\_i}hl^{-1}l'\in g'\_{j\_i}H.$ Thus the entire coset $g\_iH\cap K$ lies in $g'\_{j\_i}H.$ By an analogous argument there exists a unique $g\_k''K$ such that $g\_iH\cap K \subset g''\_{k\_i}K.$

We now show that $\varphi$ is an injection. Suppose $g\_1H\cap K, g\_2H\cap K$ both lie in the same cosets $g'H, g''K.$ Fix $l \in H\cap K.$ Then $g\_1l = g'h\_1 = g''k\_1$ for some $h\_1, k\_1 \in H, K$ respectively. Similarly $g\_2l = g'h\_2 = g''k\_2$ for $h\_2, k\_2 \in H, K$ respectively. Then
\begin{align\*}
 g\_1l &= g'h\_1 = g''k\_2h\_2^{-1}h\_1 = g\_2lh\_2^{-1}h\_1\in g\_2H \text{ and }\\
 g\_1l &= g''k\_1 = g'h\_2k\_2^{-1}k\_1 = g\_2lk\_2^{-1}k\_1\in g\_2K
\end{align\*}
and after combining these statements we have that $g\_1l \in g\_2H\cap K,$ and $g\_1, g\_2$ define the same coset w.r.t. $H\cap K.$

Is this proof correct?