Using Euler Totient Function to prove an identity 
Show the following identity for Euler’s ϕ function:
$ϕ(m · n) = \frac{ϕ(m) · ϕ(n) · gcd(m, n)}{ϕ(gcd(m, n))}$

\begin{eqnarray*}
\phi(m) = m \prod_{p \mid m } (1-\frac{1}{p}).  \\
\end{eqnarray*}
\begin{eqnarray*}
\phi(n) = n \prod_{p \mid n } (1-\frac{1}{p}).  \\
\end{eqnarray*}
\begin{eqnarray*}
\phi(mn) = mn \prod_{p \mid mn } (1-\frac{1}{p}).  \\
\end{eqnarray*}
\begin{eqnarray*}
\phi(gcd(m,n)) = gcd(m,n) \prod_{p \mid gcd(m,n) } (1-\frac{1}{p}).  \\
\end{eqnarray*}
\begin{eqnarray*}
\\\frac{\phi(m).\phi(n).gcd(m,n)}{\phi(gcd(m,n))} = \frac{m \prod_{p \mid m } (1-\frac{1}{p}).n \prod_{p \mid n } (1-\frac{1}{p}).gcd(m,n)}{gcd(m,n) \prod_{p \mid gcd(m,n) } (1-\frac{1}{p})}=mn \prod_{p \mid mn } (1-\frac{1}{p})=\phi(mn) \\ 
\end{eqnarray*} (since the gcd in the numerator and denominator cancel, and one product in the numerator cancels the one in the denominator).
Is this correct?
 A: First a mild diversion but an essential key concept:
Let $P_{m\text{ only}} = \{p\in \mathbb N|p$ is prime$; p\mid m; p\not \mid n\}$
Let $P_{n\text{ only}} = \{p\in \mathbb N|p$ is prime$; p\mid n; p\not \mid m\}$
And $P_{m,n\text{ both}} = \{p\in \mathbb N|p$ is prime$; p\mid m; p \mid n\}$
Now it's clear these sets are mutually disjoint (it's not possible for there to exist any primes that both do and do not divide a number). 
It's also clear that
$\{p\in \mathbb N|p$ is prime$; p\mid \gcd(m,n)\}=  P_{m,n\text{ both}}$
And that $\{p\in \mathbb N|p$ is prime$; p\mid n\} = P_{n\text{ only}}\cup P_{m,n\text{ both}}$
and that  $\{p\in \mathbb N|p$ is prime$; p\mid m\} = P_{m\text{ only}}\cup P_{m,n\text{ both}}$.
And that $\{p\in \mathbb N|p$ is prime$; p\mid nm\} = P_{n\text{ only}}\cup P_{m\text{ only}}\cup P_{m,n\text{ both}}$
Now we do all your work and conclude that:
$\begin{eqnarray*}
\$\frac{\phi(m).\phi(n).gcd(m,n)}{\phi(gcd(m,n))} = \frac{m \prod_{p \mid m } (1-\frac{1}{p}).n \prod_{p \mid n } (1-\frac{1}{p}).gcd(m,n)}{gcd(m,n) \prod_{p \mid gcd(m,n) } (1-\frac{1}{p})} \\ 
\end{eqnarray*}$
That much you were correct about but you did some canceling of products that just don't work as they were products of completely different indices.
But if we put these idexes to my $P$ notation:
$\frac{m \prod_{p \mid m } (1-\frac{1}{p}).n \prod_{p \mid n } (1-\frac{1}{p}).gcd(m,n)}{gcd(m,n) \prod_{p \mid gcd(m,n) } (1-\frac{1}{p})}=$
$\frac{m \prod_{p \in P_{m\text{ only}}\cup P_{m,n\text{ both}}} (1-\frac{1}{p}).n \prod_{p \in P_{n\text{ only}}\cup P_{m,n\text{ both}}} (1-\frac{1}{p}).gcd(m,n)}{gcd(m,n) \prod_{p \in P_{m,n\text{ both}}} (1-\frac{1}{p})}=$
$\frac{m \prod_{p \in P_{m\text{ only}}}(1-\frac 1p)\prod_{p \in  P_{m,n\text{ both}}} (1-\frac{1}{p}).n \prod_{p \in P_{n\text{ only}}}(1-\frac 1p)\prod_{p \in  P_{m,n\text{ both}}} (1-\frac{1}{p})).gcd(m,n)}{gcd(m,n) \prod_{p \in P_{m,n\text{ both}}} (1-\frac{1}{p})}=$
$mn \prod_{p \in P_{m\text{ only}}}(1-\frac 1p)\prod_{p \in P_{n\text{ only}}}(1-\frac 1p)\prod_{p \in  P_{m,n\text{ both}}} (1-\frac{1}{p}))=$
$mn \prod_{p \in P_{m\text{ only}}\cup P_{n\text{ only}}\cup P_{m,n\text{ both}}} (1-\frac 1p) =$
$mn \prod_{p|mn}(1-\frac 1p) = \phi(mn)$.
