You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both 6/7 and 1/0 should reduce to Infinity = 1/0 since 6/7 and 1/0 are equivalent modulo Gamma(7), and according to the definition of a reduced cusp for Gamma(N). So we should see
sage: Gamma(7).reduce_cusp(Cusp(6,7))
Infinity
Actual Behavior
instead of
sage: Gamma(7).reduce_cusp(Cusp(6,7))
6/7
Additional Information
The code reduces both u and v mod N (where the cusp is u/v and the level is N) and then calls the hidden function _lift_pair(u,v,N). But that function assumes that its input u,v are coprime, which in this case they are not.
To fix this it suffices to change _lift_pair() to return Cusp(1,0), i.e. Infinity, when v%N==0 and u%N is either +1 or N-1; the second case was being missed.
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.
Fixessagemath#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: sagemath#36165
Reported by: John Cremona
Reviewer(s): Frédéric Chapoton
Steps To Reproduce
In Sage-10.1:
sage: Gamma(7).reduce_cusp(Cusp(6,7))
6/7
sage: Gamma(7).reduce_cusp(Cusp(1,0))
Infinity
sage: Gamma(7).are_equivalent(Cusp(1,0), Cusp(6,7))
True
Expected Behavior
Both 6/7 and 1/0 should reduce to Infinity = 1/0 since 6/7 and 1/0 are equivalent modulo Gamma(7), and according to the definition of a reduced cusp for Gamma(N). So we should see
sage: Gamma(7).reduce_cusp(Cusp(6,7))
Infinity
Actual Behavior
instead of
sage: Gamma(7).reduce_cusp(Cusp(6,7))
6/7
Additional Information
The code reduces both u and v mod N (where the cusp is u/v and the level is N) and then calls the hidden function _lift_pair(u,v,N). But that function assumes that its input u,v are coprime, which in this case they are not.
To fix this it suffices to change _lift_pair() to return Cusp(1,0), i.e. Infinity, when v%N==0 and u%N is either +1 or N-1; the second case was being missed.
Environment
Checklist
The text was updated successfully, but these errors were encountered: