Ask Your Question

Early abort for E.cardinality()

asked 2016-06-27 14:38:02 -0500

Vova gravatar image

I loop through curves to find one with prime cardinality. In order to speed up the process, it would be convenient to have early abort option, so that whenever some prime factor of cardinality is found, the algorithm skips that curve and goes to the next one. Any suggestions how this can be done?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-06-27 17:31:28 -0500

tmonteil gravatar image

The code for the cardinality method for elliptic curves can be found on the file src/sage/schemes/elliptic_curves/ (you can click to see it). As you can see (search for def cardinality), the default implementation is by calling pari, so you can have a look to its source code (in the C language) and try to make it early-aborting. There is an alternative (probably slower) implementation in Sage, which is called cardinality_bsgs, so you can have a look at it and see if you can deduce that the cardinality is not prime before reaching return self._order commands.

edit flag offensive delete link more


It seems that earlier version of sage had an option of passing to cardinality function an early abort command. For example, something like this:

However, there is no more file. Do you have any ideas how to do something similar for the most current version of sage (7.2)?

Vova gravatar imageVova ( 2016-06-29 07:55:29 -0500 )edit

Your Answer

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

Add Answer

Question Tools


Asked: 2016-06-27 14:38:02 -0500

Seen: 74 times

Last updated: Jun 27 '16