Generalised form of $|HK|=\frac{|H||K|}{|H\cap K|}$ [SOLVED] So for groups, we know that the cardinality of the product of two subgroups is given by the formula $|HK|=\frac{|H||K|}{|H\cap K|}$, where $H$ and $K$ are subgroups of the group $G$. However, after scouring the internet I cannot seem to find a formula for the cardinality of the product of three or more subgroups.
Failed attempt:
I conjectured that the cardinality of the product of three subgroups is given by the formula
$$|XYZ|=\frac{|X||Y||Z||X \cap Y \cap Z|}{|X \cap Y||X \cap Z||Y \cap Z|},$$
where $X$, $Y$ and $Z$ are subgroups of the group $G$.
Similarly, the cardinality of the product of four subgroups should be given by the formula
$$|WXYZ|=\frac{|W||X||Y||Z| |W \cap X \cap Y| |W \cap X \cap Z| |W \cap Y \cap Z| |X \cap Y \cap Z|}{|W \cap X| |W \cap Y| |W \cap Z| |X \cap Y||X \cap Z||Y \cap Z||W\cap X \cap Y \cap Z|},$$
where $W$, $X$, $Y$ and $Z$ are subgroups of the group $G$.
I conjectured these formulas because the formula for the cardinality of two subgroups seems to have a similar structure to the principle of inclusion and exclusion $(|A \cup B|=|A|+|B|-|A \cap B|)$ and also the formula $\operatorname{lcm}(x,y)=\frac{xy}{\gcd(x,y)}$. Therefore, the formula for the cardinality of the product of three subgroups should somewhat follow the pattern for $|A \cup B \cup C|$ and $\operatorname{lcm}(x,y,z)$ in my humble opinion. (although if it doesn’t, I wouldn’t be very surprised either because my argument isn’t very rigorous).
I have checked that the formula
$$|XYZ|=\frac{|X||Y||Z||X \cap Y \cap Z|}{|X \cap Y||X \cap Z||Y \cap Z|},$$
holds for the example $G=\mathbb{Z}/120\mathbb{Z}$, $X= \mathbb{Z}/2\mathbb{Z}$, $Y= \mathbb{Z}/3\mathbb{Z}$ and $Z=\mathbb{Z}/5\mathbb{Z}$. Also, the formula holds when you let the subgroup $Z$ be the subgroup $X\cap Y$.
Sadly, reality is often times disappointing because I managed to find a counter example to the above formula. By letting the group $G$ be $S_3$, $X=\{(1),(12)\}$, $Y=\{(1),(13)\}$ and $Z=\{(1),(123),(132)\}$. In this example, it isn’t hard to see that the right hand side of the formula would give us $\frac{2\cdot 2\cdot 3 \cdot 1}{1 \cdot 1 \cdot 1}=12$. However, on the left hand side of the formula, $XYZ$ is a subset of $S_3$ and hence its cardinality has to be less than the order of $S_3$ which is 6, a contradiction.
Since my formula failed to hold water, the only natural question to have is what is the formula for $|XYZ|$? And perhaps what is the formula of the cardinality of the product of $n$ many subgroups of $G$ be? Will somebody who is rather experienced in this field be able to satisfy my curiousity?
Current progress:

*

*We can derive a formula for $|XYZ|$ if we were to assume that one of the subgroups is normal
If we were to assume that one of these three subgroups are normal, then either $(XY)$ or $(YZ)$ is a subgroup of $G$. In the case that $(XY)$ is the subgroup, we can deduce that
$$|XYZ|=\frac{|XY|\cdot|Z|}{|XY\cap Z|}=\frac{|X|\cdot |Y|}{|X\cap Y|}\cdot \frac{|Z|}{|XY\cap Z|}=\frac{|X|\cdot|Y|\cdot|Z|}{|X\cap Y|\cdot|XY\cap Z|}$$
We can derive a similar formula if $(YZ)$ is a subgroup.


*Many of the comments seem to suggest that such a formula probably do not exists. One of the reason cited is due to the fact that there isn’t a clear cut way for us to use induction because $XY$ is usually not a group.


*Somebody (in an already deleted post) suggested the formula
$$|H_1H_2H_3|=\frac{|H_1||H_2||H_3|}{|H_1\cap H_2||H_2\cap H_3| |H_3\cap H_1|},$$
where $H_1,H_2,H_3$ are subgroups for $n=3$.
And in general,
$$|\displaystyle \prod_{i=l}^n(H_i)|=\frac{\displaystyle \prod_{i=l}^n(|H_i|)}{\displaystyle \prod_{i=l}^{n}(|H_i\cap H_{i+1}|)}$$
(Note that $H_{n+1}=H_1$)
where the ${H_i}’s$ are subgroups of $G$
It seemed plausible at first sight. Sadly, it too was quickly disproven using the same counter example for my conjectured formula. For the case of $n=3$, let the group $G$ be $S_3$, $H_1=\{(1),(12)\}$, $H_2=\{(1),(13)\}$ and $H_3=\{(1),(123),(132)\}$. In this example, it isn’t hard to see that the right hand side of the formula would give us $\frac{2\cdot 2\cdot 3}{1 \cdot 1 \cdot 1}=12$. However, on the left hand side of the formula, $XYZ$ is a subset of $S_3$ and hence its order has to be less than the cardinality of $S_3$ which is 6, a contradiction.
My thoughts on this problem:
I still think that there is a chance of there being such a formula. Clearly, one cannot simply work by induction on the number of factors because $XY$ is usually not a subgroup (as mentioned by Brauer Suzuki in the comments below). One approach that I can think of in solving this problem is to look at the proof for $|HK|=\frac{|H||K|}{|H\cap K|}$ and try to somehow replicate it for the case of $n=3$. (I have tried this but to no success. But feel free to try it because I am kind of new to algebra and hence might have missed something crucial)
At the same time, perhaps there is indeed no such formula. For arguments against such a formula do read the comments of ΑΘΩ below which I felt to be rather insightful.
Conclusion:
Pretty convinced that there isn’t such a formula. Do read the solution by David A. Craven.
 A: This has generated a lot of activity, so let's give an example to show that no formula can exist in general.
Let $G=GL_n(q)$, and let $B$ be the set of upper triangular matrices, of size $q^{n(n-1)/2}(q-1)^n$. Let $W$ denote the Weyl group of $GL_n(q)$, the symmetric group $S_n$, in its permutation representation. The Bruhat decomposition states that $$G=BWB.$$
This is exactly what you want, a triple subgroup decomposition. Since $B\cap W=1$ and $B\cap B=B$, intersections can be ignored. Since $BW$ is not a subgroup, and $BB=B$, we cannot use pairs of subgroups either. So we must make $|G|$, which is a product of many cyclotomic polynomials, out of $n!$, $1$ and $r=q^{n(n-1)/2}(q-1)^n$. Since the order of $G$ is a polynomial in $q$, and $n!$ does not depend on $q$, it can be treated as a constant for fixed $n$, hence ignored.
Thus we need to write $|G|=f(q)=q^{n(n-1)/2}\prod (q^i-1)$ as a polynomial $p(r)$, with coefficients in $\mathbb Q$. This is not possible. To see this, note that $|B|$ already divides $|G|$, so we need to write $|G|/|B|$ as a polynomial in $|B|$. Since $|B|$ has degree $n(n+1)/2$ and $|G|$ has degree $n^2-1$ (as polynomials in $q$), such a function cannot exist, as $n(n+1)/2$ does not divide $n^2-1$.
(To see why the polynomials must actually match, and they not just happen to coincide, since the formula must hold for infinitely many $q$, the polynomials must match as they have the same value infinitely often.)
