Skip to content
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

Bug in descend_to method for elliptic curves #16456

Closed
JohnCremona opened this issue Jun 7, 2014 · 39 comments
Closed

Bug in descend_to method for elliptic curves #16456

JohnCremona opened this issue Jun 7, 2014 · 39 comments

Comments

@JohnCremona
Copy link
Member

The function descend_to which was implemented in #9384 is incorrect. The twisting parameter d in L* is only defined modulo (L*)^2 and one has to determine whether there is a representative which lies in K*, which the implementation does not do, so some "positive" results are missed. Here is an example of this.

sage: K.<a> = NumberField(x^3-2)
sage: E = EllipticCurve('11a1').quadratic_twist(2)
sage: EK = E.change_ring(K)
sage: EK2 = EK.change_weierstrass_model((a,a,a,a+1))
sage: EK2.descend_to(QQ)
<None>

The heart of the problem being solved here is to determine whether (given that j(E) is in K of course) the twisting parameter in L*/(L*)^2 is in the image of K*/(K*)^2 or not, and the implementation ignores this. (For j=0 or 1728 the principle is the same with squares replaced by 6th or 4th powers respectively.)

I can fix this for number fields (one can restrict from K*/(K*)^2 to a finite K(S,2) for an easily determined set S of primes) or for finite fields, but it may not be possible to have this implemented for arbitrary fields, which will cause a problem with the patching.

A second and independent bug is reported by Warren Moore:

sage: k.<i> = QuadraticField(-1)
sage: E = EllipticCurve(k,[0,0,0,1,0])
sage: E.descend_to(QQ) == None
True

This caused by a "naked Except" clause plus a call to f.preimage() for a map f which has no attribute/method "preimage".

Depends on #16708

Component: elliptic curves

Keywords: elliptic curve base change

Author: John Cremona

Branch/Commit: e0a13b3

Reviewer: Peter Bruin

Issue created by migration from https://trac.sagemath.org/ticket/16456

@JohnCremona

This comment has been minimized.

@JohnCremona JohnCremona self-assigned this Jun 7, 2014
@JohnCremona

This comment has been minimized.

@JohnCremona

This comment has been minimized.

@JohnCremona
Copy link
Member Author

@JohnCremona
Copy link
Member Author

Commit: 9b0a5d9

@JohnCremona
Copy link
Member Author

Author: John Cremona

@JohnCremona
Copy link
Member Author

comment:5

Ready for review. Note that there are two separate things here (which perhaps should have been in separate tickets):

Up till the last commit the changes are in in number fields (including QQ), not touching elliptic curves, implementing the function descend_mod_power for number field elements and enhancing the selmer_group with selmer_group_iterator for ease of use. (Also correcting the documentation for selmer_group).

The last commit does what the ticket wanted, namely to re-implement the descend_to function for elliptic curves. Apart from trivial cases this will only work over number fields. It would work over any other field where descend_mod_power could be implemented such as finite fields, but note that in characteristics 2 and 3 the function would need to have a completely different implementation.


New commits:

04c1c45Enhanced number field selmer group capabilities by adding an iterator
9b0a5d9#16456: fix bugs in elliptic curve descend_to function

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 14, 2014

Branch pushed to git repo; I updated commit sha1. New commits:

d5c4ba7Merge branch 'develop' into t/16456/bug_in_descend_to_method_for_elliptic_curves

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 14, 2014

Changed commit from 9b0a5d9 to d5c4ba7

@JohnCremona
Copy link
Member Author

New commits:

12c1b73minor addition to isogeny_small_degree for sporadic primes over number fields
1c3ddb9Merge branch 'develop' into isogs
3db6c28Merge branch 'develop' into isogs

@JohnCremona
Copy link
Member Author

Changed commit from d5c4ba7 to 3db6c28

@JohnCremona
Copy link
Member Author

@pjbruin
Copy link
Contributor

pjbruin commented Jul 22, 2014

Reviewer: Peter Bruin

@pjbruin
Copy link
Contributor

pjbruin commented Jul 22, 2014

comment:8

I remember looking at the Selmer group code some time ago (and again just now) and getting the impression that the group K(S, m) returned by selmer_group(S, m) is the one fitting in a natural exact sequence (warning: unicode experiment ahead)

1 ⟶ OK,S×/OK,S×mK(S, m) ⟶ ClK,S[m] ⟶ 0.

(I.e., I think K(S, m) should be canonically isomorphic to the flat cohomology group H1(OK,S, μm). This can be replaced by étale cohomology if S contains all places dividing m, and in that case I also think that the above H1, and K(S, m), should be isomorphic to H1(Gal(KS/K), μm) with KS the maximal extension of K that is unramified outside S.)

Is the above exact sequence correct, and should it perhaps be mentioned in the documentation? And is there a comparable exact sequence for the "true" Selmer group consisting of the elements giving unramified extensions of K?

@JohnCremona
Copy link
Member Author

comment:9

See #16496 where you will find that exact sequence!

One thing which makes this sequence easier to deal with than one might expect is that the group in the middle is a direct product of the other two rather than some more complicated extension.

@pjbruin
Copy link
Contributor

pjbruin commented Jul 22, 2014

comment:10

Replying to @JohnCremona:

See #16496 where you will find that exact sequence!

Right! I am sure I have seen that ticket before...

One thing which makes this sequence easier to deal with than one might expect is that the group in the middle is a direct product of the other two rather than some more complicated extension.

That sounded surprising to me at first, but I tried to verify it and realised I had actually also done something very much like that before.

@pjbruin
Copy link
Contributor

pjbruin commented Jul 22, 2014

Changed commit from 3db6c28 to 65d3404

@pjbruin
Copy link
Contributor

pjbruin commented Jul 22, 2014

comment:11

Here is a reviewer patch mostly consisting of documentation/formatting changes. If you agree with my changes, you can set it to positive review.

@pjbruin
Copy link
Contributor

pjbruin commented Jul 22, 2014

Changed branch from u/cremona/16456 to u/pbruin/16456-descend_to_bug

@pjbruin
Copy link
Contributor

pjbruin commented Jul 23, 2014

comment:12

While trying to find a clever cohomological argument for the splitting of the exact sequence from comment:8, I did not succeed but did find a bug in selmer_group(); see #16708.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 23, 2014

Branch pushed to git repo; I updated commit sha1. New commits:

bed05c7Trac 16456: corrected doctest changed by #16708

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 23, 2014

Changed commit from 65d3404 to bed05c7

@pjbruin
Copy link
Contributor

pjbruin commented Jul 23, 2014

Dependencies: #16708

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 23, 2014

Changed commit from bed05c7 to 65d3404

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 23, 2014

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

@pjbruin
Copy link
Contributor

pjbruin commented Jul 23, 2014

comment:16

Actually both the original answer and my "corrected" one in the doctest changed by commit bed05c5 are wrong; if I'm not mistaken, the correct answer is

sage: K = QuadraticField(-5)
sage: list(K.selmer_group_iterator((), 4))
[1, 4, -1, -4]

@JohnCremona
Copy link
Member Author

comment:17

Replying to @pjbruin:

Actually both the original answer and my "corrected" one in the doctest changed by commit bed05c5 are wrong; if I'm not mistaken, the correct answer is

sage: K = QuadraticField(-5)
sage: list(K.selmer_group_iterator((), 4))
[1, 4, -1, -4]

That is certainly correct. I will look at this and #16708 tomorrow.

@JohnCremona
Copy link
Member Author

comment:18

Between here and #16708 a doctest needed changing as I think Peter pointed out somewhere:

            sage: K.<a> = QuadraticField(-5)
            sage: list(K.selmer_group_iterator((), 4))
            [1, 2, 4, 8, -1, -2, -4, -8]

should be

           sage: K.<a> = QuadraticField(-5)
           sage: list(K.selmer_group_iterator((), 4))
           [1, 4, 16, 64, -1, -4, -16, -64]

which I am changing and will commit & push.

@JohnCremona
Copy link
Member Author

Changed commit from 65d3404 to e6ccee2

@JohnCremona
Copy link
Member Author

Changed branch from u/pbruin/16456-descend_to_bug to u/cremona/16456-descend_to_bug

@JohnCremona
Copy link
Member Author

New commits:

8474e25Trac 16708: fix computation of Selmer groups of number fields
c584016Merge remote-tracking branch 'trac/u/pbruin/16456-descend_to_bug' into 16708
e6ccee2#16456: fix one doctest after #16708

@JohnCremona
Copy link
Member Author

comment:20

Peter, thanks for your tidying up of (and improving) the documentation. I just fixed that one doctest which I think you already noticed was incorrect because of the bug fixed now at #16708. That means that the branch name has gone back to mine (u/cremona/...), and I have set it back to "needs review". Since I like your reviewer's changes, if you agree wit hthis last one then we can set it to "positive review".

@pjbruin
Copy link
Contributor

pjbruin commented Jul 24, 2014

comment:21

Replying to @JohnCremona:

Between here and #16708 a doctest needed changing as I think Peter pointed out somewhere:

            sage: K.<a> = QuadraticField(-5)
            sage: list(K.selmer_group_iterator((), 4))
            [1, 2, 4, 8, -1, -2, -4, -8]

should be

           sage: K.<a> = QuadraticField(-5)
           sage: list(K.selmer_group_iterator((), 4))
           [1, 4, 16, 64, -1, -4, -16, -64]

which I am changing and will commit & push.

That second answer was actually the wrong "correction" I pushed and then retracted. It should be [1, 4, -1, -4] (as in comment:17); in fact 16 is a fourth power, hence represents the trivial element of the Selmer group. The Selmer group is isomorphic to C2 x C2 (since both the units modulo 4-th powers and the 4-torsion in the class group are cyclic of order 2.)

I think the problem is the line

f = lambda o: m if o is Infinity else o.gcd(m)

where you will somehow need to take the orders of elements of the class group into account.

@JohnCremona
Copy link
Member Author

comment:22

Sorry about that. I'll work out how to correct it....

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 24, 2014

Changed commit from e6ccee2 to e0a13b3

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 24, 2014

Branch pushed to git repo; I updated commit sha1. New commits:

e0a13b3#16456: fix bug in orders of Selmer group elements

@JohnCremona
Copy link
Member Author

comment:24

...done. I added an optional parameter "orders" to the selmer_group method, default False gives the old behavious, if True also outputs a list of the orders of the generators, which are all equal to m when m is prime, but not necesarily otherwise. Added doctests for this. Now the iterator uses this instead of the old formula, which was wrong. I thought that this was simpler than trying to recover the orders from the list of generators, since it is information we have to hand when constructing the list of generators.

For consistency I did the same for the special versions over QQ, though the bug did not apply here. At the same time I noticed that over QQ when -1 is a generator it was put last while over number fields the units are always first, so I changed that (and the associated doctests) too.

Note that this change will be superceded after #16496 when there is a proper class for these Selmer groups. And also that the correctness of the current selmer_group function relies on the direct product fact alluded to in earlier comments!

@pjbruin
Copy link
Contributor

pjbruin commented Jul 24, 2014

comment:25

OK, everything looks good to me now!

@vbraun
Copy link
Member

vbraun commented Jul 25, 2014

Changed branch from u/cremona/16456-descend_to_bug to e0a13b3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants