Commit 181601c
authored
Wikipedia/IdonealCompleteness: prove knownIdonealNumbers_are_idoneal (#4314)
Proves `knownIdonealNumbers_are_idoneal` — all 65 known idoneal numbers
are in fact idoneal.
The work is making the predicate decidable. `IsIdoneal n` is `0 < n ∧ ¬
∃ a b c, 0 < a < b < c ∧ n = a*b + b*c + a*c`, and that existential
ranges over unbounded `ℕ`. The helper `exists_triple_iff_bounded`
reduces it to a bounded double-search: for a fixed pair `a, b ≤ n` the
constraint pins `c = (n − a*b)/(a+b)` exactly, so only `a, b` are
searched (over `Finset.range (n+1)`), with `a, b ≤ n` falling out of
`nlinarith` on `0 < a < b < c`. The main proof then `fin_cases` over the
65 numbers, peels off the trivial `0 < n`, and discharges each bounded
search.
This one needs `native_decide`: plain `decide` is infeasible — the
kernel's `Finset` reduction hits `maxRecDepth` on a bounded search as
small as 100×100, long before the `n = 1848` cases. So `#print axioms`
includes `Lean.ofReduceBool` (the compiler-checked-computation axiom)
alongside the usual `[propext, Classical.choice, Quot.sound]`; no
`sorryAx`. The file builds in ~13s.
Only `knownIdonealNumbers_are_idoneal` is touched; the research-open
`idoneal_numbers_completeness` keeps its `sorry`.
Drafted with AI assistance and machine-checked by the Lean kernel.1 parent ef4efd5 commit 181601c
1 file changed
Lines changed: 35 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
57 | 87 | | |
58 | 88 | | |
59 | 89 | | |
60 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
61 | 95 | | |
62 | 96 | | |
63 | 97 | | |
| |||
0 commit comments