Commit a493db90 authored by Gonzalo Tornaría's avatar Gonzalo Tornaría

improve run-test

parent 22c45fa9
......@@ -14,12 +14,16 @@
AttachSpec("mod.spec");
// max prime to check frobenius
if not assigned(BOUND) then
BOUND := 500;
end if;
t0 := Cputime();
//// FIND the correct rho : gal --> Sp(4, 2)
gal, r, s := GaloisGroup(K0);
assert GaloisProof(K0, s);
//// FIND the correct rho : gal --> Sp(4, 2)
rhos := MonomorphismRepresentatives(gal, Sp(4,2));
cc := [c[3] : c in ConjugacyClasses(gal)];
for p_ap in residual_traces do
......@@ -29,21 +33,39 @@ for p_ap in residual_traces do
rhos := [ rho : rho in rhos
| &or [Trace(rho(c)) eq ap : c in cc_frob] ];
end for;
assert #rhos eq 1;
rho := rhos[1];
discK0 := Discriminant(MaximalOrder(K0));
frobK0 := AssociativeArray();
trace1 := AssociativeArray();
for p in PrimesUpTo(BOUND) do
if discK0 mod p eq 0 then
continue;
end if;
frob := FrobeniusStructure(K0, p);
tr := [Trace(rho(c)) : c in cc | CycleStructure(c) eq frob];
if #tr ne 1 then
// identify the exact conjugacy class of frobenius
fe := FrobeniusElement(K0, p);
tr := [Trace(rho(fe))];
end if;
frobK0[p] := frob;
trace1[p] := tr[1];
end for;
tr := func<g | g[1,5]+g[2,6]+g[3,7]+g[4,8]>;
tr1 := func<g | g[1,1]+g[2,2]+g[3,3]+g[4,4]>;
m := ModNew(K0, rho);
PS := Multiset([]);
//time for i in [1..10] cat [1562] do
printf "Init time: %o s\n\n", Cputime(t0);
time for i := 1 to num_fields do
t := Cputime();
R2 :=fields(i);
gal2 := gals(i);
//assert IsConjugate(S20, gal2, GaloisGroup(R2));
cc2 := [c[3] : c in ConjugacyClasses(gal2)];
///// ModPhis
......@@ -59,26 +81,12 @@ time for i := 1 to num_fields do
end for;
/////
dim := Integers() ! Log(2, #gal2/#gal);
ps := [];
for phi in phis do
///// check phi gives the correct traces
for p_ap in residual_traces do
p, ap := Explode(p_ap);
frob2 := FrobeniusStructure(R2, p);
cc2_frob := [c : c in cc2 | CycleStructure(c) eq frob2];
if &and [tr1(phi(c)) ne ap : c in cc2_frob] then
Append(~ps, -p);
continue phi;
end if;
end for;
if &and [ tr(phi(x)) eq 0 : x in cc2 ] then
Append(~ps, 1);
continue phi;
end if;
/////
// precompute the conjugacy classes grouped by cycle decomposition
fc := AssociativeArray();
for c2 in cc2 do
c1 := c2 @ phi @ m`SG`pi @@ rho;
......@@ -89,27 +97,62 @@ time for i := 1 to num_fields do
Append(~fc[pat], c2);
end if;
end for;
for p in PrimesUpTo(200) do
if m`discR1 mod p eq 0 then
for p in PrimesUpTo(BOUND) do
if discK0 mod p eq 0 then
continue;
end if;
pat := <m`frobR1[p], FrobeniusStructure(R2, p)>;
pat := <frobK0[p], FrobeniusStructure(R2, p)>;
if not IsDefined(fc, pat) then
// phi does *not* extend rho
Append(~ps, -p);
continue phi;
end if;
all_classes := [ c : c in fc[pat]
| tr1(phi(c)) eq trace1[p] ];
if all_classes eq [] then
// phi does *not* extend rho
Append(~ps, -p);
continue phi;
end if;
all_classes := fc[pat];
bad_classes := [ c : c in all_classes | tr(phi(c)) eq 0 ];
if bad_classes eq [] then
// frob_p is obstructing for this phi !
Append(~ps, p);
continue phi;
end if;
end for;
// Trivial cocycle
if &and [ tr(phi(x)) eq 0 : x in cc2 ] then
Append(~ps, 1);
continue phi;
end if;
/* NOT GOOD -- it's not canonical
// now check the frobenius element
for p in PrimesUpTo(BOUND) do
if discK0 mod p eq 0 then
continue;
end if;
frob := FrobeniusElement(R2, p);
galgal, _, s := GaloisGroup(R2);
assert GaloisProof(R2, s);
assert frob in galgal;
b, iso := IsIsomorphicPerm(galgal, gal2);
assert b;
if tr(phi(iso(frob))) eq 1 then
Append(~ps, p);
continue phi;
end if;
end for;
// Bad cocycle
*/
// Bad cocycle (should not happen!)
Append(~ps, 0);
end for;
//ps := [ModPrimes(m, R2, proj, phi) : phi in phis];
for p in ps do
Include(~PS, p);
end for;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment