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
6 changes: 6 additions & 0 deletions lib/CongruenceGroups/congGroups.gd
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ DeclareAttribute( "IndexInAmbientGroup", IsHAPCongruenceSubgroup );
## is the cubic tree.
DeclareAttribute( "StabilizerSubgroup", IsHAPCongruenceSubgroup );

############################################################################
##
## ProjectiveSpave( <G> )
##
DeclareAttribute( "ProjectiveSpace", IsHAPCongruenceSubgroup );

############################################################################
##
## AmbientTransversal( <G> )
Expand Down
1 change: 1 addition & 0 deletions lib/CongruenceGroups/congGroups.gi
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ InstallMethod( CongruenceSubgroupGamma0, "for integer matrix group and positive
##################################################
##
## Remaining components to be computed in other functions.
ProjectiveSpace(G);
AmbientTransversal(G);
CosetPosFunction(G); #A generic method will be used to construct the
CosetRepFunction(G); #these two functions except for cases with a
Expand Down
15 changes: 15 additions & 0 deletions lib/CongruenceGroups/sl2methods.gi
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,21 @@
return ind;
end);

##########################################################################
##
## ProjectiveSpace( <G> )
InstallMethod(ProjectiveSpace,
"Projective space",
[ IsIntegerMatrixGroup and IsHAPCongruenceSubgroupGamma0 ],
function(G)
local n;
if DimensionOfMatrixGroup(G)>2 then TryNextMethod(); fi;

n := LevelOfCongruenceSubgroup(G);

return FiniteProjectiveLine(n);
end);

##########################################################################
##
## AmbientTransversal( <G> )
Expand Down
98 changes: 91 additions & 7 deletions lib/Orru/sl2methodsExtra.gi
Original file line number Diff line number Diff line change
@@ -1,29 +1,113 @@
# methods for power of primes

InstallMethod(CosetPosFunction,
"Returns cosetPos(g) function for the congruence subgroup G",
[ IsIntegerMatrixGroup and IsHAPCongruenceSubgroupGamma0 ],
function(G)
local cosetPos, canonicalRep, n, ProjLine;
local cosetPos, canonicalRep, n, countRep;

if DimensionOfMatrixGroup(G) <> 2 then
TryNextMethod();
fi;

n := LevelOfCongruenceSubgroup(G);

if IsPrime(n) then
if not IsPrimePowerInt(n) then
TryNextMethod();
fi;

ProjLine := FiniteProjectiveLine(n);
if IsPrime(n) then
TryNextMethod();
fi;

canonicalRep := function(g)
local v, vv, U, d, dd, x, y;
v := [g[1][1], g[2][1]];
vv := List(v, x -> x mod n);
U := Units(Integers mod n);
U := Filtered([0..n],i->Gcd(i,n)=1);
if vv[1] mod n = 0 then
return [0,1];
elif vv[1] mod n in U then
return [1,(Inverse(vv[1]) mod n)*vv[2] mod n];
else
d := Gcd(vv[1],n);
dd := n/d;
x := vv[1]/d;
y := vv[2]/x mod dd;
while not Gcd(d,y) = 1 do
y := y + dd;
od;
return [d, y];
fi;
end;

countRep := function(m)
local p, e, i, countp;

p := Set(Factors(m))[1];
e := Length(Factors(m));

countp := [1,m];

for i in [2..e] do
Add(countp, p^(e-i)*(p-1));
od;

return countp;
end;

cosetPos := function(g)
local w, count, e, U;
w := canonicalRep(g);

count := countRep(n);

if w[1] = 0 then
return 1;
elif w[1] = 1 then
U := [0..n-1];
return 1 + Position(U,w[2]);
else
e := Length(Factors(w[1]));
U := Filtered([0..n/w[1]], i-> Gcd(i,n/w[1]) = 1);
return Sum(count{[1..1 + e]}) + Position(U, w[2]);
fi;
end;

return cosetPos;
end);

InstallMethod(CosetPosFunction,
"Returns cosetPos(g) function for the congruence subgroup G",
[ IsIntegerMatrixGroup and IsHAPCongruenceSubgroupGamma0 ],
function(G)
local cosetPos, canonicalRep, n, ProjLine, U;

if DimensionOfMatrixGroup(G) <> 2 then
TryNextMethod();
fi;

n := LevelOfCongruenceSubgroup(G);

if IsPrime(n) then
TryNextMethod();
fi;

if IsPrimePowerInt(n) then
TryNextMethod();
fi;

ProjLine := ProjectiveSpace(G);

U := Filtered([0..n],i -> Gcd(i,n) = 1);

canonicalRep := function(g)
local v, vv, d, dd, x, y;
v := [g[1][1], g[2][1]];
vv := List(v, x -> x mod n);
if vv[1] mod n = 0 then
return [0,1];
elif ZmodnZObj(vv[1],n) in U then
elif (vv[1] mod n) in U then
return [1,(Inverse(vv[1]) mod n)*vv[2] mod n];
else
d := Gcd(vv[1],n);
Expand Down Expand Up @@ -62,7 +146,7 @@ InstallMethod(CosetRepFunction,
TryNextMethod();
fi;

ProjLine := FiniteProjectiveLine(n);
ProjLine := ProjectiveSpace(G);

cosetOfInt := function(i)
local a, c, b, d, gg;
Expand Down Expand Up @@ -106,7 +190,7 @@ InstallMethod(CosetRepFunction,
TryNextMethod();
fi;

ProjLine := FiniteProjectiveLine(n);
ProjLine := ProjectiveSpace(G);

GG:=AmbientGroupOfCongruenceSubgroup(G);

Expand Down
22 changes: 19 additions & 3 deletions lib/Orru/sl3methods.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@
##
## Methods for 3x3 congruence subgroups of SL3

##########################################################################
##
## ProjectiveSpace( <G> )
##

InstallMethod(ProjectiveSpace,
"Projective space",
[ IsIntegerMatrixGroup and IsHAPCongruenceSubgroupGamma0 ],
function(G)
local n;
if DimensionOfMatrixGroup(G)<>3 then TryNextMethod(); fi;

n := LevelOfCongruenceSubgroup(G);

return FiniteProjectivePlane(n);
end);
##########################################################################
##
## CosetPosFunction( <G> )
Expand All @@ -19,7 +35,7 @@ InstallMethod(CosetPosFunction,

n := LevelOfCongruenceSubgroup(G);

ProjPlane := FiniteProjectivePlane(n);
ProjPlane := ProjectiveSpace(G);

cosetPos := function(g)
local v, vv, U, u, w;
Expand Down Expand Up @@ -59,7 +75,7 @@ InstallMethod(CosetRepFunction,
return Inverse(Herm!.rowtrans);
end;

ProjPlane := FiniteProjectivePlane(n);
ProjPlane := ProjectiveSpace(G);

cosetOfInt:=function(i)
local x,y,z;
Expand Down Expand Up @@ -94,7 +110,7 @@ function(G)
fi;

n := LevelOfCongruenceSubgroup(G);
ProjPlane := FiniteProjectivePlane(n);
ProjPlane := ProjectiveSpace(G);

GG:=AmbientGroupOfCongruenceSubgroup(G);
cosetPos:=CosetPosFunction(G);
Expand Down
Loading