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0,0,0,0,0,0,1,0,0, 0,0,0,0,0,0,0,0,0,1,0, 0,0,0,0,0,0,0,0,0,0,1], [1,0,0,0,0,0,0,0,0,0,0, 0,1,0,0,0,0,0,0,0,0,0, 0,0,1,0,0,0,0,0,0,0,0, 0,0,0,1,0,0,0,0,0,0,0, 0,0,0,0,1,0,0,0,0,0,0, 0,0,0,0,0,1,0,0,0,0,0, 0,0,0,0,0,0,1,0,0,0,0, 0,0,0,0,0,0,0,0,1,0,0, 0,0,0,0,0,0,0,1,0,0,0, 0,0,0,0,0,0,0,0,0,1,0, 0,0,0,0,0,0,0,0,0,0,1], [1,0,0,0,0,0,0,0,0,0,0, 0,1,0,0,0,0,0,0,0,0,0, 0,0,1,0,0,0,0,0,0,0,0, 0,0,0,1,0,0,0,0,0,0,0, 0,0,0,0,1,0,0,0,0,0,0, 0,0,0,0,0,1,0,0,0,0,0, 0,0,0,0,0,0,1,0,0,0,0, 0,0,0,0,0,0,0,1,0,0,0, 0,0,0,0,0,0,0,0,0,1,0, 0,0,0,0,0,0,0,0,1,0,0, 0,0,0,0,0,0,0,0,0,0,1], [1,0,0,0,0,0,0,0,0,0,0, 0,1,0,0,0,0,0,0,0,0,0, 0,0,1,0,0,0,0,0,0,0,0, 0,0,0,1,0,0,0,0,0,0,0, 0,0,0,0,1,0,0,0,0,0,0, 0,0,0,0,0,1,0,0,0,0,0, 0,0,0,0,0,0,1,0,0,0,0, 0,0,0,0,0,0,0,1,0,0,0, 0,0,0,0,0,0,0,0,1,0,0, 0,0,0,0,0,0,0,0,0,0,1, 0,0,0,0,0,0,0,0,0,1,0]>; //Transpose Group TransGroup:=function(G) local R,d; R:=CoefficientRing(G); d:=Degree(G); H:=MatrixGroup; return H; end function; //Minimal Group IsMinimalE:=function(G,Exceptional) H:={}; for i in [1..#Exceptional] do Include(~H,SetToIndexedSet(Orbit(TransGroup(G),Exceptional[i]))); end for; H:=SetToIndexedSet(H); for i in [1..#H] do if #H[i] eq 1 then return false; end if; end for; for r in [1..#H] do Matrix:=RMatrixSpace(IntegerRing(),#H[r],#H[r])!0; for j in [1..#H[r]-1] do for k in [j+1..#H[r]] do product:=0; for t in [2..9] do product:=product-H[r][j][t]*H[r][k][t]; end for; product:=product+H[r][j][1]*H[r][k][1]; Matrix[j,k]:=product; end for; end for; if IsZero(Matrix) eq true then return false; end if; end for; return true; end function; IsMinimalD:=function(G,Exceptional) H:={}; for i in [1..#Exceptional] do Include(~H,SetToIndexedSet(Orbit(TransGroup(G),Exceptional[i]))); end for; H:=SetToIndexedSet(H); for i in [1..#H] do if #H[i] eq 1 then return false; end if; end for; for r in [1..#H] do Matrix:=RMatrixSpace(IntegerRing(),#H[r],#H[r])!0; for j in [1..#H[r]-1] do for k in [j+1..#H[r]] do product:=0; for t in [3..Degree(G)] do product:=product-H[r][j][t]*H[r][k][t]; end for; product:=product+H[r][j][1]*H[r][k][2]+H[r][j][2]*H[r][k][1]; Matrix[j,k]:=product; end for; end for; if IsZero(Matrix) eq true then return false; end if; end for; return true; end function; //H1 group cohomology C0Matrix:=function(M) local l; l:=IdentityMatrix(BaseRing(M),Dimension(M)); return HorizontalJoin([Transpose(ActionGenerator(M,k))-l:k in [1..Nagens(M)]]); end function; add_block:=procedure(~M,i,j,M2) local rows,cols,block; rows:=NumberOfRows(M2); cols:=NumberOfColumns(M2); block:=ExtractBlock(M,i,j,rows,cols); InsertBlock(~M,block+M2,i,j); end procedure; C1Matrix:=function(M) local K,d,G,RG,r,s,rel,w,C1,g,si,sg; K:=BaseRing(M); d:=Dimension(M); G:=Group(M); RG:=Relations(FPGroup(G)); r:=#Generators(G); s:=#RG; C1:=RMatrixSpace(K,r*d,s*d)!0; for i in [1..s] do rel:=RG[i]; w:=LHS(rel)*RHS(rel)^(-1); si:=(i-1)*d+1; for g in [1..r] do sg :=(Abs(g)-1)*d+1; if Abs(Eltseq(w)[1]) eq g then if Eltseq(w)[1] gt 0 then mattemp:=IdentityMatrix(K,d); add_block(~C1,sg,si,Transpose(mattemp)); end if; if Eltseq(w)[1] lt 0 then mattemp:=(-1)*ActionGenerator(M,-Eltseq(w)[1])^(-1); add_block(~C1,sg,si,Transpose(mattemp)); end if; end if; for h in [2..#w] do if Abs(Eltseq(w)[h]) eq g then mattemp:=IdentityMatrix(K,d); for t in [1..h-1] do mattemp:=mattemp*ActionGenerator(M,Abs(Eltseq(w)[t]))^(Sign(Eltseq(w)[t])); end for; if Eltseq(w)[h] lt 0 then mattemp:=mattemp*(-1)*ActionGenerator(M,-Eltseq(w)[h])^(-1); end if; add_block(~C1,sg,si,Transpose(mattemp)); end if; end for; end for; end for; return C1; end function; IsH1:=function(G) local List,M,C0,C1,H1; List:=Subgroups(G); for i in [2..#List] do M:=GModule(List[#List-i+2]`subgroup); C0:=C0Matrix(M); C1:=C1Matrix(M); H1:=quo; if #H1 ne 1 then return false; end if; end for; return true; end function; //get conic matrix IsConic:=function(h,H) local Matrix; Matrix:=RMatrixSpace(IntegerRing(),#H[h],#H[h])!0; for i in [1..#H[h]] do for j in [1..#H[h]] do product:=0; for t in [3..10] do product:=product-H[h][i][t]*H[h][j][t]; end for; product:=product+H[h][i][1]*H[h][j][2]+H[h][i][2]*H[h][j][1]; Matrix[i,j]:=product; end for; end for; return Matrix; end function; //intersection of 2 orbit D type Inter2OrbitD:=function(m,n,H) local Matrix; Matrix:=RMatrixSpace(IntegerRing(),#H[m],#H[n])!0; for i in [1..#H[m]] do for j in [1..#H[n]] do product:=0; for t in [3..Degree(Group(Parent(H[1][1])))] do product:=product-H[m][i][t]*H[n][j][t]; end for; product:=product+H[m][i][1]*H[n][j][2]+H[m][i][2]*H[n][j][1]; Matrix[i,j]:=product; end for; end for; return Matrix; end function; //invariant space under the group action InvSpace:=function(H) local G,R,d,M,S; G:=TransGroup(H); R:=CoefficientRing(G); d:=Degree(G); M:=G.1-IdentityMatrix(R,d); S:=Nullspace(M); if NumberOfGenerators(G) ge 2 then for i in [1..NumberOfGenerators(G)] do M:=G.i-IdentityMatrix(R,d); S:=S meet Nullspace(M); end for; end if; return S; end function; IsMinimalInv:=function(G,H) local Inv,TInv; Inv:=InvSpace(G); TInv:=InvSpace(H); return Inv eq TInv; end function; ReadResult:=procedure(G,Exceptional) //Orbit decomposition of exceptional set H:={@ @}; for i in [1..#Exceptional] do Include(~H,SetToIndexedSet(Orbit(TransGroup(G),Exceptional[i]))); end for; S:=TransGroup(Stabilizer(TransGroup(G),H[1][1])); H:=SetToIndexedSet(H); G; for i in [1..#H] do i; H[i]; "Intersection Matrix: "; IsConic(i,H); "Stabilizer Group Name: "; GroupName(TransGroup(Stabilizer(TransGroup(G),H[i][1]))); TransGroup(Stabilizer(TransGroup(G),H[i][1])); end for; end procedure;