On a practice exam, our teacher gave us this answer as the third point in proving:
Let $n$ be a positive integer and let $P = \{$equivalence classes for is-congruent-to-mod-$n\}$. Show that $P$ is a partition of the set of integers.
$\bigcup_{a\in\mathbb{Z}_n} [a] = \mathbb{Z}$: Clearly $\bigcup_{a\in\mathbb{Z}_n} [a] \subseteq \mathbb{Z}$ as each element in each set is an integer. Now let $z \in\mathbb{Z}$. By the division algorithm there is a unique pair $(q,r)$ with $0 \leq r < n$ such that $z=qn+r$. Thus $z\equiv r\pmod{n}$. That is $z\in[r]$, so $z\in\bigcup_{a\in\mathbb{Z}_n}[a]$.
My question is, I do not understand what this is saying. I do not understand the notation, nor do I understand what this is proving.
We have this little theorem that can be pretty helpful in this situations:
Theorem: Let $\,X\,$ be a non-empty set, and let $\,S:=\{A_i\;\;;\;\;i\in I\}\,$ be a collection of non-empty subsets of $\,X\,$ . Then $\,S\,$ is a partition of $\,X\,$ iff the sets in $\,S\,$ are the equivalence classes of some equivalence relation on $\,X\,$.
Proof: This is a rather easy but interesting exercise.
Well, now just prove that $\,P\,$ fulfills the requirements of the above theorem, for example: define a relation $\,R_n\,$ on $\,\mathbb Z\,$ by $$aR_nb\,\Longleftrightarrow a=b+kn\,\,,\,\text{for some integer}\,\,k$$ It is pretty straightforward to check reflexivity, symmetry and transitivity, and the equivalence classes are the modulo n ones.