Got it. Jesus here is how it works for me...don't ask me why...
def my_congruence_group(B, N):
M = MatrixSpace(Zmod(N), 2)
print(M)
assert (B**2).is_zero()
B = M(B)
G = SL(2, Zmod(N))
H = G.subgroup([1 + k*B for k in range(N)])
C = libgap.RightCosets(G, H)
M1 = M([[1,1],[0,1]])
M2 = M([[1,0],[1,1]])
M3 = M([[0,-1],[1,0]])
M4 = M([[0,1],[-1,1]])
l = libgap.Permutation( M1, C, libgap.OnRight)
r = libgap.Permutation( M2, C, libgap.OnRight)
s2 = libgap.Permutation( M3, C, libgap.OnRight)
s3 = libgap.Permutation( M4, C, libgap.OnRight)
return ArithmeticSubgroup_Permutation(L=l.sage(), R=r.sage(), S2=s2.sage(), S3=s3.sage())
↧