Skip to content

Commit e8a4329

Browse files
Merge pull request #152 from giuliao27/extra-methods
Extra methods for the prime power case + change of the implementation of the structure of the congruence subgroup
2 parents c320616 + ddc46a4 commit e8a4329

5 files changed

Lines changed: 132 additions & 10 deletions

File tree

lib/CongruenceGroups/congGroups.gd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ DeclareAttribute( "IndexInAmbientGroup", IsHAPCongruenceSubgroup );
113113
## is the cubic tree.
114114
DeclareAttribute( "StabilizerSubgroup", IsHAPCongruenceSubgroup );
115115

116+
############################################################################
117+
##
118+
## ProjectiveSpave( <G> )
119+
##
120+
DeclareAttribute( "ProjectiveSpace", IsHAPCongruenceSubgroup );
121+
116122
############################################################################
117123
##
118124
## AmbientTransversal( <G> )

lib/CongruenceGroups/congGroups.gi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ InstallMethod( CongruenceSubgroupGamma0, "for integer matrix group and positive
101101
##################################################
102102
##
103103
## Remaining components to be computed in other functions.
104+
ProjectiveSpace(G);
104105
AmbientTransversal(G);
105106
CosetPosFunction(G); #A generic method will be used to construct the
106107
CosetRepFunction(G); #these two functions except for cases with a

lib/CongruenceGroups/sl2methods.gi

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,21 @@
2323
return ind;
2424
end);
2525

26+
##########################################################################
27+
##
28+
## ProjectiveSpace( <G> )
29+
InstallMethod(ProjectiveSpace,
30+
"Projective space",
31+
[ IsIntegerMatrixGroup and IsHAPCongruenceSubgroupGamma0 ],
32+
function(G)
33+
local n;
34+
if DimensionOfMatrixGroup(G)>2 then TryNextMethod(); fi;
35+
36+
n := LevelOfCongruenceSubgroup(G);
37+
38+
return FiniteProjectiveLine(n);
39+
end);
40+
2641
##########################################################################
2742
##
2843
## AmbientTransversal( <G> )

lib/Orru/sl2methodsExtra.gi

