Solution (source code)

= Solution

A <primitive root of unity> is an $n$th root of unity of multiplicative order exactly $n$.

Let $\zeta_m,\zeta_n\in K$ be primitive and let $H$ be the finite subgroup of $K^\times$ that they generate. By part a, $H$ is cyclic. Its order is divisible by both $m$ and $n$, hence by $N=\operatorname{lcm}(m,n)$. On the other hand every element of $H$ has $N$th power one, so the order of the cyclic group $H$ divides $N$. Its order is therefore exactly $N$, and a generator of $H$ is a primitive $N$th root of unity in $K$.