TITLE: Vector space dimension theorem compared to group subsets product formula
QUESTION [7 upvotes]: I was wondering if there is a generalization which from it the following theorems will be resulted. It seems that it should be related to the rank of the abelian group underlying the vector space, but I'm unable to formulated anything of this sort. Any enlightenment? Maybe generalizations from category theory?...
The dimension theorem of vector spaces:
$$
    U,W\subset V \rightarrow \dim(U+W) = \dim(U) + \dim(W) - \dim(U\cap W)
$$
The cardinality of groups subsets product:
$$
    H,N\subset G \rightarrow |HN| = \frac{|H||N|}{H\cap N}
$$
Which become even more similar if we denote the group product by + and apply log:
$$
\log|H+N| = \log|H| + \log|N| - \log|H\cap N|
$$
I understand that basically both are related through the property of joint sets, but they should be related more than that (and the extended Inclusion-Exclusion formula for probability etc.)
$$
    |A\cup B| = |A| + |B| - |A\cap B|
$$

REPLY [3 votes]: Here are two other perspectives, to complement C. Cain's answer. 
Connecting the dimension theorem to groups via logarithms:
Vector spaces are, in particular, abelian groups. And finite dimensional vector spaces over finite fields are finite groups. In fact, if $V$ is a vector space over $\mathbb{F}_q$, then $|V| = q^{\dim(V)}$. So in the special case of $\mathbb{F}_q$-vector spaces, the group formula reads $$q^{\dim(V+W)} = \frac{q^{\dim(V)}q^{\dim(W)}}{q^{\dim(V\cap W)}} = q^{\dim(V)+\dim(W) - \dim(V\cap W)}.$$
This is a rather explicit instance of the connection with logs (base $q$, here) that you noticed.
Connecting the dimension theorem to inclusion-exclusion:
There's a general theory of objects supporting notions of dimension and independence, called pregometries by model theorists (like me), and matroids by most other people.
Two canonical examples of pregeometries are 

Vector spaces, in which the closure operator is $\text{cl}(A) = \text{Span}(A)$ and the dimension a set is the linear dimension of its closure. Of course, the dimension theorem $\dim(X\cup Y) = \dim(X) + \dim(Y) - \dim(X\cap Y)$ always holds in a vector space.
Sets, in which the closure operator is trivial: $\text{cl}(A) = A$ and the dimension is cardinality: $\text{dim}(A) = |A|$. In a set, the dimension theorem is just the inclusion-exclusion principle, so again it always holds.

Not every pregeometry satisfies the dimension theorem - those that do are called modular. A canonical example of a nonmodular pregeometry is a large algebraically closed field, with closure being algebraic closure and dimension being transcendence degree.