The generic ArithmeticSubgroup class (which represents a finite index
subgroup of SL2Z) can calculate more or less anything about a subgroup
of SL2Z given a membership testing function.
For instance:
sage: class BlackBoxSubgroup
(sage.modular.arithgroup.arithgroup_generic.ArithmeticSubgroup):
def __init__(self,
f):
self._f =
f
sage.modular.arithgroup.arithgroup_generic.ArithmeticSubgroup.__init__
(self)
def __call__(self,
u):
if self._f
(u):
return
u
else:
raise TypeError
sage: G = BlackBoxSubgroup(lambda u: u in Gamma0(5) and u in Gamma1
(7))
sage: G.index()
288
sage: G.genus()
7
sage: G.cusps()
[Infinity, 0, -1/2, -1/3, -1/5, -1/7, -1/10, -1/15, -2/7, -3/14,
-3/35, -2/35]
sage: G.are_equivalent_cusps(1/6, 273/169)
sage: G.are_equivalent_cusps(1/6, 273/169, trans = True) # give
transformation matrix
[-1413 239]
[ -875 148]
True
Unfortunately this is rather slow, because it uses Todd-Coxeter
enumeration to calculate a full set of coset reps for G in SL2Z, and
doesn't take advantage of the fact that G is congruence.
David
On Dec 15, 1:44 pm, John Cremona <
john.crem...@gmail.com> wrote:
> My instinct says that if two cusps are equivalent modulo two
> congruence subgroups of coprime levels then they should be equivalent
> modulo the intersection, i.e. you can find a matrix in the
> intersection taking one to the other. But I have not spent more than
> a few seconds thinking about it (yet!).
>
> John
>
> 2009/12/15 William Stein <
wst...@gmail.com>:
>