I came across a particular proof
And I have not been able to follow through these steps
Where it is mentioned that the expansion of the term $\displaystyle f \left({\bigcup_{i \mathop = 1}^r A_i}\right)$ is to be found
Which is $\displaystyle \left({-1}\right)^{s-1} \sum_{{I} \subseteq \left[{1 \,.\,.\,r}\right] \atop {\left|{I}\right| = s}} f \left({\bigcap_{i \mathop \in I} A_i}\right) - \left({-1}\right)^{s-2} \sum_{{J} \subseteq \left[{1 \,.\,.\,r}\right] \atop {\left|{J}\right| = s-1}} f \left({\bigcap_{i \mathop \in J} A_i \cap A_{r+1}}\right)$
where : $I$ ranges over all sets of $s$ elements out of $\left[{1 \,.\,.\, r}\right]$ : $J$ ranges over all sets of $s-1$ elements out of $\left[{1 \,.\,.\, r}\right]$ : $1 \le s \le r$
How is it obtained and how does this equals to this?
$\displaystyle \left({-1}\right)^{s-1} \sum_{{I'} \subseteq \left[{1 \,.\,.\,r+1}\right] \atop {\left|{I'}\right| = s}} f \left({\bigcap_{i \mathop \in I'} A_i}\right)$ where, $I'$ ranges over all sets of $s$ elements out of $\left[{1 \,.\,.\, r+1}\right]$ and $1 \le s \le r+1$.