E mi pare hai ragione

Mh, dov'è l'errore?
Let $n=\prod_{i=1}^\infty p_i^{\alpha_i}$ and $m=\prod_{i=1}^\infty p_i^{\beta_i}$ with $p_1<p_2<...$ representing all primes and $\alpha_i,\beta_i$ non-negative integers. Then
$$
\varphi(mn)=\varphi\left(\prod_{i=1}^\infty p_i^{\alpha_i+\beta_i}\right)=\prod_{i: \alpha_i+\beta_i>0}p_i^{\alpha_i+\beta_i-1}(p_i-1).
$$
Notice that it can be rewritten as
$$
\prod_{i: \max\{\alpha_i,\beta_i\}>0}p_i^{\alpha_i+\beta_i-1}(p_i-1).
$$
At the same time we have
$$
\varphi(\text{lcm}(m,n))=\varphi\left(\prod_{i=1}^\infty p_i^{\max\{\alpha_i,\beta_i\}}\right)=\prod_{i: \max\{\alpha_i,\beta_i\}>0}p_i^{\max\{\alpha_i,\beta_i\}-1}(p_i-1),
$$
and also
$$
\varphi(\text{gcd}(m,n))=\varphi\left(\prod_{i=1}^\infty p_i^{\min\{\alpha_i,\beta_i\}}\right)=\prod_{i: \min\{\alpha_i,\beta_i\}>0}p_i^{\min\{\alpha_i,\beta_i\}-1}(p_i-1).
$$
At this point, if $i$ such that $\max\{\alpha_i,\beta_i\}>0$ and $\min\{\alpha_i,\beta_i\}>0$ then the equality holds for the part concerning $p_i$. Therefore we have only to check the case
$$
\max\{\alpha_i,\beta_i\}>0 \text{ and }\min\{\alpha_i,\beta_i\}=0,
$$
which means wlog $\alpha_i=0$ and $\beta_i>0$. In such case the conclusion follows from the fact that we would have $\alpha_i+\beta_i-1= \max\{\alpha_i,\beta_i\}-1$.
_________________________
Edit: trovato, ci sarebbero due $(p_i-1)^2$ che si moltiplicano e ne vorremo soltanto uno, giusto
