## Mathematica makes me want to cry: standard radical form edition

Here is a thing that makes me want to cry: every high school student at some point learns about putting things in something called “standard radical form.”  For example, I learned to simplify $\frac{2 + \sqrt{3}}{1 - \sqrt{3}}$ by multiplying the top and bottom by the conjugate of the denominator, yielding

$\displaystyle \frac{2 + \sqrt{3}}{1 - \sqrt{3}} = \frac{(2 + \sqrt{3})(1 + \sqrt{3})}{(1 - \sqrt{3})(1 + \sqrt{3})} = - \frac{5 + 3 \sqrt{3}}{2}.$

This is maybe a stupid thing to teach high school students, but it is at least related to a very non-stupid thing, which is that when you take an algebraic extension of a field, like say $\mathbb{Q}(\sqrt{5})$, the resulting object is a vector space over the base field with dimension given by the degree of the adjoined element and an explicit basis given by powers of that element.  (This is not the only possible choice for what the non-stupid thing is.)  What this means is that if I write down any expression that is a result of additions, subtractions, multiplications and divisions involving only rational numbers and (say) the square root of 5, there is an honest canonical way to write this, namely as $a + b \sqrt{5}$ for some rational numbers a and b.  Thus testing whether two such expressions are equal is theoretically trivial.

All of this build-up is to an uninteresting conclusion, namely, that Mathematica doesn’t know any of the above facts.  In particular, none of its built-in simplification tools take advantage of these simple canonical forms.  The result is that it is quite a lot of work to do almost anything that requires one to compare numbers in such field extensions, and so for example if you ask Mathematica for the positions of $(1 + \sqrt{5})/2$ in a list that contains both $(1 + \sqrt{5})/2$ and $2/(\sqrt{5} - 1)$, it will only tell you about instances of the first element.  Alas.