This question is a follow up to this question.
How do I create a sequence from this formula?
$\sum\limits_{i=1}^{n} P(A_i) - \sum\limits_{1\le i < j \le n-1}P(A_i \cap A_j) + \dots + (-1)^n P(A_1 \cap A_2 \cap \dots \cap A_{n-1}) - \left[ \sum\limits_{i=1}^{n-1}P(A_i \cap A_n) - \sum\limits_{1\leq i < j \leq n-1}^{n-1}P(A_i \cap A_j \cap A_n) + \dots + (-1)^nP(A_i \cap A_2 \cap \dots \cap A_{n-1}\cap A_n)\right]$
My confusion is in interpreting $(-1)^n P(A_1 \cap A_2 \cap \dots \cap A_{n-1})$ and $(-1)^nP(A_i \cap A_2 \cap \dots \cap A_{n-1}\cap A_n)$.
Take $(-1)^n P(A_1 \cap A_2 \cap \dots \cap A_{n-1}$ as an example. I don't know where $n$ should begin. I thought it is $1$ but if $n=1$ then the first term, $\sum\limits_{i=1}^{n}P(A_i)$, should have a negative sign because $(-1)^1=-1$. Since this is not the case, it must mean that $n$ starts from 2. But this not mentioned anywhere in the theorem.
Lastly, based on Antoine's answer, how do I formally complete the proof? I can see that the missing terms in the first line can be found in the second line and that the final term in the second line will always be the last term as per the theorem. But I don't know the sequence of steps to write so that the end of this proof is a formula as per the theorem.
$$\sum\limits_{i=1}^{n} P(A_i) - \sum\limits_{1\le i < j \le n-1}P(A_i \cap A_j) + \dots + (-1)^n P(A_1 \cap A_2 \cap \dots \cap A_{n-1}) - \left[ \sum\limits_{i=1}^{n-1}P(A_i \cap A_n) - \sum\limits_{1\leq i < j \leq n-1}^{n-1}P(A_i \cap A_j \cap A_n) + \dots + (-1)^nP(A_i \cap A_2 \cap \dots \cap A_{n-1}\cap A_n)\right] = \sum_{k=1}^n \sum_{|\alpha| = k} (-1)^{k + 1} P\left(\bigcap_{i=1}^{|\alpha|}A_{\alpha_i}\right)$$ Where $\alpha \in ([1,n]\cap\mathbb N)^{k}$ is a multiindex with $i < j \Leftrightarrow \alpha_i < \alpha_j$ and $|\alpha|=k$ is its length. Just try to formalize it a bit. You'll notice that for example $$\sum_{1\leq i<j\leq n-1} P(A_i\cap A_j) + \sum_{i=1}^{n-1} P(A_i \cap A_n) = \sum_{1\leq i<j \leq n} P(A_i \cap A_j) = \sum_{|\alpha| = 2} P(A_{\alpha_1} \cap A_{\alpha_2})$$
See here, page 215 for a brief explanation ("principle of inculsion and exclusion")