Repository navigation
Add a 21-state machine for Legendre's conjecture (legendre_21) with Lean proofs - #32
Open
veljjanoski wants to merge 1 commit into
Open
veljjanoski wants to merge 1 commit into
veljjanoski wants to merge 1 commit into
Conversation
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.
This PR adds
legendre_21, a 21-state 2-symbol Turing machine that halts on the blank tape ifand only if Legendre's conjecture is false: some
n ≥ 1has no prime strictly betweenn^2and(n + 1)^2.Machine. Everything is unary. The primality test is the one of
goldbach_21(16 of the 21states). A hole in a walker area moves one cell per tested number and reaches the left end at
the last number of each interval
n^2, …, n^2 + 2n. A flag records whether the interval had aprime; if it had none, the machine halts. Details:
artifacts/legendre_21/README.md.Proofs (
Cryptids/Legendre21.lean,Cryptids/Semantics/Legendre21.lean):halts_legendre21_iff_exists_gap : Halts legendre21 ↔ ∃ n, 1 ≤ n ∧ ∀ p, p.Prime → ¬ (n ^ 2 < p ∧ p < (n + 1) ^ 2)—
propext,Quot.sound.halts_legendre21_iff_not_legendre : Halts legendre21 ↔ ¬ LegendreConjecture— classical(Markov).
Wiring.
Machines.lean,Propositions.lean,Challenge.lean, comparator configs,verify.py, docs andformalization.yaml.Prior work. Charlie Reams's 44-state machine with a Lean proof
(calr3/tinycryptids, November 2026),
which also uses an interval register with a hole and a flag. The primality test comes from the
Goldbach machines (anonymous 2016 machine, Yao & Leng, Faldor & Firsching).
Claude (Anthropic) was used as assistant.