Imports
/- Copyright (c) 2026 Google LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. -/ module public import Cryptids.WeakCollatz75

WeakCollatz41 (weak_collatz_41)

The 41-state, 2-symbol Turing machine weak_collatz_41 compresses weak_collatz_75 (75 → 41 states, -34 states / -45.33%) while constructively preserving blank-tape halting equivalence: it halts on the blank tape if and only if there exist x ≥ 3 and 1 ≤ j ≤ x with terras^[j] x = x (halts_weakCollatz41_iff_bounded_cycle), and hence if and only if weak_collatz_75 halts (candidate_equivalent, proved without Classical.choice).

Notice why Tao's Weak Collatz Conjecture (absence of nontrivial positive cycles) is the exact blank-tape halting (\Sigma_1^0) half of the Collatz problem: existence of a divergent trajectory (\exists x,\; \forall k,\; T^k(x) \neq 1) is \Sigma_2^0 and cannot be semi-decided by blank-tape halting without an oracle, whereas existence of a nontrivial cycle (\exists x \ge 3,\; \exists j \ge 1,\; T^j(x) = x) is \Sigma_1^0.

Compression Ideas (75 → 41 states)

At canonical checkpoint stageCfg c x y (c ≥ 1, x ≥ 3, y ≥ 1), the tape holds 0^∞ 1^c 0 1^x 0 [1] 1^(y - 1) 0^∞ in state 12 with single-zero delimiters and zero unbounded blank gaps:

    Adjacent 1^x 0 1^y Layout & Left-End Counter Decrement: placing 1^c on the outer left (1^c 0 1^x 0 1^y instead of 1^x 00 1^c 0^(g + 2) 1^y) makes 1^x and 1^z directly adjacent during comparison and lets counter decrements erase the leftmost 1 of 1^c into 0^∞ without creating a growing 0^(g + 2) gap.

    In-Place Zero-Gap terras Engine (states 12–22): moves a single 0-hole right across 1^y while peeling 1s from the right end; even y = 2k + 2 finishes directly as 1^(k + 1) when the right suffix vanishes into 0^∞, while odd y = 2k + 1 reverses the hole leftward to expand 1^k into 1^(3k + 2) in place.

    Local 2p Comparison & Unified Restoration (states 0, 1, 20, 22, 23–31): compares 1^x 0 1^z in place as 1^u 0 1^v 0 1^(2p) (u + p = x, v + p = z) without ever sweeping across 1^c or 1^(2p), halting at (25, 0) iff u = v = 0, and otherwise restoring 1^x 0 1^z via a single shared reverse loop for both z < x and z > x.

    Right-to-Left 1-Pass Triple-Build & 6-Step Boot (states 0–11, 34–40): builds all three blocks 1^A 0 1^A 0 1^A from 1^A in a single pass rather than two sequential copy passes, and uses the sole remaining 0-transition (1, 0) for a 6-step blank-tape entry into tripleCfg 0 3, achieving 81/81 active transition coverage (82/82 cells including halt).

@[expose] public sectionnamespace ConjectureMachines.WeakCollatz41open Turing (Dir)open StateTransitionopen ErdosTernary15 (B0 B0_cons_zero nSteps nSteps_zero nSteps_succ nSteps_reaches nSteps_bind_eq step_one reaches_imp_nSteps nSteps_eq_none_of_step_none)open ErdosTernary14 (ones ones_succ' ones_add)local notation "mkL" => ErdosTernary15.Tape.mkL

75-state Weak Collatz reference machine (weak_collatz_75).

abbrev reference : BundledMachine 2 := Machines.weakCollatz75.bundle

41-state Weak Collatz candidate machine (weak_collatz_41).

abbrev candidate : BundledMachine 2 := Machines.weakCollatz41.bundle

The candidate as a Machine 41 2.

abbrev weakCollatz41 : Machine 41 2 := Machines.weakCollatz41private theorem mkL_B0 (R : ListBlank (Fin 2)) : mkL B0 R = ⟨0, B0, R⟩ := rflprivate theorem ones_zero (X : ListBlank (Fin 2)) : ones 0 X = X := rflprivate theorem ones_succ (k : ℕ) (X : ListBlank (Fin 2)) : ones (k + 1) X = (ones k X).cons 1 := rflprivate theorem stepR {q q' : Fin 41} {a b : Fin 2} (h : weakCollatz41.transition q a = some (b, .right, q')) (L R : ListBlank (Fin 2)) : step weakCollatz41 ⟨q, ⟨a, L, R⟩⟩ = some ⟨q', Tape.mk' (L.cons b) R⟩ := q:Fin 41q':Fin 41a:Fin 2b:Fin 2h:weakCollatz41.transition q a = some (b, Dir.right, q')L:ListBlank (Fin 2)R:ListBlank (Fin 2)⊢ step weakCollatz41 { state := q, tape := { head := a, left := L, right := R } } = some { state := q', tape := Tape.mk' (ListBlank.cons b L) R } q:Fin 41q':Fin 41a:Fin 2b:Fin 2h:weakCollatz41.transition q a = some (b, Dir.right, q')L:ListBlank (Fin 2)R:ListBlank (Fin 2)⊢ some { state := q', tape := Tape.move Dir.right (Tape.write b { head := a, left := L, right := R }) } = some { state := q', tape := Tape.mk' (ListBlank.cons b L) R }; All goals completed! 🐙private theorem stepL {q q' : Fin 41} {a b : Fin 2} (h : weakCollatz41.transition q a = some (b, .left, q')) (L R : ListBlank (Fin 2)) : step weakCollatz41 ⟨q, ⟨a, L, R⟩⟩ = some ⟨q', mkL L (R.cons b)⟩ := q:Fin 41q':Fin 41a:Fin 2b:Fin 2h:weakCollatz41.transition q a = some (b, Dir.left, q')L:ListBlank (Fin 2)R:ListBlank (Fin 2)⊢ step weakCollatz41 { state := q, tape := { head := a, left := L, right := R } } = some { state := q', tape := mkL L (ListBlank.cons b R) } q:Fin 41q':Fin 41a:Fin 2b:Fin 2h:weakCollatz41.transition q a = some (b, Dir.left, q')L:ListBlank (Fin 2)R:ListBlank (Fin 2)⊢ some { state := q', tape := Tape.move Dir.left (Tape.write b { head := a, left := L, right := R }) } = some { state := q', tape := mkL L (ListBlank.cons b R) }; All goals completed! 🐙

Transition Table

private theorem tr0_0 (L R) : step weakCollatz41 ⟨0, ⟨0, L, R⟩⟩ = some ⟨1, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr0_1 (L R) : step weakCollatz41 ⟨0, ⟨1, L, R⟩⟩ = some ⟨0, mkL L (R.cons 1)⟩ := stepL rfl L Rprivate theorem tr1_0 (L R) : step weakCollatz41 ⟨1, ⟨0, L, R⟩⟩ = some ⟨35, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr1_1 (L R) : step weakCollatz41 ⟨1, ⟨1, L, R⟩⟩ = some ⟨30, Tape.mk' (L.cons 0) R⟩ := stepR rfl L Rprivate theorem tr2_0 (L R) : step weakCollatz41 ⟨2, ⟨0, L, R⟩⟩ = some ⟨34, mkL L (R.cons 1)⟩ := stepL rfl L Rprivate theorem tr2_1 (L R) : step weakCollatz41 ⟨2, ⟨1, L, R⟩⟩ = some ⟨3, Tape.mk' (L.cons 0) R⟩ := stepR rfl L Rprivate theorem tr3_0 (L R) : step weakCollatz41 ⟨3, ⟨0, L, R⟩⟩ = some ⟨4, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr3_1 (L R) : step weakCollatz41 ⟨3, ⟨1, L, R⟩⟩ = some ⟨35, Tape.mk' (L.cons 0) R⟩ := stepR rfl L Rprivate theorem tr4_0 (L R) : step weakCollatz41 ⟨4, ⟨0, L, R⟩⟩ = some ⟨5, Tape.mk' (L.cons 0) R⟩ := stepR rfl L Rprivate theorem tr4_1 (L R) : step weakCollatz41 ⟨4, ⟨1, L, R⟩⟩ = some ⟨4, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr5_0 (L R) : step weakCollatz41 ⟨5, ⟨0, L, R⟩⟩ = some ⟨6, mkL L (R.cons 1)⟩ := stepL rfl L Rprivate theorem tr5_1 (L R) : step weakCollatz41 ⟨5, ⟨1, L, R⟩⟩ = some ⟨5, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr6_0 (L R) : step weakCollatz41 ⟨6, ⟨0, L, R⟩⟩ = some ⟨7, mkL L (R.cons 0)⟩ := stepL rfl L Rprivate theorem tr6_1 (L R) : step weakCollatz41 ⟨6, ⟨1, L, R⟩⟩ = some ⟨6, mkL L (R.cons 1)⟩ := stepL rfl L Rprivate theorem tr7_0 (L R) : step weakCollatz41 ⟨7, ⟨0, L, R⟩⟩ = some ⟨8, mkL L (R.cons 0)⟩ := stepL rfl L Rprivate theorem tr7_1 (L R) : step weakCollatz41 ⟨7, ⟨1, L, R⟩⟩ = some ⟨7, mkL L (R.cons 1)⟩ := stepL rfl L Rprivate theorem tr8_0 (L R) : step weakCollatz41 ⟨8, ⟨0, L, R⟩⟩ = some ⟨9, mkL L (R.cons 0)⟩ := stepL rfl L Rprivate theorem tr8_1 (L R) : step weakCollatz41 ⟨8, ⟨1, L, R⟩⟩ = some ⟨8, mkL L (R.cons 1)⟩ := stepL rfl L Rprivate theorem tr9_0 (L R) : step weakCollatz41 ⟨9, ⟨0, L, R⟩⟩ = some ⟨10, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr9_1 (L R) : step weakCollatz41 ⟨9, ⟨1, L, R⟩⟩ = some ⟨9, mkL L (R.cons 1)⟩ := stepL rfl L Rprivate theorem tr10_0 (L R) : step weakCollatz41 ⟨10, ⟨0, L, R⟩⟩ = some ⟨11, Tape.mk' (L.cons 0) R⟩ := stepR rfl L Rprivate theorem tr10_1 (L R) : step weakCollatz41 ⟨10, ⟨1, L, R⟩⟩ = some ⟨10, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr11_0 (L R) : step weakCollatz41 ⟨11, ⟨0, L, R⟩⟩ = some ⟨2, mkL L (R.cons 0)⟩ := stepL rfl L Rprivate theorem tr11_1 (L R) : step weakCollatz41 ⟨11, ⟨1, L, R⟩⟩ = some ⟨11, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr12_0 (L R) : step weakCollatz41 ⟨12, ⟨0, L, R⟩⟩ = some ⟨19, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr12_1 (L R) : step weakCollatz41 ⟨12, ⟨1, L, R⟩⟩ = some ⟨13, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr13_0 (L R) : step weakCollatz41 ⟨13, ⟨0, L, R⟩⟩ = some ⟨24, mkL L (R.cons 1)⟩ := stepL rfl L Rprivate theorem tr13_1 (L R) : step weakCollatz41 ⟨13, ⟨1, L, R⟩⟩ = some ⟨14, Tape.mk' (L.cons 0) R⟩ := stepR rfl L Rprivate theorem tr14_0 (L R) : step weakCollatz41 ⟨14, ⟨0, L, R⟩⟩ = some ⟨15, mkL L (R.cons 0)⟩ := stepL rfl L Rprivate theorem tr14_1 (L R) : step weakCollatz41 ⟨14, ⟨1, L, R⟩⟩ = some ⟨14, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr15_0 (L R) : step weakCollatz41 ⟨15, ⟨0, L, R⟩⟩ = some ⟨23, mkL L (R.cons 0)⟩ := stepL rfl L Rprivate theorem tr15_1 (L R) : step weakCollatz41 ⟨15, ⟨1, L, R⟩⟩ = some ⟨16, mkL L (R.cons 0)⟩ := stepL rfl L Rprivate theorem tr16_0 (L R) : step weakCollatz41 ⟨16, ⟨0, L, R⟩⟩ = some ⟨20, Tape.mk' (L.cons 0) R⟩ := stepR rfl L Rprivate theorem tr16_1 (L R) : step weakCollatz41 ⟨16, ⟨1, L, R⟩⟩ = some ⟨17, mkL L (R.cons 1)⟩ := stepL rfl L Rprivate theorem tr17_0 (L R) : step weakCollatz41 ⟨17, ⟨0, L, R⟩⟩ = some ⟨13, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr17_1 (L R) : step weakCollatz41 ⟨17, ⟨1, L, R⟩⟩ = some ⟨17, mkL L (R.cons 1)⟩ := stepL rfl L Rprivate theorem tr18_0 (L R) : step weakCollatz41 ⟨18, ⟨0, L, R⟩⟩ = some ⟨22, Tape.mk' (L.cons 0) R⟩ := stepR rfl L Rprivate theorem tr18_1 (L R) : step weakCollatz41 ⟨18, ⟨1, L, R⟩⟩ = some ⟨12, Tape.mk' (L.cons 0) R⟩ := stepR rfl L Rprivate theorem tr19_0 (L R) : step weakCollatz41 ⟨19, ⟨0, L, R⟩⟩ = some ⟨20, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr19_1 (L R) : step weakCollatz41 ⟨19, ⟨1, L, R⟩⟩ = some ⟨19, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr20_0 (L R) : step weakCollatz41 ⟨20, ⟨0, L, R⟩⟩ = some ⟨21, mkL L (R.cons 1)⟩ := stepL rfl L Rprivate theorem tr20_1 (L R) : step weakCollatz41 ⟨20, ⟨1, L, R⟩⟩ = some ⟨22, mkL L (R.cons 1)⟩ := stepL rfl L Rprivate theorem tr21_0 (L R) : step weakCollatz41 ⟨21, ⟨0, L, R⟩⟩ = some ⟨18, mkL L (R.cons 0)⟩ := stepL rfl L Rprivate theorem tr21_1 (L R) : step weakCollatz41 ⟨21, ⟨1, L, R⟩⟩ = some ⟨21, mkL L (R.cons 1)⟩ := stepL rfl L Rprivate theorem tr22_0 (L R) : step weakCollatz41 ⟨22, ⟨0, L, R⟩⟩ = some ⟨24, mkL L (R.cons 1)⟩ := stepL rfl L Rprivate theorem tr22_1 (L R) : step weakCollatz41 ⟨22, ⟨1, L, R⟩⟩ = some ⟨23, mkL L (R.cons 0)⟩ := stepL rfl L Rprivate theorem tr23_0 (L R) : step weakCollatz41 ⟨23, ⟨0, L, R⟩⟩ = some ⟨25, mkL L (R.cons 0)⟩ := stepL rfl L Rprivate theorem tr23_1 (L R) : step weakCollatz41 ⟨23, ⟨1, L, R⟩⟩ = some ⟨24, mkL L (R.cons 1)⟩ := stepL rfl L Rprivate theorem tr24_0 (L R) : step weakCollatz41 ⟨24, ⟨0, L, R⟩⟩ = some ⟨27, mkL L (R.cons 0)⟩ := stepL rfl L Rprivate theorem tr24_1 (L R) : step weakCollatz41 ⟨24, ⟨1, L, R⟩⟩ = some ⟨24, mkL L (R.cons 1)⟩ := stepL rfl L Rprivate theorem tr25_0 (L R : ListBlank (Fin 2)) : step weakCollatz41 ⟨25, ⟨0, L, R⟩⟩ = none := rflprivate theorem tr25_1 (L R) : step weakCollatz41 ⟨25, ⟨1, L, R⟩⟩ = some ⟨26, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr26_0 (L R) : step weakCollatz41 ⟨26, ⟨0, L, R⟩⟩ = some ⟨30, Tape.mk' (L.cons 0) R⟩ := stepR rfl L Rprivate theorem tr26_1 (L R) : step weakCollatz41 ⟨26, ⟨1, L, R⟩⟩ = some ⟨32, mkL L (R.cons 0)⟩ := stepL rfl L Rprivate theorem tr27_0 (L R) : step weakCollatz41 ⟨27, ⟨0, L, R⟩⟩ = some ⟨26, Tape.mk' (L.cons 0) R⟩ := stepR rfl L Rprivate theorem tr27_1 (L R) : step weakCollatz41 ⟨27, ⟨1, L, R⟩⟩ = some ⟨28, Tape.mk' (L.cons 0) R⟩ := stepR rfl L Rprivate theorem tr28_0 (L R) : step weakCollatz41 ⟨28, ⟨0, L, R⟩⟩ = some ⟨29, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr28_1 (L R) : step weakCollatz41 ⟨28, ⟨1, L, R⟩⟩ = some ⟨0, mkL L (R.cons 0)⟩ := stepL rfl L Rprivate theorem tr29_0 (L R) : step weakCollatz41 ⟨29, ⟨0, L, R⟩⟩ = some ⟨20, mkL L (R.cons 1)⟩ := stepL rfl L Rprivate theorem tr29_1 (L R) : step weakCollatz41 ⟨29, ⟨1, L, R⟩⟩ = some ⟨29, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr30_0 (L R) : step weakCollatz41 ⟨30, ⟨0, L, R⟩⟩ = some ⟨31, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr30_1 (L R) : step weakCollatz41 ⟨30, ⟨1, L, R⟩⟩ = some ⟨30, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr31_0 (L R) : step weakCollatz41 ⟨31, ⟨0, L, R⟩⟩ = some ⟨26, mkL L (R.cons 0)⟩ := stepL rfl L Rprivate theorem tr31_1 (L R) : step weakCollatz41 ⟨31, ⟨1, L, R⟩⟩ = some ⟨28, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr32_0 (L R) : step weakCollatz41 ⟨32, ⟨0, L, R⟩⟩ = some ⟨33, mkL L (R.cons 0)⟩ := stepL rfl L Rprivate theorem tr32_1 (L R) : step weakCollatz41 ⟨32, ⟨1, L, R⟩⟩ = some ⟨32, mkL L (R.cons 1)⟩ := stepL rfl L Rprivate theorem tr33_0 (L R) : step weakCollatz41 ⟨33, ⟨0, L, R⟩⟩ = some ⟨34, mkL L (R.cons 0)⟩ := stepL rfl L Rprivate theorem tr33_1 (L R) : step weakCollatz41 ⟨33, ⟨1, L, R⟩⟩ = some ⟨33, mkL L (R.cons 1)⟩ := stepL rfl L Rprivate theorem tr34_0 (L R) : step weakCollatz41 ⟨34, ⟨0, L, R⟩⟩ = some ⟨3, Tape.mk' (L.cons 0) R⟩ := stepR rfl L Rprivate theorem tr34_1 (L R) : step weakCollatz41 ⟨34, ⟨1, L, R⟩⟩ = some ⟨34, mkL L (R.cons 1)⟩ := stepL rfl L Rprivate theorem tr35_0 (L R) : step weakCollatz41 ⟨35, ⟨0, L, R⟩⟩ = some ⟨38, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr35_1 (L R) : step weakCollatz41 ⟨35, ⟨1, L, R⟩⟩ = some ⟨36, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr36_0 (L R) : step weakCollatz41 ⟨36, ⟨0, L, R⟩⟩ = some ⟨37, Tape.mk' (L.cons 0) R⟩ := stepR rfl L Rprivate theorem tr36_1 (L R) : step weakCollatz41 ⟨36, ⟨1, L, R⟩⟩ = some ⟨36, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr37_0 (L R) : step weakCollatz41 ⟨37, ⟨0, L, R⟩⟩ = some ⟨12, Tape.mk' (L.cons 0) R⟩ := stepR rfl L Rprivate theorem tr37_1 (L R) : step weakCollatz41 ⟨37, ⟨1, L, R⟩⟩ = some ⟨37, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr38_0 (L R) : step weakCollatz41 ⟨38, ⟨0, L, R⟩⟩ = some ⟨39, Tape.mk' (L.cons 0) R⟩ := stepR rfl L Rprivate theorem tr38_1 (L R) : step weakCollatz41 ⟨38, ⟨1, L, R⟩⟩ = some ⟨38, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr39_0 (L R) : step weakCollatz41 ⟨39, ⟨0, L, R⟩⟩ = some ⟨40, mkL L (R.cons 0)⟩ := stepL rfl L Rprivate theorem tr39_1 (L R) : step weakCollatz41 ⟨39, ⟨1, L, R⟩⟩ = some ⟨39, Tape.mk' (L.cons 1) R⟩ := stepR rfl L Rprivate theorem tr40_0 (L R) : step weakCollatz41 ⟨40, ⟨0, L, R⟩⟩ = some ⟨2, mkL L (R.cons 0)⟩ := stepL rfl L Rprivate theorem tr40_1 (L R) : step weakCollatz41 ⟨40, ⟨1, L, R⟩⟩ = some ⟨40, mkL L (R.cons 0)⟩ := stepL rfl L R

Sweep & Reachability Combinators

private def reachPos (c₁ c₂ : Cfg 41 2) : Prop := ∃ s : ℕ, 1 ≤ s ∧ nSteps weakCollatz41 s c₁ = some c₂private theorem reachPos_step {c₁ c₂ : Cfg 41 2} (h : step weakCollatz41 c₁ = some c₂) : reachPos c₁ c₂ := ⟨1, le_rfl, step_one h⟩private theorem reachPos_trans {c₁ c₂ c₃ : Cfg 41 2} (h₁ : reachPos c₁ c₂) (h₂ : reachPos c₂ c₃) : reachPos c₁ c₃ := c₁:Cfg 41 2c₂:Cfg 41 2c₃:Cfg 41 2h₁:reachPos c₁ c₂h₂:reachPos c₂ c₃⊢ reachPos c₁ c₃ c₁:Cfg 41 2c₂:Cfg 41 2c₃:Cfg 41 2h₂:reachPos c₂ c₃s₁:ℕhs₁:1 ≤ s₁heq₁:nSteps weakCollatz41 s₁ c₁ = some c₂⊢ reachPos c₁ c₃ c₁:Cfg 41 2c₂:Cfg 41 2c₃:Cfg 41 2s₁:ℕhs₁:1 ≤ s₁heq₁:nSteps weakCollatz41 s₁ c₁ = some c₂s₂:ℕhs₂:1 ≤ s₂heq₂:nSteps weakCollatz41 s₂ c₂ = some c₃⊢ reachPos c₁ c₃ exact ⟨s₁ + s₂, c₁:Cfg 41 2c₂:Cfg 41 2c₃:Cfg 41 2s₁:ℕhs₁:1 ≤ s₁heq₁:nSteps weakCollatz41 s₁ c₁ = some c₂s₂:ℕhs₂:1 ≤ s₂heq₂:nSteps weakCollatz41 s₂ c₂ = some c₃⊢ 1 ≤ s₁ + s₂ All goals completed! 🐙, nSteps_bind_eq heq₁ heq₂⟩private theorem step_then_reachPos {c₁ c₂ c₃ : Cfg 41 2} (h₁ : step weakCollatz41 c₁ = some c₂) (h₂ : reachPos c₂ c₃) : reachPos c₁ c₃ := reachPos_trans (reachPos_step h₁) h₂private theorem nSteps_then_reachPos {k : ℕ} {c₁ c₂ c₃ : Cfg 41 2} (h₁ : nSteps weakCollatz41 k c₁ = some c₂) (h₂ : reachPos c₂ c₃) : reachPos c₁ c₃ := k:ℕc₁:Cfg 41 2c₂:Cfg 41 2c₃:Cfg 41 2h₁:nSteps weakCollatz41 k c₁ = some c₂h₂:reachPos c₂ c₃⊢ reachPos c₁ c₃ k:ℕc₁:Cfg 41 2c₂:Cfg 41 2c₃:Cfg 41 2h₁:nSteps weakCollatz41 k c₁ = some c₂s:ℕhs:1 ≤ sheq:nSteps weakCollatz41 s c₂ = some c₃⊢ reachPos c₁ c₃ exact ⟨k + s, k:ℕc₁:Cfg 41 2c₂:Cfg 41 2c₃:Cfg 41 2h₁:nSteps weakCollatz41 k c₁ = some c₂s:ℕhs:1 ≤ sheq:nSteps weakCollatz41 s c₂ = some c₃⊢ 1 ≤ k + s All goals completed! 🐙, nSteps_bind_eq h₁ heq⟩private theorem reachPos_then_nSteps {k : ℕ} {c₁ c₂ c₃ : Cfg 41 2} (h₁ : reachPos c₁ c₂) (h₂ : nSteps weakCollatz41 k c₂ = some c₃) : reachPos c₁ c₃ := k:ℕc₁:Cfg 41 2c₂:Cfg 41 2c₃:Cfg 41 2h₁:reachPos c₁ c₂h₂:nSteps weakCollatz41 k c₂ = some c₃⊢ reachPos c₁ c₃ k:ℕc₁:Cfg 41 2c₂:Cfg 41 2c₃:Cfg 41 2h₂:nSteps weakCollatz41 k c₂ = some c₃s:ℕhs:1 ≤ sheq:nSteps weakCollatz41 s c₁ = some c₂⊢ reachPos c₁ c₃ exact ⟨s + k, k:ℕc₁:Cfg 41 2c₂:Cfg 41 2c₃:Cfg 41 2h₂:nSteps weakCollatz41 k c₂ = some c₃s:ℕhs:1 ≤ sheq:nSteps weakCollatz41 s c₁ = some c₂⊢ 1 ≤ s + k All goals completed! 🐙, nSteps_bind_eq heq h₂⟩private theorem sweep1R {q : Fin 41} (h : ∀ L R, step weakCollatz41 ⟨q, ⟨1, L, R⟩⟩ = some ⟨q, Tape.mk' (L.cons 1) R⟩) (k : ℕ) (L R : ListBlank (Fin 2)) : nSteps weakCollatz41 k ⟨q, Tape.mk' L (ones k R)⟩ = some ⟨q, Tape.mk' (ones k L) R⟩ := q:Fin 41h:∀ (L R : ListBlank (Fin 2)), step weakCollatz41 { state := q, tape := { head := 1, left := L, right := R } } = some { state := q, tape := Tape.mk' (ListBlank.cons 1 L) R }k:ℕL:ListBlank (Fin 2)R:ListBlank (Fin 2)⊢ nSteps weakCollatz41 k { state := q, tape := Tape.mk' L (ones k R) } = some { state := q, tape := Tape.mk' (ones k L) R } induction k generalizing L with q:Fin 41h:∀ (L R : ListBlank (Fin 2)), step weakCollatz41 { state := q, tape := { head := 1, left := L, right := R } } = some { state := q, tape := Tape.mk' (ListBlank.cons 1 L) R }R:ListBlank (Fin 2)L:ListBlank (Fin 2)⊢ nSteps weakCollatz41 0 { state := q, tape := Tape.mk' L (ones 0 R) } = some { state := q, tape := Tape.mk' (ones 0 L) R } All goals completed! 🐙 q:Fin 41h:∀ (L R : ListBlank (Fin 2)), step weakCollatz41 { state := q, tape := { head := 1, left := L, right := R } } = some { state := q, tape := Tape.mk' (ListBlank.cons 1 L) R }R:ListBlank (Fin 2)k:ℕih:∀ (L : ListBlank (Fin 2)), nSteps weakCollatz41 k { state := q, tape := Tape.mk' L (ones k R) } = some { state := q, tape := Tape.mk' (ones k L) R }L:ListBlank (Fin 2)⊢ nSteps weakCollatz41 (k + 1) { state := q, tape := Tape.mk' L (ones (k + 1) R) } = some { state := q, tape := Tape.mk' (ones (k + 1) L) R } All goals completed! 🐙private theorem sweep1L {q : Fin 41} (h : ∀ L R, step weakCollatz41 ⟨q, ⟨1, L, R⟩⟩ = some ⟨q, mkL L (R.cons 1)⟩) (k : ℕ) (L R : ListBlank (Fin 2)) : nSteps weakCollatz41 k ⟨q, mkL (ones k L) R⟩ = some ⟨q, mkL L (ones k R)⟩ := q:Fin 41h:∀ (L R : ListBlank (Fin 2)), step weakCollatz41 { state := q, tape := { head := 1, left := L, right := R } } = some { state := q, tape := mkL L (ListBlank.cons 1 R) }k:ℕL:ListBlank (Fin 2)R:ListBlank (Fin 2)⊢ nSteps weakCollatz41 k { state := q, tape := mkL (ones k L) R } = some { state := q, tape := mkL L (ones k R) } induction k generalizing R with q:Fin 41h:∀ (L R : ListBlank (Fin 2)), step weakCollatz41 { state := q, tape := { head := 1, left := L, right := R } } = some { state := q, tape := mkL L (ListBlank.cons 1 R) }L:ListBlank (Fin 2)R:ListBlank (Fin 2)⊢ nSteps weakCollatz41 0 { state := q, tape := mkL (ones 0 L) R } = some { state := q, tape := mkL L (ones 0 R) } All goals completed! 🐙 q:Fin 41h:∀ (L R : ListBlank (Fin 2)), step weakCollatz41 { state := q, tape := { head := 1, left := L, right := R } } = some { state := q, tape := mkL L (ListBlank.cons 1 R) }L:ListBlank (Fin 2)k:ℕih:∀ (R : ListBlank (Fin 2)), nSteps weakCollatz41 k { state := q, tape := mkL (ones k L) R } = some { state := q, tape := mkL L (ones k R) }R:ListBlank (Fin 2)⊢ nSteps weakCollatz41 (k + 1) { state := q, tape := mkL (ones (k + 1) L) R } = some { state := q, tape := mkL L (ones (k + 1) R) } All goals completed! 🐙private theorem erase1L {q : Fin 41} (h : ∀ L R, step weakCollatz41 ⟨q, ⟨1, L, R⟩⟩ = some ⟨q, mkL L (R.cons 0)⟩) (k : ℕ) (L : ListBlank (Fin 2)) : nSteps weakCollatz41 k ⟨q, mkL (ones k L) B0⟩ = some ⟨q, mkL L B0⟩ := q:Fin 41h:∀ (L R : ListBlank (Fin 2)), step weakCollatz41 { state := q, tape := { head := 1, left := L, right := R } } = some { state := q, tape := mkL L (ListBlank.cons 0 R) }k:ℕL:ListBlank (Fin 2)⊢ nSteps weakCollatz41 k { state := q, tape := mkL (ones k L) B0 } = some { state := q, tape := mkL L B0 } induction k with q:Fin 41h:∀ (L R : ListBlank (Fin 2)), step weakCollatz41 { state := q, tape := { head := 1, left := L, right := R } } = some { state := q, tape := mkL L (ListBlank.cons 0 R) }L:ListBlank (Fin 2)⊢ nSteps weakCollatz41 0 { state := q, tape := mkL (ones 0 L) B0 } = some { state := q, tape := mkL L B0 } All goals completed! 🐙 q:Fin 41h:∀ (L R : ListBlank (Fin 2)), step weakCollatz41 { state := q, tape := { head := 1, left := L, right := R } } = some { state := q, tape := mkL L (ListBlank.cons 0 R) }L:ListBlank (Fin 2)k:ℕih:nSteps weakCollatz41 k { state := q, tape := mkL (ones k L) B0 } = some { state := q, tape := mkL L B0 }⊢ nSteps weakCollatz41 (k + 1) { state := q, tape := mkL (ones (k + 1) L) B0 } = some { state := q, tape := mkL L B0 } All goals completed! 🐙

Canonical Stage Checkpoint & 1-Pass Triple-Build

private def baseCX (c x : ℕ) : ListBlank (Fin 2) := ones x ((ones c B0).cons 0)

Canonical stage checkpoint: 0^∞ 1^c 0 1^x 0 [1] 1^(y - 1) 0^∞ in state 12.

private def stageCfg (c x y : ℕ) : Cfg 41 2 := ⟨12, Tape.mk' ((baseCX c x).cons 0) (ones y B0)⟩private def tripleCfg (p rem : ℕ) : Cfg 41 2 := ⟨2, mkL (ones rem ((ones p B0).cons 0)) ((ones p ((ones p B0).cons 0)).cons 0)⟩private theorem boot_to_triple : reachPos init (tripleCfg 0 3) := ⊢ reachPos init (tripleCfg 0 3) refine ⟨6, ⊢ 1 ≤ 6 All goals completed! 🐙, ?_⟩ ⊢ nSteps weakCollatz41 6 { state := 0, tape := { head := 0, left := B0, right := B0 } } = some (tripleCfg 0 3) All goals completed! 🐙private theorem triple_step (p rem : ℕ) : reachPos (tripleCfg p (rem + 1)) (tripleCfg (p + 1) rem) := p:ℕrem:ℕ⊢ reachPos (tripleCfg p (rem + 1)) (tripleCfg (p + 1) rem) p:ℕrem:ℕ⊢ reachPos { state := 2, tape := mkL (ones (rem + 1) (ListBlank.cons 0 (ones p B0))) (ListBlank.cons 0 (ones p (ListBlank.cons 0 (ones p B0)))) } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)⊢ reachPos { state := 2, tape := mkL (ones (rem + 1) (ListBlank.cons 0 (ones p B0))) (ListBlank.cons 0 (ones p (ListBlank.cons 0 (ones p B0)))) } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)⊢ reachPos { state := 2, tape := mkL (ones (rem + 1) (ListBlank.cons 0 (ones p B0))) (ListBlank.cons 0 (ones p (ListBlank.cons 0 (ones p B0)))) } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)⊢ reachPos { state := 2, tape := mkL (ones (rem + 1) Lp) Rp } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)⊢ reachPos { state := 2, tape := { head := 1, left := ones rem Lp, right := Rp } } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)⊢ reachPos { state := 3, tape := Tape.mk' (ListBlank.cons 0 (ones rem Lp)) Rp } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)⊢ reachPos { state := 3, tape := Tape.mk' (ListBlank.cons 0 (ones rem Lp)) (ListBlank.cons 0 (ones p Lp)) } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)⊢ reachPos { state := 3, tape := { head := 0, left := ListBlank.cons 0 (ones rem Lp), right := ones p Lp } } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)⊢ reachPos { state := 4, tape := Tape.mk' (ListBlank.cons 1 (ListBlank.cons 0 (ones rem Lp))) (ones p Lp) } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)⊢ reachPos { state := 4, tape := Tape.mk' (ones 1 (ListBlank.cons 0 (ones rem Lp))) (ones p Lp) } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)⊢ reachPos { state := 4, tape := Tape.mk' (ones p (ones 1 (ListBlank.cons 0 (ones rem Lp)))) Lp } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)⊢ reachPos { state := 4, tape := Tape.mk' (ones (p + 1) (ListBlank.cons 0 (ones rem Lp))) Lp } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)⊢ reachPos { state := 4, tape := Tape.mk' (ones (p + 1) (ListBlank.cons 0 (ones rem (ListBlank.cons 0 (ones p B0))))) (ListBlank.cons 0 (ones p B0)) } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)⊢ reachPos { state := 4, tape := { head := 0, left := ones (p + 1) (ListBlank.cons 0 (ones rem (ListBlank.cons 0 (ones p B0)))), right := ones p B0 } } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)⊢ reachPos { state := 5, tape := Tape.mk' (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones rem (ListBlank.cons 0 (ones p B0)))))) (ones p B0) } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)⊢ reachPos { state := 5, tape := Tape.mk' (ones p (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones rem (ListBlank.cons 0 (ones p B0))))))) B0 } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)⊢ reachPos { state := 5, tape := { head := 0, left := ones p (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones rem (ListBlank.cons 0 (ones p B0)))))), right := B0 } } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)⊢ reachPos { state := 6, tape := mkL (ones p (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones rem (ListBlank.cons 0 (ones p B0))))))) (ListBlank.cons 1 B0) } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)⊢ reachPos { state := 6, tape := mkL (ones p (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones rem (ListBlank.cons 0 (ones p B0))))))) (ones 1 B0) } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)⊢ reachPos { state := 6, tape := mkL (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones rem (ListBlank.cons 0 (ones p B0)))))) (ones p (ones 1 B0)) } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)⊢ reachPos { state := 6, tape := { head := 0, left := ones (p + 1) (ListBlank.cons 0 (ones rem (ListBlank.cons 0 (ones p B0)))), right := ones (p + 1) B0 } } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)⊢ reachPos { state := 7, tape := mkL (ones (p + 1) (ListBlank.cons 0 (ones rem (ListBlank.cons 0 (ones p B0))))) (ListBlank.cons 0 (ones (p + 1) B0)) } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)⊢ reachPos { state := 7, tape := mkL (ListBlank.cons 0 (ones rem (ListBlank.cons 0 (ones p B0)))) (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0))) } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)⊢ reachPos { state := 7, tape := { head := 0, left := ones rem (ListBlank.cons 0 (ones p B0)), right := ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)) } } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)⊢ reachPos { state := 8, tape := mkL (ones rem (ListBlank.cons 0 (ones p B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)Rn:ListBlank (Fin 2) := ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))⊢ reachPos { state := 8, tape := mkL (ones rem (ListBlank.cons 0 (ones p B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)Rn:ListBlank (Fin 2) := ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))⊢ reachPos { state := 8, tape := mkL (ones rem (ListBlank.cons 0 (ones p B0))) Rn } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)Rn:ListBlank (Fin 2) := ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))⊢ reachPos { state := 8, tape := mkL (ListBlank.cons 0 (ones p B0)) (ones rem Rn) } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)Rn:ListBlank (Fin 2) := ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))⊢ reachPos { state := 8, tape := { head := 0, left := ones p B0, right := ones rem Rn } } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)Rn:ListBlank (Fin 2) := ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))⊢ reachPos { state := 9, tape := mkL (ones p B0) (ListBlank.cons 0 (ones rem Rn)) } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)Rn:ListBlank (Fin 2) := ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))⊢ reachPos { state := 9, tape := mkL B0 (ones p (ListBlank.cons 0 (ones rem Rn))) } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)Rn:ListBlank (Fin 2) := ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))⊢ reachPos { state := 9, tape := { head := 0, left := B0, right := ones p (ListBlank.cons 0 (ones rem Rn)) } } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)Rn:ListBlank (Fin 2) := ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))⊢ reachPos { state := 10, tape := Tape.mk' (ListBlank.cons 1 B0) (ones p (ListBlank.cons 0 (ones rem Rn))) } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)Rn:ListBlank (Fin 2) := ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))⊢ reachPos { state := 10, tape := Tape.mk' (ones 1 B0) (ones p (ListBlank.cons 0 (ones rem Rn))) } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)Rn:ListBlank (Fin 2) := ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))⊢ reachPos { state := 10, tape := Tape.mk' (ones p (ones 1 B0)) (ListBlank.cons 0 (ones rem Rn)) } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)Rn:ListBlank (Fin 2) := ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))⊢ reachPos { state := 10, tape := { head := 0, left := ones (p + 1) B0, right := ones rem Rn } } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)Rn:ListBlank (Fin 2) := ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))⊢ reachPos { state := 11, tape := Tape.mk' (ListBlank.cons 0 (ones (p + 1) B0)) (ones rem Rn) } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)Rn:ListBlank (Fin 2) := ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))⊢ reachPos { state := 11, tape := Tape.mk' (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) Rn } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)Rn:ListBlank (Fin 2) := ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))⊢ reachPos { state := 11, tape := Tape.mk' (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } p:ℕrem:ℕLp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p B0)Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones p Lp)Rn:ListBlank (Fin 2) := ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))⊢ reachPos { state := 11, tape := { head := 0, left := ones rem (ListBlank.cons 0 (ones (p + 1) B0)), right := ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)) } } { state := 2, tape := mkL (ones rem (ListBlank.cons 0 (ones (p + 1) B0))) (ListBlank.cons 0 (ones (p + 1) (ListBlank.cons 0 (ones (p + 1) B0)))) } All goals completed! 🐙private theorem triple_many (p rem : ℕ) : rem = 0 ∨ reachPos (tripleCfg p rem) (tripleCfg (p + rem) 0) := p:ℕrem:ℕ⊢ rem = 0 ∨ reachPos (tripleCfg p rem) (tripleCfg (p + rem) 0) induction rem generalizing p with p:ℕ⊢ 0 = 0 ∨ reachPos (tripleCfg p 0) (tripleCfg (p + 0) 0) All goals completed! 🐙 rem:ℕih:∀ (p : ℕ), rem = 0 ∨ reachPos (tripleCfg p rem) (tripleCfg (p + rem) 0)p:ℕ⊢ rem + 1 = 0 ∨ reachPos (tripleCfg p (rem + 1)) (tripleCfg (p + (rem + 1)) 0) rem:ℕih:∀ (p : ℕ), rem = 0 ∨ reachPos (tripleCfg p rem) (tripleCfg (p + rem) 0)p:ℕ⊢ reachPos (tripleCfg p (rem + 1)) (tripleCfg (p + (rem + 1)) 0) p:ℕih:∀ (p : ℕ), 0 = 0 ∨ reachPos (tripleCfg p 0) (tripleCfg (p + 0) 0)⊢ reachPos (tripleCfg p (0 + 1)) (tripleCfg (p + (0 + 1)) 0)rem:ℕih:∀ (p : ℕ), rem = 0 ∨ reachPos (tripleCfg p rem) (tripleCfg (p + rem) 0)p:ℕhrest:reachPos (tripleCfg (p + 1) rem) (tripleCfg (p + 1 + rem) 0)⊢ reachPos (tripleCfg p (rem + 1)) (tripleCfg (p + (rem + 1)) 0) p:ℕih:∀ (p : ℕ), 0 = 0 ∨ reachPos (tripleCfg p 0) (tripleCfg (p + 0) 0)⊢ reachPos (tripleCfg p (0 + 1)) (tripleCfg (p + (0 + 1)) 0) p:ℕih:∀ (p : ℕ), 0 = 0 ∨ reachPos (tripleCfg p 0) (tripleCfg (p + 0) 0)⊢ reachPos (tripleCfg p 1) (tripleCfg (p + 1) 0) All goals completed! 🐙 rem:ℕih:∀ (p : ℕ), rem = 0 ∨ reachPos (tripleCfg p rem) (tripleCfg (p + rem) 0)p:ℕhrest:reachPos (tripleCfg (p + 1) rem) (tripleCfg (p + 1 + rem) 0)⊢ reachPos (tripleCfg p (rem + 1)) (tripleCfg (p + (rem + 1)) 0) rem:ℕih:∀ (p : ℕ), rem = 0 ∨ reachPos (tripleCfg p rem) (tripleCfg (p + rem) 0)p:ℕhrest:reachPos (tripleCfg (p + 1) rem) (tripleCfg (p + 1 + rem) 0)⊢ reachPos (tripleCfg p (rem + 1)) (tripleCfg (p + 1 + rem) 0) All goals completed! 🐙private theorem triple_finish (a : ℕ) : reachPos (tripleCfg (a + 2) 0) (stageCfg (a + 2) (a + 2) (a + 2)) := a:ℕ⊢ reachPos (tripleCfg (a + 2) 0) (stageCfg (a + 2) (a + 2) (a + 2)) a:ℕA:ℕ := a + 2⊢ reachPos (tripleCfg (a + 2) 0) (stageCfg (a + 2) (a + 2) (a + 2)) a:ℕA:ℕ := a + 2⊢ reachPos { state := 2, tape := mkL (ones 0 (ListBlank.cons 0 (ones (a + 2) B0))) (ListBlank.cons 0 (ones (a + 2) (ListBlank.cons 0 (ones (a + 2) B0)))) } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones (a + 2) (ListBlank.cons 0 (ones (a + 2) B0)))) (ones (a + 2) B0) } a:ℕA:ℕ := a + 2⊢ reachPos { state := 2, tape := mkL (ones 0 (ListBlank.cons 0 (ones A B0))) (ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))) } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))) (ones A B0) } a:ℕA:ℕ := a + 2⊢ reachPos { state := 2, tape := { head := 0, left := ones A B0, right := ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0))) } } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))) (ones A B0) } a:ℕA:ℕ := a + 2⊢ reachPos { state := 34, tape := mkL (ones A B0) (ListBlank.cons 1 (ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0))))) } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))) (ones A B0) } a:ℕA:ℕ := a + 2Rtail:ListBlank (Fin 2) := ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))⊢ reachPos { state := 34, tape := mkL (ones A B0) (ListBlank.cons 1 (ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0))))) } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))) (ones A B0) } a:ℕA:ℕ := a + 2Rtail:ListBlank (Fin 2) := ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))⊢ reachPos { state := 34, tape := mkL (ones A B0) (ones 1 Rtail) } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))) (ones A B0) } a:ℕA:ℕ := a + 2Rtail:ListBlank (Fin 2) := ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))⊢ reachPos { state := 34, tape := mkL B0 (ones A (ones 1 Rtail)) } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))) (ones A B0) } a:ℕA:ℕ := a + 2Rtail:ListBlank (Fin 2) := ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))⊢ reachPos { state := 34, tape := { head := 0, left := B0, right := ones (A + 1) Rtail } } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))) (ones A B0) } a:ℕA:ℕ := a + 2Rtail:ListBlank (Fin 2) := ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))⊢ reachPos { state := 3, tape := Tape.mk' (ListBlank.cons 0 B0) (ones (A + 1) Rtail) } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))) (ones A B0) } a:ℕA:ℕ := a + 2Rtail:ListBlank (Fin 2) := ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))⊢ reachPos { state := 3, tape := { head := 1, left := B0, right := ones A Rtail } } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))) (ones A B0) } a:ℕA:ℕ := a + 2Rtail:ListBlank (Fin 2) := ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))⊢ reachPos { state := 35, tape := Tape.mk' (ListBlank.cons 0 B0) (ones A Rtail) } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))) (ones A B0) } a:ℕA:ℕ := a + 2Rtail:ListBlank (Fin 2) := ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))⊢ reachPos { state := 35, tape := { head := 1, left := B0, right := ones (a + 1) Rtail } } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones (a + 1 + 1) (ListBlank.cons 0 (ones (a + 1 + 1) B0)))) (ones (a + 1 + 1) B0) } a:ℕA:ℕ := a + 2Rtail:ListBlank (Fin 2) := ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))⊢ reachPos { state := 36, tape := Tape.mk' (ListBlank.cons 1 B0) (ones (a + 1) Rtail) } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones (a + 1 + 1) (ListBlank.cons 0 (ones (a + 1 + 1) B0)))) (ones (a + 1 + 1) B0) } a:ℕA:ℕ := a + 2Rtail:ListBlank (Fin 2) := ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))⊢ reachPos { state := 36, tape := Tape.mk' (ones 1 B0) (ones (a + 1) Rtail) } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones (a + 1 + 1) (ListBlank.cons 0 (ones (a + 1 + 1) B0)))) (ones (a + 1 + 1) B0) } a:ℕA:ℕ := a + 2Rtail:ListBlank (Fin 2) := ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))⊢ reachPos { state := 36, tape := Tape.mk' (ones (a + 1) (ones 1 B0)) Rtail } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones (a + 1 + 1) (ListBlank.cons 0 (ones (a + 1 + 1) B0)))) (ones (a + 1 + 1) B0) } a:ℕA:ℕ := a + 2Rtail:ListBlank (Fin 2) := ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))⊢ reachPos { state := 36, tape := Tape.mk' (ones A B0) Rtail } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))) (ones A B0) } a:ℕA:ℕ := a + 2Rtail:ListBlank (Fin 2) := ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))⊢ reachPos { state := 36, tape := Tape.mk' (ones A B0) (ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))) } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))) (ones A B0) } a:ℕA:ℕ := a + 2Rtail:ListBlank (Fin 2) := ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))⊢ reachPos { state := 36, tape := { head := 0, left := ones A B0, right := ones A (ListBlank.cons 0 (ones A B0)) } } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))) (ones A B0) } a:ℕA:ℕ := a + 2Rtail:ListBlank (Fin 2) := ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))⊢ reachPos { state := 37, tape := Tape.mk' (ListBlank.cons 0 (ones A B0)) (ones A (ListBlank.cons 0 (ones A B0))) } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))) (ones A B0) } a:ℕA:ℕ := a + 2Rtail:ListBlank (Fin 2) := ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))⊢ reachPos { state := 37, tape := Tape.mk' (ones A (ListBlank.cons 0 (ones A B0))) (ListBlank.cons 0 (ones A B0)) } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))) (ones A B0) } a:ℕA:ℕ := a + 2Rtail:ListBlank (Fin 2) := ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))⊢ reachPos { state := 37, tape := { head := 0, left := ones A (ListBlank.cons 0 (ones A B0)), right := ones A B0 } } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones A (ListBlank.cons 0 (ones A B0)))) (ones A B0) } All goals completed! 🐙private theorem triple_from_zero (a : ℕ) : reachPos (tripleCfg 0 (a + 2)) (stageCfg (a + 2) (a + 2) (a + 2)) := a:ℕ⊢ reachPos (tripleCfg 0 (a + 2)) (stageCfg (a + 2) (a + 2) (a + 2)) a:ℕh0:a + 2 = 0⊢ reachPos (tripleCfg 0 (a + 2)) (stageCfg (a + 2) (a + 2) (a + 2))a:ℕhmany:reachPos (tripleCfg 0 (a + 2)) (tripleCfg (0 + (a + 2)) 0)⊢ reachPos (tripleCfg 0 (a + 2)) (stageCfg (a + 2) (a + 2) (a + 2)) a:ℕh0:a + 2 = 0⊢ reachPos (tripleCfg 0 (a + 2)) (stageCfg (a + 2) (a + 2) (a + 2)) a:ℕh0:a + 2 = 0⊢ False; All goals completed! 🐙 a:ℕhmany:reachPos (tripleCfg 0 (a + 2)) (tripleCfg (0 + (a + 2)) 0)⊢ reachPos (tripleCfg 0 (a + 2)) (stageCfg (a + 2) (a + 2) (a + 2)) a:ℕhmany:reachPos (tripleCfg 0 (a + 2)) (tripleCfg (a + 2) 0)⊢ reachPos (tripleCfg 0 (a + 2)) (stageCfg (a + 2) (a + 2) (a + 2)) All goals completed! 🐙private theorem init_reaches_stage3 : reachPos init (stageCfg 3 3 3) := reachPos_trans boot_to_triple (triple_from_zero 1)

Zero-Gap In-Place terras Evaluation

private def evenCfg (L0 : ListBlank (Fin 2)) (a b : ℕ) : Cfg 41 2 := ⟨14, Tape.mk' ((ones a L0).cons 0) (ones b B0)⟩private theorem even_step (L0 : ListBlank (Fin 2)) (a b : ℕ) : reachPos (evenCfg L0 a (b + 2)) (evenCfg L0 (a + 1) b) := L0:ListBlank (Fin 2)a:ℕb:ℕ⊢ reachPos (evenCfg L0 a (b + 2)) (evenCfg L0 (a + 1) b) L0:ListBlank (Fin 2)a:ℕb:ℕ⊢ reachPos { state := 14, tape := Tape.mk' (ListBlank.cons 0 (ones a L0)) (ones (b + 2) B0) } { state := 14, tape := Tape.mk' (ListBlank.cons 0 (ones (a + 1) L0)) (ones b B0) } L0:ListBlank (Fin 2)a:ℕb:ℕ⊢ reachPos { state := 14, tape := Tape.mk' (ones (b + 2) (ListBlank.cons 0 (ones a L0))) B0 } { state := 14, tape := Tape.mk' (ListBlank.cons 0 (ones (a + 1) L0)) (ones b B0) } L0:ListBlank (Fin 2)a:ℕb:ℕ⊢ reachPos { state := 14, tape := { head := 0, left := ones (b + 2) (ListBlank.cons 0 (ones a L0)), right := B0 } } { state := 14, tape := Tape.mk' (ListBlank.cons 0 (ones (a + 1) L0)) (ones b B0) } L0:ListBlank (Fin 2)a:ℕb:ℕ⊢ reachPos { state := 15, tape := mkL (ones (b + 2) (ListBlank.cons 0 (ones a L0))) (ListBlank.cons 0 B0) } { state := 14, tape := Tape.mk' (ListBlank.cons 0 (ones (a + 1) L0)) (ones b B0) } L0:ListBlank (Fin 2)a:ℕb:ℕ⊢ reachPos { state := 15, tape := { head := 1, left := ones (b + 1) (ListBlank.cons 0 (ones a L0)), right := B0 } } { state := 14, tape := Tape.mk' (ListBlank.cons 0 (ones (a + 1) L0)) (ones b B0) } L0:ListBlank (Fin 2)a:ℕb:ℕ⊢ reachPos { state := 16, tape := mkL (ones (b + 1) (ListBlank.cons 0 (ones a L0))) (ListBlank.cons 0 B0) } { state := 14, tape := Tape.mk' (ListBlank.cons 0 (ones (a + 1) L0)) (ones b B0) } L0:ListBlank (Fin 2)a:ℕb:ℕ⊢ reachPos { state := 16, tape := { head := 1, left := ones b (ListBlank.cons 0 (ones a L0)), right := B0 } } { state := 14, tape := Tape.mk' (ListBlank.cons 0 (ones (a + 1) L0)) (ones b B0) } L0:ListBlank (Fin 2)a:ℕb:ℕ⊢ reachPos { state := 17, tape := mkL (ones b (ListBlank.cons 0 (ones a L0))) (ListBlank.cons 1 B0) } { state := 14, tape := Tape.mk' (ListBlank.cons 0 (ones (a + 1) L0)) (ones b B0) } L0:ListBlank (Fin 2)a:ℕb:ℕ⊢ reachPos { state := 17, tape := mkL (ones b (ListBlank.cons 0 (ones a L0))) (ones 1 B0) } { state := 14, tape := Tape.mk' (ListBlank.cons 0 (ones (a + 1) L0)) (ones b B0) } L0:ListBlank (Fin 2)a:ℕb:ℕ⊢ reachPos { state := 17, tape := mkL (ListBlank.cons 0 (ones a L0)) (ones b (ones 1 B0)) } { state := 14, tape := Tape.mk' (ListBlank.cons 0 (ones (a + 1) L0)) (ones b B0) } L0:ListBlank (Fin 2)a:ℕb:ℕ⊢ reachPos { state := 17, tape := { head := 0, left := ones a L0, right := ones (b + 1) B0 } } { state := 14, tape := Tape.mk' (ListBlank.cons 0 (ones (a + 1) L0)) (ones b B0) } L0:ListBlank (Fin 2)a:ℕb:ℕ⊢ reachPos { state := 13, tape := Tape.mk' (ListBlank.cons 1 (ones a L0)) (ones (b + 1) B0) } { state := 14, tape := Tape.mk' (ListBlank.cons 0 (ones (a + 1) L0)) (ones b B0) } L0:ListBlank (Fin 2)a:ℕb:ℕ⊢ reachPos { state := 13, tape := { head := 1, left := ones (a + 1) L0, right := ones b B0 } } { state := 14, tape := Tape.mk' (ListBlank.cons 0 (ones (a + 1) L0)) (ones b B0) } All goals completed! 🐙private theorem even_many (L0 : ListBlank (Fin 2)) (a k r : ℕ) : k = 0 ∨ reachPos (evenCfg L0 a (2 * k + r)) (evenCfg L0 (a + k) r) := L0:ListBlank (Fin 2)a:ℕk:ℕr:ℕ⊢ k = 0 ∨ reachPos (evenCfg L0 a (2 * k + r)) (evenCfg L0 (a + k) r) induction k generalizing a with L0:ListBlank (Fin 2)r:ℕa:ℕ⊢ 0 = 0 ∨ reachPos (evenCfg L0 a (2 * 0 + r)) (evenCfg L0 (a + 0) r) All goals completed! 🐙 L0:ListBlank (Fin 2)r:ℕk:ℕih:∀ (a : ℕ), k = 0 ∨ reachPos (evenCfg L0 a (2 * k + r)) (evenCfg L0 (a + k) r)a:ℕ⊢ k + 1 = 0 ∨ reachPos (evenCfg L0 a (2 * (k + 1) + r)) (evenCfg L0 (a + (k + 1)) r) L0:ListBlank (Fin 2)r:ℕk:ℕih:∀ (a : ℕ), k = 0 ∨ reachPos (evenCfg L0 a (2 * k + r)) (evenCfg L0 (a + k) r)a:ℕ⊢ reachPos (evenCfg L0 a (2 * (k + 1) + r)) (evenCfg L0 (a + (k + 1)) r) L0:ListBlank (Fin 2)r:ℕk:ℕih:∀ (a : ℕ), k = 0 ∨ reachPos (evenCfg L0 a (2 * k + r)) (evenCfg L0 (a + k) r)a:ℕ⊢ reachPos (evenCfg L0 a (2 * k + r + 2)) (evenCfg L0 (a + (k + 1)) r) L0:ListBlank (Fin 2)r:ℕa:ℕih:∀ (a : ℕ), 0 = 0 ∨ reachPos (evenCfg L0 a (2 * 0 + r)) (evenCfg L0 (a + 0) r)⊢ reachPos (evenCfg L0 a (2 * 0 + r + 2)) (evenCfg L0 (a + (0 + 1)) r)L0:ListBlank (Fin 2)r:ℕk:ℕih:∀ (a : ℕ), k = 0 ∨ reachPos (evenCfg L0 a (2 * k + r)) (evenCfg L0 (a + k) r)a:ℕhrest:reachPos (evenCfg L0 (a + 1) (2 * k + r)) (evenCfg L0 (a + 1 + k) r)⊢ reachPos (evenCfg L0 a (2 * k + r + 2)) (evenCfg L0 (a + (k + 1)) r) L0:ListBlank (Fin 2)r:ℕa:ℕih:∀ (a : ℕ), 0 = 0 ∨ reachPos (evenCfg L0 a (2 * 0 + r)) (evenCfg L0 (a + 0) r)⊢ reachPos (evenCfg L0 a (2 * 0 + r + 2)) (evenCfg L0 (a + (0 + 1)) r) L0:ListBlank (Fin 2)r:ℕa:ℕih:∀ (a : ℕ), 0 = 0 ∨ reachPos (evenCfg L0 a (2 * 0 + r)) (evenCfg L0 (a + 0) r)⊢ reachPos (evenCfg L0 a (r + 2)) (evenCfg L0 (a + 1) r) All goals completed! 🐙 L0:ListBlank (Fin 2)r:ℕk:ℕih:∀ (a : ℕ), k = 0 ∨ reachPos (evenCfg L0 a (2 * k + r)) (evenCfg L0 (a + k) r)a:ℕhrest:reachPos (evenCfg L0 (a + 1) (2 * k + r)) (evenCfg L0 (a + 1 + k) r)⊢ reachPos (evenCfg L0 a (2 * k + r + 2)) (evenCfg L0 (a + (k + 1)) r) L0:ListBlank (Fin 2)r:ℕk:ℕih:∀ (a : ℕ), k = 0 ∨ reachPos (evenCfg L0 a (2 * k + r)) (evenCfg L0 (a + k) r)a:ℕhrest:reachPos (evenCfg L0 (a + 1) (2 * k + r)) (evenCfg L0 (a + 1 + k) r)⊢ reachPos (evenCfg L0 a (2 * k + r + 2)) (evenCfg L0 (a + 1 + k) r) All goals completed! 🐙private def oddCfg (L0 : ListBlank (Fin 2)) (m r : ℕ) : Cfg 41 2 := ⟨18, mkL (ones m L0) ((ones r B0).cons 0)⟩private theorem odd_step (L0 : ListBlank (Fin 2)) (m r : ℕ) : reachPos (oddCfg L0 (m + 1) r) (oddCfg L0 m (r + 3)) := L0:ListBlank (Fin 2)m:ℕr:ℕ⊢ reachPos (oddCfg L0 (m + 1) r) (oddCfg L0 m (r + 3)) L0:ListBlank (Fin 2)m:ℕr:ℕ⊢ reachPos { state := 18, tape := mkL (ones (m + 1) L0) (ListBlank.cons 0 (ones r B0)) } { state := 18, tape := mkL (ones m L0) (ListBlank.cons 0 (ones (r + 3) B0)) } L0:ListBlank (Fin 2)m:ℕr:ℕ⊢ reachPos { state := 18, tape := { head := 1, left := ones m L0, right := ListBlank.cons 0 (ones r B0) } } { state := 18, tape := mkL (ones m L0) (ListBlank.cons 0 (ones (r + 3) B0)) } L0:ListBlank (Fin 2)m:ℕr:ℕ⊢ reachPos { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones m L0)) (ListBlank.cons 0 (ones r B0)) } { state := 18, tape := mkL (ones m L0) (ListBlank.cons 0 (ones (r + 3) B0)) } L0:ListBlank (Fin 2)m:ℕr:ℕ⊢ reachPos { state := 12, tape := { head := 0, left := ListBlank.cons 0 (ones m L0), right := ones r B0 } } { state := 18, tape := mkL (ones m L0) (ListBlank.cons 0 (ones (r + 3) B0)) } L0:ListBlank (Fin 2)m:ℕr:ℕ⊢ reachPos { state := 19, tape := Tape.mk' (ListBlank.cons 1 (ListBlank.cons 0 (ones m L0))) (ones r B0) } { state := 18, tape := mkL (ones m L0) (ListBlank.cons 0 (ones (r + 3) B0)) } L0:ListBlank (Fin 2)m:ℕr:ℕ⊢ reachPos { state := 19, tape := Tape.mk' (ones 1 (ListBlank.cons 0 (ones m L0))) (ones r B0) } { state := 18, tape := mkL (ones m L0) (ListBlank.cons 0 (ones (r + 3) B0)) } L0:ListBlank (Fin 2)m:ℕr:ℕ⊢ reachPos { state := 19, tape := Tape.mk' (ones r (ones 1 (ListBlank.cons 0 (ones m L0)))) B0 } { state := 18, tape := mkL (ones m L0) (ListBlank.cons 0 (ones (r + 3) B0)) } L0:ListBlank (Fin 2)m:ℕr:ℕ⊢ reachPos { state := 19, tape := { head := 0, left := ones (r + 1) (ListBlank.cons 0 (ones m L0)), right := B0 } } { state := 18, tape := mkL (ones m L0) (ListBlank.cons 0 (ones (r + 3) B0)) } L0:ListBlank (Fin 2)m:ℕr:ℕ⊢ reachPos { state := 20, tape := Tape.mk' (ListBlank.cons 1 (ones (r + 1) (ListBlank.cons 0 (ones m L0)))) B0 } { state := 18, tape := mkL (ones m L0) (ListBlank.cons 0 (ones (r + 3) B0)) } L0:ListBlank (Fin 2)m:ℕr:ℕ⊢ reachPos { state := 20, tape := { head := 0, left := ones (r + 1 + 1) (ListBlank.cons 0 (ones m L0)), right := B0 } } { state := 18, tape := mkL (ones m L0) (ListBlank.cons 0 (ones (r + 3) B0)) } L0:ListBlank (Fin 2)m:ℕr:ℕ⊢ reachPos { state := 21, tape := mkL (ones (r + 1 + 1) (ListBlank.cons 0 (ones m L0))) (ListBlank.cons 1 B0) } { state := 18, tape := mkL (ones m L0) (ListBlank.cons 0 (ones (r + 3) B0)) } L0:ListBlank (Fin 2)m:ℕr:ℕ⊢ reachPos { state := 21, tape := mkL (ones (r + 2) (ListBlank.cons 0 (ones m L0))) (ones 1 B0) } { state := 18, tape := mkL (ones m L0) (ListBlank.cons 0 (ones (r + 3) B0)) } L0:ListBlank (Fin 2)m:ℕr:ℕ⊢ reachPos { state := 21, tape := mkL (ListBlank.cons 0 (ones m L0)) (ones (r + 2) (ones 1 B0)) } { state := 18, tape := mkL (ones m L0) (ListBlank.cons 0 (ones (r + 3) B0)) } L0:ListBlank (Fin 2)m:ℕr:ℕ⊢ reachPos { state := 21, tape := { head := 0, left := ones m L0, right := ones (r + 3) B0 } } { state := 18, tape := mkL (ones m L0) (ListBlank.cons 0 (ones (r + 3) B0)) } All goals completed! 🐙private theorem odd_many (L0 : ListBlank (Fin 2)) (m r : ℕ) : m = 0 ∨ reachPos (oddCfg L0 m r) (oddCfg L0 0 (r + 3 * m)) := L0:ListBlank (Fin 2)m:ℕr:ℕ⊢ m = 0 ∨ reachPos (oddCfg L0 m r) (oddCfg L0 0 (r + 3 * m)) induction m generalizing r with L0:ListBlank (Fin 2)r:ℕ⊢ 0 = 0 ∨ reachPos (oddCfg L0 0 r) (oddCfg L0 0 (r + 3 * 0)) All goals completed! 🐙 L0:ListBlank (Fin 2)m:ℕih:∀ (r : ℕ), m = 0 ∨ reachPos (oddCfg L0 m r) (oddCfg L0 0 (r + 3 * m))r:ℕ⊢ m + 1 = 0 ∨ reachPos (oddCfg L0 (m + 1) r) (oddCfg L0 0 (r + 3 * (m + 1))) L0:ListBlank (Fin 2)m:ℕih:∀ (r : ℕ), m = 0 ∨ reachPos (oddCfg L0 m r) (oddCfg L0 0 (r + 3 * m))r:ℕ⊢ reachPos (oddCfg L0 (m + 1) r) (oddCfg L0 0 (r + 3 * (m + 1))) L0:ListBlank (Fin 2)r:ℕih:∀ (r : ℕ), 0 = 0 ∨ reachPos (oddCfg L0 0 r) (oddCfg L0 0 (r + 3 * 0))⊢ reachPos (oddCfg L0 (0 + 1) r) (oddCfg L0 0 (r + 3 * (0 + 1)))L0:ListBlank (Fin 2)m:ℕih:∀ (r : ℕ), m = 0 ∨ reachPos (oddCfg L0 m r) (oddCfg L0 0 (r + 3 * m))r:ℕhrest:reachPos (oddCfg L0 m (r + 3)) (oddCfg L0 0 (r + 3 + 3 * m))⊢ reachPos (oddCfg L0 (m + 1) r) (oddCfg L0 0 (r + 3 * (m + 1))) L0:ListBlank (Fin 2)r:ℕih:∀ (r : ℕ), 0 = 0 ∨ reachPos (oddCfg L0 0 r) (oddCfg L0 0 (r + 3 * 0))⊢ reachPos (oddCfg L0 (0 + 1) r) (oddCfg L0 0 (r + 3 * (0 + 1))) L0:ListBlank (Fin 2)r:ℕih:∀ (r : ℕ), 0 = 0 ∨ reachPos (oddCfg L0 0 r) (oddCfg L0 0 (r + 3 * 0))⊢ reachPos (oddCfg L0 1 r) (oddCfg L0 0 (r + 3)) All goals completed! 🐙 L0:ListBlank (Fin 2)m:ℕih:∀ (r : ℕ), m = 0 ∨ reachPos (oddCfg L0 m r) (oddCfg L0 0 (r + 3 * m))r:ℕhrest:reachPos (oddCfg L0 m (r + 3)) (oddCfg L0 0 (r + 3 + 3 * m))⊢ reachPos (oddCfg L0 (m + 1) r) (oddCfg L0 0 (r + 3 * (m + 1))) L0:ListBlank (Fin 2)m:ℕih:∀ (r : ℕ), m = 0 ∨ reachPos (oddCfg L0 m r) (oddCfg L0 0 (r + 3 * m))r:ℕhrest:reachPos (oddCfg L0 m (r + 3)) (oddCfg L0 0 (r + 3 + 3 * m))⊢ reachPos (oddCfg L0 (m + 1) r) (oddCfg L0 0 (r + 3 + 3 * m)) All goals completed! 🐙private theorem terras_pos_of_pos {y : ℕ} (hy : 1 ≤ y) : 1 ≤ terras y := y:ℕhy:1 ≤ y⊢ 1 ≤ terras y y:ℕhy:1 ≤ y⊢ 1 ≤ if y % 2 = 0 then y / 2 else (3 * y + 1) / 2 y:ℕhy:1 ≤ yh✝:y % 2 = 0⊢ 1 ≤ y / 2y:ℕhy:1 ≤ yh✝:¬y % 2 = 0⊢ 1 ≤ (3 * y + 1) / 2 y:ℕhy:1 ≤ yh✝:y % 2 = 0⊢ 1 ≤ y / 2y:ℕhy:1 ≤ yh✝:¬y % 2 = 0⊢ 1 ≤ (3 * y + 1) / 2 All goals completed! 🐙private theorem terras_eval (c x y : ℕ) (hy : 1 ≤ y) : reachPos (stageCfg c x y) ⟨24, mkL ((baseCX c x).cons 0) (ones (terras y) B0)⟩ := c:ℕx:ℕy:ℕhy:1 ≤ y⊢ reachPos (stageCfg c x y) { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (terras y) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)⊢ reachPos (stageCfg c x y) { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (terras y) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hev:y % 2 = 0⊢ reachPos (stageCfg c x y) { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (terras y) B0) }c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1⊢ reachPos (stageCfg c x y) { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (terras y) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hev:y % 2 = 0⊢ reachPos (stageCfg c x y) { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (terras y) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hev:y % 2 = 0k:ℕ := y / 2 - 1⊢ reachPos (stageCfg c x y) { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (terras y) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hev:y % 2 = 0k:ℕ := y / 2 - 1hy_eq:y = 2 * k + 2⊢ reachPos (stageCfg c x y) { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (terras y) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hev:y % 2 = 0k:ℕ := y / 2 - 1hy_eq:y = 2 * k + 2hty:terras y = k + 1⊢ reachPos (stageCfg c x y) { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (terras y) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hev:y % 2 = 0k:ℕ := y / 2 - 1hy_eq:y = 2 * k + 2hty:terras y = k + 1⊢ reachPos (stageCfg c x (2 * k + 2)) { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (k + 1) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hev:y % 2 = 0k:ℕ := y / 2 - 1hy_eq:y = 2 * k + 2hty:terras y = k + 1⊢ reachPos { state := 12, tape := Tape.mk' (ListBlank.cons 0 (baseCX c x)) (ones (2 * k + 2) B0) } { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (k + 1) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hev:y % 2 = 0k:ℕ := y / 2 - 1hy_eq:y = 2 * k + 2hty:terras y = k + 1⊢ reachPos { state := 12, tape := Tape.mk' L0 (ones (2 * k + 2) B0) } { state := 24, tape := mkL L0 (ones (k + 1) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hev:y % 2 = 0k:ℕ := y / 2 - 1hy_eq:y = 2 * k + 2hty:terras y = k + 1⊢ reachPos { state := 12, tape := { head := 1, left := L0, right := ones (2 * k + 1) B0 } } { state := 24, tape := mkL L0 (ones (k + 1) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hev:y % 2 = 0k:ℕ := y / 2 - 1hy_eq:y = 2 * k + 2hty:terras y = k + 1⊢ reachPos { state := 13, tape := Tape.mk' (ListBlank.cons 1 L0) (ones (2 * k + 1) B0) } { state := 24, tape := mkL L0 (ones (k + 1) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hev:y % 2 = 0k:ℕ := y / 2 - 1hy_eq:y = 2 * k + 2hty:terras y = k + 1⊢ reachPos { state := 13, tape := { head := 1, left := ListBlank.cons 1 L0, right := ones (2 * k) B0 } } { state := 24, tape := mkL L0 (ones (k + 1) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hev:y % 2 = 0k:ℕ := y / 2 - 1hy_eq:y = 2 * k + 2hty:terras y = k + 1⊢ reachPos { state := 14, tape := Tape.mk' (ListBlank.cons 0 (ListBlank.cons 1 L0)) (ones (2 * k) B0) } { state := 24, tape := mkL L0 (ones (k + 1) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hev:y % 2 = 0k:ℕ := y / 2 - 1hy_eq:y = 2 * k + 2hty:terras y = k + 1⊢ reachPos (evenCfg L0 1 (2 * k + 0)) { state := 24, tape := mkL L0 (ones (k + 1) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hev:y % 2 = 0k:ℕ := y / 2 - 1hy_eq:y = 2 * k + 2hty:terras y = k + 1hev_end:reachPos (evenCfg L0 (k + 1) 0) { state := 24, tape := mkL L0 (ones (k + 1) B0) }⊢ reachPos (evenCfg L0 1 (2 * k + 0)) { state := 24, tape := mkL L0 (ones (k + 1) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hev:y % 2 = 0k:ℕ := y / 2 - 1hy_eq:y = 2 * k + 2hty:terras y = k + 1hev_end:reachPos (evenCfg L0 (k + 1) 0) { state := 24, tape := mkL L0 (ones (k + 1) B0) }hk0:k = 0⊢ reachPos (evenCfg L0 1 (2 * k + 0)) { state := 24, tape := mkL L0 (ones (k + 1) B0) }c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hev:y % 2 = 0k:ℕ := y / 2 - 1hy_eq:y = 2 * k + 2hty:terras y = k + 1hev_end:reachPos (evenCfg L0 (k + 1) 0) { state := 24, tape := mkL L0 (ones (k + 1) B0) }hmany:reachPos (evenCfg L0 1 (2 * k + 0)) (evenCfg L0 (1 + k) 0)⊢ reachPos (evenCfg L0 1 (2 * k + 0)) { state := 24, tape := mkL L0 (ones (k + 1) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hev:y % 2 = 0k:ℕ := y / 2 - 1hy_eq:y = 2 * k + 2hty:terras y = k + 1hev_end:reachPos (evenCfg L0 (k + 1) 0) { state := 24, tape := mkL L0 (ones (k + 1) B0) }hk0:k = 0⊢ reachPos (evenCfg L0 1 (2 * k + 0)) { state := 24, tape := mkL L0 (ones (k + 1) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hev:y % 2 = 0k:ℕ := y / 2 - 1hy_eq:y = 2 * k + 2hty:terras y = k + 1hev_end:reachPos (evenCfg L0 (0 + 1) 0) { state := 24, tape := mkL L0 (ones (0 + 1) B0) }hk0:k = 0⊢ reachPos (evenCfg L0 1 (2 * 0 + 0)) { state := 24, tape := mkL L0 (ones (0 + 1) B0) } All goals completed! 🐙 c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hev:y % 2 = 0k:ℕ := y / 2 - 1hy_eq:y = 2 * k + 2hty:terras y = k + 1hev_end:reachPos (evenCfg L0 (k + 1) 0) { state := 24, tape := mkL L0 (ones (k + 1) B0) }hmany:reachPos (evenCfg L0 1 (2 * k + 0)) (evenCfg L0 (1 + k) 0)⊢ reachPos (evenCfg L0 1 (2 * k + 0)) { state := 24, tape := mkL L0 (ones (k + 1) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hev:y % 2 = 0k:ℕ := y / 2 - 1hy_eq:y = 2 * k + 2hty:terras y = k + 1hev_end:reachPos (evenCfg L0 (k + 1) 0) { state := 24, tape := mkL L0 (ones (k + 1) B0) }hmany:reachPos (evenCfg L0 1 (2 * k + 0)) (evenCfg L0 (k + 1) 0)⊢ reachPos (evenCfg L0 1 (2 * k + 0)) { state := 24, tape := mkL L0 (ones (k + 1) B0) } All goals completed! 🐙 c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1⊢ reachPos (stageCfg c x y) { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (terras y) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2⊢ reachPos (stageCfg c x y) { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (terras y) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1⊢ reachPos (stageCfg c x y) { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (terras y) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2⊢ reachPos (stageCfg c x y) { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (terras y) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2⊢ reachPos (stageCfg c x (2 * k + 1)) { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (3 * k + 2) B0) } cases k with c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2⊢ reachPos (stageCfg c x (2 * 0 + 1)) { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (3 * 0 + 2) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2⊢ reachPos (stageCfg c x 1) { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (0 + 2) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2⊢ reachPos { state := 12, tape := Tape.mk' (ListBlank.cons 0 (baseCX c x)) (ones 1 B0) } { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (0 + 2) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2⊢ reachPos { state := 12, tape := Tape.mk' L0 (ones 1 B0) } { state := 24, tape := mkL L0 (ones 2 B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2⊢ reachPos { state := 12, tape := { head := 1, left := L0, right := B0 } } { state := 24, tape := mkL L0 (ones 2 B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2⊢ reachPos { state := 13, tape := Tape.mk' (ListBlank.cons 1 L0) B0 } { state := 24, tape := mkL L0 (ones 2 B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2⊢ reachPos { state := 13, tape := { head := 0, left := ListBlank.cons 1 L0, right := B0 } } { state := 24, tape := mkL L0 (ones 2 B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2h13:reachPos { state := 13, tape := { head := 0, left := ones 1 L0, right := B0 } } { state := 24, tape := mkL (ones 1 L0) (ones 1 B0) }⊢ reachPos { state := 13, tape := { head := 0, left := ListBlank.cons 1 L0, right := B0 } } { state := 24, tape := mkL L0 (ones 2 B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2h13:reachPos { state := 13, tape := { head := 0, left := ones 1 L0, right := B0 } } { state := 24, tape := mkL (ones 1 L0) (ones 1 B0) }hsw:nSteps weakCollatz41 1 { state := 24, tape := mkL (ones 1 L0) (ones 1 B0) } = some { state := 24, tape := mkL L0 (ones 2 B0) }⊢ reachPos { state := 13, tape := { head := 0, left := ListBlank.cons 1 L0, right := B0 } } { state := 24, tape := mkL L0 (ones 2 B0) } All goals completed! 🐙 c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2k':ℕ⊢ reachPos (stageCfg c x (2 * (k' + 1) + 1)) { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (3 * (k' + 1) + 2) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2k':ℕ⊢ reachPos { state := 12, tape := Tape.mk' (ListBlank.cons 0 (baseCX c x)) (ones (2 * (k' + 1) + 1) B0) } { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (3 * (k' + 1) + 2) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2k':ℕ⊢ reachPos { state := 12, tape := Tape.mk' L0 (ones (2 * (k' + 1) + 1) B0) } { state := 24, tape := mkL L0 (ones (3 * (k' + 1) + 2) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2k':ℕ⊢ reachPos { state := 12, tape := { head := 1, left := L0, right := ones (2 * k' + 2) B0 } } { state := 24, tape := mkL L0 (ones (3 * (k' + 1) + 2) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2k':ℕ⊢ reachPos { state := 13, tape := Tape.mk' (ListBlank.cons 1 L0) (ones (2 * k' + 2) B0) } { state := 24, tape := mkL L0 (ones (3 * (k' + 1) + 2) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2k':ℕ⊢ reachPos { state := 13, tape := { head := 1, left := ListBlank.cons 1 L0, right := ones (2 * k' + 1) B0 } } { state := 24, tape := mkL L0 (ones (3 * (k' + 1) + 2) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2k':ℕ⊢ reachPos { state := 14, tape := Tape.mk' (ListBlank.cons 0 (ListBlank.cons 1 L0)) (ones (2 * k' + 1) B0) } { state := 24, tape := mkL L0 (ones (3 * (k' + 1) + 2) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2k':ℕ⊢ reachPos (evenCfg L0 1 (2 * k' + 1)) { state := 24, tape := mkL L0 (ones (3 * (k' + 1) + 2) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2k':ℕhto_odd:reachPos (evenCfg L0 (k' + 1) 1) (oddCfg L0 (k' + 1) 1)⊢ reachPos (evenCfg L0 1 (2 * k' + 1)) { state := 24, tape := mkL L0 (ones (3 * (k' + 1) + 2) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2k':ℕhto_odd:reachPos (evenCfg L0 (k' + 1) 1) (oddCfg L0 (k' + 1) 1)hev_part:reachPos (evenCfg L0 1 (2 * k' + 1)) (oddCfg L0 (k' + 1) 1)⊢ reachPos (evenCfg L0 1 (2 * k' + 1)) { state := 24, tape := mkL L0 (ones (3 * (k' + 1) + 2) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2k':ℕhto_odd:reachPos (evenCfg L0 (k' + 1) 1) (oddCfg L0 (k' + 1) 1)hev_part:reachPos (evenCfg L0 1 (2 * k' + 1)) (oddCfg L0 (k' + 1) 1)⊢ reachPos (oddCfg L0 (k' + 1) 1) { state := 24, tape := mkL L0 (ones (3 * (k' + 1) + 2) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2k':ℕhto_odd:reachPos (evenCfg L0 (k' + 1) 1) (oddCfg L0 (k' + 1) 1)hev_part:reachPos (evenCfg L0 1 (2 * k' + 1)) (oddCfg L0 (k' + 1) 1)h0:k' + 1 = 0⊢ reachPos (oddCfg L0 (k' + 1) 1) { state := 24, tape := mkL L0 (ones (3 * (k' + 1) + 2) B0) }c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2k':ℕhto_odd:reachPos (evenCfg L0 (k' + 1) 1) (oddCfg L0 (k' + 1) 1)hev_part:reachPos (evenCfg L0 1 (2 * k' + 1)) (oddCfg L0 (k' + 1) 1)hmany:reachPos (oddCfg L0 (k' + 1) 1) (oddCfg L0 0 (1 + 3 * (k' + 1)))⊢ reachPos (oddCfg L0 (k' + 1) 1) { state := 24, tape := mkL L0 (ones (3 * (k' + 1) + 2) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2k':ℕhto_odd:reachPos (evenCfg L0 (k' + 1) 1) (oddCfg L0 (k' + 1) 1)hev_part:reachPos (evenCfg L0 1 (2 * k' + 1)) (oddCfg L0 (k' + 1) 1)h0:k' + 1 = 0⊢ reachPos (oddCfg L0 (k' + 1) 1) { state := 24, tape := mkL L0 (ones (3 * (k' + 1) + 2) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2k':ℕhto_odd:reachPos (evenCfg L0 (k' + 1) 1) (oddCfg L0 (k' + 1) 1)hev_part:reachPos (evenCfg L0 1 (2 * k' + 1)) (oddCfg L0 (k' + 1) 1)h0:k' + 1 = 0⊢ False; All goals completed! 🐙 c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2k':ℕhto_odd:reachPos (evenCfg L0 (k' + 1) 1) (oddCfg L0 (k' + 1) 1)hev_part:reachPos (evenCfg L0 1 (2 * k' + 1)) (oddCfg L0 (k' + 1) 1)hmany:reachPos (oddCfg L0 (k' + 1) 1) (oddCfg L0 0 (1 + 3 * (k' + 1)))⊢ reachPos (oddCfg L0 (k' + 1) 1) { state := 24, tape := mkL L0 (ones (3 * (k' + 1) + 2) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2k':ℕhto_odd:reachPos (evenCfg L0 (k' + 1) 1) (oddCfg L0 (k' + 1) 1)hev_part:reachPos (evenCfg L0 1 (2 * k' + 1)) (oddCfg L0 (k' + 1) 1)hmany:reachPos (oddCfg L0 (k' + 1) 1) (oddCfg L0 0 (1 + 3 * (k' + 1)))⊢ reachPos (oddCfg L0 0 (1 + 3 * (k' + 1))) { state := 24, tape := mkL L0 (ones (3 * (k' + 1) + 2) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2k':ℕhto_odd:reachPos (evenCfg L0 (k' + 1) 1) (oddCfg L0 (k' + 1) 1)hev_part:reachPos (evenCfg L0 1 (2 * k' + 1)) (oddCfg L0 (k' + 1) 1)hmany:reachPos (oddCfg L0 (k' + 1) 1) (oddCfg L0 0 (1 + 3 * (k' + 1)))⊢ reachPos { state := 18, tape := mkL (ones 0 L0) (ListBlank.cons 0 (ones (1 + 3 * (k' + 1)) B0)) } { state := 24, tape := mkL L0 (ones (3 * (k' + 1) + 2) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2k':ℕhto_odd:reachPos (evenCfg L0 (k' + 1) 1) (oddCfg L0 (k' + 1) 1)hev_part:reachPos (evenCfg L0 1 (2 * k' + 1)) (oddCfg L0 (k' + 1) 1)hmany:reachPos (oddCfg L0 (k' + 1) 1) (oddCfg L0 0 (1 + 3 * (k' + 1)))⊢ reachPos { state := 18, tape := mkL L0 (ListBlank.cons 0 (ones (1 + 3 * (k' + 1)) B0)) } { state := 24, tape := mkL L0 (ones (3 * (k' + 1) + 2) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2k':ℕhto_odd:reachPos (evenCfg L0 (k' + 1) 1) (oddCfg L0 (k' + 1) 1)hev_part:reachPos (evenCfg L0 1 (2 * k' + 1)) (oddCfg L0 (k' + 1) 1)hmany:reachPos (oddCfg L0 (k' + 1) 1) (oddCfg L0 0 (1 + 3 * (k' + 1)))⊢ reachPos { state := 18, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ListBlank.cons 0 (ones (1 + 3 * (k' + 1)) B0)) } { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (3 * (k' + 1) + 2) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2k':ℕhto_odd:reachPos (evenCfg L0 (k' + 1) 1) (oddCfg L0 (k' + 1) 1)hev_part:reachPos (evenCfg L0 1 (2 * k' + 1)) (oddCfg L0 (k' + 1) 1)hmany:reachPos (oddCfg L0 (k' + 1) 1) (oddCfg L0 0 (1 + 3 * (k' + 1)))⊢ reachPos { state := 18, tape := { head := 0, left := baseCX c x, right := ListBlank.cons 0 (ones (1 + 3 * (k' + 1)) B0) } } { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (3 * (k' + 1) + 2) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2k':ℕhto_odd:reachPos (evenCfg L0 (k' + 1) 1) (oddCfg L0 (k' + 1) 1)hev_part:reachPos (evenCfg L0 1 (2 * k' + 1)) (oddCfg L0 (k' + 1) 1)hmany:reachPos (oddCfg L0 (k' + 1) 1) (oddCfg L0 0 (1 + 3 * (k' + 1)))⊢ reachPos { state := 22, tape := Tape.mk' (ListBlank.cons 0 (baseCX c x)) (ListBlank.cons 0 (ones (1 + 3 * (k' + 1)) B0)) } { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (3 * (k' + 1) + 2) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2k':ℕhto_odd:reachPos (evenCfg L0 (k' + 1) 1) (oddCfg L0 (k' + 1) 1)hev_part:reachPos (evenCfg L0 1 (2 * k' + 1)) (oddCfg L0 (k' + 1) 1)hmany:reachPos (oddCfg L0 (k' + 1) 1) (oddCfg L0 0 (1 + 3 * (k' + 1)))⊢ reachPos { state := 22, tape := { head := 0, left := ListBlank.cons 0 (baseCX c x), right := ones (1 + 3 * (k' + 1)) B0 } } { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (3 * (k' + 1) + 2) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2k':ℕhto_odd:reachPos (evenCfg L0 (k' + 1) 1) (oddCfg L0 (k' + 1) 1)hev_part:reachPos (evenCfg L0 1 (2 * k' + 1)) (oddCfg L0 (k' + 1) 1)hmany:reachPos (oddCfg L0 (k' + 1) 1) (oddCfg L0 0 (1 + 3 * (k' + 1)))hstep:step weakCollatz41 { state := 22, tape := { head := 0, left := ListBlank.cons 0 (baseCX c x), right := ones (1 + 3 * (k' + 1)) B0 } } = some { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ListBlank.cons 1 (ones (1 + 3 * (k' + 1)) B0)) }⊢ reachPos { state := 22, tape := { head := 0, left := ListBlank.cons 0 (baseCX c x), right := ones (1 + 3 * (k' + 1)) B0 } } { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (3 * (k' + 1) + 2) B0) } c:ℕx:ℕy:ℕhy:1 ≤ yL0:ListBlank (Fin 2) := ListBlank.cons 0 (baseCX c x)hodd:y % 2 = 1k:ℕ := y / 2hy_eq:y = 2 * k + 1hty:terras y = 3 * k + 2k':ℕhto_odd:reachPos (evenCfg L0 (k' + 1) 1) (oddCfg L0 (k' + 1) 1)hev_part:reachPos (evenCfg L0 1 (2 * k' + 1)) (oddCfg L0 (k' + 1) 1)hmany:reachPos (oddCfg L0 (k' + 1) 1) (oddCfg L0 0 (1 + 3 * (k' + 1)))hstep:step weakCollatz41 { state := 22, tape := { head := 0, left := ListBlank.cons 0 (baseCX c x), right := ones (1 + 3 * (k' + 1)) B0 } } = some { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (3 * (k' + 1) + 2) B0) }⊢ reachPos { state := 22, tape := { head := 0, left := ListBlank.cons 0 (baseCX c x), right := ones (1 + 3 * (k' + 1)) B0 } } { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (3 * (k' + 1) + 2) B0) } All goals completed! 🐙

Adjacent Comparison, Cycle Halt & Unified Restoration

private def cmpCfg (c u v p : ℕ) : Cfg 41 2 := ⟨23, mkL (ones v ((ones u ((ones c B0).cons 0)).cons 0)) ((ones (2 * p) B0).cons 0)⟩private theorem cmpFrom24 (c u v p : ℕ) : reachPos ⟨24, mkL ((ones (u + 1) ((ones c B0).cons 0)).cons 0) (ones (v + 1) ((ones (2 * p) B0).cons 0))⟩ (cmpCfg c u v (p + 1)) := c:ℕu:ℕv:ℕp:ℕ⊢ reachPos { state := 24, tape := mkL (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0)))) (ones (v + 1) (ListBlank.cons 0 (ones (2 * p) B0))) } (cmpCfg c u v (p + 1)) c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)⊢ reachPos { state := 24, tape := mkL (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0)))) (ones (v + 1) (ListBlank.cons 0 (ones (2 * p) B0))) } (cmpCfg c u v (p + 1)) c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 24, tape := mkL (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0)))) (ones (v + 1) (ListBlank.cons 0 (ones (2 * p) B0))) } (cmpCfg c u v (p + 1)) c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 24, tape := { head := 0, left := ones (u + 1) (ListBlank.cons 0 (ones c B0)), right := ones (v + 1) (ListBlank.cons 0 (ones (2 * p) B0)) } } (cmpCfg c u v (p + 1)) c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 27, tape := mkL (ones (u + 1) (ListBlank.cons 0 (ones c B0))) (ListBlank.cons 0 (ones (v + 1) (ListBlank.cons 0 (ones (2 * p) B0)))) } (cmpCfg c u v (p + 1)) c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 27, tape := { head := 1, left := ones u Lc, right := ListBlank.cons 0 (ones (v + 1) (ListBlank.cons 0 (ones (2 * p) B0))) } } (cmpCfg c u v (p + 1)) c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 28, tape := Tape.mk' (ListBlank.cons 0 (ones u Lc)) (ListBlank.cons 0 (ones (v + 1) (ListBlank.cons 0 (ones (2 * p) B0)))) } (cmpCfg c u v (p + 1)) c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 28, tape := { head := 0, left := ListBlank.cons 0 (ones u Lc), right := ones (v + 1) (ListBlank.cons 0 (ones (2 * p) B0)) } } (cmpCfg c u v (p + 1)) c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 29, tape := Tape.mk' (ListBlank.cons 1 (ListBlank.cons 0 (ones u Lc))) (ones (v + 1) (ListBlank.cons 0 (ones (2 * p) B0))) } (cmpCfg c u v (p + 1)) c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 29, tape := Tape.mk' (ones 1 Lu) (ones (v + 1) (ListBlank.cons 0 (ones (2 * p) B0))) } (cmpCfg c u v (p + 1)) c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 29, tape := Tape.mk' (ones (v + 1) (ones 1 Lu)) (ListBlank.cons 0 (ones (2 * p) B0)) } (cmpCfg c u v (p + 1)) c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 29, tape := { head := 0, left := ones (v + 2) Lu, right := ones (2 * p) B0 } } (cmpCfg c u v (p + 1)) c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 20, tape := mkL (ones (v + 2) Lu) (ListBlank.cons 1 (ones (2 * p) B0)) } (cmpCfg c u v (p + 1)) c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 20, tape := { head := 1, left := ones (v + 1) Lu, right := ones (2 * p + 1) B0 } } (cmpCfg c u v (p + 1)) c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 22, tape := mkL (ones (v + 1) Lu) (ListBlank.cons 1 (ones (2 * p + 1) B0)) } (cmpCfg c u v (p + 1)) c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 22, tape := { head := 1, left := ones v Lu, right := ones (2 * p + 1 + 1) B0 } } (cmpCfg c u v (p + 1)) c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)h22:step weakCollatz41 { state := 22, tape := { head := 1, left := ones v Lu, right := ones (2 * p + 2) B0 } } = some { state := 23, tape := mkL (ones v Lu) (ListBlank.cons 0 (ones (2 * p + 2) B0)) }⊢ reachPos { state := 22, tape := { head := 1, left := ones v Lu, right := ones (2 * p + 1 + 1) B0 } } (cmpCfg c u v (p + 1)) c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)h22:step weakCollatz41 { state := 22, tape := { head := 1, left := ones v Lu, right := ones (2 * (p + 1)) B0 } } = some { state := 23, tape := mkL (ones v Lu) (ListBlank.cons 0 (ones (2 * (p + 1)) B0)) }⊢ reachPos { state := 22, tape := { head := 1, left := ones v Lu, right := ones (2 * p + 1 + 1) B0 } } (cmpCfg c u v (p + 1)) All goals completed! 🐙private theorem terras_to_cmp1 (c x y : ℕ) (hx : 3 ≤ x) (hy : 1 ≤ y) : reachPos (stageCfg c x y) (cmpCfg c (x - 1) (terras y - 1) 1) := c:ℕx:ℕy:ℕhx:3 ≤ xhy:1 ≤ y⊢ reachPos (stageCfg c x y) (cmpCfg c (x - 1) (terras y - 1) 1) c:ℕx:ℕy:ℕhx:3 ≤ xhy:1 ≤ yhz:1 ≤ terras y⊢ reachPos (stageCfg c x y) (cmpCfg c (x - 1) (terras y - 1) 1) c:ℕx:ℕy:ℕhx:3 ≤ xhy:1 ≤ yhz:1 ≤ terras yheval:reachPos (stageCfg c x y) { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (terras y) B0) }⊢ reachPos (stageCfg c x y) (cmpCfg c (x - 1) (terras y - 1) 1) c:ℕx:ℕy:ℕhx:3 ≤ xhy:1 ≤ yhz:1 ≤ terras yheval:reachPos (stageCfg c x y) { state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (terras y) B0) }htarget:{ state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (terras y) B0) } = { state := 24, tape := mkL (ListBlank.cons 0 (ones (x - 1 + 1) (ListBlank.cons 0 (ones c B0)))) (ones (terras y - 1 + 1) (ListBlank.cons 0 (ones (2 * 0) B0))) }⊢ reachPos (stageCfg c x y) (cmpCfg c (x - 1) (terras y - 1) 1) c:ℕx:ℕy:ℕhx:3 ≤ xhy:1 ≤ yhz:1 ≤ terras yheval:reachPos (stageCfg c x y) { state := 24, tape := mkL (ListBlank.cons 0 (ones (x - 1 + 1) (ListBlank.cons 0 (ones c B0)))) (ones (terras y - 1 + 1) (ListBlank.cons 0 (ones (2 * 0) B0))) }htarget:{ state := 24, tape := mkL (ListBlank.cons 0 (baseCX c x)) (ones (terras y) B0) } = { state := 24, tape := mkL (ListBlank.cons 0 (ones (x - 1 + 1) (ListBlank.cons 0 (ones c B0)))) (ones (terras y - 1 + 1) (ListBlank.cons 0 (ones (2 * 0) B0))) }⊢ reachPos (stageCfg c x y) (cmpCfg c (x - 1) (terras y - 1) 1) All goals completed! 🐙private theorem cmp_step (c u v p : ℕ) : reachPos (cmpCfg c (u + 1) (v + 1) p) (cmpCfg c u v (p + 1)) := c:ℕu:ℕv:ℕp:ℕ⊢ reachPos (cmpCfg c (u + 1) (v + 1) p) (cmpCfg c u v (p + 1)) c:ℕu:ℕv:ℕp:ℕ⊢ reachPos { state := 23, tape := mkL (ones (v + 1) (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } { state := 23, tape := mkL (ones v (ListBlank.cons 0 (ones u (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * (p + 1)) B0)) } c:ℕu:ℕv:ℕp:ℕLu1:ListBlank (Fin 2) := ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0)))⊢ reachPos { state := 23, tape := mkL (ones (v + 1) (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } { state := 23, tape := mkL (ones v (ListBlank.cons 0 (ones u (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * (p + 1)) B0)) } c:ℕu:ℕv:ℕp:ℕLu1:ListBlank (Fin 2) := ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0)))Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones (2 * p) B0)⊢ reachPos { state := 23, tape := mkL (ones (v + 1) (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } { state := 23, tape := mkL (ones v (ListBlank.cons 0 (ones u (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * (p + 1)) B0)) } c:ℕu:ℕv:ℕp:ℕLu1:ListBlank (Fin 2) := ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0)))Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones (2 * p) B0)⊢ reachPos { state := 23, tape := mkL (ones (v + 1) Lu1) Rp } { state := 23, tape := mkL (ones v (ListBlank.cons 0 (ones u (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * (p + 1)) B0)) } c:ℕu:ℕv:ℕp:ℕLu1:ListBlank (Fin 2) := ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0)))Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones (2 * p) B0)⊢ reachPos { state := 23, tape := { head := 1, left := ones v Lu1, right := Rp } } { state := 23, tape := mkL (ones v (ListBlank.cons 0 (ones u (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * (p + 1)) B0)) } c:ℕu:ℕv:ℕp:ℕLu1:ListBlank (Fin 2) := ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0)))Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones (2 * p) B0)⊢ reachPos { state := 24, tape := mkL (ones v Lu1) (ListBlank.cons 1 Rp) } { state := 23, tape := mkL (ones v (ListBlank.cons 0 (ones u (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * (p + 1)) B0)) } c:ℕu:ℕv:ℕp:ℕLu1:ListBlank (Fin 2) := ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0)))Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones (2 * p) B0)⊢ reachPos { state := 24, tape := mkL (ones v Lu1) (ones 1 Rp) } { state := 23, tape := mkL (ones v (ListBlank.cons 0 (ones u (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * (p + 1)) B0)) } c:ℕu:ℕv:ℕp:ℕLu1:ListBlank (Fin 2) := ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0)))Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones (2 * p) B0)⊢ reachPos { state := 24, tape := mkL Lu1 (ones v (ones 1 Rp)) } { state := 23, tape := mkL (ones v (ListBlank.cons 0 (ones u (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * (p + 1)) B0)) } c:ℕu:ℕv:ℕp:ℕLu1:ListBlank (Fin 2) := ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0)))Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones (2 * p) B0)⊢ reachPos { state := 24, tape := mkL Lu1 (ones (v + 1) Rp) } { state := 23, tape := mkL (ones v (ListBlank.cons 0 (ones u (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * (p + 1)) B0)) } All goals completed! 🐙private theorem cmp_many (c u v p k : ℕ) : k = 0 ∨ reachPos (cmpCfg c (u + k) (v + k) p) (cmpCfg c u v (p + k)) := c:ℕu:ℕv:ℕp:ℕk:ℕ⊢ k = 0 ∨ reachPos (cmpCfg c (u + k) (v + k) p) (cmpCfg c u v (p + k)) induction k generalizing u v p with c:ℕu:ℕv:ℕp:ℕ⊢ 0 = 0 ∨ reachPos (cmpCfg c (u + 0) (v + 0) p) (cmpCfg c u v (p + 0)) All goals completed! 🐙 c:ℕk:ℕih:∀ (u v p : ℕ), k = 0 ∨ reachPos (cmpCfg c (u + k) (v + k) p) (cmpCfg c u v (p + k))u:ℕv:ℕp:ℕ⊢ k + 1 = 0 ∨ reachPos (cmpCfg c (u + (k + 1)) (v + (k + 1)) p) (cmpCfg c u v (p + (k + 1))) c:ℕk:ℕih:∀ (u v p : ℕ), k = 0 ∨ reachPos (cmpCfg c (u + k) (v + k) p) (cmpCfg c u v (p + k))u:ℕv:ℕp:ℕ⊢ reachPos (cmpCfg c (u + (k + 1)) (v + (k + 1)) p) (cmpCfg c u v (p + (k + 1))) c:ℕk:ℕih:∀ (u v p : ℕ), k = 0 ∨ reachPos (cmpCfg c (u + k) (v + k) p) (cmpCfg c u v (p + k))u:ℕv:ℕp:ℕ⊢ reachPos (cmpCfg c (u + k + 1) (v + k + 1) p) (cmpCfg c u v (p + (k + 1))) c:ℕu:ℕv:ℕp:ℕih:∀ (u v p : ℕ), 0 = 0 ∨ reachPos (cmpCfg c (u + 0) (v + 0) p) (cmpCfg c u v (p + 0))⊢ reachPos (cmpCfg c (u + 0 + 1) (v + 0 + 1) p) (cmpCfg c u v (p + (0 + 1)))c:ℕk:ℕih:∀ (u v p : ℕ), k = 0 ∨ reachPos (cmpCfg c (u + k) (v + k) p) (cmpCfg c u v (p + k))u:ℕv:ℕp:ℕhrest:reachPos (cmpCfg c (u + k) (v + k) (p + 1)) (cmpCfg c u v (p + 1 + k))⊢ reachPos (cmpCfg c (u + k + 1) (v + k + 1) p) (cmpCfg c u v (p + (k + 1))) c:ℕu:ℕv:ℕp:ℕih:∀ (u v p : ℕ), 0 = 0 ∨ reachPos (cmpCfg c (u + 0) (v + 0) p) (cmpCfg c u v (p + 0))⊢ reachPos (cmpCfg c (u + 0 + 1) (v + 0 + 1) p) (cmpCfg c u v (p + (0 + 1))) c:ℕu:ℕv:ℕp:ℕih:∀ (u v p : ℕ), 0 = 0 ∨ reachPos (cmpCfg c (u + 0) (v + 0) p) (cmpCfg c u v (p + 0))⊢ reachPos (cmpCfg c (u + 1) (v + 0 + 1) p) (cmpCfg c u v (p + (0 + 1))) All goals completed! 🐙 c:ℕk:ℕih:∀ (u v p : ℕ), k = 0 ∨ reachPos (cmpCfg c (u + k) (v + k) p) (cmpCfg c u v (p + k))u:ℕv:ℕp:ℕhrest:reachPos (cmpCfg c (u + k) (v + k) (p + 1)) (cmpCfg c u v (p + 1 + k))⊢ reachPos (cmpCfg c (u + k + 1) (v + k + 1) p) (cmpCfg c u v (p + (k + 1))) c:ℕk:ℕih:∀ (u v p : ℕ), k = 0 ∨ reachPos (cmpCfg c (u + k) (v + k) p) (cmpCfg c u v (p + k))u:ℕv:ℕp:ℕhrest:reachPos (cmpCfg c (u + k) (v + k) (p + 1)) (cmpCfg c u v (p + (k + 1)))⊢ reachPos (cmpCfg c (u + k + 1) (v + k + 1) p) (cmpCfg c u v (p + (k + 1))) All goals completed! 🐙private theorem cmp_halt_eq (c p : ℕ) : ∃ s cfg, nSteps weakCollatz41 s (cmpCfg c 0 0 p) = some cfg ∧ step weakCollatz41 cfg = none := c:ℕp:ℕ⊢ ∃ s cfg, nSteps weakCollatz41 s (cmpCfg c 0 0 p) = some cfg ∧ step weakCollatz41 cfg = none c:ℕp:ℕ⊢ ∃ s cfg, nSteps weakCollatz41 s { state := 23, tape := mkL (ones 0 (ListBlank.cons 0 (ones 0 (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } = some cfg ∧ step weakCollatz41 cfg = none c:ℕp:ℕ⊢ ∃ s cfg, nSteps weakCollatz41 s { state := 23, tape := { head := 0, left := ListBlank.cons 0 (ones c B0), right := ListBlank.cons 0 (ones (2 * p) B0) } } = some cfg ∧ step weakCollatz41 cfg = none c:ℕp:ℕh1:step weakCollatz41 { state := 23, tape := { head := 0, left := ListBlank.cons 0 (ones c B0), right := ListBlank.cons 0 (ones (2 * p) B0) } } = some { state := 25, tape := mkL (ListBlank.cons 0 (ones c B0)) (ListBlank.cons 0 (ListBlank.cons 0 (ones (2 * p) B0))) }⊢ ∃ s cfg, nSteps weakCollatz41 s { state := 23, tape := { head := 0, left := ListBlank.cons 0 (ones c B0), right := ListBlank.cons 0 (ones (2 * p) B0) } } = some cfg ∧ step weakCollatz41 cfg = none c:ℕp:ℕh1:step weakCollatz41 { state := 23, tape := { head := 0, left := ListBlank.cons 0 (ones c B0), right := ListBlank.cons 0 (ones (2 * p) B0) } } = some { state := 25, tape := { head := 0, left := ones c B0, right := ListBlank.cons 0 (ListBlank.cons 0 (ones (2 * p) B0)) } }⊢ ∃ s cfg, nSteps weakCollatz41 s { state := 23, tape := { head := 0, left := ListBlank.cons 0 (ones c B0), right := ListBlank.cons 0 (ones (2 * p) B0) } } = some cfg ∧ step weakCollatz41 cfg = none All goals completed! 🐙private def restCfg (c u v p : ℕ) : Cfg 41 2 := ⟨30, Tape.mk' (ones v ((ones u ((ones c B0).cons 0)).cons 0)) ((ones (2 * p) B0).cons 0)⟩private theorem cmp_lt_to_rest (c u p : ℕ) : reachPos (cmpCfg c (u + 1) 0 p) (restCfg c (u + 1) 0 p) := c:ℕu:ℕp:ℕ⊢ reachPos (cmpCfg c (u + 1) 0 p) (restCfg c (u + 1) 0 p) c:ℕu:ℕp:ℕ⊢ reachPos { state := 23, tape := mkL (ones 0 (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } { state := 30, tape := Tape.mk' (ones 0 (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕu:ℕp:ℕ⊢ reachPos { state := 23, tape := { head := 0, left := ones (u + 1) (ListBlank.cons 0 (ones c B0)), right := ListBlank.cons 0 (ones (2 * p) B0) } } { state := 30, tape := Tape.mk' (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0)))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕu:ℕp:ℕ⊢ reachPos { state := 25, tape := mkL (ones (u + 1) (ListBlank.cons 0 (ones c B0))) (ListBlank.cons 0 (ListBlank.cons 0 (ones (2 * p) B0))) } { state := 30, tape := Tape.mk' (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0)))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕu:ℕp:ℕ⊢ reachPos { state := 25, tape := { head := 1, left := ones u (ListBlank.cons 0 (ones c B0)), right := ListBlank.cons 0 (ListBlank.cons 0 (ones (2 * p) B0)) } } { state := 30, tape := Tape.mk' (ListBlank.cons 0 (ListBlank.cons 1 (ones u (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕu:ℕp:ℕ⊢ reachPos { state := 26, tape := Tape.mk' (ListBlank.cons 1 (ones u (ListBlank.cons 0 (ones c B0)))) (ListBlank.cons 0 (ListBlank.cons 0 (ones (2 * p) B0))) } { state := 30, tape := Tape.mk' (ListBlank.cons 0 (ListBlank.cons 1 (ones u (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕu:ℕp:ℕ⊢ reachPos { state := 26, tape := { head := 0, left := ones (u + 1) (ListBlank.cons 0 (ones c B0)), right := ListBlank.cons 0 (ones (2 * p) B0) } } { state := 30, tape := Tape.mk' (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0)))) (ListBlank.cons 0 (ones (2 * p) B0)) } All goals completed! 🐙private theorem cmp_gt_to_rest (c v p : ℕ) : reachPos (cmpCfg c 0 (v + 1) p) (restCfg c 0 (v + 1) p) := c:ℕv:ℕp:ℕ⊢ reachPos (cmpCfg c 0 (v + 1) p) (restCfg c 0 (v + 1) p) c:ℕv:ℕp:ℕ⊢ reachPos { state := 23, tape := mkL (ones (v + 1) (ListBlank.cons 0 (ones 0 (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } { state := 30, tape := Tape.mk' (ones (v + 1) (ListBlank.cons 0 (ones 0 (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕv:ℕp:ℕL0:ListBlank (Fin 2) := ListBlank.cons 0 (ones 0 (ListBlank.cons 0 (ones c B0)))⊢ reachPos { state := 23, tape := mkL (ones (v + 1) (ListBlank.cons 0 (ones 0 (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } { state := 30, tape := Tape.mk' (ones (v + 1) (ListBlank.cons 0 (ones 0 (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕv:ℕp:ℕL0:ListBlank (Fin 2) := ListBlank.cons 0 (ones 0 (ListBlank.cons 0 (ones c B0)))Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones (2 * p) B0)⊢ reachPos { state := 23, tape := mkL (ones (v + 1) (ListBlank.cons 0 (ones 0 (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } { state := 30, tape := Tape.mk' (ones (v + 1) (ListBlank.cons 0 (ones 0 (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕv:ℕp:ℕL0:ListBlank (Fin 2) := ListBlank.cons 0 (ones 0 (ListBlank.cons 0 (ones c B0)))Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones (2 * p) B0)⊢ reachPos { state := 23, tape := mkL (ones (v + 1) L0) Rp } { state := 30, tape := Tape.mk' (ones (v + 1) (ListBlank.cons 0 (ones 0 (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕv:ℕp:ℕL0:ListBlank (Fin 2) := ListBlank.cons 0 (ones 0 (ListBlank.cons 0 (ones c B0)))Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones (2 * p) B0)⊢ reachPos { state := 23, tape := { head := 1, left := ones v L0, right := Rp } } { state := 30, tape := Tape.mk' (ListBlank.cons 1 (ones v L0)) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕv:ℕp:ℕL0:ListBlank (Fin 2) := ListBlank.cons 0 (ones 0 (ListBlank.cons 0 (ones c B0)))Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones (2 * p) B0)⊢ reachPos { state := 24, tape := mkL (ones v L0) (ListBlank.cons 1 Rp) } { state := 30, tape := Tape.mk' (ListBlank.cons 1 (ones v L0)) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕv:ℕp:ℕL0:ListBlank (Fin 2) := ListBlank.cons 0 (ones 0 (ListBlank.cons 0 (ones c B0)))Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones (2 * p) B0)⊢ reachPos { state := 24, tape := mkL (ones v L0) (ones 1 Rp) } { state := 30, tape := Tape.mk' (ListBlank.cons 1 (ones v L0)) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕv:ℕp:ℕL0:ListBlank (Fin 2) := ListBlank.cons 0 (ones 0 (ListBlank.cons 0 (ones c B0)))Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones (2 * p) B0)⊢ reachPos { state := 24, tape := mkL L0 (ones v (ones 1 Rp)) } { state := 30, tape := Tape.mk' (ListBlank.cons 1 (ones v L0)) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕv:ℕp:ℕL0:ListBlank (Fin 2) := ListBlank.cons 0 (ones 0 (ListBlank.cons 0 (ones c B0)))Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones (2 * p) B0)⊢ reachPos { state := 24, tape := mkL L0 (ones (v + 1) Rp) } { state := 30, tape := Tape.mk' (ListBlank.cons 1 (ones v L0)) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕv:ℕp:ℕL0:ListBlank (Fin 2) := ListBlank.cons 0 (ones 0 (ListBlank.cons 0 (ones c B0)))Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones (2 * p) B0)⊢ reachPos { state := 24, tape := mkL (ListBlank.cons 0 (ones 0 (ListBlank.cons 0 (ones c B0)))) (ones (v + 1) Rp) } { state := 30, tape := Tape.mk' (ListBlank.cons 1 (ones v (ListBlank.cons 0 (ones 0 (ListBlank.cons 0 (ones c B0)))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕv:ℕp:ℕL0:ListBlank (Fin 2) := ListBlank.cons 0 (ones 0 (ListBlank.cons 0 (ones c B0)))Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones (2 * p) B0)⊢ reachPos { state := 24, tape := { head := 0, left := ListBlank.cons 0 (ones c B0), right := ones (v + 1) Rp } } { state := 30, tape := Tape.mk' (ListBlank.cons 1 (ones v (ListBlank.cons 0 (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕv:ℕp:ℕL0:ListBlank (Fin 2) := ListBlank.cons 0 (ones 0 (ListBlank.cons 0 (ones c B0)))Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones (2 * p) B0)⊢ reachPos { state := 27, tape := mkL (ListBlank.cons 0 (ones c B0)) (ListBlank.cons 0 (ones (v + 1) Rp)) } { state := 30, tape := Tape.mk' (ListBlank.cons 1 (ones v (ListBlank.cons 0 (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕv:ℕp:ℕL0:ListBlank (Fin 2) := ListBlank.cons 0 (ones 0 (ListBlank.cons 0 (ones c B0)))Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones (2 * p) B0)⊢ reachPos { state := 27, tape := { head := 0, left := ones c B0, right := ListBlank.cons 0 (ones (v + 1) Rp) } } { state := 30, tape := Tape.mk' (ListBlank.cons 1 (ones v (ListBlank.cons 0 (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕv:ℕp:ℕL0:ListBlank (Fin 2) := ListBlank.cons 0 (ones 0 (ListBlank.cons 0 (ones c B0)))Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones (2 * p) B0)⊢ reachPos { state := 26, tape := Tape.mk' (ListBlank.cons 0 (ones c B0)) (ListBlank.cons 0 (ones (v + 1) Rp)) } { state := 30, tape := Tape.mk' (ListBlank.cons 1 (ones v (ListBlank.cons 0 (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕv:ℕp:ℕL0:ListBlank (Fin 2) := ListBlank.cons 0 (ones 0 (ListBlank.cons 0 (ones c B0)))Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones (2 * p) B0)⊢ reachPos { state := 26, tape := { head := 0, left := ListBlank.cons 0 (ones c B0), right := ones (v + 1) Rp } } { state := 30, tape := Tape.mk' (ListBlank.cons 1 (ones v (ListBlank.cons 0 (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕv:ℕp:ℕL0:ListBlank (Fin 2) := ListBlank.cons 0 (ones 0 (ListBlank.cons 0 (ones c B0)))Rp:ListBlank (Fin 2) := ListBlank.cons 0 (ones (2 * p) B0)h26:reachPos { state := 26, tape := { head := 0, left := ListBlank.cons 0 (ones c B0), right := ones (v + 1) Rp } } { state := 30, tape := Tape.mk' (ListBlank.cons 0 (ListBlank.cons 0 (ones c B0))) (ones (v + 1) Rp) }⊢ reachPos { state := 26, tape := { head := 0, left := ListBlank.cons 0 (ones c B0), right := ones (v + 1) Rp } } { state := 30, tape := Tape.mk' (ListBlank.cons 1 (ones v (ListBlank.cons 0 (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } All goals completed! 🐙private theorem rest_step (c u v p : ℕ) : reachPos (restCfg c u v (p + 1)) (restCfg c (u + 1) (v + 1) p) := c:ℕu:ℕv:ℕp:ℕ⊢ reachPos (restCfg c u v (p + 1)) (restCfg c (u + 1) (v + 1) p) c:ℕu:ℕv:ℕp:ℕ⊢ reachPos { state := 30, tape := Tape.mk' (ones v (ListBlank.cons 0 (ones u (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * (p + 1)) B0)) } { state := 30, tape := Tape.mk' (ones (v + 1) (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)⊢ reachPos { state := 30, tape := Tape.mk' (ones v (ListBlank.cons 0 (ones u (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * (p + 1)) B0)) } { state := 30, tape := Tape.mk' (ones (v + 1) (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 30, tape := Tape.mk' (ones v (ListBlank.cons 0 (ones u (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * (p + 1)) B0)) } { state := 30, tape := Tape.mk' (ones (v + 1) (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 30, tape := Tape.mk' (ones v Lu) (ListBlank.cons 0 (ones (2 * (p + 1)) B0)) } { state := 30, tape := Tape.mk' (ones (v + 1) (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 30, tape := { head := 0, left := ones v Lu, right := ones (2 * (p + 1)) B0 } } { state := 30, tape := Tape.mk' (ones (v + 1) (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 31, tape := Tape.mk' (ListBlank.cons 1 (ones v Lu)) (ones (2 * (p + 1)) B0) } { state := 30, tape := Tape.mk' (ones (v + 1) (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 31, tape := { head := 1, left := ones (v + 1) Lu, right := ones (2 * p + 1) B0 } } { state := 30, tape := Tape.mk' (ones (v + 1) (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 28, tape := Tape.mk' (ListBlank.cons 1 (ones (v + 1) Lu)) (ones (2 * p + 1) B0) } { state := 30, tape := Tape.mk' (ones (v + 1) (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 28, tape := { head := 1, left := ones (v + 2) Lu, right := ones (2 * p) B0 } } { state := 30, tape := Tape.mk' (ones (v + 1) (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 0, tape := mkL (ones (v + 2) Lu) (ListBlank.cons 0 (ones (2 * p) B0)) } { state := 30, tape := Tape.mk' (ones (v + 1) (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 0, tape := mkL Lu (ones (v + 2) (ListBlank.cons 0 (ones (2 * p) B0))) } { state := 30, tape := Tape.mk' (ones (v + 1) (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 0, tape := mkL (ListBlank.cons 0 (ones u Lc)) (ones (v + 2) (ListBlank.cons 0 (ones (2 * p) B0))) } { state := 30, tape := Tape.mk' (ones (v + 1) (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 0, tape := { head := 0, left := ones u Lc, right := ones (v + 2) (ListBlank.cons 0 (ones (2 * p) B0)) } } { state := 30, tape := Tape.mk' (ones (v + 1) (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 1, tape := Tape.mk' (ListBlank.cons 1 (ones u Lc)) (ones (v + 2) (ListBlank.cons 0 (ones (2 * p) B0))) } { state := 30, tape := Tape.mk' (ones (v + 1) (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)⊢ reachPos { state := 1, tape := { head := 1, left := ones (u + 1) Lc, right := ones (v + 1) (ListBlank.cons 0 (ones (2 * p) B0)) } } { state := 30, tape := Tape.mk' (ones (v + 1) (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } c:ℕu:ℕv:ℕp:ℕLc:ListBlank (Fin 2) := ListBlank.cons 0 (ones c B0)Lu:ListBlank (Fin 2) := ListBlank.cons 0 (ones u Lc)h1:reachPos { state := 1, tape := { head := 1, left := ones (u + 1) Lc, right := ones (v + 1) (ListBlank.cons 0 (ones (2 * p) B0)) } } { state := 30, tape := Tape.mk' (ListBlank.cons 0 (ones (u + 1) Lc)) (ones (v + 1) (ListBlank.cons 0 (ones (2 * p) B0))) }⊢ reachPos { state := 1, tape := { head := 1, left := ones (u + 1) Lc, right := ones (v + 1) (ListBlank.cons 0 (ones (2 * p) B0)) } } { state := 30, tape := Tape.mk' (ones (v + 1) (ListBlank.cons 0 (ones (u + 1) (ListBlank.cons 0 (ones c B0))))) (ListBlank.cons 0 (ones (2 * p) B0)) } All goals completed! 🐙private theorem rest_many (c u v p k : ℕ) : k = 0 ∨ reachPos (restCfg c u v (p + k)) (restCfg c (u + k) (v + k) p) := c:ℕu:ℕv:ℕp:ℕk:ℕ⊢ k = 0 ∨ reachPos (restCfg c u v (p + k)) (restCfg c (u + k) (v + k) p) induction k generalizing u v with c:ℕp:ℕu:ℕv:ℕ⊢ 0 = 0 ∨ reachPos (restCfg c u v (p + 0)) (restCfg c (u + 0) (v + 0) p) All goals completed! 🐙 c:ℕp:ℕk:ℕih:∀ (u v : ℕ), k = 0 ∨ reachPos (restCfg c u v (p + k)) (restCfg c (u + k) (v + k) p)u:ℕv:ℕ⊢ k + 1 = 0 ∨ reachPos (restCfg c u v (p + (k + 1))) (restCfg c (u + (k + 1)) (v + (k + 1)) p) c:ℕp:ℕk:ℕih:∀ (u v : ℕ), k = 0 ∨ reachPos (restCfg c u v (p + k)) (restCfg c (u + k) (v + k) p)u:ℕv:ℕ⊢ reachPos (restCfg c u v (p + (k + 1))) (restCfg c (u + (k + 1)) (v + (k + 1)) p) c:ℕp:ℕk:ℕih:∀ (u v : ℕ), k = 0 ∨ reachPos (restCfg c u v (p + k)) (restCfg c (u + k) (v + k) p)u:ℕv:ℕ⊢ reachPos (restCfg c u v (p + k + 1)) (restCfg c (u + (k + 1)) (v + (k + 1)) p) c:ℕp:ℕk:ℕih:∀ (u v : ℕ), k = 0 ∨ reachPos (restCfg c u v (p + k)) (restCfg c (u + k) (v + k) p)u:ℕv:ℕhfirst:reachPos (restCfg c u v (p + k + 1)) (restCfg c (u + 1) (v + 1) (p + k))⊢ reachPos (restCfg c u v (p + k + 1)) (restCfg c (u + (k + 1)) (v + (k + 1)) p) c:ℕp:ℕu:ℕv:ℕih:∀ (u v : ℕ), 0 = 0 ∨ reachPos (restCfg c u v (p + 0)) (restCfg c (u + 0) (v + 0) p)hfirst:reachPos (restCfg c u v (p + 0 + 1)) (restCfg c (u + 1) (v + 1) (p + 0))⊢ reachPos (restCfg c u v (p + 0 + 1)) (restCfg c (u + (0 + 1)) (v + (0 + 1)) p)c:ℕp:ℕk:ℕih:∀ (u v : ℕ), k = 0 ∨ reachPos (restCfg c u v (p + k)) (restCfg c (u + k) (v + k) p)u:ℕv:ℕhfirst:reachPos (restCfg c u v (p + k + 1)) (restCfg c (u + 1) (v + 1) (p + k))hrest:reachPos (restCfg c (u + 1) (v + 1) (p + k)) (restCfg c (u + 1 + k) (v + 1 + k) p)⊢ reachPos (restCfg c u v (p + k + 1)) (restCfg c (u + (k + 1)) (v + (k + 1)) p) c:ℕp:ℕu:ℕv:ℕih:∀ (u v : ℕ), 0 = 0 ∨ reachPos (restCfg c u v (p + 0)) (restCfg c (u + 0) (v + 0) p)hfirst:reachPos (restCfg c u v (p + 0 + 1)) (restCfg c (u + 1) (v + 1) (p + 0))⊢ reachPos (restCfg c u v (p + 0 + 1)) (restCfg c (u + (0 + 1)) (v + (0 + 1)) p) c:ℕp:ℕu:ℕv:ℕih:∀ (u v : ℕ), 0 = 0 ∨ reachPos (restCfg c u v (p + 0)) (restCfg c (u + 0) (v + 0) p)hfirst:reachPos (restCfg c u v (p + 0 + 1)) (restCfg c (u + 1) (v + 1) (p + 0))⊢ reachPos (restCfg c u v (p + 1)) (restCfg c (u + (0 + 1)) (v + (0 + 1)) p) All goals completed! 🐙 c:ℕp:ℕk:ℕih:∀ (u v : ℕ), k = 0 ∨ reachPos (restCfg c u v (p + k)) (restCfg c (u + k) (v + k) p)u:ℕv:ℕhfirst:reachPos (restCfg c u v (p + k + 1)) (restCfg c (u + 1) (v + 1) (p + k))hrest:reachPos (restCfg c (u + 1) (v + 1) (p + k)) (restCfg c (u + 1 + k) (v + 1 + k) p)⊢ reachPos (restCfg c u v (p + k + 1)) (restCfg c (u + (k + 1)) (v + (k + 1)) p) c:ℕp:ℕk:ℕih:∀ (u v : ℕ), k = 0 ∨ reachPos (restCfg c u v (p + k)) (restCfg c (u + k) (v + k) p)u:ℕv:ℕhfirst:reachPos (restCfg c u v (p + k + 1)) (restCfg c (u + 1) (v + 1) (p + k))hrest:reachPos (restCfg c (u + 1) (v + 1) (p + k)) (restCfg c (u + 1 + k) (v + 1 + k) p)⊢ reachPos (restCfg c u v (p + k + 1)) (restCfg c (u + 1 + k) (v + 1 + k) p) All goals completed! 🐙

Counter Decrement, Stage Advance & Halting Equivalence

private def postDecCfg (c' x z : ℕ) : Cfg 41 2 := ⟨35, Tape.mk' B0 (ones c' ((ones x ((ones z B0).cons 0)).cons 0))⟩private theorem rest_exit (c' x z : ℕ) : reachPos (restCfg (c' + 1) x z 0) (postDecCfg c' x z) := c':ℕx:ℕz:ℕ⊢ reachPos (restCfg (c' + 1) x z 0) (postDecCfg c' x z) c':ℕx:ℕz:ℕ⊢ reachPos { state := 30, tape := Tape.mk' (ones z (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones (c' + 1) B0))))) (ListBlank.cons 0 (ones (2 * 0) B0)) } { state := 35, tape := Tape.mk' B0 (ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } c':ℕx:ℕz:ℕ⊢ reachPos { state := 30, tape := { head := 0, left := ones z (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones (c' + 1) B0)))), right := B0 } } { state := 35, tape := Tape.mk' B0 (ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } c':ℕx:ℕz:ℕ⊢ reachPos { state := 31, tape := Tape.mk' (ListBlank.cons 1 (ones z (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones (c' + 1) B0)))))) B0 } { state := 35, tape := Tape.mk' B0 (ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } c':ℕx:ℕz:ℕ⊢ reachPos { state := 31, tape := { head := 0, left := ListBlank.cons 1 (ones z (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones (c' + 1) B0))))), right := B0 } } { state := 35, tape := Tape.mk' B0 (ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } c':ℕx:ℕz:ℕ⊢ reachPos { state := 26, tape := mkL (ListBlank.cons 1 (ones z (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones (c' + 1) B0)))))) (ListBlank.cons 0 B0) } { state := 35, tape := Tape.mk' B0 (ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } c':ℕx:ℕz:ℕ⊢ reachPos { state := 26, tape := { head := 1, left := ones z (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones (c' + 1) B0)))), right := B0 } } { state := 35, tape := Tape.mk' B0 (ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } c':ℕx:ℕz:ℕ⊢ reachPos { state := 32, tape := mkL (ones z (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones (c' + 1) B0))))) (ListBlank.cons 0 B0) } { state := 35, tape := Tape.mk' B0 (ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } c':ℕx:ℕz:ℕ⊢ reachPos { state := 32, tape := mkL (ones z (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones (c' + 1) B0))))) B0 } { state := 35, tape := Tape.mk' B0 (ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } c':ℕx:ℕz:ℕ⊢ reachPos { state := 32, tape := mkL (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones (c' + 1) B0)))) (ones z B0) } { state := 35, tape := Tape.mk' B0 (ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } c':ℕx:ℕz:ℕ⊢ reachPos { state := 32, tape := { head := 0, left := ones x (ListBlank.cons 0 (ones (c' + 1) B0)), right := ones z B0 } } { state := 35, tape := Tape.mk' B0 (ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } c':ℕx:ℕz:ℕ⊢ reachPos { state := 33, tape := mkL (ones x (ListBlank.cons 0 (ones (c' + 1) B0))) (ListBlank.cons 0 (ones z B0)) } { state := 35, tape := Tape.mk' B0 (ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } c':ℕx:ℕz:ℕ⊢ reachPos { state := 33, tape := mkL (ListBlank.cons 0 (ones (c' + 1) B0)) (ones x (ListBlank.cons 0 (ones z B0))) } { state := 35, tape := Tape.mk' B0 (ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } c':ℕx:ℕz:ℕ⊢ reachPos { state := 33, tape := { head := 0, left := ones (c' + 1) B0, right := ones x (ListBlank.cons 0 (ones z B0)) } } { state := 35, tape := Tape.mk' B0 (ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } c':ℕx:ℕz:ℕ⊢ reachPos { state := 34, tape := mkL (ones (c' + 1) B0) (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0)))) } { state := 35, tape := Tape.mk' B0 (ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } c':ℕx:ℕz:ℕ⊢ reachPos { state := 34, tape := mkL B0 (ones (c' + 1) (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } { state := 35, tape := Tape.mk' B0 (ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } c':ℕx:ℕz:ℕ⊢ reachPos { state := 34, tape := { head := 0, left := B0, right := ones (c' + 1) (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0)))) } } { state := 35, tape := Tape.mk' B0 (ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } c':ℕx:ℕz:ℕ⊢ reachPos { state := 3, tape := Tape.mk' (ListBlank.cons 0 B0) (ones (c' + 1) (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } { state := 35, tape := Tape.mk' B0 (ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } c':ℕx:ℕz:ℕ⊢ reachPos { state := 3, tape := { head := 1, left := B0, right := ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0)))) } } { state := 35, tape := Tape.mk' B0 (ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } c':ℕx:ℕz:ℕh3:step weakCollatz41 { state := 3, tape := { head := 1, left := B0, right := ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0)))) } } = some { state := 35, tape := Tape.mk' (ListBlank.cons 0 B0) (ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) }⊢ reachPos { state := 3, tape := { head := 1, left := B0, right := ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0)))) } } { state := 35, tape := Tape.mk' B0 (ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } c':ℕx:ℕz:ℕh3:step weakCollatz41 { state := 3, tape := { head := 1, left := B0, right := ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0)))) } } = some { state := 35, tape := Tape.mk' B0 (ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) }⊢ reachPos { state := 3, tape := { head := 1, left := B0, right := ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0)))) } } { state := 35, tape := Tape.mk' B0 (ones c' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } All goals completed! 🐙private theorem postDec_continue (c'' x z : ℕ) : reachPos (postDecCfg (c'' + 1) x z) (stageCfg (c'' + 1) x z) := c'':ℕx:ℕz:ℕ⊢ reachPos (postDecCfg (c'' + 1) x z) (stageCfg (c'' + 1) x z) c'':ℕx:ℕz:ℕ⊢ reachPos { state := 35, tape := Tape.mk' B0 (ones (c'' + 1) (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones (c'' + 1) B0)))) (ones z B0) } c'':ℕx:ℕz:ℕ⊢ reachPos { state := 35, tape := { head := 1, left := B0, right := ones c'' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0)))) } } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones (c'' + 1) B0)))) (ones z B0) } c'':ℕx:ℕz:ℕ⊢ reachPos { state := 36, tape := Tape.mk' (ListBlank.cons 1 B0) (ones c'' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones (c'' + 1) B0)))) (ones z B0) } c'':ℕx:ℕz:ℕ⊢ reachPos { state := 36, tape := Tape.mk' (ones 1 B0) (ones c'' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones (c'' + 1) B0)))) (ones z B0) } c'':ℕx:ℕz:ℕ⊢ reachPos { state := 36, tape := Tape.mk' (ones c'' (ones 1 B0)) (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0)))) } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones (c'' + 1) B0)))) (ones z B0) } c'':ℕx:ℕz:ℕ⊢ reachPos { state := 36, tape := { head := 0, left := ones (c'' + 1) B0, right := ones x (ListBlank.cons 0 (ones z B0)) } } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones (c'' + 1) B0)))) (ones z B0) } c'':ℕx:ℕz:ℕ⊢ reachPos { state := 37, tape := Tape.mk' (ListBlank.cons 0 (ones (c'' + 1) B0)) (ones x (ListBlank.cons 0 (ones z B0))) } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones (c'' + 1) B0)))) (ones z B0) } c'':ℕx:ℕz:ℕ⊢ reachPos { state := 37, tape := Tape.mk' (ones x (ListBlank.cons 0 (ones (c'' + 1) B0))) (ListBlank.cons 0 (ones z B0)) } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones (c'' + 1) B0)))) (ones z B0) } c'':ℕx:ℕz:ℕ⊢ reachPos { state := 37, tape := { head := 0, left := ones x (ListBlank.cons 0 (ones (c'' + 1) B0)), right := ones z B0 } } { state := 12, tape := Tape.mk' (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones (c'' + 1) B0)))) (ones z B0) } All goals completed! 🐙private theorem postDec_advance (x z : ℕ) (hx : 3 ≤ x) : reachPos (postDecCfg 0 x z) (stageCfg (x + 1) (x + 1) (x + 1)) := x:ℕz:ℕhx:3 ≤ x⊢ reachPos (postDecCfg 0 x z) (stageCfg (x + 1) (x + 1) (x + 1)) x:ℕz:ℕhx:3 ≤ x⊢ reachPos { state := 35, tape := Tape.mk' B0 (ones 0 (ListBlank.cons 0 (ones x (ListBlank.cons 0 (ones z B0))))) } (stageCfg (x + 1) (x + 1) (x + 1)) x:ℕz:ℕhx:3 ≤ x⊢ reachPos { state := 35, tape := { head := 0, left := B0, right := ones x (ListBlank.cons 0 (ones z B0)) } } (stageCfg (x + 1) (x + 1) (x + 1)) x:ℕz:ℕhx:3 ≤ x⊢ reachPos { state := 38, tape := Tape.mk' (ListBlank.cons 1 B0) (ones x (ListBlank.cons 0 (ones z B0))) } (stageCfg (x + 1) (x + 1) (x + 1)) x:ℕz:ℕhx:3 ≤ x⊢ reachPos { state := 38, tape := Tape.mk' (ones 1 B0) (ones x (ListBlank.cons 0 (ones z B0))) } (stageCfg (x + 1) (x + 1) (x + 1)) x:ℕz:ℕhx:3 ≤ x⊢ reachPos { state := 38, tape := Tape.mk' (ones x (ones 1 B0)) (ListBlank.cons 0 (ones z B0)) } (stageCfg (x + 1) (x + 1) (x + 1)) x:ℕz:ℕhx:3 ≤ x⊢ reachPos { state := 38, tape := { head := 0, left := ones (x + 1) B0, right := ones z B0 } } (stageCfg (x + 1) (x + 1) (x + 1)) x:ℕz:ℕhx:3 ≤ x⊢ reachPos { state := 39, tape := Tape.mk' (ListBlank.cons 0 (ones (x + 1) B0)) (ones z B0) } (stageCfg (x + 1) (x + 1) (x + 1)) x:ℕz:ℕhx:3 ≤ x⊢ reachPos { state := 39, tape := Tape.mk' (ones z (ListBlank.cons 0 (ones (x + 1) B0))) B0 } (stageCfg (x + 1) (x + 1) (x + 1)) x:ℕz:ℕhx:3 ≤ x⊢ reachPos { state := 39, tape := { head := 0, left := ones z (ListBlank.cons 0 (ones (x + 1) B0)), right := B0 } } (stageCfg (x + 1) (x + 1) (x + 1)) x:ℕz:ℕhx:3 ≤ x⊢ reachPos { state := 40, tape := mkL (ones z (ListBlank.cons 0 (ones (x + 1) B0))) (ListBlank.cons 0 B0) } (stageCfg (x + 1) (x + 1) (x + 1)) x:ℕz:ℕhx:3 ≤ x⊢ reachPos { state := 40, tape := mkL (ones z (ListBlank.cons 0 (ones (x + 1) B0))) B0 } (stageCfg (x + 1) (x + 1) (x + 1)) x:ℕz:ℕhx:3 ≤ x⊢ reachPos { state := 40, tape := mkL (ListBlank.cons 0 (ones (x + 1) B0)) B0 } (stageCfg (x + 1) (x + 1) (x + 1)) x:ℕz:ℕhx:3 ≤ x⊢ reachPos { state := 40, tape := { head := 0, left := ones (x + 1) B0, right := B0 } } (stageCfg (x + 1) (x + 1) (x + 1)) x:ℕz:ℕhx:3 ≤ x⊢ reachPos { state := 2, tape := mkL (ones (x + 1) B0) (ListBlank.cons 0 B0) } (stageCfg (x + 1) (x + 1) (x + 1)) x:ℕz:ℕhx:3 ≤ x⊢ reachPos { state := 2, tape := mkL (ones (x + 1) B0) B0 } (stageCfg (x + 1) (x + 1) (x + 1)) x:ℕz:ℕhx:3 ≤ xhtr:{ state := 2, tape := mkL (ones (x + 1) B0) B0 } = tripleCfg 0 (x + 1)⊢ reachPos { state := 2, tape := mkL (ones (x + 1) B0) B0 } (stageCfg (x + 1) (x + 1) (x + 1)) x:ℕz:ℕhx:3 ≤ xhtr:{ state := 2, tape := mkL (ones (x + 1) B0) B0 } = tripleCfg 0 (x + 1)⊢ reachPos (tripleCfg 0 (x + 1)) (stageCfg (x + 1) (x + 1) (x + 1)) x:ℕz:ℕhx:3 ≤ xhtr:{ state := 2, tape := mkL (ones (x + 1) B0) B0 } = tripleCfg 0 (x + 1)hfin:reachPos (tripleCfg 0 (x - 1 + 2)) (stageCfg (x - 1 + 2) (x - 1 + 2) (x - 1 + 2))⊢ reachPos (tripleCfg 0 (x + 1)) (stageCfg (x + 1) (x + 1) (x + 1)) x:ℕz:ℕhx:3 ≤ xhtr:{ state := 2, tape := mkL (ones (x + 1) B0) B0 } = tripleCfg 0 (x + 1)hfin:reachPos (tripleCfg 0 (x + 1)) (stageCfg (x + 1) (x + 1) (x + 1))⊢ reachPos (tripleCfg 0 (x + 1)) (stageCfg (x + 1) (x + 1) (x + 1)) All goals completed! 🐙private theorem stage_round_halt (c x y : ℕ) (_hc : 1 ≤ c) (hx : 3 ≤ x) (hy : 1 ≤ y) (hhit : terras y = x) : ∃ s cfg, nSteps weakCollatz41 s (stageCfg c x y) = some cfg ∧ step weakCollatz41 cfg = none := c:ℕx:ℕy:ℕ_hc:1 ≤ chx:3 ≤ xhy:1 ≤ yhhit:terras y = x⊢ ∃ s cfg, nSteps weakCollatz41 s (stageCfg c x y) = some cfg ∧ step weakCollatz41 cfg = none c:ℕx:ℕy:ℕ_hc:1 ≤ chx:3 ≤ xhy:1 ≤ yhhit:terras y = xhcmp1:reachPos (stageCfg c x y) (cmpCfg c (x - 1) (terras y - 1) 1)⊢ ∃ s cfg, nSteps weakCollatz41 s (stageCfg c x y) = some cfg ∧ step weakCollatz41 cfg = none c:ℕx:ℕy:ℕ_hc:1 ≤ chx:3 ≤ xhy:1 ≤ yhhit:terras y = xhcmp1:reachPos (stageCfg c x y) (cmpCfg c (x - 1) (x - 1) 1)⊢ ∃ s cfg, nSteps weakCollatz41 s (stageCfg c x y) = some cfg ∧ step weakCollatz41 cfg = none c:ℕx:ℕy:ℕ_hc:1 ≤ chx:3 ≤ xhy:1 ≤ yhhit:terras y = xhcmp1:reachPos (stageCfg c x y) (cmpCfg c (x - 1) (x - 1) 1)hmany:reachPos (cmpCfg c (x - 1) (x - 1) 1) (cmpCfg c 0 0 x)⊢ ∃ s cfg, nSteps weakCollatz41 s (stageCfg c x y) = some cfg ∧ step weakCollatz41 cfg = none c:ℕx:ℕy:ℕ_hc:1 ≤ chx:3 ≤ xhy:1 ≤ yhhit:terras y = xhcmp1:reachPos (stageCfg c x y) (cmpCfg c (x - 1) (x - 1) 1)hmany:reachPos (cmpCfg c (x - 1) (x - 1) 1) (cmpCfg c 0 0 x)s₁:ℕleft✝:1 ≤ s₁hs₁:nSteps weakCollatz41 s₁ (stageCfg c x y) = some (cmpCfg c 0 0 x)⊢ ∃ s cfg, nSteps weakCollatz41 s (stageCfg c x y) = some cfg ∧ step weakCollatz41 cfg = none c:ℕx:ℕy:ℕ_hc:1 ≤ chx:3 ≤ xhy:1 ≤ yhhit:terras y = xhcmp1:reachPos (stageCfg c x y) (cmpCfg c (x - 1) (x - 1) 1)hmany:reachPos (cmpCfg c (x - 1) (x - 1) 1) (cmpCfg c 0 0 x)s₁:ℕleft✝:1 ≤ s₁hs₁:nSteps weakCollatz41 s₁ (stageCfg c x y) = some (cmpCfg c 0 0 x)s₂:ℕcfg:Cfg 41 2hs₂:nSteps weakCollatz41 s₂ (cmpCfg c 0 0 x) = some cfghnone:step weakCollatz41 cfg = none⊢ ∃ s cfg, nSteps weakCollatz41 s (stageCfg c x y) = some cfg ∧ step weakCollatz41 cfg = none All goals completed! 🐙private theorem stage_round_mismatch (c' x y : ℕ) (hx : 3 ≤ x) (hy : 1 ≤ y) (hne : terras y ≠ x) : reachPos (stageCfg (c' + 1) x y) (postDecCfg c' x (terras y)) := c':ℕx:ℕy:ℕhx:3 ≤ xhy:1 ≤ yhne:terras y ≠ x⊢ reachPos (stageCfg (c' + 1) x y) (postDecCfg c' x (terras y)) c':ℕx:ℕy:ℕhx:3 ≤ xhy:1 ≤ yhne:terras y ≠ xz:ℕ := terras y⊢ reachPos (stageCfg (c' + 1) x y) (postDecCfg c' x (terras y)) c':ℕx:ℕy:ℕhx:3 ≤ xhy:1 ≤ yhne:terras y ≠ xz:ℕ := terras yhz:1 ≤ z⊢ reachPos (stageCfg (c' + 1) x y) (postDecCfg c' x (terras y)) c':ℕx:ℕy:ℕhx:3 ≤ xhy:1 ≤ yhne:terras y ≠ xz:ℕ := terras yhz:1 ≤ z⊢ reachPos (cmpCfg (c' + 1) (x - 1) (terras y - 1) 1) (postDecCfg c' x (terras y)) c':ℕx:ℕy:ℕhx:3 ≤ xhy:1 ≤ yhne:terras y ≠ xz:ℕ := terras yhz:1 ≤ zhto_rest0:reachPos (cmpCfg (c' + 1) (x - 1) (z - 1) 1) (restCfg (c' + 1) x z 0)⊢ reachPos (cmpCfg (c' + 1) (x - 1) (terras y - 1) 1) (postDecCfg c' x (terras y)) All goals completed! 🐙private theorem terras_iterate_pos {y : ℕ} (hy : 1 ≤ y) (m : ℕ) : 1 ≤ terras^[m] y := y:ℕhy:1 ≤ ym:ℕ⊢ 1 ≤ terras^[m] y induction m generalizing y with y:ℕhy:1 ≤ y⊢ 1 ≤ terras^[0] y All goals completed! 🐙 m:ℕih:∀ {y : ℕ}, 1 ≤ y → 1 ≤ terras^[m] yy:ℕhy:1 ≤ y⊢ 1 ≤ terras^[m + 1] y m:ℕih:∀ {y : ℕ}, 1 ≤ y → 1 ≤ terras^[m] yy:ℕhy:1 ≤ y⊢ 1 ≤ terras^[m] (terras y) All goals completed! 🐙private def StageClear (x m : ℕ) : Prop := ∀ j : ℕ, 1 ≤ j → j ≤ m → terras^[j] x ≠ xprivate theorem stage_within_reach (x : ℕ) (hx : 3 ≤ x) (m : ℕ) (hm : m < x) (hcl : StageClear x m) : m = 0 ∨ reachPos (stageCfg x x x) (stageCfg (x - m) x (terras^[m] x)) := x:ℕhx:3 ≤ xm:ℕhm:m < xhcl:StageClear x m⊢ m = 0 ∨ reachPos (stageCfg x x x) (stageCfg (x - m) x (terras^[m] x)) induction m with x:ℕhx:3 ≤ xhm:0 < xhcl:StageClear x 0⊢ 0 = 0 ∨ reachPos (stageCfg x x x) (stageCfg (x - 0) x (terras^[0] x)) All goals completed! 🐙 x:ℕhx:3 ≤ xm:ℕih:m < x → StageClear x m → m = 0 ∨ reachPos (stageCfg x x x) (stageCfg (x - m) x (terras^[m] x))hm:m + 1 < xhcl:StageClear x (m + 1)⊢ m + 1 = 0 ∨ reachPos (stageCfg x x x) (stageCfg (x - (m + 1)) x (terras^[m + 1] x)) x:ℕhx:3 ≤ xm:ℕih:m < x → StageClear x m → m = 0 ∨ reachPos (stageCfg x x x) (stageCfg (x - m) x (terras^[m] x))hm:m + 1 < xhcl:StageClear x (m + 1)⊢ reachPos (stageCfg x x x) (stageCfg (x - (m + 1)) x (terras^[m + 1] x)) rcases ih (x:ℕhx:3 ≤ xm:ℕih:m < x → StageClear x m → m = 0 ∨ reachPos (stageCfg x x x) (stageCfg (x - m) x (terras^[m] x))hm:m + 1 < xhcl:StageClear x (m + 1)⊢ m < x All goals completed! 🐙) (fun j hj1 hjm => hcl j hj1 (x:ℕhx:3 ≤ xm:ℕih:m < x → StageClear x m → m = 0 ∨ reachPos (stageCfg x x x) (stageCfg (x - m) x (terras^[m] x))hm:m + 1 < xhcl:StageClear x (m + 1)j:ℕhj1:1 ≤ jhjm:j ≤ m⊢ j ≤ m + 1 All goals completed! 🐙)) with rfl | hprev x:ℕhx:3 ≤ xih:0 < x → StageClear x 0 → 0 = 0 ∨ reachPos (stageCfg x x x) (stageCfg (x - 0) x (terras^[0] x))hm:0 + 1 < xhcl:StageClear x (0 + 1)⊢ reachPos (stageCfg x x x) (stageCfg (x - (0 + 1)) x (terras^[0 + 1] x)) x:ℕhx:3 ≤ xih:0 < x → StageClear x 0 → 0 = 0 ∨ reachPos (stageCfg x x x) (stageCfg (x - 0) x (terras^[0] x))hm:0 + 1 < xhcl:StageClear x (0 + 1)hne1:terras x ≠ x⊢ reachPos (stageCfg x x x) (stageCfg (x - (0 + 1)) x (terras^[0 + 1] x)) x:ℕhx:3 ≤ xih:0 < x → StageClear x 0 → 0 = 0 ∨ reachPos (stageCfg x x x) (stageCfg (x - 0) x (terras^[0] x))hm:0 + 1 < xhcl:StageClear x (0 + 1)hne1:terras x ≠ xhchk:reachPos (stageCfg (x - 1 + 1) x x) (postDecCfg (x - 1) x (terras x))⊢ reachPos (stageCfg x x x) (stageCfg (x - (0 + 1)) x (terras^[0 + 1] x)) x:ℕhx:3 ≤ xih:0 < x → StageClear x 0 → 0 = 0 ∨ reachPos (stageCfg x x x) (stageCfg (x - 0) x (terras^[0] x))hm:0 + 1 < xhcl:StageClear x (0 + 1)hne1:terras x ≠ xhchk:reachPos (stageCfg x x x) (postDecCfg (x - 1) x (terras x))⊢ reachPos (stageCfg x x x) (stageCfg (x - (0 + 1)) x (terras^[0 + 1] x)) x:ℕhx:3 ≤ xih:0 < x → StageClear x 0 → 0 = 0 ∨ reachPos (stageCfg x x x) (stageCfg (x - 0) x (terras^[0] x))hm:0 + 1 < xhcl:StageClear x (0 + 1)hne1:terras x ≠ xhchk:reachPos (stageCfg x x x) (postDecCfg (x - 1) x (terras x))hcont:reachPos (postDecCfg (x - 2 + 1) x (terras x)) (stageCfg (x - 2 + 1) x (terras x))⊢ reachPos (stageCfg x x x) (stageCfg (x - (0 + 1)) x (terras^[0 + 1] x)) x:ℕhx:3 ≤ xih:0 < x → StageClear x 0 → 0 = 0 ∨ reachPos (stageCfg x x x) (stageCfg (x - 0) x (terras^[0] x))hm:0 + 1 < xhcl:StageClear x (0 + 1)hne1:terras x ≠ xhchk:reachPos (stageCfg x x x) (postDecCfg (x - 1) x (terras x))hcont:reachPos (postDecCfg (x - 1) x (terras x)) (stageCfg (x - 1) x (terras x))⊢ reachPos (stageCfg x x x) (stageCfg (x - (0 + 1)) x (terras^[0 + 1] x)) x:ℕhx:3 ≤ xih:0 < x → StageClear x 0 → 0 = 0 ∨ reachPos (stageCfg x x x) (stageCfg (x - 0) x (terras^[0] x))hm:0 + 1 < xhcl:StageClear x (0 + 1)hne1:terras x ≠ xhchk:reachPos (stageCfg x x x) (postDecCfg (x - 1) x (terras x))hcont:reachPos (postDecCfg (x - 1) x (terras x)) (stageCfg (x - 1) x (terras x))⊢ reachPos (stageCfg x x x) (stageCfg x.pred x (terras x)) All goals completed! 🐙 x:ℕhx:3 ≤ xm:ℕih:m < x → StageClear x m → m = 0 ∨ reachPos (stageCfg x x x) (stageCfg (x - m) x (terras^[m] x))hm:m + 1 < xhcl:StageClear x (m + 1)hprev:reachPos (stageCfg x x x) (stageCfg (x - m) x (terras^[m] x))⊢ reachPos (stageCfg x x x) (stageCfg (x - (m + 1)) x (terras^[m + 1] x)) x:ℕhx:3 ≤ xm:ℕih:m < x → StageClear x m → m = 0 ∨ reachPos (stageCfg x x x) (stageCfg (x - m) x (terras^[m] x))hm:m + 1 < xhcl:StageClear x (m + 1)hprev:reachPos (stageCfg x x x) (stageCfg (x - m) x (terras^[m] x))hne:terras (terras^[m] x) ≠ x⊢ reachPos (stageCfg x x x) (stageCfg (x - (m + 1)) x (terras^[m + 1] x)) x:ℕhx:3 ≤ xm:ℕih:m < x → StageClear x m → m = 0 ∨ reachPos (stageCfg x x x) (stageCfg (x - m) x (terras^[m] x))hm:m + 1 < xhcl:StageClear x (m + 1)hprev:reachPos (stageCfg x x x) (stageCfg (x - m) x (terras^[m] x))hne:terras (terras^[m] x) ≠ xhy_pos:1 ≤ terras^[m] x⊢ reachPos (stageCfg x x x) (stageCfg (x - (m + 1)) x (terras^[m + 1] x)) x:ℕhx:3 ≤ xm:ℕih:m < x → StageClear x m → m = 0 ∨ reachPos (stageCfg x x x) (stageCfg (x - m) x (terras^[m] x))hm:m + 1 < xhcl:StageClear x (m + 1)hprev:reachPos (stageCfg x x x) (stageCfg (x - m) x (terras^[m] x))hne:terras (terras^[m] x) ≠ xhy_pos:1 ≤ terras^[m] xhxm_eq:x - m = x - (m + 1) + 1⊢ reachPos (stageCfg x x x) (stageCfg (x - (m + 1)) x (terras^[m + 1] x)) x:ℕhx:3 ≤ xm:ℕih:m < x → StageClear x m → m = 0 ∨ reachPos (stageCfg x x x) (stageCfg (x - m) x (terras^[m] x))hm:m + 1 < xhcl:StageClear x (m + 1)hprev:reachPos (stageCfg x x x) (stageCfg (x - m) x (terras^[m] x))hne:terras (terras^[m] x) ≠ xhy_pos:1 ≤ terras^[m] xhxm_eq:x - m = x - (m + 1) + 1hxm1_eq:x - (m + 1) = x - (m + 2) + 1⊢ reachPos (stageCfg x x x) (stageCfg (x - (m + 1)) x (terras^[m + 1] x)) x:ℕhx:3 ≤ xm:ℕih:m < x → StageClear x m → m = 0 ∨ reachPos (stageCfg x x x) (stageCfg (x - m) x (terras^[m] x))hm:m + 1 < xhcl:StageClear x (m + 1)hprev:reachPos (stageCfg x x x) (stageCfg (x - (m + 1) + 1) x (terras^[m] x))hne:terras (terras^[m] x) ≠ xhy_pos:1 ≤ terras^[m] xhxm_eq:x - m = x - (m + 1) + 1hxm1_eq:x - (m + 1) = x - (m + 2) + 1⊢ reachPos (stageCfg x x x) (stageCfg (x - (m + 1)) x (terras^[m + 1] x)) x:ℕhx:3 ≤ xm:ℕih:m < x → StageClear x m → m = 0 ∨ reachPos (stageCfg x x x) (stageCfg (x - m) x (terras^[m] x))hm:m + 1 < xhcl:StageClear x (m + 1)hprev:reachPos (stageCfg x x x) (stageCfg (x - (m + 1) + 1) x (terras^[m] x))hne:terras (terras^[m] x) ≠ xhy_pos:1 ≤ terras^[m] xhxm_eq:x - m = x - (m + 1) + 1hxm1_eq:x - (m + 1) = x - (m + 2) + 1hchk:reachPos (stageCfg (x - (m + 1) + 1) x (terras^[m] x)) (postDecCfg (x - (m + 1)) x (terras (terras^[m] x)))⊢ reachPos (stageCfg x x x) (stageCfg (x - (m + 1)) x (terras^[m + 1] x)) x:ℕhx:3 ≤ xm:ℕih:m < x → StageClear x m → m = 0 ∨ reachPos (stageCfg x x x) (stageCfg (x - m) x (terras^[m] x))hm:m + 1 < xhcl:StageClear x (m + 1)hprev:reachPos (stageCfg x x x) (stageCfg (x - (m + 2) + 1 + 1) x (terras^[m] x))hne:terras (terras^[m] x) ≠ xhy_pos:1 ≤ terras^[m] xhxm_eq:x - m = x - (m + 1) + 1hxm1_eq:x - (m + 1) = x - (m + 2) + 1hchk:reachPos (stageCfg (x - (m + 2) + 1 + 1) x (terras^[m] x)) (postDecCfg (x - (m + 2) + 1) x (terras (terras^[m] x)))⊢ reachPos (stageCfg x x x) (stageCfg (x - (m + 2) + 1) x (terras^[m + 1] x)) x:ℕhx:3 ≤ xm:ℕih:m < x → StageClear x m → m = 0 ∨ reachPos (stageCfg x x x) (stageCfg (x - m) x (terras^[m] x))hm:m + 1 < xhcl:StageClear x (m + 1)hprev:reachPos (stageCfg x x x) (stageCfg (x - (m + 2) + 1 + 1) x (terras^[m] x))hne:terras (terras^[m] x) ≠ xhy_pos:1 ≤ terras^[m] xhxm_eq:x - m = x - (m + 1) + 1hxm1_eq:x - (m + 1) = x - (m + 2) + 1hchk:reachPos (stageCfg (x - (m + 2) + 1 + 1) x (terras^[m] x)) (postDecCfg (x - (m + 2) + 1) x (terras (terras^[m] x)))hcont:reachPos (postDecCfg (x - (m + 2) + 1) x (terras (terras^[m] x))) (stageCfg (x - (m + 2) + 1) x (terras (terras^[m] x)))⊢ reachPos (stageCfg x x x) (stageCfg (x - (m + 2) + 1) x (terras^[m + 1] x)) x:ℕhx:3 ≤ xm:ℕih:m < x → StageClear x m → m = 0 ∨ reachPos (stageCfg x x x) (stageCfg (x - m) x (terras^[m] x))hm:m + 1 < xhcl:StageClear x (m + 1)hprev:reachPos (stageCfg x x x) (stageCfg (x - (m + 2) + 1 + 1) x (terras^[m] x))hne:terras (terras^[m] x) ≠ xhy_pos:1 ≤ terras^[m] xhxm_eq:x - m = x - (m + 1) + 1hxm1_eq:x - (m + 1) = x - (m + 2) + 1hchk:reachPos (stageCfg (x - (m + 2) + 1 + 1) x (terras^[m] x)) (postDecCfg (x - (m + 2) + 1) x (terras (terras^[m] x)))hcont:reachPos (postDecCfg (x - (m + 2) + 1) x (terras (terras^[m] x))) (stageCfg (x - (m + 2) + 1) x (terras (terras^[m] x)))⊢ reachPos (stageCfg x x x) (stageCfg (x - (m + 2) + 1) x (terras (terras^[m] x))) All goals completed! 🐙private theorem stage_full_advance (x : ℕ) (hx : 3 ≤ x) (hcl : StageClear x x) : reachPos (stageCfg x x x) (stageCfg (x + 1) (x + 1) (x + 1)) := x:ℕhx:3 ≤ xhcl:StageClear x x⊢ reachPos (stageCfg x x x) (stageCfg (x + 1) (x + 1) (x + 1)) rcases stage_within_reach x hx (x - 1) (x:ℕhx:3 ≤ xhcl:StageClear x x⊢ x - 1 < x All goals completed! 🐙) (fun j hj1 hjm => hcl j hj1 (x:ℕhx:3 ≤ xhcl:StageClear x xj:ℕhj1:1 ≤ jhjm:j ≤ x - 1⊢ j ≤ x All goals completed! 🐙)) with h0 | hprev x:ℕhx:3 ≤ xhcl:StageClear x xh0:x - 1 = 0⊢ reachPos (stageCfg x x x) (stageCfg (x + 1) (x + 1) (x + 1)) x:ℕhx:3 ≤ xhcl:StageClear x xh0:x - 1 = 0⊢ False; All goals completed! 🐙 x:ℕhx:3 ≤ xhcl:StageClear x xhprev:reachPos (stageCfg x x x) (stageCfg (x - (x - 1)) x (terras^[x - 1] x))⊢ reachPos (stageCfg x x x) (stageCfg (x + 1) (x + 1) (x + 1)) x:ℕhx:3 ≤ xhcl:StageClear x xhprev:reachPos (stageCfg x x x) (stageCfg 1 x (terras^[x - 1] x))⊢ reachPos (stageCfg x x x) (stageCfg (x + 1) (x + 1) (x + 1)) x:ℕhx:3 ≤ xhcl:StageClear x xhprev:reachPos (stageCfg x x x) (stageCfg 1 x (terras^[x - 1] x))hne:terras (terras^[x - 1] x) ≠ x⊢ reachPos (stageCfg x x x) (stageCfg (x + 1) (x + 1) (x + 1)) x:ℕhx:3 ≤ xhcl:StageClear x xhprev:reachPos (stageCfg x x x) (stageCfg 1 x (terras^[x - 1] x))hne:terras (terras^[x - 1] x) ≠ xhy_pos:1 ≤ terras^[x - 1] x⊢ reachPos (stageCfg x x x) (stageCfg (x + 1) (x + 1) (x + 1)) x:ℕhx:3 ≤ xhcl:StageClear x xhprev:reachPos (stageCfg x x x) (stageCfg 1 x (terras^[x - 1] x))hne:terras (terras^[x - 1] x) ≠ xhy_pos:1 ≤ terras^[x - 1] xhchk:reachPos (stageCfg (0 + 1) x (terras^[x - 1] x)) (postDecCfg 0 x (terras (terras^[x - 1] x)))⊢ reachPos (stageCfg x x x) (stageCfg (x + 1) (x + 1) (x + 1)) All goals completed! 🐙private theorem stage_first_hit_halt (x j : ℕ) (hx : 3 ≤ x) (hj1 : 1 ≤ j) (hjx : j ≤ x) (hcl : StageClear x (j - 1)) (hhit : terras^[j] x = x) : ∃ s cfg, nSteps weakCollatz41 s (stageCfg x x x) = some cfg ∧ step weakCollatz41 cfg = none := x:ℕj:ℕhx:3 ≤ xhj1:1 ≤ jhjx:j ≤ xhcl:StageClear x (j - 1)hhit:terras^[j] x = x⊢ ∃ s cfg, nSteps weakCollatz41 s (stageCfg x x x) = some cfg ∧ step weakCollatz41 cfg = none x:ℕhx:3 ≤ xhj1:1 ≤ 1hjx:1 ≤ xhcl:StageClear x (1 - 1)hhit:terras^[1] x = x⊢ ∃ s cfg, nSteps weakCollatz41 s (stageCfg x x x) = some cfg ∧ step weakCollatz41 cfg = nonex:ℕj:ℕhx:3 ≤ xhj1:1 ≤ jhjx:j ≤ xhcl:StageClear x (j - 1)hhit:terras^[j] x = xhj_gt1:1 < j⊢ ∃ s cfg, nSteps weakCollatz41 s (stageCfg x x x) = some cfg ∧ step weakCollatz41 cfg = none x:ℕhx:3 ≤ xhj1:1 ≤ 1hjx:1 ≤ xhcl:StageClear x (1 - 1)hhit:terras^[1] x = x⊢ ∃ s cfg, nSteps weakCollatz41 s (stageCfg x x x) = some cfg ∧ step weakCollatz41 cfg = none exact stage_round_halt x x x (x:ℕhx:3 ≤ xhj1:1 ≤ 1hjx:1 ≤ xhcl:StageClear x (1 - 1)hhit:terras^[1] x = x⊢ 1 ≤ x All goals completed! 🐙) hx (x:ℕhx:3 ≤ xhj1:1 ≤ 1hjx:1 ≤ xhcl:StageClear x (1 - 1)hhit:terras^[1] x = x⊢ 1 ≤ x All goals completed! 🐙) hhit x:ℕj:ℕhx:3 ≤ xhj1:1 ≤ jhjx:j ≤ xhcl:StageClear x (j - 1)hhit:terras^[j] x = xhj_gt1:1 < j⊢ ∃ s cfg, nSteps weakCollatz41 s (stageCfg x x x) = some cfg ∧ step weakCollatz41 cfg = none rcases stage_within_reach x hx (j - 1) (x:ℕj:ℕhx:3 ≤ xhj1:1 ≤ jhjx:j ≤ xhcl:StageClear x (j - 1)hhit:terras^[j] x = xhj_gt1:1 < j⊢ j - 1 < x All goals completed! 🐙) hcl with h0 | hprev x:ℕj:ℕhx:3 ≤ xhj1:1 ≤ jhjx:j ≤ xhcl:StageClear x (j - 1)hhit:terras^[j] x = xhj_gt1:1 < jh0:j - 1 = 0⊢ ∃ s cfg, nSteps weakCollatz41 s (stageCfg x x x) = some cfg ∧ step weakCollatz41 cfg = none x:ℕj:ℕhx:3 ≤ xhj1:1 ≤ jhjx:j ≤ xhcl:StageClear x (j - 1)hhit:terras^[j] x = xhj_gt1:1 < jh0:j - 1 = 0⊢ False; All goals completed! 🐙 x:ℕj:ℕhx:3 ≤ xhj1:1 ≤ jhjx:j ≤ xhcl:StageClear x (j - 1)hhit:terras^[j] x = xhj_gt1:1 < jhprev:reachPos (stageCfg x x x) (stageCfg (x - (j - 1)) x (terras^[j - 1] x))⊢ ∃ s cfg, nSteps weakCollatz41 s (stageCfg x x x) = some cfg ∧ step weakCollatz41 cfg = none x:ℕj:ℕhx:3 ≤ xhj1:1 ≤ jhjx:j ≤ xhcl:StageClear x (j - 1)hhit:terras^[j] x = xhj_gt1:1 < js₁:ℕleft✝:1 ≤ s₁hs₁:nSteps weakCollatz41 s₁ (stageCfg x x x) = some (stageCfg (x - (j - 1)) x (terras^[j - 1] x))⊢ ∃ s cfg, nSteps weakCollatz41 s (stageCfg x x x) = some cfg ∧ step weakCollatz41 cfg = none x:ℕj:ℕhx:3 ≤ xhj1:1 ≤ jhjx:j ≤ xhcl:StageClear x (j - 1)hhit:terras^[j] x = xhj_gt1:1 < js₁:ℕleft✝:1 ≤ s₁hs₁:nSteps weakCollatz41 s₁ (stageCfg x x x) = some (stageCfg (x - (j - 1)) x (terras^[j - 1] x))hhit':terras (terras^[j - 1] x) = x⊢ ∃ s cfg, nSteps weakCollatz41 s (stageCfg x x x) = some cfg ∧ step weakCollatz41 cfg = none x:ℕj:ℕhx:3 ≤ xhj1:1 ≤ jhjx:j ≤ xhcl:StageClear x (j - 1)hhit:terras^[j] x = xhj_gt1:1 < js₁:ℕleft✝:1 ≤ s₁hs₁:nSteps weakCollatz41 s₁ (stageCfg x x x) = some (stageCfg (x - (j - 1)) x (terras^[j - 1] x))hhit':terras (terras^[j - 1] x) = xs₂:ℕcfg:Cfg 41 2hs₂:nSteps weakCollatz41 s₂ (stageCfg (x - (j - 1)) x (terras^[j - 1] x)) = some cfghnone:step weakCollatz41 cfg = none⊢ ∃ s cfg, nSteps weakCollatz41 s (stageCfg x x x) = some cfg ∧ step weakCollatz41 cfg = none All goals completed! 🐙private theorem stageClear_or_first_hit (x m : ℕ) : StageClear x m ∨ ∃ j : ℕ, 1 ≤ j ∧ j ≤ m ∧ StageClear x (j - 1) ∧ terras^[j] x = x := x:ℕm:ℕ⊢ StageClear x m ∨ ∃ j, 1 ≤ j ∧ j ≤ m ∧ StageClear x (j - 1) ∧ terras^[j] x = x induction m with x:ℕ⊢ StageClear x 0 ∨ ∃ j, 1 ≤ j ∧ j ≤ 0 ∧ StageClear x (j - 1) ∧ terras^[j] x = x exact Or.inl fun j hj1 hj0 => absurd (le_trans hj1 hj0) (x:ℕj:ℕhj1:1 ≤ jhj0:j ≤ 0⊢ ¬1 ≤ 0 All goals completed! 🐙) x:ℕm:ℕih:StageClear x m ∨ ∃ j, 1 ≤ j ∧ j ≤ m ∧ StageClear x (j - 1) ∧ terras^[j] x = x⊢ StageClear x (m + 1) ∨ ∃ j, 1 ≤ j ∧ j ≤ m + 1 ∧ StageClear x (j - 1) ∧ terras^[j] x = x x:ℕm:ℕhcl:StageClear x m⊢ StageClear x (m + 1) ∨ ∃ j, 1 ≤ j ∧ j ≤ m + 1 ∧ StageClear x (j - 1) ∧ terras^[j] x = xx:ℕm:ℕj:ℕhj1:1 ≤ jhjm:j ≤ mhcj:StageClear x (j - 1)hhit:terras^[j] x = x⊢ StageClear x (m + 1) ∨ ∃ j, 1 ≤ j ∧ j ≤ m + 1 ∧ StageClear x (j - 1) ∧ terras^[j] x = x x:ℕm:ℕhcl:StageClear x m⊢ StageClear x (m + 1) ∨ ∃ j, 1 ≤ j ∧ j ≤ m + 1 ∧ StageClear x (j - 1) ∧ terras^[j] x = x x:ℕm:ℕhcl:StageClear x mhhit:terras^[m + 1] x = x⊢ StageClear x (m + 1) ∨ ∃ j, 1 ≤ j ∧ j ≤ m + 1 ∧ StageClear x (j - 1) ∧ terras^[j] x = xx:ℕm:ℕhcl:StageClear x mhhit:¬terras^[m + 1] x = x⊢ StageClear x (m + 1) ∨ ∃ j, 1 ≤ j ∧ j ≤ m + 1 ∧ StageClear x (j - 1) ∧ terras^[j] x = x x:ℕm:ℕhcl:StageClear x mhhit:terras^[m + 1] x = x⊢ StageClear x (m + 1) ∨ ∃ j, 1 ≤ j ∧ j ≤ m + 1 ∧ StageClear x (j - 1) ∧ terras^[j] x = x exact Or.inr ⟨m + 1, x:ℕm:ℕhcl:StageClear x mhhit:terras^[m + 1] x = x⊢ 1 ≤ m + 1 All goals completed! 🐙, le_rfl, hcl, hhit⟩ x:ℕm:ℕhcl:StageClear x mhhit:¬terras^[m + 1] x = x⊢ StageClear x (m + 1) ∨ ∃ j, 1 ≤ j ∧ j ≤ m + 1 ∧ StageClear x (j - 1) ∧ terras^[j] x = x x:ℕm:ℕhcl:StageClear x mhhit:¬terras^[m + 1] x = xj:ℕhj1:1 ≤ jhjm1:j ≤ m + 1⊢ terras^[j] x ≠ x x:ℕm:ℕhcl:StageClear x mhhit:¬terras^[m + 1] x = xj:ℕhj1:1 ≤ jhjm1:j ≤ m + 1hlt:j < m + 1⊢ terras^[j] x ≠ xx:ℕm:ℕhcl:StageClear x mhhit:¬terras^[m + 1] x = xj:ℕhj1:1 ≤ jhjm1:j ≤ m + 1hge:j ≥ m + 1⊢ terras^[j] x ≠ x x:ℕm:ℕhcl:StageClear x mhhit:¬terras^[m + 1] x = xj:ℕhj1:1 ≤ jhjm1:j ≤ m + 1hlt:j < m + 1⊢ terras^[j] x ≠ x exact hcl j hj1 (x:ℕm:ℕhcl:StageClear x mhhit:¬terras^[m + 1] x = xj:ℕhj1:1 ≤ jhjm1:j ≤ m + 1hlt:j < m + 1⊢ j ≤ m All goals completed! 🐙) x:ℕm:ℕhcl:StageClear x mhhit:¬terras^[m + 1] x = xj:ℕhj1:1 ≤ jhjm1:j ≤ m + 1hge:j ≥ m + 1⊢ terras^[j] x ≠ x x:ℕm:ℕhcl:StageClear x mhhit:¬terras^[m + 1] x = xj:ℕhj1:1 ≤ jhjm1:j ≤ m + 1hge:j ≥ m + 1⊢ terras^[m + 1] x ≠ x; All goals completed! 🐙 x:ℕm:ℕj:ℕhj1:1 ≤ jhjm:j ≤ mhcj:StageClear x (j - 1)hhit:terras^[j] x = x⊢ StageClear x (m + 1) ∨ ∃ j, 1 ≤ j ∧ j ≤ m + 1 ∧ StageClear x (j - 1) ∧ terras^[j] x = x exact Or.inr ⟨j, hj1, x:ℕm:ℕj:ℕhj1:1 ≤ jhjm:j ≤ mhcj:StageClear x (j - 1)hhit:terras^[j] x = x⊢ j ≤ m + 1 All goals completed! 🐙, hcj, hhit⟩private def AllClear (X : ℕ) : Prop := ∀ x : ℕ, 3 ≤ x → x ≤ X → StageClear x xprivate theorem allClear_or_first_witness (X : ℕ) : AllClear X ∨ ∃ x j : ℕ, 3 ≤ x ∧ x ≤ X ∧ 1 ≤ j ∧ j ≤ x ∧ AllClear (x - 1) ∧ StageClear x (j - 1) ∧ terras^[j] x = x := X:ℕ⊢ AllClear X ∨ ∃ x j, 3 ≤ x ∧ x ≤ X ∧ 1 ≤ j ∧ j ≤ x ∧ AllClear (x - 1) ∧ StageClear x (j - 1) ∧ terras^[j] x = x induction X with ⊢ AllClear 0 ∨ ∃ x j, 3 ≤ x ∧ x ≤ 0 ∧ 1 ≤ j ∧ j ≤ x ∧ AllClear (x - 1) ∧ StageClear x (j - 1) ∧ terras^[j] x = x exact Or.inl fun x hx3 hx0 => absurd (le_trans hx3 hx0) (x:ℕhx3:3 ≤ xhx0:x ≤ 0⊢ ¬3 ≤ 0 All goals completed! 🐙) X:ℕih:AllClear X ∨ ∃ x j, 3 ≤ x ∧ x ≤ X ∧ 1 ≤ j ∧ j ≤ x ∧ AllClear (x - 1) ∧ StageClear x (j - 1) ∧ terras^[j] x = x⊢ AllClear (X + 1) ∨ ∃ x j, 3 ≤ x ∧ x ≤ X + 1 ∧ 1 ≤ j ∧ j ≤ x ∧ AllClear (x - 1) ∧ StageClear x (j - 1) ∧ terras^[j] x = x X:ℕhAll:AllClear X⊢ AllClear (X + 1) ∨ ∃ x j, 3 ≤ x ∧ x ≤ X + 1 ∧ 1 ≤ j ∧ j ≤ x ∧ AllClear (x - 1) ∧ StageClear x (j - 1) ∧ terras^[j] x = xX:ℕx:ℕj:ℕhx3:3 ≤ xhxX:x ≤ Xhj1:1 ≤ jhjx:j ≤ xhAllX:AllClear (x - 1)hStg:StageClear x (j - 1)hhit:terras^[j] x = x⊢ AllClear (X + 1) ∨ ∃ x j, 3 ≤ x ∧ x ≤ X + 1 ∧ 1 ≤ j ∧ j ≤ x ∧ AllClear (x - 1) ∧ StageClear x (j - 1) ∧ terras^[j] x = x X:ℕhAll:AllClear X⊢ AllClear (X + 1) ∨ ∃ x j, 3 ≤ x ∧ x ≤ X + 1 ∧ 1 ≤ j ∧ j ≤ x ∧ AllClear (x - 1) ∧ StageClear x (j - 1) ∧ terras^[j] x = x X:ℕhAll:AllClear Xhx3:3 ≤ X + 1⊢ AllClear (X + 1) ∨ ∃ x j, 3 ≤ x ∧ x ≤ X + 1 ∧ 1 ≤ j ∧ j ≤ x ∧ AllClear (x - 1) ∧ StageClear x (j - 1) ∧ terras^[j] x = xX:ℕhAll:AllClear Xhx3:¬3 ≤ X + 1⊢ AllClear (X + 1) ∨ ∃ x j, 3 ≤ x ∧ x ≤ X + 1 ∧ 1 ≤ j ∧ j ≤ x ∧ AllClear (x - 1) ∧ StageClear x (j - 1) ∧ terras^[j] x = x X:ℕhAll:AllClear Xhx3:3 ≤ X + 1⊢ AllClear (X + 1) ∨ ∃ x j, 3 ≤ x ∧ x ≤ X + 1 ∧ 1 ≤ j ∧ j ≤ x ∧ AllClear (x - 1) ∧ StageClear x (j - 1) ∧ terras^[j] x = x X:ℕhAll:AllClear Xhx3:3 ≤ X + 1hStg:StageClear (X + 1) (X + 1)⊢ AllClear (X + 1) ∨ ∃ x j, 3 ≤ x ∧ x ≤ X + 1 ∧ 1 ≤ j ∧ j ≤ x ∧ AllClear (x - 1) ∧ StageClear x (j - 1) ∧ terras^[j] x = xX:ℕhAll:AllClear Xhx3:3 ≤ X + 1j:ℕhj1:1 ≤ jhjx:j ≤ X + 1hcj:StageClear (X + 1) (j - 1)hhit:terras^[j] (X + 1) = X + 1⊢ AllClear (X + 1) ∨ ∃ x j, 3 ≤ x ∧ x ≤ X + 1 ∧ 1 ≤ j ∧ j ≤ x ∧ AllClear (x - 1) ∧ StageClear x (j - 1) ∧ terras^[j] x = x X:ℕhAll:AllClear Xhx3:3 ≤ X + 1hStg:StageClear (X + 1) (X + 1)⊢ AllClear (X + 1) ∨ ∃ x j, 3 ≤ x ∧ x ≤ X + 1 ∧ 1 ≤ j ∧ j ≤ x ∧ AllClear (x - 1) ∧ StageClear x (j - 1) ∧ terras^[j] x = x X:ℕhAll:AllClear Xhx3:3 ≤ X + 1hStg:StageClear (X + 1) (X + 1)x:ℕhx_ge3:3 ≤ xhx_le:x ≤ X + 1⊢ StageClear x x X:ℕhAll:AllClear Xhx3:3 ≤ X + 1hStg:StageClear (X + 1) (X + 1)x:ℕhx_ge3:3 ≤ xhx_le:x ≤ X + 1hlt:x < X + 1⊢ StageClear x xX:ℕhAll:AllClear Xhx3:3 ≤ X + 1hStg:StageClear (X + 1) (X + 1)x:ℕhx_ge3:3 ≤ xhx_le:x ≤ X + 1hge:x ≥ X + 1⊢ StageClear x x X:ℕhAll:AllClear Xhx3:3 ≤ X + 1hStg:StageClear (X + 1) (X + 1)x:ℕhx_ge3:3 ≤ xhx_le:x ≤ X + 1hlt:x < X + 1⊢ StageClear x x exact hAll x hx_ge3 (X:ℕhAll:AllClear Xhx3:3 ≤ X + 1hStg:StageClear (X + 1) (X + 1)x:ℕhx_ge3:3 ≤ xhx_le:x ≤ X + 1hlt:x < X + 1⊢ x ≤ X All goals completed! 🐙) X:ℕhAll:AllClear Xhx3:3 ≤ X + 1hStg:StageClear (X + 1) (X + 1)x:ℕhx_ge3:3 ≤ xhx_le:x ≤ X + 1hge:x ≥ X + 1⊢ StageClear x x X:ℕhAll:AllClear Xhx3:3 ≤ X + 1hStg:StageClear (X + 1) (X + 1)x:ℕhx_ge3:3 ≤ xhx_le:x ≤ X + 1hge:x ≥ X + 1⊢ StageClear (X + 1) (X + 1); All goals completed! 🐙 X:ℕhAll:AllClear Xhx3:3 ≤ X + 1j:ℕhj1:1 ≤ jhjx:j ≤ X + 1hcj:StageClear (X + 1) (j - 1)hhit:terras^[j] (X + 1) = X + 1⊢ AllClear (X + 1) ∨ ∃ x j, 3 ≤ x ∧ x ≤ X + 1 ∧ 1 ≤ j ∧ j ≤ x ∧ AllClear (x - 1) ∧ StageClear x (j - 1) ∧ terras^[j] x = x All goals completed! 🐙 X:ℕhAll:AllClear Xhx3:¬3 ≤ X + 1⊢ AllClear (X + 1) ∨ ∃ x j, 3 ≤ x ∧ x ≤ X + 1 ∧ 1 ≤ j ∧ j ≤ x ∧ AllClear (x - 1) ∧ StageClear x (j - 1) ∧ terras^[j] x = x All goals completed! 🐙 X:ℕx:ℕj:ℕhx3:3 ≤ xhxX:x ≤ Xhj1:1 ≤ jhjx:j ≤ xhAllX:AllClear (x - 1)hStg:StageClear x (j - 1)hhit:terras^[j] x = x⊢ AllClear (X + 1) ∨ ∃ x j, 3 ≤ x ∧ x ≤ X + 1 ∧ 1 ≤ j ∧ j ≤ x ∧ AllClear (x - 1) ∧ StageClear x (j - 1) ∧ terras^[j] x = x exact Or.inr ⟨x, j, hx3, X:ℕx:ℕj:ℕhx3:3 ≤ xhxX:x ≤ Xhj1:1 ≤ jhjx:j ≤ xhAllX:AllClear (x - 1)hStg:StageClear x (j - 1)hhit:terras^[j] x = x⊢ x ≤ X + 1 All goals completed! 🐙, hj1, hjx, hAllX, hStg, hhit⟩private theorem reach_stage_from_init (X : ℕ) (hX : 3 ≤ X) (hAll : AllClear (X - 1)) : ∃ s : ℕ, X - 2 ≤ s ∧ nSteps weakCollatz41 s init = some (stageCfg X X X) := X:ℕhX:3 ≤ XhAll:AllClear (X - 1)⊢ ∃ s, X - 2 ≤ s ∧ nSteps weakCollatz41 s init = some (stageCfg X X X) induction X, hX using Nat.le_induction with X:ℕhAll:AllClear (3 - 1)⊢ ∃ s, 3 - 2 ≤ s ∧ nSteps weakCollatz41 s init = some (stageCfg 3 3 3) X:ℕhAll:AllClear (3 - 1)s:ℕhs1:1 ≤ shs:nSteps weakCollatz41 s init = some (stageCfg 3 3 3)⊢ ∃ s, 3 - 2 ≤ s ∧ nSteps weakCollatz41 s init = some (stageCfg 3 3 3) exact ⟨s, X:ℕhAll:AllClear (3 - 1)s:ℕhs1:1 ≤ shs:nSteps weakCollatz41 s init = some (stageCfg 3 3 3)⊢ 3 - 2 ≤ s All goals completed! 🐙, hs⟩ X✝:ℕX:ℕhX:3 ≤ Xih:AllClear (X - 1) → ∃ s, X - 2 ≤ s ∧ nSteps weakCollatz41 s init = some (stageCfg X X X)hAll:AllClear (X + 1 - 1)⊢ ∃ s, X + 1 - 2 ≤ s ∧ nSteps weakCollatz41 s init = some (stageCfg (X + 1) (X + 1) (X + 1)) X✝:ℕX:ℕhX:3 ≤ Xih:AllClear (X - 1) → ∃ s, X - 2 ≤ s ∧ nSteps weakCollatz41 s init = some (stageCfg X X X)hAll:AllClear (X + 1 - 1)s₁:ℕhs₁_ge:X - 2 ≤ s₁hs₁:nSteps weakCollatz41 s₁ init = some (stageCfg X X X)⊢ ∃ s, X + 1 - 2 ≤ s ∧ nSteps weakCollatz41 s init = some (stageCfg (X + 1) (X + 1) (X + 1)) X✝:ℕX:ℕhX:3 ≤ Xih:AllClear (X - 1) → ∃ s, X - 2 ≤ s ∧ nSteps weakCollatz41 s init = some (stageCfg X X X)hAll:AllClear (X + 1 - 1)s₁:ℕhs₁_ge:X - 2 ≤ s₁hs₁:nSteps weakCollatz41 s₁ init = some (stageCfg X X X)hclX:StageClear X X⊢ ∃ s, X + 1 - 2 ≤ s ∧ nSteps weakCollatz41 s init = some (stageCfg (X + 1) (X + 1) (X + 1)) X✝:ℕX:ℕhX:3 ≤ Xih:AllClear (X - 1) → ∃ s, X - 2 ≤ s ∧ nSteps weakCollatz41 s init = some (stageCfg X X X)hAll:AllClear (X + 1 - 1)s₁:ℕhs₁_ge:X - 2 ≤ s₁hs₁:nSteps weakCollatz41 s₁ init = some (stageCfg X X X)hclX:StageClear X Xs₂:ℕhs₂_pos:1 ≤ s₂hs₂:nSteps weakCollatz41 s₂ (stageCfg X X X) = some (stageCfg (X + 1) (X + 1) (X + 1))⊢ ∃ s, X + 1 - 2 ≤ s ∧ nSteps weakCollatz41 s init = some (stageCfg (X + 1) (X + 1) (X + 1)) exact ⟨s₁ + s₂, X✝:ℕX:ℕhX:3 ≤ Xih:AllClear (X - 1) → ∃ s, X - 2 ≤ s ∧ nSteps weakCollatz41 s init = some (stageCfg X X X)hAll:AllClear (X + 1 - 1)s₁:ℕhs₁_ge:X - 2 ≤ s₁hs₁:nSteps weakCollatz41 s₁ init = some (stageCfg X X X)hclX:StageClear X Xs₂:ℕhs₂_pos:1 ≤ s₂hs₂:nSteps weakCollatz41 s₂ (stageCfg X X X) = some (stageCfg (X + 1) (X + 1) (X + 1))⊢ X + 1 - 2 ≤ s₁ + s₂ All goals completed! 🐙, nSteps_bind_eq hs₁ hs₂⟩

The 41-state machine weakCollatz41 (weak_collatz_41) halts on the blank tape if and only if there exist x ≥ 3 and 1 ≤ j ≤ x with terras^[j] x = x (constructive, zero Classical.choice).

theorem halts_weakCollatz41_iff_bounded_cycle : ConjectureMachines.Halts weakCollatz41 ↔ ∃ x j : ℕ, 3 ≤ x ∧ 1 ≤ j ∧ j ≤ x ∧ terras^[j] x = x := ⊢ ConjectureMachines.Halts weakCollatz41 ↔ ∃ x j, 3 ≤ x ∧ 1 ≤ j ∧ j ≤ x ∧ terras^[j] x = x ⊢ (eval (step weakCollatz41) init).Dom ↔ ∃ x j, 3 ≤ x ∧ 1 ≤ j ∧ j ≤ x ∧ terras^[j] x = x ⊢ (eval (step weakCollatz41) init).Dom → ∃ x j, 3 ≤ x ∧ 1 ≤ j ∧ j ≤ x ∧ terras^[j] x = x⊢ (∃ x j, 3 ≤ x ∧ 1 ≤ j ∧ j ≤ x ∧ terras^[j] x = x) → (eval (step weakCollatz41) init).Dom ⊢ (eval (step weakCollatz41) init).Dom → ∃ x j, 3 ≤ x ∧ 1 ≤ j ∧ j ≤ x ∧ terras^[j] x = x hdom:(eval (step weakCollatz41) init).Dom⊢ ∃ x j, 3 ≤ x ∧ 1 ≤ j ∧ j ≤ x ∧ terras^[j] x = x hdom:∃ y, y ∈ eval (step weakCollatz41) init⊢ ∃ x j, 3 ≤ x ∧ 1 ≤ j ∧ j ≤ x ∧ terras^[j] x = x b:Cfg 41 2hb:b ∈ eval (step weakCollatz41) init⊢ ∃ x j, 3 ≤ x ∧ 1 ≤ j ∧ j ≤ x ∧ terras^[j] x = x b:Cfg 41 2hb:Reaches (step weakCollatz41) init b ∧ step weakCollatz41 b = none⊢ ∃ x j, 3 ≤ x ∧ 1 ≤ j ∧ j ≤ x ∧ terras^[j] x = x b:Cfg 41 2hreach:Reaches (step weakCollatz41) init bhnone:step weakCollatz41 b = none⊢ ∃ x j, 3 ≤ x ∧ 1 ≤ j ∧ j ≤ x ∧ terras^[j] x = x b:Cfg 41 2hreach:Reaches (step weakCollatz41) init bhnone:step weakCollatz41 b = nonek:ℕhk:nSteps weakCollatz41 k init = some b⊢ ∃ x j, 3 ≤ x ∧ 1 ≤ j ∧ j ≤ x ∧ terras^[j] x = x b:Cfg 41 2hreach:Reaches (step weakCollatz41) init bhnone:step weakCollatz41 b = nonek:ℕhk:nSteps weakCollatz41 k init = some bhAll:AllClear (k + 3)⊢ ∃ x j, 3 ≤ x ∧ 1 ≤ j ∧ j ≤ x ∧ terras^[j] x = xb:Cfg 41 2hreach:Reaches (step weakCollatz41) init bhnone:step weakCollatz41 b = nonek:ℕhk:nSteps weakCollatz41 k init = some bx:ℕj:ℕhx3:3 ≤ xhj1:1 ≤ jhjx:j ≤ xhhit:terras^[j] x = x⊢ ∃ x j, 3 ≤ x ∧ 1 ≤ j ∧ j ≤ x ∧ terras^[j] x = x b:Cfg 41 2hreach:Reaches (step weakCollatz41) init bhnone:step weakCollatz41 b = nonek:ℕhk:nSteps weakCollatz41 k init = some bhAll:AllClear (k + 3)⊢ ∃ x j, 3 ≤ x ∧ 1 ≤ j ∧ j ≤ x ∧ terras^[j] x = x b:Cfg 41 2hreach:Reaches (step weakCollatz41) init bhnone:step weakCollatz41 b = nonek:ℕhk:nSteps weakCollatz41 k init = some bhAll:AllClear (k + 3)s:ℕhks:k + 3 - 2 ≤ shs:nSteps weakCollatz41 s init = some (stageCfg (k + 3) (k + 3) (k + 3))⊢ ∃ x j, 3 ≤ x ∧ 1 ≤ j ∧ j ≤ x ∧ terras^[j] x = x b:Cfg 41 2hreach:Reaches (step weakCollatz41) init bhnone:step weakCollatz41 b = nonek:ℕhk:nSteps weakCollatz41 k init = some bhAll:AllClear (k + 3)s:ℕhks:k + 3 - 2 ≤ shs:none = some (stageCfg (k + 3) (k + 3) (k + 3))⊢ ∃ x j, 3 ≤ x ∧ 1 ≤ j ∧ j ≤ x ∧ terras^[j] x = x All goals completed! 🐙 b:Cfg 41 2hreach:Reaches (step weakCollatz41) init bhnone:step weakCollatz41 b = nonek:ℕhk:nSteps weakCollatz41 k init = some bx:ℕj:ℕhx3:3 ≤ xhj1:1 ≤ jhjx:j ≤ xhhit:terras^[j] x = x⊢ ∃ x j, 3 ≤ x ∧ 1 ≤ j ∧ j ≤ x ∧ terras^[j] x = x All goals completed! 🐙 ⊢ (∃ x j, 3 ≤ x ∧ 1 ≤ j ∧ j ≤ x ∧ terras^[j] x = x) → (eval (step weakCollatz41) init).Dom x:ℕj:ℕhx3:3 ≤ xhj1:1 ≤ jhjx:j ≤ xhhit:terras^[j] x = x⊢ (eval (step weakCollatz41) init).Dom x:ℕj:ℕhx3:3 ≤ xhj1:1 ≤ jhjx:j ≤ xhhit:terras^[j] x = xhAll:AllClear x⊢ (eval (step weakCollatz41) init).Domx:ℕj:ℕhx3:3 ≤ xhj1:1 ≤ jhjx:j ≤ xhhit:terras^[j] x = xx₀:ℕj₀:ℕhx₀3:3 ≤ x₀hj₀1:1 ≤ j₀hj₀x:j₀ ≤ x₀hAll₀:AllClear (x₀ - 1)hStg₀:StageClear x₀ (j₀ - 1)hhit₀:terras^[j₀] x₀ = x₀⊢ (eval (step weakCollatz41) init).Dom x:ℕj:ℕhx3:3 ≤ xhj1:1 ≤ jhjx:j ≤ xhhit:terras^[j] x = xhAll:AllClear x⊢ (eval (step weakCollatz41) init).Dom x:ℕj:ℕhx3:3 ≤ xhj1:1 ≤ jhjx:j ≤ xhhit:terras^[j] x = xhAll:AllClear x⊢ False All goals completed! 🐙 x:ℕj:ℕhx3:3 ≤ xhj1:1 ≤ jhjx:j ≤ xhhit:terras^[j] x = xx₀:ℕj₀:ℕhx₀3:3 ≤ x₀hj₀1:1 ≤ j₀hj₀x:j₀ ≤ x₀hAll₀:AllClear (x₀ - 1)hStg₀:StageClear x₀ (j₀ - 1)hhit₀:terras^[j₀] x₀ = x₀⊢ (eval (step weakCollatz41) init).Dom x:ℕj:ℕhx3:3 ≤ xhj1:1 ≤ jhjx:j ≤ xhhit:terras^[j] x = xx₀:ℕj₀:ℕhx₀3:3 ≤ x₀hj₀1:1 ≤ j₀hj₀x:j₀ ≤ x₀hAll₀:AllClear (x₀ - 1)hStg₀:StageClear x₀ (j₀ - 1)hhit₀:terras^[j₀] x₀ = x₀s₁:ℕhs₁:nSteps weakCollatz41 s₁ init = some (stageCfg x₀ x₀ x₀)⊢ (eval (step weakCollatz41) init).Dom x:ℕj:ℕhx3:3 ≤ xhj1:1 ≤ jhjx:j ≤ xhhit:terras^[j] x = xx₀:ℕj₀:ℕhx₀3:3 ≤ x₀hj₀1:1 ≤ j₀hj₀x:j₀ ≤ x₀hAll₀:AllClear (x₀ - 1)hStg₀:StageClear x₀ (j₀ - 1)hhit₀:terras^[j₀] x₀ = x₀s₁:ℕhs₁:nSteps weakCollatz41 s₁ init = some (stageCfg x₀ x₀ x₀)s₂:ℕcfg:Cfg 41 2hs₂:nSteps weakCollatz41 s₂ (stageCfg x₀ x₀ x₀) = some cfghnone:step weakCollatz41 cfg = none⊢ (eval (step weakCollatz41) init).Dom x:ℕj:ℕhx3:3 ≤ xhj1:1 ≤ jhjx:j ≤ xhhit:terras^[j] x = xx₀:ℕj₀:ℕhx₀3:3 ≤ x₀hj₀1:1 ≤ j₀hj₀x:j₀ ≤ x₀hAll₀:AllClear (x₀ - 1)hStg₀:StageClear x₀ (j₀ - 1)hhit₀:terras^[j₀] x₀ = x₀s₁:ℕhs₁:nSteps weakCollatz41 s₁ init = some (stageCfg x₀ x₀ x₀)s₂:ℕcfg:Cfg 41 2hs₂:nSteps weakCollatz41 s₂ (stageCfg x₀ x₀ x₀) = some cfghnone:step weakCollatz41 cfg = none⊢ ∃ y, y ∈ eval (step weakCollatz41) init All goals completed! 🐙

The 41-state candidate machine halts on the blank tape if and only if the 75-state reference machine does (constructive, zero Classical.choice).

theorem candidate_equivalent : Halts candidate ↔ Halts reference := halts_weakCollatz41_iff_bounded_cycle.trans WeakCollatz75.halts_weakCollatz75_iff_bounded_cycle.symm

The candidate has 34 fewer states than the 75-state reference (41 < 75).

theorem candidate_fewer_states : candidate.states < reference.states := ⊢ candidate.states < reference.states All goals completed! 🐙end ConjectureMachines.WeakCollatz41