Skip to content

Commit 169ec61

Browse files
Merge pull request #150 from giuliao27/extra-methods
Additional methods for constructing congruence subgroups of SL2 and SL3
2 parents 6fdb585 + 4f74499 commit 169ec61

6 files changed

Lines changed: 177 additions & 4 deletions

File tree

lib/Orru/decsOrru.gd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ IsHapRightTransversalSL3ZSubgroup:=NewFilter("IsHapRightTransversalSL3ZSubgroup"
33
DeclareGlobalFunction("HAP_GenericCongruenceSubgroup");
44
DeclareOperation("FiniteProjectiveLine",[IsInt]);
55
DeclareOperation("FiniteProjectivePlane",[IsInt]);
6+
DeclareOperation("FiniteProjectiveLine_alt",[IsInt]);
67
DeclareGlobalFunction("HAP_FiniteProjectiveLineIntegers");
78
DeclareGlobalFunction("HAP_FiniteProjectiveLineIntegers_alt");
89
DeclareGlobalFunction("HAP_FiniteProjectivePlaneIntegers");

lib/Orru/finiteProjectiveSpaces.gi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ return HAP_FiniteProjectivePlaneIntegers(n);
2020
end);
2121
########################################################
2222
########################################################
23+
InstallMethod(FiniteProjectiveLine_alt,
24+
"Finite projective line for the ring Z/nZ",
25+
[IsInt],
26+
function(n)
27+
return HAP_FiniteProjectiveLineIntegers_alt(n);
28+
end);
2329

2430

2531

lib/Orru/initOrru.gi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ ReadPackageHap( "lib/Orru/subgroups.gi");
22
ReadPackageHap( "lib/Orru/finiteProjectiveSpaces.gi");
33
ReadPackageHap( "lib/Orru/HAP_SL3ZSubgroupTree_fast.gi");
44
ReadPackageHap( "lib/Orru/SL3ZTopHomology.gi");
5+
ReadPackageHap( "lib/Orru/sl2methodsExtra.gi");
6+
ReadPackageHap( "lib/Orru/sl3methods.gi");

lib/Orru/sl2methodsExtra.gi

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
InstallMethod(CosetPosFunction,
2+
"Returns cosetPos(g) function for the congruence subgroup G",
3+
[ IsIntegerMatrixGroup and IsHAPCongruenceSubgroupGamma0 ],
4+
function(G)
5+
local cosetPos, canonicalRep, n, ProjLine;
6+
7+
if DimensionOfMatrixGroup(G) <> 2 then
8+
TryNextMethod();
9+
fi;
10+
11+
n := LevelOfCongruenceSubgroup(G);
12+
13+
ProjLine := FiniteProjectiveLine(n);
14+
15+
canonicalRep := function(g)
16+
local v, vv, U, d, dd, x, y;
17+
v := [g[1][1], g[2][1]];
18+
vv := List(v, x -> x mod n);
19+
U := Units(Integers mod n);
20+
if vv[1] mod n = 0 then
21+
return [0,1];
22+
elif ZmodnZObj(vv[1],n) in U then
23+
return [1,(Inverse(vv[1]) mod n)*vv[2] mod n];
24+
else
25+
d := Gcd(vv[1],n);
26+
dd := n/d;
27+
x := vv[1]/d;
28+
y := vv[2]/x mod dd;
29+
while not Gcd(d,y) = 1 do
30+
y := y + dd;
31+
od;
32+
return [d, y];
33+
fi;
34+
end;
35+
36+
cosetPos := function(g)
37+
local w;
38+
w := canonicalRep(g);
39+
return Position(ProjLine,w);
40+
end;
41+
42+
return cosetPos;
43+
end);
44+
45+
InstallMethod(CosetRepFunction,
46+
"Returns cosetPos(g) function for the congruence subgroup G",
47+
[ IsIntegerMatrixGroup and IsHAPCongruenceSubgroupGamma0 ],
48+
function(G)
49+
local cosetOfInt, cosetRep, n, ProjLine, cosetPos;
50+
51+
if DimensionOfMatrixGroup(G) <> 2 then
52+
TryNextMethod();
53+
fi;
54+
55+
n := LevelOfCongruenceSubgroup(G);
56+
57+
ProjLine := FiniteProjectiveLine(n);
58+
59+
cosetOfInt := function(i)
60+
local a, c, b, d, gg;
61+
a := ProjLine[i][1];
62+
c := ProjLine[i][2];
63+
if a = 0 then
64+
return [[0,-1],[1,0]];
65+
fi;
66+
gg := Gcdex(a,c);
67+
b := -gg.coeff2;
68+
d := gg.coeff1;
69+
return [[a,b],[c,d]];
70+
end;
71+
72+
cosetPos := CosetPosFunction(G);
73+
74+
cosetRep:=function(g);
75+
return cosetOfInt(cosetPos(g));
76+
end;
77+
78+
return cosetRep;
79+
end);

lib/Orru/sl3methods.gi

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
##########################################################################
2+
##
3+
## Methods for 3x3 congruence subgroups of SL3
4+
5+
##########################################################################
6+
##
7+
## CosetPosFunction( <G> )
8+
##
9+
## Returns a function cosetPos(g) giving the position of the coset gG in
10+
## the ambient group.
11+
InstallMethod(CosetPosFunction,
12+
"Returns cosetPos(g) function for the congruence subgroup G",
13+
[ IsIntegerMatrixGroup and IsHAPCongruenceSubgroupGamma0 ],
14+
function(G)
15+
local cosetPos, n, ProjPlane;
16+
if DimensionOfMatrixGroup(G) <> 3 then
17+
TryNextMethod();
18+
fi;
19+
20+
n := LevelOfCongruenceSubgroup(G);
21+
22+
ProjPlane := FiniteProjectivePlane(n);
23+
24+
cosetPos := function(g)
25+
local v, vv, U, u, w;
26+
v := [g[1][1], g[2][1], g[3][1]];
27+
vv := List(v, x -> x mod n);
28+
U := Units(Integers mod n);
29+
for u in U do
30+
w := List(vv, x -> (Int(u)*x) mod n);
31+
if w in ProjPlane.Reps then
32+
return Position(ProjPlane.Reps,w);
33+
fi;
34+
od;
35+
end;
36+
37+
return cosetPos;
38+
end);
39+
##########################################################################
40+
##
41+
## CosetRepFunction( <G> )
42+
##
43+
## Returns a function cosetPos(g) giving a canonical rpresentative of the
44+
## coset gG in the ambient group.
45+
InstallMethod(CosetRepFunction,
46+
"Returns cosetRep(g) function for the congruence subgroup G",
47+
[ IsIntegerMatrixGroup and IsHAPCongruenceSubgroupGamma0 ],
48+
function(G)
49+
local MatrixInSL3_Hermite, cosetOfInt, cosetRep, n, ProjPlane, cosetPos;
50+
if DimensionOfMatrixGroup(G) <> 3 then
51+
TryNextMethod();
52+
fi;
53+
54+
n := LevelOfCongruenceSubgroup(G);
55+
56+
MatrixInSL3_Hermite := function(v)
57+
local Herm;
58+
Herm := HermiteNormalFormIntegerMatTransform([[v[1]],[v[2]],[v[3]]]);
59+
return Inverse(Herm!.rowtrans);
60+
end;
61+
62+
ProjPlane := FiniteProjectivePlane(n);
63+
64+
cosetOfInt:=function(i)
65+
local x,y,z;
66+
x := ProjPlane.Reps[i][1];
67+
y := ProjPlane.Reps[i][2];
68+
z := ProjPlane.Reps[i][3];
69+
70+
return MatrixInSL3_Hermite([x,y,z]);
71+
end;
72+
73+
cosetPos := CosetPosFunction(G);
74+
75+
cosetRep:=function(g);
76+
return cosetOfInt(cosetPos(g));
77+
end;
78+
79+
return cosetRep;
80+
end);

lib/Orru/subgroups.gi

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function(n,m)
124124
G!.index := m*Product(List(SSortedList(Factors(m)), p->1+1/p));
125125
fi;
126126

127-
ProjLine := FiniteProjectiveLine(m);
127+
ProjLine := FiniteProjectiveLine_alt(m);
128128
CosetPos := function(g)
129129
local v, vv, U, u, w;
130130
v := [g[1][1], g[2][1]];
@@ -225,7 +225,7 @@ function(n,m)
225225
ProjLine := FiniteProjectiveLine(m);
226226

227227
CanonicalRep := function(g)
228-
local v, vv, U, d, dd;
228+
local v, vv, U, d, dd, x, y;
229229
v := [g[1][1], g[2][1]];
230230
vv := List(v, x -> x mod m);
231231
U := Units(Integers mod m);
@@ -236,7 +236,12 @@ function(n,m)
236236
else
237237
d := Gcd(vv[1],m);
238238
dd := m/d;
239-
return [vv[1], vv[2] mod dd];
239+
x := vv[1]/d;
240+
y := vv[2]/x mod dd;
241+
while not Gcd(d,y) = 1 do
242+
y := y + dd;
243+
od;
244+
return [d, y];
240245
fi;
241246
end;
242247

@@ -306,7 +311,7 @@ function(G,H)
306311
TryNextMethod();
307312
fi;
308313

309-
HAPCongruenceSubgroupTree(H);
314+
#HAPCongruenceSubgroupTree(H);
310315

311316
return HAP_TransversalCongruenceSubgroupInAmbientGroup(G,H);
312317
end);

0 commit comments

Comments
 (0)