New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[with new new patch] New BSGS point counting on elliptic curves over finite fields #4900
Comments
Attachment: bsgs.patch.gz |
comment:2
|
comment:3
Replying to @malb:
OK. Actually the 'all' option does not work at all as advertised since the cached value is used. I had to comment out the cache retrieval lines to test. I think a better way of managing this would be for the individual methods to have separate functions which do
I checked and there's nothing in Sage itself affected. In other places algorithm=pari is used and it makes more sense to me than to second-guess what algorithm the current version of pari uses.
I have no strong feelings. The assertions are there for debugging purposes. I prefer this way of commenting lines out; I could delete them, but then it will be more hassle next time there is a bug. |
comment:4
I made this "not ready for review" since Drew has made some very helpful suggestions which should help the efficiency main function in this patch. At the same time I am dealing with the trivialities raised by malb's non-review ;) |
comment:5
Testing has revealed a bug (an embarrassing one in code of mine) in _p_primary_torsion_basis() as exemplified here:
Here the 2-sylow subgroup has structure 2^16 * 2 but E._p_primary_torsion_basis(2) only gives 22*21. I know what the problem is and am working out how to fix it. NB This function is called in ell_torsion.py in computing torsion groups over number fields, which is rather likely to give wrong answers (though not over Q where pari is used ;)) until this is fixed. So I will make this a separate ticket marked "major defect"! |
comment:6
Attachment: bsgs-new.patch.gz The new patch replaces the old. It is based on 3.2.3+#4926 which means that both the files touched (ell_generic.py and ell_finite_field.py) are fully sphinxified. It does the following:
So I have broken some rules by having this patch deal with #4937 too; by the time I realised, it was too late to separate the two. As a consolation I'll add a patch at #4937, based on this one, which adds the doctest which (as usual) I forgot. |
Based on 3.2.3 without REST conversion |
comment:7
Attachment: trac_4900.patch.gz trac_4900.patch should be identical to the previous one except that it is based on 3.2.3 vanilla without the sphinx/rest converted doctests. |
comment:8
Looks good to me. One typo (combinarion). I read through the paper and the code and didn't find any obvious errors. I tried a few examples and the results seemed reasonable. |
Same as previous without the typo |
comment:9
Attachment: trac_4900_typo.patch.gz Replying to @roed314:
Thanks. I added a patch which corrects the typo, otherwise is identical to the last one. |
comment:10
Merged trac_4900_typo.patch only in Sage 3.3.alpha2. Cheers, Michael |
Point counting on elliptic curves where the j-invariant is not in the prime field has been implemented up to now via the same function that determines the group structure. The reason was that "Mestre's trick" does not always work over non-prime fields (specifically, over F_q where q is square there are always counterexamples). I worked out how to extend Mestre to the general case about 9 months ago but did not want to contribute the resulting code until it was written up. That has now been done, in a 4-page note joint with Drew Sutherland. (See http://www.warwick.ac.uk/staff/J.E.Cremona/papers/MestreNote.pdf; it should be on ArXiV early January 2009).
The current patch implements this in a new function cardinality_bsgs(). This will always be used in computing the cardinality of curves whose j-invariant is not in the prime field. Over prime fields it can be used by giving algorithm='bsgs' to the cardinality() function. [The old use of algorithm='bsgs' is renamed algorithm='pari' since that's the option to call pari, which is only over prime fields.]
This also means that the abelian_group() function is simpler since it always computes the cardinality first, which simplifies that code.
Lastly, the new code uses quadratic twists, and the quadratic_twist() funtion in ell_generic.py can now be called with no twisting parameter for curves over finite fields, with the single exception of characteristic 2 and j=0.
The patch applies to 3.2.2 and has been tested on lots of curves (including all the -long tests in sage/schemes/elliptic_curves).
Component: number theory
Keywords: elliptic curves finite fields
Issue created by migration from https://trac.sagemath.org/ticket/4900
The text was updated successfully, but these errors were encountered: