/machines/1RB0LD_1RC0RA_1RD1RF_1LA0LE_1RE1LD_0RB---/submission/proof.md · raw

1RB0LD_1RC0RA_1RD1RF_1LA0LE_1RE1LD_0RB---: never halts

This machine never halts. Its tape holds a marker on the left, followed by a list of pairs: each pair is two blocks of cells plus one binary digit. Read together, the digits form a binary counter, and the machine counts it down by one at a time.

Each decrement updates the pairs up to the lowest digit 1. In every updated pair, one block grows by one unit and the other shrinks by one. When the shrinking block of the last updated pair runs out, that pair fuses with the next one.

When the counter reaches zero, the machine adds a short tail. When it reaches zero again, it regroups the blocks into new pairs, adds one more pair and starts the next countdown.

A few rare shapes of the tape are not covered by these rules, and some of them halt. The proof tracks how much room every block has left, and shows that the run never reaches such a shape.

Machine and status

Template

The template is verify/SBCv6.v, Module TM21 (1RB1LB_0LC1RD_0RA1LC_0RB1RE_0RD0LF_---1LE), as a loose template only. TM21 is a different machine; apart from A0 = 1RB no transition is shared.

What carries over is the architecture:

It differs from TM21 in four ways:

  1. The macro step is one decrement, not a whole countdown (TM21's LIncs).
  2. A pair whose q-block runs out mid-countdown fuses with the next pair. Here that is routine; TM21's LWF (q ≥ 2^len) rules it out.
  3. Every pair carries a binary digit.
  4. A second tail shape gives a detour (the rules X1 and X2).

TM21's LWF is replaced by the invariant J (§4).

Where each section lives in the .v

The full map is in §4.

section in the .v
§1 sd, RP, RT, K
§2 the 14 sweep lemmas Start … X2T; the list sweeps PassesR, PassesL, OvPasses; the rules Dec, DecMerge, DecMergeTail, DecMergeEmpty, EndR, EndLast, X2, Ov, X1
§3.1 nonhalt
§3.2 dv and its lemmas
§3.3 and §3.8 the invariant J (PN, PI, TC, AllI) and the base J_base
§3.4, §3.5 and §3.8.4 Jstep, with the inv_* and ob_* lemmas
§3.7 init0, init

Overview

Summary

The tape is a binary down-counter over a list of pairs, behind a left marker (§1). Write (10)^p for p copies of 10, and s(d) for the digit block of the digit d (defined in §1). A pair and the left marker are

pair [p,q,d] = (10)^p (01)^q s(d)
left marker  = (10)^h 11001

The p-block of a pair is its (10)^p part, and its q-block is its (01)^q part.

Each decrement (a step of the Dec family) subtracts 1 from the counter. It touches the pairs up to the borrow pair; a touch turns (p, q, d) into (p+1, q−1, digit flipped). A borrow pair whose q-block runs out fuses with the next pair.

At counter 0 an End sweep adds a tail. At the next 0 an overflow re-pairs the blocks as (q_j, p_{j+1}), adds a pair and resets h to 2.

When the top two pairs both reach q = 1 at counter 0 (rare), the run detours through a second tail shape (X1, X2).

Nine macro rules (§2) cover every configuration of the family except a few outside shapes, some of which halt. The proof shows that the run never reaches one.

The proof idea

  1. The run alternates between two kinds of cycle: an E-cycle, which contains End, and an L-slot, which contains EndLast or ends with X1.

A re-pairing swaps the roles of p-blocks and q-blocks, so every block has a fixed class:

  1. The far end of the list reduces to a four-way case split on one number x ≥ 3 (§3.4).

  2. Both facts are packaged as a threshold invariant, INV+(e), on the configuration at the start of each E-cycle (§3.3, §3.8.1). Its constants are explicit: 5, 4, 3 and powers of two.

From a start that satisfies it, one cycle pair stays inside the rules and reaches a start that satisfies it again (§3.8). It holds at the E-start reached after 78,710 steps.

  1. The .v proves this in a per-step form. A ghost-phase invariant J, stated on projected values that a touch leaves unchanged, is preserved by every macro rule (Jstep).

At every E-start, J implies clauses (b)–(e) of INV+(e) and a weaker form of (a) (§3.8.5, §4).

0. Machine and the halting transition

0 1
A 1RB 0LD
B 1RC 0RA
C 1RD 1RF
D 1LA 0LE
E 1RE 1LD
F 0RB ---

Only C1 enters F, and only B0 enters C. So the machine halts exactly when it reaches B> 0 1 1 (the head in state B, reading the 0).

1. Family

A pair block and a digit block are

[p,q,d] := (10)^p (01)^q s(d)        s(1) := 0001,  s(0) := 0010

The family is

K(h; P; T) := 0^inf <A (10)^h 11001 [p_1,q_1,d_1] [p_2,q_2,d_2] ... [p_L,q_L,d_L] T 0^inf

  P = ((p_j,q_j,d_j))_{j=1..L},  L >= 1,  p_j >= 1,  q_j >= 1,  d_j in {0,1},  h >= 0
  T in { -,  T1(t) := (10)^t 1  (t >= 1),  T2(k) := (101)^2 (01)^k  (k >= 1) }
  V := sum_j d_j 2^(j-1)        (binary number; d_1, next to the head, is the least significant digit)

The head is in state A on the blank cell just left of the word. Every K reached from the blank tape has h ≡ 2 (mod 4), but the rules hold for every h ≥ 0.

A touch of pair j is the update

(p_j, q_j, d_j) -> (p_j+1, q_j-1, 1-d_j)

On the tape, the (10)|(01) split moves 2 cells to the right and the digit block flips. A touch is of one of two kinds:

2. Rules (macro steps; each is an exact run of at least 1 step from one K to the next)

Notation used in the rules:

The rules cover every K, except the "outside" cases listed after the table.

Let k := least j with d_j = 1 (when V > 0).

Dec_k          q_1..q_{k-1} >= 2, q_k >= 2:
  0^inf <A (10)^h 11001 Π_{j<k}[p_j,q_j,0] [p_k,q_k,1] R 0^inf
  --> 0^inf <A (10)^(h+4) 11001 Π_{j<k}[p_j+1,q_j-1,1] [p_k+1,q_k-1,0] R 0^inf

DecMerge_k     q_1..q_{k-1} >= 2, q_k = 1, k < L:
  ... Π_{j<k}[p_j,q_j,0] [p_k,1,1] [p',q',d'] R
  --> 0^inf <A (10)^(h+4) 11001 Π_{j<k}[p_j+1,q_j-1,1] [p_k+p'+3, q', d'] R

DecMergeTail   q_1..q_{L-1} >= 2, k = L, q_L = 1, T = T1(t):
  ... Π_{j<L}[p_j,q_j,0] [p_L,1,1] (10)^t 1 0^inf
  --> 0^inf <A (10)^(h+4) 11001 Π_{j<L}[p_j+1,q_j-1,1] (10)^(p_L+t+3) 1 0^inf

DecMergeEmpty  as DecMergeTail but T = -:          ... [p_L,1,1] 0^inf --> ... (10)^(p_L+2) 1 0^inf

End            V = 0, T = -, all q_j >= 2:
  0^inf <A (10)^h 11001 Π_{j<L}[p_j,q_j,0] [p_L,q_L,0] 0^inf
  --> 0^inf <A (10)^(h+4) 11001 Π_{j<L}[p_j+1,q_j-1,1] [p_L+1,q_L-1,0] (10)^1 1 0^inf

EndLast        V = 0, T = -, q_1..q_{L-1} >= 2, q_L = 1:
  --> 0^inf <A (10)^(h+4) 11001 Π_{j<L}[p_j+1,q_j-1,1] (10)^(p_L+4) 1 0^inf

Ov             V = 0, T = T1(t), p_1 >= 2:
  0^inf <A (10)^h 11001 Π_{j<=L}[p_j,q_j,0] (10)^t 1 0^inf
  --> 0^inf <A (10)^2 11001 [h+5, p_1-1, 0] Π_{j=1..L-1}[q_j, p_{j+1}, 1] [q_L, t+1, 1] 0^inf

X1             V = 0, T = -, L >= 3, q_1..q_{L-2} >= 2, q_{L-1} = q_L = 1, p_1 >= 2:
  0^inf <A (10)^h 11001 Π_{j<=L}[p_j,q_j,0] 0^inf
  --> 0^inf <A (10)^2 11001 [h+5, p_1-1, 0] Π_{j=1..L-3}[q_j, p_{j+1}, 1] [q_{L-2}, p_{L-1}, 0] (101)^2 (01)^(p_L+3) 0^inf

X2             V = 0, T = T2(k), all q_j >= 2:
  0^inf <A (10)^h 11001 Π_{j<=L}[p_j,q_j,0] (101)^2 (01)^k 0^inf
  --> 0^inf <A (10)^(h+4) 11001 Π_{j<L}[p_j+1,q_j-1,1] [p_L+1,q_L-1,0] [3, k, 1] 0^inf

In words:

Physically, a decrement is three short bounces at the left end followed by one sweep to the borrow pair and back.

Outside cases are the K for which no rule above applies:

At least (o1), (o3) and (o6) can halt (direct simulation):

case configuration halts after
(o1) K(6; (5,1,0),(7,4,1); −) 1,480 steps
(o3) K(2; (6,1,0),(5,8,0),(11,2,0),(12,3,0); −) 1,554 steps
(o6) K(6; (9,1,0),(5,4,0); T2(5)) 1,684 steps

In random samples, 45 of 56 (o1) instances, 24 of 35 (o3) and 27 of 44 (o6) halted. The others jump to an unrelated K.

Either way, the proof must keep the orbit out of (o1)–(o7), and it does so without using what the machine does there.

3. Argument

3.1 Reduction

Let D be the set of K that some rule covers, and let

K0 := K(2; (11,11,0); -)

Suppose every K reached from K0 is in D. Then the run is an infinite chain of rule applications, each taking at least 1 step, so the machine never halts. This is multistep_nonhalt + progress_nonhalt_cond (§4).

The halting cell B> 0 1 1 is never presented: each rule is an exact computation from K to K, and the machine halts only on reading F1.

Two facts hold at all times:

Everything else, including L ≥ 3 (which rules out (o7) and the L condition of (o4)), is part of the invariant INV+(e) below (§3.3, stated in full in §3.8).

3.2 Counter lemmas

This subsection states six lemmas, L1–L6. Below, v₂(x) is the exponent of the largest power of 2 that divides x.

L1 (touch counts). In a countdown from V:

After a merge at pair k from counter x, with H = ⌊x/2^k⌋, the counter is V' instead of x − 1:

V'    = 2^(k−1) − 1 + H·2^(k−1)      (after the merge)
x − 1 = 2^(k−1) − 1 + H·2^k          (after a plain decrement)

L2 (parity). A touch preserves q+d mod 2, p+d mod 2 and p+q.

L3 (cycle touches). Define the two cycle types as in §3.3. Within each type, the touch counts are exact as long as no merge occurs. With e the depth defined in §3.3, write

τ_j := 3·2^(e) − 1      for j ≥ 2
τ_1 := 3·2^(e) − 2
cycle macro steps touches of pair j
E, T = − (L pairs) countdown from 2^L − 2, End, countdown from 2^(L−1) − 1, Ov τ_j with e = L − j; the last pair gets 2
E, T = T2 (L pairs, then L+1) countdown from 2^(L−1) − 2, X2, countdown from 3·2^(L−1) − 1, End, countdown from 2^L − 1, Ov τ_j with e = L+1−j; the appended pair gets 2
L-slot, EndLast (M pairs) countdown from 2^M − 2, EndLast, countdown from 2^(M−1) − 1, Ov 3·2^(M−j) − 1 (pair 1: 3·2^(M−1) − 2); the last pair gets 1 and is absorbed
L-slot, X1 (M pairs) countdown from 2^M − 2, X1 2^(M−j+1) − 1 (pair 1: 2^M − 2)

At the closing Ov of an E-cycle,

h + 5 = 2 + 4τ_1 + 5 = 3·2^(L*+1) − 1

Each row is a sum of ⌊V/2^(j−1)⌋ terms from L1. For example, the first row for j ≥ 2 is (2^(L−j+1) − 1) + 1 + (2^(L−j) − 1).

L4 (parity across a re-pairing). At an Ov all d_j = 0. The Ov sends p_j to q_j and q_j to p_{j+1}, and its new pairs j ≥ 2 get d = 1. Therefore:

X1 acts the same way, except on its top pair [q_{L−2}, p_{L−1}, 0]. There d = 0, so a good q-block arrives as a p-block with p+d even. The following X2 adds 1 to that p and leaves d = 0, which makes p+d odd again.

L5 (merges never hurt a p-block, in scaled terms). Let pair i hold a p-block during an L-slot, with current value A, depth e and remaining touches R.

Here R and e are what the block would get if no further merge happened. They are defined by an explicit formula (the potential s_i of §3.8.2), which also makes sense in x = 3 and x = 5 slots, where every real run merges at the far end.

Let a DecMerge or DecMergeTail occur at a pair k > i. By the counter formula in L1, the remaining touches afterwards satisfy

R' = R/2 + 2^(k−i−1) − 1 ≥ R/2

Here R counts the touch of the merge step itself. This holds for both countdowns: the EndLast touch plus the second countdown, 2^(M−i) touches, becomes 2^(M−1−i).

The block gains the touch of the merge step, and its depth becomes e − 1. So its end-of-slot scaled value satisfies

(A + 1 + R')/2^(e−1) = (A + R)/2^e + (A + 2^(k−i))/2^e,   which is more than   (A + R)/2^e + A/2^e

By induction over the merges, a merge to the right never lowers a p-block's end-of-slot scaled value, and it adds more than A/2^e. The exact statement and proof are L5' in §3.8.2.

L6 (pair-1 touches in an L-slot). Take a countdown that starts at counter V₀ on n₀ pairs and ends at V = 0 on N pairs after m merges. Its number of steps D satisfies

D ≥ V₀ − 2^(n₀) + 2^N + m

So an L-slot that ends with L*' touches pair 1 at least 2^(L*') − 2 times (3·2^(L*'−1) − 2 if it is an EndLast slot). The proof is in §3.8.2. This lemma preserves clause (e).

3.3 Cycles, classes and the invariant

A cycle is the run of macro steps from one re-pairing (Ov or X1) to the next. Its start is the K right after the re-pairing. There are two types:

§3.4 shows that every cycle is exactly one of these and that the two types alternate.

Classes. A re-pairing swaps roles (p_j → q_j, q_j → p_{j+1}). Merges keep roles: two p-blocks fuse into a p-block. So, given the alternation, every block has a fixed role in all E-cycles:

All parity defects sit in Eq blocks (INV(c)). Merges are run-outs of Ep blocks, which are good. So no q-defect ever runs out on the orbit (§3.6).

Depth and scaled value at an E-start. Let L be the number of pairs. Pair j has a depth e_j and a scaled value r_j:

L*  := L + 1  if T = T2  (X2 will append a pair),   L* := L  otherwise
e_j := L* − j
r_j := q_j / 2^(e_j)           for j ≥ 2
r_1 := (q_1 + 1) / 2^(e_1)

With this convention, pair j runs out in the E-cycle only if r_j < 3 (L3).

INV+(e) (at an E-start). We write INV for clauses (a)–(d), and INV+(e) for all five. §3.8.1 restates them as integer inequalities.

Clause (e) is needed: INV alone is not inductive (examples in §3.8.1). Clause (e) is what makes pairs 1 and 2 survive the L-slot (§3.8.3).

Theorem. If INV+(e) holds at an E-start, then every K up to the next E-start is in D, and INV+(e) holds again there (proof: §3.4–3.5, collected and completed in §3.8.4).

INV+(e) holds at the E-start after overflow 6 (step 78,710):

K(2; (95,68,0),(34,33,1),(10,15,1),(1,24,1); −)

There r = 8.625, 8.25, 7.5, L* = 4, p_1 = 95 ≥ 63 and p_2 = 34 ≥ 16.

Every K from K0 to that point is in D by exact computation (§3.7). So every reachable K is in D, and the machine never halts (§3.1).

3.4 One cycle pair, given INV+(e)

S1 (the E-cycle). This part uses only (a) and (b).

S2 (the L-slot). It starts with M = L* + 1 ≥ 4 pairs, digits (0,1,…,1) and T = −. The blocks are:

The first countdown runs from 2^M − 2:

x what happens at the far end next
3 3rd touch runs it out on an end touch: DecMerge at M−1 gives [p_{M−1}+t₀+6, 1, 0], with p_{M−1} the x-pair's p at the L-start; at V = 0 the pair before has good q, d = 0, so q ≥ 2: EndLast regular E-start
4 q = 1 after 3 touches, q_M = 1: X1 (M ≥ 4, p_1 ≥ 7, other q even ≥ 2) T2 start, T2(p_M+3) with p_M ≥ 2
5 q = 2 at V = 0: EndLast (pass touch, q = 1); the end touch in the second countdown runs it out: DecMergeTail regular E-start
≥ 6 EndLast, then one end touch: q = x − 5 ≥ 1 survives regular E-start, x' = x − 3
(2) would meet the pass touch with q = 1, which is (o1); excluded by x ≥ 3

Indices M−1 and M are those at the L-start. Earlier interior merges shift both pairs down by one index each, but by L1 they change nothing else, so the table is stated relative to the current top two pairs.

The table agrees with the abstract run (the exact macro rules) for x = 1..15 (§5).

The second countdown (after EndLast, all digits 1) touches each pair at most as often as L3 says (L1):

The slot ends with V = 0 and T = T1(t), t ≥ 5 (EndLast gives t = p+4 ≥ 5, and DecMergeTail only adds). So Ov applies (p_1 ≥ 7), and the next start is regular, with far pair (q, t+1, 1), where q ≥ 1 and t+1 ≥ 6.

This proves INV(a), and the alternation:

3.5 INV(b)–(e) carry over (narrative; the complete proof is §3.8.4)

Persisting Eq block, at interior pair j of an E-start with value Q and depth e:

The thresholds then work out as follows:

New Eq block from the head.

New Eq block from a fusion.

This proves INV(b) at the next E-start.

INV(c). An interior p-block at an E-start is an Ep block. Only the head creates new ones, as the p_1 = h+5 of a regular start, which is odd with d = 0:

L4 carries goodness across every Ov and X1, with the T2-start exception already in the statement of INV(c).

INV(d) and (e). At an L-start, q_1 and q_2 are the two newest Ep blocks. Clause (e) bounds them, and their survival follows from (e) alone (§3.8.3):

Neither runs out, so pairs 1 and 2 survive every slot. Because M ≥ 4, these pairs are distinct from the far pairs, and the next start has L* ≥ 3.

After X1 the bound is L*' ≥ 4 rather than L*' = M, because interior merges can lower it; pairs 1 and 2, the x-pair and the last pair are all present at X1. Clause (e) carries over by L6 (§3.8.4).

3.6 Consequences: defects, the far end, and why this is not a cryptid

3.7 Initial segment and base case

0^inf A> 0^inf reaches K0 = K(2; (11,11,0); −) after exactly 956 steps (direct simulation). Three earlier configurations parse as K:

step configuration remark
8 K(0; −; −) L = 0
275 K(2; (7,1,0); −) in D: EndLast applies and predicts the next configuration exactly
451 K(6; −; T1(11)) that successor of step 275; it has L = 0 and is outside D

So the machine passes through L = 0 before K0, and the argument starts at K0. From K0 the rules apply at once: End at step 1240, then Ov at step 1845.

Overflows 1–6 follow at these steps:

overflow 1 2 3 4 5 6
step 1845 4610 8319 19436 34137 78710

Every transition from step 956 to 3·10^7 is the one the rules predict (§5). The base E-start, after overflow 6, satisfies INV+(e) (§3.3, §3.8.1).

In the .v, two lemmas cover this segment, and each is one esx run:

init0 : c0 -->* K 2 [(11,11,false)] TN      (K0, 956 steps)
init  : c0 -->* K 2 base TN                 (the base E-start above, 78,710 steps)

nonhalt uses init, so no chain of rule applications from K0 to the base is needed.

3.8 INV+(e): statement, lemmas and preservation proof

This subsection is self-contained. It restates the invariant and proves the lemmas it needs. It then gives the complete argument that one cycle pair stays in D and re-establishes the invariant.

§3.4–3.5 are the narrative version; where they differ, this subsection is authoritative.

3.8.1 Statement

The setting is an E-start K(h; P; T) with L pairs. Let

L*  := L + [T = T2]          ([T = T2] is 1 if T = T2, and 0 otherwise)
e_j := L* − j

The interior pairs are j = 1..L*−1. INV+(e)(K) is the conjunction of:

In scaled terms, r_j ≥ θ.

At the base E-start

K(2; (95,68,0),(34,33,1),(10,15,1),(1,24,1); −)

L* = 4, and every clause holds:

At regular starts the proof actually gives p_1 ≥ 3·2^(L*+1) − 1, which is tight at the base (95). The uniform (e1) is all the proof needs.

Clause (e) is needed. Each configuration below satisfies (a)–(d) and has no empty block, but violates (e). Within one cycle pair, the run leaves D or reaches an E-start where INV+(e) fails.

None of them is reachable from the blank tape (there p_1 ≥ 2^(L*+2) − 1), and the machine runs on past each of these failures. They are failures of the argument under (a)–(d) alone, not halting configurations.

  1. L* = 3; violates (e1) and (e2).

start: K(2; (7,19,0),(2,10,1),(1,6,1); −) L-start: K(2; (47,16,0),(9,7,1),(5,3,1),(4,2,1); −) with x = 3

DecMerges at k = 3 and then k = 2 lead to EndLast with L = 1, then DecMergeTail, then K(66; −; T1(102)): L = 0, (o7).

  1. L* = 4; violates (e1) and (e2).

start: K(2; (7,39,0),(2,20,1),(2,10,1),(2,6,1); −)

DecMerges at k = 2, 2 and 1 give K(114; (183,1,0),(5,1,0); −): the X1 shape with L = 2, (o4).

  1. Violates (e1).

start: K(2; (7,15,0),(8,8,0); T2(4))

After one cycle pair it reaches K(2; (83,80,0),(2,18,1); −), with L* = 2, so (d) fails.

  1. At threshold with L* = 20; violates (e1) and (e2).

p = (7, 2, …, 2, 1) q = (5·2^19 − 1, 5·2^18, …, 10, 6)

One cycle pair later the run reaches (o7).

  1. Both halves of (e) are needed:

Theorem (cycle pair). Suppose INV+(e)(K) holds at an E-start K. Follow the macro steps from K through the next two re-pairings. Then:

There are at least two macro steps, and each one takes at least one machine step.

3.8.2 Counter facts, and the lemmas L6 and L5'

A countdown is a maximal run of Dec-family steps (Dec, DecMerge, DecMergeTail). During a countdown, the digits form a counter on the current n pairs:

V = Σ d_j 2^(j−1),      0 ≤ V ≤ 2^n − 1

A step at counter value x > 0 has borrow pair k = v₂(x) + 1 and touches pairs 1..k. Write

x = H·2^k + 2^(k−1),      H := ⌊x/2^k⌋      (H = 0 when k = n)

Three facts follow:

Lemma L6. Let a countdown start at V₀ on n₀ pairs and end at V = 0 on N pairs, after m merges and D steps in all. Then

D ≥ V₀ − 2^(n₀) + 2^N + m

Proof. Let

Φ := (steps so far) + V − 2^n
  1. A plain Dec leaves Φ unchanged.
  2. A merge at k from x = H·2^k + 2^(k−1) changes Φ by 1 + V' − x + 2^(n−1) = 2^(n−1) − H·2^(k−1).
  3. Because x ≤ 2^n − 1, we have H ≤ 2^(n−k) − 1, so the change is at least 2^(k−1) ≥ 1.
  4. Hence Φ_end ≥ Φ_start + m, that is, D − 2^N ≥ V₀ − 2^(n₀) + m. ∎

Corollary (pair-1 touches in an L-slot). Take an L-slot that starts on M pairs at counter 2^M − 2. Let N₁ be the number of pairs when its first countdown ends. In an EndLast slot, let N_f be the number of pairs at the closing Ov.

The slot is a first countdown followed either by X1, or by EndLast, a second countdown and Ov, and pair 1 is never merged (§3.8.4 Step 2 and §3.8.3).

Let T1 be the number of macro steps of the slot before its closing re-pairing. Every such step is a Dec-family step or EndLast, and each touches pair 1 once, so T1 is also the number of touches of pair 1. Then:

Lemma L5' (the potential s; exact form of L5). Fix an L-slot. The x-block at the L-start fixes its type: it is X1 type if x = 4 and EndLast type otherwise (§3.4 S2).

At any moment, with n pairs and counter V, assign to the p-block of pair i:

R_i := ⌊V/2^(i−1)⌋ + c·2^(n−i)
e_i := n − i + δ
s_i := (p_i + R_i) / 2^(e_i)

where (c, δ) is:

R_i is the number of touches the block would still get if no merge happened from now on, and e_i is the depth it would then have at the next E-start.

Both are defined by the formula, whether or not the real run merges. So they also make sense in the x = 3 and x = 5 slots, where every real run merges at the far end.

  1. A plain Dec leaves every s_i unchanged, and so does EndLast.

  2. A merge at k changes s_i as follows (values before the step):

  1. At the end of the slot (V = 0 after EndLast, or at X1), s_i = r'_i. This is the scaled value of pair i at the next E-start, with r'_1 = (q'_1 + 1)/2^(e'_1).

  2. At the L-start, M = L* + 1 and the head block is p_1 = 3·2^M − 1:

Proof.

  1. A plain step at x touches pair i iff 2^(i−1) | x. When it does, ⌊V/2^(i−1)⌋ drops by exactly 1 and p_i rises by 1; n and the phase do not change.

Now take EndLast at V = 0 on n pairs. Before it, R_i = 2^(n−i) and e_i = n − i. After it there are n − 1 pairs, V = 2^(n−1) − 1 and δ = 1, so p_i has risen by 1, R_i = 2^(n−i) − 1 and e_i = n − i.

  1. Take i < k. Before the step and after it:

before: R_i = 2^(k−i) + H·2^(k−i+1) + c·2^(n−i) after: p_i has risen by 1, R'_i = 2^(k−i) − 1 + H·2^(k−i) + c·2^(n−1−i), e'_i = e_i − 1

Then 2(p_i + 1 + R'_i) − (p_i + R_i) = p_i + 2^(k−i), which gives the stated rise.

  1. At the end, R_i = 0.
  1. By S1, the Eq block of interior pair j = i − 1 enters the slot as p_i = Q − τ_j, at depth M − i = L* − j.

Corollaries. These hold as long as no merge happens at k ≤ 2 (§3.8.3), given INV(b) at the E-start.

A tail block is the last pair's p-block t₀, or any block fused with it (only the x = 3 far merge does that). Tail blocks are absorbed by EndLast or X1 and are never interior.

So, for i ≥ 2, a merge to the right of pair i raises s_i by more than 1, and a fusion gives s_F ≥ s_(k+1) + 2.

3.8.3 Pairs 1 and 2 survive the L-slot (uses (e))

At the L-start (M = L* + 1), Ov has made

pair 1 = (h+5, p_1^Ov − 1, 0)
pair 2 = (q_1^Ov, p_2^Ov, 1)          with p_j^Ov = p_j + τ_j  (S1)

So, by (e):

q_1^L = p_1 + τ_1 − 1 ≥ (2^(L*+2) − 1) + (3·2^(L*−1) − 2) − 1 = 11·2^(L*−1) − 4
q_2^L = p_2 + τ_2 ≥ 2^(L*) + 3·2^(L*−2) − 1 = 7·2^(L*−2) − 1

As long as neither has run out, they stay pairs 1 and 2, because merges at k ≥ 3 do not move them. By F2, their touches in the slot are at most:

These use the fact that the second countdown starts at 2^(N₁−1) − 1 ≤ 2^(M−1) − 1. For L* ≥ 2,

11·2^(L*−1) − 4  ≥  (3·2^(L*) − 2) + 1
 7·2^(L*−2) − 1  ≥  (3·2^(L*−1) − 1) + 1

So each of q_1 and q_2 is ≥ 2 before each of its touches and ≥ 1 after the last one.

By induction over the steps of the slot, neither runs out, neither is a pass-through with q = 1, and every merge of the slot is at k ≥ 3.

3.8.4 Proof of the Theorem

Assume INV+(e) at an E-start with L*.

Step 1: the E-cycle (§3.4 S1; uses (a) and (b)).

Every K is in D.

Step 2: the L-slot is in D (§3.4 S2 together with §3.8.3). The L-start has M = L* + 1 ≥ 4 pairs, digits (0,1,…,1) and T = −.

In both countdowns:

So every K of the slot is in D.

Formally, Step 2 and §3.8.3 are one induction over the steps of the slot. As long as every step so far was a rule application and pairs 1 and 2 are intact, the next step is a rule application (the bullets above), and pairs 1 and 2 stay intact (the budget of §3.8.3).

Step 3: INV+(e) at the next E-start K'. Let m be the number of merges in the slot. Then L*' = M − m ≤ L* + 1.

In an EndLast slot, EndLast and Ov cancel. In an X1 slot, X1 turns N₁ pairs into N₁ − 1 pairs plus T2, so L*' = N₁.

p_2' = q_1^L − T1 ≥ (11·2^(L*−1) − 4) − (3·2^(L*) − 2) = 5·2^(L*−1) − 2 ≥ 2^(L*+1) ≥ 2^(L*')

since L* ≥ 2 and L*' ≤ L* + 1. In an X1 slot, T1 ≤ 2^M − 2, so the margin is even larger.

So INV+(e)(K') holds. ∎

Every displayed equality and inequality of §3.8.2–3.8.4 was also checked numerically, step by step, with exact rationals for s and exact integers for Φ (§5).

3.8.5 Integer form, and the per-step form proved in the .v

§4 gives the clauses in detail.

4. Mapping to busycoq

TM21 in verify/SBCv6.v (1RB1LB_0LC1RD_0RA1LC_0RB1RE_0RD0LF_---1LE) is a loose template only:

So the .v keeps TM21's architecture:

Each macro rule is one decrement, one End-type sweep or one re-pairing, proved from plain es sweep lemmas and list inductions, and LWF is replaced by the invariant J.

New compared with TM21:

How the .v file is organized

The .v imports Individual62 and the stdlib Arith, Lia, List, String and ZifyNat. Every lemma is top level (no Section, Module or Hypothesis).

write-up lemma(s) in the .v
§1 family K sd (digit block), RP (pair list, fold on the right side), Tl = TN / TA t / TB k (the tails −, T1(t), T2(k)), RT, K h P T
§2, low level 14 sweep and turnaround lemmas, each one plain es: Start (three bounces), PassR, Borrow, PassL, EndPh, EndT, EndLastT, MergeB, MergeE, OvT, OvL, OvEnd, X1Sw, X2T; the swept region reg and the folds LP, OvR
§2, list sweeps PassesR, PassesL, OvPasses (induction on the pair list)
§2 rules Dec, DecMerge, DecMergeTail, DecMergeEmpty, EndR (End), EndLast, X2, Ov (re-pairing ovp), X1 (re-pairing ovpX, tail tailB_eq); each is K h P T -->+ K h' P' T'
§3.7 initial segment init0 (956 steps), init (78,710 steps to the base), both esx
§3.2 counter (L1) dv (digit value, pair 1 least significant), dv_lt, dv_zeros, dv_tz, dv_tz', ovp_dv, ovpX_dv
§3.3, §3.8.1 invariant ghost phase = E1 E2 E1t E2t T0 L1 L2 LX plus a flag c4; per-pair clauses PN (by n = pairs to the right) and PI (pairs 1 and 2, and h); PC, PCx, AllI; tail shape TC; state st, Cf, and J
§3.4, §3.5, §3.8.4 preservation arithmetic obligations ob_touch, ob_merge, ob_mt, ob_fuse, ob_far, ob_end, ob_end_top, ob_endlast, ob_x2, ob_x2_top, ob_x2_new, ob_ov_head/step/base, ob_x1_head/step/base; list-level inv_Dec, inv_Merge, inv_MT, inv_End, inv_X2, inv_EndLast, inv_Ov (via AllI_ovp), inv_X1 (via AllI_ovpX)
§2 outside cases (o1)–(o7) excluded Z_okL, borrow1 (a q = 1 run-out happens only in an L phase, at index ≥ 3), q2_V0, p1_V0, L2_c4_V0, AllI_okRO, AllI_len, lastOK_dec
§3.8 Theorem (cycle pair), per-step form Jstep : forall s, J s -> exists s', Cf s -->+ Cf s' /\ J s' (one macro rule per step; case split by split1: first digit 1, or all digits 0)
§3.3 base J_base : J (mkst 2 base TN E1 false)
§3.1 reduction nonhalt: multistep_nonhalt with init, then progress_nonhalt_cond with P := J

The invariant J

c4 marks an L-slot after a T2 start, before its DecMergeTail.

5. Numerical checks

These checks use direct simulation of the transition table and an exact implementation of the macro rules (the abstract run). They are evidence only; the result rests on the .v file alone.

These checks pass on:

AI assistance: this proof sketch, the scripts and the checks were produced with the help of Claude (Anthropic).