jump to navigation

Fixed Field Computation: Magma vs PARI January 8, 2012

Posted by bossudenotredame in Function fields, Galois Theory, Magma.

This is how Magma computes the fixed field of a subgroup U of the Galois group of a number field K:

to_field := function(K, U:Partial := false)
if Type(K) eq FldCyc and Type(U) eq GrpAb then
G, Map:= CyclotomicAutomorphismGroup(K);
mG, G := CosetAction(G, sub);
U := U@mG;
Map := Inverse(mG) * Map;
G,_, Map:= AutomorphismGroup(K:Partial := Partial);
end if;
pe := PrimitiveElement(K);
if not IsSimple(K) then
f, GG := CosetAction(G, sub);
Map := Inverse(f)*Map;
G := GG;
U := f(U);
end if;
assert IsTransitive(G);
rt := [pe@(g@Map) where _, g := IsConjugate(G, 1, i) : i in [1..#G]];
if G eq U then
i := SLPolynomialRing(Integers(), Degree(G));
i := &+ [i.j : j in [1..Degree(G)]];
i := RelativeInvariant(G, U);
end if;
t := Polynomial([0,1]);
all_t := {t};
a,b := GetSeed();
r := { Evaluate(i,
[Evaluate(t, x) : x in PermuteSequence(rt, u)]) :
u in Transversal(G, U)};
t := Polynomial([Random(2) : x in all_t] cat [1]);
until t notin all_t;
Include(~all_t, t);
until #r eq #G div #U;
f := &*[Polynomial([-s, 1]) : s in r];
if #G eq Degree(K) then
f := Polynomial(BaseField(K), f);
c := sub;
f := Polynomial(c, f);
end if;
if not exists(x){x : x in r | sub eq U} then
error "cannot find correct embedding";
end if;
k := NumberField(f:Check := false);
Embed(k, K, x);
if #G ne Degree(K) then
k := AbsoluteField(k);
Embed(k, K, K!k.1);
end if;
return k;
end function;

And this is how PARI does it:

galoisfixedfield(GEN gal, GEN perm, long flag, long y)
pari_sp lbot, ltop = avma;
GEN T, L, P, S, PL, O, res, mod, mod2;
long x, n, i;
if (flag2) pari_err(flagerr, "galoisfixedfield");
gal = checkgal(gal); T = gal_get_pol(gal);
x = varn(T);
L = gal_get_roots(gal); n = lg(L)-1;
mod = gal_get_mod(gal);
if (typ(perm) == t_VEC)
if (is_group(perm)) perm = gel(perm, 1);
for (i = 1; i val)
fprintferr("GaloisConj:increase p-adic prec by %ld.\n", Pgb.valabs-val);
PL = ZpX_liftroots(P, PL, Pgb.l, Pgb.valabs);
L = ZpX_liftroots(T, L, Pgb.l, Pgb.valabs);
mod = Pgb.ladicabs;
PM = vandermondeinversemod(PL, P, Pden, mod);
if (y < 0) y = fetch_user_var("y");
if (y <= x)
pari_err(talker,"variable priority too high in galoisfixedfield");
lbot = avma; res = cgetg(4, t_VEC);
gel(res,3) = fixedfieldfactor(L,O,gal_get_group(gal), PM,Pden,mod,mod2,x,y);
gel(res,1) = gcopy(P);
gel(res,2) = gmodulo(S, T);
return gerepile(ltop, lbot, res);



No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: