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

1RB1LD_1LC1RA_0LD0LC_0RE1RB_1RD0RF_0RB--- never halts

This machine is a "Bell eats counter" machine seen in a mirror. Swap left and right in its table and rename its states, and you get a table we call TP. Started on the blank tape, the machine does exactly what TP does when TP is started in its state F, on the mirror-image tape.

TP keeps a binary counter in a word to the left of the head and two blocks of 10 pairs to the right. Each bounce of the head applies one step to the counter word (on a clean counter it adds one) and moves one 10 pair from the first block to the second. When the first block is empty, the right side eats the low end of the counter (an overflow) and the first block is refilled.

TP agrees with busycoq's BECv5 machines TM1 and TM2 except in one entry, F1. That entry only changes how long one kind of step takes. So the counter's mathematics is the same as for the variant with F1 = 1LF, and an invariant on the overflow states shows that the halting entry is never reached.

0. Summary

349 runs the 1LF machine's counter in a mirror, started in the 1LF machine's state F. One transition differs, and it only changes how long one kind of step takes.

piece argument in the .v
Lemma M: 349 = TP mirrored and renamed table identity (§3.1) perm_349, nonhalt
Lemma E (detour) and the eight one-digit lemmas on TP exact finite runs (§3.2) TA0 … TB
left step = phi on TP, with its step count induction on digit pairs (§3.2) phi_spec
right step RS and overflow OV on TP exact runs that never read F1 (§3.3) RS, OVe, OVo
level-1 rules R1–R5 composition of the above (§3.4) bounces, OV_even, OV_odd, OVB
phi lemmas, macro rules S0–S3 and P0–P4 proved by hand (§3.5–§3.6) Sweep, BS_S0 … BS_P4b
invariant I, coverage (Lemma S), closure (Lemma C) proved by hand (§4) I, Cov_*, C_*, step_I
initial segment: 73 steps to (std, 2, 2) exact run (§6) initF

1. Notation

Configurations. l <S r is state S reading the last cell of l, and l S> r is state S reading the first cell of r. Cells are written left to right.

Words. A word w is the finite nonzero part of the tape left of the head, plus the cell under it. It is written highest cell first and read as a number.

The pair (e, o). W(e, o) is the word with bit d of e on E-cell 2d and bit d of o on O-cell 2d+1. Every word is W(e, o) for exactly one pair. In Rocq this is WS e o.

Shifted words. Hi·W_h(c, o) is the high word Hi shifted up by 2h cells, above a low part of 2h cells holding c, o < 2^h.

Counters. There are two encodings of a number N.

Configurations of TP. For n, m ≥ 0,

K(w, n, m) = 0^inf w <A 1 (10)^(1+n) 0 (10)^m 0^inf

