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
cardinality_exhaustive incorrect in genus 1 #19122
Comments
comment:1
I agree. It should add 1 for odd degree and for even degree it should add 1+(a/q) where a is the leading coefficient and q the fields cardinality, assuming that q is odd. |
comment:2
@JohnCremona: what should be done when q is even ? |
comment:3
Good question! The reasoning in odd characteristic is this: let f^* be the reverse polynomial forced to have even degree if deg(f) is odd by adding an extra factor of x. Then the points on y^2=f(x) above x=infinity are the points on y2=f*(x) above x=0. In char 2 this will always be 1. Conclusion: when q is even always add 1, for all degrees. |
Commit: |
Branch: public/19122 |
Author: Frédéric Chapoton |
comment:6
ping ? |
comment:7
OK, I can test now... |
comment:8
The formula involving the Legendre symbol seems to assume that K is a prime field. I guess it can be replaced by
|
comment:9
Thanks Peter. Despite my good intentions other matters intervened... |
comment:11
done, thanks |
comment:12
ping ? |
comment:13
I am literally making the branch now. Meanwhile, there is no no need to import lefendre_symbol... |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:15
Good! I am happy with the code and tests, so positive reivew coming up. |
Reviewer: John Cremona |
comment:17
A general hyperelliptic curve is given by C: y2 + h(x)y = f(x); it seems to me that this fix is only correct if h = 0. (Note: in characteristic 2 we cannot have h = 0, otherwise the curve would be singular everywhere.) Take for example (over any finite field of characteristic not 11)
Then C and D are isomorphic via the change of variables
The curve C has two points at x = 0, so D has two points at z = infinity. Now consider
Running this for p = 2 and p gives
whereas all answers should be 5. Should we fix this on this ticket or open a new one? |
comment:18
Do whatever you prefer. I do not use this code and have no intention to start implementing code for hyperelliptic curves in characteristic 2. I was asked a specific question about how many points there are at infinity on a curve of the form y^2=g(x). |
comment:19
Replying to @JohnCremona:
Sure, it is clear from your comments that they were only meant for that case. Since this ticket fixes the bug in that case, and has positive review, I will open a new ticket to treat the case |
Changed branch from public/19122 to |
The
cardinality_exhaustive
method can return incorrect results for genus 1 curves if they are given byy^2 = f(x)
where f(x) is a quartic polynomial whose leading coefficient is not a square:Here is the offending code:
The problem is that for the given model, the curve may not have a rational point at infinity.
Component: elliptic curves
Author: Frédéric Chapoton
Branch/Commit:
e99f57d
Reviewer: John Cremona
Issue created by migration from https://trac.sagemath.org/ticket/19122
The text was updated successfully, but these errors were encountered: