Proving the inclusion-exclusion principle for measures

Solution 1:

The idea is correct but your proof is not quite complete. How does your equation about how many times $x$ is "counted" imply the equation of measures which you are trying to prove?

There are various ways to handle this. Probably the cleanest is to use integration. Can you write each side of the equation $$\mu\left(\bigcup_{k = 1}^{n} E_k \right) = \sum_{\emptyset \neq S\subseteq\{1, ..., n\}}^{n} (-1)^{|S|-1} \mu\left(\bigcap_{k\in S} E_k\right)$$ as the integral of some function and then turn your "counting" argument into a proof that these two functions are the same?

The answer of how to do this is hidden below.

Let $$f=1_{\bigcup_{k = 1}^{n} E_k}$$ and let $$g=\sum_{\emptyset \neq S\subseteq\{1, ..., n\}}^{n} (-1)^{|S|-1} 1_{\bigcap_{k\in S} E_k}.$$ Then $f$ and $g$ are measurable functions on $X$ and the equation you wish to prove is just $$\int_X f\, d\mu=\int_X g\, d\mu.$$ What your counting argument shows is that for any $x\in X$, $f(x)=g(x)$ (the two "counts" you are doing are exactly computing $f(x)$ and $g(x)$). Note for this argument to be complete, you need to also consider $x\in X\setminus\bigcup_{k = 1}^{n} E_k$, and observe that both $f(x)$ and $g(x)$ are $0$ in that case. So, $f=g$, and their integrals are equal, as desired.