1Function: galoisfixedfield
2Section: number_fields
3C-Name: galoisfixedfield
4Prototype: GGD0,L,Dn
5Help: galoisfixedfield(gal,perm,{flag},{v=y}): gal being a Galois group as
6 output by galoisinit and perm a subgroup, an element of gal.group or a vector
7 of such elements, return [P,x] such that P is a polynomial defining the fixed
8 field of gal[1] by the subgroup generated by perm, and x is a root of P in gal
9 expressed as a polmod in gal.pol. If flag is 1 return only P. If flag is 2
10 return [P,x,F] where F is the factorization of gal.pol over the field
11 defined by P, where the variable v stands for a root of P.
12Description:
13 (gen, gen, ?small, ?var):vec        galoisfixedfield($1, $2, $3, $4)
14Doc: \var{gal} being be a Galois group as output by \tet{galoisinit} and
15 \var{perm} an element of $\var{gal}.group$, a vector of such elements
16 or a subgroup of \var{gal} as returned by galoissubgroups,
17 computes the fixed field of \var{gal} by the automorphism defined by the
18 permutations \var{perm} of the roots $\var{gal}.roots$. $P$ is guaranteed to
19 be squarefree modulo $\var{gal}.p$.
20
21 If no flags or $\fl=0$, output format is the same as for \tet{nfsubfield},
22 returning $[P,x]$ such that $P$ is a polynomial defining the fixed field, and
23 $x$ is a root of $P$ expressed as a polmod in $\var{gal}.pol$.
24
25 If $\fl=1$ return only the polynomial $P$.
26
27 If $\fl=2$ return $[P,x,F]$ where $P$ and $x$ are as above and $F$ is the
28 factorization of $\var{gal}.pol$ over the field defined by $P$, where
29 variable $v$ ($y$ by default) stands for a root of $P$. The priority of $v$
30 must be less than the priority of the variable of $\var{gal}.pol$ (see
31 \secref{se:priority}).
32 In this case, $P$ is also expressed in the variable $v$ for compatibility
33 with $F$. Example:
34
35 \bprog
36 ? G = galoisinit(x^4+1);
37 ? galoisfixedfield(G,G.group[2],2)
38 %2 = [y^2 - 2, Mod(- x^3 + x, x^4 + 1), [x^2 - y*x + 1, x^2 + y*x + 1]]
39 @eprog\noindent
40 computes the factorization  $x^4+1=(x^2-\sqrt{2}x+1)(x^2+\sqrt{2}x+1)$
41