Skip to content

Incorrect doctest in set_order #37131

@grhkm21

Description

@grhkm21

These lines in the doctest is incorrect:

sage: E = EllipticCurve(GF(7), [0, 1]) # This curve has order 6
sage: E.set_order(6)
sage: E.order()
6
sage: E.order() * E.random_point()
(0 : 1 : 0)

The elliptic curve actually has order 12, as shown by printing E.points():

sage: E.points()
[(0 : 1 : 0), (0 : 1 : 1), (0 : 6 : 1), (1 : 3 : 1), (1 : 4 : 1), (2 : 3 : 1), (2 : 4 : 1), (3 : 0 : 1), (4 : 3 : 1), (4 : 4 : 1), (5 : 0 : 1), (6 : 0 : 1)]

Additional Information

All points have order $6$, but not all groups are abelian!

Fixed in #37119.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions