FormalConjectures/Other/Rule30.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.
Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1
8 declarations, 2 contain sorry, 0 declared as axioms
The Rule 30 Prize Problems
Rule 30 is the elementary cellular automaton with local update $c' = l \oplus (c \lor r)$,
the Boolean rule numbered $30$ by Wolfram. Started from a single black cell on a bi-infinite row,
its center column t ↦ (state t) 0 looks random — it was long Mathematica's default
pseudorandom generator — yet nothing about that randomness is proven. In 2019 Wolfram offered
the Rule 30 Prizes for three questions about it; we formalize the first two.
- Problem 1. Is the center column non-periodic (never eventually periodic)?
- Problem 2. Does each color occur on average equally often, i.e. does the running average of the values converge to $1/2$?
Problem 3 — whether computing the $n$-th cell requires at least $O(n)$ work — is omitted. It is model-relative and has no canonical model-independent phrasing. All three are open.
References:
- Announcing the Rule 30 Prizes, Stephen Wolfram, 2019.
- Rule 30 Prizes.
- Wikipedia: Rule 30.
Imports (1)
- def
Rule30.stepThe Rule 30 local update on a bi-infinite rowrow : ℤ → Boolline 49 sourceSource documentation
The Rule 30 local update on a bi-infinite row
row : ℤ → Bool. The new value at position $i$ isrow (i-1) ⊕ (row i ∨ row (i+1)), i.e. Wolfram's rule $30$.no axioms what this means
Statement uses:
Int,BoolProof uses:
Bool.xor,HSub.hSub,OfNat.ofNat,Bool.or,HAdd.hAdd5 instances, coercions and auxiliary constants left out.
def step (row : ℤ → Bool) : ℤ → Bool := …
- def
Rule30.stateThe Rule 30 evolution from the single-black-cell initial condition:state 0is black exactly at position $0$, and each subsequent row is obtained by applyingstepline 54 sourceSource documentation
The Rule 30 evolution from the single-black-cell initial condition:
state 0is black exactly at position $0$, and each subsequent row is obtained by applyingstep.no axioms what this means
Statement uses:
Nat,Int,Bool2 instances, coercions and auxiliary constants left out.
def state : ℕ → ℤ → Bool | 0 => fun i => decide (i = 0) | t + 1 => step (state t) @[simp, category API, AMS 37 68]
Mentions: Rule30.step, AMS
- theorem
Rule30.state_zeroline 59 sourceno axioms what this means
Statement uses:
Int,Eq,Bool, Rule30.state,OfNat.ofNat,Nat,Decidable.decideProof uses:
rfl4 instances, coercions and auxiliary constants left out.
- theorem
Rule30.state_succline 62 sourceno axioms what this means
Statement uses:
Nat,Eq,Int,Bool, Rule30.state,HAdd.hAdd,OfNat.ofNat, Rule30.stepProof uses:
rfl6 instances, coercions and auxiliary constants left out.
- def
Rule30.centerColumnThe center column of Rule 30: the value of the single central cell (position $0$) at time $t$ line 66 sourceSource documentation
The center column of Rule 30: the value of the single central cell (position $0$) at time $t$.
no axioms what this means
Statement uses:
Nat,BoolProof uses: Rule30.state,
OfNat.ofNat,Int1 instances, coercions and auxiliary constants left out.
def centerColumn (t : ℕ) : Bool := state t 0 …
Mentions: Rule30.state
- theorem
Rule30.centerColumn_prefixSanity check: the first center-column values reproduce the known Rule 30 center column (OEIS A051023) line 73 sourceSource documentation
Sanity check: the first center-column values reproduce the known Rule 30 center column (OEIS A051023). Unlike
state_zero/state_succ, this exercises the composed evolution, guarding against a wrong seed, a swappedxor/||, or an off-by-one neighbour index.L4DEL explanation
Sanity check: the first center-column values reproduce the known Rule 30 center column (OEIS A051023). Unlike
state_zero/state_succ, this exercises the composed evolution, guarding against a wrong seed, a swappedxor/||, or an off-by-one neighbour index.Sources and attribution: Pinned Lean source (1646ca16afd6)
no axioms what this means
Statement uses:
Eq,List,Bool,List.map,Nat, Rule30.centerColumn,List.range,OfNat.ofNat,List.cons,Bool.true,Bool.false,List.nilProof uses:
of_decide_eq_true,id,Decidable.decide,Eq.refl4 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem centerColumn_prefix : (List.range 8).map centerColumn = [true, true, false, true, true, true, false, false] := by …Mentions: Rule30.centerColumn
- theorem
Rule30.centerColumn_not_eventually_periodicRule 30 Prize, Problem 1 (non-periodicity) sorry line 81 sourceSource documentation
Rule 30 Prize, Problem 1 (non-periodicity). The center column of Rule 30 is not eventually periodic: there is no positive period $p$ and threshold $N$ past which the column repeats with period $p$.
depends on sorry what this means
Statement uses:
Iff,True,Not,Exists,Nat,And,LT.lt,OfNat.ofNat,LE.le,Eq,Bool, Rule30.centerColumn,HAdd.hAddProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous10 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem centerColumn_not_eventually_periodic : answer(sorry) ↔ ¬ ∃ p : ℕ, 0 < p ∧ ∃ N : ℕ, ∀ t : ℕ, N ≤ t → centerColumn (t + p) = centerColumn t := by …Mentions: Rule30.centerColumn
- theorem
Rule30.centerColumn_frequency_halfRule 30 Prize, Problem 2 (equal frequency) sorry line 91 sourceSource documentation
Rule 30 Prize, Problem 2 (equal frequency). Each color occurs on average equally often in the center column: the set of times at which it is black has natural density $1/2$. This is Wolfram's phrasing that the discrete limit of $\mathrm{Total}[c[t]]/t$ as $t \to \infty$ is $1/2$.
depends on sorry what this means
Statement uses:
Iff,True, Set.HasDensity,Nat,Set.ofPred,Eq,Bool, Rule30.centerColumn,Bool.true,HDiv.hDiv,Real,OfNat.ofNat,Set.univProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous28 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem centerColumn_frequency_half : answer(sorry) ↔ {t : ℕ | centerColumn t}.HasDensity (1 / 2) := by …Mentions: Rule30.centerColumn