Repository navigation
Add the 15- and 14-state Erdős powers-of-two machines (erdos_15, erdos_14) with Lean proofs - #19
Open
veljjanoski wants to merge 3 commits into
Open
veljjanoski wants to merge 3 commits into
veljjanoski wants to merge 3 commits into
Conversation
erdos_15) with Lean proofserdos_15, erdos_14) with Lean proofs
Author
|
I've added Tristan Stérin's 14-state machine for the same conjecture as a |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #15.
Adds Tristan Stérin and Damien Woods's 15-state, 2-symbol machine from
arXiv:2107.12475 and proves that it halts on the blank tape if
and only if Erdős's conjecture on powers of two is false: some
2 ^ nwithn > 8has no digit2in base3(Erdős, Math. Mag. 52 (1979)). Their correctness proof is on paper; as far as Iknow this is the first Lean proof.
with
ErdosPowersOfTwoConjecture := ∀ n : ℕ, 8 < n → 2 ∈ Nat.digits 3 (2 ^ n)inPropositions.leanandChallenge.lean.It also adds Tristan Stérin's 14-state machine for the same conjecture as a
15 → 14reduction(see below).
Proof (
erdos_15)The proof is about the 15-state machine directly; there is no 4-symbol helper machine. At the
start of each pass the tape holds the base-3 digits of
2 ^ n(two cells per digit) and a counterof how many of
2 ^ 0, …, 2 ^ nhave no digit2. One lemma per routine (doubling, scanning fora
2, rewinding, incrementing the counter) takes the machine from one pass to the next, so themachine halts exactly at the fourth power without a digit
2; the first three are2 ^ 0,2 ^ 2and
2 ^ 8.The core result,
halts_erdos15_iff_exists_freeinCryptids/Erdos15.lean, states this withpw n, the digit list of2 ^ ncomputed by repeated doubling, and uses onlypropextandQuot.sound.Cryptids/Semantics/Erdos15.leanprovespw n = Nat.digits 3 (2 ^ n). That stepneeds
Classical.choice, becauseNat.digitsitself uses it, and the negated form also usesMarkov's Principle (
not_forall), as for¬ GoldbachConjecture. So the two Challenge theorems arechecked in
all.jsonand the newerdos_15.json, not inconstructive.json.erdos_14: Stérin's 14-state machine (15 → 14)Tristan Stérin
announced
a 14-state machine for the same conjecture on the bbchallenge Discord in October 2026; the
Cryptids page of the
bbchallenge wiki lists it as not independently verified:
It is added in
artifacts/erdos_14/as a reduction oferdos_15, in the same format asriemann_104 → riemann_95:with
candidate = erdos14andreference = erdos15. The machine keeps2 ^ nin unary and readsits base-3 digits by repeated division by
3; a single0in the block marks where the quotientends. One lemma per routine (a division round and its three outcomes, the return to the start, the
counter, the doubling of the block) gives
Halts erdos14 ↔ ∃ n, 8 < n ∧ 2 ∉ pw n(
Cryptids/Erdos14.lean), andcandidate_equivalentfollows from the same statement forerdos15. Both use onlypropextandQuot.sound, socandidate_fewer_statesandcandidate_equivalentare added toconstructive.json; all three theorems are inall.jsonandthe new
erdos_14.json.Machine tables
The upstream
erdos_15file is not in any formatverify.pyalready reads, so:baselines/sources/erdos_15_sterin_woods.txt: the authors' file, verbatim(
tcosmo/bbsimmachines/powers_of_two_15_2.txtat3f655ba2c73b, mirrored at docs.bbchallenge.org).baselines/tables/erdos_15.txt: the compiled table (start state →0, other states in order ofappearance, blank
b→0,a→1), loaded byMachines.erdos15.artifacts/erdos_14/machine.txt: the wiki table with the statesA–Nnumbered0–13,loaded by
Machines.erdos14.verify.py:bbsimparser that re-derives theerdos_15table from the source and checks it againstthe pinned SHA-256s and the Lean definition;
erdos_15pass, the digits of2 ^ kandthe counter (passes
k < 425), and that(14, 1)is the only halting entry;erdos_14, and a simulation that checks the whole tape at everyentry to its division state
Dagainst the configurations in the proof (21 entries, up to thestart of the stage for
2 ^ 9, past both counter steps).Answers to the questions in #15
I made these choices; happy to change any of them:
ErdosPowersOfTwoConjectureas above, withNat.digits.Machine 5 4helper; the proof follows the 15-state table directly.erdos_15(files, baseline),Machines.erdos15, namespaceErdos15.One change from the plan in #15: the
erdos_15table lives inbaselines/, likeriemann_120,not in
artifacts/, since it is a published machine, not a new reduction.erdos_14is inartifacts/, as a reduction likeriemann_95.Docs
Cryptids.lean,README.md,Cryptids/README.md,Cryptids/Semantics/README.md(§6, §7),RELATED_WORK.md(new §4),baselines/PROVENANCE.md,comparator/README.mdandformalization.yamlare updated for both machines and the five new theorems (27 in total).Verification
Run on Linux (Ubuntu 24.04 in Docker, Lean v4.35.0-rc4,
LEAN_NUM_THREADS=1), the steps oflean_action_ci.ymlplus the two per-machine comparator configs:A question
Would you like the constructive
erdos_15core in the Challenge too? That would mean addingdbland
pwtoChallenge.leanandhalts_erdos15_iff_exists_freetoconstructive.json. I left itout to keep
Challenge.leanon Mathlib definitions only.AI-usage disclosure: Claude (Anthropic) was used as assistant.