Lines changed: 91 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,113 @@
1+
# methods for power of primes
2+
13
InstallMethod(CosetPosFunction,
24
"Returns cosetPos(g) function for the congruence subgroup G",
35
[ IsIntegerMatrixGroup and IsHAPCongruenceSubgroupGamma0 ],
46
function(G)
5-
local cosetPos, canonicalRep, n, ProjLine;
7+
local cosetPos, canonicalRep, n, countRep;
68

79
if DimensionOfMatrixGroup(G) <> 2 then
810
TryNextMethod();
911
fi;
1012

1113
n := LevelOfCongruenceSubgroup(G);
1214

13-
if IsPrime(n) then
15+
if not IsPrimePowerInt(n) then
1416
TryNextMethod();
1517
fi;
1618

17-
ProjLine := FiniteProjectiveLine(n);
19+
if IsPrime(n) then
20+
TryNextMethod();
21+
fi;
1822

1923
canonicalRep := function(g)
2024
local v, vv, U, d, dd, x, y;
2125
v := [g[1][1], g[2][1]];
2226
vv := List(v, x -> x mod n);
23-
U := Units(Integers mod n);
27+
U := Filtered([0..n],i->Gcd(i,n)=1);
28+
if vv[1] mod n = 0 then
29+
return [0,1];
30+
elif vv[1] mod n in U then
31+
return [1,(Inverse(vv[1]) mod n)*vv[2] mod n];
32+
else
33+
d := Gcd(vv[1],n);
34+
dd := n/d;
35+
x := vv[1]/d;
36+
y := vv[2]/x mod dd;
37+
while not Gcd(d,y) = 1 do
38+
y := y + dd;
39+
od;
40+
return [d, y];
41+
fi;
42+
end;
43+
44+
countRep := function(m)
45+
local p, e, i, countp;
46+
47+
p := Set(Factors(m))[1];
48+
e := Length(Factors(m));
49+
50+
countp := [1,m];
51+
52+
for i in [2..e] do
53+
Add(countp, p^(e-i)*(p-1));
54+
od;
55+
56+
return countp;
57+
end;
58+
59+
cosetPos := function(g)
60+
local w, count, e, U;
61+
w := canonicalRep(g);
62+
63+
count := countRep(n);
64+
65+
if w[1] = 0 then
66+
return 1;
67+
elif w[1] = 1 then
68+
U := [0..n-1];
69+
return 1 + Position(U,w[2]);
70+
else
71+
e := Length(Factors(w[1]));
72+
U := Filtered([0..n/w[1]], i-> Gcd(i,n/w[1]) = 1);
73+
return Sum(count{[1..1 + e]}) + Position(U, w[2]);
74+
fi;
75+
end;
76+
77+
return cosetPos;
78+
end);
79+
80+
InstallMethod(CosetPosFunction,
81+
"Returns cosetPos(g) function for the congruence subgroup G",
82+
[ IsIntegerMatrixGroup and IsHAPCongruenceSubgroupGamma0 ],
83+
function(G)
84+
local cosetPos, canonicalRep, n, ProjLine, U;
85+
86+
if DimensionOfMatrixGroup(G) <> 2 then
87+
TryNextMethod();
88+
fi;
89+
90+
n := LevelOfCongruenceSubgroup(G);
91+
92+
if IsPrime(n) then
93+
TryNextMethod();
94+
fi;
95+
96+
if IsPrimePowerInt(n) then
97+
TryNextMethod();
98+
fi;
99+
100+
ProjLine := ProjectiveSpace(G);
101+
102+
U := Filtered([0..n],i -> Gcd(i,n) = 1);
103+
104+
canonicalRep := function(g)
105+
local v, vv, d, dd, x, y;
106+
v := [g[1][1], g[2][1]];
107+
vv := List(v, x -> x mod n);
24108
if vv[1] mod n = 0 then
25109
return [0,1];
26-
elif ZmodnZObj(vv[1],n) in U then
110+
elif (vv[1] mod n) in U then
27111
return [1,(Inverse(vv[1]) mod n)*vv[2] mod n];
28112
else
29113
d := Gcd(vv[1],n);
@@ -62,7 +146,7 @@ InstallMethod(CosetRepFunction,
62146
TryNextMethod();
63147
fi;
64148

65-
ProjLine := FiniteProjectiveLine(n);
149+
ProjLine := ProjectiveSpace(G);
66150

67151
cosetOfInt := function(i)
68152
local a, c, b, d, gg;
@@ -106,7 +190,7 @@ InstallMethod(CosetRepFunction,
106190
TryNextMethod();
107191
fi;
108192

109-
ProjLine := FiniteProjectiveLine(n);
193+
ProjLine := ProjectiveSpace(G);
110194

111195
GG:=AmbientGroupOfCongruenceSubgroup(G);
112196

lib/Orru/sl3methods.gi

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@
22
##
33
## Methods for 3x3 congruence subgroups of SL3
44

5+
##########################################################################
6+
##
7+
## ProjectiveSpace( <G> )
8+
##
9+
10+
InstallMethod(ProjectiveSpace,
11+
"Projective space",
12+
[ IsIntegerMatrixGroup and IsHAPCongruenceSubgroupGamma0 ],
13+
function(G)
14+
local n;
15+
if DimensionOfMatrixGroup(G)<>3 then TryNextMethod(); fi;
16+
17+
n := LevelOfCongruenceSubgroup(G);
18+
19+
return FiniteProjectivePlane(n);
20+
end);
521
##########################################################################
622
##
723
## CosetPosFunction( <G> )
@@ -19,7 +35,7 @@ InstallMethod(CosetPosFunction,
1935

2036
n := LevelOfCongruenceSubgroup(G);
2137

22-
ProjPlane := FiniteProjectivePlane(n);
38+
ProjPlane := ProjectiveSpace(G);
2339

2440
cosetPos := function(g)
2541
local v, vv, U, u, w;
@@ -59,7 +75,7 @@ InstallMethod(CosetRepFunction,
5975
return Inverse(Herm!.rowtrans);
6076
end;
6177

62-
ProjPlane := FiniteProjectivePlane(n);
78+
ProjPlane := ProjectiveSpace(G);
6379

6480
cosetOfInt:=function(i)
6581
local x,y,z;
@@ -94,7 +110,7 @@ function(G)
94110
fi;
95111

96112
n := LevelOfCongruenceSubgroup(G);
97-
ProjPlane := FiniteProjectivePlane(n);
113+
ProjPlane := ProjectiveSpace(G);
98114

99115
GG:=AmbientGroupOfCongruenceSubgroup(G);
100116
cosetPos:=CosetPosFunction(G);

0 commit comments

Comments
 (0)