Solving Solvable Polynomials with Galois Theory (Part 1)
06 Aug 2021  Tags: sage , solvingsolvablepolynomials
I’m super excited to be writing this post up! It’s been haunting me for almost exactly a month now, and it feels good to be close enough to done that I can finally share my hard work with the world ^_^.
I’ve been spending a lot of time studying galois theory in the past little while, since it’s easily my weakest area in the standard algebra curriculum. I’ve been meaning to really sit down and learn it for a few years now, but there’s always been something more pressing. I’m not a fan of the qual system overall, but I guess nothing is entirely without merit, and if I’m being honest with myself? I don’t know when I would have gotten around to learning galois theory if it weren’t for the upcoming quals.
Now, one of the most famous theorems in galois theory is that the roots of a polynomial $f$ (in $\mathbb{Q}[x]$, say) can be expressed with nested radicals if and only if the galois group $G$ of $f$ is solvable. So, if I were to give you a polynomial with solvable galois group, would you know how to actually… solve it?
The proof that’s given in most books is actually constructive, but enough details are left out to make it mostly unimplementable. I eventually found Gaal’s Classical Galois Theory With Examples, which is very explicit about how to do the solving process. In this blog post, we’re going to focus in on the case where most of the work is done: that of a cyclic group of prime order^{1}. You’ll remember that every solvable group is an interated extension of these groups (in fact, this is basically the definition of solvable), so by tackling this case, we’ll get the full solvability case by iteration. I’ll write up a follow up blog post soon where we talk about that process.
For now, though let’s see the algorithm:
Let $f$ be a monic polynomial of degree $n$ with cyclic galois group, generated by $\sigma$.

Let $\alpha_0, \ldots, \alpha_{n1}$ be the roots of $f$ – these are just symbols for now. But without loss of generality order them so that $\sigma \alpha_j = \alpha_{j+1}$.

Let $\omega$ be an $n$th root of unity

Look at the equations $\theta_k = \sum_{0 \leq j \lt n} \omega^{j k} \alpha_j$. Notice $\sigma \theta_k = \omega^k \theta_k$ (do you see why?). This means
\(\sigma \theta_k^n = (\sigma \theta_k)^n = \omega^{nk} \theta_k^n = \theta_k^n\)
so $\theta_k^n$ is fixed by $\sigma$ (and thus the whole galois group). 
Since $\theta_k^n$ is fixed by $G$, it must lie in the base field. So it’s just a number, $\psi_k$. That means $\theta_k = \sqrt[n]{\psi_k}$.

Now we recover $\alpha_0 = \frac{1}{n} \sum \sqrt[n]{\psi_k}$. In fact, we can recover each of the $\alpha_j$ as a weighted average of the $\psi_k$. Do you see how?^{2}
This is great and all, but there’s a bit of magic that happens in step $4$… How do we actually figure out what the $\psi_k$s are in the base field? Getting $\psi_0$ is pretty easy: It’s the first elementary symmetric polynomial, and as such, it’s just (the negation of) the $x^{n1}$ coefficient of $f$!
This is actually a clue for how we might in theory get each of the $\psi_k$. Even though the other $\psi_k$ aren’t symmetric in the $\alpha_j$, we can still leverage the theorem of symmetric polynomials (with some work) to figure out which numbers the $\psi_k$ really are. This is where Gaal’s book was first helpful – it introduced me to the following idea:
Consider the polynomial (which I now know is called the galois resolvent)
\[\mathcal{L}(t) = \prod \{ t  \tilde{\psi} \mid \tilde{\psi} \in \mathfrak{S}_n \cdot \psi_1 \}.\]This product ranges over the orbit of $\psi_1$ under the action of the symmetric group (which permutes the $\alpha_j$ inside $\psi_1$). Notice that each of the $\psi_k$ for $k \neq 0$ are in this orbit (do you see why?) so each nonzero $\psi_k$ is a root of $\mathcal{L}$.
A priori, $\mathcal{L}$ lives in $\mathbb{Q}(\omega)[\alpha_0, \ldots, \alpha_{n1}][t]$, since the $\psi$s are all polynomials in the $\alpha_j$. But the coefficients of $\mathcal{L}$ are all symmetric in the orbit of $\psi_1$, and thus, symmetric in the $\alpha_j$ (again, do you see why?). So $\mathcal{L}$ is actually an element of $\mathbb{Q}(\omega)[t]$! But we know how to find the roots of a polynomial with constant coefficients (or rather, sage does), and these roots are exactly the $\psi_k$!
I coded it up, and… it crashed my desktop. In lieu of downloading more ram, I tried to optimize my code (see here), which still didn’t work. I also tried to find a more effective procedure (see here), but it seems like this is really how it’s done. I know it’s been done before (in the gap radiroot package, for instance), but I didn’t want to have to reverse engineer someone else’s code unless I absolutely had to^{3}. So, I kept looking.
Eventually I learned that $\mathcal{L}$ is called the resolvent, and I spent some time learning more about resolvents and why they’re interesting and useful^{4}. So my next step was to find an efficient algorithm for evaluating resolvents, and I found one! My code here is an implmentation of the algorithm described in Lehobey’s Resolvent Computations By Resultants Without Extraneous Powers, which is super readable if you’re interested!
It’s still kind of slow, but it’s less memory intensive, and it definitely gets the job done!
The sagemath online server times these out for polynomials of degree $5$ and $7$, but you can run this code locally to see that it does give the right answer^{5}. The degree $5$ case is slow, but manageable. The degree $7$ case is… really impressively slow. You’ve been warned.
As a slightly tricky exercise, we’re assuming throughout that we have access to roots of unity… But how do we know that we can write roots of unity in terms of radicals?
Show that roots of unity can always be written in terms of radicals^{6}.

