FormalConjectures/Wikipedia/Pell.lean

GitHub source file

Explanation legend Lean4 Domain Explanation Language (L4DEL)

L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.

L4DEL
Lean4 Domain Explanation Language

Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.

Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1

8 declarations, 1 contain sorry, 0 declared as axioms

Infinitude of Pell number primes

References:

The Pell numbers $P_n$ are defined by $P_0 = 0$, $P_1 = 1$, $P_{n+2} = 2*P_{n+1} + P_n$. OEIS A129

The conjecture says that there are infinitely many prime Pell numbers.

Imports (1)
Imported by 2 files
  1. def PellNumbers.pellNumber The Pell numbers $P_n$ are defined by $P_0 = 0$, $P_1 = 1$, $P_{n+2} = 2*P_{n+1} + P_n$ line 38 source

    Source documentation

    The Pell numbers $P_n$ are defined by $P_0 = 0$, $P_1 = 1$, $P_{n+2} = 2*P_{n+1} + P_n$

    no axioms what this means

    Statement uses: Nat

    2 instances, coercions and auxiliary constants left out.

    def pellNumber : ℕ → ℕ
      | 0 => 0
      | 1 => 1
      | n + 1 + 1 => 2 * pellNumber (n + 1) + pellNumber n
    
    /-- The initial Pell number is $P_0 = 0$. -/
    @[category test, AMS 11]

    Mentions: test, AMS

  2. theorem PellNumbers.pellNumber_zero The initial Pell number is $P_0 = 0$ line 45 source

    Source documentation

    The initial Pell number is $P_0 = 0$.

    no axioms what this means

    Statement uses: Eq, Nat, PellNumbers.pellNumber, OfNat.ofNat

    Proof uses: rfl

    2 instances, coercions and auxiliary constants left out.

    theorem pellNumber_zero : pellNumber 0 = 0 := rfl
    …

    Mentions: PellNumbers.pellNumber

  3. theorem PellNumbers.pellNumber_one The second initial value is $P_1 = 1$ line 49 source

    Source documentation

    The second initial value is $P_1 = 1$.

    no axioms what this means

    Statement uses: Eq, Nat, PellNumbers.pellNumber, OfNat.ofNat

    Proof uses: rfl

    2 instances, coercions and auxiliary constants left out.

    theorem pellNumber_one : pellNumber 1 = 1 := rfl
    …

    Mentions: PellNumbers.pellNumber

  4. theorem PellNumbers.pellNumber_two The recurrence gives $P_2 = 2$ line 53 source

    Source documentation

    The recurrence gives $P_2 = 2$.

    no axioms what this means

    Statement uses: Eq, Nat, PellNumbers.pellNumber, OfNat.ofNat

    Proof uses: rfl

    2 instances, coercions and auxiliary constants left out.

    theorem pellNumber_two : pellNumber 2 = 2 := rfl
    …

    Mentions: PellNumbers.pellNumber

  5. theorem PellNumbers.pellNumber_five The Pell number at index $5$ is $P_5 = 29$ line 57 source

    Source documentation

    The Pell number at index $5$ is $P_5 = 29$.

    no axioms what this means

    Statement uses: Eq, Nat, PellNumbers.pellNumber, OfNat.ofNat

    Proof uses: rfl

    2 instances, coercions and auxiliary constants left out.

    theorem pellNumber_five : pellNumber 5 = 29 := rfl
    …

    Mentions: PellNumbers.pellNumber

  6. theorem PellNumbers.pellNumber_sq_add_pellNumber_succ_sq Similar to Fibonacci numbers, there exist numerous identities around Pell numbers, i.e. P_{2n+1} = P_n ^ 2 + P_{n+1} ^ 2 line 62 source

    Source documentation

    Similar to Fibonacci numbers, there exist numerous identities around Pell numbers, i.e. P_{2n+1} = P_n ^ 2 + P_{n+1} ^ 2

    standard axioms: propext what this means

    Statement uses: Nat, Eq, PellNumbers.pellNumber, HAdd.hAdd, HMul.hMul, OfNat.ofNat, HPow.hPow

    Proof uses: And, Nat.recAux, And.intro, Eq.refl, id, rfl, Eq.mpr, congrArg, Mathlib.Tactic.Ring.of_eq, Nat.rawCast, Mathlib.Tactic.Ring.Common.add_congr, Mathlib.Tactic.Ring.Common.mul_congr, Mathlib.Tactic.Ring.cast_pos, Mathlib.Meta.NormNum.isNat_ofNat, Mathlib.Tactic.Ring.Common.atom_pf, Eq.symm, Mathlib.Tactic.Ring.Common.add_mul, Mathlib.Tactic.Ring.Common.mul_add, Mathlib.Tactic.Ring.Common.mul_pf_right, Mathlib.Meta.NormNum.IsNat.to_raw_eq and 26 more

    32 instances, coercions and auxiliary constants left out.

    Tactic trace: 20 steps

    Open to load the checked before-and-after goal states.

    theorem pellNumber_sq_add_pellNumber_succ_sq (n : ℕ) :
        pellNumber (2 * n + 1) = pellNumber n ^ 2 + pellNumber (n + 1) ^ 2 := by
    …

    Mentions: PellNumbers.pellNumber

  7. theorem PellNumbers.coe_pellNumber_eq An explicit formula for Pell numbers, similar to Binet's formula line 98 source

    Source documentation

    An explicit formula for Pell numbers, similar to Binet's formula

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat, Eq, Real, PellNumbers.pellNumber, HDiv.hDiv, HSub.hSub, HPow.hPow, HAdd.hAdd, OfNat.ofNat, Real.sqrt, HMul.hMul

    Proof uses: Eq.mpr, id, congrArg, rfl, Real.sq_sqrt, Mathlib.Meta.NormNum.isNat_le_true, Mathlib.Meta.NormNum.isNat_ofNat, Nat.cast_zero, Eq.refl, Mathlib.Meta.NormNum.instAtLeastTwo, Bool, Bool.true, congr, Eq.trans, Nat.rawCast, Mathlib.Tactic.Ring.Common.pow_congr, Mathlib.Tactic.Ring.Common.add_congr, Mathlib.Tactic.Ring.cast_pos, Nat.cast_one, Mathlib.Tactic.Ring.Common.atom_pf and 137 more

    146 instances, coercions and auxiliary constants left out.

    Tactic trace: 46 steps

    Open to load the checked before-and-after goal states.

    theorem coe_pellNumber_eq : ∀ n, (pellNumber n : ℝ) = ((1 + √2) ^ n - (1 - √2) ^ n) / (2 * √2) := by
    …

    Mentions: PellNumbers.pellNumber

  8. theorem PellNumbers.infinite_pellNumber_primes There are infinitely many prime Pell numbers sorry line 148 source

    Source documentation

    There are infinitely many prime Pell numbers

    depends on sorry what this means

    Statement uses: Infinite, Nat, Set.ofPred, Prime, PellNumbers.pellNumber

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous, OfNat.ofNat

    5 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

    theorem infinite_pellNumber_primes : Infinite {n : ℕ | Prime (pellNumber n)} := by
    …

    Mentions: PellNumbers.pellNumber