1. Overview: what is proved
1.1. Orientation
The headline theorem is Smith.wolfram23_universal_ic in Smith/Universality.lean.
In one sentence: for every well-formed binary Turing machine tm, every valid
configuration c and every finite run of n steps, Wolfram's 2-state 3-colour
machine (BiTM.wolfram23) started on the finite tape IC tm c n reproduces the n + 1
configurations of that run, read off the tape by a fixed decoder at strictly
increasing times, with the run confined to the tape until it leaves it to the right
in state A. IC tm c n is a definition, computed from tm, c and n by the
encoders and by closed-form bounds on the run lengths; it runs neither the machine
nor any of the emulating systems.
This is Smith's Conjecture 0 in its finite form (p. 4, "for an arbitrary number of
steps"), composed with a Cocke-Minsky reduction from Turing machines to cyclic tag
systems. The tape depends on the number of steps n. The infinite form (one
initial condition that emulates forever, p. 21-22) is Smith.wolfram23_infinite_ic in
Smith/Infinite.lean: one right-infinite tape ITape tm c per machine and input, again a
definition, from which wolfram23 runs for ever and reproduces every prefix of the
run of the machine; the chapter on the infinite form describes its construction.
Both have corollaries with the tape existential,
Smith.wolfram23_universal and Smith.wolfram23_infinite. The chapter on open items lists
what remains open.
1.2. The statements
For a well-formed binary Turing machine tm (Definition 3.4.12), a valid configuration
c (Definition 3.3.6) with state below numStates, and a run of n steps of tm
from c, let start = IC tm c n (Definition 9.4.1), w = ICw tm c n and
b = ICb tm c n. There are times times i and an exit time T such that: start
is valid and in state A; the times are strictly increasing on [0, n] and below T;
at time times i the wolfram23 configuration decodes by Definition 9.2.3 with the
parameters numStates, 2^w, b to the i-th configuration of the run without
trailing blanks (Definition 3.5.7); up to time T the explicit tape keeps its
size (Definition 2.3.5); and at time T + 1 the head is on the cell right of the
tape, a 0, in state A.
Lean code for Theorem1.2.1●1 theorem
Associated Lean declarations
-
Smith.wolfram23_universal_ic[complete]
-
Smith.wolfram23_universal_ic[complete]
-
theoremdefined in Smith/Universality.leancomplete
theorem Smith.wolfram23_universal_ic (tm : TM.Machine) (hwf : TagSystem.WF tm) (c : BiTM.Config) (hv : TagSystem.ValidCfg c) (hst : c.state < tm.numStates) (n : ℕ) (c' : BiTM.Config) (hrun : BiTM.nSteps tm c n = some c') : ∃ times T, BiTM.IsValidWolfram23Cfg (Smith.IC tm c n) ∧ (Smith.IC tm c n).state = 1 ∧ (∀ i < n, times i < times (i + 1)) ∧ (∀ i ≤ n, times i ≤ T ∧ ∃ ci cfgi, BiTM.nSteps tm c i = some ci ∧ BiTM.nSteps BiTM.wolfram23 (Smith.IC tm c n) (times i) = some cfgi ∧ Smith.decodeTM tm.numStates (2 ^ Smith.ICw tm c n) (Smith.ICb tm c n) cfgi = some (TagSystem.canon ci)) ∧ (∀ τ ≤ T, ∃ cfgτ, BiTM.nSteps BiTM.wolfram23 (Smith.IC tm c n) τ = some cfgτ ∧ Smith.biSize cfgτ = Smith.biSize (Smith.IC tm c n)) ∧ ∃ L, BiTM.nSteps BiTM.wolfram23 (Smith.IC tm c n) (T + 1) = some { state := 1, left := L, head := 0, right := [] } ∧ L.length = Smith.biSize (Smith.IC tm c n)
theorem Smith.wolfram23_universal_ic (tm : TM.Machine) (hwf : TagSystem.WF tm) (c : BiTM.Config) (hv : TagSystem.ValidCfg c) (hst : c.state < tm.numStates) (n : ℕ) (c' : BiTM.Config) (hrun : BiTM.nSteps tm c n = some c') : ∃ times T, BiTM.IsValidWolfram23Cfg (Smith.IC tm c n) ∧ (Smith.IC tm c n).state = 1 ∧ (∀ i < n, times i < times (i + 1)) ∧ (∀ i ≤ n, times i ≤ T ∧ ∃ ci cfgi, BiTM.nSteps tm c i = some ci ∧ BiTM.nSteps BiTM.wolfram23 (Smith.IC tm c n) (times i) = some cfgi ∧ Smith.decodeTM tm.numStates (2 ^ Smith.ICw tm c n) (Smith.ICb tm c n) cfgi = some (TagSystem.canon ci)) ∧ (∀ τ ≤ T, ∃ cfgτ, BiTM.nSteps BiTM.wolfram23 (Smith.IC tm c n) τ = some cfgτ ∧ Smith.biSize cfgτ = Smith.biSize (Smith.IC tm c n)) ∧ ∃ L, BiTM.nSteps BiTM.wolfram23 (Smith.IC tm c n) (T + 1) = some { state := 1, left := L, head := 0, right := [] } ∧ L.length = Smith.biSize (Smith.IC tm c n)
T8 with the closed-form initial condition. For a well-formed binary Turing machine `tm`, a valid configuration `c` with state below `numStates` and a run of `n` steps of `tm` from `c`, wolfram23 started on `IC tm c n` decodes, by `decodeTM` with the block width `2 ^ ICw tm c n` and the band `ICb tm c n`, to the configurations of the run at strictly increasing times, stays on its tape until then, and leaves it to the right in state A. The tape is a definition computed from `tm`, `c` and `n` by the encoders and closed-form bounds; it does not run the machine or any of the emulating systems.
The same with start, w and b existential: for tm, c and a run of n
steps as in Theorem 1.2.1 there are a wolfram23 configuration
start, a block width 2^w, a band b, times and an exit time with the same five
clauses.
Lean code for Theorem1.2.2●1 theorem
Associated Lean declarations
-
Smith.wolfram23_universal[complete]
-
Smith.wolfram23_universal[complete]
-
theoremdefined in Smith/Universality.leancomplete
theorem Smith.wolfram23_universal (tm : TM.Machine) (hwf : TagSystem.WF tm) (c : BiTM.Config) (hv : TagSystem.ValidCfg c) (hst : c.state < tm.numStates) (n : ℕ) (c' : BiTM.Config) (hrun : BiTM.nSteps tm c n = some c') : ∃ start w b times T, BiTM.IsValidWolfram23Cfg start ∧ start.state = 1 ∧ (∀ i < n, times i < times (i + 1)) ∧ (∀ i ≤ n, times i ≤ T ∧ ∃ ci cfgi, BiTM.nSteps tm c i = some ci ∧ BiTM.nSteps BiTM.wolfram23 start (times i) = some cfgi ∧ Smith.decodeTM tm.numStates (2 ^ w) b cfgi = some (TagSystem.canon ci)) ∧ (∀ τ ≤ T, ∃ cfgτ, BiTM.nSteps BiTM.wolfram23 start τ = some cfgτ ∧ Smith.biSize cfgτ = Smith.biSize start) ∧ ∃ L, BiTM.nSteps BiTM.wolfram23 start (T + 1) = some { state := 1, left := L, head := 0, right := [] } ∧ L.length = Smith.biSize start
theorem Smith.wolfram23_universal (tm : TM.Machine) (hwf : TagSystem.WF tm) (c : BiTM.Config) (hv : TagSystem.ValidCfg c) (hst : c.state < tm.numStates) (n : ℕ) (c' : BiTM.Config) (hrun : BiTM.nSteps tm c n = some c') : ∃ start w b times T, BiTM.IsValidWolfram23Cfg start ∧ start.state = 1 ∧ (∀ i < n, times i < times (i + 1)) ∧ (∀ i ≤ n, times i ≤ T ∧ ∃ ci cfgi, BiTM.nSteps tm c i = some ci ∧ BiTM.nSteps BiTM.wolfram23 start (times i) = some cfgi ∧ Smith.decodeTM tm.numStates (2 ^ w) b cfgi = some (TagSystem.canon ci)) ∧ (∀ τ ≤ T, ∃ cfgτ, BiTM.nSteps BiTM.wolfram23 start τ = some cfgτ ∧ Smith.biSize cfgτ = Smith.biSize start) ∧ ∃ L, BiTM.nSteps BiTM.wolfram23 start (T + 1) = some { state := 1, left := L, head := 0, right := [] } ∧ L.length = Smith.biSize start
T8 with an existential initial condition, a corollary of `wolfram23_universal_ic`: for a well-formed binary Turing machine `tm`, a valid configuration `c` with state below `numStates`, and a run of `n` steps of `tm` from `c`, there are a wolfram23 configuration `start`, a block width `2^w`, a band `b`, strictly increasing times `times i` and an exit time `T` such that `start` is valid and in state A; at time `times i` the wolfram23 tape decodes, by `decodeTM`, to the `i`-th configuration of the run of `tm` (without trailing blanks); up to time `T` the run of wolfram23 stays on its explicit tape; and at time `T + 1` its head is on the cell right of the tape, a 0, in state A.
Theorem 1.2.1 with start = IC tm c n.
Read clause by clause:
-
tm : Machineis a Turing machine in the shared model ofTM/Defs.lean(Definition 2.2.3): states and symbols are natural numbers, state 0 halts.TagSystem.WFsays that from a state belownumStates, reading a bit, the machine writes a bit and moves to a state belownumStates.TagSystem.ValidCfgsays the tape ofcholds bits. So the class of machines is the binary machines, not all machines (the chapters on the machine reduction and on open items). -
hrungives the run ofnsteps that is to be reproduced. The tapestart = IC tm c ndepends onnbut not onhrun: it is one tape per machine, configuration and budget, written down fromtm,candnalone (the chapter on the composition gives its construction). -
startis aBiTM.Config: a finite zipper with implicit blanks on both sides, valid (BiTM.IsValidWolfram23Cfg: states A or B, symbols 0, 1, 2) and in state A (state = 1). -
timesis a strictly increasing schedule on[0, n], all below the exit timeT. At timetimes ithe wolfram23 configuration decodes, bySmith.decodeTM tm.numStates (2 ^ w) b, toTagSystem.canon ci, thei-th configuration of the run without trailing blanks. The decoder is a fixed function of three parameters (the number of states, the block width2^w, the bandb); it does not seetm,cor the run. -
Confinement: up to time
Tthe number of explicit cells,Smith.biSize, never changes. A wolfram23 step onto an implicit blank grows the explicit tape by one cell, so this says the head never leaves the initial tape beforeT. -
Exit: at time
T + 1the head is on the cell right of the tape, a 0, in state A, and the tape has grown by exactly that cell. This is the exit condition of Smith's Conjecture 0 (p. 4: "the first cell to become active after the emulation has finished is the cell to the right of the initial condition, and ... it becomes active in state A").
For a well-formed binary machine tm and a valid configuration c with state below
numStates, the right-infinite tape ITape tm c (Definition 10.4.4.4) has cells 0, 1,
2, and from Definition 10.2.2 (ITape tm c) (state B on a 2, nothing to the left,
the tape to the right) at every time the run of wolfram23 is defined and does not
move left from an empty left tape; for every k there are a window W and strictly
increasing times, the last later than k, such that at time times i for i <= k
wolfram23 is in state B and, whenever the i-th configuration of the run exists, the
cells right of the head, on the window W and on every larger window, decode by
Definition 9.2.3 with the width 2 ^ blkW tm c k and the band
icBand (blkProg tm c k) of block k to that configuration.
Lean code for Theorem1.2.3●1 theorem
Associated Lean declarations
-
Smith.wolfram23_infinite_ic[complete]
-
Smith.wolfram23_infinite_ic[complete]
-
theoremdefined in Smith/Infinite.leancomplete
theorem Smith.wolfram23_infinite_ic (tm : TM.Machine) (hwf : TagSystem.WF tm) (c : BiTM.Config) (hv : TagSystem.ValidCfg c) (hst : c.state < tm.numStates) : (∀ (i : ℕ), Smith.ITape tm c i < 3) ∧ (∀ (τ : ℕ), ∃ d, Smith.inSteps BiTM.wolfram23 (Smith.istart (Smith.ITape tm c)) τ = some d ∧ (d.left = [] → (BiTM.wolfram23.transition d.state d.head).dir = TM.Dir.R)) ∧ ∀ (k : ℕ), ∃ W times, k < times k ∧ (∀ i < k, times i < times (i + 1)) ∧ ∀ (i : ℕ) (ci : BiTM.Config), i ≤ k → BiTM.nSteps tm c i = some ci → ∃ d, Smith.inSteps BiTM.wolfram23 (Smith.istart (Smith.ITape tm c)) (times i) = some d ∧ d.state = 2 ∧ ∀ (W' : ℕ), W ≤ W' → Smith.decodeTM tm.numStates (2 ^ Smith.blkW tm c k) (Smith.icBand (Smith.blkProg tm c k)) (Smith.truncI W' d) = some (TagSystem.canon ci)
theorem Smith.wolfram23_infinite_ic (tm : TM.Machine) (hwf : TagSystem.WF tm) (c : BiTM.Config) (hv : TagSystem.ValidCfg c) (hst : c.state < tm.numStates) : (∀ (i : ℕ), Smith.ITape tm c i < 3) ∧ (∀ (τ : ℕ), ∃ d, Smith.inSteps BiTM.wolfram23 (Smith.istart (Smith.ITape tm c)) τ = some d ∧ (d.left = [] → (BiTM.wolfram23.transition d.state d.head).dir = TM.Dir.R)) ∧ ∀ (k : ℕ), ∃ W times, k < times k ∧ (∀ i < k, times i < times (i + 1)) ∧ ∀ (i : ℕ) (ci : BiTM.Config), i ≤ k → BiTM.nSteps tm c i = some ci → ∃ d, Smith.inSteps BiTM.wolfram23 (Smith.istart (Smith.ITape tm c)) (times i) = some d ∧ d.state = 2 ∧ ∀ (W' : ℕ), W ≤ W' → Smith.decodeTM tm.numStates (2 ^ Smith.blkW tm c k) (Smith.icBand (Smith.blkProg tm c k)) (Smith.truncI W' d) = some (TagSystem.canon ci)
T6 (PLAN.md section 2), Smith's Conjecture 0 in infinite form, with the tape in closed form. For a well-formed binary machine `tm` and a valid configuration `c`, wolfram23 started at the left end of the tape `ITape tm c` in state B on a 2 runs forever without ever moving left from the first cell, and emulates the run of `tm` from `c`: for every `k` there are a window `W` and strictly increasing times, the last of them later than `k`, such that at time `times i` for `i <= k` wolfram23 is in state B and, whenever the `i`-th configuration of the run exists, the cells right of the head decode by `decodeTM`, with the block width `2 ^ blkW tm c k` and the band `icBand (blkProg tm c k)` of block `k`, on the window `W` and on every larger window, to that configuration (without trailing blanks). Block `k` of the tape re-emulates the first `k` steps with its own width and band, as in Smith's construction; the decoder reads only the head and the cells to its right up to the first 0.
The same with the tape, the widths and the bands existential (and the times
required to increase only while the run of tm goes on): there is one
right-infinite tape t of cells 0, 1, 2 with the clauses of
Theorem 1.2.3.
Lean code for Theorem1.2.4●1 theorem
Associated Lean declarations
-
Smith.wolfram23_infinite[complete]
-
Smith.wolfram23_infinite[complete]
-
theoremdefined in Smith/Infinite.leancomplete
theorem Smith.wolfram23_infinite (tm : TM.Machine) (hwf : TagSystem.WF tm) (c : BiTM.Config) (hv : TagSystem.ValidCfg c) (hst : c.state < tm.numStates) : ∃ t, (∀ (i : ℕ), t i < 3) ∧ (∀ (τ : ℕ), ∃ d, Smith.inSteps BiTM.wolfram23 (Smith.istart t) τ = some d ∧ (d.left = [] → (BiTM.wolfram23.transition d.state d.head).dir = TM.Dir.R)) ∧ ∀ (k : ℕ), ∃ w b W times, k < times k ∧ (∀ i < k, (BiTM.nSteps tm c (i + 1)).isSome = true → times i < times (i + 1)) ∧ ∀ (i : ℕ) (ci : BiTM.Config), i ≤ k → BiTM.nSteps tm c i = some ci → ∃ d, Smith.inSteps BiTM.wolfram23 (Smith.istart t) (times i) = some d ∧ d.state = 2 ∧ ∀ (W' : ℕ), W ≤ W' → Smith.decodeTM tm.numStates (2 ^ w) b (Smith.truncI W' d) = some (TagSystem.canon ci)
theorem Smith.wolfram23_infinite (tm : TM.Machine) (hwf : TagSystem.WF tm) (c : BiTM.Config) (hv : TagSystem.ValidCfg c) (hst : c.state < tm.numStates) : ∃ t, (∀ (i : ℕ), t i < 3) ∧ (∀ (τ : ℕ), ∃ d, Smith.inSteps BiTM.wolfram23 (Smith.istart t) τ = some d ∧ (d.left = [] → (BiTM.wolfram23.transition d.state d.head).dir = TM.Dir.R)) ∧ ∀ (k : ℕ), ∃ w b W times, k < times k ∧ (∀ i < k, (BiTM.nSteps tm c (i + 1)).isSome = true → times i < times (i + 1)) ∧ ∀ (i : ℕ) (ci : BiTM.Config), i ≤ k → BiTM.nSteps tm c i = some ci → ∃ d, Smith.inSteps BiTM.wolfram23 (Smith.istart t) (times i) = some d ∧ d.state = 2 ∧ ∀ (W' : ℕ), W ≤ W' → Smith.decodeTM tm.numStates (2 ^ w) b (Smith.truncI W' d) = some (TagSystem.canon ci)
T6 with the tape, the block widths and the bands left existential (the form of the original statement): a corollary of `wolfram23_infinite_ic`.
Theorem 1.2.3 with t = ITape tm c.
The infinite form has no budget and no hypothesis on halting. Its tape is one object
per machine and input; the parameters and the schedule vary with k, as in Smith's
construction, and block k is a closed form of tm, c and k. The chapter on
the infinite form reads it clause by clause.
1.3. What the statements do not say
-
The tapes are definitions, but no bound on their size or on the cost of writing them down is stated as a theorem. They are large: the budget of
IC tm c nisn * 15 * 2 ^ (sz c + n)cycles of a cyclic tag system with2 (1 + 84 S)appendants, and the parameters grow exponentially in the number of System 5 rules (the chapter on Conjecture 0 lists them). That they are computed without running anything is Smith's answer (p. 20-26) to "is the initial condition doing the computation". -
The times are existential. Nothing in the statement lets an observer of the wolfram23 run locate
times i, and nothing is said about what the decoder returns at other times. -
Machines are binary. The reduction of k-symbol machines to binary machines is not formalized.
-
The decoder recovers configurations up to trailing blanks (
canon). -
The conclusions alone are also met by a machine that only moves right over a tape holding the run in advance. What rules this out for wolfram23 is that the tape is the stated definition
IC tm c n(orITape tm c), built by Smith's encoders from the machine's description and the closed-form bounds, which never compute the run.
1.4. The chain
Each arrow is a forward simulation (Definition 4.2.3, the chapter on cyclic tag to System 5 for the calculus) or a functional relabeling, proved in the module named under it.
binary TM --> 2-tag --> cyclic tag --> System 5 --> System 4 --> System 3
TagSystem/CockeMinsky TagSystem/TagToCTS Smith/Conjecture5 Smith/Conjecture4 Smith/Conjecture3
TagSystem/TMToCTS Smith/ConjectureFive Smith/System4Runs Smith/ParityBlocks
Smith/System3Runs
System 3 --> System 2 --> System 1 --> System 0 == wolfram23
Smith/Systems123 (phi3, phi2, 1-or-3 steps) Smith/Wolfram23Bridge (toBi)
Systems 5 to 0 are Smith's (p. 3-5 and p. 32-35). System 0 is Wolfram's machine in Smith's notation. The composition of the cyclic-tag-to-wolfram23 half is Theorem 8.2.1; the composition with the Turing machine half is the chapter on the composition.
1.5. Axiom check
$ cat > /tmp/ax.lean <<'EOF' import Smith.Infinite #print axioms Smith.wolfram23_universal_ic #print axioms Smith.wolfram23_infinite_ic EOF $ lake env lean /tmp/ax.lean 'Smith.wolfram23_universal_ic' depends on axioms: [propext, Classical.choice, Quot.sound] 'Smith.wolfram23_infinite_ic' depends on axioms: [propext, Classical.choice, Quot.sound]
The same three axioms for the corollaries Theorem 1.2.2 and
Theorem 1.2.4, for Theorem 8.2.1, Theorem 3.5.10,
Theorem 6.7.1, Theorem 5.4.2,
Theorem 4.6.4 and Theorem 7.2.10. No sorry
anywhere in Smith/, TagSystem/, BiTM/, TM/; native_decide only in Vectors/,
which nothing imports.
1.6. How to read this blueprint
The chapters from the machine model to the composition follow the chain from the
Turing machine to wolfram23, which is the order of the composition, not the order in
which the links were proved (that order is in docs/PLAN.md section 5). Each chapter
has: an orientation paragraph; the mathematics in prose with the formal statements
linked to their declarations; notes and caveats. A reader checking a single link
needs only that chapter, its module, and the chapter on the machine model. The
chapter on open items lists what is not proved.