I’m fairly confident this will work on cyclic groups of composite order too, and I’ve even tested it on a few polynomials of degree $4$. But the prime case is all we need for solvability, and I can say for sure that it always works in that case, so that’s what we’re going with. ↩

As a little hint, you’ll only need to scale the $\psi_k$ by powers of $\omega$. You should try writing these sums out, say in the $n=3$ case, to try and get a handle for what’s going on. You might also want to watch Richard E Borcherds’ (characteristically excellent) video here
As a massive hint (and a cute connection with the rest of mathematics), the $\theta_k$ are actually the Discrete Fourier Transform of the $\alpha_j$! So once we know the $\theta_k$s, we can recover the $\alpha_j$s using the inverse DFT! ↩

Especially since the package is based on Andreas Distler’s thesis, and my German is…. nicht so gut. ↩

There’s not much sense writing up a post about it, though, since there’s actually a ton of great resources on this! Healey’s Resultants, Resolvents, and the Computation of Galois Groups (available here) certainly comes to mind. ↩

The answers are pretty unwieldy, though. So maybe it’s for the best you need to run it locally.
For instance, if $\zeta$ is an $11$th root of unity, then $\mathbb{Q}(\zeta)$ is a cyclic extension of degree $10$. This means $\zeta + \zeta^{1}$ (which is of degree $2$ under $\mathbb{Q}(\zeta)$) generates an extension of degree $5$ over $\mathbb{Q}$.
Sage tells us the minimal polynomial of $\zeta + \zeta^{1}$ is $x^5 + x^4  4x^3  3x^2 + 3x + 1$, and so we can use this code to write $\zeta + \zeta^{1}$ as:
\[\begin{aligned} \frac{\alpha^3 + 4 \alpha^2 + 16 \alpha + 64}{320} \, {\left( \frac{165}{64} \, {\alpha}^{3}  \frac{385}{16} \, {\alpha}^{2}  \frac{275}{4} \, \alpha  451 \right)}^{\frac{1}{5}} \\ + \frac{\alpha}{20} \, {\left(\frac{55}{32} \, {\alpha}^{3} + \frac{55}{8} \, {\alpha}^{2} + \frac{275}{4} \, \alpha  176 \right)}^{\frac{1}{5}} \\ + \frac{1}{10} \, {\left( \frac{385 \, {\alpha}^{3} + 440 \, {\alpha}^{2} + 3520 \, \alpha  4224}{2} \right)}^{\frac{1}{5}}\\ + \frac{1}{5} \, {\left(\frac{55}{32} \, {\alpha}^{3} + \frac{165}{16} \, {\alpha }^{2}  55 \, \alpha  286 \right)}^{\frac{1}{5}} \\  \frac{1}{5} \end{aligned}\]where $\alpha = \sqrt{5} + i \, \sqrt{2 \, \sqrt{5} + 10}  1$.
NB: I made the substitution for $\alpha$ myself, so there might be a minor arithmetic error in the above expression… Though I don’t think that’s actually very important :P ↩

As a hint, let $\zeta$ be an $n$th root of unity for $n$ odd. First show that you can recover $\zeta$ from $\zeta + \zeta^{1}$, and that $\zeta + \zeta^{1}$ satisfies a (cyclic) equation of degree $\frac{n1}{2}$. Then, inductively, we can solve this by radicals, and then get $\zeta$ with one more square root.
Do you see how to do the $n$ even case as well? ↩