Ask Your Question
1

Default algorithm for cardinality

asked 2019-12-18 13:00:15 -0500

JanoutV gravatar image

Hello, I am using Sage for operations on elliptic curves and I was curious what is the default algorithm used to compute the cardinality of a curve when: "E.cardinality()" is used? I tried to find it here: http://doc.sagemath.org/html/en/refer... but I only found out there are some algorithms which you can choose as an optional argument. Is it the Schoof's algorithm?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2019-12-18 16:27:01 -0500

updated 2019-12-18 16:28:31 -0500

The reference manual describes cardinality as

cardinality(algorithm=None, extension_degree=1)

which means that the default value for the argument is None. The code says

    if algorithm is None:
        # Check for j in subfield
        jpol = self.j_invariant().minimal_polynomial()
        if jpol.degree() < self.base_field().degree():
            algorithm = "subfield"
        else:
            algorithm = "pari"

So if you are working over a prime field, for example, the algorithm is "pari": "use the PARI C-library function ellcard", according to the reference manual. This pari function is documented here. (Click on "Elliptic curves" in the menu on the left, then "ellcard" at the top. I don't see how to give a precise link to the page.)

By the way, to see the source code, you can do

sage: E = EllipticCurve(GF(10007), [1,2,3,4,5])
sage: E.cardinality??
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-12-18 13:00:15 -0500

Seen: 80 times

Last updated: Dec 18 '19