Skip to content

Wikipedia/IdonealCompleteness: prove knownIdonealNumbers_are_idoneal#4314

Merged
mo271 merged 1 commit into
google-deepmind:mainfrom
williamjblair:idoneal-completeness
Jun 25, 2026
Merged

Wikipedia/IdonealCompleteness: prove knownIdonealNumbers_are_idoneal#4314
mo271 merged 1 commit into
google-deepmind:mainfrom
williamjblair:idoneal-completeness

Conversation

@williamjblair

Copy link
Copy Markdown
Contributor

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.

@github-actions

Copy link
Copy Markdown

👋 This is an automated welcome message. 🤖
Thanks for the contributions!

A few friendly reminders while the review gets started:

  • Please take a look at the style guidelines,
    especially the conventions for references, categories, AMS tags, and answer(sorry).
  • You can manage some PR labels by leaving a comment with +label-name or -label-name; for example, +awaiting-author or -awaiting-author.
  • This repository is mainly for formalised statements. Proofs longer than about 25-50 lines are usually out of scope; longer proofs are welcome to be included/linked via the formal_proof mechanism.

Thanks again for helping improve Formal Conjectures.

@williamjblair williamjblair marked this pull request as draft June 24, 2026 18:36
Proves all 65 known idoneal numbers are idoneal. IsIdoneal's unbounded
∃ a b c is reduced to a bounded decidable double-search (helper
exists_triple_iff_bounded: for fixed a,b ≤ n the constraint pins
c = (n - a*b)/(a+b)), then fin_cases over the 65 numbers + native_decide.

native_decide is required (plain decide hits maxRecDepth on the bounded
search), so axioms include Lean.ofReduceBool alongside
[propext, Classical.choice, Quot.sound]; no sorryAx.

Drafted with AI assistance and machine-checked by the Lean kernel.
@williamjblair williamjblair force-pushed the idoneal-completeness branch from 4a9e024 to 2df5dcf Compare June 24, 2026 18:40

@mo271 mo271 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

@williamjblair williamjblair marked this pull request as ready for review June 24, 2026 18:52
@mo271 mo271 merged commit 181601c into google-deepmind:main Jun 25, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants