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.ReductionSupport.Riemann95.Auxiliary95RawPhysical
@[expose] public sectionnamespace ConjectureMachines.Riemann95Auxiliary.PhysicalRawopen Turing ConjectureMachinesopen ConjectureMachines.Riemann120 ConjectureMachines.Riemann120.Layer2open ConjectureMachines.Semantics.Riemann.Layer1 (encodeRegs)open ReturnRaw (step_mkL_left step_mkL_right step_mk'_left step_mk'_right)

Exact padding change; exhausting the root marker creates one extra blank cell.

def exactPad (k : Fin 2) (walked : List (Fin 2)) (fill : Nat) : Nat := walked.length + fill + if k.val < walked.count 0 then 0 else 1theorem fenceReturn_exact (k : Fin 2) (walked : List (Fin 2)) (fill : Nat) (hfill : 3 ≤ fill) (hk : k.val ≤ walked.count 0) (hguard : Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev k.val walked.reverse).reverse).reverse = true) (bank : List Nat) : ∃ s ≥ 1, Raw.nSteps s ⟨(if k = 0 then 9 else 63), Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (ConjectureMachines.Semantics.Riemann.Layer1.regsTape bank))⟩ = some (rawRoot98 (exactPad k walked fill) (popBreakRev k.val walked.reverse).reverse bank) := k:Fin 2walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:↑k ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev (↑k) walked.reverse).reverse).reverse = truebank:List ℕ⊢ ∃ s ≥ 1, Raw.nSteps s { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some (rawRoot98 (exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank) k:Fin 2walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:↑k ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev (↑k) walked.reverse).reverse).reverse = truebank:List ℕmkL:ListBlank (Fin 2) → ListBlank (Fin 2) → Tape (Fin 2) := Semantics.Riemann.Layer1.Tape.mkL⊢ ∃ s ≥ 1, Raw.nSteps s { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some (rawRoot98 (exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank) k:Fin 2walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:↑k ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev (↑k) walked.reverse).reverse).reverse = truebank:List ℕmkL:ListBlank (Fin 2) → ListBlank (Fin 2) → Tape (Fin 2) := Semantics.Riemann.Layer1.Tape.mkLns:ℕ → Cfg 98 2 → Option (Cfg 98 2) := Semantics.Riemann.Layer1.nSteps Raw.machine⊢ ∃ s ≥ 1, Raw.nSteps s { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some (rawRoot98 (exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank) k:Fin 2walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:↑k ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev (↑k) walked.reverse).reverse).reverse = truebank:List ℕmkL:ListBlank (Fin 2) → ListBlank (Fin 2) → Tape (Fin 2) := Semantics.Riemann.Layer1.Tape.mkLns:ℕ → Cfg 98 2 → Option (Cfg 98 2) := Semantics.Riemann.Layer1.nSteps Raw.machinepopscan:∀ (rev : List (Fin 2)), ∀ j ≤ 1, j < List.count 0 rev → ∀ (L R : ListBlank (Fin 2)), ∃ s ≥ 1, ns s { state := if j = 0 then 11 else 2, tape := mkL (ListBlank.append rev L) R } = some { state := 5, tape := mkL (ListBlank.append (popBreakRev j rev) L).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (rev.length - (popBreakRev j rev).length) 0) R)) }⊢ ∃ s ≥ 1, Raw.nSteps s { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some (rawRoot98 (exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank) k:Fin 2walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:↑k ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev (↑k) walked.reverse).reverse).reverse = truebank:List ℕmkL:ListBlank (Fin 2) → ListBlank (Fin 2) → Tape (Fin 2) := Semantics.Riemann.Layer1.Tape.mkLns:ℕ → Cfg 98 2 → Option (Cfg 98 2) := Semantics.Riemann.Layer1.nSteps Raw.machinepopscan:∀ (rev : List (Fin 2)), ∀ j ≤ 1, j < List.count 0 rev → ∀ (L R : ListBlank (Fin 2)), ∃ s ≥ 1, ns s { state := if j = 0 then 11 else 2, tape := mkL (ListBlank.append rev L) R } = some { state := 5, tape := mkL (ListBlank.append (popBreakRev j rev) L).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (rev.length - (popBreakRev j rev).length) 0) R)) }R:ListBlank (Fin 2) := ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank)⊢ ∃ s ≥ 1, Raw.nSteps s { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some (rawRoot98 (exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank) k:Fin 2walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:↑k ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev (↑k) walked.reverse).reverse).reverse = truebank:List ℕmkL:ListBlank (Fin 2) → ListBlank (Fin 2) → Tape (Fin 2) := Semantics.Riemann.Layer1.Tape.mkLns:ℕ → Cfg 98 2 → Option (Cfg 98 2) := Semantics.Riemann.Layer1.nSteps Raw.machinepopscan:∀ (rev : List (Fin 2)), ∀ j ≤ 1, j < List.count 0 rev → ∀ (L R : ListBlank (Fin 2)), ∃ s ≥ 1, ns s { state := if j = 0 then 11 else 2, tape := mkL (ListBlank.append rev L) R } = some { state := 5, tape := mkL (ListBlank.append (popBreakRev j rev) L).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (rev.length - (popBreakRev j rev).length) 0) R)) }R:ListBlank (Fin 2) := ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank)hinit:∃ t ≥ 1, ns t { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some { state := if ↑k = 0 then 11 else 2, tape := mkL (stackLeftOf true walked) (ListBlank.append (List.replicate fill 0) R) }⊢ ∃ s ≥ 1, Raw.nSteps s { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some (rawRoot98 (exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank) k:Fin 2walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:↑k ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev (↑k) walked.reverse).reverse).reverse = truebank:List ℕmkL:ListBlank (Fin 2) → ListBlank (Fin 2) → Tape (Fin 2) := Semantics.Riemann.Layer1.Tape.mkLns:ℕ → Cfg 98 2 → Option (Cfg 98 2) := Semantics.Riemann.Layer1.nSteps Raw.machinepopscan:∀ (rev : List (Fin 2)), ∀ j ≤ 1, j < List.count 0 rev → ∀ (L R : ListBlank (Fin 2)), ∃ s ≥ 1, ns s { state := if j = 0 then 11 else 2, tape := mkL (ListBlank.append rev L) R } = some { state := 5, tape := mkL (ListBlank.append (popBreakRev j rev) L).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (rev.length - (popBreakRev j rev).length) 0) R)) }R:ListBlank (Fin 2) := ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank)hinit:∃ t ≥ 1, ns t { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some { state := if ↑k = 0 then 11 else 2, tape := mkL (stackLeftOf true walked) (ListBlank.append (List.replicate fill 0) R) }w:List (Fin 2) := (popBreakRev (↑k) walked.reverse).reverse⊢ ∃ s ≥ 1, Raw.nSteps s { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some (rawRoot98 (exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank) k:Fin 2walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:↑k ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev (↑k) walked.reverse).reverse).reverse = truebank:List ℕmkL:ListBlank (Fin 2) → ListBlank (Fin 2) → Tape (Fin 2) := Semantics.Riemann.Layer1.Tape.mkLns:ℕ → Cfg 98 2 → Option (Cfg 98 2) := Semantics.Riemann.Layer1.nSteps Raw.machinepopscan:∀ (rev : List (Fin 2)), ∀ j ≤ 1, j < List.count 0 rev → ∀ (L R : ListBlank (Fin 2)), ∃ s ≥ 1, ns s { state := if j = 0 then 11 else 2, tape := mkL (ListBlank.append rev L) R } = some { state := 5, tape := mkL (ListBlank.append (popBreakRev j rev) L).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (rev.length - (popBreakRev j rev).length) 0) R)) }R:ListBlank (Fin 2) := ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank)hinit:∃ t ≥ 1, ns t { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some { state := if ↑k = 0 then 11 else 2, tape := mkL (stackLeftOf true walked) (ListBlank.append (List.replicate fill 0) R) }w:List (Fin 2) := (popBreakRev (↑k) walked.reverse).reversehwlen:w.length ≤ walked.length⊢ ∃ s ≥ 1, Raw.nSteps s { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some (rawRoot98 (exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank) k:Fin 2walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:↑k ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev (↑k) walked.reverse).reverse).reverse = truebank:List ℕmkL:ListBlank (Fin 2) → ListBlank (Fin 2) → Tape (Fin 2) := Semantics.Riemann.Layer1.Tape.mkLns:ℕ → Cfg 98 2 → Option (Cfg 98 2) := Semantics.Riemann.Layer1.nSteps Raw.machinepopscan:∀ (rev : List (Fin 2)), ∀ j ≤ 1, j < List.count 0 rev → ∀ (L R : ListBlank (Fin 2)), ∃ s ≥ 1, ns s { state := if j = 0 then 11 else 2, tape := mkL (ListBlank.append rev L) R } = some { state := 5, tape := mkL (ListBlank.append (popBreakRev j rev) L).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (rev.length - (popBreakRev j rev).length) 0) R)) }R:ListBlank (Fin 2) := ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank)hinit:∃ t ≥ 1, ns t { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some { state := if ↑k = 0 then 11 else 2, tape := mkL (stackLeftOf true walked) (ListBlank.append (List.replicate fill 0) R) }w:List (Fin 2) := (popBreakRev (↑k) walked.reverse).reversehwlen:w.length ≤ walked.lengthhmid:∃ pad', pad' = exactPad k walked fill ∧ ∃ t ≥ 1, ns t { state := if ↑k = 0 then 11 else 2, tape := mkL (stackLeftOf true walked) (ListBlank.append (List.replicate fill 0) R) } = some { state := 5, tape := mkL (stackLeftOf true w).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (pad' - w.length) 0) R)) }⊢ ∃ s ≥ 1, Raw.nSteps s { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some (rawRoot98 (exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank) k:Fin 2walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:↑k ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev (↑k) walked.reverse).reverse).reverse = truebank:List ℕmkL:ListBlank (Fin 2) → ListBlank (Fin 2) → Tape (Fin 2) := Semantics.Riemann.Layer1.Tape.mkLns:ℕ → Cfg 98 2 → Option (Cfg 98 2) := Semantics.Riemann.Layer1.nSteps Raw.machinepopscan:∀ (rev : List (Fin 2)), ∀ j ≤ 1, j < List.count 0 rev → ∀ (L R : ListBlank (Fin 2)), ∃ s ≥ 1, ns s { state := if j = 0 then 11 else 2, tape := mkL (ListBlank.append rev L) R } = some { state := 5, tape := mkL (ListBlank.append (popBreakRev j rev) L).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (rev.length - (popBreakRev j rev).length) 0) R)) }R:ListBlank (Fin 2) := ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank)hinit:∃ t ≥ 1, ns t { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some { state := if ↑k = 0 then 11 else 2, tape := mkL (stackLeftOf true walked) (ListBlank.append (List.replicate fill 0) R) }w:List (Fin 2) := (popBreakRev (↑k) walked.reverse).reversehwlen:w.length ≤ walked.lengthhmid:∃ pad', pad' = exactPad k walked fill ∧ ∃ t ≥ 1, ns t { state := if ↑k = 0 then 11 else 2, tape := mkL (stackLeftOf true walked) (ListBlank.append (List.replicate fill 0) R) } = some { state := 5, tape := mkL (stackLeftOf true w).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (pad' - w.length) 0) R)) }pop_head:∀ (j : ℕ) (rev : List (Fin 2)), popBreakRev j rev = [] ∨ ∃ xs, popBreakRev j rev = 1 :: xs⊢ ∃ s ≥ 1, Raw.nSteps s { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some (rawRoot98 (exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank) k:Fin 2walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:↑k ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev (↑k) walked.reverse).reverse).reverse = truebank:List ℕmkL:ListBlank (Fin 2) → ListBlank (Fin 2) → Tape (Fin 2) := Semantics.Riemann.Layer1.Tape.mkLns:ℕ → Cfg 98 2 → Option (Cfg 98 2) := Semantics.Riemann.Layer1.nSteps Raw.machinepopscan:∀ (rev : List (Fin 2)), ∀ j ≤ 1, j < List.count 0 rev → ∀ (L R : ListBlank (Fin 2)), ∃ s ≥ 1, ns s { state := if j = 0 then 11 else 2, tape := mkL (ListBlank.append rev L) R } = some { state := 5, tape := mkL (ListBlank.append (popBreakRev j rev) L).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (rev.length - (popBreakRev j rev).length) 0) R)) }R:ListBlank (Fin 2) := ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank)hinit:∃ t ≥ 1, ns t { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some { state := if ↑k = 0 then 11 else 2, tape := mkL (stackLeftOf true walked) (ListBlank.append (List.replicate fill 0) R) }w:List (Fin 2) := (popBreakRev (↑k) walked.reverse).reversehwlen:w.length ≤ walked.lengthhmid:∃ pad', pad' = exactPad k walked fill ∧ ∃ t ≥ 1, ns t { state := if ↑k = 0 then 11 else 2, tape := mkL (stackLeftOf true walked) (ListBlank.append (List.replicate fill 0) R) } = some { state := 5, tape := mkL (stackLeftOf true w).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (pad' - w.length) 0) R)) }pop_head:∀ (j : ℕ) (rev : List (Fin 2)), popBreakRev j rev = [] ∨ ∃ xs, popBreakRev j rev = 1 :: xshheadw:(stackLeftOf true w).head = 1⊢ ∃ s ≥ 1, Raw.nSteps s { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some (rawRoot98 (exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank) k:Fin 2walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:↑k ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev (↑k) walked.reverse).reverse).reverse = truebank:List ℕmkL:ListBlank (Fin 2) → ListBlank (Fin 2) → Tape (Fin 2) := Semantics.Riemann.Layer1.Tape.mkLns:ℕ → Cfg 98 2 → Option (Cfg 98 2) := Semantics.Riemann.Layer1.nSteps Raw.machinepopscan:∀ (rev : List (Fin 2)), ∀ j ≤ 1, j < List.count 0 rev → ∀ (L R : ListBlank (Fin 2)), ∃ s ≥ 1, ns s { state := if j = 0 then 11 else 2, tape := mkL (ListBlank.append rev L) R } = some { state := 5, tape := mkL (ListBlank.append (popBreakRev j rev) L).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (rev.length - (popBreakRev j rev).length) 0) R)) }R:ListBlank (Fin 2) := ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank)hinit:∃ t ≥ 1, ns t { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some { state := if ↑k = 0 then 11 else 2, tape := mkL (stackLeftOf true walked) (ListBlank.append (List.replicate fill 0) R) }w:List (Fin 2) := (popBreakRev (↑k) walked.reverse).reversehwlen:w.length ≤ walked.lengthhmid:∃ pad', pad' = exactPad k walked fill ∧ ∃ t ≥ 1, ns t { state := if ↑k = 0 then 11 else 2, tape := mkL (stackLeftOf true walked) (ListBlank.append (List.replicate fill 0) R) } = some { state := 5, tape := mkL (stackLeftOf true w).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (pad' - w.length) 0) R)) }pop_head:∀ (j : ℕ) (rev : List (Fin 2)), popBreakRev j rev = [] ∨ ∃ xs, popBreakRev j rev = 1 :: xshheadw:(stackLeftOf true w).head = 1finish:∀ (pad : ℕ) (v : List (Fin 2)), Riemann104.OnePassGuard.NoThreeZeros (1 :: v).reverse = true → (stackLeftOf true v).head = 1 → ∃ t ≥ 1, ns t { state := 5, tape := mkL (stackLeftOf true v).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (pad - v.length) 0) R)) } = some (rawRoot98 pad v bank)⊢ ∃ s ≥ 1, Raw.nSteps s { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some (rawRoot98 (exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank) k:Fin 2walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:↑k ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev (↑k) walked.reverse).reverse).reverse = truebank:List ℕmkL:ListBlank (Fin 2) → ListBlank (Fin 2) → Tape (Fin 2) := Semantics.Riemann.Layer1.Tape.mkLns:ℕ → Cfg 98 2 → Option (Cfg 98 2) := Semantics.Riemann.Layer1.nSteps Raw.machinepopscan:∀ (rev : List (Fin 2)), ∀ j ≤ 1, j < List.count 0 rev → ∀ (L R : ListBlank (Fin 2)), ∃ s ≥ 1, ns s { state := if j = 0 then 11 else 2, tape := mkL (ListBlank.append rev L) R } = some { state := 5, tape := mkL (ListBlank.append (popBreakRev j rev) L).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (rev.length - (popBreakRev j rev).length) 0) R)) }R:ListBlank (Fin 2) := ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank)w:List (Fin 2) := (popBreakRev (↑k) walked.reverse).reversehwlen:w.length ≤ walked.lengthhmid:∃ pad', pad' = exactPad k walked fill ∧ ∃ t ≥ 1, ns t { state := if ↑k = 0 then 11 else 2, tape := mkL (stackLeftOf true walked) (ListBlank.append (List.replicate fill 0) R) } = some { state := 5, tape := mkL (stackLeftOf true w).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (pad' - w.length) 0) R)) }pop_head:∀ (j : ℕ) (rev : List (Fin 2)), popBreakRev j rev = [] ∨ ∃ xs, popBreakRev j rev = 1 :: xshheadw:(stackLeftOf true w).head = 1finish:∀ (pad : ℕ) (v : List (Fin 2)), Riemann104.OnePassGuard.NoThreeZeros (1 :: v).reverse = true → (stackLeftOf true v).head = 1 → ∃ t ≥ 1, ns t { state := 5, tape := mkL (stackLeftOf true v).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (pad - v.length) 0) R)) } = some (rawRoot98 pad v bank)t₀:ℕht₀:t₀ ≥ 1h₀:ns t₀ { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some { state := if ↑k = 0 then 11 else 2, tape := mkL (stackLeftOf true walked) (ListBlank.append (List.replicate fill 0) R) }⊢ ∃ s ≥ 1, Raw.nSteps s { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some (rawRoot98 (exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank) k:Fin 2walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:↑k ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev (↑k) walked.reverse).reverse).reverse = truebank:List ℕmkL:ListBlank (Fin 2) → ListBlank (Fin 2) → Tape (Fin 2) := Semantics.Riemann.Layer1.Tape.mkLns:ℕ → Cfg 98 2 → Option (Cfg 98 2) := Semantics.Riemann.Layer1.nSteps Raw.machinepopscan:∀ (rev : List (Fin 2)), ∀ j ≤ 1, j < List.count 0 rev → ∀ (L R : ListBlank (Fin 2)), ∃ s ≥ 1, ns s { state := if j = 0 then 11 else 2, tape := mkL (ListBlank.append rev L) R } = some { state := 5, tape := mkL (ListBlank.append (popBreakRev j rev) L).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (rev.length - (popBreakRev j rev).length) 0) R)) }R:ListBlank (Fin 2) := ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank)w:List (Fin 2) := (popBreakRev (↑k) walked.reverse).reversehwlen:w.length ≤ walked.lengthpop_head:∀ (j : ℕ) (rev : List (Fin 2)), popBreakRev j rev = [] ∨ ∃ xs, popBreakRev j rev = 1 :: xshheadw:(stackLeftOf true w).head = 1finish:∀ (pad : ℕ) (v : List (Fin 2)), Riemann104.OnePassGuard.NoThreeZeros (1 :: v).reverse = true → (stackLeftOf true v).head = 1 → ∃ t ≥ 1, ns t { state := 5, tape := mkL (stackLeftOf true v).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (pad - v.length) 0) R)) } = some (rawRoot98 pad v bank)t₀:ℕht₀:t₀ ≥ 1h₀:ns t₀ { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some { state := if ↑k = 0 then 11 else 2, tape := mkL (stackLeftOf true walked) (ListBlank.append (List.replicate fill 0) R) }pad':ℕhpad':pad' = exactPad k walked fillt₁:ℕht₁:t₁ ≥ 1h₁:ns t₁ { state := if ↑k = 0 then 11 else 2, tape := mkL (stackLeftOf true walked) (ListBlank.append (List.replicate fill 0) R) } = some { state := 5, tape := mkL (stackLeftOf true w).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (pad' - w.length) 0) R)) }⊢ ∃ s ≥ 1, Raw.nSteps s { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some (rawRoot98 (exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank) k:Fin 2walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:↑k ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev (↑k) walked.reverse).reverse).reverse = truebank:List ℕmkL:ListBlank (Fin 2) → ListBlank (Fin 2) → Tape (Fin 2) := Semantics.Riemann.Layer1.Tape.mkLns:ℕ → Cfg 98 2 → Option (Cfg 98 2) := Semantics.Riemann.Layer1.nSteps Raw.machinepopscan:∀ (rev : List (Fin 2)), ∀ j ≤ 1, j < List.count 0 rev → ∀ (L R : ListBlank (Fin 2)), ∃ s ≥ 1, ns s { state := if j = 0 then 11 else 2, tape := mkL (ListBlank.append rev L) R } = some { state := 5, tape := mkL (ListBlank.append (popBreakRev j rev) L).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (rev.length - (popBreakRev j rev).length) 0) R)) }R:ListBlank (Fin 2) := ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank)w:List (Fin 2) := (popBreakRev (↑k) walked.reverse).reversehwlen:w.length ≤ walked.lengthpop_head:∀ (j : ℕ) (rev : List (Fin 2)), popBreakRev j rev = [] ∨ ∃ xs, popBreakRev j rev = 1 :: xshheadw:(stackLeftOf true w).head = 1finish:∀ (pad : ℕ) (v : List (Fin 2)), Riemann104.OnePassGuard.NoThreeZeros (1 :: v).reverse = true → (stackLeftOf true v).head = 1 → ∃ t ≥ 1, ns t { state := 5, tape := mkL (stackLeftOf true v).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (pad - v.length) 0) R)) } = some (rawRoot98 pad v bank)t₀:ℕht₀:t₀ ≥ 1h₀:ns t₀ { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some { state := if ↑k = 0 then 11 else 2, tape := mkL (stackLeftOf true walked) (ListBlank.append (List.replicate fill 0) R) }pad':ℕhpad':pad' = exactPad k walked fillt₁:ℕht₁:t₁ ≥ 1h₁:ns t₁ { state := if ↑k = 0 then 11 else 2, tape := mkL (stackLeftOf true walked) (ListBlank.append (List.replicate fill 0) R) } = some { state := 5, tape := mkL (stackLeftOf true w).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (pad' - w.length) 0) R)) }t₂:ℕht₂:t₂ ≥ 1h₂:ns t₂ { state := 5, tape := mkL (stackLeftOf true w).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (pad' - w.length) 0) R)) } = some (rawRoot98 pad' w bank)⊢ ∃ s ≥ 1, Raw.nSteps s { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some (rawRoot98 (exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank) k:Fin 2walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:↑k ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev (↑k) walked.reverse).reverse).reverse = truebank:List ℕmkL:ListBlank (Fin 2) → ListBlank (Fin 2) → Tape (Fin 2) := Semantics.Riemann.Layer1.Tape.mkLns:ℕ → Cfg 98 2 → Option (Cfg 98 2) := Semantics.Riemann.Layer1.nSteps Raw.machinepopscan:∀ (rev : List (Fin 2)), ∀ j ≤ 1, j < List.count 0 rev → ∀ (L R : ListBlank (Fin 2)), ∃ s ≥ 1, ns s { state := if j = 0 then 11 else 2, tape := mkL (ListBlank.append rev L) R } = some { state := 5, tape := mkL (ListBlank.append (popBreakRev j rev) L).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (rev.length - (popBreakRev j rev).length) 0) R)) }R:ListBlank (Fin 2) := ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank)w:List (Fin 2) := (popBreakRev (↑k) walked.reverse).reversehwlen:w.length ≤ walked.lengthpop_head:∀ (j : ℕ) (rev : List (Fin 2)), popBreakRev j rev = [] ∨ ∃ xs, popBreakRev j rev = 1 :: xshheadw:(stackLeftOf true w).head = 1finish:∀ (pad : ℕ) (v : List (Fin 2)), Riemann104.OnePassGuard.NoThreeZeros (1 :: v).reverse = true → (stackLeftOf true v).head = 1 → ∃ t ≥ 1, ns t { state := 5, tape := mkL (stackLeftOf true v).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (pad - v.length) 0) R)) } = some (rawRoot98 pad v bank)t₀:ℕht₀:t₀ ≥ 1h₀:ns t₀ { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some { state := if ↑k = 0 then 11 else 2, tape := mkL (stackLeftOf true walked) (ListBlank.append (List.replicate fill 0) R) }pad':ℕhpad':pad' = exactPad k walked fillt₁:ℕht₁:t₁ ≥ 1h₁:ns t₁ { state := if ↑k = 0 then 11 else 2, tape := mkL (stackLeftOf true walked) (ListBlank.append (List.replicate fill 0) R) } = some { state := 5, tape := mkL (stackLeftOf true w).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (pad' - w.length) 0) R)) }t₂:ℕht₂:t₂ ≥ 1h₂:ns t₂ { state := 5, tape := mkL (stackLeftOf true w).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (pad' - w.length) 0) R)) } = some (rawRoot98 pad' w bank)⊢ Raw.nSteps (t₀ + (t₁ + t₂)) { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some (rawRoot98 (exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank) k:Fin 2walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:↑k ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev (↑k) walked.reverse).reverse).reverse = truebank:List ℕmkL:ListBlank (Fin 2) → ListBlank (Fin 2) → Tape (Fin 2) := Semantics.Riemann.Layer1.Tape.mkLns:ℕ → Cfg 98 2 → Option (Cfg 98 2) := Semantics.Riemann.Layer1.nSteps Raw.machinepopscan:∀ (rev : List (Fin 2)), ∀ j ≤ 1, j < List.count 0 rev → ∀ (L R : ListBlank (Fin 2)), ∃ s ≥ 1, ns s { state := if j = 0 then 11 else 2, tape := mkL (ListBlank.append rev L) R } = some { state := 5, tape := mkL (ListBlank.append (popBreakRev j rev) L).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (rev.length - (popBreakRev j rev).length) 0) R)) }R:ListBlank (Fin 2) := ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank)w:List (Fin 2) := (popBreakRev (↑k) walked.reverse).reversehwlen:w.length ≤ walked.lengthpop_head:∀ (j : ℕ) (rev : List (Fin 2)), popBreakRev j rev = [] ∨ ∃ xs, popBreakRev j rev = 1 :: xshheadw:(stackLeftOf true w).head = 1finish:∀ (pad : ℕ) (v : List (Fin 2)), Riemann104.OnePassGuard.NoThreeZeros (1 :: v).reverse = true → (stackLeftOf true v).head = 1 → ∃ t ≥ 1, ns t { state := 5, tape := mkL (stackLeftOf true v).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (pad - v.length) 0) R)) } = some (rawRoot98 pad v bank)t₀:ℕht₀:t₀ ≥ 1h₀:ns t₀ { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some { state := if ↑k = 0 then 11 else 2, tape := mkL (stackLeftOf true walked) (ListBlank.append (List.replicate fill 0) R) }pad':ℕhpad':pad' = exactPad k walked fillt₁:ℕht₁:t₁ ≥ 1h₁:ns t₁ { state := if ↑k = 0 then 11 else 2, tape := mkL (stackLeftOf true walked) (ListBlank.append (List.replicate fill 0) R) } = some { state := 5, tape := mkL (stackLeftOf true w).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (pad' - w.length) 0) R)) }t₂:ℕht₂:t₂ ≥ 1h₂:ns t₂ { state := 5, tape := mkL (stackLeftOf true w).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (pad' - w.length) 0) R)) } = some (rawRoot98 pad' w bank)⊢ Raw.nSteps (t₀ + (t₁ + t₂)) { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some (rawRoot98 pad' (popBreakRev (↑k) walked.reverse).reverse bank) k:Fin 2walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:↑k ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev (↑k) walked.reverse).reverse).reverse = truebank:List ℕmkL:ListBlank (Fin 2) → ListBlank (Fin 2) → Tape (Fin 2) := Semantics.Riemann.Layer1.Tape.mkLns:ℕ → Cfg 98 2 → Option (Cfg 98 2) := Semantics.Riemann.Layer1.nSteps Raw.machinepopscan:∀ (rev : List (Fin 2)), ∀ j ≤ 1, j < List.count 0 rev → ∀ (L R : ListBlank (Fin 2)), ∃ s ≥ 1, ns s { state := if j = 0 then 11 else 2, tape := mkL (ListBlank.append rev L) R } = some { state := 5, tape := mkL (ListBlank.append (popBreakRev j rev) L).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (rev.length - (popBreakRev j rev).length) 0) R)) }R:ListBlank (Fin 2) := ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank)w:List (Fin 2) := (popBreakRev (↑k) walked.reverse).reversehwlen:w.length ≤ walked.lengthpop_head:∀ (j : ℕ) (rev : List (Fin 2)), popBreakRev j rev = [] ∨ ∃ xs, popBreakRev j rev = 1 :: xshheadw:(stackLeftOf true w).head = 1finish:∀ (pad : ℕ) (v : List (Fin 2)), Riemann104.OnePassGuard.NoThreeZeros (1 :: v).reverse = true → (stackLeftOf true v).head = 1 → ∃ t ≥ 1, ns t { state := 5, tape := mkL (stackLeftOf true v).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (pad - v.length) 0) R)) } = some (rawRoot98 pad v bank)t₀:ℕht₀:t₀ ≥ 1h₀:ns t₀ { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some { state := if ↑k = 0 then 11 else 2, tape := mkL (stackLeftOf true walked) (ListBlank.append (List.replicate fill 0) R) }pad':ℕhpad':pad' = exactPad k walked fillt₁:ℕht₁:t₁ ≥ 1h₁:ns t₁ { state := if ↑k = 0 then 11 else 2, tape := mkL (stackLeftOf true walked) (ListBlank.append (List.replicate fill 0) R) } = some { state := 5, tape := mkL (stackLeftOf true w).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (pad' - w.length) 0) R)) }t₂:ℕht₂:t₂ ≥ 1h₂:ns t₂ { state := 5, tape := mkL (stackLeftOf true w).tail (ListBlank.cons 1 (ListBlank.append (List.replicate (pad' - w.length) 0) R)) } = some (rawRoot98 pad' w bank)⊢ Semantics.Riemann.Layer1.nSteps Raw.machine (t₀ + (t₁ + t₂)) { state := if k = 0 then 9 else 63, tape := Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) (ListBlank.append [0, 0] (Semantics.Riemann.Layer1.regsTape bank)) } = some (rawRoot98 pad' (popBreakRev (↑k) walked.reverse).reverse bank) All goals completed! 🐙end ConjectureMachines.Riemann95Auxiliary.PhysicalRaw