diff --git a/lib/Orru/sl2methodsExtra.gi b/lib/Orru/sl2methodsExtra.gi index f4004a1c..a74ccd39 100644 --- a/lib/Orru/sl2methodsExtra.gi +++ b/lib/Orru/sl2methodsExtra.gi @@ -76,4 +76,55 @@ InstallMethod(CosetRepFunction, end; return cosetRep; - end); \ No newline at end of file + end); + + ########################################################################## +## +## AmbientTransversal( ) +## +## Right transversal for a congruence subgroup G in its ambient group GG + InstallMethod(AmbientTransversal, + "Right transversal for a congruence subgroup G in its ambient group", + [ IsIntegerMatrixGroup and IsHAPCongruenceSubgroupGamma0 ], + function(G) + local n, GG, poscan, cosetPos, transversal, ProjLine, cosetOfInt; + if DimensionOfMatrixGroup(G) <> 2 then + TryNextMethod(); + fi; + + n:=LevelOfCongruenceSubgroup(G); + + ProjLine := FiniteProjectiveLine(n); + + GG:=AmbientGroupOfCongruenceSubgroup(G); + + cosetPos:=CosetPosFunction(G); + + cosetOfInt := function(i) + local a, c, b, d, gg; + a := ProjLine[i][1]; + c := ProjLine[i][2]; + if a = 0 then + return [[0,-1],[1,0]]; + fi; + gg := Gcdex(a,c); + b := -gg.coeff2; + d := gg.coeff1; + return [[a,b],[c,d]]; + end; + + poscan := function(g) + return cosetPos(g^-1); + end; + + transversal := List([1..Length(ProjLine)],i->cosetOfInt(i)^-1); + + return Objectify( NewType( FamilyObj( GG ), + IsHapRightTransversalSL2ZSubgroup and IsList and + IsDuplicateFreeList and IsAttributeStoringRep ), + rec( group := GG, + subgroup := G, + cosets:=transversal, + poscan:=poscan + )); + end); \ No newline at end of file diff --git a/lib/Orru/sl3methods.gi b/lib/Orru/sl3methods.gi index c79fbae5..a1d34500 100644 --- a/lib/Orru/sl3methods.gi +++ b/lib/Orru/sl3methods.gi @@ -77,4 +77,54 @@ InstallMethod(CosetRepFunction, end; return cosetRep; - end); \ No newline at end of file + end); + + ## +## AmbientTransversal( ) +## +## Right transversal for a congruence subgroup G in its ambient group GG +InstallMethod(AmbientTransversal, +"Right transversal for a congruence subgroup G in its ambient group", +[ IsIntegerMatrixGroup and IsHAPCongruenceSubgroupGamma0 ], +function(G) + local n, GG, poscan, cosetPos, transversal, ProjPlane, cosetOfInt, MatrixInSL3_Hermite; + + if DimensionOfMatrixGroup(G) <> 3 then + TryNextMethod(); + fi; + + n := LevelOfCongruenceSubgroup(G); + ProjPlane := FiniteProjectivePlane(n); + + GG:=AmbientGroupOfCongruenceSubgroup(G); + cosetPos:=CosetPosFunction(G); + + MatrixInSL3_Hermite := function(v) + local Herm; + Herm := HermiteNormalFormIntegerMatTransform([[v[1]],[v[2]],[v[3]]]); + return Inverse(Herm!.rowtrans); + end; + + cosetOfInt:=function(i) + local x,y,z; + x := ProjPlane.Reps[i][1]; + y := ProjPlane.Reps[i][2]; + z := ProjPlane.Reps[i][3]; + return MatrixInSL3_Hermite([x,y,z]); + end; + + poscan := function(g) + return cosetPos(g^-1); + end; + + transversal := List([1..Length(ProjPlane.Reps)],i->cosetOfInt(i)^-1); + + return Objectify( NewType( FamilyObj( GG ), + IsHapRightTransversalSL2ZSubgroup and IsList and + IsDuplicateFreeList and IsAttributeStoringRep ), + rec( group := GG, + subgroup := G, + cosets:=transversal, + poscan:=poscan + )); +end); \ No newline at end of file diff --git a/lib/Orru/subgroups.gi b/lib/Orru/subgroups.gi index b7d2af17..aaab1b1c 100644 --- a/lib/Orru/subgroups.gi +++ b/lib/Orru/subgroups.gi @@ -445,7 +445,7 @@ function(G,H) TryNextMethod(); fi; - HAPCongruenceSubgroupTree(H); + #HAPCongruenceSubgroupTree(H); return HAP_TransversalCongruenceSubgroupInAmbientGroup(G,H); end);