Let $V$ be a finite dimensional vector space over a field $K$, and let $W_1$, $W_2$ and $W_3$ be subspaces of $V$. By analogy with the inclusion-exclusion principle for sets, and taking into account the dimension formula for a sum of 2 subspaces, we can ask whether the following equality holds:
$$\dim(W_1 + W_2 + W_3) = \dim(W_1) + \dim(W_2) + \dim(W_3) − \dim(W_1 \cap W_2) − \dim(W_2 \cap W_3) − \dim(W_3 \cap W_1) + \dim(W_1 \cap W_2 \cap W_3)$$ (†) it is false for the sum of 3 subspaces.
This formula does not always hold: for example take three distinct lines in $\mathbb R^2$ as $U$, $V$, $W$. All intersections have 0 dimensions. The LHS is $2$, the RHS is $3$.
I would like to state general assumptions on the subspaces of $W_1$, $W_2$, $W_3$ which guarantee that the formula does hold and prove it under these assumptions.
But for which triples of (finite-dimensional) subspaces does this hold? Do you have any reference for reading? I studied a few books but could not seem to find anything. To sum up, my question I am trying to prove that the formula is True even though it is False.
Many thanks