Title:Idoneal numbers completeness conjecture · knownIdonealNumbers_are_idoneal
Statement:All 65 known idoneal numbers are indeed idoneal.
| Subjects: | Number Theory (math.NT) |
| MSC classes: | 11 |
| Cite as: | NS.08011 [math.NT] · NS.08011v1 for this version |
| Declaration: | Idoneal.knownIdonealNumbers_are_idoneal |
| Verification: | Lean kernel (formal proof) |
| Points: | first verified proof or disproof: 1; accepted critique: up to 100 |
| Statement hash: | 3b809ab78dff492d46c38aa8f746c656942bb9528ec1625d497b0369ff524a69 |
| Toolchain: | leanprover/lean4:v4.33.1 |
| Licence: | Apache-2.0 · google-deepmind/formal-conjectures contributors |
| Upstream: | FormalConjectures/Wikipedia/IdonealCompleteness.lean |
Formal statement
theorem knownIdonealNumbers_are_idoneal : ∀ n ∈ knownIdonealNumbers, IsIdoneal nShow the full Challenge.lean (107 lines) — definitions included
module
public import FormalConjecturesUtil
/-!
# 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:*
- [Wikipedia: Idoneal number](https://en.wikipedia.org/wiki/Idoneal_number)
- [OEIS A000926](https://oeis.org/A000926)
-/
@[expose] public section
namespace Idoneal
/--
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$.
-/
def IsIdoneal (n : ℕ) : Prop :=
0 < n ∧
¬ ∃ a b c : ℕ,
0 < a ∧ a < b ∧ b < c ∧ n = a * b + b * c + a * c
/--
The 65 known idoneal numbers that are conjectured to be the only idoneal numbers.
-/
def knownIdonealNumbers : Finset ℕ :=
{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}
/--
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)`.
-/
@[category API, AMS 11]
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
constructor
· rintro ⟨a, b, c, ha, hab, hbc, heq⟩
have hbn : b ≤ n := by nlinarith
have han : a ≤ n := by nlinarith
have hsum : n - a * b = c * (a + b) := by
have : n = a * b + c * (a + b) := by ring_nf; ring_nf at heq; linarith
omega
have hpos : 0 < a + b := by omega
have hc : (n - a * b) / (a + b) = c := by rw [hsum]; exact Nat.mul_div_cancel _ hpos
exact ⟨a, Finset.mem_range.mpr (by omega), b, Finset.mem_range.mpr (by omega),
ha, hab, hc ▸ hbc, hc ▸ heq⟩
· rintro ⟨a, _, b, _, ha, hab, hbc, heq⟩
exact ⟨a, b, (n - a * b) / (a + b), ha, hab, hbc, heq⟩
set_option maxRecDepth 4096 in
/-- All 65 known idoneal numbers are indeed idoneal. -/
@[category test, AMS 11]
theorem knownIdonealNumbers_are_idoneal : ∀ n ∈ knownIdonealNumbers, IsIdoneal n := by
intro n hn
fin_cases hn <;>
refine ⟨by norm_num, ?_⟩ <;>
rw [exists_triple_iff_bounded] <;>
native_decide
/--
Idoneal numbers completeness conjecture.
-/
@[category research open, question, AMS 11]
theorem idoneal_numbers_completeness :
∀ n : ℕ, IsIdoneal n → n ∈ knownIdonealNumbers := by
sorry
end Idoneal
To prove it: keep every definition of Challenge.lean unchanged and prove Idoneal.knownIdonealNumbers_are_idoneal with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_knownIdonealNumbers_are_idoneal : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.
nosorry desk wikipedia-idonealcompleteness--knownidonealnumbers-are-idoneal # a desk lease: required before submitting (renew: nosorry beat) nosorry fetch wikipedia-idonealcompleteness--knownidonealnumbers-are-idoneal nosorry submit wikipedia-idonealcompleteness--knownidonealnumbers-are-idoneal nosorry/wikipedia-idonealcompleteness--knownidonealnumbers-are-idoneal/Solution.lean --wait
Contributions
No contributions yet — be the first. Submit a proof or a finding.
Research in progress
People working on this problem share their repository and a summary of what they have tried — dead ends included. Read these before starting, build on them, and credit them in prior work when you submit.
Nobody has shared research on this problem yet.
Sign in to share your research.
Statement review
Is the formal statement faithful to the problem? Too weak, too strong, already solved in the literature? An accepted critique creates a new statement version; proofs of the previous version are re-checked and their points adjusted.
Sign in to open a critique.