I am computing a Galois group as below in Sage.
K.<a> = NumberField(x^4-2)
L = K.galois_closure('b')
G=L.galois_group()
Here, $G=\text{Gal}(L/\mathbb{Q)} \simeq D_4$ where $L=\mathbb{Q}(\sqrt[4]{2},i)$ and$D_4$ is generated by rotation and reflections as it is the symmetry group of the square.
However, Sage returns the elements as below:
()
(1,2,8,7)(3,4,6,5)
(1,3)(2,5)(4,7)(6,8)
(1,4)(2,3)(5,8)(6,7)
(1,5)(2,6)(3,7)(4,8)
(1,6)(2,4)(3,8)(5,7)
(1,7,8,2)(3,5,6,4)
(1,8)(2,7)(3,6)(4,5)
Also,
G.gens()
returns
[(1,3)(2,5)(4,7)(6,8), (1,7,8,2)(3,5,6,4)]
and I can see that the output $(1,7,8,2)(3,5,6,4)$ is $r =(1,2,3,4)$ and $(1,3)(2,5)(4,7)(6,8)$ is $s = (14)(23)$.
How can I relate these two permutations?
P.s. I could not find anything about the labeling in the reference.
Edit. My question is extended as follows. As it was mentioned in the comments,
G.is_isomorphic(DihedralGroup(4))
returns true.
Now, I named the generators of $G$ and $D_4$ as $gr,gr$ and $dr,ds$ respectively:
dr = DihedralGroup(4).gens()[0]
ds = DihedralGroup(4).gens()[1]
print dr
print ds
returns
(1,2,3,4)
(1,4)(2,3)
and
gr = G.gens()[1]
gs = G.gens()[0]
print gs
print gr
returns
(1,2)(3,5)(4,6)(7,8)
(1,5,8,4)(2,6,7,3).
Next, I look for the Artin symbol $\sigma = \text{Fr}_{\mathfrak{p}}(K/\mathbb{Q})$ for primes above $3$. I expect to get $rs$ or $r3s$ as if $p \equiv 3 \pmod 4$ then $i^p \equiv -1 \pmod {p}$.
Thus, for $p=3 $, we have $$\sigma = \text{Fr}_{\mathfrak{p}} (K / \mathbb{Q}) = i^p \equiv -i \pmod p \iff \sigma = rs \text{ or } r^3 s$$ as $(rs)(i)=-i$ and $(r^3s)(i)=-i$.
However,
{G.artin_symbol(P) for P in L.primes_above(3)}
returns
{(1,2)(3,5)(4,6)(7,8), (1,7)(2,8)(3,4)(5,6)}
meanwhile, the output of $gr*gs$ and $gr^3 * gs$ is as below:
gr*gs = (1,3)(2,4)(5,7)(6,8)
gr^3*gs =(1,6)(2,5)(3,8)(4,7)
So, what is the problem that I am missing?
Let us start with the code:
The elements of the Galois group correspond to permutations of the roots of the minimal polynomial of $b$. To get this information, just ask
?Gin the ipython-sage-interpreter:So which is the minimal polynomial of $b$?
Well, this makes me angry already, what a bad choice! I would really want to have an $i$ and an element $$ \bbox[lightyellow]{\qquad A=\sqrt[4]2\qquad}$$ in $L$ (since $a$ is already given as an element in $K$), but now i am getting a weird $b$ from sage.
What could $A$ (real, positive root of $x^4=2$) be in terms of $b$?
What could $i$ be in terms of $b$?
In order the arrange an answer, i will work in sage on the $b$-world, this means inside of
L, but all the structure will suffer translations into the world of $K(i)=\Bbb Q(a,i)$. Instead of $i$ there is ajin code, think of it as an element in $L$ that maps to $i$ in $K(i)$. So we work with $b$ "algebraically", and look what happens with Galois morphisms when applied on: $$ \bbox[lightyellow]{ \qquad \begin{aligned} A &:= \frac1{240}(b^5 - 82b)\in L\ ,\\ j &:= \frac1{48}(b^4 + 14)\in L\ . \end{aligned} \qquad} $$ Let us ask for the action of each element of $G$ on these elements:And we get the information:
So the element that invariates $j$ and sends $A$ to $Aj$ is
$(1782)(3564)$, corresponding to a rotation $R$ in a a dihedral group. The element that invariates $A$, and maps $j\to -j$ is the "Spiegelung" $S$, given by $(15)(26)(37)(48)$ (and now at least we have a good labelling).
The morphism to the dihedral group is:
Now we have a morphism to $D_4$ from $G$ in its ugly implementation as permutation group of $b$ and Co(njugates).
This gives the images in $D_4$ of the wanted Artin-symbols for the four primes above $3$ in $L$: