/- Copyright 2026 The Formal Conjectures Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -/ module public import FormalConjecturesUtil

Prime values and primitive divisors in elliptic divisibility sequences

Morgan Ward (1948) studied integer divisibility sequences $(W_n){n \in \mathbb{Z}}$ satisfying the elliptic recurrence $W{m+n} W_{m-n} W_1^2 = W_{m+1} W_{m-1} W_n^2 - W_{n+1} W_{n-1} W_m^2$. A normalized sequence ($W_1 = 1$) is nonsingular when its discriminant is nonzero—equivalently, by Ward's representation theorem, when $(W_n)$ evaluates the division polynomials $\psi_n(x, y)$ at a rational point on an elliptic curve $E / \mathbb{Q}$ ($\Delta_E \ne 0$). In Ward's and Einsiedler–Everest–Ward's (§2) terminology, an elliptic divisibility sequence is proper when $W_0 = 0$, $W_1 = 1$, and $W_2 W_3 \ne 0$; for a normalized nonsingular sequence, non-periodicity ($W_n \ne 0$ for all $n \ne 0$, corresponding to a non-torsion rational point) automatically ensures properness and positive quadratic logarithmic growth. Joseph H. Silverman (1988) proved that all sufficiently large terms of a non-periodic nonsingular sequence admit primitive prime divisors, while Manfred Einsiedler, Graham Everest, and Thomas Ward (2001) conjectured that $|W_n|$ is prime for only finitely many indices $n \ge 1$.

References:

    Wikipedia

    M. Ward, Memoir on elliptic divisibility sequences, Amer. J. Math. 70 (1948), 31–74.

    J. H. Silverman, Wieferich's criterion and the $abc$-conjecture, J. Number Theory 30 (1988), no. 2, 226–237.

    M. Einsiedler, G. Everest, and T. Ward, Primes in elliptic divisibility sequences, LMS J. Comput. Math. 4 (2001), 1–13.

@[expose] public sectionnamespace EllipticDivisibilitySequence

W : ℤ → ℤ is a normalized nonsingular elliptic divisibility sequence: it satisfies IsEllipticDvdSequence W with W 1 = 1 and evaluates the division polynomials E.ψ n at an affine rational point on a nonsingular curve E : WeierstrassCurve ℚ (E.Δ ≠ 0).

def IsNonsingularEDS (W : ℤ → ℤ) : Prop := IsEllipticDvdSequence W ∧ W 1 = 1 ∧ ∃ (E : WeierstrassCurve ℚ) (x y : ℚ), E.Δ ≠ 0 ∧ E.toAffine.Equation x y ∧ ∀ n : ℤ, (W n : ℚ) = (E.ψ n).evalEval x y

Zero sequence fails the normalization condition W 1 = 1 in IsNonsingularEDS.

@[category test, AMS 11 14] theorem not_isNonsingularEDS_zero : ¬ IsNonsingularEDS 0 := ⊢ ¬IsNonsingularEDS 0 left✝:IsEllipticDvdSequence 0h1:0 1 = 1right✝:∃ E x y, E.Δ ≠ 0 ∧ E.toAffine.Equation x y ∧ ∀ (n : ℤ), ↑(0 n) = Polynomial.evalEval x y (E.ψ n)⊢ False All goals completed! 🐙

On Cremona's curve 37a1 ($Y^2 + Y = X^3 - X$), the discriminant is 37 ≠ 0 and (0, 0) is an affine rational point whose division-polynomial evaluations begin $\psi_1 = 1$, $\psi_2 = 1$, $\psi_3 = -1$, $\psi_4 = 1$, and $\psi_5 = 2$ (OEIS A006769).

h5:5 = 2 * 2 + 1⊢ Polynomial.evalEval 0 0 ({ a₁ := 0, a₂ := 0, a₃ := 1, a₄ := -1, a₆ := 0 }.ψ (2 + 2) * { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := -1, a₆ := 0 }.ψ 2 ^ 3 - { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := -1, a₆ := 0 }.ψ (2 - 1) * { a₁ := 0, a₂ := 0, a₃ := 1, a₄ := -1, a₆ := 0 }.ψ (2 + 1) ^ 3) = 2 All goals completed! 🐙

For $W_n = n$, $W_5 = 5$ has primitive prime divisor $5$, whereas $W_1 = 1$ has none.

k:ℕhk1:1 ≤ khk5:k < 5hdiv:↑5 ∣ id ↑khk_pos:0 < ↑k⊢ False k:ℕhk1:1 ≤ khk5:k < 5hdiv:↑5 ∣ id ↑khk_pos:0 < ↑khle:5 ≤ ↑k⊢ False All goals completed! 🐙 ⊢ ¬HasPrimitivePrimeDivisor id 1 p:ℕhp:Nat.Prime phdiv:↑p ∣ id ↑1right✝:∀ (k : ℕ), 1 ≤ k → k < 1 → ¬↑p ∣ id ↑k⊢ False p:ℕhp:Nat.Prime phdiv:↑p ∣ id ↑1right✝:∀ (k : ℕ), 1 ≤ k → k < 1 → ¬↑p ∣ id ↑khu:↑p ≤ 1⊢ False p:ℕhp:Nat.Prime phdiv:↑p ∣ id ↑1right✝:∀ (k : ℕ), 1 ≤ k → k < 1 → ¬↑p ∣ id ↑khu:↑p ≤ 1hp2:2 ≤ p⊢ False All goals completed! 🐙

Einsiedler–Everest–Ward Conjecture (2001): every non-periodic (∀ n ≠ 0, W n ≠ 0) normalized nonsingular elliptic divisibility sequence takes prime values $|W_n|$ at finitely many indices $n \ge 1$. (Einsiedler–Everest–Ward, eq. (10), p. 5 also study sequences obtained by dividing out bad-reduction factors, which need not satisfy the elliptic divisibility recurrence.)

@[category research open, AMS 11 14] theorem einsiedler_everest_ward_finite_primes : ∀ W : ℤ → ℤ, IsNonsingularEDS W → (∀ n : ℤ, n ≠ 0 → W n ≠ 0) → {n : ℕ | 1 ≤ n ∧ (W n).natAbs.Prime}.Finite := ⊢ ∀ (W : ℤ → ℤ), IsNonsingularEDS W → (∀ (n : ℤ), n ≠ 0 → W n ≠ 0) → {n | 1 ≤ n ∧ Nat.Prime (W ↑n).natAbs}.Finite All goals completed! 🐙

Silverman's Primitive Divisor Theorem (1988): every non-periodic (∀ n ≠ 0, W n ≠ 0) normalized nonsingular elliptic divisibility sequence has a primitive prime divisor for all sufficiently large $n$.

@[category research solved, AMS 11 14] theorem silverman_eds_primitive_prime_divisors : ∀ W : ℤ → ℤ, IsNonsingularEDS W → (∀ n : ℤ, n ≠ 0 → W n ≠ 0) → ∀ᶠ n in Filter.atTop, HasPrimitivePrimeDivisor W n := ⊢ ∀ (W : ℤ → ℤ), IsNonsingularEDS W → (∀ (n : ℤ), n ≠ 0 → W n ≠ 0) → ∀ᶠ (n : ℕ) in Filter.atTop, HasPrimitivePrimeDivisor W n All goals completed! 🐙end EllipticDivisibilitySequence