Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions lib/Orru/HAP_SL3ZSubgroupTree_fast.gi
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#descrive come i generatori di un gruppo agiscono sui coset di un sottogruppo.

InstallGlobalFunction(HAP_SL3ZSubgroupTree_fast,
function(G)
local ambientGenerators, tree, InGmodU, Ugrp, S, T, U, v, p, g, s, n, q, vv, leaves, genTriples, generators, InLowDegreeNodesModG, csts, cnt, vertex2word, one, triple2word, i, j, u,c, a, b;

S := [ [1,0,1], [0,-1,-1], [0,1,0] ];
T := [ [0,1,0], [0,0,1], [1,0,0]];
U := [[0,1,0], [1,0,0], [-1,-1,-1]];

ambientGenerators := [S,T,U];
one := IdentityMat(3); #to change? stabilizers to consider
Ugrp := G!.ugrp;
Ugrp := Elements( Ugrp );
tree := [ ];
genTriples := [ ];
cnt := 1;
leaves := NewDictionary( S, true, SL( 3, Integers ) );
csts := [ ];
csts[G!.cosetPos( one )] := 1;
AddDictionary( leaves, one, G!.cosetPos( one ) );
InLowDegreeNodesModG := function ( g )
local pos;
pos := G!.cosetPos( g );
if not IsBound( csts[pos] ) then
return false;
else
;
return pos;
fi;
return;
end;
while Size( leaves ) > 0 do
vv := 1 * leaves!.entries[1];
v := vv[1];
p := G!.cosetPos( v );
for s in [ 1 .. Length( ambientGenerators ) ] do
g := ambientGenerators[s] * v;
q := InLowDegreeNodesModG( g );
if q = false then
q := G!.cosetPos( g );
AddDictionary( leaves, g, q );
csts[q] := 1;
tree[q] := [ p, s ];
else
Add( genTriples, [ p, s, v, g ] );
fi;
od;
RemoveDictionary( leaves, v );
od;
vertex2word := function ( v )
local word;
word := one;
while IsBound( tree[v] ) do
word := word * ambientGenerators[tree[v][2]];
v := tree[v][1];
od;
return word;
end;
triple2word := function ( x )
local u, uu, g, q, c;
for u in Ugrp do
c := x[4] ^ -1 * u * vertex2word( G!.cosetPos( x[4] ) );
if G!.membership( c ) then
return c;
fi;
od;
return fail;
end;
genTriples := List( genTriples, function ( x )
return triple2word( x );
end );
genTriples := List( genTriples, function ( x )
return Minimum( x, x ^ -1 );
end );
genTriples := SSortedList( genTriples );
G!.tree := tree;
G!.GeneratorsOfMagmaWithInverses := genTriples;
return tree;
end);
7 changes: 5 additions & 2 deletions lib/Orru/decsOrru.gd
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
IsHapCongruenceSubgroup:=NewFilter("IsHapCongruenceSubgroup");;
DeclareGlobalFunction("HAP_GenericCongruenceSubgroup");
DeclareGlobalFunction("FiniteProjectiveLine");
DeclareGlobalFunction("FiniteProjectivePlane");
DeclareGlobalFunction("HAP_SL3ZSubgroupTree_fast");
DeclareOperation("HAPCongruenceSubgroupGamma0",[IsInt,IsInt]);
DeclareOperation("HAPCongruenceSubgroupTree",[IsHapCongruenceSubgroup]);

Expand All @@ -9,13 +12,13 @@ InstallMethod( ViewObj,
10000000, #Ensures that this method is chosen
function(G)
Print(G!.name," of ",G!.fam);
end);
end);

InstallMethod( PrintObj,
"for HapCongruenceSubgroup",
[IsHapCongruenceSubgroup and IsGroup],
100000000, #Ensures that this method is chosen
function(G)
Print(G!.name," of ",G!.fam);
end);
end);

88 changes: 88 additions & 0 deletions lib/Orru/finiteProjectiveSpaces.gi
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
InstallGlobalFunction(FiniteProjectiveLine,
function(n)
local UnitEls, x, y, i, c, d, u, UnitsAction, Representatives,
RepOf, r, v, w, m, min;

UnitEls := Units(Integers mod n);

UnitsAction := function(c, u)
local uu;
uu :=Int (u);
return List(c, x -> (uu * x) mod n);
end;

Representatives := [];

RepOf := [];
for x in [1..n] do
RepOf[x] := [];
od;

for x in [0..n-1] do
for y in [0..n-1] do
if Gcd(x,y,n) = 1 then
v := [x,y];
if not IsBound(RepOf[x+1][y+1]) then
m := Orbit(UnitEls,v,UnitsAction);
min := Minimum(m);
AddSet(Representatives,min);
for w in m + 1 do
RepOf[w[1]][w[2]] := min;
od;
fi;
fi;
od;
od;

return rec(
Reps := Set(Representatives),
RepOf:= RepOf
);
end);

InstallGlobalFunction(FiniteProjectivePlane,
function(n)
local UnitEls, x, y, z, i, c, d, u, UnitsAction, Representatives,
RepOf, r, v, w, m, min;

UnitEls := Units(Integers mod n);

UnitsAction := function(c, u)
local uu;
uu :=Int (u);
return List(c, x -> (uu * x) mod n);
end;

Representatives := [];

RepOf := [];
for x in [1..n] do
RepOf[x] := [];
for y in [1..n] do
RepOf[x][y] := [];
od;
od;

for x in [0..n-1] do
for y in [0..n-1] do
for z in [0..n-1] do
if Gcd(x,y,z,n) = 1 then
v := [x,y,z];
if not IsBound(RepOf[x+1][y+1][z+1]) then
m := Orbit(UnitEls,v,UnitsAction);
min := Minimum(m);
AddSet(Representatives,min);
for w in m + 1 do
RepOf[w[1]][w[2]][w[3]] := min;
od;
fi;
fi;
od;
od;
od;

return rec(
Reps := Set(Representatives),
RepOf:= RepOf
);
end);
2 changes: 2 additions & 0 deletions lib/Orru/initOrru.gi
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
ReadPackageHap( "lib/Orru/subgroups.gi");
ReadPackageHap( "lib/Orru/finiteProjectiveSpaces.gi");
ReadPackageHap( "lib/Orru/HAP_SL3ZSubgroupTree_fast.gi");
Loading