Wolfram (2,3) universality in Lean

8. T4: Conjecture 0 in finite form🔗

8.1. Orientation🔗

Smith/Conjecture0.lean and Smith/ClosedForm.lean compose the four chapters from cyclic tag to System 5 through System 5 to System 4, System 4 to System 3 and Systems 3, 2, 1 and 0 into Smith.conjecture0_closed: for a two-colour cyclic tag system, an initial word and a budget, the finite wolfram23 tape icStart, a definition computed from the System 5 program by closed-form bounds (Smith/RunBounds.lean), is one from which the run reproduces the working strings of the cyclic tag run at strictly increasing times, read by the decoder Smith.decodeW23, stays on the tape until then, and afterwards steps onto the cell right of the tape, a 0, in state A. This is Smith's Conjecture 0 (p. 4) "for an arbitrary number of steps", with two corrections recorded below, and with the initial condition produced as Smith produces it (p. 20-26): from a priori bounds on the run lengths, without running any system. Smith.conjecture0_finite, the form with an existential tape, is a corollary.

8.2. The statement🔗

Theorem8.2.1
Group: T4, the finite form of Conjecture 0: the composition of the links from cyclic tag to wolfram23, the pieces added to them, and the decoder of the wolfram23 tape. (17)
Group member previews
Preview
Theorem 8.2.2
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 9
Statement dependency previews
Preview
Definition 2.3.1
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 3
Reverse dependency previews
Preview
Theorem 1.2.1
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
✓L∃∀N

For a two-colour cyclic tag system C0, an initial configuration cfg and a budget N such that the run of C0 from cfg lasts the C0.appendants.length * N steps of the budget and ends in a configuration c' whose word is nonempty, write s = ctsToSystem5 C0 cfg N (Definition 4.4.9), start = icStart s (Definition 8.6.1, a wolfram23 configuration, Definition 2.3.1), w = icW s and b = icBand s. There are times times i and an exit time T such that:

  • start is valid (Definition 2.4.2) and in state A (start.state = 1);

  • the times are strictly increasing on [0, C0.appendants.length * N] and at most T;

  • at time times i the run of wolfram23 (Definition 2.4.1, Definition 2.3.4) from start is defined, and its configuration decodes by Definition 8.4.1 with the parameters 2 ^ w and b to some (dbl ci.data), the doubled working string (Definition 4.3.1) of the i-th configuration ci of the cyclic tag run;

  • for every time τ ≤ T the run is defined and biSize (Definition 2.3.5) of its configuration equals biSize start;

  • at time T + 1 the configuration is ⟨1, L, 0, []⟩ with L.length = biSize start: state A, the biSize start cells of the tape to the left of the head, the head on a 0, and no explicit cell to its right.

