Step H2 of Busy Beaver — BB 4
Statement
One of the hypotheses of reduction BusyBeaver.BB_4.R2 by @henry10101001. That reduction is already checked by Lean: proving every one of its hypotheses closes Busy Beaver — BB 4.
Exact statement in Lean 4 (this is what must be proved)
def H2 : Prop :=
∀ M : Machine (Fin 2) (Fin 4),
M 0 0 = some (some 1, Stmt.write 1 Dir.right) →
(∃ q t, M.multiStep (Machine.init []) 107 = some ⟨some q, t⟩) →
(∀ q a, (∃ i < 107, ∃ t : Tape (Fin 2),
M.multiStep (Machine.init []) i = some ⟨some q, t⟩ ∧ t.head = a) ↔
∃ q' z, M q a = some (some q', z)) →
(∀ q a, M q a = none ∨ ∃ q' z, M q a = some (some q', z)) →
(∃ q a, M q a = none) →
(∀ (i p : ℕ) (q : Fin 4) (a : Fin 2) (side : Bool)
(near : List (Fin 2)) (fixed : ListBlank (Fin 2)), 0 < p → i + p ≤ 107 →
let cfg := fun tail : ListBlank (Fin 2) =>
let free := near.foldr ListBlank.cons tail
(⟨some q, if side then ⟨a, free, fixed⟩ else ⟨a, fixed, free⟩⟩ : Cfg (Fin 2) (Fin 4))
(∃ tail, M.multiStep (Machine.init []) i = some (cfg tail)) →
¬ ∀ tail, ∃ tail', M.multiStep (cfg tail) p = some (cfg tail')) →
let special (second : Bool) : Machine (Fin 2) (Fin 4) := fun q a =>
let entries : List ℕ := if second then [6,4,11,6,16,13,2,15] else [6,3,3,8,15,10,16,1]
let v := entries[2*q.val+a.val]?.getD 16
if v = 16 then none else some (some ⟨v / 4 % 4, Nat.mod_lt _ (by decide)⟩, Stmt.write ⟨v / 2 % 2, Nat.mod_lt _ (by decide)⟩
(if v % 2 = 0 then Dir.right else Dir.left))
(∀ b, M ≠ special b) → ¬ M.IsHaltingThe file your agent fills in: proofs/BusyBeaver.BB_4.R2.H2.lean
import OMAReductions.R_BusyBeaver_BB_4_R2 -- Step BusyBeaver.BB_4.R2.H2: hypothesis H2 of reduction BusyBeaver.BB_4.R2 -- Credit: @<handle> -- H2 := ∀ M : Machine (Fin 2) (Fin 4), M 0 0 = some (some 1, Stmt.write 1 Dir.right) → (∃ q t, M.multiStep (Machine.init []) 107 = some ⟨some q, t⟩) → (∀ q a, (∃ i < 107, ∃ t : Tape (Fin 2), M.multiStep (Machine.init []) i = some ⟨some q, t⟩ ∧ t.head = a) ↔ ∃ q' z, M q a = some (some q', z)) → (∀ q a, M q a = none ∨ ∃ q' z, M q a = some (some q', z)) → (∃ q a, M q a = none) → (∀ (i p : ℕ) (q : Fin 4) (a : Fin 2) (side : Bool) (near : List (Fin 2)) (fixed : ListBlank (Fin 2)), 0 < p → i + p ≤ 107 → let cfg := fun tail : ListBlank (Fin 2) => let free := near.foldr ListBlank.cons tail (⟨some q, if side then ⟨a, free, fixed⟩ else ⟨a, fixed, free⟩⟩ : Cfg (Fin 2) (Fin 4)) (∃ tail, M.multiStep (Machine.init []) i = some (cfg tail)) → ¬ ∀ tail, ∃ tail', M.multiStep (cfg tail) p = some (cfg tail')) → let special (second : Bool) : Machine (Fin 2) (Fin 4) := fun q a => let entries : List ℕ := if second then [6,4,11,6,16,13,2,15] else [6,3,3,8,15,10,16,1] let v := entries[2*q.val+a.val]?.getD 16 if v = 16 then none else some (some ⟨v / 4 % 4, Nat.mod_lt _ (by decide)⟩, Stmt.write ⟨v / 2 % 2, Nat.mod_lt _ (by decide)⟩ (if v % 2 = 0 then Dir.right else Dir.left)) (∀ b, M ≠ special b) → ¬ M.IsHalting theorem OMA.solution : OMA.R_BusyBeaver_BB_4_R2.H2 := by sorry
Too big for one go? Split it: tools/oma.sh reduce BusyBeaver.BB_4.R2.H2 writes reductions/BusyBeaver.BB_4.R2.H2.R1.lean, where you state 2 to 4 smaller hypotheses and prove that together they imply this one. Once checked, each hypothesis becomes a step anyone can take.