The right part is R n m of the .v (BECv5's w <| R n m). A clean overflow state is S(typ, N, m) = K(typ(N), 0, m), written (typ, N, m).

The same configuration in 349. Mirror the tape and rename the state (TP's A is 349's B):

K'(w, n, m) = 0^inf (01)^m 0 (01)^(1+n) 1 B> w~ 0^inf

Here w~ is w written from offset 0 to the right. Every rule below holds for K' on 349 with the same step counts.

Parameters of a state (typ, N, m).

The map phi. On a word w:

phi(w):  if w_0 = 0:  w_0 := 1
         else:        (e, e+1) := the lowest pair of adjacent 0 cells (the 0s above w count);
                      w_(e+1) := 1,  w_0 .. w_e := 0

2. Rule table (busycoq comment-block style)

This block collects the statements of §3–§6 in one place. Its symbols are defined in §1 (v, u, h, g, n and D in the block itself). The rules are proved in §3, the invariant in §4 and the start in §6.

1RB1LD_1LC1RA_0LD0LC_0RE1RB_1RD0RF_0RB---        (349; only F1 is undefined)
  = TP mirrored (L<->R) and renamed by f: A->F, B->A, C->B, D->C, E->D, F->E   (349 state q behaves as TP state f q)
TP = 1RB1LF_0RC0RB_0LD1LA_1LC0LE_0LA---_1LA1RC   (the 1LF machine = ..._1LA1LF: only F1 differs; only E1 undefined)
349 from 0^inf A> 0^inf  =  mirror of TP from 0^inf F> 0^inf   (flip_halts + perm_halts)

TP below.  words: w = ... w_2 w_1 w_0, w_d = the cell at offset d (offset 0 = the cell A reads)
           W(e,o): bit d of e at offset 2d, bit d of o at offset 2d+1
std(N) = W(N,0);   pk(N) = W(N-2^(P+1), 2^P) for 2^(P+1) <= N < 2^(P+2)
K(w,n,m) = 0^inf w <A 1 (10)^(1+n) 0 (10)^m 0^inf;   S(typ,N,m) = K(typ(N),0,m)
   in 349's orientation: K'(w,n,m) = 0^inf (01)^m 0 (01)^(1+n) 1 B> w~ 0^inf   (w~ = w from offset 0, left to right)
phi(w): w_0 = 0 -> w_0 := 1;  else (e,e+1) := lowest pair of adjacent 0 cells: w_(e+1) := 1, w_0..w_e := 0

E   l 1 <F 1 r  -->(3)  l <F 1 1 r        F1 C1 A1  (1LF machine: l 1 <F r -->(1) l <F 1 r);  TP enters F only by A1 (1LF)
L   0^inf w <A r  -->  0^inf phi(w) B> r     steps L_TP(w) = 1 if w_0 = 0, else 2e+3+2*p11(w)
    p11(w) = #{d : 1 <= d <= e-1, w_(d-1) = w_d = 1}  (one detour per adjacent 11 pair below the 00 pair)

R1  K(w,n,m) --> K(phi(w), n-1, m+1)       n >= 1                                    steps L_TP(w) + 10n+7
R2  K(w,0,m) --> K(x, m+1+u, 0)            phi(w) = x 1 0^(2u)                       steps L_TP(w) + 2u+8
R3  K(w,0,m) --> K(x', 0, m+u+2)           phi(w) = x' 0 0 1 0^(2u+1)  (x'00 may be 0^inf)   L_TP(w) + 2u+15
R4  K(w,0,m) --> halt (E1; 349: F1)        phi(w) = x 1 1 0^(2u+1)
R5  K(w,0,m) --> nested scan, no rule      phi(w) = x 1 0 1 0^(2u+1)

N+1 = (2k+1) 2^i,  b = m+1+i,  L = bitlen(k),  r = k - 2^(L-1),  tz = number of trailing 0 bits
S0  S(std,N,m) --> S(std, b, b)                k = 0
S1  S(std,N,m) --> S(pk, 2k+b, b)              k >= 1, and k = 2^(L-1) or 2k+b >= 2^(L+1)
S2  S(std,N,m) --> S(std, b+L+3, b+L+3)        k not a power of 2, 2k+b+1 = 2^(L+1)
S3  S(std,N,m) --> S(std, D+n, n)              k not a power of 2, k < 3*2^(L-2), 3*2^(L-1) < 2k+b+1 < 2^(L+1)
P0  S(pk,N,m)  --> S(std, b+1, b+1)            k = 0
P1  S(pk,N,m)  --> S(std, k+b, b)              k >= 1, k = 2^(L-1)
P2  S(pk,N,m)  --> S(std, 2r+b, b)             r >= 1, 2r+b >= 2^L
P3  S(pk,N,m)  --> S(std, b+L+1, b+L+1)        r >= 1, 2r+b+1 = 2^L
P4  S(pk,N,m)  --> S(pk, D+n, n)               1 <= r < 2^(L-2), 2^(L-1) < 2r+b+1 < 2^L
    S3/P4: v = 2k+b+1-3*2^(L-1) (S3) or 2r+b+1-2^(L-1) (P4); u = tz(v), h = L-2-u, g = v >> (u+1), n = b+1+u;
           D = 3*2^h if g = 0 (S3a/P4a);  D = 2^(h+1)+2g if g >= 1 and n >= 2^(h+1)-2g (S3b/P4b)
    each rule runs to the FIRST overflow state K(w',0,m') with w' clean and N' >= 1;  S2 and P0 pass through
    K(0^inf,0,M) = S(std,0,M) on the way (M = b+L+2 / b; not in I), and leave it by S0

invariant I(typ,N,m):   1 <= m <= N (pk: N >= 2), and
  N = m (mod 2):   std: 2N <= 3m+6 (N even), N <= 2m+3 (N odd);   pk: N <= 2m+3 (N even), 2N <= 5m+6 (N odd)
  N != m (mod 2):  N <= m+3
I(s) -> exactly one of S0..S3, P0..P4 applies to s, and I holds at its result

start: 349 from c0 = 0^inf A> 0^inf -->(14) K'(0^inf,0,1) = S(std,0,1) -->(59, S0) S(std,2,2) at step 73, in I
       (TP: F;; tape0 -->(73) K(std 2,0,2); the first F1 is TP's 122nd transition)

3. Rules

3.1 Lemma M: 349 is TP in a mirror

Lemma M. Swap L and R in every transition of TP, and rename TP's states by f⁻¹ (F→A, A→B, B→C, C→D, D→E, E→F). The result is 349, character for character.

So flip tm349 (349 with its directions swapped back) at state q is TP at state f(q), for every state and symbol, halting cells included. This is busycoq's Perm (flip tm349) TP f from Permute.v:

tm (q,s) = None              ->  tm' (f q, s) = None
tm (q,s) = Some (s', d, q')  ->  tm' (f q, s) = Some (s', d, f q')

Consequence. Two framework lemmas turn a halting run of 349 into a halting run of TP.

So it suffices to show that TP never halts from 0^inf F> 0^inf. 349's undefined cell F1 is TP's E1.

A related upstream result. busycoq's verify/Eqv_v3.v, Module TM518, relates 349 to 1RB1RA_1LC1RA_0LD0LC_0RE1RB_1RD0RF_0RB---. That table is the 1LF machine mirrored and renamed by the same f, and it differs from 349 only in A1 (349: 1LD; TM518's tm: 1RA). That one cell is exactly TP's F1. This proof does not use that file: the .v is a direct proof that imports only Individual62.

3.2 The left step on TP

Lemma E (detour). For every left side l and right side r, on TP:

l 1 <F 1 r   -->(3)   l <F 1 1 r          transitions F1 (1RC), C1 (1LA), A1 (1LF)

Proof. F reads the 1, and F1 writes 1 and moves right, so C reads the cell right of F, which is 1. C1 writes 1 and moves left, so A reads F's cell, now 1. A1 writes 1 and moves left, so F reads the last cell of l. ∎

The 1LF machine's F1 = 1LF does the same in one step:

l 1 <F r   -->(1)   l <F 1 r

With r = 1 r', that is the right-hand side of Lemma E.

Why the 1 is always there. The only transition into F is A1 = 1LF. It writes 1 and moves left, so right after F is entered the cell on its right is 1.

F leaves F at once (F0 = 1LA, F1 = 1RC). So in every run, every time F reads a cell, the cell on its right holds 1. The only exception is the very first read of a run started in F.

In 349's letters, mirrored, the detour is:

x 1 A> 1 y   --(A1 D1 B1)-->   x 1 1 A> y

The eight one-digit lemmas. These are the .v's TA0–TB. Here l and r are arbitrary, cells are written left to right, and a is 0 or 1.

.v lemma TP run transitions TP steps 1LF machine steps
TA0 l a 0 <A r --> l a 1 B> r A0 1 1
TA1 l 0 1 <A r --> l <A 1 1 r A1 F0 2 2
TA2 l 1 1 <A r --> l <F 1 1 r A1, then E 4 2
TF0 l 0 0 <F r --> l 1 0 B> r F0 A0 B1 3 3
TF1 l 1 0 <F r --> l <F 1 1 r F0 A1 2 2
TF2' l 0 1 <F 1 r --> l <A 1 1 1 r E, then F0 4 2
TF3' l 1 1 <F 1 r --> l <F 1 1 1 r E, E 6 2
TB l B> 1 1 r --> l 0 0 B> r B1 B1 2 2

In the .v the two restated lemmas put [1] *> r on the right of both sides:

Lemma TF2 l r: [1;0] *> l <{{F}} [1] *> r -->+ l <{{A}} [1;1] *> [1] *> r.
Lemma TF3 l r: [1;1] *> l <{{F}} [1] *> r -->+ l <{{F}} [1;1] *> [1] *> r.

The left step as a relation. The .v reads phi digit pair by digit pair through two relations.

Their constructors PA0–PA2 and PF0–PF3 are chosen by the parities of e and o. Read as functions they are PA(w) = phi(w) and PF(w) = phi(2w+1) >> 1.

Lemma L (phi_spec). On TP, for all e, o and every right side r:

(PA)  PA e o e' o'  ->  WS e o <A r     -->+  WS e' o' B> r
(PF)  PF e o e' o'  ->  WS e o <F 1 r   -->+  WS e' o' B> 1 r

Proof. Mutual induction on the derivation. Each case first rewrites the lowest digit pair, then uses the steps below.

case steps of the proof right side when the hypothesis is used
PA0 TA0 no hypothesis
PA1 TA1, IH (PA), TB 1 1 r
PA2 TA2, IH (PF), TB 1 1 r: starts with 1
PF0 TF0 no hypothesis
PF1 TF1, IH (PF), TB 1 1 1 r: starts with 1
PF2 TF2', IH (PA), TB 1 1 1 r
PF3 TF3', IH (PF), TB 1 1 1 r: starts with 1

Left step L. For every word w and every right side r, on TP:

0^inf w <A r   -->   0^inf phi(w) B> r

Proof of L1. The head moves left through offsets 0, 1, …, e+1, reading each cell once (apart from the detours). We show by induction on d: when offset d (1 ≤ d ≤ e+1) is read, every cell at offsets 0..d-1 is now 1, and the state is F if w_(d-1) = 1 and A if w_(d-1) = 0.

The result has 1 at offset e+1 and 0 at offsets 0..e, which is phi(w). ∎

Step count. The 1LF machine's run of L1 takes e reads below offset e, then F0, A0 and e+1 B1 steps: 2e+3 in all.

On TP every F-read of a 1 costs 3 steps instead of 1. F reads offset d with value 1 exactly when w_(d-1) = w_d = 1 (1 ≤ d ≤ e-1). So

L_TP(w) = 2e + 3 + 2·p11(w),    p11(w) = the number of adjacent 11 pairs among offsets 0..e-1

Locality. The scan never reads right of offset 0: a detour from F at offset d ≥ 1 reads offset d-1 ≥ 0. The transitions used are A0, A1, F0, F1, C1 and B1.

3.3 Right step and overflow on TP

These runs are the 1LF machine's, cell for cell, because they never read F1, and TP differs from the 1LF machine only in F1.

Right step RS (n ≥ 1). For every l, in 10n+7 steps:

l B> R n m   -->   l <A R (n-1) (m+1)

Write R n m = 1 1 0 (10)^n 0 X with X = (10)^m 0^inf. The run is this chain:

after steps configuration transitions
0 l B> 1 1 0 (10)^n 0 X
3 l 0 0 0 C> (10)^n 0 X B1 B1 B0
4n+3 l 0 0 (10)^n 0 C> 0 X shift 0 C> 10 --> 10 0 C> (C1 A0 B1 B0), n times
4n+8 l 0 (01)^(n-1) <A 0 0 0 1 0 X C0 D0 C0 D1 E0
6n+6 l 0 <A (11)^(n-1) 0 0 0 1 0 X shift 01 <A --> <A 11 (A1 F0), n-1 times
8n+6 l 1 0^(2n-1) C> 0 0 1 0 X A0, B1^(2n-2), B0
10n+5 l 1 0 <D (01)^(n-1) 0 0 1 0 X C0, then shift 00 <D --> <D 01 (D0 C0), n-1 times
10n+7 l <A 1 1 (01)^(n-1) 0 0 1 0 X = l <A R (n-1) (m+1) D0 C1

RS never moves left of the boundary cell. It reads F only as F0 (in the shift 01 <A --> <A 11) and never reads F1. It reads E once, on a 0 that B wrote earlier in the same step, so it never executes E1.

Overflow OV (n = 0). Let f = phi(w) = x 1 0^q, X = (10)^m 0^inf and Y = (10)^(m+2) 0^inf.

The three cases of OVo:

x what happens
ends in 1 E1: halt (TP's E1 is 349's F1)
x' 0 0, or 0^inf E0 A0 B0 C0 D0 C1 give K(x', 0, m+u+2), q+14 steps in all
ends in 10 E0, then A1 enters an F-scan inside x (no rule; never reached)

None of these enters F except the last, nested case. In the .v these are RS, OVe and OVo, the 1LF machine's statements and proofs.

3.4 Level-1 rules

R1 is L followed by RS. R2–R5 are L followed by OV, with the cases of §3.3. The step counts are the 1LF machine's with L replaced by L_TP.

rule domain result TP steps
R1 n ≥ 1 K(phi(w), n-1, m+1) L_TP(w) + 10n + 7
R2 n = 0, phi(w) = x 1 0^(2u) K(x, m+1+u, 0) L_TP(w) + 2u + 8
R3 n = 0, phi(w) = x' 0 0 1 0^(2u+1) K(x', 0, m+u+2) L_TP(w) + 2u + 15
R4 n = 0, phi(w) = x 1 1 0^(2u+1) halts (E1) the undefined cell is met after L_TP(w) + 2u + 9 steps
R5 n = 0, phi(w) = x 1 0 1 0^(2u+1) no rule

Iterating R1 gives

K(w, n, m)   -->*   K(phi^n(w), 0, m+n)

3.5 phi in E/O coordinates

These lemmas concern only the map phi, which is the same for TP and the 1LF machine. None of them mentions the machine.

In the .v they are lemmas about the relations PA and PAs:

Lemma SW. Let Hi be any word, h ≥ 1, 1 ≤ o < 2^h, P = tz(o), 0 ≤ c < 2^(P+1), and w = Hi·W_h(c, o).

Proof. The low part below offset 2P+1 has E-cells = the bits of c and O-cells = 0. No E-bit of c lies above P.

Sweep corollary. Under the hypotheses of SW, call T = 2o + c the T-count. Each phi adds 1 to T as long as T < 2^(h+1): (i) adds 1 to c, and (ii) changes (o, 2^(P+1)-1) to (o+2^P, 0).

Increments.

Orbit lemmas. Each comes from the sweep corollary with the high word shown. The constant words are:

phi(1) = 100     phi(11) = 1000     phi(1011) = 100000     phi(111) = 10000
lemma start word Hi, h result
O3 (std, gen 1) W(0,k), k ≥ 1 0^inf, h = L phi^j = pk(2k+j) once 2k+j ≥ 2^(L+1) (SW iii gives 100·0^(2L-1) = pk(2^(L+1)), then INC-pk). If k = 2^(L-1), W(0,k) = pk(2k) from the start. Final gap: if k is not a power of 2 and bit L-2 of k is 0, the barriers end with 3·2^(L-2), so phi^j = W(T-3·2^(L-1), 3·2^(L-2)) for 3·2^(L-1) ≤ T = 2k+j < 2^(L+1).
O4 (pk, gen 1) W(2^(L-1), r), 1 ≤ r < 2^(L-1) 1, h = L-1 phi^j = std(2r+j) once 2r+j ≥ 2^L (SW iii: 1000·0^(2L-3) = std(2^L)). Final gap: if r < 2^(L-2) (L ≥ 3), phi^j = W(T, 2^(L-2)) for 2^(L-1) ≤ T = 2r+j < 2^L. The landing at T = 2^(L-1) has 01 above it: the halting point H.
O5 (std, gen 2) W(3·2^h, g), 0 ≤ g < 2^h 101, h g = 0: phi^j = std(3·2^h + j). g ≥ 1: for j ≥ j0 = 2^(h+1)-2g, phi^j = std(2^(h+1)+2g+j) (at j0, SW iii gives 100000·0^(2h-1) = std(2^(h+2))).
O6 (pk, gen 2) W(2^h, 2^h+g), 0 ≤ g < 2^h 11, h g = 0: W(2^h,2^h) = pk(3·2^h), so phi^j = pk(3·2^h+j). g ≥ 1: for j ≥ j0, phi^j = pk(2^(h+1)+2g+j) (at j0: 10000·0^(2h-1) = pk(2^(h+2))).

In O3, the barrier 3·2^(L-2) is (k >> (L-2) << (L-2)) + 2^(L-2), for the 0 bit L-2, which lies above tz(k) because k is not a power of 2. The next barrier is 2^L. O4 is the same with r and the 0 bit L-2 of r.

3.6 Macro rules

Each macro rule is a finite chain of R1–R3 from a clean state S(typ, N, m) to the first later overflow state K(w', 0, m') whose word w' is clean with N' ≥ 1. The variables are those of §1, and for S3/P4 also v, u, h, g, n, D of §2.

Overflow words of clean counters. Let N+1 = (2k+1)2^i.

Then R2 gives K(x, b, 0), and R1^b gives K(phi^b(x), 0, b). If that word is not clean, the next overflow sees phi^(b+1)(x).

rule precondition run result
S0 std, k = 0 x = 0^inf: R2 gives K(0^inf, b, 0); R1^b and INC-std (phi^b(0^inf) = std(b)) (std, b, b)
S1 std, k ≥ 1, and k = 2^(L-1) or 2k+b ≥ 2^(L+1) R2 gives K(W(0,k), b, 0); R1^b and O3 (pk, 2k+b, b)
S2 std, k not a power of 2, 2k+b+1 = 2^(L+1) phi^(b+1)(x) = W(0, 2^L) = 1 0^(2L+1) (O3): R3 with x empty gives K(0^inf, 0, M), M = b+L+2; then S0 (R2 with q = 0 gives K(0^inf, M+1, 0), then R1^(M+1)) (std, b+L+3, b+L+3)
S3a std, k not a power of 2, k < 3·2^(L-2), 3·2^(L-1) < T = 2k+b+1 < 2^(L+1), g = 0 O3's final gap: phi^(b+1)(x) = W(v, 3·2^(L-2)), 1 ≤ v < 2^(L-1). Its lowest 1 is E-cell 2u, so R2 gives K(W(3·2^h, g), n, 0); R1^n and O5 (std, 3·2^h+n, n)
S3b as S3a, but g ≥ 1 and n ≥ 2^(h+1)-2g the same, O5 with g ≥ 1 (std, 2^(h+1)+2g+n, n)
P0 pk, k = 0 R3 gives K(0^inf, 0, b); then S0 (R2 and R1^(b+1)) (std, b+1, b+1)
P1 pk, k = 2^(L-1) x = std(k): R2 gives K(std(k), b, 0); R1^b and INC-std (std, k+b, b)
P2 pk, r ≥ 1, 2r+b ≥ 2^L R2 gives K(W(2^(L-1), r), b, 0); R1^b and O4 (std, 2r+b, b)
P3 pk, r ≥ 1, 2r+b+1 = 2^L phi^(b+1)(x) = std(2^L) (O4): R2 with q = 2L and x empty gives K(0^inf, b+1+L, 0); R1^(b+1+L) (std, b+L+1, b+L+1)
P4a pk, 1 ≤ r < 2^(L-2), 2^(L-1) < T = 2r+b+1 < 2^L, g = 0 O4's final gap: phi^(b+1)(x) = W(2^(L-1)+v, 2^(L-2)), 1 ≤ v < 2^(L-1). Its lowest 1 is E-cell 2u, so R2 gives K(W(2^h, 2^h+g), n, 0); R1^n and O6 (pk, 3·2^h+n, n)
P4b as P4a, but g ≥ 1 and n ≥ 2^(h+1)-2g the same, O6 with g ≥ 1 (pk, 2^(h+1)+2g+n, n)

In S3 and P4, the E-bits of phi^(b+1)(x) above offset 2u move to O-cells and become g = v >> (u+1) < 2^h.

Where a macro rule ends. Each macro rule runs from S(typ, N, m) to the first overflow state K(w', 0, m') whose word w' is clean with N' ≥ 1. That state is the result column. The other overflow states met on the way are of two kinds.

The overflows inside a macro rule. Each one is of one of these kinds:

So R4 and R5 never occur inside a macro rule.

The landings of the gen-2 orbits O5/O6 all come before j0 ≤ n (the last possible one, at T = 2^h, has 01 or 11 above it). They happen during bounces, where R1 applies to any word, so they do no harm.

4. Invariant, coverage, closure

The induction runs over clean overflow states (typ, N, m) with N ≥ 1. This section uses only the closed forms of §3.6, so it is the same as for the 1LF machine.

In the .v this section is the following lemmas, none of which executes the machine:

4.1 The invariant

class P N even N odd
std 2N ≤ 3m+6 N ≤ 2m+3
pk N ≤ 2m+3 2N ≤ 5m+6

In class P, N even ⇔ m even ⇔ i = 0. The weakest bound in every class is 2N ≤ 5m+6.

4.2 Lemma S (coverage): if I(s), exactly one macro rule applies to s

The preconditions are mutually exclusive by construction (k = 0 / k a power of 2 / k not, and the position of T). It remains to show that a state with I never falls outside them: it is never dirty outside the final gap, and the gen-2 merge comes in time.

std, k not a power of 2 (so k ≥ 3, L ≥ 2, k ≥ 2^(L-1)+1). Here T = 2k+b+1. T > 2^(L+1) gives S1 and T = 2^(L+1) gives S2. Suppose T < 2^(L+1); then b < 2^(L+1) - 1 - 2k ≤ 2^L - 3.

pk, k not a power of 2 (r ≥ 1, L ≥ 2). Here T = 2r+b+1. T > 2^L gives P2 and T = 2^L gives P3. Suppose T < 2^L, so b ≤ 2^L - 4. Also N+1 = (2k+1)2^i with 2k+1 ≥ 2^L+3.

So under I the dirty cases are exactly two: std with i = 0 in class P (S3), and pk with i ≤ 1 in class P (P4). Each is in its final gap (past every landing of its gen-1 orbit) with u ≥ 1, and its gen-2 orbit merges before the next overflow.

4.3 Lemma C (closure): if I(s) and s → s' by a macro rule, then I(s')

