# elliptic curves, exercises, mastermath 2013

## 1394 days ago by streng

### Name(s):

# Type your name(s) here (commented).
# Type the user name that you used for logging in to the sage server here (also commented).

# Elliptic curves

## Mastermath, The Netherlands, Fall 2013

This worksheet introduces you to some basic things you can do with elliptic curves in SAGE. It includes several exercises, for which you might want to open a new worksheet to experiment in with all kinds of functions. For those taking the class for credit, all these exercises are homework.

Some rules regarding the homework:

• Include in this worksheet an explanation of what you did to solve the exercises. This will sometimes consist of a short proof instead of a list of commands (which you could include in a cell as comments using a #-sign).
• Homework needs to be handed in printed on paper, make sure the output is also printed.
• Also share the worksheet with the users "ajavan, martindalecr, wzhuang.new" using the "Share" button on the top right.
• Homework can be handed in in groups of 2.
• We do not make backups of the content of the server, so make sure to make your own backups, for example by clicking "File..." and then "Save worksheet to a file...", or by clicking "Edit" and then copying the content to an email.
• When working together, do not use only one account to log in to two computers.

Help about sage in general is available through http://www.sagemath.org/ and in particular the tutorial at http://www.sagemath.org/doc/tutorial/ is very useful for beginners. Information about elliptic curves in particular is on http://www.sagemath.org/doc/reference/plane_curves.html.

Construction of elliptic curves and points (exercise 1)
Number of points of the reduction and torsion (exercise 2,3,4,5)
Bad reduction and Hasse-Weil (exercise 6,7,8,9,10,11,12,13)
Mordell-Weil groups (exercise 14,15,16)
Period lattices (exercise 17,18)
Porism of Diophantos (exercise 19)
Modularity (exercise 20)
Heights (exercise 21)

One way to specify an elliptic curve is by a pair $[a,b]$ of coefficients in the Weierstrass equation $y^2 = x^3 + ax + b$.

a=-43 b=166 E1=EllipticCurve([a,b]) E1
Verify the discriminant of $E_1$ equals a multiple of $4a^3+27b^2$.
D1=E1.discriminant() D1 == -16*(4*a^3+27*b^2)

Recall that <tab> after 'E1.' shows everything you can do with $E_1$.

E1.
A point is defined by just coercing a list of two affine or three homogeneous coordinates into $E_1$.
P = E1([3,8]) P

Exercise 1: Compute $nP$ for all integers $n$.

With E.Np(r) we get the number of points on the reduction of E to the finite field of $r$ elements, where $r$ is prime (including the singular point, if it exists).

Exercise 2: Create a list of the number of $\mathbb{F}_p$-points on the reduction of $E_1$ modulo $p$ for all primes $p$ of good reduction under $100$.

Exercise 3: What is the greatest common divisor of those numbers and what does this say about the torsion subgroup of $E_1(\mathbb{Q})$?

Exercise 4: Find a function that computes the size of the torsion group so that you can verify the answer to your last statement directly.

Note that you can also define an elliptic curve by its Weierstrass equation after declaring $x$ and $y$ as variables.

x,y = var('x,y') C = EllipticCurve(y^2 + y == x^3 + x) C

Exercise 5: Compute the torsion subgroup of the elliptic curve given by $y^2 + xy - 5y = x^3 - 5x^2$.

We can also define an elliptic curve $E_2$ by specifying the coefficients $a_1,a_2,a_3,a_4,a_6$ of a long Weierstrass equation.
a1=0 a2=0 a3=1 a4=9 a6=0 E2=EllipticCurve(QQ,[a1,a2,a3,a4,a6]) E2

Exercise 6: Compute the discriminant of $E_2$ and factorize it.

From the (correct) answer to the previous exercise, we see that the only primes of bad reduction are $3$, $7$, $13$, and $19$.

Exercise 7: Compute for each prime of bad reduction of $E_2$ the number of points on the reduction.

Recall that (at least in characteristic not equal to 2) the nonsingular points on a singular curve given by a Weierstrass equation over a field $k$ are in bijection with the elements of one of three groups, namely $k$ (additive, when the singular point is a cusp), or $k^*$ (split multiplicative, for a node with tangents defined over $k$), or the kernel of the norm from $l^*$ to $k^*$ where $l$ is a quadratic field extension of $k$ (nonsplit multiplicative, for a node whose tangents are defined over $l$).

Exercise 8: Use the number of points counted above to read off the types of singular reduction (additive, split multiplicative or nonsplit multiplicative) of $E_2$ at its primes of bad reduction.

Answer: (just text, so no sage-commands)

Exercise 9: Check that the following gives a result that is consistent with your previous answer.

[(p,E2.local_data(p).bad_reduction_type()) for p in range(50) if p in Primes()]

Answer: (just explain with text, so no sage-commands)

We compute the number of points on $E_2$ over the field of $5^n$ elements for $n$ from $1$ to $20$.
r=[E2.base_extend(GF(5^n,'x')).cardinality() for n in range(1,21)] r

Another command that would do this is 'E2.count_points(20)', but that works for any scheme over a field of a prime number of elements and does not use the fact that $E_2$ is an elliptic curve, making it very slow.

Exercise 10: Instead of the list of the numbers $\#E_2(\mathbb{F}_{5^n})$, compute a list with the numbers $c_n = 5^n+1 - \#E_2(\mathbb{F}_{5^n})$.

Exercise 11: Find a recursive formula for this sequence and use it to give an explicit equation for these numbers. Then use this to prove $| c_n | \leq 2\sqrt{5^n}$, assuming your recursive formula is correct.
(Hint: the recursion is of degree $2$, so there exist $u,v$ such that $c_n = u c_{n-1} +vc_{n-2}$. After finding $u$ and $v$ and $\lambda_1,\lambda_2$ satisfying $\lambda_i^2 = u \lambda_i +v$, we know that there are $\alpha_1,\alpha_2$ such that $c_n = \alpha_1\lambda_1^n + \alpha_2 \lambda_2^n$.)

A recursive formula similar to the one you found above holds in general, and also the inequality holds in general:

The Hasse-Weil Theorem says that if $C$ is an elliptic curve over $\mathbb{F}_q$, then the inequality $|\#C(\mathbb{F}_q) - q - 1| \leq 2\sqrt{q}$ holds.

Exercise 12: Check that this is true for the reductions of $E_1$ modulo all primes of good reduction that are less than 100 (as computed before).

Exercise 13: For $p =23$, is there for every $N$ in the Hasse-Weil interval $$[ p+1-2\sqrt{p}, p+1+2\sqrt{p} ]$$ an elliptic curve $C$ over $\mathbb{F}_p$ with $\#C(\mathbb{F}_p) = N$ ?

### Mordell-Weil groups

Exercise 14: Compute the rank of the elliptic curves given by
$$y^2 = x(x-3)(x+4)$$ $$y^2 = x(x-1)(x+3)$$ $$y^2 = x(x+1)(x-14)$$ $$y^2 = x(x^2+1)$$ See exercise 4.3 and 4.6 in the notes by Peter Stevenhagen.

Exercise 15: Compute the rank of the curve $y^2 = x^3 + a$ for $a \in \{1,...,100\}$. Also compare how long this takes for $a=11$ to how long it takes for $a=10000001$.

Exercise 16: What is the smallest integer $a>0$ for which the rank of the Mordell-Weil group of the curve $y^2 = x^3+a$ is at least 3?

### Period lattices

Exercise 17: Find the period lattice of $E_1$ (a lattice $L$ in the complex numbers $\mathbb{C}$, such that $\mathbb{C}/L$ is isomorphic to $E_1$) and a basis for it. If one scaled the lattice so that one of the basis vectors becomes $1$, then what do you notice about the real part of the other basis vector after scaling? Try the same with some other elliptic curves that are defined over the real numbers. How are the real parts related to the number of components of the elliptic curve over the reals?

The elliptic curve given by $y^2 = x^3 + 5$ has complex multiplication: there is an automorphism that multiplies the $x$-coordinate by a cube root of unity. This implies that after scaling, the period lattice is contained in an imaginary quadratic field.

Exercise 18: Use the function algebraic_dependency to find generators of the scaled lattice that are contained in an imaginary quadratic field.

### Porism of Diophantos

Diophantos shows that if a postive rational number $d$ is the difference of two rational cubes, then it is also the sum of two rational cubes. For instance, since $7 = 2^3 - 1^3$, there should also be positive rational numbers $x$ and $y$ with $x^3 + y^3 = 7$. Indeed, one has $(\tfrac{4}{3})^3+(\tfrac{5}{3})^3=7$.

We consider the projective curve given by $x^3 + y^3 = dz^3$ with the point $[1:-1:0]$ and make a substitution to obtain a Weierstrass model of the elliptic curve.

P2.<x,y,z> = ProjectiveSpace(QQ,2) d=7 C=Curve(x^3 + y^3 - d*z^3) E=EllipticCurve([0,-432*d^2]) transformation=[(36*d*z-y)/(72*d),(36*d*z+y)/(72*d),x/(12*d)] D=Curve(E) phi = hom(D,C,transformation) phi
We can check that the transformation does indeed map $E$ to $C$ by doing a substitution.
f=C.defining_polynomial() g=E.defining_polynomial() 64*27*d^2*f(transformation); g;

Exercise 19: Find positive rational $x,y$, other than $\{x,y\} = \{\tfrac{4}{3},\tfrac{5}{3}\}$ with $x^3 + y^3 = 7$.

### Modularity

Exercise 20 For any prime $p$, let $N_p$ denote the number of points on the elliptic curve given by $y^2 = x^3-4x^2+16$ over $\mathbb{F}_p$ (at least when this is nonsingular). Let $M_n$ denote the coefficient of $q^n$ in the formal power series expansion of the infinite product $$q\prod_{n\geq 1} (1-q^n)^2(1-q^{11n})^2.$$ Compute $M_p+N_p$ for all primes $p$ up to $100$. Conjecture what $M_p+N_p$ equals for general primes $p$.

### Heights

Given a Weierstrass model of an elliptic curve $C$ over $\mathbb{Q}$, we define the naive logarithmic height of a rational point $P \in C(\mathbb{Q})$ by $$h_{\rm n}(P) = \log \left( \max (|d|,|n|)\right),$$ with $d,n \in \mathbb{Z}$ such that $\gcd(d,n)=1$ and $x(P) = \tfrac{d}{n}$.

Exercise 21: Take your favorite elliptic curve in short Weierstrass form with a point $P$ of infinite order. For $m \in \{1,\ldots,100\}$, compute the square root of $h_{\rm n}(mP)$. How do the values seem to grow asymptotically?