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

The conversion from E to E.abelian_group() does not perserve group order for elliptic curves over finite fields. #13757

Closed
koffie opened this issue Nov 25, 2012 · 6 comments

Comments

@koffie
Copy link

koffie commented Nov 25, 2012

One would expect that the following code is deterministic and prints 10 times the same:

sub_gens=[(542, 488, 1)]
p=709
for i in xrange(10):
    E2=EllipticCurve(GF(p),[606,486])
    ab=E2.abelian_group()
    sub_gens=[E2(i) for i in sub_gens]
    index=ab.order()/ab.submodule([ab(i) for i in sub_gens]).order()
    sub=ab.submodule([ab(i) for i in sub_gens])
    print index,[(ab(i),i.order(),ab(i).order()) for i in sub_gens]

However the output is:

6 [((542 : 488 : 1), 57, 114)]
228 [((542 : 488 : 1), 57, 3)]
6 [((542 : 488 : 1), 57, 114)]
3 [((542 : 488 : 1), 57, 228)]
3 [((542 : 488 : 1), 57, 228)]
6 [((542 : 488 : 1), 57, 114)]
6 [((542 : 488 : 1), 57, 114)]
3 [((542 : 488 : 1), 57, 228)]
228 [((542 : 488 : 1), 57, 3)]
6 [((542 : 488 : 1), 57, 114)]

Component: group theory

Reviewer: Jeroen Demeyer

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

@koffie koffie added this to the sage-5.11 milestone Nov 25, 2012
@koffie
Copy link
Author

koffie commented Nov 26, 2012

comment:1

This weird problem seems to be caused by the following

vec=(0,2)
ab_elt=ab(vec)
for i in xrange(10):
    print vec,ab_elt
    vec=ab_elt.vector()
    ab_elt=ab(vec)

@koffie
Copy link
Author

koffie commented Nov 26, 2012

comment:2

This outputs:

(0, 2) (665 : 37 : 1)
(0, 2) (11 : 229 : 1)
(2, 0) (665 : 37 : 1)
(0, 2) (11 : 229 : 1)
(2, 0) (665 : 37 : 1)
(0, 2) (11 : 229 : 1)
(2, 0) (665 : 37 : 1)
(0, 2) (11 : 229 : 1)
(2, 0) (665 : 37 : 1)
(0, 2) (11 : 229 : 1)

@koffie
Copy link
Author

koffie commented Nov 26, 2012

comment:4

I've made this critical since this bug affect the initialisation of all things inheriting from FGP_Module and silently produces completely wrong answers.

@fchapoton
Copy link
Contributor

comment:5

trying to look at the problem, here is part of the problem maybe:

sage: p=709
sage: E2=EllipticCurve(GF(p),[606,486])
sage: ab=E2.abelian_group()
sage: ab((2,0))
(11 : 229 : 1)
sage: ab(vector((2,0)))
(409 : 94 : 1)
sage: ab((0,2))
(409 : 94 : 1)
sage: ab(vector((0,2)))
(11 : 229 : 1)

so there is a strange transposition of the arguments.

But there is also something random happening in the choice of the embedding:

sage: ab=EllipticCurve(GF(p),[606,486]).abelian_group()
sage: ab(vector((2,0)))
(534 : 340 : 1)
sage: ab=EllipticCurve(GF(p),[606,486]).abelian_group()
sage: ab(vector((2,0)))
(350 : 542 : 1)

@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@fchapoton
Copy link
Contributor

comment:10

This seems to have been solve by #16261

@fchapoton fchapoton removed this from the sage-6.4 milestone Sep 8, 2014
@jdemeyer
Copy link

jdemeyer commented Sep 9, 2014

Reviewer: Jeroen Demeyer

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

5 participants