Skip to content

Commit 4f4fbc2

Browse files
author
Release Manager
committed
gh-36165: Fix reduction of cusps for Gamma(N) The method reduce_cusp for Gamma(N) did not work properly on cusps u/v where (u,v) is congruent to (-1,0) mod N. This fixes that by fixing the function _lift_pair(). A doctest has been added with the example reported on sage-devel. Fixes #36163 ### 📝 Checklist - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation accordingly. URL: #36165 Reported by: John Cremona Reviewer(s): Frédéric Chapoton
2 parents 4553735 + bf08b12 commit 4f4fbc2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/sage/modular/arithgroup/congroup_gamma.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,12 @@ def reduce_cusp(self, c):
240240
sage: G = Gamma(50)
241241
sage: all(c == G.reduce_cusp(c) for c in G.cusps())
242242
True
243+
244+
We test that :trac:`36163` is fixed::
245+
246+
sage: Gamma(7).reduce_cusp(Cusp(6,7))
247+
Infinity
248+
243249
"""
244250
N = self.level()
245251
c = Cusp(c)
@@ -341,7 +347,7 @@ def _lift_pair(U,V,N):
341347
u = U % N
342348
v = V % N
343349
if v == 0:
344-
if u == 1:
350+
if u == 1 or u == N-1:
345351
return (1,0)
346352
else:
347353
v = N

0 commit comments

Comments
 (0)