Let $K = \mathbb{Q}(\zeta_5)$ be the fifth cyclotomic field. I write the following code in sage
K.<z> = CyclotomicField(5)
L.<a1> = K.galois_closure()
for i in L.galois_group():
print i
which returns
()
(1,2,3,4)
(1,3)(2,4)
(1,4,3,2)
as the automorphisms of $K$. However, the automorphisms must be given by $$\sigma_k: \zeta_5 \mapsto \zeta_5^k $$ for $k \in \{1,2,3,4\}$ and for $k = 2$, I get the following result: $$\zeta_5 \mapsto\zeta_5^2 \mapsto \zeta_5^4 \mapsto \zeta_5^3.$$ Thus, I end up with the permutation $(1243)$ which does not appear in the Sage output. What is the point that I am missing here?
Let us consider the sage objects in detail:
So there is no need to take the Galois closure. Well, doing so we get some
a1which differs fromz, let us compare:OK, now let us consider the Galois group of $K$, its elements and their action on $z$:
The cyclotomic unit $z=\zeta_5$ comes with the usual complex embedding $ \cos\frac {2\pi}5 + i\sin\frac {2\pi}5 $, and the generator $(1234)$ of the Galois group maps $z$ to $z^2$, and the full chain is $$ z\to z^2\to z^4\to z^8=z^3\to z^{16}=z\ . $$ This corresponds to the permutation, written as a cycle: $$ (z,z^2,z^4,z^3)\ . $$ Now write instead of $z,z^2,z^4,z^3$ formally the symbols $1,2,3,4$.
In general, the elements of a Galois group of some Galois field $K$ are realized as permutations of the set of roots of the defining polynomial of $K$. (In case of a non-normal $K$, we pass to the Galois closure $L$, use the defining polynomial of $L$.)