FormalConjectures/Wikipedia/IdonealCompleteness.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

5 declarations, 1 contain sorry, 0 declared as axioms

Idoneal numbers completeness conjecture

An integer $D>0$ is idoneal if every integer that can be expressed in exactly one way (up to order and signs) as $x^2 + D y^2$ with gcd(x, Dy)=1 is a prime power or twice a prime power.

The Idoneal Numbers Completeness Conjecture asserts that the following list of 65 numbers is complete: 1,2,3,4,5,6,7,8,9,10,12,13,15,16,18,21,22,24,25,28,30,33,37,40,42,45,48, 57,58,60,70,72,78,85,88,93,102,105,112,120,130,133,165,168,177,190,210,232, 240,253,273,280,312,330,345,357,385,408,462,520,760,840,1320,1365,1848. References:

Imports (1)
  1. def Idoneal.IsIdoneal Equivalent definition: A positive integer $n$ is idoneal if and only if it cannot be written as $ab + bc + ac$ for distinct positive integers $a, b,$ and $c$ line 45 source

    Source documentation

    Equivalent definition: A positive integer $n$ is idoneal if and only if it cannot be written as $ab + bc + ac$ for distinct positive integers $a, b,$ and $c$.

    no axioms what this means

    Statement uses: Nat

    Proof uses: And, LT.lt, OfNat.ofNat, Not, Exists, Eq, HAdd.hAdd, HMul.hMul

    6 instances, coercions and auxiliary constants left out.

    def IsIdoneal (n : ℕ) : Prop :=
    …
  2. def Idoneal.knownIdonealNumbers The 65 known idoneal numbers that are conjectured to be the only idoneal numbers line 53 source

    Source documentation

    The 65 known idoneal numbers that are conjectured to be the only idoneal numbers.

    standard axioms: Quot.sound, propext what this means

    Statement uses: Finset, Nat

    Proof uses: Insert.insert, OfNat.ofNat, Singleton.singleton

    4 instances, coercions and auxiliary constants left out.

    def knownIdonealNumbers : Finset ℕ :=
    …
  3. theorem Idoneal.exists_triple_iff_bounded Reduces the unbounded search for a representation n = a*b + b*c + a*c (with 0 < a < b < c) to a bounded, decidable double search over a, b ∈ range (n+1) line 69 source

    Source documentation

    Reduces the unbounded search for a representation n = a*b + b*c + a*c (with 0 < a < b < c) to a bounded, decidable double search over a, b ∈ range (n+1).

    The third variable is not searched: for a fixed pair a, b the equation n = a*b + c*(a+b) pins down c = (n - a*b) / (a+b), so the witness c is recovered by exact division. The forward direction uses a, b ≤ n (each pairwise product is at most n) to land the pair in range (n+1).

    private theorem exists_triple_iff_bounded (n : ℕ) :
        (∃ a b c : ℕ, 0 < a ∧ a < b ∧ b < c ∧ n = a * b + b * c + a * c) ↔
          (∃ a ∈ Finset.range (n + 1), ∃ b ∈ Finset.range (n + 1),
            0 < a ∧ a < b ∧ b < (n - a * b) / (a + b) ∧
              n = a * b + b * ((n - a * b) / (a + b)) + a * ((n - a * b) / (a + b))) := by
    …

    Mentions: c

  4. theorem Idoneal.knownIdonealNumbers_are_idoneal All 65 known idoneal numbers are indeed idoneal line 91 source

    Source documentation

    All 65 known idoneal numbers are indeed idoneal.

    extra axioms: _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_1, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_10, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_11, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_12, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_13, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_14, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_15, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_16, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_17, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_18, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_19, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_2, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_20, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_21, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_22, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_23, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_24, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_25, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_26, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_27, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_28, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_29, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_3, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_30, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_31, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_32, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_33, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_34, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_35, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_36, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_37, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_38, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_39, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_4, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_40, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_41, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_42, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_43, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_44, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_45, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_46, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_47, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_48, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_49, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_5, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_50, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_51, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_52, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_53, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_54, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_55, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_56, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_57, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_58, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_59, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_6, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_60, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_61, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_62, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_63, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_64, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_65, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_7, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_8, _private.0.Idoneal.knownIdonealNumbers_are_idoneal._native.native_decide.ax_9 what this means

    Statement uses: Nat, Membership.mem, Finset, Idoneal.knownIdonealNumbers, Idoneal.IsIdoneal

    Proof uses: List, List.Mem, Eq, List.insert, OfNat.ofNat, List.cons, List.nil, HEq, List.Mem.head, And.intro, LT.lt, Not, Exists, And, HAdd.hAdd, HMul.hMul, Mathlib.Meta.NormNum.isNat_lt_true, Mathlib.Meta.NormNum.isNat_ofNat, Eq.refl, Bool and 15 more

    97 instances, coercions and auxiliary constants left out.

    Tactic trace: 6 steps

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

    theorem knownIdonealNumbers_are_idoneal : ∀ n ∈ knownIdonealNumbers, IsIdoneal n := by
    …

    Mentions: Idoneal.knownIdonealNumbers, Idoneal.IsIdoneal

  5. theorem Idoneal.idoneal_numbers_completeness Idoneal numbers completeness conjecture sorry line 102 source

    Source documentation

    Idoneal numbers completeness conjecture.

    depends on sorry what this means

    Statement uses: Iff, True, Nat, Idoneal.IsIdoneal, Membership.mem, Finset, Idoneal.knownIdonealNumbers

    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 idoneal_numbers_completeness :
        answer(sorry) ↔
          ∀ n : ℕ, IsIdoneal n → n ∈ knownIdonealNumbers := by
    …

    Mentions: Idoneal.IsIdoneal, Idoneal.knownIdonealNumbers