# Condition for Denesting of Square Root/Lemma

## Theorem

Let $a, b, c, d \in \Q_{\ge 0}$.

Suppose $\sqrt b \notin \Q$.

Then:

$\sqrt {a + \sqrt b} = \sqrt {c + \sqrt d} \implies a = c, b = d$

## Proof

 $\displaystyle \sqrt {a + \sqrt b}$ $=$ $\displaystyle \sqrt {c + \sqrt d}$ $\displaystyle \leadsto \ \$ $\displaystyle a + \sqrt b$ $=$ $\displaystyle c + \sqrt d$ $\displaystyle \leadsto \ \$ $\displaystyle a - c$ $=$ $\displaystyle \sqrt d - \sqrt b$ $\displaystyle \leadsto \ \$ $\displaystyle \sqrt d - \sqrt b$ $\in$ $\displaystyle \Q$ Rational Subtraction is Closed

Aiming for a contradiction, suppose $b \ne d$.

Then:

 $\displaystyle \sqrt d - \sqrt b$ $\ne$ $\displaystyle 0$ $\displaystyle d - b$ $=$ $\displaystyle \paren {\sqrt d - \sqrt b} \paren {\sqrt d + \sqrt b}$ Difference of Two Squares $\displaystyle \leadsto \ \$ $\displaystyle \sqrt d + \sqrt b$ $=$ $\displaystyle \dfrac {d - b} {\sqrt d - \sqrt b} \in \Q$ Rational Division is Closed $\displaystyle \leadsto \ \$ $\displaystyle 2 \sqrt b$ $=$ $\displaystyle \paren {\sqrt d + \sqrt b} - \paren {\sqrt d - \sqrt b} \in \Q$ Rational Subtraction is Closed $\displaystyle \leadsto \ \$ $\displaystyle \sqrt b$ $\in$ $\displaystyle \Q$ Rational Division is Closed

But this contradicts our assertion that $\sqrt b \notin \Q$.

Hence our supposition that $b \ne d$ must be false.

Therefore we must have $b = d$.

Consequently:

$a - c = \sqrt d - \sqrt b = 0$

This implies $a = c$.

$\blacksquare$