/machines/1RB0RC_1LC1RB_0RE1LD_0LC1LA_1RF1RA_---0RB/rocq/log.md · raw

W5-4 Rocq log (1RB0RC_1LC1RB_0RE1LD_0LC1LA_1RF1RA_---0RB)

Dev file: rocq/W54.v (compiled from a scratch copy with -native-compiler yes). The kill file ../1RB0RC_..._---0RB.v is a header-wrapped copy of it.

Round 1 (2026-10-13)

Design (differs from W4-2 in the left side, same one-lemma-per-rule layout)

Proved (all Qed, file compiles in ~4.6 s)

Tactics that worked / failed

Also proved in round 1 (second half; file compiles in ~6.6 s, 76 lemmas, no Admitted)

Plan for round 2+ (route 3 of proof.md 9, CPS form)

Round 2 (2026-10-13): nonhalt proved

The kill file and rocq/W54.v are now the same file (1039 lines, header + base + main induction + rule-table comment). Single-file compile: 36 s native (base 8 s + main part 10 s when compiled as two files; the single-file time varies with machine load). Print Assumptions nonhalt: Closed under the global context. No Admitted.

Design change: phase invariants instead of chain arithmetic

The round-1 plan (phase lemma PH with three explicit outcomes, then Lemma K / Z' / A1 / Kp as separate arithmetic on the overflow chain, EQ1/EQ2 for w = 1 mod 3) was replaced by one generic lemma plus invariants: - phase Inv: for any Inv j q r L v (j = frame offset from the level start) that every Rnd preserves, the run from a config with Inv reaches a bite config (q <= 2) with Inv, by lt_wf_ind on q. No case analysis on overflows at all. - PI t (the phase invariant of a level from t = (n,r,L,v)) is a conjunction of - j even; Qv j .. = Mv t (sign law, from Rnd_sign); - r' = 1 -> j = 0, r' = 2 -> L' = 0 -> j <= 2 (the (6,4,0) exclusion, U5); - Saf q r L v (Lemma P: no H, every bite has a rule; parity of q when w = 2, the O1 lookahead); - t in K' -> KI j q r L v: r = 0: 2^L <= j+q /\ (2^(L+1) <= j+2v+2 \/ 2^(L+1)+1 <= j+q) /\ (q = 0 -> v <> 0) /\ (L = 0 -> 4 <= q); r = 1: 2^(L+2)+2 <= q /\ (v = 0 -> 2^(L+1)+5 <= q); r = 2: 2^(L+1)+2 <= j+q /\ 2v+5 <= q. At the bite this gives d(F t) >= 2 for every plain end and A1 (2^Lc <= j+2) for a nested bite. - t in J, d(t) <= 1 -> ZI (cap t + 1): r = 0: L <= C+1 /\ q + 2^(L+2) + C <= 2v + L + 2^(C+3) + 1 /\ (q = 0 -> v = 0 -> L <= C) (q + 2^(L+2) - 2v - L is constant along R1/O0, so at most one more overflow); r = 1, 2: the start bounds. Gives cap(G t) <= cap(t) + 1 (Lemma Z'). The w = 1 mod 3 starts need no EQ1/EQ2: K1/ZI1/Saf1 hold at the start and map to K0/K2 etc. - Post t t' = U1..U5 of proof.md 6 (+ validity); U N = CPS form: pops safe for N-1 steps -> start safe for N steps (safe c N := forall M <= N, ~halts_in tm c M). - U_all by strong_induction: N = 0 by one round (safe_prog0); else phase, then bite_shape: ending bite (EB_lev + ending), B2+B1 (ending_B2), or nested bite: PUSH_lev, inner1, STK (induction on the number of pending frames, U at fewer steps per level, carrying Budget t C := Kst t \/ cap t <= C and the alternating sign SR), then U for the rest of the level at frame P+j+2, and compose for the arithmetic (QvN: the N row of the sign law via 2^k = 3x + 1 + k mod 2). - cycles: strong induction on N over Ist (= K' with M <> 0); nonhalt from init.

Pruned

Unused round-1 lemmas removed: stk/cfg, FR_rounds, FR_push, R1s_z/t, R1s_lz/lt, lev_rounds, chain, run_bite, run_ovf0/2, nh_prog/nh_ev. Jst now uses n mod 2 = 1 (lia-friendly) instead of Nat.odd.

Tactics that worked / failed (round 2)

check_kill (round 2, final file)

tools/check_kill.sh <kill file> 1RB0RC_1LC1RB_0RE1LD_0LC1LA_1RF1RA_---0RB: RESULT: PASS, exit 0 (sha256 f61649bdc6b6e97b170ccd8b89a210e50f4714d06d97a352c620e62d712574fc; compile 36.8 s native; coqchk pass 4.6 s; 0 assumptions). Full output: rocq/check_kill_round2.log.