#10926: is_gamma0_equiv on Cusps is wrong
-----------------------------+----------------------------------------------
Reporter: wuthrich | Owner: craigcitro
Type: defect | Status: needs_work
Priority: major | Milestone: sage-4.7
Component: modular forms | Keywords: cusps Gamma0
Author: wuthrich | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-----------------------------+----------------------------------------------
Changes (by cremona):
* status: needs_review => needs_work
Comment:
I approve of the changed output (despite lack of backwards compatibility
and the risk of breaking people's code). This is also consistent with
cusps_nf.py (though for some reason there the returned transformation is
give as a list [A,B,C,D] instead of an actual matrix).
I do have some other comments, mostly not about the changes (sorry!).
1. A necessary condition for a1/b1 and a2/b2 to be equivalent is
gcd(b1,N)=gcd(b2,N); this is also sufficient when N is square-free. So I
would test this right at the start. (In fact one should also check the
case of *equality* of the cusps first, since this does occur quite often
in practice!) If no transformation is required then the extra condition
needed for sufficiency is s1*b2=s2*b1 (mod gcd(N,b1*b2)) where s1, s2 are
the inverses of a1,a2, as in the current code. I do not really know why
the code treats the cases 0/1, 1/0 specially in the definition of s1,s2:
it suffices to use xgcd to write a1*s1+b1*r1=1 and similarly for a2,b1.
2. There are several occurrences of ZZ(0), ZZ(1). It is probably more
efficient to define zero=ZZ(0), one==ZZ(1) at the start; even better, use
ZZ.zero_element(), ZZ.one(element) since those are cached constants.
Finally, it may well be that the approach I use in the proof of that Lemma
is not the most efficient for testing equivalence.
The patch applies fine to 4.7.alpha1 and all tests pass.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10926#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.