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

sha().an() assumes E is minimal. #10096

Closed
sagetrac-weigandt mannequin opened this issue Oct 7, 2010 · 9 comments
Closed

sha().an() assumes E is minimal. #10096

sagetrac-weigandt mannequin opened this issue Oct 7, 2010 · 9 comments

Comments

@sagetrac-weigandt
Copy link
Mannequin

sagetrac-weigandt mannequin commented Oct 7, 2010

I noticed the following problem with sha().an()

sage: E=EllipticCurve([1215*1216,0]) # non-minimal model
sage: E.sha().an()
6.00000000000000
sage: E.minimal_model().sha().an()
1.00000000000000

It looks like sha().an() assumes that E is minimal. The extra factor of 6 seems to be coming from the real period.

sage: E.period_lattice().omega()
0.106360349280819
sage: E.minimal_model().period_lattice().omega()
0.638162095684913

It's probably unfair to call this a bug, but it could definitely lead people astray.

CC: @williamstein @rlmill @categorie

Component: elliptic curves

Keywords: sha, real period

Author: John Cremona

Reviewer: Aly Deines

Merged: sage-4.6.1.alpha1

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

@sagetrac-weigandt sagetrac-weigandt mannequin added this to the sage-4.6.1 milestone Oct 7, 2010
@JohnCremona
Copy link
Member

Changed upstream from Reported upstream. Developers acknowledge bug. to none

@JohnCremona
Copy link
Member

comment:1

I found the problem here. an() uses the minimal model when it can do the job itself, which is when the rank is at most 1, but when the rank is at least 2 it passes the work to an_numerical(), and that did not use the minimal model.

I am preparing a patch which fixes this. And as I suspect that other related functions also need the minimal model (notably the p-adic one) I am now caching the minimal model and changing lots of occurrences of self.E to self.Emin.

Watch this space...

@JohnCremona
Copy link
Member

Applies to 4.6.rc0

@JohnCremona
Copy link
Member

Author: John Cremona

@JohnCremona
Copy link
Member

comment:2

Attachment: trac_10096-sha.patch.gz

The patch fixes this. the minimal model is computed on construction and used in place of the original (when the latter is not minimal). New doctests show that the reported problem has gone away.

It would be helpful if someone could confirm that this is the correct thing to do also for the an_padic() function. The doctests still pass, but I sust[ect that they are all with minimal curves anyway. I was assuming (a) that the value of an_padic() was isomorphism-invariant, and (2) that using a minimal model would be at least as fast, possibly faster, than using a non-minimal model, even if both give the correct answer!

@jdemeyer
Copy link

jdemeyer commented Nov 3, 2010

Reviewer: Aly Deines

@jdemeyer
Copy link

Merged: sage-4.6.1.alpha1

@jdemeyer
Copy link

Changed reviewer from Aly Deines to Alyson Deines

@jdemeyer
Copy link

Changed reviewer from Alyson Deines to Aly Deines

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

2 participants