How do I prove $[G:H\cap K]\leq [G:H][G:K]$?

Reference: Infinite group with subgroups of finite index

Let $G$ be a group.

Let $H,K$ be subgroups of $G$.

How do I prove that $[G:H\cap K]\leq [G:H][G:K]$?

Let's not assume any index is finite.

Then, still the result holds?

If so how do I prove it?


I got it.

Let $A$ be the set of cosets of $H\cap K$

Let $B$ be the set of cosets of $H$

Let $C$ be the set of cosets of $K$

Define $\phi:A\rightarrow B\times C : g(H\cap K)\mapsto (gH,gK)$.

Note that $\phi$ is well defined and also it's trivial that it is injective

Thus, $|A|\leq |B||C|$.

However I'm really wondering whether my argument is correct or not, since above in the link, people are using group actions and isomorphism theorems and stuffs to prove this..