FormalConjectures/Other/Rule30.lean

GitHub source file

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 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:

Imports (1)
  1. def Rule30.step The Rule 30 local update on a bi-infinite row row : ℤ → Bool line 49 source

    Source documentation

    The Rule 30 local update on a bi-infinite row row : ℤ → Bool. The new value at position $i$ is row (i-1) ⊕ (row i ∨ row (i+1)), i.e. Wolfram's rule $30$.

    no axioms what this means

    Statement uses: Int, Bool

    Proof uses: Bool.xor, HSub.hSub, OfNat.ofNat, Bool.or, HAdd.hAdd

    5 instances, coercions and auxiliary constants left out.

    def step (row : ℤ → Bool) : ℤ → Bool :=
    …
  2. def Rule30.state The Rule 30 evolution from the single-black-cell initial condition: state 0 is black exactly at position $0$, and each subsequent row is obtained by applying step line 54 source

    Source documentation

    The Rule 30 evolution from the single-black-cell initial condition: state 0 is black exactly at position $0$, and each subsequent row is obtained by applying step.

    no axioms what this means

    Statement uses: Nat, Int, Bool

    2 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

  3. theorem Rule30.state_zero line 59 source

    no axioms what this means

    Statement uses: Int, Eq, Bool, Rule30.state, OfNat.ofNat, Nat, Decidable.decide

    Proof uses: rfl

    4 instances, coercions and auxiliary constants left out.

  4. theorem Rule30.state_succ line 62 source

    no axioms what this means

    Statement uses: Nat, Eq, Int, Bool, Rule30.state, HAdd.hAdd, OfNat.ofNat, Rule30.step

    Proof uses: rfl

    6 instances, coercions and auxiliary constants left out.

  5. def Rule30.centerColumn The center column of Rule 30: the value of the single central cell (position $0$) at time $t$ line 66 source

    Source 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, Bool

    Proof uses: Rule30.state, OfNat.ofNat, Int

    1 instances, coercions and auxiliary constants left out.

    def centerColumn (t : ℕ) : Bool := state t 0
    …

    Mentions: Rule30.state

  6. theorem Rule30.centerColumn_prefix Sanity check: the first center-column values reproduce the known Rule 30 center column (OEIS A051023) line 73 source

    Source 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 swapped xor/||, 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 swapped xor/||, 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.nil

    Proof uses: of_decide_eq_true, id, Decidable.decide, Eq.refl

    4 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

  7. theorem Rule30.centerColumn_not_eventually_periodic Rule 30 Prize, Problem 1 (non-periodicity) sorry line 81 source

    Source 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.hAdd

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    10 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

  8. theorem Rule30.centerColumn_frequency_half Rule 30 Prize, Problem 2 (equal frequency) sorry line 91 source

    Source 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.univ

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    28 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