Lean code for Theorem8.2.1●1 theorem
  • theoremdefined in Smith/ClosedForm.lean
    complete
    theorem Smith.conjecture0_closed (C0 : TagSystem.CTS)
      (cfg : TagSystem.CTSConfig) (N : ℕ) (c' : TagSystem.CTSConfig)
      (hrun : C0.nSteps cfg (C0.appendants.length * N) = some c')
      (hne : c'.data ≠ []) :
      ∃ times T,
        BiTM.IsValidWolfram23Cfg
            (Smith.icStart (BiTM.ctsToSystem5 C0 cfg N)) ∧
          (Smith.icStart (BiTM.ctsToSystem5 C0 cfg N)).state = 1 ∧
            (∀ i < C0.appendants.length * N, times i < times (i + 1)) ∧
              (∀ i ≤ C0.appendants.length * N,
                  times i ≤ T ∧
                    ∃ ci cfgi,
                      C0.nSteps cfg i = some ci ∧
                        BiTM.nSteps BiTM.wolfram23
                              (Smith.icStart (BiTM.ctsToSystem5 C0 cfg N))
                              (times i) =
                            some cfgi ∧
                          Smith.decodeW23
                              (2 ^ Smith.icW (BiTM.ctsToSystem5 C0 cfg N))
                              (Smith.icBand (BiTM.ctsToSystem5 C0 cfg N))
                              cfgi =
                            some (Smith.dbl ci.data)) ∧
                (∀ τ ≤ T,
                    ∃ cfgτ,
                      BiTM.nSteps BiTM.wolfram23
                            (Smith.icStart (BiTM.ctsToSystem5 C0 cfg N)) τ =
                          some cfgτ ∧
                        Smith.biSize cfgτ =
                          Smith.biSize
                            (Smith.icStart (BiTM.ctsToSystem5 C0 cfg N))) ∧
                  ∃ L,
                    BiTM.nSteps BiTM.wolfram23
                          (Smith.icStart (BiTM.ctsToSystem5 C0 cfg N))
                          (T + 1) =
                        some
                          { state := 1, left := L, head := 0,
                            right := [] } ∧
                      L.length =
                        Smith.biSize
                          (Smith.icStart (BiTM.ctsToSystem5 C0 cfg N))
    theorem Smith.conjecture0_closed
      (C0 : TagSystem.CTS)
      (cfg : TagSystem.CTSConfig) (N : ℕ)
      (c' : TagSystem.CTSConfig)
      (hrun :
        C0.nSteps cfg
            (C0.appendants.length * N) =
          some c')
      (hne : c'.data ≠ []) :
      ∃ times T,
        BiTM.IsValidWolfram23Cfg
            (Smith.icStart
              (BiTM.ctsToSystem5 C0 cfg N)) ∧
          (Smith.icStart
                  (BiTM.ctsToSystem5 C0 cfg
                    N)).state =
              1 ∧
            (∀ i < C0.appendants.length * N,
                times i < times (i + 1)) ∧
              (∀ i ≤ C0.appendants.length * N,
                  times i ≤ T ∧
                    ∃ ci cfgi,
                      C0.nSteps cfg i =
                          some ci ∧
                        BiTM.nSteps
                              BiTM.wolfram23
                              (Smith.icStart
                                (BiTM.ctsToSystem5
                                  C0 cfg N))
                              (times i) =
                            some cfgi ∧
                          Smith.decodeW23
                              (2 ^
                                Smith.icW
                                  (BiTM.ctsToSystem5
                                    C0 cfg N))
                              (Smith.icBand
                                (BiTM.ctsToSystem5
                                  C0 cfg N))
                              cfgi =
                            some
                              (Smith.dbl
                                ci.data)) ∧
                (∀ τ ≤ T,
                    ∃ cfgτ,
                      BiTM.nSteps
                            BiTM.wolfram23
                            (Smith.icStart
                              (BiTM.ctsToSystem5
                                C0 cfg N))
                            τ =
                          some cfgτ ∧
                        Smith.biSize cfgτ =
                          Smith.biSize
                            (Smith.icStart
                              (BiTM.ctsToSystem5
                                C0 cfg N))) ∧
                  ∃ L,
                    BiTM.nSteps BiTM.wolfram23
                          (Smith.icStart
                            (BiTM.ctsToSystem5
                              C0 cfg N))
                          (T + 1) =
                        some
                          { state := 1,
                            left := L,
                            head := 0,
                            right := [] } ∧
                      L.length =
                        Smith.biSize
                          (Smith.icStart
                            (BiTM.ctsToSystem5
                              C0 cfg N))
    T4 (Smith's Conjecture 0 in finite form) with the initial condition,
    the block width and the band given in closed form by the System 5
    program `ctsToSystem5 C0 cfg N`, which is itself a closed form of the
    cyclic tag system, its configuration and the budget `N`. For a cyclic
    tag run that lasts the `appendants.length * N` steps of the budget and
    leaves a nonempty word: wolfram23 from `icStart` is valid and in state
    A; at strictly increasing times `times i` its tape decodes, by
    `decodeW23` with the width `2 ^ icW` and the band `icBand`, to the
    doubled working string of the `i`-th cyclic tag configuration; up to
    the exit time `T` the run stays on the explicit tape; at time `T + 1`
    the head is on the cell right of the tape, a 0, in state A. 
Theorem8.2.2
Group: T4, the finite form of Conjecture 0: the composition of the links from cyclic tag to wolfram23, the pieces added to them, and the decoder of the wolfram23 tape. (17)
Group member previews
Preview
Theorem 8.2.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 1used by 0✓L∃∀N

The same with start, w and b existential: for C0, cfg, N and c' as in Theorem 8.2.1 there are a wolfram23 configuration start, a block width 2 ^ w, a band b, times and an exit time with the five clauses of that theorem.

Lean code for Theorem8.2.2●1 theorem
  • theoremdefined in Smith/ClosedForm.lean
    complete
    theorem Smith.conjecture0_finite (C0 : TagSystem.CTS)
      (cfg : TagSystem.CTSConfig) (N : ℕ) (c' : TagSystem.CTSConfig)
      (hrun : C0.nSteps cfg (C0.appendants.length * N) = some c')
      (hne : c'.data ≠ []) :
      ∃ start w b times T,
        BiTM.IsValidWolfram23Cfg start ∧
          start.state = 1 ∧
            (∀ i < C0.appendants.length * N, times i < times (i + 1)) ∧
              (∀ i ≤ C0.appendants.length * N,
                  times i ≤ T ∧
                    ∃ ci cfgi,
                      C0.nSteps cfg i = some ci ∧
                        BiTM.nSteps BiTM.wolfram23 start (times i) =
                            some cfgi ∧
                          Smith.decodeW23 (2 ^ w) b cfgi =
                            some (Smith.dbl ci.data)) ∧
                (∀ τ ≤ 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.conjecture0_finite
      (C0 : TagSystem.CTS)
      (cfg : TagSystem.CTSConfig) (N : ℕ)
      (c' : TagSystem.CTSConfig)
      (hrun :
        C0.nSteps cfg
            (C0.appendants.length * N) =
          some c')
      (hne : c'.data ≠ []) :
      ∃ start w b times T,
        BiTM.IsValidWolfram23Cfg start ∧
          start.state = 1 ∧
            (∀ i < C0.appendants.length * N,
                times i < times (i + 1)) ∧
              (∀ i ≤ C0.appendants.length * N,
                  times i ≤ T ∧
                    ∃ ci cfgi,
                      C0.nSteps cfg i =
                          some ci ∧
                        BiTM.nSteps
                              BiTM.wolfram23
                              start
                              (times i) =
                            some cfgi ∧
                          Smith.decodeW23
                              (2 ^ w) b cfgi =
                            some
                              (Smith.dbl
                                ci.data)) ∧
                (∀ τ ≤ 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
    T4 with an existential initial condition: the form of the statement
    before the closed form, a corollary of `conjecture0_closed`. 
Proof for Theorem 8.2.2

Theorem 8.2.1 with start = icStart s, w = icW s, b = icBand s.

The budget is N cycles of the appendants; the cyclic tag run must last the appendants.length * N steps of the budget and leave a nonempty word (hne). The decoder returns the doubled working string dbl ci.data (the chapter on cyclic tag to System 5); the chapter on the composition undoubles it.

8.3. The pieces🔗

The links of the earlier chapters are composed with the following additions.

Definition8.3.1
Group: T4, the finite form of Conjecture 0: the composition of the links from cyclic tag to wolfram23, the pieces added to them, and the decoder of the wolfram23 tape. (17)
Group member previews
Preview
Theorem 8.2.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 0
Used by 2
Reverse dependency previews
Preview
Theorem 8.2.1
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
✓L∃∀N

Bound5 s B: every integer of the System 5 configuration s, in the bag and in every rule, is at most B.

Lean code for Definition8.3.1●1 definition
  • defdefined in Smith/Conjecture0.lean
    complete
    def Smith.Bound5 (s : BiTM.System5Config) (B : ℤ) : Prop
    def Smith.Bound5 (s : BiTM.System5Config)
      (B : ℤ) : Prop
    Every integer of the configuration is at most `B`. 
Lemma8.3.2
Group: T4, the finite form of Conjecture 0: the composition of the links from cyclic tag to wolfram23, the pieces added to them, and the decoder of the wolfram23 tape. (17)
Group member previews
Preview
Theorem 8.2.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 1
Used by 3
Reverse dependency previews
Preview
Theorem 8.2.1
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
✓L∃∀N

The integers of a System 5 configuration grow by at most one per step: if Bound5 s B holds and j steps of System 5 (Definition 4.4.8) from s reach s', then Bound5 s' (B + j). This bounds the terminal decrements and the band.

Lean code for Lemma8.3.2●1 theorem
  • theoremdefined in Smith/Conjecture0.lean
    complete
    theorem Smith.Bound5_nSteps (s : BiTM.System5Config) (B : ℤ) (j : ℕ)
      (s' : BiTM.System5Config) (h : Smith.Bound5 s B)
      (hs : BiTM.System5.nSteps s j = some s') : Smith.Bound5 s' (B + ↑j)
    theorem Smith.Bound5_nSteps
      (s : BiTM.System5Config) (B : ℤ) (j : ℕ)
      (s' : BiTM.System5Config)
      (h : Smith.Bound5 s B)
      (hs :
        BiTM.System5.nSteps s j = some s') :
      Smith.Bound5 s' (B + ↑j)
Proof for Lemma 8.3.2
Proof uses 2
Proof dependency previews
Preview
Definition 4.4.7
Loading preview
Proof dependency preview content is loaded from the rendered-fragment cache.

Induction on j with the one-step case Bound5_step: a step subtracts one from every bag element and adds one to every rule integer, and the pop merges the first rule into the bag by xorMerge (Definition 4.4.7), whose members all come from one of its two arguments (Lemma 8.3.3). A bound B for the program itself is exists_Bound5, from exists_int_bound.

Lemma8.3.3
Group: T4, the finite form of Conjecture 0: the composition of the links from cyclic tag to wolfram23, the pieces added to them, and the decoder of the wolfram23 tape. (17)
Group member previews
Preview
Theorem 8.2.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 1
Used by 2
Reverse dependency previews
Preview
Lemma 8.3.2
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
✓L∃∀N

Every member of xorMerge xs ys (Definition 4.4.7) is a member of xs or of ys.

Lean code for Lemma8.3.3●1 theorem
  • theoremdefined in BiTM/XorMerge.lean
    complete
    theorem BiTM.xorMerge_mem_or (xs ys : List ℤ) (x : ℤ)
      (h : x ∈ BiTM.xorMerge xs ys) : x ∈ xs ∨ x ∈ ys
    theorem BiTM.xorMerge_mem_or (xs ys : List ℤ)
      (x : ℤ) (h : x ∈ BiTM.xorMerge xs ys) :
      x ∈ xs ∨ x ∈ ys
    Every member of a `xorMerge` comes from one of the two arguments. 
Proof for Lemma 8.3.3
uses 0

Induction on ys: inserting y by xorInsert adds or removes y and leaves the membership of every other integer unchanged (xorInsert_mem_other_iff).

Smith.conjecture5_finite_exact (the chapter on cyclic tag to System 5) gives an empty rule list at the end of the budget, which the exit of the terminal phase of T2 needs. Smith.repS4_terminal (the chapter on System 5 to System 4, proved in Smith/Conjecture0.lean): with the rules exhausted, System 4 decrements (Smith.repS4_dStep) until 1 is in the bag, then exits in state C (Smith.repS4_exit), by induction on a bound of a bag element: if some bag element is at most M + 1, at most M decrements happen before the exit.

Lemma8.3.4
Group: T4, the finite form of Conjecture 0: the composition of the links from cyclic tag to wolfram23, the pieces added to them, and the decoder of the wolfram23 tape. (17)
Group member previews
Preview
Theorem 8.2.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Definition 5.2.8
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 2
Reverse dependency previews
Preview
Theorem 8.2.1
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
✓L∃∀N

The decoder of the System 5 to System 4 chapter (Definition 5.4.3, Theorem 5.4.4) below any fixed band: if c stands in RepS4 (Definition 5.2.8) to s with parameters f, j, h, and the band b lies under the debris (b + 2 * j + 2 ≤ 2 * f) and holds every bag position (2 * e - 2 < b for every e in the bag), then decodeS4 c b returns a permutation of the bag of s.

Lean code for Lemma8.3.4●1 theorem
  • theoremdefined in Smith/Conjecture0.lean
    complete
    theorem Smith.RepS4_decode_band (c : BiTM.System4Config)
      (s : BiTM.System5Config) (f j h : ℕ) (hrep : Smith.RepS4 c s f j h)
      (b : ℕ) (hb : b + 2 * j + 2 ≤ 2 * f)
      (hbag : ∀ e ∈ s.bag, 2 * e - 2 < ↑b) :
      ∃ l, Smith.decodeS4 c b = some l ∧ l.Perm s.bag
    theorem Smith.RepS4_decode_band
      (c : BiTM.System4Config)
      (s : BiTM.System5Config) (f j h : ℕ)
      (hrep : Smith.RepS4 c s f j h) (b : ℕ)
      (hb : b + 2 * j + 2 ≤ 2 * f)
      (hbag : ∀ e ∈ s.bag, 2 * e - 2 < ↑b) :
      ∃ l,
        Smith.decodeS4 c b = some l ∧
          l.Perm s.bag
    `RepS4_decode` for any band that lies under the debris and above the
    positions of the bag. 
Proof for Lemma 8.3.4
uses 0

The parity clause of RepS4 describes every position x with x + 2 * j + 2 < 2 * f, so every position below b: x is in the parity set of the leading sets exactly when x = 2 * e - 2 for a bag element e. All these positions are even, x / 2 + 1 recovers e, and the positions below b are all of them by the second hypothesis; the bag has no duplicates, so the list the decoder returns is a permutation of it.

Lemma8.3.5
Group: T4, the finite form of Conjecture 0: the composition of the links from cyclic tag to wolfram23, the pieces added to them, and the decoder of the wolfram23 tape. (17)
Group member previews
Preview
Theorem 8.2.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Definition 5.2.5
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1✓L∃∀N

For 1 ≤ f the encoder tape system5ToSystem4 s f (Definition 5.2.5) is well formed (Definition 5.5.1): its first element is not a star, no two stars are adjacent, and no set has duplicates. This is one of the three facts about the encoder tape that Lemma 6.6.5 needs.

Lean code for Lemma8.3.5●1 theorem
  • theoremdefined in Smith/Conjecture0.lean
    complete
    theorem Smith.system5ToSystem4_wellFormed (s : BiTM.System5Config) (f : ℕ)
      (hf : 1 ≤ f) : (BiTM.system5ToSystem4 s f).WellFormed
    theorem Smith.system5ToSystem4_wellFormed
      (s : BiTM.System5Config) (f : ℕ)
      (hf : 1 ≤ f) :
      (BiTM.system5ToSystem4 s f).WellFormed
Proof for Lemma 8.3.5

The tape is the set encodeBag s.bag (Definition 5.2.1), then the starred empty pairs starredEmptyPairs f, then the encoding of each rule (encodeS5RuleToS4Elems); each piece has no adjacent stars, the seams are a set followed by a star or a set, and the sets are encodeBag, an encRuleSet, an allInts block or empty, none with duplicates.

Lemma8.3.6
Group: T4, the finite form of Conjecture 0: the composition of the links from cyclic tag to wolfram23, the pieces added to them, and the decoder of the wolfram23 tape. (17)
Group member previews
Preview
Theorem 8.2.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Definition 5.2.5
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1✓L∃∀N

For 1 ≤ f the last element of the encoder tape system5ToSystem4 s f (Definition 5.2.5) is not a star. This is the second fact Lemma 6.6.5 needs.

Lean code for Lemma8.3.6●1 theorem
  • theoremdefined in Smith/Conjecture0.lean
    complete
    theorem Smith.system5ToSystem4_last_set (s : BiTM.System5Config) (f : ℕ)
      (hf : 1 ≤ f) :
      (BiTM.system5ToSystem4 s f).elems.getLast? ≠
        some BiTM.System4Elem.star
    theorem Smith.system5ToSystem4_last_set
      (s : BiTM.System5Config) (f : ℕ)
      (hf : 1 ≤ f) :
      (BiTM.system5ToSystem4 s
              f).elems.getLast? ≠
        some BiTM.System4Elem.star
Proof for Lemma 8.3.6
uses 0

With no rules the tape ends with the last starred empty pair, whose last element is a set; otherwise it ends with the encoding of the last rule, which also ends with a set (encodeS5RuleToS4Elems_getLast?).

Lemma8.3.7
Group: T4, the finite form of Conjecture 0: the composition of the links from cyclic tag to wolfram23, the pieces added to them, and the decoder of the wolfram23 tape. (17)
Group member previews
Preview
Theorem 8.2.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Definition 5.2.5
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1✓L∃∀N

If every bag entry of s lies in [1, f) and every rule entry in [0, f), then every integer e of every set of the encoder tape system5ToSystem4 s f (Definition 5.2.5) satisfies 0 ≤ e and e.toNat < 3 * f + 3. This is the third fact Lemma 6.6.5 needs: with 3 * f + 3 ≤ 2 ^ w every set integer lies below the block width.

Lean code for Lemma8.3.7●1 theorem
  • theoremdefined in Smith/Conjecture0.lean
    complete
    theorem Smith.system5ToSystem4_elem_lt (s : BiTM.System5Config) (f : ℕ)
      (hbag : ∀ e ∈ s.bag, 1 ≤ e ∧ e < ↑f)
      (hrules : ∀ r ∈ s.rules, ∀ k ∈ r, 0 ≤ k ∧ k < ↑f) (S : List ℤ) :
      BiTM.System4Elem.set S ∈ (BiTM.system5ToSystem4 s f).elems →
        ∀ e ∈ S, 0 ≤ e ∧ e.toNat < 3 * f + 3
    theorem Smith.system5ToSystem4_elem_lt
      (s : BiTM.System5Config) (f : ℕ)
      (hbag : ∀ e ∈ s.bag, 1 ≤ e ∧ e < ↑f)
      (hrules :
        ∀ r ∈ s.rules,
          ∀ k ∈ r, 0 ≤ k ∧ k < ↑f)
      (S : List ℤ) :
      BiTM.System4Elem.set S ∈
          (BiTM.system5ToSystem4 s f).elems →
        ∀ e ∈ S, 0 ≤ e ∧ e.toNat < 3 * f + 3
    Every integer of every set of the encoder output is below `3f + 3`. 
Proof for Lemma 8.3.7

Case analysis on the piece of the tape the set comes from: the bag set is an xorMerge of shifted bag entries (Lemma 8.3.3), the rule sets are xorMerges of an allInts block below 3 * f + 1 and shifted rule entries (rulePos), and the empty pairs contribute nothing.

Lemma8.3.8
Group: T4, the finite form of Conjecture 0: the composition of the links from cyclic tag to wolfram23, the pieces added to them, and the decoder of the wolfram23 tape. (17)
Group member previews
Preview
Theorem 8.2.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Definition 6.4.15
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1✓L∃∀N

At System 4's exit configuration (state C, head past the right end, active = elems.length) the relation Rep3 Closing.one of the System 4 to System 3 chapter (Definition 6.4.17, Definition 6.4.15) forces the off focus, so the System 3 configuration is ⟨L, 1, [], C⟩: the head on the closing 1 in state C, nothing to its right.

Lean code for Lemma8.3.8●1 theorem
  • theoremdefined in Smith/Conjecture0.lean
    complete
    theorem Smith.rep3_exit (c3 : Smith.LConfig) (c4 : BiTM.System4Config) (w h : ℕ)
      (hrep : Smith.Rep3 Smith.Closing.one c3 c4 w h)
      (hact : c4.active = c4.elems.length)
      (hst : c4.state = BiTM.System4State.C) :
      ∃ L,
        c3 = { left := L, head := 1, right := [], state := Smith.LState.C }
    theorem Smith.rep3_exit (c3 : Smith.LConfig)
      (c4 : BiTM.System4Config) (w h : ℕ)
      (hrep :
        Smith.Rep3 Smith.Closing.one c3 c4 w
          h)
      (hact : c4.active = c4.elems.length)
      (hst : c4.state = BiTM.System4State.C) :
      ∃ L,
        c3 =
          { left := L, head := 1, right := [],
            state := Smith.LState.C }
    At System 4's exit configuration the System 3 head is on the closing 1
    in state C. 
Proof for Lemma 8.3.8

Case analysis on the focus of the annotated configuration: with the focus on a set or a star, AC.to4 (Definition 6.4.3) puts the System 4 head inside the tape, contradicting active = elems.length; the off focus gives state C and the configuration in the shape claimed.

After the relabelings the wolfram23 step from that configuration is Smith.wolfram23_exit_step (the chapter on the machine model): B2 -> 0RA onto the implicit blank. This is Smith's exit condition, and it holds because System 3's rule C10 -> A00> reads the implicit 0 as its right neighbour.

Lemma8.3.9
Group: T4, the finite form of Conjecture 0: the composition of the links from cyclic tag to wolfram23, the pieces added to them, and the decoder of the wolfram23 tape. (17)
Group member previews
Preview
Theorem 8.2.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Definition 2.5.3
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 2
Reverse dependency previews
Preview
Theorem 7.3.11
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
✓L∃∀N

A run of any lookahead machine (Definition 2.5.3, Definition 2.5.6) never changes the length of the tape: if n steps from c reach c', then c'.toList.length = c.toList.length. Systems 3 to 0 are lookahead machines, so the System 0 run of the theorem keeps its tape.

Lean code for Lemma8.3.9●1 theorem
  • theoremdefined in Smith/Wolfram23Bridge.lean
    complete
    theorem Smith.lnSteps_length (M : Smith.LMachine) (c : Smith.LConfig) (n : ℕ)
      (c' : Smith.LConfig) (h : Smith.lnSteps M c n = some c') :
      c'.toList.length = c.toList.length
    theorem Smith.lnSteps_length (M : Smith.LMachine)
      (c : Smith.LConfig) (n : ℕ)
      (c' : Smith.LConfig)
      (h : Smith.lnSteps M c n = some c') :
      c'.toList.length = c.toList.length
    A run never changes the length of the tape. 
Proof for Lemma 8.3.9
uses 0

Induction on n with the one-step case lstep_length.

8.4. The decoder🔗

Definition8.4.1
Group: T4, the finite form of Conjecture 0: the composition of the links from cyclic tag to wolfram23, the pieces added to them, and the decoder of the wolfram23 tape. (17)
Group member previews
Preview
Theorem 8.2.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Definition 2.3.1
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 5
Reverse dependency previews
Preview
Theorem 1.2.1
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
✓L∃∀N

decodeW23 N b cfg, for a wolfram23 configuration cfg (Definition 2.3.1): the head cell and the cells right of it up to the first 0 are handed to Definition 8.4.2 with the block width N and the band b, and the bag it returns is read by Definition 4.6.5 as a working string.

Lean code for Definition8.4.1●1 definition
  • defdefined in Smith/Conjecture0.lean
    complete
    def Smith.decodeW23 (N b : ℕ) (cfg : BiTM.Config) : Option (List Bool)
    def Smith.decodeW23 (N b : ℕ)
      (cfg : BiTM.Config) : Option (List Bool)
    The decoder of the wolfram23 tape at a decoding time: the head and the
    cells right of it up to the first 0 are the blocks of the leading
    conglomerate; `decodeBlocks` reads the bag off them and `decodeBag` of
    link B reads the working string off the bag. 

The head cell and the cells right of it up to the first 0 are the blocks of the leading conglomerate (the star after the leading sets is a 0 standing in for the first cell of the next set, so the run of nonzero cells is exactly |K| * N long).

Definition8.4.2
Group: T4, the finite form of Conjecture 0: the composition of the links from cyclic tag to wolfram23, the pieces added to them, and the decoder of the wolfram23 tape. (17)
Group member previews
Preview
Theorem 8.2.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Definition 6.2.5
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1✓L∃∀N

decodeBlocks N b cells checks that the cells are 1s and 2s making up at least one whole block of width N, XORs the blocks (Definition 8.4.3, on the cells read as bits with 2 for true), takes the parity set of the XOR below b (Definition 6.2.5), and reads it as the decoder of the System 5 to System 4 chapter does: x / 2 + 1 on an even set, none otherwise.

Lean code for Definition8.4.2●1 definition
  • defdefined in Smith/Conjecture0.lean
    complete
    def Smith.decodeBlocks (N b : ℕ) (cells : List ℕ) : Option (List ℤ)
    def Smith.decodeBlocks (N b : ℕ)
      (cells : List ℕ) : Option (List ℤ)
    The blocks of the leading conglomerate, given as their cells: their XOR's
    parity set below the band `b`, read as System 5 integers by `x / 2 + 1`
    (the decoder of link C). `none` unless the cells are 1s and 2s making up
    at least one whole block and the parity set is even. 
Definition8.4.3
Group: T4, the finite form of Conjecture 0: the composition of the links from cyclic tag to wolfram23, the pieces added to them, and the decoder of the wolfram23 tape. (17)
Group member previews
Preview
Theorem 8.2.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 0used by 1✓L∃∀N

xorBlocks N k l: the XOR of the first k blocks of width N of the bit list l; the all-false block of width N for k = 0.

Lean code for Definition8.4.3●1 definition
  • defdefined in Smith/Conjecture0.lean
    complete
    def Smith.xorBlocks (N : ℕ) : ℕ → List Bool → Smith.Bits
    def Smith.xorBlocks (N : ℕ) :
      ℕ → List Bool → Smith.Bits
    The XOR of the first `k` blocks of width `N`. 
Lemma8.4.4
Group: T4, the finite form of Conjecture 0: the composition of the links from cyclic tag to wolfram23, the pieces added to them, and the decoder of the wolfram23 tape. (17)
Group member previews
Preview
Theorem 8.2.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 1used by 1✓L∃∀N

For blocks of width N, each decoding (Definition 6.4.7) to a set on the positions below k, the parity set of their XOR at a position i < k is the parity membership parMem of i in the sets.

Lean code for Lemma8.4.4●1 theorem
  • theoremdefined in Smith/Conjecture0.lean
    complete
    theorem Smith.parAt_blocks (N k : ℕ) (blocks : List (Smith.Bits × List ℤ))
      (hb : ∀ p ∈ blocks, List.length p.1 = N ∧ Smith.Decodes p.1 p.2 k)
      (i : ℕ) (hi : i < k) :
      Smith.parAt
          (List.foldr Smith.xorB (Smith.zeros N) (List.map Prod.fst blocks))
          i =
        Smith.parMem (↑i) (List.map Prod.snd blocks)
    theorem Smith.parAt_blocks (N k : ℕ)
      (blocks : List (Smith.Bits × List ℤ))
      (hb :
        ∀ p ∈ blocks,
          List.length p.1 = N ∧
            Smith.Decodes p.1 p.2 k)
      (i : ℕ) (hi : i < k) :
      Smith.parAt
          (List.foldr Smith.xorB
            (Smith.zeros N)
            (List.map Prod.fst blocks))
          i =
        Smith.parMem (↑i)
          (List.map Prod.snd blocks)
    The parity set of the XOR of blocks decoding to sets is the parity
    membership of the sets. 
Proof for Lemma 8.4.4

Induction on the list of blocks: parAt of an XOR of blocks of equal length is the XOR of the parAts (Lemma 6.2.6), and Decodes gives the parity of one block at i as membership in its set.

Lemma8.4.5
Group: T4, the finite form of Conjecture 0: the composition of the links from cyclic tag to wolfram23, the pieces added to them, and the decoder of the wolfram23 tape. (17)
Group member previews
Preview
Theorem 8.2.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 6
Statement dependency previews
Preview
Definition 2.6.1
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 2
Reverse dependency previews
Preview
Theorem 8.2.1
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
✓L∃∀N

At a System 4 configuration with the head on an element in state B that leads a block of sets K followed by a star, the configuration one step after every scheduled time of T2, decodeW23 (2 ^ w) b of the wolfram23 configuration toBi (phi2 (phi3 c3)) (Definition 2.6.1, Definition 7.2.2, Definition 7.2.3) of a System 3 configuration c3 standing in Rep3 (Definition 6.4.17) to it, for any band b ≤ h + 1, agrees with decodeS4 (Definition 5.4.3) of the block followed by decodeBag (Definition 4.6.5); the cells left of the head play no part. Moreover a 0 lies right of the head and the wolfram23 state is B.

Lean code for Lemma8.4.5●1 theorem
  • theoremdefined in Smith/Conjecture0.lean
    complete
    theorem Smith.rep3_decode (c3 : Smith.LConfig) (Lp : List BiTM.System4Elem)
      (K : List (List ℤ)) (R : List BiTM.System4Elem) (w h b : ℕ)
      (hK : K ≠ []) (hb : b ≤ h + 1) (rc : Smith.Closing)
      (hrep :
        Smith.Rep3 rc c3
          { elems := Lp ++ Smith.sets K ++ BiTM.System4Elem.star :: R,
            active := Lp.length, state := BiTM.System4State.B }
          w h) :
      Smith.decodeW23 (2 ^ w) b (Smith.toBi (Smith.phi2 (Smith.phi3 c3))) =
          (Smith.decodeS4
                { elems := Smith.sets K ++ BiTM.System4Elem.star :: R,
                  active := 0, state := BiTM.System4State.B }
                b).bind
            Smith.decodeBag ∧
        0 ∈ (Smith.toBi (Smith.phi2 (Smith.phi3 c3))).right ∧
          (Smith.toBi (Smith.phi2 (Smith.phi3 c3))).state = 2
    theorem Smith.rep3_decode (c3 : Smith.LConfig)
      (Lp : List BiTM.System4Elem)
      (K : List (List ℤ))
      (R : List BiTM.System4Elem) (w h b : ℕ)
      (hK : K ≠ []) (hb : b ≤ h + 1)
      (rc : Smith.Closing)
      (hrep :
        Smith.Rep3 rc c3
          {
            elems :=
              Lp ++ Smith.sets K ++
                BiTM.System4Elem.star :: R,
            active := Lp.length,
            state := BiTM.System4State.B }
          w h) :
      Smith.decodeW23 (2 ^ w) b
            (Smith.toBi
              (Smith.phi2 (Smith.phi3 c3))) =
          (Smith.decodeS4
                {
                  elems :=
                    Smith.sets K ++
                      BiTM.System4Elem.star ::
                        R,
                  active := 0,
                  state :=
                    BiTM.System4State.B }
                b).bind
            Smith.decodeBag ∧
        0 ∈
            (Smith.toBi
                (Smith.phi2
                  (Smith.phi3 c3))).right ∧
          (Smith.toBi
                (Smith.phi2
                  (Smith.phi3 c3))).state =
            2
    At a System 4 configuration with the head on an element in state B, that
    element leading a block of sets followed by a star, the wolfram23 decoder
    reads the tape as the decoder of link C reads the block: the cells left of
    the head play no part; a 0 (the star) lies right of the head, and wolfram23
    is in state B. 
Proof for Lemma 8.4.5
Proof uses 2
Proof dependency previews
Preview
Definition 6.4.4
Loading preview
Proof dependency preview content is loaded from the rendered-fragment cache.

The focus of the annotated configuration must be setB on the first set; the rendered tape right of the head is the cells of the blocks of K (Definition 6.4.4), all 1s and 2s, then the 0 of the star, so the takeWhile of decodeW23 cuts exactly there. decodeBlocks_of_blocks with Lemma 8.4.4 turns the parity set of the XOR into parMem on the sets of K, which is what decodeS4 computes on the leading sets.

The decoding times are therefore the T2 times plus one System 4 step, carried to System 0 by the T3 schedule.

8.5. The run bounds🔗

Lemma8.5.1
groupuses 0
Used by 4
Reverse dependency previews
Preview
Theorem 8.2.1
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
✓L∃∀N

System 4 always halts: a run of n steps from a configuration whose tape has L elements has n <= (2 L + 2) (L + 1).

Lean code for Lemma8.5.1●3 declarations
  • theoremdefined in Smith/RunBounds.lean
    complete
    theorem Smith.System4.run_bound (c : BiTM.System4Config) (n : ℕ)
      (c' : BiTM.System4Config) (h : BiTM.System4.nSteps c n = some c') :
      n ≤ (2 * c.elems.length + 2) * (c.elems.length + 1)
    theorem Smith.System4.run_bound
      (c : BiTM.System4Config) (n : ℕ)
      (c' : BiTM.System4Config)
      (h :
        BiTM.System4.nSteps c n = some c') :
      n ≤
        (2 * c.elems.length + 2) *
          (c.elems.length + 1)
    Every run of System 4 from a tape of length `L` has at most
    `(2 L + 2) (L + 1)` steps. 
  • defdefined in Smith/RunBounds.lean
    complete
    def Smith.phi4 (K : ℕ) (c : BiTM.System4Config) : ℕ
    def Smith.phi4 (K : ℕ)
      (c : BiTM.System4Config) : ℕ
    The termination measure of System 4 for tapes shorter than `K`. 
  • theoremdefined in Smith/RunBounds.lean
    complete
    theorem Smith.phi4_step (K : ℕ) (c c' : BiTM.System4Config)
      (hK : c.elems.length < K) (hs : BiTM.System4.step c = some c') :
      Smith.phi4 K c' < Smith.phi4 K c ∧
        c'.elems.length ≤ c.elems.length ∧ c'.active ≤ c'.elems.length
    theorem Smith.phi4_step (K : ℕ)
      (c c' : BiTM.System4Config)
      (hK : c.elems.length < K)
      (hs : BiTM.System4.step c = some c') :
      Smith.phi4 K c' < Smith.phi4 K c ∧
        c'.elems.length ≤ c.elems.length ∧
          c'.active ≤ c'.elems.length
    One step of System 4 lowers the measure, keeps the tape from growing and
    keeps the head on the tape or just past its end. 
Proof for Lemma 8.5.1

In state A the head moves left, in states B and C right. A leftward run ends at a star (rule 2 deletes it) or at the left end (rule 1 turns round); a rightward run ends at a star in state B (rule 4 deletes it) or at the right end. So the phase phase4, twice the number of stars plus one in state A, never increases and drops at every change of direction, and within a phase the head moves monotonically; the offset off4 is the head position while it moves left and its distance to the right end while it moves right. The measure phi4 K c = phase4 c * K + off4 K c, for K above the tape length, drops by at least one at every step and never lets the tape grow (phi4_step, by cases on the rules of Definition 5.1.1); it starts below (2 L + 2) (L + 1).

Lemma8.5.2
groupuses 1
Used by 2
Reverse dependency previews
Preview
Theorem 8.2.1
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
✓L∃∀N

System 5 halts from configurations whose bag is duplicate-free with positive elements and whose rule entries are non-negative (Inv5, kept by every step and true of the encoder's output, Inv5_ctsToSystem5): with R rules and every integer at most B (Definition 8.3.1), a run has at most B * 2 ^ R steps. maxInt5 s, the largest integer of the program, is such a B.

Lean code for Lemma8.5.2●4 declarations
  • theoremdefined in Smith/RunBounds.lean
    complete
    theorem Smith.System5.run_bound (s : BiTM.System5Config) (B : ℕ)
      (hinv : Smith.Inv5 s) (hB : Smith.Bound5 s ↑B) (n : ℕ)
      (s' : BiTM.System5Config) (h : BiTM.System5.nSteps s n = some s') :
      n ≤ B * 2 ^ s.rules.length
    theorem Smith.System5.run_bound
      (s : BiTM.System5Config) (B : ℕ)
      (hinv : Smith.Inv5 s)
      (hB : Smith.Bound5 s ↑B) (n : ℕ)
      (s' : BiTM.System5Config)
      (h :
        BiTM.System5.nSteps s n = some s') :
      n ≤ B * 2 ^ s.rules.length
    The run bound in closed form. 
  • defdefined in Smith/RunBounds.lean
    complete
    def Smith.Inv5 (s : BiTM.System5Config) : Prop
    def Smith.Inv5 (s : BiTM.System5Config) : Prop
    The invariant of System 5 runs from the encoder's output: the bag is
    duplicate-free with positive elements, the rule entries are
    non-negative. 
  • defdefined in Smith/RunBounds.lean
    complete
    def Smith.maxInt5 (s : BiTM.System5Config) : ℕ
    def Smith.maxInt5 (s : BiTM.System5Config) : ℕ
    The largest integer of a System 5 configuration, as a natural number (0
    when there is none or when all are negative); a bound computed from the
    program text, without running it. 
  • theoremdefined in Smith/RunBounds.lean
    complete
    theorem Smith.Bound5_maxInt5 (s : BiTM.System5Config) :
      Smith.Bound5 s ↑(Smith.maxInt5 s)
    theorem Smith.Bound5_maxInt5
      (s : BiTM.System5Config) :
      Smith.Bound5 s ↑(Smith.maxInt5 s)
Proof for Lemma 8.5.2

Every step either pops a rule (a P-step) or decrements the bag and increments the rules (a D-step) (step5_cases); a step raises the largest integer by at most one (Bound5_step, as in Lemma 8.3.2), and an empty bag or an empty rule list halts. With every integer at most B the bag has an element at most B, which forces a P-step within B steps (run5_phase, by induction on v for an element at most v); after it one rule fewer is left and every integer is at most 2 B. Induction on the number of rules (run5_bound) gives the bound G5 B R, with G5 B (R + 1) = B + G5 (2 B) R, which is B (2^R - 1) (G5_eq).

8.6. The closed-form initial condition🔗

Definition8.6.1
Group: T4, the finite form of Conjecture 0: the composition of the links from cyclic tag to wolfram23, the pieces added to them, and the decoder of the wolfram23 tape. (17)
Group member previews
Preview
Theorem 8.2.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 6
Statement dependency previews
Preview
Definition 2.6.1
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 4
Reverse dependency previews
Preview
Theorem 8.2.1
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
✓L∃∀N

The initial condition of T4 for a System 5 program s, computed from the text of s alone: the parameters icB to icW of the table in the proof of Theorem 8.2.1, then the System 3 rendering initAC (icW s) (icFuel s) _ _ (Definition 6.6.4) of the System 4 tape system5ToSystem4 s (icF s) (Definition 5.2.5), relabeled to System 0 (phi2 (phi3 _), Definition 7.2.2, Definition 7.2.3) and read as a wolfram23 configuration (Definition 2.6.1). No system is run: every parameter is an arithmetic expression in maxInt5 s, the number of rules and the length of the System 4 tape.

Lean code for Definition8.6.1●12 definitions
  • defdefined in Smith/ClosedForm.lean
    complete
    def Smith.icStart (s : BiTM.System5Config) : BiTM.Config
    def Smith.icStart (s : BiTM.System5Config) :
      BiTM.Config
    The closed-form initial condition of T4 for the System 5 program `s`:
    the System 3 rendering (`initAC`) of the System 4 tape of `s`, relabeled
    to System 0 and read as a wolfram23 configuration. 
  • defdefined in Smith/ClosedForm.lean
    complete
    def Smith.icB (s : BiTM.System5Config) : ℕ
    def Smith.icB (s : BiTM.System5Config) : ℕ
    The largest integer of the System 5 program. 
  • defdefined in Smith/ClosedForm.lean
    complete
    def Smith.icT5 (s : BiTM.System5Config) : ℕ
    def Smith.icT5 (s : BiTM.System5Config) : ℕ
    A bound on every System 5 run from `s`. 
  • defdefined in Smith/ClosedForm.lean
    complete
    def Smith.icM (s : BiTM.System5Config) : ℕ
    def Smith.icM (s : BiTM.System5Config) : ℕ
    A bound on the bag elements at the end of the System 5 run. 
  • defdefined in Smith/ClosedForm.lean
    complete
    def Smith.icH (s : BiTM.System5Config) : ℕ
    def Smith.icH (s : BiTM.System5Config) : ℕ
    The budget of T2: the System 5 run plus the terminal phase. 
  • defdefined in Smith/ClosedForm.lean
    complete
    def Smith.icF (s : BiTM.System5Config) : ℕ
    def Smith.icF (s : BiTM.System5Config) : ℕ
    The parameter `f` of the System 4 encoder. 
  • defdefined in Smith/ClosedForm.lean
    complete
    def Smith.icBand (s : BiTM.System5Config) : ℕ
    def Smith.icBand (s : BiTM.System5Config) : ℕ
    The band of the decoder. 
  • defdefined in Smith/ClosedForm.lean
    complete
    def Smith.icRest (s : BiTM.System5Config) : List BiTM.System4Elem
    def Smith.icRest (s : BiTM.System5Config) :
      List BiTM.System4Elem
    The System 4 tape after its first set. 
  • defdefined in Smith/ClosedForm.lean
    complete
    def Smith.icLen4 (s : BiTM.System5Config) : ℕ
    def Smith.icLen4 (s : BiTM.System5Config) : ℕ
    The length of the System 4 tape. 
  • defdefined in Smith/ClosedForm.lean
    complete
    def Smith.icT4 (s : BiTM.System5Config) : ℕ
    def Smith.icT4 (s : BiTM.System5Config) : ℕ
    A bound on every System 4 run from the tape. 
  • defdefined in Smith/ClosedForm.lean
    complete
    def Smith.icFuel (s : BiTM.System5Config) : ℕ
    def Smith.icFuel (s : BiTM.System5Config) : ℕ
    The fuel of T3: the System 4 run and the band. 
  • defdefined in Smith/ClosedForm.lean
    complete
    def Smith.icW (s : BiTM.System5Config) : ℕ
    def Smith.icW (s : BiTM.System5Config) : ℕ
    The width exponent of the parity blocks. 

8.7. The System 4 emulation🔗

Proposition8.7.1
Group: T4, the finite form of Conjecture 0: the composition of the links from cyclic tag to wolfram23, the pieces added to them, and the decoder of the wolfram23 tape. (17)
Group member previews
Preview
Theorem 8.2.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 6
Statement dependency previews
Preview
Definition 4.3.1
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 2
Reverse dependency previews
Preview
Theorem 8.2.1
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
✓L∃∀N

The System 4 half of T4, shared with the infinite form. For C0, cfg, N and c' as in the theorem and s = ctsToSystem5 C0 cfg N (Definition 4.4.9), there are an exit time T4 <= icT4 s (Definition 8.6.1) at which the System 4 run from the encoder tape system5ToSystem4 s (icF s) (Definition 5.2.5) reaches a configuration in state C with the head past the right end (active = elems.length), and strictly increasing times times i with times i + 1 <= T4 such that one step after times i the System 4 configuration is ⟨sets K ++ star :: R, 0, B⟩ for a nonempty list of sets K (the head on the first set in state B, a star after the leading conglomerate), and decodeS4 (Definition 5.4.3) of it below the band icBand s, read by decodeBag (Definition 4.6.5), is the doubled working string dbl ci.data (Definition 4.3.1) of the i-th cyclic tag configuration ci. The encoder's facts with the parameter icF s (1 <= icF s, bag entries in [1, icF s), rule entries k with k + 2 icH s < icF s) are icF_facts.

Lean code for Proposition8.7.1●1 theorem
  • theoremdefined in Smith/ClosedForm.lean
    complete
    theorem Smith.system4_emulation (C0 : TagSystem.CTS) (cfg : TagSystem.CTSConfig)
      (N : ℕ) (c' : TagSystem.CTSConfig)
      (hrun : C0.nSteps cfg (C0.appendants.length * N) = some c')
      (hne : c'.data ≠ []) :
      ∃ T4 cE times,
        T4 ≤ Smith.icT4 (BiTM.ctsToSystem5 C0 cfg N) ∧
          BiTM.System4.nSteps
                (BiTM.system5ToSystem4 (BiTM.ctsToSystem5 C0 cfg N)
                  (Smith.icF (BiTM.ctsToSystem5 C0 cfg N)))
                T4 =
              some cE ∧
            cE.state = BiTM.System4State.C ∧
              cE.active = cE.elems.length ∧
                (∀ i < C0.appendants.length * N, times i < times (i + 1)) ∧
                  ∀ i ≤ C0.appendants.length * N,
                    times i + 1 ≤ T4 ∧
                      ∃ ci K R,
                        C0.nSteps cfg i = some ci ∧
                          K ≠ [] ∧
                            BiTM.System4.nSteps
                                  (BiTM.system5ToSystem4
                                    (BiTM.ctsToSystem5 C0 cfg N)
                                    (Smith.icF
                                      (BiTM.ctsToSystem5 C0 cfg N)))
                                  (times i + 1) =
                                some
                                  {
                                    elems :=
                                      Smith.sets K ++
                                        BiTM.System4Elem.star :: R,
                                    active := 0,
                                    state := BiTM.System4State.B } ∧
                              (Smith.decodeS4
                                      {
                                        elems :=
                                          Smith.sets K ++
                                            BiTM.System4Elem.star :: R,
                                        active := 0,
                                        state := BiTM.System4State.B }
                                      (Smith.icBand
                                        (BiTM.ctsToSystem5 C0 cfg N))).bind
                                  Smith.decodeBag =
                                some (Smith.dbl ci.data)
    theorem Smith.system4_emulation
      (C0 : TagSystem.CTS)
      (cfg : TagSystem.CTSConfig) (N : ℕ)
      (c' : TagSystem.CTSConfig)
      (hrun :
        C0.nSteps cfg
            (C0.appendants.length * N) =
          some c')
      (hne : c'.data ≠ []) :
      ∃ T4 cE times,
        T4 ≤
            Smith.icT4
              (BiTM.ctsToSystem5 C0 cfg N) ∧
          BiTM.System4.nSteps
                (BiTM.system5ToSystem4
                  (BiTM.ctsToSystem5 C0 cfg N)
                  (Smith.icF
                    (BiTM.ctsToSystem5 C0 cfg
                      N)))
                T4 =
              some cE ∧
            cE.state = BiTM.System4State.C ∧
              cE.active = cE.elems.length ∧
                (∀
                    i <
                      C0.appendants.length *
                        N,
                    times i < times (i + 1)) ∧
                  ∀
                    i ≤
                      C0.appendants.length *
                        N,
                    times i + 1 ≤ T4 ∧
                      ∃ ci K R,
                        C0.nSteps cfg i =
                            some ci ∧
                          K ≠ [] ∧
                            BiTM.System4.nSteps
                                  (BiTM.system5ToSystem4
                                    (BiTM.ctsToSystem5
                                      C0 cfg
                                      N)
                                    (Smith.icF
                                      (BiTM.ctsToSystem5
                                        C0 cfg
                                        N)))
                                  (times i +
                                    1) =
                                some
                                  {
                                    elems :=
                                      Smith.sets
                                          K ++
                                        BiTM.System4Elem.star ::
                                          R,
                                    active :=
                                      0,
                                    state :=
                                      BiTM.System4State.B } ∧
                              (Smith.decodeS4
                                      {
                                        elems :=
                                          Smith.sets
                                              K ++
                                            BiTM.System4Elem.star ::
                                              R,
                                        active :=
                                          0,
                                        state :=
                                          BiTM.System4State.B }
                                      (Smith.icBand
                                        (BiTM.ctsToSystem5
                                          C0
                                          cfg
                                          N))).bind
                                  Smith.decodeBag =
                                some
                                  (Smith.dbl
                                    ci.data)
Proof for Proposition 8.7.1
Proof uses 9
Proof dependency previews
Preview
Definition 4.4.6
Loading preview
Proof dependency preview content is loaded from the rendered-fragment cache.

The System 5 run of T1 exact (Theorem 4.6.4) lasts t5 n steps, at most icT5 s by Lemma 8.5.2; every inequality T2 (Theorem 5.4.2) and the terminal phase (Theorem 5.3.3.2) put on their parameters holds for any value at least the exact run length, so they hold with the bounds. At the end of the budget the rule list is empty, and by Lemma 8.3.2 some bag element is at most icM s + 1, which bounds the terminal decrements; the exit time T4 = t4 (t5 n) + k is at most icT4 s by Lemma 8.5.1. At the T2 time t4 (t5 i) the tape stands in RepS4 (Definition 5.2.8) with the head on the first set in state A; one step (step_setA_zero) turns it to state B, and the star after the leading sets is the first element of the starred empty pairs. Lemma 8.3.4 reads the bag below the band and the Represents relation of T1 (Definition 4.4.6, decodeBag_of_perm) reads the doubled working string off it.

8.8. The parameter choices, and what they mean🔗

Proof for Theorem 8.2.1
Proof uses 23
Proof dependency previews
Preview
Definition 2.5.9
Loading preview
Proof dependency preview content is loaded from the rendered-fragment cache.

The proof composes the finite forms by their schedules rather than by ForwardSim_comp (Lemma 4.2.4), because the fuel lives in a different source system at each link. Write n for C0.appendants.length * N and s for the System 5 program. Each parameter is a closed form of s and of the ones before it, with a bound in place of each run length:

parameter

closed form

why

icB s

maxInt5 s, the largest integer of the program

a bound on the integers of the program (Definition 8.3.1, Bound5_maxInt5)

icT5 s

icB s * 2 ^ s.rules.length

above the System 5 run length t5 n (Lemma 8.5.2)

icM s

icB s + icT5 s

by Lemma 8.3.2 some bag element is at most icM s + 1 at the end of the run, so at most icM s terminal decrements happen

icH s

icT5 s + icM s + 1

T2's budget: the run plus the terminal phase

icF s

icB s + 2 * icH s + 2 * icT5 s + 5

T2's bounds e < f, k + 2 * H < f and 2 * H < f (Theorem 5.4.2)

icBand s

2 * icF s - 2 * icT5 s - 2

the band lies under the debris for every j ≤ t5 n and above every bag position (Lemma 8.3.4)

icT4 s

(2 L + 2) (L + 1) for the length L = icLen4 s of system5ToSystem4 s (icF s)

above the System 4 exit time T4 (Lemma 8.5.1)

icFuel s

icT4 s + icBand s

T3's fuel must cover the System 4 run and the band

icW s

Nat.size (icFuel s + 3 * icF s + 6), the bit length

x < 2 ^ Nat.size x covers h4 + 3 ≤ 2 ^ w and 3 * f + 3 ≤ 2 ^ w (every set element below the width); the block width 2 ^ w is at most twice h4 + 3 f + 6, so the System 3 tape is linear, not exponential, in the System 4 data

Proposition 8.7.1 supplies the System 4 run, its exit at T4 <= icT4 s and its decoding events. The hypotheses of T3 (Theorem 6.7.3) on the encoder tape are supplied by Lemma 8.3.5, Lemma 8.3.6 and Lemma 8.3.7.

The tape start is toBi (Definition 2.6.1) of the relabeling phi2 (phi3 _) (Definition 7.2.2, Definition 7.2.3) of the System 3 tape initAC w h4 _ _ (Definition 6.6.4) built from the encoder tape, which is icStart s by definition; it is valid because its state is not C (toBi_valid, phi2_state_ne_C), and it is in state A. With times0 the T3 schedule, the decoding times are times0 (t4 (t5 i) + 1), one System 4 step after each T2 time; there Lemma 8.4.5 (through rep3_decode_zero) turns decodeW23 into decodeS4 followed by decodeBag, and Lemma 8.3.4 with the Represents relation of T1 (Definition 4.4.6, decodeBag_of_perm) gives the doubled working string. The exit time is T = times0 T4.

Confinement: the System 0 run (Definition 2.5.9) is defined at every time up to T (StepSys.nSteps_some_of_le) and keeps its tape length (Lemma 8.3.9); Theorem 2.6.6 carries it to the wolfram23 run, and biSize_toBi turns the length into biSize. Exit: at T4 System 4 is at its exit configuration, so Lemma 8.3.8 puts the System 3 head on the closing 1 in state C; phi_exit relabels this to ⟨L.map sw, 2, [], B⟩, and the next wolfram23 step is Lemma 2.6.7 onto the implicit blank, which is the new cell 0 right of the tape.

The tape is thereby a definition of the program: the encoder does no computation beyond writing down the encodings and evaluating these expressions. This answers the Pratt-style objection the way Smith does (he computes f and w from an a priori bound on the System 5 finish time, 3^(n-1) M, p. 20-21, and argues on p. 22-26 that the initial condition is produced by an obviously non-universal algorithm). The bounds here are coarser than Smith's (B 2^R for System 5, quadratic in the tape length for System 4) but play the same role; no theorem yet bounds the size of the tape (open items).

8.9. Corrections to Smith's statement🔗

  • The head does not start on the leftmost cell of the tape but on the first cell of the first block, as in Smith's s42s0-3.pl output; the leftmost cell is a 0, as the conjecture says, but the tape started on it in state A walks off its left end in three steps (the chapter on System 4 to System 3).

  • The run must be assumed to last the budget without emptying the word: an emptied word empties the System 5 bag, System 4 then sweeps forever and never exits.

8.10. Notes and caveats🔗

  • "Never visits a cell outside the tape" is biSize constant, since a wolfram23 step onto an implicit blank grows the explicit tape and the zipper run is defined (Smith.lnSteps_length, Smith.toBi_run).

  • The times times and T are existential (only the tape is in closed form), with no event in the wolfram23 run that marks them. Nothing is stated about decodeW23 at other times; on the D9 test tape it returns some at several unscheduled times as well.

  • The D9 vectors of Vectors/SmithVectors.lean exercise decodeW23 on System 3 tapes built by initAC, with negative instances (a state-A head, an odd parity position, a tape without whole blocks). No vector runs conjecture0_closed end to end; with w = icW s the block width of the smallest instance is far beyond decide. Vectors/ClosedFormVectors.lean checks the run bounds against the exact run lengths on the programs of D1 and D4 and evaluates the closed-form parameters of D4.

8.11. Depends on🔗

The modules are Smith/Conjecture0.lean (Smith.Conjecture0), which imports Smith.Conjecture3, Smith.ConjectureFive and Smith.Wolfram23Bridge, Smith/RunBounds.lean (the run bounds) and Smith/ClosedForm.lean (the closed-form initial condition, system4_emulation and the two statements). The chapter depends on the four chapters from cyclic tag to System 5 through System 5 to System 4, System 4 to System 3 and Systems 3, 2, 1 and 0, whose finite forms and relations it composes, and on the machine model for the bridge from System 0 to wolfram23.