Each result has the form N' = m' + D with D ≥ 0 and m' ≥ 1, so I0 holds (for pk, N' ≥ 2). It remains to bound D.

5. Progress and halting

Progress. Every macro rule contains an overflow and at least one bounce, so it takes at least 9 steps. Also m' ≥ m+1 in every rule.

Halting. TP's only undefined transition is E1 (349's F1). E is entered only by D1, in two places:

Inside the macro rules OVo occurs only with x = 0^inf (in S2 and P0), where E reads 0.

The left step never enters E. Its transitions are A0, A1, F0, F1, C1 and B1, and a detour goes F1, C1, A1 and never through D. So under I, E1 is never executed.

6. Initial segment (exact)

349 starts in A on the blank tape, which is TP's F. The first 14 steps, in both alphabets:

349:  A0 B0 C1 C0 D0 E0 D0 E1 F0 B0 C0 D0 E0 D1
TP:   F0 A0 B1 B0 C0 D0 C0 D1 E0 A0 B0 C0 D0 C1

The rest is TP's run, cut into the rules of §3.2–§3.4:

steps TP transitions configuration after the last step
1–14 as above K(0^inf, 0, 1) = 0^inf <A 1 1 0 0 1 0 0^inf = S(std, 0, 1)
15–23 A0 (L0); B1 B1 B0 C0 D0 C0 D0 (OV0); C1 (OVe, q = 0) K(0^inf, 2, 0): R2 with m = 1, u = 0
24–51 A0 (L0); RS with n = 2 (27 steps) K(1, 1, 1)
52–73 A1 F0 A0 B1 B1 (L1 on 1: e = 1, no detour); RS with n = 1 (17 steps) K(100, 0, 2) = S(std, 2, 2)

In the .v this is

Lemma initF: F;; tape0 -->* K 2 0 0 2.        (K 2 0 0 2 = WS 2 0 <{{A}} R 0 2 = St (false, 2, 2))

From there the macro rules give the orbit below, with the step number of each overflow state after @:

(std,2,2) @73 -S1-> (pk,5,3) @174 -P1-> (std,6,5) @395 -S1-> (pk,12,6) @686 -P2-> (std,11,7) @1,055
  -S1-> (pk,12,10) @1,742 -P2-> (std,15,11) @2,535 -S0-> (std,16,16) @4,116 -S1-> (pk,33,17) @5,855 -> ...

7. Conclusion

7.1 Non-halting

By induction TP runs forever from F.

In busycoq terms:

7.2 Why it is not a cryptid

The branch taken in each cycle depends on bit patterns of N, which look pseudo-random. But I is closed under every branch.

Lemma C uses only linear bounds and two parity facts: N ≡ m in class P, and T even at the dirty overflows. Halting is excluded by inequalities, not by residues. The detour changes step counts only, never a branch.

7.3 Remark: the run is the 1LF machine's run, stretched

By §3.2 (Lemma E and "why the 1 is always there"), TP's run from F is the 1LF machine's run from F with every F1 replaced by the three steps F1 C1 A1. Nothing else changes.

The proof above does not use this remark. It proves the machine-level lemmas on TP directly, which is also what the .v does.

8. Mapping to busycoq

Template: BECv5 TM1/TM2. The .v keeps from the template:

The template's left-side lemmas are stated on its digit lists. Here the left side is an arbitrary word after an overflow, so they are replaced by arithmetic on the pair (e, o): the relations PA/PF and the lemma Sweep.

Conventions. The .v writes l for L-1 (so 2^l ≤ k < 2^(l+1)) and true/false for pk/std. States are St (typ, N, m), with

K e o n m := WS e o <{{A}} R n m
St (false, N, m) = K N 0 0 m          St (true, N, m) = K (pkE N) (pkO N) 0 m

The two step notations -->* and -->+ are bound to tmP (TP), so everything up to nonhalt_F is about TP.

this write-up .v notes
TP (§3.1) tmP the second TM_from_str literal
W(e,o) (§1) bt, wd, WS e o := wd (e+o) e o *> const 0; WS_split, WS_00/WS_10/WS_01/WS_11, WS_0x/WS_1x, WS_shift, WS_1, WS_pow cells listed from offset 0 upward, as a left side
pk(N) (§1) pkE N := N - 2^(log2 N), pkO N := 2^(log2 N - 1), pk_eq
one-digit lemmas, Lemma E (§3.2) TA0–TA2, TF0–TF3, TB (one es each) TF2, TF3 carry [1] *> r on the right
Lemma L (§3.2) inductive relations PA, PF; phi_spec by mutual induction (PAF_mind); PA_spec := proj1 phi_spec the PF clause has [1] *> r on both sides; phi is never computed
RS, OVe, OVo (§3.3) RS, OVe, OVo (one es each); on K configurations OV_even, OV_odd R4/R5 have no lemma: they are never reached
R1, R1^j, R2 + R1^b (§3.4) bounces, bounces0 (iterates PAs j), OVB
SW(i) (§3.5) Gap, Gaps
SW(ii)/(iii), sweep corollary (§3.5) Sweep h, by induction on h; helpers F_inc, F_carry, PF_inc0, lowbit the high word Hi enters only as a hypothesis PF E O E' O'
INC-std, INC-pk (§3.5) INC_std, INC_stds, INC_pk, INC_pks
O3 merge, O4 (§3.5) O3_merge; O4 is Sweep with Hi = 1 inside BS_P2/BS_P3
final gaps, gen-2 words (§3.6) S3_pre, P4_pre (Sweep, then Gaps, then OV_even)
O5, O6 (§3.5) Sweep h inside BS_S3b/BS_P4b, with Hi = 101 and 11 g = 0: INC_stds/INC_pks (BS_S3a, BS_P4a)
overflow words (§3.6) std_ov, pk_ov, pk_ov_full
R3 with x empty, then S0 (§3.6) OVoS0 used by BS_S2 and BS_P0
S0 … P4 (§3.6) BS_S0, BS_S1a (k = 2^l), BS_S1b, BS_S2, BS_S3a/BS_S3b, BS_P0, BS_P1, BS_P2, BS_P3, BS_P4a/BS_P4b each a -->+ run from St s to St s'
I (§4.1) I (with Nat.even tests); I_std, I_pk restate it with mod 2 for lia
Lemma S (§4.2) case split in step_std/step_pk; Cov_S3, Cov_P4; split_v, Nfacts, log2_facts
Lemma C (§4.3) close_diag, close_std, close_pk, C_S1, C_P1, C_P2 S3/P4 closure is inline in step_std/step_pk
§5 no separate lemma every rule is a -->+ run, so E1 is never reached
§6 initF (by solve_initF, busycoq's solve_init run from F) 73 steps
§7.1 step_I; nonhalt_F : ~halts tmP (F;; tape0) multistep_nonhalt + progress_nonhalt_cond with P := I
Lemma M (§3.1) tm (349's string), f349, perm_349 : Perm (flip tm) tmP f349 (by case computation), nonhalt flip_halts + perm_halts

What differs from the 1LF machine's .v. That file has 1,217 lines; this one has 1,278. The changes are:

Every other lemma is the 1LF machine's text. The reduction adds no assumptions: flip_halts and perm_halts do not use flip_involutive, the one lemma of Flip.v that uses functional extensionality.

9. Numerical sanity checks

These are evidence only; the result rests on the .v file alone. Each claim of §3–§6 was also tested numerically: finite claims on every small case, parametric claims on random large ones.

claim what was tested size
Lemma M (§3.1) the string identity and both Perm clauses, cell by cell; 349 from blank against the mirror of TP from F in lockstep (state renamed, head at minus the position, every cell mirrored) lockstep 10^6 steps (a longer run: 5·10^6)
Lemma E (§3.2) exact result in 3 steps, F1 C1 A1; the 1LF machine's F1 gives the same in 1 step; 349's mirrored form every context up to 6 cells × 40, plus 3,000 random
one-digit lemmas (§3.2) exact configuration and step count on TP and on the 1LF machine; the unrestated TF2/TF3 are false on TP 6,064 contexts per lemma
Lemma L, left step (§3.2) PA/PF as functions; result phi(w), steps L_TP, F1 reads = p11, right side untouched, every F1 followed by C1 (reading 1) and A1 all words up to 14 cells, plus 3,000 random up to 90 cells
RS, OV (§3.3) every row of the RS chain; OV0, CD, OVe, OVo, halt, nested case n ≤ 40 × m ≤ 6 plus 200 random; f up to 13 cells × m ≤ 3 plus 2,000 random
R1–R5 (§3.4) exact configuration and step count on TP; on 349 in K' form TP: all words up to 11 cells; 349: all words up to 10 cells × 4 (n, m), plus 2,000 random
SW, increments, O3–O6 (§3.5) against plain iteration of phi SW: every h ≤ 5 and high word up to 6 cells, plus 30,000 random; O3–O6: small parameters exhaustively, random up to 60 bits
macro rules (§3.6) closed form = abstract execution of R1–R4; = direct runs of TP and of 349 (same steps, same overflow states); where each rule ends every clean state with m ≤ 90, N ≤ 3m+8, plus 2,000 constructed large states per rule; 30 direct runs per rule
overflow words (§3.6) the words x and q for std and pk every N < 8,192, plus 5,000 random
Lemmas S and C (§4) a rule applies; each inequality step; closure every state with I and m ≤ 700 (251,124 states; a longer run: m ≤ 1300, 856,374 states), plus 300,000 random up to m ≈ 2^60
§6 and the orbit every row of the §6 table; the overflow configurations of a direct run of 349 from blank (clean, dirty and empty) = the R1–R3 orbit from step 14, with exact step numbers 182 configurations to step 59,775,614 (a longer run: 306 to step 299,701,194)
§7.3 TP from F against the 1LF machine from F with each F1 expanded, in lockstep 3·10^6 steps of the 1LF machine (a longer run: 3·10^7 steps, 479 detours, TP steps = 1LF steps + 2·479)
I along the orbit I at every clean overflow state from (std, 2, 2) 500,000 macro steps (final m = 1,286,699)
negative controls off I, an R4 overflow halts on TP (E1) and on 349 (F1); a detour with 0 on F's right is not the 1LF machine's F1 10 halting states; 200 contexts

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