Opened 13 years ago

Closed 13 years ago

# Hasse invariant for elliptic curves

Reported by: Owned by: Felipe Voloch John Cremona minor sage-4.4.3 elliptic curves Hasse invariant sage-4.4.3.alpha1 Felipe Voloch William Stein, John Cremona N/A

### Description

Creates a method to compute the Hasse invariant of an elliptic curve over a function field of positive characteristic.

### comment:1 Changed 13 years ago by Felipe Voloch

Milestone: → sage-4.4.3 new → needs_review

### comment:2 Changed 13 years ago by William Stein

Status: needs_review → positive_review

Looks good to me.

### comment:3 Changed 13 years ago by John Cremona

This is a coincidence, since just yesterday I was considering implementing functions is_supersingular() and is_ordinary(). Now this can be done very simply (since s.s. curves have invariant 0 and ordinary ones have nonzero invariant).

However, I'm a little worried about the efficiency of the current implementation for even modest p, since it involves raising a degree 3 polynomial to the power (p-1)/2 and then picking out one coefficient. There are easier ways to test supersingularity for small p, since one can precompute the s.s. j-invariants and check that. This would be a quicker way of computing H when it is 0. One could check that the j-invariant has degree at most 2 (else ordinary). And over the prime field GF(p), s.s. curves have cardinality p+1, and another way to check ordinary-ness is to take random points and multiply then by p+1. As a last resort one can compute the cardinality.

I guess this is enough for a second ticket!

### Changed 13 years ago by John Cremona

Apply after both previous patches

### comment:4 Changed 13 years ago by John Cremona

The first two patches apply fine and tests pass. I added a review patch which beefs up the docstring a little, adds some more examples (including one over a non-prime field), and also added one-liners for characteristics 5 and 7.

Strictly this should be looked at again (William?), but I don't seem to have the option of marking it as "needs review" again. In case you are wondering about the char. 5,7 cases, as well as doing the math I also systematically checked that this gives the same as the general method for *all* curves over GF(5) and GF(7)!

### comment:5 Changed 13 years ago by William Stein

Looks even better to me now, by far! Thanks John.

### comment:6 Changed 13 years ago by William Stein

Merged in: → 4.4.3.alpha1 → fixed → wstein, cremona positive_review → closed

### comment:7 follow-up:  9 Changed 13 years ago by John Cremona

Excellent. I have nearly finished a patch which implements is_supersingular and is_ordinary (independently of computing the Hasse inv.)

### comment:8 Changed 13 years ago by Minh Van Nguyen

Merged in: 4.4.3.alpha1 → sage-4.4.3.alpha1 wstein, cremona → William Stein, John Cremona