Proof regarding the euler totient function Let $m$ be a positive integer, prove that $$\sum_{\substack{d\mid m\\d>0}} \varphi(d) = m.$$

Recall
$$\sum_{\substack{d\mid m\\d>0}} \varphi(d) = \sum_{\substack{d\mid m\\d>0}} \varphi\left(\frac{m}{d}\right)\tag{1}$$
and note that 
$$\varphi\left(\frac{m}{d}\right) = \#\big\{b\colon 1\le b
\le m, \gcd(b,m)=d\big\}.\tag{2}$$
But
$$\{1,2, \ldots, m\} = \dot{\bigcup_{\substack{d\mid m\\d>0}}}\{b\colon 1\le b\le m, \gcd(b,m)=d\}\tag{3}$$
and hence $$m=\sum_{\substack{d\mid m\\d>0}} \varphi(d)\tag{4}$$

So this is the proof my lecturer has provided but I've not come across a lot of the notions used.


*

*How is the equality in $(1)$ found?

*Shouldn't the set used in $(2)$ be $$\left\{b\colon 1\le b
\le \frac{m}{d}, \gcd\left(b,\frac{m}{d}\right)=1\right\}$$

*What does the union symbol with a dot on top mean in $(3)$? Also, how is this equality found.

*How is $(4)$ implied?

 A: 1) is by symmetry. We're just traversing the divisors of $m$ in the opposite order.
2) $b$ is coprime to $m/d$ if and only if $\gcd(db, m) = d$.
3) refers to the disjoint union: it is just an ordinary union, but we can put a dot above the union to indicate that nothing occurs as a member of more than one operand.
4) Take cardinalities on both sides of 3.
A: A more detailed answer.


*

*For (1) note the following


$$\sum_{\substack{d\mid m\\d>0}} \varphi(d) = \sum_{\substack{m=dd^\prime\\d,d^\prime>0}} \varphi(d)= \sum_{\substack{m/d^\prime=d\\d,d^\prime>0}} \varphi(d)= \sum_{\substack{m/d^\prime=d\\d,d^\prime>0}} \varphi(m/d^\prime)= \sum_{\substack{d^\prime|m\\d^\prime>0}} \varphi(m/d^\prime).$$


*Same idea as in (1).


$$\begin{align*}
\#\big\{b\colon 1\le b
\le m, \gcd(b,m)=d\big\}&= \#\big\{b=nd\colon 1\le nd
\le m, \gcd(nd,m)=d\big\}\\
&= \#\big\{b/d=n\colon 1\le n
\le m/d, \gcd(n,m/d)=1\big\}\\
&= \#\big\{n\colon 1\le n
\le m/d, \gcd(n,m/d)=1\big\}=\varphi(m/d).\end{align*}$$


*The dot is a disjoint union. For each number $n$ in the list $A:=\{1,2,...,m\}$ there exists one number $d$ such that $\gcd(n,m)=d$. Then we can split the set in disjoint sets, each set correspond to the numbers on the list $A$ for which $\gcd(n,m)=d$ and we vary $d$ on the set of divisor of $m$.

*Take cardinality in both sides of (3). Since the union is disjoint we sum the cardinaliy of each set in the right side. By (2) each set has cardinality $\varphi(m/d)$ then we sum $\sum_{d/m,d>0}\varphi(m/d)$. By (1) we are done.
