Solution (source code)

= Solution

An algebraic number is an algebraic integer when it is a root of a monic <polynomial> in $\mathbb Z[X]$.

If $\alpha$ and $\beta$ are algebraic integers, the <ring> $\mathbb Z[\alpha,\beta]$ is a finitely generated $\mathbb Z$-module. Multiplication by $\alpha\beta$ preserves this module, so the <algebraic integer module criterion> shows that $\alpha\beta$ is an algebraic integer.

The <ring of integers of a quadratic field> gives
$$
\mathcal O_{\mathbb Q(\sqrt2)}=\mathbb Z[\sqrt2],
$$
since $2\equiv2\pmod4$. For a direct verification, if $x=a+b\sqrt2$ with $a,b\in\mathbb Q$ is <integral>, then its trace $2a$ and norm $a^2-2b^2$ are integers. Writing $2a=m\in\mathbb Z$ and reducing the norm condition in lowest terms shows first that $b$ can have denominator at most $2$; a denominator $2$ with odd numerator would require $m^2\equiv2\pmod4$, which is impossible. Thus $b\in\mathbb Z$, and then the norm condition forces $m$ even, so $a\in\mathbb Z$. Conversely, every $a+b\sqrt2$ with $a,b\in\mathbb Z$ is <integral> because $\sqrt2$ is <integral> and algebraic integers form a <ring>.

Now let $f$ have degree $d$ and roots $\alpha_1,\ldots,\alpha_d$. Since
$$
2=M(f)=|a_d|\prod_j\max\{1,|\alpha_j|\}
$$
and $|\alpha_1|>1$, the integer $|a_d|$ cannot be $2$; hence $|a_d|=1$. Thus $f$ is monic up to sign and $\alpha_1$ is an algebraic integer.

Let $B$ be the product of all roots with <modulus> greater than one, counting multiplicity. Complex roots occur in conjugate pairs, so $B$ is real up to the signs of the real roots and
$$
|B|=M(f)=2.
$$
As a product of algebraic integers, $B$ is an algebraic integer; the equality forces $B=\pm2$. Therefore
$$
\frac{|N_{\mathbb Q(\alpha_1)/\mathbb Q}(\alpha_1)|}{2}
$$
is the absolute value of the product of the remaining conjugates, is rational, and is an algebraic integer. It is consequently a nonzero rational integer. Every remaining factor has <modulus> at most one, so this integer is at most one. It must equal one, and hence
$$
\boxed{|N_{\mathbb Q(\alpha_1)/\mathbb Q}(\alpha_1)|=2}.
$$
This is the <mahler-measure norm argument at measure two>.