"This code computes the conspicuous sets of composition factors (takes about a day) and then checks that there are elements of order 765 as in the paper. There is a separate code, PSU316Code.txt, that checks, for a given number between 1 and 28, that the statements in the paper that the eigenvalues of x, x^3 and x^15 determine the E8-class of these elements are correct. In this file one finds the code needed to check that.";

load "Subgroups/functions.txt";

function LargeModulesSelfDual(Irr,n)

Irrsmall:=[]; 
for i in Irr do if(Dimension(i) le n) then Append(~Irrsmall,i); end if; end for;

for i in [1..#Irrsmall] do
  if(not(IsSelfDual(Irrsmall[i]))) then
    Irrsmall[i]:=DirectSum(Irrsmall[i],Dual(Irrsmall[i]));
  end if;
end for;
Irrsmall:=StripDuplicates(Irrsmall);
IrrDual:=[];
for i in Irrsmall do if(Dimension(i) le n) then Append(~IrrDual,i); end if; end for;
return OrderByDimension(IrrDual);

end function;

function FindOrb(Orbs,i)
for Orb in Orbs do if(i in Orb) then return Orb; end if; end for;
return {};
end function;


function OrbitReps(X,frob)

Orbs:=[];
SpanOfOrbs:=[];
for i in X do
  if(not(Sort(i) in SpanOfOrbs)) then
    Append(~Orbs,i);
    SpanOfOrbs cat:=[Sort(i^(frob^j)):j in [1..Order(frob)-1]];
  end if;
end for;
return Orbs;
end function;

q:=2^24;
m:=765;
F<w>:=GF(q);
n:=(q-1) div m;
G:=GroupOfLieType("E8",q);
V:=VectorSpace(GF(q),8);
rho1:=StandardRepresentation(G);
Over1:=GL(248,q);
g1:=elt<G|V![w^n,1,1,1,1,1,1,1]>;
g2:=elt<G|V![1,w^n,1,1,1,1,1,1]>;
g3:=elt<G|V![1,1,w^n,1,1,1,1,1]>;
g4:=elt<G|V![1,1,1,w^n,1,1,1,1]>;
g5:=elt<G|V![1,1,1,1,w^n,1,1,1]>;
g6:=elt<G|V![1,1,1,1,1,w^n,1,1]>;
g7:=elt<G|V![1,1,1,1,1,1,w^n,1]>;
g8:=elt<G|V![1,1,1,1,1,1,1,w^n]>;
W:=Reflections(G);
Mats1:=[rho1(i):i in [g1,g2,g3,g4,g5,g6,g7,g8]];
MatsE:=[rho1(i):i in W];
NGT:=sub<Over1|Mats1 cat MatsE>;
T:=sub<NGT|Mats1>;
E:=sub<NGT|MatsE>;

T17:=sub<T|[T.i^45:i in [1..8]]>;
T51:=sub<T|[T.i^15:i in [1..8]]>;
T85:=sub<T|[T.i^9:i in [1..8]]>;
T255:=sub<T|[T.i^3:i in [1..8]]>;

R:=ResidueClassRing(765);
X:=[[R!Log((T.j)[i,i]):i in [1..248]]:j in [1..8]];

G2:=SU(3,16);
CC:=ConjugacyClasses(G2);

S1:=TrivialModule(G2,GF(256));
S31:=GModule(G2); S31d:=Dual(S31);
S32:=GModule(G2,FrobeniusImage(S31,1)); S32d:=Dual(S32);
S33:=GModule(G2,FrobeniusImage(S31,2)); S33d:=Dual(S33);
S34:=GModule(G2,FrobeniusImage(S31,3)); S34d:=Dual(S34);
S81:=TensorProduct(S31,S31d); S81:=S81/Fix(S81);
S82:=TensorProduct(S32,S32d); S82:=S82/Fix(S82);
S83:=TensorProduct(S33,S33d); S83:=S83/Fix(S83);
S84:=TensorProduct(S34,S34d); S84:=S84/Fix(S84);
S912:=TensorProduct(S31,S32); S912d:=Dual(S912);
S921:=TensorProduct(S31,S32d); S921d:=Dual(S921);
S913:=TensorProduct(S31,S33); S913d:=Dual(S913);
S931:=TensorProduct(S31,S33d); S931d:=Dual(S931);
S914:=TensorProduct(S31,S34); S914d:=Dual(S914);
S941:=TensorProduct(S31,S34d); S941d:=Dual(S941);
S923:=TensorProduct(S32,S33); S923d:=Dual(S923);
S932:=TensorProduct(S32,S33d); S932d:=Dual(S932);
S924:=TensorProduct(S32,S34); S924d:=Dual(S924);
S942:=TensorProduct(S32,S34d); S942d:=Dual(S942);
S934:=TensorProduct(S33,S34); S934d:=Dual(S934);
S943:=TensorProduct(S33,S34d); S943d:=Dual(S943);
S2412:=TensorProduct(S31,S82); S2412d:=Dual(S2412);
S2421:=TensorProduct(S32,S81); S2421d:=Dual(S2421);
S2413:=TensorProduct(S31,S83); S2413d:=Dual(S2413);
S2431:=TensorProduct(S33,S81); S2431d:=Dual(S2431);
S2414:=TensorProduct(S31,S84); S2414d:=Dual(S2414);
S2441:=TensorProduct(S34,S81); S2441d:=Dual(S2441);
S2423:=TensorProduct(S32,S83); S2423d:=Dual(S2423);
S2432:=TensorProduct(S33,S82); S2432d:=Dual(S2432);
S2424:=TensorProduct(S32,S84); S2424d:=Dual(S2424);
S2442:=TensorProduct(S34,S82); S2442d:=Dual(S2442);
S2434:=TensorProduct(S33,S84); S2434d:=Dual(S2434);
S2443:=TensorProduct(S34,S83); S2443d:=Dual(S2443);
S6412:=TensorProduct(S81,S82);
S6413:=TensorProduct(S81,S83);
S6414:=TensorProduct(S81,S84);
S6423:=TensorProduct(S82,S83);
S6424:=TensorProduct(S82,S84);
S6434:=TensorProduct(S83,S84);

Irr2:=[S1,S31,S31d,S32,S32d,S33,S33d,S34,S34d,S81,S82,S83,S84,S912,S912d,S921,S921d,S913,S913d,S931,
S931d,S914,S914d,S941,S941d,S923,S923d,S924,S924d,S942,S942d,S932,S932d,S934,S934d,S943,S943d,
S2412,S2412d,S2421,S2421d,S2413,S2413d,S2431,S2431d,S2414,S2414d,S2441,S2441d,S2423,S2423d,
S2432,S2432d,S2424,S2424d,S2442,S2442d,S2434,S2434d,S2443,S2443d,S6412,S6413,S6414,S6423,S6424,S6434];

for i in Irr2 do if(Dimension(i) eq 3) then
 for j in Irr2 do if(Dimension(j) eq 9) then
   Irr2:=AppendWithoutDuplicates(Irr2,CompositionFactors(TensorProduct(i,j)));
     end if; end for;
  end if; end for;
  for i in Irr2 do if(Dimension(i) eq 8) then
     for j in Irr2 do if(Dimension(j) eq 9) then
       Irr2:=AppendWithoutDuplicates(Irr2,CompositionFactors(TensorProduct(i,j)));
     end if; end for;
  end if; end for;
  for i in Irr2 do if(Dimension(i) eq 9) then
     for j in Irr2 do if(Dimension(j) eq 9) then
       Irr2:=AppendWithoutDuplicates(Irr2,CompositionFactors(TensorProduct(i,j)));
     end if; end for;
end if; end for;
Irr2:=OrderByDimension(Irr2);


Irr:=LargeModulesSelfDual(Irr2,248);
dims:=[Dimension(i):i in Irr];

w255:=w^(3*n);
for i in [211..274] do if(EigenvaluesOfElement(S31,CC[i,3]) eq { <w255^15, 1>, <w255^239, 1>, <w255, 1> }) then x:=CC[i,3]; end if; end for;

function EigsToMultiset(E)
return {*i[1]^^i[2]:i in E*};
end function;

w15:=w255^17;
w17:=w255^15;
load "Traces/E8/Tr17E8EigsFF";
Tr17:={EigsToMultiset(E):E in Tr17E8Eigs};
al17:=Position([i[1]:i in CC],17);
load "Traces/E8/Tr15E8EigsFF";
Tr15:={EigsToMultiset(E):E in Tr15E8Eigs};
al15:=Position([i[1]:i in CC],15);

load "Traces/E8/TracesE8.txt";


"Now we compute the conspicuous sets of composition factors. This takes about a day";

// We use a specialised program rather than
// ComputeConspicuousFactorsE8 because of
// the number of possibilities.

AnsTot:=[];
AnsTotPre:=[];


AnsA:=RestrictedPartitions(248,{Dimension(i):i in Irr});
AnsB:=[i:i in AnsA|[&+[Multiplicity(i,j):j in [1,64]]-Multiplicity(i,8)] in Tr3E8];
AnsC:=[i:i in AnsB|&+[Multiplicity(i,j):j in [18,18]]-Multiplicity(i,1) gt 0 or not(1 in i)];

Eigs17:=[EigsToMultiset(EigenvaluesOfElement(i,CC[al17,3])):i in Irr];
Eigs15:=[EigsToMultiset(EigenvaluesOfElement(i,CC[al15,3])):i in Irr];

for cca in [1..#AnsC] do
  "Testing case",cca;
  Ans:=[AnsC[cca]];
  
  BlockSigs:=Sort(SetToSequence(SequenceToSet(Ans[1])));
  Blocks:=[[i:i in Ans[1]|i eq j]:j in BlockSigs];
  Bits:=[];
  
  for jj in Blocks do
    Ans:=[jj];
    Ans2:=[];
    for CurrentDegreeSeq in Ans do
      NewAns:=[];
      for j in SequenceToSet(CurrentDegreeSeq) do
        m:=[]; for k in [1..#dims] do if(dims[k] eq j) then Append(~m,k); end if; end for;
        n:=Multiplicity(SequenceToMultiset(CurrentDegreeSeq),j);
        // n:=0; for k in CurrentDegreeSeq do if(k eq j) then n+:=1; end if; end for;
        ThingsToAppend:=DecreasingSequences(n,m);
        if(NewAns eq []) then NewAns:=ThingsToAppend; delete ThingsToAppend;
        else
          NewAns2:=[];
          for alpha in NewAns do
            for beta in ThingsToAppend do Append(~NewAns2,alpha cat beta); end for;
          end for;
          delete NewAns; NewAns:=NewAns2; delete NewAns2; delete ThingsToAppend;
        end if;
      end for;
      Ans2 cat:=NewAns;
    end for;
    Append(~Bits,Ans2);
    delete Ans2;
  end for;

  Tral:=[ [ &join[Eigs15[j]:j in k]:k in jj]:jj in Bits];
  TrSetal:=[SequenceToSet(i):i in Tral];
  bigno:=&*[#i:i in TrSetal];
  Ans2:=[];

  if(#TrSetal eq 2) then

    for i in TrSetal[1] do for j in TrSetal[2] do
      if(i join j in Tr15) then
        a1:=[Bits[1,ii]:ii in [1..#Tral[1]]|Tral[1,ii] eq i];
        a2:=[Bits[2,ii]:ii in [1..#Tral[2]]|Tral[2,ii] eq j];
        Ans2:= Ans2 cat [a cat b:a in a1,b in a2];
      end if;
    end for; end for;

  elif(#TrSetal eq 3) then

  for i in TrSetal[1] do for j in TrSetal[2] do for k in TrSetal[3] do
    if(i join j join k in Tr15) then
      a1:=[Bits[1,ii]:ii in [1..#Tral[1]]|Tral[1,ii] eq i];
      a2:=[Bits[2,ii]:ii in [1..#Tral[2]]|Tral[2,ii] eq j];
      a3:=[Bits[3,ii]:ii in [1..#Tral[3]]|Tral[3,ii] eq k];

      Ans2:= Ans2 cat [a cat b cat c:a in a1,b in a2, c in a3];
    end if;
  end for; end for; end for;

  elif(#TrSetal eq 4) then

  for i in TrSetal[1] do for j in TrSetal[2] do for k in TrSetal[3] do for l in TrSetal[4] do
    if(i join j join k join l in Tr15) then
      a1:=[Bits[1,ii]:ii in [1..#Tral[1]]|Tral[1,ii] eq i];
      a2:=[Bits[2,ii]:ii in [1..#Tral[2]]|Tral[2,ii] eq j];
      a3:=[Bits[3,ii]:ii in [1..#Tral[3]]|Tral[3,ii] eq k];
      a4:=[Bits[4,ii]:ii in [1..#Tral[4]]|Tral[4,ii] eq l];

      Ans2:= Ans2 cat [a cat b cat c cat d:a in a1,b in a2, c in a3, d in a4];
    end if;
  end for; end for; end for; end for;

  elif(#TrSetal eq 5) then

  for i in TrSetal[1] do for j in TrSetal[2] do for k in TrSetal[3] do
    for l in TrSetal[4] do for m in TrSetal[5] do
      if(i join j join k join l join m in Tr15) then
        a1:=[Bits[1,ii]:ii in [1..#Tral[1]]|Tral[1,ii] eq i];
        a2:=[Bits[2,ii]:ii in [1..#Tral[2]]|Tral[2,ii] eq j];
        a3:=[Bits[3,ii]:ii in [1..#Tral[3]]|Tral[3,ii] eq k];
        a4:=[Bits[4,ii]:ii in [1..#Tral[4]]|Tral[4,ii] eq l];
        a5:=[Bits[5,ii]:ii in [1..#Tral[5]]|Tral[5,ii] eq m];

        Ans2:= Ans2 cat [a cat b cat c cat d cat e:a in a1,b in a2, c in a3, d in a4, e in a5];
      end if;
    end for; end for; end for;
  end for; end for;

  elif(#TrSetal eq 6) then

    for i in TrSetal[1] do for j in TrSetal[2] do for k in TrSetal[3] do
      for l in TrSetal[4] do for m in TrSetal[5] do for o in TrSetal[6] do
        if(i join j join k join l join m join o in Tr15) then
          a1:=[Bits[1,ii]:ii in [1..#Tral[1]]|Tral[1,ii] eq i];
          a2:=[Bits[2,ii]:ii in [1..#Tral[2]]|Tral[2,ii] eq j];
          a3:=[Bits[3,ii]:ii in [1..#Tral[3]]|Tral[3,ii] eq k];
          a4:=[Bits[4,ii]:ii in [1..#Tral[4]]|Tral[4,ii] eq l];
          a5:=[Bits[5,ii]:ii in [1..#Tral[5]]|Tral[5,ii] eq m];
          a6:=[Bits[6,ii]:ii in [1..#Tral[6]]|Tral[6,ii] eq o];
          Ans2:= Ans2 cat [a cat b cat c cat d cat e cat f:a in a1,b in a2, c in a3, d in a4, e in a5,f in a6];
        end if;
      end for; end for; end for;
    end for; end for; end for;
  
    else "SOMETHING GONE WRONG"; break cca;
  end if;

  delete Tral; delete TrSetal; delete Bits;
  AnsTotPre cat:=Ans2; "AnsTotPre has size",#AnsTotPre;
  Ans3:=[];
  for i in [1..#Ans2] do
    if (i mod 100000) eq 0 then i,#Ans2,#Ans3; end if;
    test:=&join[Eigs17[k]:k in Ans2[i]];
    if(test in Tr17) then Append(~Ans3,Ans2[i]); end if;
  end for;
  delete Ans2;
  AnsTot cat:=Ans3; "AnsTot has size",#AnsTot;
  delete Ans3;
end for;
AnsTott:=Sort([Sort(i):i in AnsTot]);

AnsTott eq [
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 6, 9, 9, 9, 9, 9, 9, 9, 9, 14, 14, 14, 14, 14, 14, 14, 14 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 9, 21, 21, 21, 21, 21, 21, 21, 21 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 4, 6, 6, 6, 6, 6, 6, 6, 6, 7, 11, 11, 11, 11, 11, 11, 11, 11 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 5, 7, 7, 7, 7, 7, 7, 7, 7, 8, 19, 19, 19, 19, 19, 19, 19, 19 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 6, 6, 6, 6, 6, 6, 6, 8, 12, 12, 12, 12, 12, 12, 12, 12, 19 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 6, 6, 6, 6, 6, 6, 6, 8, 13, 13, 13, 13, 13, 13, 13, 13, 16 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 6, 6, 6, 6, 6, 6, 6, 9, 14, 14, 14, 14, 14, 14, 14, 14, 18 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 6, 6, 6, 6, 6, 6, 6, 9, 15, 15, 15, 15, 15, 15, 15, 15, 17 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 7, 7, 7, 7, 7, 7, 7, 7, 10, 10, 10, 10, 10, 10, 10, 10, 13 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 7, 7, 7, 7, 7, 7, 7, 7, 11, 11, 11, 11, 11, 11, 11, 11, 12 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 8, 8, 8, 8, 8, 8, 8, 8, 12, 12, 12, 12, 12, 12, 12, 12, 15 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 8, 8, 8, 8, 8, 8, 8, 8, 13, 13, 13, 13, 13, 13, 13, 13, 14 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7, 7, 7, 7, 7, 7, 9, 17, 17, 17, 17, 17, 17, 17, 17, 21 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7, 7, 7, 7, 7, 7, 9, 18, 18, 18, 18, 18, 18, 18, 18, 20 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 8, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 16, 16, 16, 18 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 8, 8, 8, 8, 8, 8, 8, 8, 17, 19, 19, 19, 19, 19, 19, 19, 19 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 9, 9, 9, 9, 9, 9, 9, 9, 10, 17, 17, 17, 17, 17, 17, 17, 17 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 9, 9, 9, 9, 9, 9, 9, 9, 11, 18, 18, 18, 18, 18, 18, 18, 18 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 9, 9, 9, 9, 9, 9, 9, 9, 12, 20, 20, 20, 20, 20, 20, 20, 20 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 9, 9, 9, 9, 9, 9, 9, 9, 13, 21, 21, 21, 21, 21, 21, 21, 21 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 6, 6, 7, 10, 10, 10, 11, 11, 11, 23 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 6, 6, 8, 12, 12, 12, 13, 13, 13, 25 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 5, 6, 6, 9, 14, 14, 14, 15, 15, 15, 27 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 6, 9, 9, 14, 14, 14, 15, 15, 15, 26 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 5, 5, 5, 5, 5, 5, 7, 9, 9, 17, 17, 17, 18, 18, 18, 30 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 4, 5, 5, 5, 5, 5, 5, 8, 9, 9, 20, 20, 20, 21, 21, 21, 32 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 6, 7, 7, 10, 10, 10, 11, 11, 11, 22 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 4, 4, 4, 4, 4, 5, 5, 5, 6, 8, 8, 12, 12, 12, 13, 13, 13, 24 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 7, 7, 8, 16, 16, 16, 19, 19, 19, 29 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 4, 4, 4, 5, 7, 7, 9, 17, 17, 17, 18, 18, 18, 31 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 7, 8, 8, 16, 16, 16, 19, 19, 19, 28 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 8, 8, 9, 20, 20, 20, 21, 21, 21, 33 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 6, 6, 6, 6, 15, 15, 15, 15, 15, 15, 17, 17, 52 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 6, 7, 8, 10, 10, 10, 12, 12, 12, 19, 19, 19, 35 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 6, 7, 8, 10, 10, 10, 13, 13, 13, 16, 16, 16, 41 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 6, 7, 8, 11, 11, 11, 12, 12, 12, 16, 16, 16, 40 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 6, 7, 8, 11, 11, 11, 13, 13, 13, 19, 19, 19, 34 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 6, 7, 9, 10, 10, 10, 14, 14, 14, 18, 18, 18, 37 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 6, 7, 9, 10, 10, 10, 15, 15, 15, 17, 17, 17, 39 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 6, 7, 9, 11, 11, 11, 14, 14, 14, 17, 17, 17, 38 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 6, 7, 9, 11, 11, 11, 15, 15, 15, 18, 18, 18, 36 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 6, 8, 9, 12, 12, 12, 14, 14, 14, 21, 21, 21, 43 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 6, 8, 9, 12, 12, 12, 15, 15, 15, 20, 20, 20, 45 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 6, 8, 9, 13, 13, 13, 14, 14, 14, 20, 20, 20, 44 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 6, 8, 9, 13, 13, 13, 15, 15, 15, 21, 21, 21, 42 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7, 7, 10, 10, 10, 10, 10, 10, 13, 13, 50 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 7, 8, 9, 16, 16, 16, 17, 17, 17, 21, 21, 21, 47 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 7, 8, 9, 16, 16, 16, 18, 18, 18, 20, 20, 20, 49 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 7, 8, 9, 17, 17, 17, 19, 19, 19, 20, 20, 20, 48 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 7, 8, 9, 18, 18, 18, 19, 19, 19, 21, 21, 21, 46 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 8, 8, 8, 8, 16, 16, 16, 16, 16, 16, 18, 18, 53 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 12, 12, 20, 20, 20, 20, 20, 20, 55 ],
    [ 1, 1, 1, 1, 1, 1, 6, 6, 10, 15, 15, 15, 17, 17, 39, 52 ],
    [ 1, 1, 1, 1, 1, 1, 7, 7, 10, 10, 10, 13, 13, 16, 41, 50 ],
    [ 1, 1, 1, 1, 1, 1, 8, 8, 16, 16, 16, 18, 18, 20, 49, 53 ],
    [ 1, 1, 1, 1, 1, 1, 9, 9, 12, 12, 15, 20, 20, 20, 45, 55 ],
    [ 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 6, 6, 10, 11, 11, 11 ],
    [ 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 9, 9, 9, 9, 9, 9, 9, 9, 14, 14, 14, 15 ],
    [ 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 5, 14, 14, 14, 15, 18, 27, 52 ],
    [ 1, 1, 1, 1, 2, 2, 3, 10, 14, 14, 14, 18, 18, 37, 52 ],
    [ 1, 1, 1, 1, 2, 2, 4, 5, 5, 5, 5, 13, 20, 21, 21, 21, 32, 55 ],
    [ 1, 1, 1, 1, 2, 3, 3, 3, 3, 4, 4, 10, 11, 11, 11, 12, 22, 50 ],
    [ 1, 1, 1, 1, 2, 5, 5, 13, 13, 15, 21, 21, 21, 42, 55 ],
    [ 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 7, 7, 7, 7, 7, 7, 7, 7, 16, 19, 19, 19 ],
    [ 1, 1, 1, 1, 3, 3, 4, 11, 11, 11, 12, 12, 16, 40, 50 ],
    [ 1, 1, 1, 1, 3, 4, 4, 4, 4, 5, 5, 16, 17, 19, 19, 19, 28, 53 ],
    [ 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 20, 21, 21, 21 ],
    [ 1, 1, 1, 1, 4, 4, 5, 17, 17, 19, 19, 19, 20, 48, 53 ],
    [ 1, 1, 1, 1, 10, 10, 15, 17, 17, 17, 21, 39, 54 ],
    [ 1, 1, 1, 1, 10, 12, 12, 12, 15, 19, 19, 35, 51 ],
    [ 1, 1, 1, 1, 10, 13, 13, 13, 14, 16, 16, 41, 51 ],
    [ 1, 1, 1, 1, 10, 16, 17, 17, 17, 21, 21, 47, 54 ],
    [ 1, 1, 1, 1, 11, 11, 15, 18, 18, 18, 20, 36, 54 ],
    [ 1, 1, 1, 1, 11, 16, 18, 18, 18, 20, 20, 49, 54 ],
    [ 1, 1, 1, 1, 12, 12, 12, 15, 15, 19, 20, 45, 51 ],
    [ 1, 1, 1, 1, 13, 13, 13, 14, 14, 16, 20, 44, 51 ],
    [ 1, 1, 2, 2, 2, 2, 2, 3, 5, 5, 5, 5, 6, 6, 6, 9, 9, 9, 14, 14, 14, 15, 15, 26 ],
    [ 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 6, 6, 6, 7, 7, 7, 10, 10, 11, 11, 11, 23 ],
    [ 1, 1, 2, 3, 6, 6, 7, 7, 7, 7, 10, 10, 11, 11, 12, 22, 23 ],
    [ 1, 1, 2, 4, 4, 4, 4, 5, 5, 5, 5, 5, 8, 8, 8, 9, 9, 9, 20, 20, 21, 21, 21, 33 ],
    [ 1, 1, 2, 5, 6, 6, 6, 6, 9, 9, 14, 14, 15, 15, 18, 26, 27 ],
    [ 1, 1, 2, 6, 7, 7, 8, 8, 8, 16, 16, 22, 34, 35 ],
    [ 1, 1, 2, 6, 8, 8, 9, 9, 9, 20, 20, 24, 42, 43 ],
    [ 1, 1, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 7, 7, 7, 8, 8, 8, 16, 16, 19, 19, 19, 29 ],
    [ 1, 1, 3, 4, 7, 7, 8, 8, 8, 8, 16, 16, 17, 19, 19, 28, 29 ],
    [ 1, 1, 3, 6, 6, 6, 7, 9, 9, 15, 15, 30, 37, 38 ],
    [ 1, 1, 3, 7, 8, 8, 9, 9, 9, 20, 20, 28, 46, 47 ],
    [ 1, 1, 4, 5, 8, 8, 9, 9, 9, 9, 13, 20, 20, 21, 21, 32, 33 ],
    [ 1, 1, 4, 6, 6, 6, 8, 9, 9, 15, 15, 32, 43, 44 ],
    [ 1, 1, 4, 6, 6, 7, 7, 7, 8, 10, 10, 25, 34, 40 ],
    [ 1, 1, 5, 6, 6, 7, 7, 7, 9, 10, 10, 27, 36, 38 ],
    [ 1, 1, 5, 7, 7, 8, 8, 8, 9, 16, 16, 31, 46, 48 ],
    [ 2, 2, 2, 2, 3, 3, 4, 6, 6, 6, 8, 11, 12, 12, 13, 13, 16, 19, 25 ],
    [ 2, 2, 2, 2, 3, 3, 5, 6, 6, 6, 9, 11, 14, 14, 15, 15, 17, 18, 27 ],
    [ 2, 2, 2, 3, 5, 6, 6, 9, 9, 14, 14, 15, 15, 17, 26, 27 ],
    [ 2, 2, 3, 3, 6, 7, 9, 9, 14, 14, 30, 36, 39 ],
    [ 2, 2, 3, 4, 6, 8, 9, 9, 14, 14, 32, 42, 45 ],
    [ 2, 2, 3, 5, 5, 5, 5, 7, 9, 9, 9, 10, 11, 14, 17, 17, 18, 18, 30 ],
    [ 2, 2, 4, 5, 5, 5, 5, 8, 9, 9, 9, 12, 13, 14, 20, 20, 21, 21, 32 ],
    [ 2, 2, 5, 5, 6, 8, 8, 9, 21, 21, 24, 44, 45 ],
    [ 2, 3, 3, 3, 3, 4, 4, 6, 7, 7, 7, 10, 10, 11, 11, 12, 13, 19, 22 ],
    [ 2, 3, 3, 3, 4, 6, 6, 7, 7, 10, 10, 11, 11, 13, 22, 23 ],
    [ 2, 3, 5, 5, 7, 8, 8, 9, 21, 21, 28, 48, 49 ],
    [ 2, 4, 4, 4, 4, 5, 5, 6, 8, 8, 8, 12, 12, 13, 13, 14, 15, 21, 24 ],
    [ 2, 4, 4, 5, 6, 7, 7, 8, 19, 19, 22, 40, 41 ],
    [ 2, 4, 5, 5, 5, 8, 8, 9, 9, 12, 20, 20, 21, 21, 32, 33 ],
    [ 2, 4, 6, 6, 8, 8, 12, 12, 13, 13, 14, 19, 24, 25 ],
    [ 2, 4, 6, 6, 8, 8, 12, 12, 13, 13, 15, 16, 24, 25 ],
    [ 2, 6, 7, 7, 9, 17, 17, 21, 22, 36, 37 ],
    [ 2, 6, 7, 7, 9, 18, 18, 20, 22, 38, 39 ],
    [ 2, 6, 7, 8, 8, 16, 16, 18, 24, 34, 35 ],
    [ 2, 6, 7, 8, 8, 17, 19, 19, 24, 40, 41 ],
    [ 2, 6, 7, 9, 9, 10, 17, 17, 26, 36, 37 ],
    [ 2, 6, 7, 9, 9, 11, 18, 18, 26, 38, 39 ],
    [ 2, 6, 8, 9, 9, 12, 20, 20, 26, 42, 43 ],
    [ 2, 6, 8, 9, 9, 13, 21, 21, 26, 44, 45 ],
    [ 3, 3, 3, 3, 4, 4, 5, 7, 7, 7, 9, 17, 17, 18, 18, 19, 20, 21, 31 ],
    [ 3, 3, 4, 4, 6, 6, 7, 8, 11, 11, 25, 35, 41 ],
    [ 3, 3, 4, 5, 6, 6, 7, 9, 11, 11, 27, 37, 39 ],
    [ 3, 4, 4, 4, 4, 5, 5, 7, 8, 8, 8, 16, 16, 17, 18, 19, 19, 21, 28 ],
    [ 3, 4, 4, 4, 5, 7, 7, 8, 8, 16, 16, 18, 19, 19, 28, 29 ],
    [ 3, 5, 7, 7, 9, 9, 10, 17, 17, 18, 18, 20, 30, 31 ],
    [ 3, 5, 7, 7, 9, 9, 11, 17, 17, 18, 18, 21, 30, 31 ],
    [ 3, 6, 6, 7, 8, 12, 12, 19, 23, 34, 41 ],
    [ 3, 6, 6, 7, 8, 13, 13, 16, 23, 35, 40 ],
    [ 3, 6, 6, 7, 9, 14, 14, 18, 23, 36, 39 ],
    [ 3, 6, 6, 7, 9, 15, 15, 17, 23, 37, 38 ],
    [ 3, 6, 7, 8, 8, 12, 12, 15, 28, 34, 41 ],
    [ 3, 6, 7, 8, 8, 13, 13, 14, 28, 35, 40 ],
    [ 3, 7, 8, 9, 9, 12, 20, 20, 30, 46, 47 ],
    [ 3, 7, 8, 9, 9, 13, 21, 21, 30, 48, 49 ],
    [ 4, 4, 5, 5, 7, 7, 8, 9, 19, 19, 31, 47, 49 ],
    [ 4, 6, 6, 8, 9, 14, 14, 18, 25, 42, 45 ],
    [ 4, 6, 6, 8, 9, 15, 15, 17, 25, 43, 44 ],
    [ 4, 6, 7, 7, 8, 10, 10, 13, 29, 34, 40 ],
    [ 4, 6, 7, 7, 8, 11, 11, 12, 29, 35, 41 ],
    [ 4, 7, 7, 8, 9, 17, 17, 21, 29, 46, 49 ],
    [ 4, 7, 7, 8, 9, 18, 18, 20, 29, 47, 48 ],
    [ 4, 7, 8, 9, 9, 10, 17, 17, 32, 46, 49 ],
    [ 4, 7, 8, 9, 9, 11, 18, 18, 32, 47, 48 ],
    [ 5, 6, 6, 8, 9, 12, 12, 19, 27, 42, 44 ],
    [ 5, 6, 6, 8, 9, 13, 13, 16, 27, 43, 45 ],
    [ 5, 6, 7, 7, 9, 10, 10, 13, 31, 36, 38 ],
    [ 5, 6, 7, 7, 9, 11, 11, 12, 31, 37, 39 ],
    [ 5, 6, 8, 8, 9, 12, 12, 15, 33, 42, 44 ],
    [ 5, 6, 8, 8, 9, 13, 13, 14, 33, 43, 45 ],
    [ 5, 7, 8, 8, 9, 16, 16, 18, 33, 46, 48 ],
    [ 5, 7, 8, 8, 9, 17, 19, 19, 33, 47, 49 ],
    [ 6, 7, 8, 9, 34, 37, 45, 47 ],
    [ 6, 7, 8, 9, 34, 39, 43, 49 ],
    [ 6, 7, 8, 9, 35, 36, 44, 47 ],
    [ 6, 7, 8, 9, 35, 38, 42, 49 ],
    [ 6, 7, 8, 9, 36, 41, 43, 48 ],
    [ 6, 7, 8, 9, 37, 40, 42, 48 ],
    [ 6, 7, 8, 9, 38, 41, 45, 46 ],
    [ 6, 7, 8, 9, 39, 40, 44, 46 ]
];

"Now take up to field automorphism";

frob:=Sym(57)!(2,3,4,5)(6,7,8,9)(10,16,20,15)(11,19,21,14)(12,17,13,18)(22,28,32,27)(23,29,33,26)(24,30,25,31)(34,46,43,38)(35,47,44,36)(37,40,48,42)(39,41,49,45)(52,50,53,55)(51,54);

AnsTot2:=OrbitReps(AnsTott,frob);

AnsTot2 eq [
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 6, 9, 9, 9, 9, 9, 9, 9, 9, 14, 14, 14, 14, 14, 14, 14, 14 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 6, 6, 6, 6, 6, 6, 6, 8, 12, 12, 12, 12, 12, 12, 12, 12, 19 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 6, 6, 6, 6, 6, 6, 6, 8, 13, 13, 13, 13, 13, 13, 13, 13, 16 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 6, 6, 6, 6, 6, 6, 6, 9, 14, 14, 14, 14, 14, 14, 14, 14, 18 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 6, 6, 6, 6, 6, 6, 6, 9, 15, 15, 15, 15, 15, 15, 15, 15, 17 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 6, 6, 7, 10, 10, 10, 11, 11, 11, 23 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 6, 6, 8, 12, 12, 12, 13, 13, 13, 25 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 5, 6, 6, 9, 14, 14, 14, 15, 15, 15, 27 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 6, 6, 6, 6, 15, 15, 15, 15, 15, 15, 17, 17, 52 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 6, 7, 8, 10, 10, 10, 12, 12, 12, 19, 19, 19, 35 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 6, 7, 8, 10, 10, 10, 13, 13, 13, 16, 16, 16, 41 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 6, 7, 8, 11, 11, 11, 12, 12, 12, 16, 16, 16, 40 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 6, 7, 8, 11, 11, 11, 13, 13, 13, 19, 19, 19, 34 ],
    [ 1, 1, 1, 1, 1, 1, 6, 6, 10, 15, 15, 15, 17, 17, 39, 52 ],
    [ 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 6, 6, 10, 11, 11, 11 ],
    [ 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 5, 14, 14, 14, 15, 18, 27, 52 ],
    [ 1, 1, 1, 1, 2, 2, 3, 10, 14, 14, 14, 18, 18, 37, 52 ],
    [ 1, 1, 1, 1, 10, 10, 15, 17, 17, 17, 21, 39, 54 ],
    [ 1, 1, 1, 1, 10, 12, 12, 12, 15, 19, 19, 35, 51 ],
    [ 1, 1, 2, 2, 2, 2, 2, 3, 5, 5, 5, 5, 6, 6, 6, 9, 9, 9, 14, 14, 14, 15, 15, 26 ],
    [ 1, 1, 2, 3, 6, 6, 7, 7, 7, 7, 10, 10, 11, 11, 12, 22, 23 ],
    [ 1, 1, 2, 6, 7, 7, 8, 8, 8, 16, 16, 22, 34, 35 ],
    [ 1, 1, 2, 6, 8, 8, 9, 9, 9, 20, 20, 24, 42, 43 ],
    [ 2, 2, 2, 2, 3, 3, 4, 6, 6, 6, 8, 11, 12, 12, 13, 13, 16, 19, 25 ],
    [ 2, 2, 2, 2, 3, 3, 5, 6, 6, 6, 9, 11, 14, 14, 15, 15, 17, 18, 27 ],
    [ 2, 2, 2, 3, 5, 6, 6, 9, 9, 14, 14, 15, 15, 17, 26, 27 ],
    [ 2, 2, 3, 3, 6, 7, 9, 9, 14, 14, 30, 36, 39 ],
    [ 2, 2, 3, 4, 6, 8, 9, 9, 14, 14, 32, 42, 45 ],
    [ 2, 4, 6, 6, 8, 8, 12, 12, 13, 13, 14, 19, 24, 25 ],
    [ 2, 4, 6, 6, 8, 8, 12, 12, 13, 13, 15, 16, 24, 25 ],
    [ 2, 6, 7, 7, 9, 17, 17, 21, 22, 36, 37 ],
    [ 2, 6, 7, 7, 9, 18, 18, 20, 22, 38, 39 ],
    [ 2, 6, 7, 8, 8, 16, 16, 18, 24, 34, 35 ],
    [ 2, 6, 7, 8, 8, 17, 19, 19, 24, 40, 41 ],
    [ 2, 6, 7, 9, 9, 10, 17, 17, 26, 36, 37 ],
    [ 2, 6, 7, 9, 9, 11, 18, 18, 26, 38, 39 ],
    [ 2, 6, 8, 9, 9, 12, 20, 20, 26, 42, 43 ],
    [ 2, 6, 8, 9, 9, 13, 21, 21, 26, 44, 45 ],
    [ 6, 7, 8, 9, 34, 37, 45, 47 ],
    [ 6, 7, 8, 9, 34, 39, 43, 49 ],
    [ 6, 7, 8, 9, 35, 36, 44, 47 ],
    [ 6, 7, 8, 9, 37, 40, 42, 48 ]
];

"And remove those of non-positive pressure that contain trivials";

for i in AnsTot2 do Position(AnsTot2,i),&+[Multiplicity(i,j):j in [10,10,15,15,16,16,20,20]]-Multiplicity(i,1),1 in i; end for;

// Cases 1,2,3,4,6,7,8,10,12,13,15,16,17,19 are all non-positive pressure and have trivials, so fix lines.

AnsTot3:=[
    [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 6, 6, 6, 6, 6, 6, 6, 9, 15, 15, 15, 15, 15, 15, 15, 15, 17 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 6, 6, 6, 6, 15, 15, 15, 15, 15, 15, 17, 17, 52 ],
    [ 1, 1, 1, 1, 1, 1, 1, 1, 6, 7, 8, 10, 10, 10, 13, 13, 13, 16, 16, 16, 41 ],
    [ 1, 1, 1, 1, 1, 1, 6, 6, 10, 15, 15, 15, 17, 17, 39, 52 ],
    [ 1, 1, 1, 1, 10, 10, 15, 17, 17, 17, 21, 39, 54 ],
    [ 1, 1, 2, 2, 2, 2, 2, 3, 5, 5, 5, 5, 6, 6, 6, 9, 9, 9, 14, 14, 14, 15, 15, 26 ],
    [ 1, 1, 2, 3, 6, 6, 7, 7, 7, 7, 10, 10, 11, 11, 12, 22, 23 ],
    [ 1, 1, 2, 6, 7, 7, 8, 8, 8, 16, 16, 22, 34, 35 ],
    [ 1, 1, 2, 6, 8, 8, 9, 9, 9, 20, 20, 24, 42, 43 ],
    [ 2, 2, 2, 2, 3, 3, 4, 6, 6, 6, 8, 11, 12, 12, 13, 13, 16, 19, 25 ],
    [ 2, 2, 2, 2, 3, 3, 5, 6, 6, 6, 9, 11, 14, 14, 15, 15, 17, 18, 27 ],
    [ 2, 2, 2, 3, 5, 6, 6, 9, 9, 14, 14, 15, 15, 17, 26, 27 ],
    [ 2, 2, 3, 3, 6, 7, 9, 9, 14, 14, 30, 36, 39 ],
    [ 2, 2, 3, 4, 6, 8, 9, 9, 14, 14, 32, 42, 45 ],
    [ 2, 4, 6, 6, 8, 8, 12, 12, 13, 13, 14, 19, 24, 25 ],
    [ 2, 4, 6, 6, 8, 8, 12, 12, 13, 13, 15, 16, 24, 25 ],
    [ 2, 6, 7, 7, 9, 17, 17, 21, 22, 36, 37 ],
    [ 2, 6, 7, 7, 9, 18, 18, 20, 22, 38, 39 ],
    [ 2, 6, 7, 8, 8, 16, 16, 18, 24, 34, 35 ],
    [ 2, 6, 7, 8, 8, 17, 19, 19, 24, 40, 41 ],
    [ 2, 6, 7, 9, 9, 10, 17, 17, 26, 36, 37 ],
    [ 2, 6, 7, 9, 9, 11, 18, 18, 26, 38, 39 ],
    [ 2, 6, 8, 9, 9, 12, 20, 20, 26, 42, 43 ],
    [ 2, 6, 8, 9, 9, 13, 21, 21, 26, 44, 45 ],
    [ 6, 7, 8, 9, 34, 37, 45, 47 ],
    [ 6, 7, 8, 9, 34, 39, 43, 49 ],
    [ 6, 7, 8, 9, 35, 36, 44, 47 ],
    [ 6, 7, 8, 9, 37, 40, 42, 48 ]
];

AnsTot3 eq [i:i in AnsTot2|not(1 in i) or Multiplicity(i,1) lt &+[Multiplicity(i,j):j in [10,10,15,15,16,16,20,20]]];

Mods:=[DirectSum([Irr[i]:i in j]):j in AnsTot3];
Eigs1:=[EigenvaluesOfElement(i,x):i in Mods];
Eigs2:=[EigenvaluesOfElement(i,x^3):i in Mods];
Eigs4:=[EigenvaluesOfElement(i,x^15):i in Mods];



/* To check that the eigenvalues of x and its powers determine the class in E8, for each of the 28 cases, use the code below.
   I used screen so I could check the progress of each one. You can use a batch file if you prefer.

screen -DR checkz1
magma
OneToCheck:=1;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkz2
magma
OneToCheck:=2;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkz3
magma
OneToCheck:=3;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkz4
magma
OneToCheck:=4;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkz5
magma
OneToCheck:=5;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkz6
magma
OneToCheck:=6;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkz7
magma
OneToCheck:=7;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkz8
magma
OneToCheck:=8;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkz9
magma
OneToCheck:=9;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkza
magma
OneToCheck:=10;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkzb
magma
OneToCheck:=11;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkzc
magma
OneToCheck:=12;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkzd
magma
OneToCheck:=13;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkze
magma
OneToCheck:=14;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkzf
magma
OneToCheck:=15;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkzg
magma
OneToCheck:=16;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkzh
magma
OneToCheck:=17;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkzi
magma
OneToCheck:=18;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkzj
magma
OneToCheck:=19;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkzk
magma
OneToCheck:=20;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkzl
magma
OneToCheck:=21;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkzm
magma
OneToCheck:=22;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkzn
magma
OneToCheck:=23;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkzo
magma
OneToCheck:=24;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkzp
magma
OneToCheck:=25;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkzq
magma
OneToCheck:=26;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkzr
magma
OneToCheck:=27;
load "Subgroups/E8/PSU316code.txt";

screen -DR checkzs
magma
OneToCheck:=28;
load "Subgroups/E8/PSU316code.txt";

*/


El1:=[
    [ 4, 10, 3, 7, 0, 0, 0, 0 ],
    [ 10, 0, 3, 14, 0, 0, 0, 0 ],
    [ 3, 0, 14, 3, 0, 0, 0, 0 ],
    [ 6, 0, 4, 10, 0, 0, 0, 0 ],
    [ 16, 0, 10, 14, 0, 0, 0, 0 ],
    [ 10, 14, 9, 1, 0, 7, 1, 10 ],
    [ 14, 0, 6, 11, 3, 4, 11, 0 ],
    [ 0, 4, 0, 1, 6, 1, 4, 10 ],
    [ 5, 7, 5, 12, 15, 13, 1, 16 ],
    [ 7, 7, 9, 0, 16, 3, 11, 8 ],
    [ 8, 0, 16, 16, 9, 2, 10, 13 ],
    [ 14, 2, 1, 15, 2, 8, 1, 14 ],
    [ 11, 16, 0, 15, 13, 15, 13, 2 ],
    [ 9, 6, 8, 13, 8, 11, 3, 2 ],
    [ 14, 13, 2, 4, 1, 4, 7, 3 ],
    [ 11, 14, 6, 6, 8, 4, 2, 15 ],
    [ 8, 10, 4, 3, 10, 1, 9, 5 ],
    [ 7, 8, 0, 4, 1, 11, 16, 16 ],
    [ 6, 4, 4, 14, 10, 12, 4, 2 ],
    [ 14, 15, 4, 14, 4, 9, 5, 2 ],
    [ 0, 1, 9, 15, 13, 8, 3, 11 ],
    [ 2, 14, 16, 11, 11, 10, 0, 0 ],
    [ 14, 9, 4, 7, 1, 11, 10, 0 ],
    [ 10, 10, 1, 5, 2, 12, 0, 5 ],
    [ 10, 6, 14, 4, 8, 12, 12, 10 ],
    [ 1, 2, 16, 5, 0, 13, 3, 0 ],
    [ 3, 9, 1, 3, 16, 5, 3, 2 ],
    [ 14, 6, 9, 7, 9, 5, 1, 8 ]
];


El2:=[
    [ 216, 81, 162, 21, 51, 0, 0, 0 ],
    [ 183, 0, 213, 93, 51, 51, 0, 0 ],
    [ 111, 51, 195, 111, 51, 51, 0, 0 ],
    [ 120, 51, 216, 81, 51, 51, 0, 0 ],
    [ 99, 153, 81, 93, 51, 51, 51, 0 ],
    [ 132, 93, 231, 105, 102, 21, 3, 81 ],
    [ 144, 51, 69, 84, 9, 114, 84, 102 ],
    [ 0, 63, 0, 105, 18, 3, 12, 30 ],
    [ 168, 174, 66, 87, 96, 39, 3, 48 ],
    [ 72, 21, 231, 204, 48, 60, 84, 75 ],
    [ 126, 153, 150, 48, 78, 57, 30, 39 ],
    [ 42, 57, 207, 96, 57, 24, 3, 42 ],
    [ 84, 150, 102, 147, 192, 147, 39, 6 ],
    [ 78, 120, 24, 39, 75, 33, 9, 6 ],
    [ 246, 192, 108, 12, 3, 12, 123, 9 ],
    [ 186, 195, 171, 18, 75, 12, 6, 45 ],
    [ 24, 30, 12, 111, 30, 3, 231, 66 ],
    [ 123, 24, 153, 63, 105, 33, 99, 48 ],
    [ 120, 12, 12, 42, 132, 36, 63, 6 ],
    [ 93, 198, 165, 144, 63, 27, 66, 6 ],
    [ 102, 3, 78, 45, 141, 126, 9, 33 ],
    [ 57, 144, 201, 84, 135, 81, 51, 51 ],
    [ 246, 27, 114, 21, 3, 33, 81, 51 ],
    [ 81, 132, 54, 66, 108, 36, 51, 15 ],
    [ 183, 171, 42, 63, 24, 240, 36, 30 ],
    [ 207, 108, 150, 66, 51, 39, 9, 51 ],
    [ 60, 129, 156, 111, 201, 219, 9, 57 ],
    [ 144, 69, 27, 174, 129, 219, 54, 24 ]
];

El3:=[
    [ 157, 112, 224, 7, 17, 0, 0, 0 ],
    [ 231, 0, 241, 31, 102, 17, 0, 0 ],
    [ 37, 17, 235, 207, 17, 17, 0, 0 ],
    [ 210, 17, 157, 112, 17, 102, 0, 0 ],
    [ 203, 136, 112, 31, 102, 17, 17, 85 ],
    [ 129, 31, 247, 120, 119, 7, 1, 112 ],
    [ 48, 17, 193, 28, 3, 208, 28, 34 ],
    [ 0, 106, 0, 205, 6, 1, 174, 95 ],
    [ 56, 228, 192, 199, 202, 183, 1, 16 ],
    [ 194, 177, 77, 238, 16, 20, 28, 195 ],
    [ 127, 136, 135, 16, 111, 104, 10, 13 ],
    [ 14, 104, 239, 32, 104, 8, 1, 14 ],
    [ 113, 135, 119, 134, 234, 134, 183, 87 ],
    [ 111, 125, 8, 183, 195, 11, 173, 87 ],
    [ 252, 234, 206, 4, 1, 4, 41, 3 ],
    [ 62, 235, 227, 91, 195, 4, 172, 15 ],
    [ 8, 10, 4, 122, 95, 1, 77, 192 ],
    [ 126, 178, 136, 21, 35, 96, 118, 16 ],
    [ 125, 89, 174, 184, 44, 12, 21, 172 ],
    [ 31, 66, 225, 218, 21, 179, 107, 172 ],
    [ 34, 1, 111, 15, 217, 127, 173, 96 ],
    [ 104, 218, 152, 28, 130, 112, 102, 17 ],
    [ 252, 9, 123, 7, 1, 96, 27, 187 ],
    [ 112, 44, 188, 22, 121, 12, 187, 175 ],
    [ 61, 142, 99, 21, 178, 250, 182, 10 ],
    [ 69, 206, 220, 192, 17, 183, 3, 102 ],
    [ 190, 43, 222, 122, 152, 158, 88, 189 ],
    [ 218, 108, 94, 228, 43, 73, 18, 8 ]
];


Vector765:=[[(T.i)[j,j]:j in [1..248]]:i in [1..8]];

for OneToCheck in [1..#AnsTot3] do
  T1:=#(Eigs1[OneToCheck]);
  Els3:=ConstructPreimages([3*i:i in El3[OneToCheck]],765,3);
  for i in [1..#Els3] do
    if(#SequenceToSet([&*[Vector765[ii,jj]^Els3[i,ii]:ii in [1..8]]:jj in [1..248]]) eq T1) then OneToCheck,"is strongly imprimitive"; Els3[i]; continue OneToCheck;
    end if;
  end for;
  OneToCheck,"is NOT necessarily strongly imprimitive";
end for;

/*Here is the output from that command:

1 is strongly imprimitive
[ 412, 367, 734, 7, 17, 0, 0, 0 ]
2 is strongly imprimitive
[ 741, 0, 751, 31, 357, 17, 0, 0 ]
3 is strongly imprimitive
[ 292, 17, 490, 207, 17, 17, 0, 0 ]
4 is strongly imprimitive
[ 465, 17, 412, 112, 17, 357, 0, 0 ]
5 is strongly imprimitive
[ 713, 136, 367, 31, 357, 272, 272, 85 ]
6 is strongly imprimitive
[ 384, 541, 247, 630, 629, 517, 1, 112 ]
7 is strongly imprimitive
[ 48, 17, 703, 28, 3, 208, 28, 34 ]
8 is strongly imprimitive
[ 0, 361, 0, 205, 6, 1, 174, 95 ]
9 is strongly imprimitive
[ 566, 738, 192, 199, 202, 183, 1, 16 ]
10 is strongly imprimitive
[ 449, 432, 587, 748, 271, 20, 28, 195 ]
11 is strongly imprimitive
[ 382, 391, 390, 16, 366, 359, 10, 13 ]
12 is strongly imprimitive
[ 14, 359, 749, 32, 359, 8, 1, 14 ]
13 is strongly imprimitive
[ 113, 135, 629, 134, 744, 134, 183, 87 ]
14 is strongly imprimitive
[ 366, 380, 8, 183, 195, 11, 173, 597 ]
15 is strongly imprimitive
[ 762, 234, 716, 4, 1, 4, 41, 3 ]
16 is NOT necessarily strongly imprimitive
17 is NOT necessarily strongly imprimitive
18 is strongly imprimitive
[ 381, 433, 136, 276, 545, 96, 118, 16 ]
19 is strongly imprimitive
[ 635, 344, 684, 439, 554, 267, 21, 172 ]
20 is strongly imprimitive
[ 286, 66, 225, 728, 21, 179, 107, 172 ]
21 is strongly imprimitive
[ 544, 256, 621, 525, 472, 637, 173, 96 ]
22 is strongly imprimitive
[ 614, 473, 662, 28, 130, 367, 357, 17 ]
23 is strongly imprimitive
[ 762, 9, 378, 7, 1, 351, 27, 187 ]
24 is strongly imprimitive
[ 367, 554, 443, 277, 121, 12, 187, 175 ]
25 is strongly imprimitive
[ 571, 142, 609, 21, 178, 760, 182, 10 ]
26 is strongly imprimitive
[ 579, 716, 730, 702, 17, 183, 3, 102 ]
27 is NOT necessarily strongly imprimitive
28 is NOT necessarily strongly imprimitive

*/

"Finally check Case 1 from the text";
OneToCheck:=16;
EigsToTest1:=[EigenvaluesOfElement(ChangeRing(Irr2[i],F),x):i in [1..45]];
EigsToTest2:=[{R!Log(i[1]):i in j}:j in EigsToTest1];

Els3:=ConstructPreimages([3*i:i in El3[OneToCheck]],765,3);
EigEls3:=[{*&+[ii[i]*X[i,j]:i in [1..8]]:j in [1..248]*}:ii in Els3];
EigMults3:=[{*i*3:i in MultisetToSet(j)*}:j in EigEls3];
WhatMults:=[{i:i in j|Multiplicity(j,i) eq 1}:j in EigMults3];
AllMults:=[];
for j in [2,3,6,7,10,12,18,19,20,21,24,25,26,27,42,43,44,45] do Append(~AllMults,[i:i in [1..#WhatMults]|EigsToTest2[j] subset WhatMults[i]]); end for;
"The number of elements that stabilize each composition factor is",[#i:i in AllMults];
