def are_equivalent(self, x, y, trans=False): r""" Check if the cusps `x` and `y` are equivalent under the action of this group. ALGORITHM: The cusps `u_1 / v_1` and `u_2 / v_2` are equivalent modulo `\Gamma(N)` if and only if `(u_1, v_1) = \pm (u_2, v_2) \bmod N`. EXAMPLE:: sage: Gamma(7).are_equivalent(Cusp(2/3), Cusp(5/4)) True """ if trans: return CongruenceSubgroup.are_equivalent(self, x,y,trans=trans) N = self.level() u1,v1 = (x.numerator() % N, x.denominator() % N) u2,v2 = (y.numerator(), y.denominator()) return ((u1,v1) == (u2 % N, v2 % N)) or ((u1,v1) == (-u2 % N, -v2 % N))