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.Projection95
public import Cryptids.ReductionSupport.Riemann95.Auxiliary95Return
public import Cryptids.ReductionSupport.Riemann95.FinitePrefix95
public import Cryptids.ReductionSupport.Riemann95.Parser95
public import Cryptids.ReductionSupport.Riemann95.ControlStep95
public import Cryptids.ReductionSupport.Riemann95.Physical95Return and jump execution
@[expose] public sectionReturns
sectionnamespace ConjectureMachines.Riemann95.Returnopen Turing ConjectureMachinesopen ConjectureMachines.Riemann120 (rootLeftOf stackLeftOf)open ConjectureMachines.Semantics.Riemann.Layer1 (Tape.mkL)open ConjectureMachines.Riemann104.OnePassGuard (NoThreeZeros)The intrinsic NoThree return scanner on the 95-state machine.
theorem run_return (word : List (Fin 2))
(hok : NoThreeZeros (1 :: word).reverse = true) (R : ListBlank (Fin 2)) :
∃ s ≥ 1, nSteps s ⟨5, Tape.mkL (stackLeftOf true word) R⟩ =
some ⟨15, Tape.mk' (rootLeftOf true) (ListBlank.append word R)⟩ := word:List (Fin 2)hok:NoThreeZeros (1 :: word).reverse = trueR:ListBlank (Fin 2)⊢ ∃ s ≥ 1,
nSteps s { state := 5, tape := Tape.mkL (stackLeftOf true word) R } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append word R) }
word:List (Fin 2)hok:NoThreeZeros (1 :: word).reverse = trueR:ListBlank (Fin 2)s:ℕhs:1 ≤ sh:Riemann95Auxiliary.nSteps s { state := 5, tape := Tape.mkL (stackLeftOf true word) R } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append word R) }⊢ ∃ s ≥ 1,
nSteps s { state := 5, tape := Tape.mkL (stackLeftOf true word) R } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append word R) }
word:List (Fin 2)hok:NoThreeZeros (1 :: word).reverse = trueR:ListBlank (Fin 2)s:ℕhs:1 ≤ sh:Riemann95Auxiliary.nSteps s { state := 5, tape := Tape.mkL (stackLeftOf true word) R } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append word R) }ht:nSteps s (Projection.cfgMap { state := 5, tape := Tape.mkL (stackLeftOf true word) R }) =
some (Projection.cfgMap { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append word R) })⊢ ∃ s ≥ 1,
nSteps s { state := 5, tape := Tape.mkL (stackLeftOf true word) R } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append word R) }
All goals completed! 🐙The one-cell peeled interface retains the adjacent-ONE premise.
theorem run_return_after_one (word : List (Fin 2))
(hok : NoThreeZeros (1 :: word).reverse = true)
(hhead : (stackLeftOf true word).head = 1) (R : ListBlank (Fin 2)) :
∃ s ≥ 1, nSteps s
⟨5, Tape.mkL (stackLeftOf true word).tail (R.cons 1)⟩ =
some ⟨15, Tape.mk' (rootLeftOf true) (ListBlank.append word R)⟩ := word:List (Fin 2)hok:NoThreeZeros (1 :: word).reverse = truehhead:(stackLeftOf true word).head = 1R:ListBlank (Fin 2)⊢ ∃ s ≥ 1,
nSteps s { state := 5, tape := Tape.mkL (stackLeftOf true word).tail (ListBlank.cons 1 R) } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append word R) }
word:List (Fin 2)hok:NoThreeZeros (1 :: word).reverse = truehhead:(stackLeftOf true word).head = 1R:ListBlank (Fin 2)s:ℕhs:1 ≤ sh:Riemann95Auxiliary.nSteps s { state := 5, tape := Tape.mkL (stackLeftOf true word).tail (ListBlank.cons 1 R) } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append word R) }⊢ ∃ s ≥ 1,
nSteps s { state := 5, tape := Tape.mkL (stackLeftOf true word).tail (ListBlank.cons 1 R) } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append word R) }
word:List (Fin 2)hok:NoThreeZeros (1 :: word).reverse = truehhead:(stackLeftOf true word).head = 1R:ListBlank (Fin 2)s:ℕhs:1 ≤ sh:Riemann95Auxiliary.nSteps s { state := 5, tape := Tape.mkL (stackLeftOf true word).tail (ListBlank.cons 1 R) } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append word R) }ht:nSteps s (Projection.cfgMap { state := 5, tape := Tape.mkL (stackLeftOf true word).tail (ListBlank.cons 1 R) }) =
some (Projection.cfgMap { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append word R) })⊢ ∃ s ≥ 1,
nSteps s { state := 5, tape := Tape.mkL (stackLeftOf true word).tail (ListBlank.cons 1 R) } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append word R) }
All goals completed! 🐙end ConjectureMachines.Riemann95.ReturnendJump words
sectionnamespace ConjectureMachines.Riemann95.Jumpopen Turing ConjectureMachinesopen ConjectureMachines.Riemann120 (rootLeftOf stackLeftOf)open ConjectureMachines.Semantics.Riemann.Layer1 (Tape.mkL)open ConjectureMachines.Riemann104.OnePassGuard (NoThreeZeros)open FinitePrefixtheorem nSteps_add (m n : Nat) (c : Cfg 95 2) :
nSteps (m + n) c = (nSteps m c).bind (nSteps n) := m:ℕn:ℕc:Cfg 95 2⊢ nSteps (m + n) c = (nSteps m c).bind (nSteps n)
induction m generalizing c with
n:ℕc:Cfg 95 2⊢ nSteps (0 + n) c = (nSteps 0 c).bind (nSteps n) All goals completed! 🐙
n:ℕm:ℕih:∀ (c : Cfg 95 2), nSteps (m + n) c = (nSteps m c).bind (nSteps n)c:Cfg 95 2⊢ nSteps (m + 1 + n) c = (nSteps (m + 1) c).bind (nSteps n)
n:ℕm:ℕih:∀ (c : Cfg 95 2), nSteps (m + n) c = (nSteps m c).bind (nSteps n)c:Cfg 95 2⊢ (step machine c).bind (nSteps (m + n)) = ((step machine c).bind (nSteps m)).bind (nSteps n)
n:ℕm:ℕih:∀ (c : Cfg 95 2), nSteps (m + n) c = (nSteps m c).bind (nSteps n)c:Cfg 95 2⊢ none.bind (nSteps (m + n)) = (none.bind (nSteps m)).bind (nSteps n)n:ℕm:ℕih:∀ (c : Cfg 95 2), nSteps (m + n) c = (nSteps m c).bind (nSteps n)c:Cfg 95 2val✝:Cfg 95 2⊢ (some val✝).bind (nSteps (m + n)) = ((some val✝).bind (nSteps m)).bind (nSteps n) n:ℕm:ℕih:∀ (c : Cfg 95 2), nSteps (m + n) c = (nSteps m c).bind (nSteps n)c:Cfg 95 2⊢ none.bind (nSteps (m + n)) = (none.bind (nSteps m)).bind (nSteps n)n:ℕm:ℕih:∀ (c : Cfg 95 2), nSteps (m + n) c = (nSteps m c).bind (nSteps n)c:Cfg 95 2val✝:Cfg 95 2⊢ (some val✝).bind (nSteps (m + n)) = ((some val✝).bind (nSteps m)).bind (nSteps n) All goals completed! 🐙theorem nSteps_bind {m n : Nat} {c c' c'' : Cfg 95 2}
(h : nSteps m c = some c') (h' : nSteps n c' = some c'') :
nSteps (m + n) c = some c'' := m:ℕn:ℕc:Cfg 95 2c':Cfg 95 2c'':Cfg 95 2h:nSteps m c = some c'h':nSteps n c' = some c''⊢ nSteps (m + n) c = some c''
All goals completed! 🐙theorem prefix43 :
prefixRun95 5 43 [1, 1, 0, 0, 1] [1] =
some (10, [], [1, 0, 0, 0, 0, 0]) := by ⊢ prefixRun95 5 43 [1, 1, 0, 0, 1] [1] = some (10, [], [1, 0, 0, 0, 0, 0]) decide +kernel All goals completed! 🐙theorem prefix59 :
prefixRun95 4 59 [1, 1] [1] = some (14, [], [0, 0, 0]) := by ⊢ prefixRun95 4 59 [1, 1] [1] = some (14, [], [0, 0, 0]) decide +kernel All goals completed! 🐙theorem prefix19 :
prefixRun95 2 19 [1, 1] [1] = some (5, [], [1, 0, 0]) := by ⊢ prefixRun95 2 19 [1, 1] [1] = some (5, [], [1, 0, 0]) decide +kernel All goals completed! 🐙theorem step_header_left {q q' : Fin 95} {a b : Fin 2}
(h : machine.transition q a = some (b, .left, q')) (L R : ListBlank (Fin 2)) :
step machine ⟨q, Tape.mk' L (R.cons a)⟩ =
some ⟨q', Tape.mkL L (R.cons b)⟩ := by q:Fin 95q':Fin 95a:Fin 2b:Fin 2h:machine.transition q a = some (b, Dir.left, q')L:ListBlank (Fin 2)R:ListBlank (Fin 2)⊢ step machine { state := q, tape := Tape.mk' L (ListBlank.cons a R) } =
some { state := q', tape := Tape.mkL L (ListBlank.cons b R) }
simp [step, h, Tape.mk', Tape.mkL, Tape.write, Tape.move] All goals completed! 🐙theorem last_one_head (P : List (Fin 2)) :
(stackLeftOf true (P ++ [1])).head = 1 := by P:List (Fin 2)⊢ (stackLeftOf true (P ++ [1])).head = 1
simp [stackLeftOf, List.reverse_append, ListBlank.append] All goals completed! 🐙theorem last_one_tail (P : List (Fin 2)) :
(stackLeftOf true (P ++ [1])).tail = stackLeftOf true P := by P:List (Fin 2)⊢ (stackLeftOf true (P ++ [1])).tail = stackLeftOf true P
simp [stackLeftOf, List.reverse_append, ListBlank.append] All goals completed! 🐙CONT2 on the full input word P100111: all five erased cells are retained as zero padding to the right of the new caller P1.
theorem jump43 (P : List (Fin 2)) (R : ListBlank (Fin 2))
(hok : NoThreeZeros (1 :: (P ++ [1])).reverse = true) :
∃ s ≥ 1, nSteps s
⟨43, Tape.mk' (stackLeftOf true (P ++ [1, 0, 0, 1, 1])) (R.cons 1)⟩ =
some ⟨15, Tape.mk' (rootLeftOf true)
(ListBlank.append (P ++ [1]) (ListBlank.append [0, 0, 0, 0, 0] R))⟩ := by P:List (Fin 2)R:ListBlank (Fin 2)hok:NoThreeZeros (1 :: (P ++ [1])).reverse = true⊢ ∃ s ≥ 1,
nSteps s { state := 43, tape := Tape.mk' (stackLeftOf true (P ++ [1, 0, 0, 1, 1])) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0, 0, 0, 0] R)) }
have hp := prefixRun95_sound prefix43 (stackLeftOf true P) R P:List (Fin 2)R:ListBlank (Fin 2)hok:NoThreeZeros (1 :: (P ++ [1])).reverse = truehp:nSteps 5
{ state := 43, tape := Tape.mk' (ListBlank.append [1, 1, 0, 0, 1] (stackLeftOf true P)) (ListBlank.append [1] R) } =
some
{ state := 10, tape := Tape.mk' (ListBlank.append [] (stackLeftOf true P)) (ListBlank.append [1, 0, 0, 0, 0, 0] R) }⊢ ∃ s ≥ 1,
nSteps s { state := 43, tape := Tape.mk' (stackLeftOf true (P ++ [1, 0, 0, 1, 1])) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0, 0, 0, 0] R)) }
have hp' : nSteps 5
⟨43, Tape.mk' (stackLeftOf true (P ++ [1, 0, 0, 1, 1])) (R.cons 1)⟩ =
some ⟨10, Tape.mk' (stackLeftOf true P)
((ListBlank.append [0, 0, 0, 0, 0] R).cons 1)⟩ := by
simpa [stackLeftOf, List.reverse_append, ListBlank.append_assoc,
ListBlank.append] using hp P:List (Fin 2)R:ListBlank (Fin 2)hok:NoThreeZeros (1 :: (P ++ [1])).reverse = truehp:nSteps 5
{ state := 43, tape := Tape.mk' (ListBlank.append [1, 1, 0, 0, 1] (stackLeftOf true P)) (ListBlank.append [1] R) } =
some
{ state := 10, tape := Tape.mk' (ListBlank.append [] (stackLeftOf true P)) (ListBlank.append [1, 0, 0, 0, 0, 0] R) }hp':nSteps 5 { state := 43, tape := Tape.mk' (stackLeftOf true (P ++ [1, 0, 0, 1, 1])) (ListBlank.cons 1 R) } =
some { state := 10, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) }⊢ ∃ s ≥ 1,
nSteps s { state := 43, tape := Tape.mk' (stackLeftOf true (P ++ [1, 0, 0, 1, 1])) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0, 0, 0, 0] R)) }
have ht : machine.transition 10 1 = some (1, .left, 5) := by decide +kernel P:List (Fin 2)R:ListBlank (Fin 2)hok:NoThreeZeros (1 :: (P ++ [1])).reverse = truehp:nSteps 5
{ state := 43, tape := Tape.mk' (ListBlank.append [1, 1, 0, 0, 1] (stackLeftOf true P)) (ListBlank.append [1] R) } =
some
{ state := 10, tape := Tape.mk' (ListBlank.append [] (stackLeftOf true P)) (ListBlank.append [1, 0, 0, 0, 0, 0] R) }hp':nSteps 5 { state := 43, tape := Tape.mk' (stackLeftOf true (P ++ [1, 0, 0, 1, 1])) (ListBlank.cons 1 R) } =
some { state := 10, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) }ht:machine.transition 10 1 = some (1, Dir.left, 5)⊢ ∃ s ≥ 1,
nSteps s { state := 43, tape := Tape.mk' (stackLeftOf true (P ++ [1, 0, 0, 1, 1])) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0, 0, 0, 0] R)) }
have hstep := step_header_left ht (stackLeftOf true P)
(ListBlank.append [0, 0, 0, 0, 0] R) P:List (Fin 2)R:ListBlank (Fin 2)hok:NoThreeZeros (1 :: (P ++ [1])).reverse = truehp:nSteps 5
{ state := 43, tape := Tape.mk' (ListBlank.append [1, 1, 0, 0, 1] (stackLeftOf true P)) (ListBlank.append [1] R) } =
some
{ state := 10, tape := Tape.mk' (ListBlank.append [] (stackLeftOf true P)) (ListBlank.append [1, 0, 0, 0, 0, 0] R) }hp':nSteps 5 { state := 43, tape := Tape.mk' (stackLeftOf true (P ++ [1, 0, 0, 1, 1])) (ListBlank.cons 1 R) } =
some { state := 10, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) }ht:machine.transition 10 1 = some (1, Dir.left, 5)hstep:step machine
{ state := 10, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) } =
some { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) }⊢ ∃ s ≥ 1,
nSteps s { state := 43, tape := Tape.mk' (stackLeftOf true (P ++ [1, 0, 0, 1, 1])) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0, 0, 0, 0] R)) }
have hstep' : nSteps 1
⟨10, Tape.mk' (stackLeftOf true P)
((ListBlank.append [0, 0, 0, 0, 0] R).cons 1)⟩ =
some ⟨5, Tape.mkL (stackLeftOf true P)
((ListBlank.append [0, 0, 0, 0, 0] R).cons 1)⟩ := by
simpa [nSteps] using hstep P:List (Fin 2)R:ListBlank (Fin 2)hok:NoThreeZeros (1 :: (P ++ [1])).reverse = truehp:nSteps 5
{ state := 43, tape := Tape.mk' (ListBlank.append [1, 1, 0, 0, 1] (stackLeftOf true P)) (ListBlank.append [1] R) } =
some
{ state := 10, tape := Tape.mk' (ListBlank.append [] (stackLeftOf true P)) (ListBlank.append [1, 0, 0, 0, 0, 0] R) }hp':nSteps 5 { state := 43, tape := Tape.mk' (stackLeftOf true (P ++ [1, 0, 0, 1, 1])) (ListBlank.cons 1 R) } =
some { state := 10, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) }ht:machine.transition 10 1 = some (1, Dir.left, 5)hstep:step machine
{ state := 10, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) } =
some { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) }hstep':nSteps 1
{ state := 10, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) } =
some { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) }⊢ ∃ s ≥ 1,
nSteps s { state := 43, tape := Tape.mk' (stackLeftOf true (P ++ [1, 0, 0, 1, 1])) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0, 0, 0, 0] R)) }
obtain ⟨s, hs, hr⟩ := Return.run_return_after_one (P ++ [1]) hok
(last_one_head P) (ListBlank.append [0, 0, 0, 0, 0] R) P:List (Fin 2)R:ListBlank (Fin 2)hok:NoThreeZeros (1 :: (P ++ [1])).reverse = truehp:nSteps 5
{ state := 43, tape := Tape.mk' (ListBlank.append [1, 1, 0, 0, 1] (stackLeftOf true P)) (ListBlank.append [1] R) } =
some
{ state := 10, tape := Tape.mk' (ListBlank.append [] (stackLeftOf true P)) (ListBlank.append [1, 0, 0, 0, 0, 0] R) }hp':nSteps 5 { state := 43, tape := Tape.mk' (stackLeftOf true (P ++ [1, 0, 0, 1, 1])) (ListBlank.cons 1 R) } =
some { state := 10, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) }ht:machine.transition 10 1 = some (1, Dir.left, 5)hstep:step machine
{ state := 10, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) } =
some { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) }hstep':nSteps 1
{ state := 10, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) } =
some { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) }s:ℕhs:s ≥ 1hr:nSteps s
{ state := 5,
tape := Tape.mkL (stackLeftOf true (P ++ [1])).tail (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0, 0, 0, 0] R)) }⊢ ∃ s ≥ 1,
nSteps s { state := 43, tape := Tape.mk' (stackLeftOf true (P ++ [1, 0, 0, 1, 1])) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0, 0, 0, 0] R)) }
rw [last_one_tail P:List (Fin 2)R:ListBlank (Fin 2)hok:NoThreeZeros (1 :: (P ++ [1])).reverse = truehp:nSteps 5
{ state := 43, tape := Tape.mk' (ListBlank.append [1, 1, 0, 0, 1] (stackLeftOf true P)) (ListBlank.append [1] R) } =
some
{ state := 10, tape := Tape.mk' (ListBlank.append [] (stackLeftOf true P)) (ListBlank.append [1, 0, 0, 0, 0, 0] R) }hp':nSteps 5 { state := 43, tape := Tape.mk' (stackLeftOf true (P ++ [1, 0, 0, 1, 1])) (ListBlank.cons 1 R) } =
some { state := 10, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) }ht:machine.transition 10 1 = some (1, Dir.left, 5)hstep:step machine
{ state := 10, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) } =
some { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) }hstep':nSteps 1
{ state := 10, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) } =
some { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) }s:ℕhs:s ≥ 1hr:nSteps s { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0, 0, 0, 0] R)) }⊢ ∃ s ≥ 1,
nSteps s { state := 43, tape := Tape.mk' (stackLeftOf true (P ++ [1, 0, 0, 1, 1])) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0, 0, 0, 0] R)) }] at hr P:List (Fin 2)R:ListBlank (Fin 2)hok:NoThreeZeros (1 :: (P ++ [1])).reverse = truehp:nSteps 5
{ state := 43, tape := Tape.mk' (ListBlank.append [1, 1, 0, 0, 1] (stackLeftOf true P)) (ListBlank.append [1] R) } =
some
{ state := 10, tape := Tape.mk' (ListBlank.append [] (stackLeftOf true P)) (ListBlank.append [1, 0, 0, 0, 0, 0] R) }hp':nSteps 5 { state := 43, tape := Tape.mk' (stackLeftOf true (P ++ [1, 0, 0, 1, 1])) (ListBlank.cons 1 R) } =
some { state := 10, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) }ht:machine.transition 10 1 = some (1, Dir.left, 5)hstep:step machine
{ state := 10, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) } =
some { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) }hstep':nSteps 1
{ state := 10, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) } =
some { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) }s:ℕhs:s ≥ 1hr:nSteps s { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0, 0, 0, 0] R)) }⊢ ∃ s ≥ 1,
nSteps s { state := 43, tape := Tape.mk' (stackLeftOf true (P ++ [1, 0, 0, 1, 1])) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0, 0, 0, 0] R)) }
exact ⟨5 + 1 + s, by P:List (Fin 2)R:ListBlank (Fin 2)hok:NoThreeZeros (1 :: (P ++ [1])).reverse = truehp:nSteps 5
{ state := 43, tape := Tape.mk' (ListBlank.append [1, 1, 0, 0, 1] (stackLeftOf true P)) (ListBlank.append [1] R) } =
some
{ state := 10, tape := Tape.mk' (ListBlank.append [] (stackLeftOf true P)) (ListBlank.append [1, 0, 0, 0, 0, 0] R) }hp':nSteps 5 { state := 43, tape := Tape.mk' (stackLeftOf true (P ++ [1, 0, 0, 1, 1])) (ListBlank.cons 1 R) } =
some { state := 10, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) }ht:machine.transition 10 1 = some (1, Dir.left, 5)hstep:step machine
{ state := 10, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) } =
some { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) }hstep':nSteps 1
{ state := 10, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) } =
some { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) }s:ℕhs:s ≥ 1hr:nSteps s { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0, 0, 0, 0] R)) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0, 0, 0, 0] R)) }⊢ 5 + 1 + s ≥ 1 omega All goals completed! 🐙, nSteps_bind (nSteps_bind hp' hstep') hr⟩CONT1 on the full input word P111, using the q59 bounce which restores the retained adjacent ONE before entering the peeled scanner.
theorem jump59 (P : List (Fin 2)) (R : ListBlank (Fin 2))
(hok : NoThreeZeros (1 :: (P ++ [1])).reverse = true) :
∃ s ≥ 1, nSteps s
⟨59, Tape.mk' (stackLeftOf true (P ++ [1, 1])) (R.cons 1)⟩ =
some ⟨15, Tape.mk' (rootLeftOf true)
(ListBlank.append (P ++ [1]) (ListBlank.append [0, 0] R))⟩ := by P:List (Fin 2)R:ListBlank (Fin 2)hok:NoThreeZeros (1 :: (P ++ [1])).reverse = true⊢ ∃ s ≥ 1,
nSteps s { state := 59, tape := Tape.mk' (stackLeftOf true (P ++ [1, 1])) (ListBlank.cons 1 R) } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0] R)) }
have hp := prefixRun95_sound prefix59 (stackLeftOf true P) R P:List (Fin 2)R:ListBlank (Fin 2)hok:NoThreeZeros (1 :: (P ++ [1])).reverse = truehp:nSteps 4 { state := 59, tape := Tape.mk' (ListBlank.append [1, 1] (stackLeftOf true P)) (ListBlank.append [1] R) } =
some { state := 14, tape := Tape.mk' (ListBlank.append [] (stackLeftOf true P)) (ListBlank.append [0, 0, 0] R) }⊢ ∃ s ≥ 1,
nSteps s { state := 59, tape := Tape.mk' (stackLeftOf true (P ++ [1, 1])) (ListBlank.cons 1 R) } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0] R)) }
have hp' : nSteps 4
⟨59, Tape.mk' (stackLeftOf true (P ++ [1, 1])) (R.cons 1)⟩ =
some ⟨14, Tape.mk' (stackLeftOf true P)
((ListBlank.append [0, 0] R).cons 0)⟩ := by
simpa [stackLeftOf, List.reverse_append, ListBlank.append_assoc,
ListBlank.append] using hp P:List (Fin 2)R:ListBlank (Fin 2)hok:NoThreeZeros (1 :: (P ++ [1])).reverse = truehp:nSteps 4 { state := 59, tape := Tape.mk' (ListBlank.append [1, 1] (stackLeftOf true P)) (ListBlank.append [1] R) } =
some { state := 14, tape := Tape.mk' (ListBlank.append [] (stackLeftOf true P)) (ListBlank.append [0, 0, 0] R) }hp':nSteps 4 { state := 59, tape := Tape.mk' (stackLeftOf true (P ++ [1, 1])) (ListBlank.cons 1 R) } =
some { state := 14, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 0 (ListBlank.append [0, 0] R)) }⊢ ∃ s ≥ 1,
nSteps s { state := 59, tape := Tape.mk' (stackLeftOf true (P ++ [1, 1])) (ListBlank.cons 1 R) } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0] R)) }
have ht : machine.transition 14 0 = some (1, .left, 5) := by decide +kernel P:List (Fin 2)R:ListBlank (Fin 2)hok:NoThreeZeros (1 :: (P ++ [1])).reverse = truehp:nSteps 4 { state := 59, tape := Tape.mk' (ListBlank.append [1, 1] (stackLeftOf true P)) (ListBlank.append [1] R) } =
some { state := 14, tape := Tape.mk' (ListBlank.append [] (stackLeftOf true P)) (ListBlank.append [0, 0, 0] R) }hp':nSteps 4 { state := 59, tape := Tape.mk' (stackLeftOf true (P ++ [1, 1])) (ListBlank.cons 1 R) } =
some { state := 14, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 0 (ListBlank.append [0, 0] R)) }ht:machine.transition 14 0 = some (1, Dir.left, 5)⊢ ∃ s ≥ 1,
nSteps s { state := 59, tape := Tape.mk' (stackLeftOf true (P ++ [1, 1])) (ListBlank.cons 1 R) } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0] R)) }
have hstep := step_header_left ht (stackLeftOf true P) (ListBlank.append [0, 0] R) P:List (Fin 2)R:ListBlank (Fin 2)hok:NoThreeZeros (1 :: (P ++ [1])).reverse = truehp:nSteps 4 { state := 59, tape := Tape.mk' (ListBlank.append [1, 1] (stackLeftOf true P)) (ListBlank.append [1] R) } =
some { state := 14, tape := Tape.mk' (ListBlank.append [] (stackLeftOf true P)) (ListBlank.append [0, 0, 0] R) }hp':nSteps 4 { state := 59, tape := Tape.mk' (stackLeftOf true (P ++ [1, 1])) (ListBlank.cons 1 R) } =
some { state := 14, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 0 (ListBlank.append [0, 0] R)) }ht:machine.transition 14 0 = some (1, Dir.left, 5)hstep:step machine { state := 14, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 0 (ListBlank.append [0, 0] R)) } =
some { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0] R)) }⊢ ∃ s ≥ 1,
nSteps s { state := 59, tape := Tape.mk' (stackLeftOf true (P ++ [1, 1])) (ListBlank.cons 1 R) } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0] R)) }
have hstep' : nSteps 1
⟨14, Tape.mk' (stackLeftOf true P) ((ListBlank.append [0, 0] R).cons 0)⟩ =
some ⟨5, Tape.mkL (stackLeftOf true P) ((ListBlank.append [0, 0] R).cons 1)⟩ := by
simpa [nSteps] using hstep P:List (Fin 2)R:ListBlank (Fin 2)hok:NoThreeZeros (1 :: (P ++ [1])).reverse = truehp:nSteps 4 { state := 59, tape := Tape.mk' (ListBlank.append [1, 1] (stackLeftOf true P)) (ListBlank.append [1] R) } =
some { state := 14, tape := Tape.mk' (ListBlank.append [] (stackLeftOf true P)) (ListBlank.append [0, 0, 0] R) }hp':nSteps 4 { state := 59, tape := Tape.mk' (stackLeftOf true (P ++ [1, 1])) (ListBlank.cons 1 R) } =
some { state := 14, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 0 (ListBlank.append [0, 0] R)) }ht:machine.transition 14 0 = some (1, Dir.left, 5)hstep:step machine { state := 14, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 0 (ListBlank.append [0, 0] R)) } =
some { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0] R)) }hstep':nSteps 1 { state := 14, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 0 (ListBlank.append [0, 0] R)) } =
some { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0] R)) }⊢ ∃ s ≥ 1,
nSteps s { state := 59, tape := Tape.mk' (stackLeftOf true (P ++ [1, 1])) (ListBlank.cons 1 R) } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0] R)) }
obtain ⟨s, hs, hr⟩ := Return.run_return_after_one (P ++ [1]) hok
(last_one_head P) (ListBlank.append [0, 0] R) P:List (Fin 2)R:ListBlank (Fin 2)hok:NoThreeZeros (1 :: (P ++ [1])).reverse = truehp:nSteps 4 { state := 59, tape := Tape.mk' (ListBlank.append [1, 1] (stackLeftOf true P)) (ListBlank.append [1] R) } =
some { state := 14, tape := Tape.mk' (ListBlank.append [] (stackLeftOf true P)) (ListBlank.append [0, 0, 0] R) }hp':nSteps 4 { state := 59, tape := Tape.mk' (stackLeftOf true (P ++ [1, 1])) (ListBlank.cons 1 R) } =
some { state := 14, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 0 (ListBlank.append [0, 0] R)) }ht:machine.transition 14 0 = some (1, Dir.left, 5)hstep:step machine { state := 14, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 0 (ListBlank.append [0, 0] R)) } =
some { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0] R)) }hstep':nSteps 1 { state := 14, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 0 (ListBlank.append [0, 0] R)) } =
some { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0] R)) }s:ℕhs:s ≥ 1hr:nSteps s
{ state := 5, tape := Tape.mkL (stackLeftOf true (P ++ [1])).tail (ListBlank.cons 1 (ListBlank.append [0, 0] R)) } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0] R)) }⊢ ∃ s ≥ 1,
nSteps s { state := 59, tape := Tape.mk' (stackLeftOf true (P ++ [1, 1])) (ListBlank.cons 1 R) } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0] R)) }
rw [last_one_tail P:List (Fin 2)R:ListBlank (Fin 2)hok:NoThreeZeros (1 :: (P ++ [1])).reverse = truehp:nSteps 4 { state := 59, tape := Tape.mk' (ListBlank.append [1, 1] (stackLeftOf true P)) (ListBlank.append [1] R) } =
some { state := 14, tape := Tape.mk' (ListBlank.append [] (stackLeftOf true P)) (ListBlank.append [0, 0, 0] R) }hp':nSteps 4 { state := 59, tape := Tape.mk' (stackLeftOf true (P ++ [1, 1])) (ListBlank.cons 1 R) } =
some { state := 14, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 0 (ListBlank.append [0, 0] R)) }ht:machine.transition 14 0 = some (1, Dir.left, 5)hstep:step machine { state := 14, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 0 (ListBlank.append [0, 0] R)) } =
some { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0] R)) }hstep':nSteps 1 { state := 14, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 0 (ListBlank.append [0, 0] R)) } =
some { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0] R)) }s:ℕhs:s ≥ 1hr:nSteps s { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0] R)) } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0] R)) }⊢ ∃ s ≥ 1,
nSteps s { state := 59, tape := Tape.mk' (stackLeftOf true (P ++ [1, 1])) (ListBlank.cons 1 R) } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0] R)) }] at hr P:List (Fin 2)R:ListBlank (Fin 2)hok:NoThreeZeros (1 :: (P ++ [1])).reverse = truehp:nSteps 4 { state := 59, tape := Tape.mk' (ListBlank.append [1, 1] (stackLeftOf true P)) (ListBlank.append [1] R) } =
some { state := 14, tape := Tape.mk' (ListBlank.append [] (stackLeftOf true P)) (ListBlank.append [0, 0, 0] R) }hp':nSteps 4 { state := 59, tape := Tape.mk' (stackLeftOf true (P ++ [1, 1])) (ListBlank.cons 1 R) } =
some { state := 14, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 0 (ListBlank.append [0, 0] R)) }ht:machine.transition 14 0 = some (1, Dir.left, 5)hstep:step machine { state := 14, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 0 (ListBlank.append [0, 0] R)) } =
some { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0] R)) }hstep':nSteps 1 { state := 14, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 0 (ListBlank.append [0, 0] R)) } =
some { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0] R)) }s:ℕhs:s ≥ 1hr:nSteps s { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0] R)) } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0] R)) }⊢ ∃ s ≥ 1,
nSteps s { state := 59, tape := Tape.mk' (stackLeftOf true (P ++ [1, 1])) (ListBlank.cons 1 R) } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0] R)) }
exact ⟨4 + 1 + s, by P:List (Fin 2)R:ListBlank (Fin 2)hok:NoThreeZeros (1 :: (P ++ [1])).reverse = truehp:nSteps 4 { state := 59, tape := Tape.mk' (ListBlank.append [1, 1] (stackLeftOf true P)) (ListBlank.append [1] R) } =
some { state := 14, tape := Tape.mk' (ListBlank.append [] (stackLeftOf true P)) (ListBlank.append [0, 0, 0] R) }hp':nSteps 4 { state := 59, tape := Tape.mk' (stackLeftOf true (P ++ [1, 1])) (ListBlank.cons 1 R) } =
some { state := 14, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 0 (ListBlank.append [0, 0] R)) }ht:machine.transition 14 0 = some (1, Dir.left, 5)hstep:step machine { state := 14, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 0 (ListBlank.append [0, 0] R)) } =
some { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0] R)) }hstep':nSteps 1 { state := 14, tape := Tape.mk' (stackLeftOf true P) (ListBlank.cons 0 (ListBlank.append [0, 0] R)) } =
some { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0] R)) }s:ℕhs:s ≥ 1hr:nSteps s { state := 5, tape := Tape.mkL (stackLeftOf true P) (ListBlank.cons 1 (ListBlank.append [0, 0] R)) } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0] R)) }⊢ 4 + 1 + s ≥ 1 omega All goals completed! 🐙, nSteps_bind (nSteps_bind hp' hstep') hr⟩CONT1 on the full input word P111, entering the scanner on its retained ONE directly rather than taking the q59 bounce.
theorem jump19 (P : List (Fin 2)) (R : ListBlank (Fin 2))
(hok : NoThreeZeros (1 :: (P ++ [1])).reverse = true) :
∃ s ≥ 1, nSteps s
⟨19, Tape.mk' (stackLeftOf true (P ++ [1, 1])) (R.cons 1)⟩ =
some ⟨15, Tape.mk' (rootLeftOf true)
(ListBlank.append (P ++ [1]) (ListBlank.append [0, 0] R))⟩ := by P:List (Fin 2)R:ListBlank (Fin 2)hok:NoThreeZeros (1 :: (P ++ [1])).reverse = true⊢ ∃ s ≥ 1,
nSteps s { state := 19, tape := Tape.mk' (stackLeftOf true (P ++ [1, 1])) (ListBlank.cons 1 R) } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0] R)) }
have hp := prefixRun95_sound prefix19 (stackLeftOf true P) R P:List (Fin 2)R:ListBlank (Fin 2)hok:NoThreeZeros (1 :: (P ++ [1])).reverse = truehp:nSteps 2 { state := 19, tape := Tape.mk' (ListBlank.append [1, 1] (stackLeftOf true P)) (ListBlank.append [1] R) } =
some { state := 5, tape := Tape.mk' (ListBlank.append [] (stackLeftOf true P)) (ListBlank.append [1, 0, 0] R) }⊢ ∃ s ≥ 1,
nSteps s { state := 19, tape := Tape.mk' (stackLeftOf true (P ++ [1, 1])) (ListBlank.cons 1 R) } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0] R)) }
have hp' : nSteps 2
⟨19, Tape.mk' (stackLeftOf true (P ++ [1, 1])) (R.cons 1)⟩ =
some ⟨5, Tape.mkL (stackLeftOf true (P ++ [1]))
(ListBlank.append [0, 0] R)⟩ := by
simpa [stackLeftOf, List.reverse_append, ListBlank.append_assoc,
ListBlank.append, Tape.mkL, Tape.mk'] using hp P:List (Fin 2)R:ListBlank (Fin 2)hok:NoThreeZeros (1 :: (P ++ [1])).reverse = truehp:nSteps 2 { state := 19, tape := Tape.mk' (ListBlank.append [1, 1] (stackLeftOf true P)) (ListBlank.append [1] R) } =
some { state := 5, tape := Tape.mk' (ListBlank.append [] (stackLeftOf true P)) (ListBlank.append [1, 0, 0] R) }hp':nSteps 2 { state := 19, tape := Tape.mk' (stackLeftOf true (P ++ [1, 1])) (ListBlank.cons 1 R) } =
some { state := 5, tape := Tape.mkL (stackLeftOf true (P ++ [1])) (ListBlank.append [0, 0] R) }⊢ ∃ s ≥ 1,
nSteps s { state := 19, tape := Tape.mk' (stackLeftOf true (P ++ [1, 1])) (ListBlank.cons 1 R) } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0] R)) }
obtain ⟨s, hs, hr⟩ := Return.run_return (P ++ [1]) hok (ListBlank.append [0, 0] R) P:List (Fin 2)R:ListBlank (Fin 2)hok:NoThreeZeros (1 :: (P ++ [1])).reverse = truehp:nSteps 2 { state := 19, tape := Tape.mk' (ListBlank.append [1, 1] (stackLeftOf true P)) (ListBlank.append [1] R) } =
some { state := 5, tape := Tape.mk' (ListBlank.append [] (stackLeftOf true P)) (ListBlank.append [1, 0, 0] R) }hp':nSteps 2 { state := 19, tape := Tape.mk' (stackLeftOf true (P ++ [1, 1])) (ListBlank.cons 1 R) } =
some { state := 5, tape := Tape.mkL (stackLeftOf true (P ++ [1])) (ListBlank.append [0, 0] R) }s:ℕhs:s ≥ 1hr:nSteps s { state := 5, tape := Tape.mkL (stackLeftOf true (P ++ [1])) (ListBlank.append [0, 0] R) } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0] R)) }⊢ ∃ s ≥ 1,
nSteps s { state := 19, tape := Tape.mk' (stackLeftOf true (P ++ [1, 1])) (ListBlank.cons 1 R) } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0] R)) }
exact ⟨2 + s, by P:List (Fin 2)R:ListBlank (Fin 2)hok:NoThreeZeros (1 :: (P ++ [1])).reverse = truehp:nSteps 2 { state := 19, tape := Tape.mk' (ListBlank.append [1, 1] (stackLeftOf true P)) (ListBlank.append [1] R) } =
some { state := 5, tape := Tape.mk' (ListBlank.append [] (stackLeftOf true P)) (ListBlank.append [1, 0, 0] R) }hp':nSteps 2 { state := 19, tape := Tape.mk' (stackLeftOf true (P ++ [1, 1])) (ListBlank.cons 1 R) } =
some { state := 5, tape := Tape.mkL (stackLeftOf true (P ++ [1])) (ListBlank.append [0, 0] R) }s:ℕhs:s ≥ 1hr:nSteps s { state := 5, tape := Tape.mkL (stackLeftOf true (P ++ [1])) (ListBlank.append [0, 0] R) } =
some { state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append (P ++ [1]) (ListBlank.append [0, 0] R)) }⊢ 2 + s ≥ 1 omega All goals completed! 🐙, nSteps_bind hp' hr⟩end ConjectureMachines.Riemann95.JumpendJumps from a root configuration
sectionnamespace ConjectureMachines.Riemann95.RootJumpopen Turing ConjectureMachinesopen ConjectureMachines.Riemann120 (rootLeftOf stackLeftOf)open Schemaopen FinitePrefixopen ConjectureMachines.Riemann95.Parsertheorem root_layout (pad : Nat) (bank : List Nat) (v : Word) (K : Nat)
(hv : v.length ≤ K) (hK : K ≤ pad) :
(⟨15, Tape.mk' (rootLeftOf true)
(ListBlank.append (v ++ List.replicate (K - v.length) 0)
(ListBlank.mk (List.replicate (pad - K) 0 ++ [1, 0] ++
Semantics.Riemann.Layer1.encodeRegs bank)))⟩ : ConjectureMachines.Cfg 95 2) =
Physical.rootCfg pad v bank := by pad:ℕbank:List ℕv:WordK:ℕhv:List.length v ≤ KhK:K ≤ pad⊢ { state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.append (v ++ List.replicate (K - List.length v) 0)
(ListBlank.mk (List.replicate (pad - K) 0 ++ [1, 0] ++ Semantics.Riemann.Layer1.encodeRegs bank))) } =
Physical.rootCfg pad v bank
unfold Physical.rootCfg pad:ℕbank:List ℕv:WordK:ℕhv:List.length v ≤ KhK:K ≤ pad⊢ { state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.append (v ++ List.replicate (K - List.length v) 0)
(ListBlank.mk (List.replicate (pad - K) 0 ++ [1, 0] ++ Semantics.Riemann.Layer1.encodeRegs bank))) } =
{ state := 15,
tape :=
Tape.mk' (ListBlank.cons 1 default)
(ListBlank.mk
(v ++ List.replicate (pad - List.length v) 0 ++ [1, 0] ++ Semantics.Riemann.Layer1.encodeRegs bank)) }
rw [show pad - v.length = K - v.length + (pad - K) by pad:ℕbank:List ℕv:WordK:ℕhv:List.length v ≤ KhK:K ≤ pad⊢ { state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.append (v ++ List.replicate (K - List.length v) 0)
(ListBlank.mk (List.replicate (pad - K) 0 ++ [1, 0] ++ Semantics.Riemann.Layer1.encodeRegs bank))) } =
Physical.rootCfg pad v bank omega All goals completed! 🐙, List.replicate_add pad:ℕbank:List ℕv:WordK:ℕhv:List.length v ≤ KhK:K ≤ pad⊢ { state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.append (v ++ List.replicate (K - List.length v) 0)
(ListBlank.mk (List.replicate (pad - K) 0 ++ [1, 0] ++ Semantics.Riemann.Layer1.encodeRegs bank))) } =
{ state := 15,
tape :=
Tape.mk' (ListBlank.cons 1 default)
(ListBlank.mk
(v ++ (List.replicate (K - List.length v) 0 ++ List.replicate (pad - K) 0) ++ [1, 0] ++
Semantics.Riemann.Layer1.encodeRegs bank)) }] pad:ℕbank:List ℕv:WordK:ℕhv:List.length v ≤ KhK:K ≤ pad⊢ { state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.append (v ++ List.replicate (K - List.length v) 0)
(ListBlank.mk (List.replicate (pad - K) 0 ++ [1, 0] ++ Semantics.Riemann.Layer1.encodeRegs bank))) } =
{ state := 15,
tape :=
Tape.mk' (ListBlank.cons 1 default)
(ListBlank.mk
(v ++ (List.replicate (K - List.length v) 0 ++ List.replicate (pad - K) 0) ++ [1, 0] ++
Semantics.Riemann.Layer1.encodeRegs bank)) }
simp only [ListBlank.append_mk, List.append_assoc] pad:ℕbank:List ℕv:WordK:ℕhv:List.length v ≤ KhK:K ≤ pad⊢ { state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.mk
(v ++
(List.replicate (K - List.length v) 0 ++
(List.replicate (pad - K) 0 ++ ([1, 0] ++ Semantics.Riemann.Layer1.encodeRegs bank))))) } =
{ state := 15,
tape :=
Tape.mk' (ListBlank.cons 1 default)
(ListBlank.mk
(v ++
(List.replicate (K - List.length v) 0 ++
(List.replicate (pad - K) 0 ++ ([1, 0] ++ Semantics.Riemann.Layer1.encodeRegs bank))))) }
rfl All goals completed! 🐙theorem root_append (pad : Nat) (word : Word) (bank : List Nat) :
Physical.rootCfg pad word bank =
⟨15, Tape.mk' (rootLeftOf true)
(ListBlank.append word (ListBlank.append (List.replicate (pad - word.length) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))))⟩ := by pad:ℕword:Wordbank:List ℕ⊢ Physical.rootCfg pad word bank =
{ state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.append word
(ListBlank.append (List.replicate (pad - List.length word) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank)))) }
unfold Physical.rootCfg Semantics.Riemann.Layer1.regsTape pad:ℕword:Wordbank:List ℕ⊢ { state := 15,
tape :=
Tape.mk' (ListBlank.cons 1 default)
(ListBlank.mk
(word ++ List.replicate (pad - List.length word) 0 ++ [1, 0] ++ Semantics.Riemann.Layer1.encodeRegs bank)) } =
{ state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.append word
(ListBlank.append (List.replicate (pad - List.length word) 0)
(ListBlank.append [1, 0] (ListBlank.append (Semantics.Riemann.Layer1.encodeRegs bank) default)))) }
rw [show (default : ListBlank (Fin 2)) = ListBlank.mk [] from rfl pad:ℕword:Wordbank:List ℕ⊢ { state := 15,
tape :=
Tape.mk' (ListBlank.cons 1 (ListBlank.mk []))
(ListBlank.mk
(word ++ List.replicate (pad - List.length word) 0 ++ [1, 0] ++ Semantics.Riemann.Layer1.encodeRegs bank)) } =
{ state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.append word
(ListBlank.append (List.replicate (pad - List.length word) 0)
(ListBlank.append [1, 0]
(ListBlank.append (Semantics.Riemann.Layer1.encodeRegs bank) (ListBlank.mk []))))) }] pad:ℕword:Wordbank:List ℕ⊢ { state := 15,
tape :=
Tape.mk' (ListBlank.cons 1 (ListBlank.mk []))
(ListBlank.mk
(word ++ List.replicate (pad - List.length word) 0 ++ [1, 0] ++ Semantics.Riemann.Layer1.encodeRegs bank)) } =
{ state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.append word
(ListBlank.append (List.replicate (pad - List.length word) 0)
(ListBlank.append [1, 0]
(ListBlank.append (Semantics.Riemann.Layer1.encodeRegs bank) (ListBlank.mk []))))) }
simp only [ListBlank.append_mk, List.append_nil, List.append_assoc] pad:ℕword:Wordbank:List ℕ⊢ { state := 15,
tape :=
Tape.mk' (ListBlank.cons 1 (ListBlank.mk []))
(ListBlank.mk
(word ++
(List.replicate (pad - List.length word) 0 ++ ([1, 0] ++ Semantics.Riemann.Layer1.encodeRegs bank)))) } =
{ state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.mk
(word ++
(List.replicate (pad - List.length word) 0 ++ ([1, 0] ++ Semantics.Riemann.Layer1.encodeRegs bank)))) }
rfl All goals completed! 🐙Lift any exact terminal-to-root jump with a retained zero suffix through the actual parser, with precisely the original padding and arbitrary bank.
theorem root_of_terminal (source walked target : Word) (q : Fin 95) (erased : Nat)
(hsource : source = walked ++ [1])
(hparse : walkInternal 15 walked = some q)
(hlen : source.length = target.length + erased)
(hj : ∀ R : ListBlank (Fin 2), ∃ s ≥ 1,
nSteps s ⟨q, Tape.mk' (stackLeftOf true walked) (R.cons 1)⟩ =
some ⟨15, Tape.mk' (rootLeftOf true)
(ListBlank.append target (ListBlank.append (List.replicate erased 0) R))⟩)
(pad : Nat) (hpad : walked.length + 3 ≤ pad) (bank : List Nat) :
∃ s ≥ 1, nSteps s (Physical.rootCfg pad source bank) =
some (Physical.rootCfg pad target bank) := by source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕ⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad source bank) = some (Physical.rootCfg pad target bank)
let R := ListBlank.append (List.replicate (pad - source.length) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank)) source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad source bank) = some (Physical.rootCfg pad target bank)
have hstart : Physical.rootCfg pad source bank =
⟨15, Tape.mk' (rootLeftOf true) (ListBlank.append walked (R.cons 1))⟩ := by
rw [root_append source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))⊢ { state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.append source
(ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank)))) } =
{ state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append walked (ListBlank.cons 1 R)) }] source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))⊢ { state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.append source
(ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank)))) } =
{ state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append walked (ListBlank.cons 1 R)) }
dsimp only [R] source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))⊢ { state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.append source
(ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank)))) } =
{ state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.append walked
(ListBlank.cons 1
(ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))))) }
rw [hsource source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))⊢ { state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.append (walked ++ [1])
(ListBlank.append (List.replicate (pad - List.length (walked ++ [1])) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank)))) } =
{ state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.append walked
(ListBlank.cons 1
(ListBlank.append (List.replicate (pad - List.length (walked ++ [1])) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))))) }] source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))⊢ { state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.append (walked ++ [1])
(ListBlank.append (List.replicate (pad - List.length (walked ++ [1])) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank)))) } =
{ state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.append walked
(ListBlank.cons 1
(ListBlank.append (List.replicate (pad - List.length (walked ++ [1])) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))))) }
simp only [ListBlank.append_assoc, ListBlank.append] source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))hstart:Physical.rootCfg pad source bank =
{ state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append walked (ListBlank.cons 1 R)) }⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad source bank) = some (Physical.rootCfg pad target bank)
have hp := walkInternal_nSteps walked 15 q (rootLeftOf true) (R.cons 1) hparse source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))hstart:Physical.rootCfg pad source bank =
{ state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append walked (ListBlank.cons 1 R)) }hp:nSteps (List.length walked)
{ state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append walked (ListBlank.cons 1 R)) } =
some { state := q, tape := Tape.mk' (ListBlank.append (List.reverse walked) (rootLeftOf true)) (ListBlank.cons 1 R) }⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad source bank) = some (Physical.rootCfg pad target bank)
rw [← hstart source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))hstart:Physical.rootCfg pad source bank =
{ state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append walked (ListBlank.cons 1 R)) }hp:nSteps (List.length walked) (Physical.rootCfg pad source bank) =
some { state := q, tape := Tape.mk' (ListBlank.append (List.reverse walked) (rootLeftOf true)) (ListBlank.cons 1 R) }⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad source bank) = some (Physical.rootCfg pad target bank)] at hp source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))hstart:Physical.rootCfg pad source bank =
{ state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append walked (ListBlank.cons 1 R)) }hp:nSteps (List.length walked) (Physical.rootCfg pad source bank) =
some { state := q, tape := Tape.mk' (ListBlank.append (List.reverse walked) (rootLeftOf true)) (ListBlank.cons 1 R) }⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad source bank) = some (Physical.rootCfg pad target bank)
change nSteps walked.length (Physical.rootCfg pad source bank) =
some ⟨q, Tape.mk' (stackLeftOf true walked) (R.cons 1)⟩ at hp source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))hstart:Physical.rootCfg pad source bank =
{ state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append walked (ListBlank.cons 1 R)) }hp:nSteps (List.length walked) (Physical.rootCfg pad source bank) =
some { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) }⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad source bank) = some (Physical.rootCfg pad target bank)
obtain ⟨s, hs, ht⟩ := hj R source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))hstart:Physical.rootCfg pad source bank =
{ state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append walked (ListBlank.cons 1 R)) }hp:nSteps (List.length walked) (Physical.rootCfg pad source bank) =
some { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) }s:ℕhs:s ≥ 1ht:nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad source bank) = some (Physical.rootCfg pad target bank)
have hfinish :
(⟨15, Tape.mk' (rootLeftOf true)
(ListBlank.append target (ListBlank.append (List.replicate erased 0) R))⟩ :
ConjectureMachines.Cfg 95 2) = Physical.rootCfg pad target bank := by
have hsl : source.length ≤ pad := by source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕ⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad source bank) = some (Physical.rootCfg pad target bank)
rw [hsource, source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:walked ++ [1] = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length (walked ++ [1]) = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))hstart:Physical.rootCfg pad (walked ++ [1]) bank =
{ state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append walked (ListBlank.cons 1 R)) }hp:nSteps (List.length walked) (Physical.rootCfg pad (walked ++ [1]) bank) =
some { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) }s:ℕhs:s ≥ 1ht:nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }⊢ List.length (walked ++ [1]) ≤ pad List.length_append source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:walked ++ [1] = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length walked + [1].length = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))hstart:Physical.rootCfg pad (walked ++ [1]) bank =
{ state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append walked (ListBlank.cons 1 R)) }hp:nSteps (List.length walked) (Physical.rootCfg pad (walked ++ [1]) bank) =
some { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) }s:ℕhs:s ≥ 1ht:nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }⊢ List.length walked + [1].length ≤ pad] at * source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:walked ++ [1] = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length walked + [1].length = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))hstart:Physical.rootCfg pad (walked ++ [1]) bank =
{ state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append walked (ListBlank.cons 1 R)) }hp:nSteps (List.length walked) (Physical.rootCfg pad (walked ++ [1]) bank) =
some { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) }s:ℕhs:s ≥ 1ht:nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }⊢ List.length walked + [1].length ≤ pad
simp only [List.length_singleton] at * source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhparse:walkInternal 15 walked = some qhlen:List.length walked + 1 = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))hstart:Physical.rootCfg pad (walked ++ [1]) bank =
{ state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append walked (ListBlank.cons 1 R)) }hp:nSteps (List.length walked) (Physical.rootCfg pad (walked ++ [1]) bank) =
some { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) }s:ℕhs:s ≥ 1ht:nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }hsource:True⊢ List.length walked + 1 ≤ pad
omega source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))hstart:Physical.rootCfg pad source bank =
{ state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append walked (ListBlank.cons 1 R)) }hp:nSteps (List.length walked) (Physical.rootCfg pad source bank) =
some { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) }s:ℕhs:s ≥ 1ht:nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }hsl:List.length source ≤ pad⊢ { state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) } =
Physical.rootCfg pad target bank
have hgap : pad - target.length = erased + (pad - source.length) := by source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕ⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad source bank) = some (Physical.rootCfg pad target bank) omega source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))hstart:Physical.rootCfg pad source bank =
{ state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append walked (ListBlank.cons 1 R)) }hp:nSteps (List.length walked) (Physical.rootCfg pad source bank) =
some { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) }s:ℕhs:s ≥ 1ht:nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }hsl:List.length source ≤ padhgap:pad - List.length target = erased + (pad - List.length source)⊢ { state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) } =
Physical.rootCfg pad target bank
rw [root_append, source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))hstart:Physical.rootCfg pad source bank =
{ state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append walked (ListBlank.cons 1 R)) }hp:nSteps (List.length walked) (Physical.rootCfg pad source bank) =
some { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) }s:ℕhs:s ≥ 1ht:nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }hsl:List.length source ≤ padhgap:pad - List.length target = erased + (pad - List.length source)⊢ { state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) } =
{ state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.append target
(ListBlank.append (List.replicate (pad - List.length target) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank)))) } hgap, source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))hstart:Physical.rootCfg pad source bank =
{ state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append walked (ListBlank.cons 1 R)) }hp:nSteps (List.length walked) (Physical.rootCfg pad source bank) =
some { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) }s:ℕhs:s ≥ 1ht:nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }hsl:List.length source ≤ padhgap:pad - List.length target = erased + (pad - List.length source)⊢ { state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) } =
{ state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.append target
(ListBlank.append (List.replicate (erased + (pad - List.length source)) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank)))) } List.replicate_add source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))hstart:Physical.rootCfg pad source bank =
{ state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append walked (ListBlank.cons 1 R)) }hp:nSteps (List.length walked) (Physical.rootCfg pad source bank) =
some { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) }s:ℕhs:s ≥ 1ht:nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }hsl:List.length source ≤ padhgap:pad - List.length target = erased + (pad - List.length source)⊢ { state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) } =
{ state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.append target
(ListBlank.append (List.replicate erased 0 ++ List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank)))) }] source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))hstart:Physical.rootCfg pad source bank =
{ state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append walked (ListBlank.cons 1 R)) }hp:nSteps (List.length walked) (Physical.rootCfg pad source bank) =
some { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) }s:ℕhs:s ≥ 1ht:nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }hsl:List.length source ≤ padhgap:pad - List.length target = erased + (pad - List.length source)⊢ { state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) } =
{ state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.append target
(ListBlank.append (List.replicate erased 0 ++ List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank)))) }
simp only [ListBlank.append_assoc] source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))hstart:Physical.rootCfg pad source bank =
{ state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append walked (ListBlank.cons 1 R)) }hp:nSteps (List.length walked) (Physical.rootCfg pad source bank) =
some { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) }s:ℕhs:s ≥ 1ht:nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }hsl:List.length source ≤ padhgap:pad - List.length target = erased + (pad - List.length source)⊢ { state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) } =
{ state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.append target
(ListBlank.append (List.replicate erased 0)
(ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))))) }
rfl source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))hstart:Physical.rootCfg pad source bank =
{ state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append walked (ListBlank.cons 1 R)) }hp:nSteps (List.length walked) (Physical.rootCfg pad source bank) =
some { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) }s:ℕhs:s ≥ 1ht:nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }hfinish:{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) } =
Physical.rootCfg pad target bank⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad source bank) = some (Physical.rootCfg pad target bank)
rw [hfinish source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))hstart:Physical.rootCfg pad source bank =
{ state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append walked (ListBlank.cons 1 R)) }hp:nSteps (List.length walked) (Physical.rootCfg pad source bank) =
some { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) }s:ℕhs:s ≥ 1ht:nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some (Physical.rootCfg pad target bank)hfinish:{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) } =
Physical.rootCfg pad target bank⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad source bank) = some (Physical.rootCfg pad target bank)] at ht source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))hstart:Physical.rootCfg pad source bank =
{ state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append walked (ListBlank.cons 1 R)) }hp:nSteps (List.length walked) (Physical.rootCfg pad source bank) =
some { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) }s:ℕhs:s ≥ 1ht:nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some (Physical.rootCfg pad target bank)hfinish:{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) } =
Physical.rootCfg pad target bank⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad source bank) = some (Physical.rootCfg pad target bank)
exact ⟨walked.length + s, by source:Wordwalked:Wordtarget:Wordq:Fin 95erased:ℕhsource:source = walked ++ [1]hparse:walkInternal 15 walked = some qhlen:List.length source = List.length target + erasedhj:∀ (R : ListBlank (Fin 2)),
∃ s ≥ 1,
nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some
{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) }pad:ℕhpad:List.length walked + 3 ≤ padbank:List ℕR:ListBlank (Fin 2) :=
ListBlank.append (List.replicate (pad - List.length source) 0)
(ListBlank.append [1, 0] (Semantics.Riemann.Layer1.regsTape bank))hstart:Physical.rootCfg pad source bank =
{ state := 15, tape := Tape.mk' (rootLeftOf true) (ListBlank.append walked (ListBlank.cons 1 R)) }hp:nSteps (List.length walked) (Physical.rootCfg pad source bank) =
some { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) }s:ℕhs:s ≥ 1ht:nSteps s { state := q, tape := Tape.mk' (stackLeftOf true walked) (ListBlank.cons 1 R) } =
some (Physical.rootCfg pad target bank)hfinish:{ state := 15,
tape := Tape.mk' (rootLeftOf true) (ListBlank.append target (ListBlank.append (List.replicate erased 0) R)) } =
Physical.rootCfg pad target bank⊢ List.length walked + s ≥ 1 omega All goals completed! 🐙, Jump.nSteps_bind hp ht⟩def outsideSteps : Array Nat := #[
0,0,12,0,0,0,22,0,0,24,0,0,0,30,0,0,32,0,24,0,0,0,0,28,0,0,0,34,
0,0,34,0,0,30,0,0,26,0,0,0,32,0,0,32,0,0,28,0,0,26,0,0,0,32,0,0,
32,0,0,28,0,14,0,0,0,18,0,0,0,26,0,0,28,0,0,0,34,0,0,36,0,28,0,24,
22,0,0,22,0,0,0,24,0,0,24,0,0]def outsideCertificate (i : Fin 97) : Prop :=
let word := outsideWord i
let K := (outsideWalk i).length + 3
let n := outsideSteps.getD i.val 0
match Control.rawInstr (.outside i) with
| .jump target => word.length ≤ K ∧ target.length ≤ K ∧ 1 ≤ n ∧
prefixRun95 n 15 [1, 0, 0, 0]
(word ++ List.replicate (K - word.length) 0) =
some (15, [1, 0, 0, 0], target ++ List.replicate (K - target.length) 0)
| _ => Trueinstance (i : Fin 97) : Decidable (outsideCertificate i) := by i:Fin 97⊢ Decidable (outsideCertificate i)
unfold outsideCertificate i:Fin 97⊢ Decidable
(have word := outsideWord i;
have K := List.length (outsideWalk i) + 3;
have n := outsideSteps.getD (↑i) 0;
match Control.rawInstr (ControlWord.outside i) with
| Riemann120.Layer2.RhInstr.jump target =>
List.length word ≤ K ∧
target.length ≤ K ∧
1 ≤ n ∧
prefixRun95 n 15 [1, 0, 0, 0] (word ++ List.replicate (K - List.length word) 0) =
some (15, [1, 0, 0, 0], target ++ List.replicate (K - target.length) 0)
| x => True)
split h_1 i:Fin 97x✝:Riemann120.Layer2.RhInstrtarget✝:List (Fin 2)heq✝:Control.rawInstr (ControlWord.outside i) = Riemann120.Layer2.RhInstr.jump target✝⊢ Decidable
(have word := outsideWord i;
have K := List.length (outsideWalk i) + 3;
have n := outsideSteps.getD (↑i) 0;
List.length word ≤ K ∧
target✝.length ≤ K ∧
1 ≤ n ∧
prefixRun95 n 15 [1, 0, 0, 0] (word ++ List.replicate (K - List.length word) 0) =
some (15, [1, 0, 0, 0], target✝ ++ List.replicate (K - target✝.length) 0))h_2 i:Fin 97x✝¹:Riemann120.Layer2.RhInstrx✝:∀ (target : List (Fin 2)), Control.rawInstr (ControlWord.outside i) = Riemann120.Layer2.RhInstr.jump target → False⊢ Decidable
(have word := outsideWord i;
have K := List.length (outsideWalk i) + 3;
have n := outsideSteps.getD (↑i) 0;
True) <;> h_1 i:Fin 97x✝:Riemann120.Layer2.RhInstrtarget✝:List (Fin 2)heq✝:Control.rawInstr (ControlWord.outside i) = Riemann120.Layer2.RhInstr.jump target✝⊢ Decidable
(have word := outsideWord i;
have K := List.length (outsideWalk i) + 3;
have n := outsideSteps.getD (↑i) 0;
List.length word ≤ K ∧
target✝.length ≤ K ∧
1 ≤ n ∧
prefixRun95 n 15 [1, 0, 0, 0] (word ++ List.replicate (K - List.length word) 0) =
some (15, [1, 0, 0, 0], target✝ ++ List.replicate (K - target✝.length) 0))h_2 i:Fin 97x✝¹:Riemann120.Layer2.RhInstrx✝:∀ (target : List (Fin 2)), Control.rawInstr (ControlWord.outside i) = Riemann120.Layer2.RhInstr.jump target → False⊢ Decidable
(have word := outsideWord i;
have K := List.length (outsideWalk i) + 3;
have n := outsideSteps.getD (↑i) 0;
True) infer_instance All goals completed! 🐙theorem outside_certificate : ∀ i : Fin 97, outsideCertificate i := by ⊢ ∀ (i : Fin 97), outsideCertificate i decide +kernel All goals completed! 🐙theorem root_outside (i : Fin 97) (target : Word)
(h : Control.rawInstr (.outside i) = .jump target)
(pad : Nat) (hpad : (Control.walked (.outside i)).length + 3 ≤ pad)
(bank : List Nat) :
∃ s ≥ 1, nSteps s (Physical.rootCfg pad (word (.outside i)) bank) =
some (Physical.rootCfg pad target bank) := by i:Fin 97target:Wordh:Control.rawInstr (ControlWord.outside i) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.outside i)) + 3 ≤ padbank:List ℕ⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad (word (ControlWord.outside i)) bank) = some (Physical.rootCfg pad target bank)
have hc := outside_certificate i i:Fin 97target:Wordh:Control.rawInstr (ControlWord.outside i) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.outside i)) + 3 ≤ padbank:List ℕhc:outsideCertificate i⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad (word (ControlWord.outside i)) bank) = some (Physical.rootCfg pad target bank)
unfold outsideCertificate at hc i:Fin 97target:Wordh:Control.rawInstr (ControlWord.outside i) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.outside i)) + 3 ≤ padbank:List ℕhc:have word := outsideWord i;
have K := List.length (outsideWalk i) + 3;
have n := outsideSteps.getD (↑i) 0;
match Control.rawInstr (ControlWord.outside i) with
| Riemann120.Layer2.RhInstr.jump target =>
List.length word ≤ K ∧
target.length ≤ K ∧
1 ≤ n ∧
prefixRun95 n 15 [1, 0, 0, 0] (word ++ List.replicate (K - List.length word) 0) =
some (15, [1, 0, 0, 0], target ++ List.replicate (K - target.length) 0)
| x => True⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad (word (ControlWord.outside i)) bank) = some (Physical.rootCfg pad target bank)
rw [h i:Fin 97target:Wordh:Control.rawInstr (ControlWord.outside i) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.outside i)) + 3 ≤ padbank:List ℕhc:have word := outsideWord i;
have K := List.length (outsideWalk i) + 3;
have n := outsideSteps.getD (↑i) 0;
match Riemann120.Layer2.RhInstr.jump target with
| Riemann120.Layer2.RhInstr.jump target =>
List.length word ≤ K ∧
target.length ≤ K ∧
1 ≤ n ∧
prefixRun95 n 15 [1, 0, 0, 0] (word ++ List.replicate (K - List.length word) 0) =
some (15, [1, 0, 0, 0], target ++ List.replicate (K - target.length) 0)
| x => True⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad (word (ControlWord.outside i)) bank) = some (Physical.rootCfg pad target bank)] at hc i:Fin 97target:Wordh:Control.rawInstr (ControlWord.outside i) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.outside i)) + 3 ≤ padbank:List ℕhc:have word := outsideWord i;
have K := List.length (outsideWalk i) + 3;
have n := outsideSteps.getD (↑i) 0;
match Riemann120.Layer2.RhInstr.jump target with
| Riemann120.Layer2.RhInstr.jump target =>
List.length word ≤ K ∧
target.length ≤ K ∧
1 ≤ n ∧
prefixRun95 n 15 [1, 0, 0, 0] (word ++ List.replicate (K - List.length word) 0) =
some (15, [1, 0, 0, 0], target ++ List.replicate (K - target.length) 0)
| x => True⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad (word (ControlWord.outside i)) bank) = some (Physical.rootCfg pad target bank)
obtain ⟨hw, ht, hn, hr⟩ := hc i:Fin 97target:Wordh:Control.rawInstr (ControlWord.outside i) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.outside i)) + 3 ≤ padbank:List ℕhw:List.length (outsideWord i) ≤ List.length (outsideWalk i) + 3ht:List.length target ≤ List.length (outsideWalk i) + 3hn:1 ≤ outsideSteps.getD (↑i) 0hr:prefixRun95 (outsideSteps.getD (↑i) 0) 15 [1, 0, 0, 0]
(outsideWord i ++ List.replicate (List.length (outsideWalk i) + 3 - List.length (outsideWord i)) 0) =
some (15, [1, 0, 0, 0], target ++ List.replicate (List.length (outsideWalk i) + 3 - List.length target) 0)⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad (word (ControlWord.outside i)) bank) = some (Physical.rootCfg pad target bank)
have he := prefixRun95_sound hr (default : ListBlank (Fin 2))
(ListBlank.mk (List.replicate (pad - ((outsideWalk i).length + 3)) 0 ++ [1, 0] ++
Semantics.Riemann.Layer1.encodeRegs bank)) i:Fin 97target:Wordh:Control.rawInstr (ControlWord.outside i) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.outside i)) + 3 ≤ padbank:List ℕhw:List.length (outsideWord i) ≤ List.length (outsideWalk i) + 3ht:List.length target ≤ List.length (outsideWalk i) + 3hn:1 ≤ outsideSteps.getD (↑i) 0hr:prefixRun95 (outsideSteps.getD (↑i) 0) 15 [1, 0, 0, 0]
(outsideWord i ++ List.replicate (List.length (outsideWalk i) + 3 - List.length (outsideWord i)) 0) =
some (15, [1, 0, 0, 0], target ++ List.replicate (List.length (outsideWalk i) + 3 - List.length target) 0)he:nSteps (outsideSteps.getD (↑i) 0)
{ state := 15,
tape :=
Tape.mk' (ListBlank.append [1, 0, 0, 0] default)
(ListBlank.append
(outsideWord i ++ List.replicate (List.length (outsideWalk i) + 3 - List.length (outsideWord i)) 0)
(ListBlank.mk
(List.replicate (pad - (List.length (outsideWalk i) + 3)) 0 ++ [1, 0] ++
Semantics.Riemann.Layer1.encodeRegs bank))) } =
some
{ state := 15,
tape :=
Tape.mk' (ListBlank.append [1, 0, 0, 0] default)
(ListBlank.append (target ++ List.replicate (List.length (outsideWalk i) + 3 - List.length target) 0)
(ListBlank.mk
(List.replicate (pad - (List.length (outsideWalk i) + 3)) 0 ++ [1, 0] ++
Semantics.Riemann.Layer1.encodeRegs bank))) }⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad (word (ControlWord.outside i)) bank) = some (Physical.rootCfg pad target bank)
have hleft : ListBlank.append [1, 0, 0, 0] (default : ListBlank (Fin 2)) =
rootLeftOf true := by
simp only [ListBlank.append, Semantics.Riemann.Layer1.default_cons_zero] i:Fin 97target:Wordh:Control.rawInstr (ControlWord.outside i) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.outside i)) + 3 ≤ padbank:List ℕhw:List.length (outsideWord i) ≤ List.length (outsideWalk i) + 3ht:List.length target ≤ List.length (outsideWalk i) + 3hn:1 ≤ outsideSteps.getD (↑i) 0hr:prefixRun95 (outsideSteps.getD (↑i) 0) 15 [1, 0, 0, 0]
(outsideWord i ++ List.replicate (List.length (outsideWalk i) + 3 - List.length (outsideWord i)) 0) =
some (15, [1, 0, 0, 0], target ++ List.replicate (List.length (outsideWalk i) + 3 - List.length target) 0)he:nSteps (outsideSteps.getD (↑i) 0)
{ state := 15,
tape :=
Tape.mk' (ListBlank.append [1, 0, 0, 0] default)
(ListBlank.append
(outsideWord i ++ List.replicate (List.length (outsideWalk i) + 3 - List.length (outsideWord i)) 0)
(ListBlank.mk
(List.replicate (pad - (List.length (outsideWalk i) + 3)) 0 ++ [1, 0] ++
Semantics.Riemann.Layer1.encodeRegs bank))) } =
some
{ state := 15,
tape :=
Tape.mk' (ListBlank.append [1, 0, 0, 0] default)
(ListBlank.append (target ++ List.replicate (List.length (outsideWalk i) + 3 - List.length target) 0)
(ListBlank.mk
(List.replicate (pad - (List.length (outsideWalk i) + 3)) 0 ++ [1, 0] ++
Semantics.Riemann.Layer1.encodeRegs bank))) }⊢ ListBlank.cons 1 default = rootLeftOf true
rfl i:Fin 97target:Wordh:Control.rawInstr (ControlWord.outside i) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.outside i)) + 3 ≤ padbank:List ℕhw:List.length (outsideWord i) ≤ List.length (outsideWalk i) + 3ht:List.length target ≤ List.length (outsideWalk i) + 3hn:1 ≤ outsideSteps.getD (↑i) 0hr:prefixRun95 (outsideSteps.getD (↑i) 0) 15 [1, 0, 0, 0]
(outsideWord i ++ List.replicate (List.length (outsideWalk i) + 3 - List.length (outsideWord i)) 0) =
some (15, [1, 0, 0, 0], target ++ List.replicate (List.length (outsideWalk i) + 3 - List.length target) 0)he:nSteps (outsideSteps.getD (↑i) 0)
{ state := 15,
tape :=
Tape.mk' (ListBlank.append [1, 0, 0, 0] default)
(ListBlank.append
(outsideWord i ++ List.replicate (List.length (outsideWalk i) + 3 - List.length (outsideWord i)) 0)
(ListBlank.mk
(List.replicate (pad - (List.length (outsideWalk i) + 3)) 0 ++ [1, 0] ++
Semantics.Riemann.Layer1.encodeRegs bank))) } =
some
{ state := 15,
tape :=
Tape.mk' (ListBlank.append [1, 0, 0, 0] default)
(ListBlank.append (target ++ List.replicate (List.length (outsideWalk i) + 3 - List.length target) 0)
(ListBlank.mk
(List.replicate (pad - (List.length (outsideWalk i) + 3)) 0 ++ [1, 0] ++
Semantics.Riemann.Layer1.encodeRegs bank))) }hleft:ListBlank.append [1, 0, 0, 0] default = rootLeftOf true⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad (word (ControlWord.outside i)) bank) = some (Physical.rootCfg pad target bank)
change (outsideWalk i).length + 3 ≤ pad at hpad i:Fin 97target:Wordh:Control.rawInstr (ControlWord.outside i) = Riemann120.Layer2.RhInstr.jump targetpad:ℕbank:List ℕhw:List.length (outsideWord i) ≤ List.length (outsideWalk i) + 3ht:List.length target ≤ List.length (outsideWalk i) + 3hn:1 ≤ outsideSteps.getD (↑i) 0hr:prefixRun95 (outsideSteps.getD (↑i) 0) 15 [1, 0, 0, 0]
(outsideWord i ++ List.replicate (List.length (outsideWalk i) + 3 - List.length (outsideWord i)) 0) =
some (15, [1, 0, 0, 0], target ++ List.replicate (List.length (outsideWalk i) + 3 - List.length target) 0)he:nSteps (outsideSteps.getD (↑i) 0)
{ state := 15,
tape :=
Tape.mk' (ListBlank.append [1, 0, 0, 0] default)
(ListBlank.append
(outsideWord i ++ List.replicate (List.length (outsideWalk i) + 3 - List.length (outsideWord i)) 0)
(ListBlank.mk
(List.replicate (pad - (List.length (outsideWalk i) + 3)) 0 ++ [1, 0] ++
Semantics.Riemann.Layer1.encodeRegs bank))) } =
some
{ state := 15,
tape :=
Tape.mk' (ListBlank.append [1, 0, 0, 0] default)
(ListBlank.append (target ++ List.replicate (List.length (outsideWalk i) + 3 - List.length target) 0)
(ListBlank.mk
(List.replicate (pad - (List.length (outsideWalk i) + 3)) 0 ++ [1, 0] ++
Semantics.Riemann.Layer1.encodeRegs bank))) }hleft:ListBlank.append [1, 0, 0, 0] default = rootLeftOf truehpad:List.length (outsideWalk i) + 3 ≤ pad⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad (word (ControlWord.outside i)) bank) = some (Physical.rootCfg pad target bank)
rw [hleft, i:Fin 97target:Wordh:Control.rawInstr (ControlWord.outside i) = Riemann120.Layer2.RhInstr.jump targetpad:ℕbank:List ℕhw:List.length (outsideWord i) ≤ List.length (outsideWalk i) + 3ht:List.length target ≤ List.length (outsideWalk i) + 3hn:1 ≤ outsideSteps.getD (↑i) 0hr:prefixRun95 (outsideSteps.getD (↑i) 0) 15 [1, 0, 0, 0]
(outsideWord i ++ List.replicate (List.length (outsideWalk i) + 3 - List.length (outsideWord i)) 0) =
some (15, [1, 0, 0, 0], target ++ List.replicate (List.length (outsideWalk i) + 3 - List.length target) 0)he:nSteps (outsideSteps.getD (↑i) 0)
{ state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.append
(outsideWord i ++ List.replicate (List.length (outsideWalk i) + 3 - List.length (outsideWord i)) 0)
(ListBlank.mk
(List.replicate (pad - (List.length (outsideWalk i) + 3)) 0 ++ [1, 0] ++
Semantics.Riemann.Layer1.encodeRegs bank))) } =
some
{ state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.append (target ++ List.replicate (List.length (outsideWalk i) + 3 - List.length target) 0)
(ListBlank.mk
(List.replicate (pad - (List.length (outsideWalk i) + 3)) 0 ++ [1, 0] ++
Semantics.Riemann.Layer1.encodeRegs bank))) }hleft:ListBlank.append [1, 0, 0, 0] default = rootLeftOf truehpad:List.length (outsideWalk i) + 3 ≤ pad⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad (word (ControlWord.outside i)) bank) = some (Physical.rootCfg pad target bank) root_layout pad bank _ _ hw hpad, i:Fin 97target:Wordh:Control.rawInstr (ControlWord.outside i) = Riemann120.Layer2.RhInstr.jump targetpad:ℕbank:List ℕhw:List.length (outsideWord i) ≤ List.length (outsideWalk i) + 3ht:List.length target ≤ List.length (outsideWalk i) + 3hn:1 ≤ outsideSteps.getD (↑i) 0hr:prefixRun95 (outsideSteps.getD (↑i) 0) 15 [1, 0, 0, 0]
(outsideWord i ++ List.replicate (List.length (outsideWalk i) + 3 - List.length (outsideWord i)) 0) =
some (15, [1, 0, 0, 0], target ++ List.replicate (List.length (outsideWalk i) + 3 - List.length target) 0)he:nSteps (outsideSteps.getD (↑i) 0) (Physical.rootCfg pad (outsideWord i) bank) =
some
{ state := 15,
tape :=
Tape.mk' (rootLeftOf true)
(ListBlank.append (target ++ List.replicate (List.length (outsideWalk i) + 3 - List.length target) 0)
(ListBlank.mk
(List.replicate (pad - (List.length (outsideWalk i) + 3)) 0 ++ [1, 0] ++
Semantics.Riemann.Layer1.encodeRegs bank))) }hleft:ListBlank.append [1, 0, 0, 0] default = rootLeftOf truehpad:List.length (outsideWalk i) + 3 ≤ pad⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad (word (ControlWord.outside i)) bank) = some (Physical.rootCfg pad target bank) root_layout pad bank _ _ ht hpad i:Fin 97target:Wordh:Control.rawInstr (ControlWord.outside i) = Riemann120.Layer2.RhInstr.jump targetpad:ℕbank:List ℕhw:List.length (outsideWord i) ≤ List.length (outsideWalk i) + 3ht:List.length target ≤ List.length (outsideWalk i) + 3hn:1 ≤ outsideSteps.getD (↑i) 0hr:prefixRun95 (outsideSteps.getD (↑i) 0) 15 [1, 0, 0, 0]
(outsideWord i ++ List.replicate (List.length (outsideWalk i) + 3 - List.length (outsideWord i)) 0) =
some (15, [1, 0, 0, 0], target ++ List.replicate (List.length (outsideWalk i) + 3 - List.length target) 0)he:nSteps (outsideSteps.getD (↑i) 0) (Physical.rootCfg pad (outsideWord i) bank) = some (Physical.rootCfg pad target bank)hleft:ListBlank.append [1, 0, 0, 0] default = rootLeftOf truehpad:List.length (outsideWalk i) + 3 ≤ pad⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad (word (ControlWord.outside i)) bank) = some (Physical.rootCfg pad target bank)] at he i:Fin 97target:Wordh:Control.rawInstr (ControlWord.outside i) = Riemann120.Layer2.RhInstr.jump targetpad:ℕbank:List ℕhw:List.length (outsideWord i) ≤ List.length (outsideWalk i) + 3ht:List.length target ≤ List.length (outsideWalk i) + 3hn:1 ≤ outsideSteps.getD (↑i) 0hr:prefixRun95 (outsideSteps.getD (↑i) 0) 15 [1, 0, 0, 0]
(outsideWord i ++ List.replicate (List.length (outsideWalk i) + 3 - List.length (outsideWord i)) 0) =
some (15, [1, 0, 0, 0], target ++ List.replicate (List.length (outsideWalk i) + 3 - List.length target) 0)he:nSteps (outsideSteps.getD (↑i) 0) (Physical.rootCfg pad (outsideWord i) bank) = some (Physical.rootCfg pad target bank)hleft:ListBlank.append [1, 0, 0, 0] default = rootLeftOf truehpad:List.length (outsideWalk i) + 3 ≤ pad⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad (word (ControlWord.outside i)) bank) = some (Physical.rootCfg pad target bank)
exact ⟨outsideSteps.getD i.val 0, hn, he⟩ All goals completed! 🐙theorem root43 (P : Word) (pad : Nat) (bank : List Nat)
(hp : walkInternal 15 (P ++ [1, 0, 0, 1, 1]) = some 43)
(hg : Riemann104.OnePassGuard.NoThreeZeros (1 :: (P ++ [1])).reverse = true)
(hpad : (P ++ [1, 0, 0, 1, 1]).length + 3 ≤ pad) :
∃ n ≥ 1, nSteps n (Physical.rootCfg pad (P ++ [1, 0, 0, 1, 1, 1]) bank) =
some (Physical.rootCfg pad (P ++ [1]) bank) := by P:Wordpad:ℕbank:List ℕhp:walkInternal 15 (P ++ [1, 0, 0, 1, 1]) = some 43hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: (P ++ [1])).reverse = truehpad:List.length (P ++ [1, 0, 0, 1, 1]) + 3 ≤ pad⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (P ++ [1, 0, 0, 1, 1, 1]) bank) = some (Physical.rootCfg pad (P ++ [1]) bank)
exact root_of_terminal _ _ _ 43 5 (by P:Wordpad:ℕbank:List ℕhp:walkInternal 15 (P ++ [1, 0, 0, 1, 1]) = some 43hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: (P ++ [1])).reverse = truehpad:List.length (P ++ [1, 0, 0, 1, 1]) + 3 ≤ pad⊢ P ++ [1, 0, 0, 1, 1, 1] = P ++ [1, 0, 0, 1, 1] ++ [1] simp only [List.append_assoc] P:Wordpad:ℕbank:List ℕhp:walkInternal 15 (P ++ [1, 0, 0, 1, 1]) = some 43hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: (P ++ [1])).reverse = truehpad:List.length (P ++ [1, 0, 0, 1, 1]) + 3 ≤ pad⊢ P ++ [1, 0, 0, 1, 1, 1] = P ++ ([1, 0, 0, 1, 1] ++ [1]); rfl All goals completed! 🐙) hp
(by P:Wordpad:ℕbank:List ℕhp:walkInternal 15 (P ++ [1, 0, 0, 1, 1]) = some 43hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: (P ++ [1])).reverse = truehpad:List.length (P ++ [1, 0, 0, 1, 1]) + 3 ≤ pad⊢ (P ++ [1, 0, 0, 1, 1, 1]).length = (P ++ [1]).length + 5 simp only [List.length_append, List.length_cons, List.length_nil] All goals completed! 🐙)
(fun R => Jump.jump43 P R hg) pad hpad banktheorem root59 (P : Word) (pad : Nat) (bank : List Nat)
(hp : walkInternal 15 (P ++ [1, 1]) = some 59)
(hg : Riemann104.OnePassGuard.NoThreeZeros (1 :: (P ++ [1])).reverse = true)
(hpad : (P ++ [1, 1]).length + 3 ≤ pad) :
∃ n ≥ 1, nSteps n (Physical.rootCfg pad (P ++ [1, 1, 1]) bank) =
some (Physical.rootCfg pad (P ++ [1]) bank) := by P:Wordpad:ℕbank:List ℕhp:walkInternal 15 (P ++ [1, 1]) = some 59hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: (P ++ [1])).reverse = truehpad:List.length (P ++ [1, 1]) + 3 ≤ pad⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (P ++ [1, 1, 1]) bank) = some (Physical.rootCfg pad (P ++ [1]) bank)
exact root_of_terminal _ _ _ 59 2 (by P:Wordpad:ℕbank:List ℕhp:walkInternal 15 (P ++ [1, 1]) = some 59hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: (P ++ [1])).reverse = truehpad:List.length (P ++ [1, 1]) + 3 ≤ pad⊢ P ++ [1, 1, 1] = P ++ [1, 1] ++ [1] simp only [List.append_assoc] P:Wordpad:ℕbank:List ℕhp:walkInternal 15 (P ++ [1, 1]) = some 59hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: (P ++ [1])).reverse = truehpad:List.length (P ++ [1, 1]) + 3 ≤ pad⊢ P ++ [1, 1, 1] = P ++ ([1, 1] ++ [1]); rfl All goals completed! 🐙) hp
(by P:Wordpad:ℕbank:List ℕhp:walkInternal 15 (P ++ [1, 1]) = some 59hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: (P ++ [1])).reverse = truehpad:List.length (P ++ [1, 1]) + 3 ≤ pad⊢ (P ++ [1, 1, 1]).length = (P ++ [1]).length + 2 simp only [List.length_append, List.length_cons, List.length_nil] All goals completed! 🐙)
(fun R => Jump.jump59 P R hg) pad hpad banktheorem root19 (P : Word) (pad : Nat) (bank : List Nat)
(hp : walkInternal 15 (P ++ [1, 1]) = some 19)
(hg : Riemann104.OnePassGuard.NoThreeZeros (1 :: (P ++ [1])).reverse = true)
(hpad : (P ++ [1, 1]).length + 3 ≤ pad) :
∃ n ≥ 1, nSteps n (Physical.rootCfg pad (P ++ [1, 1, 1]) bank) =
some (Physical.rootCfg pad (P ++ [1]) bank) := by P:Wordpad:ℕbank:List ℕhp:walkInternal 15 (P ++ [1, 1]) = some 19hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: (P ++ [1])).reverse = truehpad:List.length (P ++ [1, 1]) + 3 ≤ pad⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (P ++ [1, 1, 1]) bank) = some (Physical.rootCfg pad (P ++ [1]) bank)
exact root_of_terminal _ _ _ 19 2 (by P:Wordpad:ℕbank:List ℕhp:walkInternal 15 (P ++ [1, 1]) = some 19hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: (P ++ [1])).reverse = truehpad:List.length (P ++ [1, 1]) + 3 ≤ pad⊢ P ++ [1, 1, 1] = P ++ [1, 1] ++ [1] simp only [List.append_assoc] P:Wordpad:ℕbank:List ℕhp:walkInternal 15 (P ++ [1, 1]) = some 19hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: (P ++ [1])).reverse = truehpad:List.length (P ++ [1, 1]) + 3 ≤ pad⊢ P ++ [1, 1, 1] = P ++ ([1, 1] ++ [1]); rfl All goals completed! 🐙) hp
(by P:Wordpad:ℕbank:List ℕhp:walkInternal 15 (P ++ [1, 1]) = some 19hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: (P ++ [1])).reverse = truehpad:List.length (P ++ [1, 1]) + 3 ≤ pad⊢ (P ++ [1, 1, 1]).length = (P ++ [1]).length + 2 simp only [List.length_append, List.length_cons, List.length_nil] All goals completed! 🐙)
(fun R => Jump.jump19 P R hg) pad hpad banktheorem root_local (d : Nat) (s : Fin 22) (target : Word)
(h : Control.rawInstr (.local d s) = .jump target)
(pad : Nat) (hpad : (Control.walked (.local d s)).length + 3 ≤ pad)
(bank : List Nat) :
∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (.local d s)) bank) =
some (Physical.rootCfg pad target bank) := by d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
have hnext : Control.applyInstr (Control.rawInstr (.local d s)) bank =
some ⟨target, bank⟩ := by rw [h d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ Control.applyInstr (Riemann120.Layer2.RhInstr.jump target) bank = some { stack := target, regs := bank }] d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ Control.applyInstr (Riemann120.Layer2.RhInstr.jump target) bank = some { stack := target, regs := bank }; rfl d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d s)) bank = some { stack := target, regs := bank }⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
have hg := (Control.decoded_next_noThree (.local d s) bank _ hnext).2 d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d s)) bank = some { stack := target, regs := bank }hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = true⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
have hp := localWalk_parse d s d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d s)) bank = some { stack := target, regs := bank }hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truehp:walkInternal 15 (localWalk d s) = some (localTerminal s)⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
rcases s with ⟨sv, hsv⟩ d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:sv < 22h:Control.rawInstr (ControlWord.local d ⟨sv, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨sv, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨sv, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨sv, hsv⟩) = some (localTerminal ⟨sv, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨sv, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)
interval_cases sv «0» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:0 < 22h:Control.rawInstr (ControlWord.local d ⟨0, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨0, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨0, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨0, hsv⟩) = some (localTerminal ⟨0, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨0, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«1» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:1 < 22h:Control.rawInstr (ControlWord.local d ⟨1, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨1, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨1, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨1, hsv⟩) = some (localTerminal ⟨1, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨1, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«2» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:2 < 22h:Control.rawInstr (ControlWord.local d ⟨2, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨2, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨2, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨2, hsv⟩) = some (localTerminal ⟨2, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨2, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«3» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:3 < 22h:Control.rawInstr (ControlWord.local d ⟨3, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨3, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨3, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨3, hsv⟩) = some (localTerminal ⟨3, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨3, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«4» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:4 < 22h:Control.rawInstr (ControlWord.local d ⟨4, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨4, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨4, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨4, hsv⟩) = some (localTerminal ⟨4, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨4, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«5» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:5 < 22h:Control.rawInstr (ControlWord.local d ⟨5, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨5, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨5, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨5, hsv⟩) = some (localTerminal ⟨5, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨5, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«6» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:6 < 22h:Control.rawInstr (ControlWord.local d ⟨6, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨6, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨6, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨6, hsv⟩) = some (localTerminal ⟨6, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨6, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«7» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:7 < 22h:Control.rawInstr (ControlWord.local d ⟨7, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨7, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨7, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨7, hsv⟩) = some (localTerminal ⟨7, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨7, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«8» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:8 < 22h:Control.rawInstr (ControlWord.local d ⟨8, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨8, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨8, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨8, hsv⟩) = some (localTerminal ⟨8, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨8, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«9» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:9 < 22h:Control.rawInstr (ControlWord.local d ⟨9, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨9, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨9, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨9, hsv⟩) = some (localTerminal ⟨9, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨9, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«10» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:10 < 22h:Control.rawInstr (ControlWord.local d ⟨10, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨10, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨10, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨10, hsv⟩) = some (localTerminal ⟨10, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨10, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«11» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:11 < 22h:Control.rawInstr (ControlWord.local d ⟨11, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨11, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨11, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨11, hsv⟩) = some (localTerminal ⟨11, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨11, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«12» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:12 < 22h:Control.rawInstr (ControlWord.local d ⟨12, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨12, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨12, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨12, hsv⟩) = some (localTerminal ⟨12, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨12, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«13» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:13 < 22h:Control.rawInstr (ControlWord.local d ⟨13, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨13, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨13, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨13, hsv⟩) = some (localTerminal ⟨13, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨13, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«14» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:14 < 22h:Control.rawInstr (ControlWord.local d ⟨14, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨14, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨14, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨14, hsv⟩) = some (localTerminal ⟨14, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨14, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«15» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:15 < 22h:Control.rawInstr (ControlWord.local d ⟨15, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨15, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨15, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨15, hsv⟩) = some (localTerminal ⟨15, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨15, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«16» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:16 < 22h:Control.rawInstr (ControlWord.local d ⟨16, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨16, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨16, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨16, hsv⟩) = some (localTerminal ⟨16, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨16, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«17» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:17 < 22h:Control.rawInstr (ControlWord.local d ⟨17, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨17, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨17, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨17, hsv⟩) = some (localTerminal ⟨17, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨17, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«18» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:18 < 22h:Control.rawInstr (ControlWord.local d ⟨18, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨18, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨18, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨18, hsv⟩) = some (localTerminal ⟨18, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨18, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«19» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:19 < 22h:Control.rawInstr (ControlWord.local d ⟨19, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨19, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨19, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨19, hsv⟩) = some (localTerminal ⟨19, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨19, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«20» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:20 < 22h:Control.rawInstr (ControlWord.local d ⟨20, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨20, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨20, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨20, hsv⟩) = some (localTerminal ⟨20, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨20, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«21» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:21 < 22h:Control.rawInstr (ControlWord.local d ⟨21, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨21, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨21, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨21, hsv⟩) = some (localTerminal ⟨21, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨21, hsv⟩)) bank) = some (Physical.rootCfg pad target bank) <;> «0» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:0 < 22h:Control.rawInstr (ControlWord.local d ⟨0, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨0, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨0, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨0, hsv⟩) = some (localTerminal ⟨0, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨0, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«1» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:1 < 22h:Control.rawInstr (ControlWord.local d ⟨1, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨1, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨1, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨1, hsv⟩) = some (localTerminal ⟨1, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨1, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«2» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:2 < 22h:Control.rawInstr (ControlWord.local d ⟨2, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨2, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨2, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨2, hsv⟩) = some (localTerminal ⟨2, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨2, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«3» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:3 < 22h:Control.rawInstr (ControlWord.local d ⟨3, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨3, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨3, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨3, hsv⟩) = some (localTerminal ⟨3, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨3, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«4» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:4 < 22h:Control.rawInstr (ControlWord.local d ⟨4, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨4, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨4, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨4, hsv⟩) = some (localTerminal ⟨4, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨4, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«5» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:5 < 22h:Control.rawInstr (ControlWord.local d ⟨5, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨5, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨5, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨5, hsv⟩) = some (localTerminal ⟨5, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨5, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«6» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:6 < 22h:Control.rawInstr (ControlWord.local d ⟨6, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨6, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨6, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨6, hsv⟩) = some (localTerminal ⟨6, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨6, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«7» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:7 < 22h:Control.rawInstr (ControlWord.local d ⟨7, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨7, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨7, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨7, hsv⟩) = some (localTerminal ⟨7, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨7, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«8» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:8 < 22h:Control.rawInstr (ControlWord.local d ⟨8, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨8, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨8, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨8, hsv⟩) = some (localTerminal ⟨8, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨8, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«9» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:9 < 22h:Control.rawInstr (ControlWord.local d ⟨9, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨9, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨9, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨9, hsv⟩) = some (localTerminal ⟨9, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨9, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«10» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:10 < 22h:Control.rawInstr (ControlWord.local d ⟨10, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨10, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨10, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨10, hsv⟩) = some (localTerminal ⟨10, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨10, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«11» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:11 < 22h:Control.rawInstr (ControlWord.local d ⟨11, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨11, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨11, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨11, hsv⟩) = some (localTerminal ⟨11, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨11, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«12» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:12 < 22h:Control.rawInstr (ControlWord.local d ⟨12, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨12, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨12, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨12, hsv⟩) = some (localTerminal ⟨12, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨12, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«13» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:13 < 22h:Control.rawInstr (ControlWord.local d ⟨13, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨13, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨13, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨13, hsv⟩) = some (localTerminal ⟨13, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨13, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«14» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:14 < 22h:Control.rawInstr (ControlWord.local d ⟨14, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨14, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨14, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨14, hsv⟩) = some (localTerminal ⟨14, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨14, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«15» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:15 < 22h:Control.rawInstr (ControlWord.local d ⟨15, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨15, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨15, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨15, hsv⟩) = some (localTerminal ⟨15, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨15, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«16» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:16 < 22h:Control.rawInstr (ControlWord.local d ⟨16, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨16, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨16, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨16, hsv⟩) = some (localTerminal ⟨16, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨16, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«17» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:17 < 22h:Control.rawInstr (ControlWord.local d ⟨17, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨17, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨17, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨17, hsv⟩) = some (localTerminal ⟨17, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨17, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«18» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:18 < 22h:Control.rawInstr (ControlWord.local d ⟨18, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨18, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨18, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨18, hsv⟩) = some (localTerminal ⟨18, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨18, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«19» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:19 < 22h:Control.rawInstr (ControlWord.local d ⟨19, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨19, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨19, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨19, hsv⟩) = some (localTerminal ⟨19, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨19, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«20» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:20 < 22h:Control.rawInstr (ControlWord.local d ⟨20, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨20, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨20, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨20, hsv⟩) = some (localTerminal ⟨20, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨20, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)«21» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:21 < 22h:Control.rawInstr (ControlWord.local d ⟨21, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨21, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨21, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨21, hsv⟩) = some (localTerminal ⟨21, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨21, hsv⟩)) bank) = some (Physical.rootCfg pad target bank) first
| (solve | cases h All goals completed! 🐙)
| skip «20» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:20 < 22h:Control.rawInstr (ControlWord.local d ⟨20, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨20, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨20, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨20, hsv⟩) = some (localTerminal ⟨20, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨20, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)
· «3» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:3 < 22h:Control.rawInstr (ControlWord.local d ⟨3, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨3, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨3, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨3, hsv⟩) = some (localTerminal ⟨3, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨3, hsv⟩)) bank) = some (Physical.rootCfg pad target bank) have ht : target = callerPrefix d ++ [1] := by d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
simpa [Control.rawInstr, Control.effect, Control.localEffects, Control.walked,
Control.returned, localWalk, localWalkSuffix, localWalkSuffixes,
Riemann120.Layer2.popContinueRev, List.reverse_append] using h.symm «3» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:3 < 22h:Control.rawInstr (ControlWord.local d ⟨3, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨3, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨3, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨3, hsv⟩) = some (localTerminal ⟨3, hsv⟩)ht:target = callerPrefix d ++ [1]⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨3, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)
subst target «3» d:ℕpad:ℕbank:List ℕsv:ℕhsv:3 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨3, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨3, hsv⟩) = some (localTerminal ⟨3, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨3, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨3, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1], regs := bank }⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨3, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1]) bank)
have hsuf : suffix ⟨3, hsv⟩ = [1, 0, 0, 1, 1, 1] :=
(by d:ℕpad:ℕbank:List ℕsv:ℕhsv:3 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨3, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨3, hsv⟩) = some (localTerminal ⟨3, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨3, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨3, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1], regs := bank }⊢ suffix 3 = [1, 0, 0, 1, 1, 1] decide +kernel All goals completed! 🐙 : suffix 3 = [1, 0, 0, 1, 1, 1]) «3» d:ℕpad:ℕbank:List ℕsv:ℕhsv:3 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨3, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨3, hsv⟩) = some (localTerminal ⟨3, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨3, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨3, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1], regs := bank }hsuf:suffix ⟨3, hsv⟩ = [1, 0, 0, 1, 1, 1]⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨3, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1]) bank)
have hw : localWalkSuffix ⟨3, hsv⟩ = [1, 0, 0, 1, 1] :=
(by d:ℕpad:ℕbank:List ℕsv:ℕhsv:3 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨3, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨3, hsv⟩) = some (localTerminal ⟨3, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨3, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨3, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1], regs := bank }hsuf:suffix ⟨3, hsv⟩ = [1, 0, 0, 1, 1, 1]⊢ localWalkSuffix 3 = [1, 0, 0, 1, 1] decide +kernel All goals completed! 🐙 : localWalkSuffix 3 = [1, 0, 0, 1, 1]) «3» d:ℕpad:ℕbank:List ℕsv:ℕhsv:3 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨3, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨3, hsv⟩) = some (localTerminal ⟨3, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨3, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨3, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1], regs := bank }hsuf:suffix ⟨3, hsv⟩ = [1, 0, 0, 1, 1, 1]hw:localWalkSuffix ⟨3, hsv⟩ = [1, 0, 0, 1, 1]⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨3, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1]) bank)
have hq : localTerminal ⟨3, hsv⟩ = 43 :=
(by d:ℕpad:ℕbank:List ℕsv:ℕhsv:3 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨3, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨3, hsv⟩) = some (localTerminal ⟨3, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨3, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨3, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1], regs := bank }hsuf:suffix ⟨3, hsv⟩ = [1, 0, 0, 1, 1, 1]hw:localWalkSuffix ⟨3, hsv⟩ = [1, 0, 0, 1, 1]⊢ localTerminal 3 = 43 decide +kernel All goals completed! 🐙 : localTerminal 3 = 43) «3» d:ℕpad:ℕbank:List ℕsv:ℕhsv:3 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨3, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨3, hsv⟩) = some (localTerminal ⟨3, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨3, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨3, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1], regs := bank }hsuf:suffix ⟨3, hsv⟩ = [1, 0, 0, 1, 1, 1]hw:localWalkSuffix ⟨3, hsv⟩ = [1, 0, 0, 1, 1]hq:localTerminal ⟨3, hsv⟩ = 43⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨3, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1]) bank)
have hp' : walkInternal 15 ((callerPrefix d) ++ [1, 0, 0, 1, 1]) = some 43 := by d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
simpa only [localWalk, hw, hq, List.append_assoc, List.cons_append,
List.nil_append] using hp «3» d:ℕpad:ℕbank:List ℕsv:ℕhsv:3 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨3, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨3, hsv⟩) = some (localTerminal ⟨3, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨3, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨3, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1], regs := bank }hsuf:suffix ⟨3, hsv⟩ = [1, 0, 0, 1, 1, 1]hw:localWalkSuffix ⟨3, hsv⟩ = [1, 0, 0, 1, 1]hq:localTerminal ⟨3, hsv⟩ = 43hp':walkInternal 15 (callerPrefix d ++ [1, 0, 0, 1, 1]) = some 43⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨3, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1]) bank)
have hg' :
Riemann104.OnePassGuard.NoThreeZeros (1 :: ((callerPrefix d) ++ [1])).reverse = true := by d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
simpa only [List.append_assoc, List.cons_append, List.nil_append] using hg «3» d:ℕpad:ℕbank:List ℕsv:ℕhsv:3 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨3, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨3, hsv⟩) = some (localTerminal ⟨3, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨3, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨3, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1], regs := bank }hsuf:suffix ⟨3, hsv⟩ = [1, 0, 0, 1, 1, 1]hw:localWalkSuffix ⟨3, hsv⟩ = [1, 0, 0, 1, 1]hq:localTerminal ⟨3, hsv⟩ = 43hp':walkInternal 15 (callerPrefix d ++ [1, 0, 0, 1, 1]) = some 43hg':Riemann104.OnePassGuard.NoThreeZeros (1 :: (callerPrefix d ++ [1])).reverse = true⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨3, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1]) bank)
have hpad' : ((callerPrefix d) ++ [1, 0, 0, 1, 1]).length + 3 ≤ pad := by d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
simpa only [Control.walked, localWalk, hw, List.append_assoc,
List.cons_append, List.nil_append] using hpad «3» d:ℕpad:ℕbank:List ℕsv:ℕhsv:3 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨3, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨3, hsv⟩) = some (localTerminal ⟨3, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨3, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨3, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1], regs := bank }hsuf:suffix ⟨3, hsv⟩ = [1, 0, 0, 1, 1, 1]hw:localWalkSuffix ⟨3, hsv⟩ = [1, 0, 0, 1, 1]hq:localTerminal ⟨3, hsv⟩ = 43hp':walkInternal 15 (callerPrefix d ++ [1, 0, 0, 1, 1]) = some 43hg':Riemann104.OnePassGuard.NoThreeZeros (1 :: (callerPrefix d ++ [1])).reverse = truehpad':List.length (callerPrefix d ++ [1, 0, 0, 1, 1]) + 3 ≤ pad⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨3, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1]) bank)
simpa only [word, hsuf, List.append_assoc, List.cons_append, List.nil_append] using
root43 (callerPrefix d) pad bank hp' hg' hpad' All goals completed! 🐙
· «6» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:6 < 22h:Control.rawInstr (ControlWord.local d ⟨6, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨6, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨6, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨6, hsv⟩) = some (localTerminal ⟨6, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨6, hsv⟩)) bank) = some (Physical.rootCfg pad target bank) have ht : target = callerPrefix d ++ [1, 0, 1] := by d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
simpa [Control.rawInstr, Control.effect, Control.localEffects, Control.walked,
Control.returned, localWalk, localWalkSuffix, localWalkSuffixes,
Riemann120.Layer2.popContinueRev, List.reverse_append] using h.symm «6» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:6 < 22h:Control.rawInstr (ControlWord.local d ⟨6, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨6, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨6, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨6, hsv⟩) = some (localTerminal ⟨6, hsv⟩)ht:target = callerPrefix d ++ [1, 0, 1]⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨6, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)
subst target «6» d:ℕpad:ℕbank:List ℕsv:ℕhsv:6 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨6, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨6, hsv⟩) = some (localTerminal ⟨6, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 0, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨6, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨6, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 0, 1], regs := bank }⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨6, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 0, 1]) bank)
have hsuf : suffix ⟨6, hsv⟩ = [1, 0, 1, 1, 1] :=
(by d:ℕpad:ℕbank:List ℕsv:ℕhsv:6 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨6, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨6, hsv⟩) = some (localTerminal ⟨6, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 0, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨6, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨6, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 0, 1], regs := bank }⊢ suffix 6 = [1, 0, 1, 1, 1] decide +kernel All goals completed! 🐙 : suffix 6 = [1, 0, 1, 1, 1]) «6» d:ℕpad:ℕbank:List ℕsv:ℕhsv:6 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨6, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨6, hsv⟩) = some (localTerminal ⟨6, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 0, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨6, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨6, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 0, 1], regs := bank }hsuf:suffix ⟨6, hsv⟩ = [1, 0, 1, 1, 1]⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨6, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 0, 1]) bank)
have hw : localWalkSuffix ⟨6, hsv⟩ = [1, 0, 1, 1] :=
(by d:ℕpad:ℕbank:List ℕsv:ℕhsv:6 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨6, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨6, hsv⟩) = some (localTerminal ⟨6, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 0, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨6, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨6, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 0, 1], regs := bank }hsuf:suffix ⟨6, hsv⟩ = [1, 0, 1, 1, 1]⊢ localWalkSuffix 6 = [1, 0, 1, 1] decide +kernel All goals completed! 🐙 : localWalkSuffix 6 = [1, 0, 1, 1]) «6» d:ℕpad:ℕbank:List ℕsv:ℕhsv:6 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨6, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨6, hsv⟩) = some (localTerminal ⟨6, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 0, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨6, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨6, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 0, 1], regs := bank }hsuf:suffix ⟨6, hsv⟩ = [1, 0, 1, 1, 1]hw:localWalkSuffix ⟨6, hsv⟩ = [1, 0, 1, 1]⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨6, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 0, 1]) bank)
have hq : localTerminal ⟨6, hsv⟩ = 59 :=
(by d:ℕpad:ℕbank:List ℕsv:ℕhsv:6 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨6, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨6, hsv⟩) = some (localTerminal ⟨6, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 0, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨6, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨6, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 0, 1], regs := bank }hsuf:suffix ⟨6, hsv⟩ = [1, 0, 1, 1, 1]hw:localWalkSuffix ⟨6, hsv⟩ = [1, 0, 1, 1]⊢ localTerminal 6 = 59 decide +kernel All goals completed! 🐙 : localTerminal 6 = 59) «6» d:ℕpad:ℕbank:List ℕsv:ℕhsv:6 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨6, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨6, hsv⟩) = some (localTerminal ⟨6, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 0, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨6, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨6, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 0, 1], regs := bank }hsuf:suffix ⟨6, hsv⟩ = [1, 0, 1, 1, 1]hw:localWalkSuffix ⟨6, hsv⟩ = [1, 0, 1, 1]hq:localTerminal ⟨6, hsv⟩ = 59⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨6, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 0, 1]) bank)
have hp' : walkInternal 15 ((callerPrefix d ++ [1, 0]) ++ [1, 1]) = some 59 := by d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
simpa only [localWalk, hw, hq, List.append_assoc, List.cons_append,
List.nil_append] using hp «6» d:ℕpad:ℕbank:List ℕsv:ℕhsv:6 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨6, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨6, hsv⟩) = some (localTerminal ⟨6, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 0, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨6, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨6, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 0, 1], regs := bank }hsuf:suffix ⟨6, hsv⟩ = [1, 0, 1, 1, 1]hw:localWalkSuffix ⟨6, hsv⟩ = [1, 0, 1, 1]hq:localTerminal ⟨6, hsv⟩ = 59hp':walkInternal 15 (callerPrefix d ++ [1, 0] ++ [1, 1]) = some 59⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨6, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 0, 1]) bank)
have hg' :
Riemann104.OnePassGuard.NoThreeZeros
(1 :: ((callerPrefix d ++ [1, 0]) ++ [1])).reverse = true := by d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
simpa only [List.append_assoc, List.cons_append, List.nil_append] using hg «6» d:ℕpad:ℕbank:List ℕsv:ℕhsv:6 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨6, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨6, hsv⟩) = some (localTerminal ⟨6, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 0, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨6, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨6, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 0, 1], regs := bank }hsuf:suffix ⟨6, hsv⟩ = [1, 0, 1, 1, 1]hw:localWalkSuffix ⟨6, hsv⟩ = [1, 0, 1, 1]hq:localTerminal ⟨6, hsv⟩ = 59hp':walkInternal 15 (callerPrefix d ++ [1, 0] ++ [1, 1]) = some 59hg':Riemann104.OnePassGuard.NoThreeZeros (1 :: (callerPrefix d ++ [1, 0] ++ [1])).reverse = true⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨6, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 0, 1]) bank)
have hpad' : ((callerPrefix d ++ [1, 0]) ++ [1, 1]).length + 3 ≤ pad := by d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
simpa only [Control.walked, localWalk, hw, List.append_assoc,
List.cons_append, List.nil_append] using hpad «6» d:ℕpad:ℕbank:List ℕsv:ℕhsv:6 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨6, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨6, hsv⟩) = some (localTerminal ⟨6, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 0, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨6, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨6, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 0, 1], regs := bank }hsuf:suffix ⟨6, hsv⟩ = [1, 0, 1, 1, 1]hw:localWalkSuffix ⟨6, hsv⟩ = [1, 0, 1, 1]hq:localTerminal ⟨6, hsv⟩ = 59hp':walkInternal 15 (callerPrefix d ++ [1, 0] ++ [1, 1]) = some 59hg':Riemann104.OnePassGuard.NoThreeZeros (1 :: (callerPrefix d ++ [1, 0] ++ [1])).reverse = truehpad':List.length (callerPrefix d ++ [1, 0] ++ [1, 1]) + 3 ≤ pad⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨6, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 0, 1]) bank)
simpa only [word, hsuf, List.append_assoc, List.cons_append, List.nil_append] using
root59 (callerPrefix d ++ [1, 0]) pad bank hp' hg' hpad' All goals completed! 🐙
· «10» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:10 < 22h:Control.rawInstr (ControlWord.local d ⟨10, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨10, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨10, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨10, hsv⟩) = some (localTerminal ⟨10, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨10, hsv⟩)) bank) = some (Physical.rootCfg pad target bank) have ht : target = callerPrefix d ++ [1, 1] := by d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
simpa [Control.rawInstr, Control.effect, Control.localEffects, Control.walked,
Control.returned, localWalk, localWalkSuffix, localWalkSuffixes,
Riemann120.Layer2.popContinueRev, List.reverse_append] using h.symm «10» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:10 < 22h:Control.rawInstr (ControlWord.local d ⟨10, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨10, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨10, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨10, hsv⟩) = some (localTerminal ⟨10, hsv⟩)ht:target = callerPrefix d ++ [1, 1]⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨10, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)
subst target «10» d:ℕpad:ℕbank:List ℕsv:ℕhsv:10 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨10, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨10, hsv⟩) = some (localTerminal ⟨10, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨10, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨10, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1], regs := bank }⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨10, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1]) bank)
have hsuf : suffix ⟨10, hsv⟩ = [1, 1, 0, 0, 1, 1, 1] :=
(by d:ℕpad:ℕbank:List ℕsv:ℕhsv:10 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨10, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨10, hsv⟩) = some (localTerminal ⟨10, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨10, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨10, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1], regs := bank }⊢ suffix 10 = [1, 1, 0, 0, 1, 1, 1] decide +kernel All goals completed! 🐙 : suffix 10 = [1, 1, 0, 0, 1, 1, 1]) «10» d:ℕpad:ℕbank:List ℕsv:ℕhsv:10 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨10, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨10, hsv⟩) = some (localTerminal ⟨10, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨10, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨10, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1], regs := bank }hsuf:suffix ⟨10, hsv⟩ = [1, 1, 0, 0, 1, 1, 1]⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨10, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1]) bank)
have hw : localWalkSuffix ⟨10, hsv⟩ = [1, 1, 0, 0, 1, 1] :=
(by d:ℕpad:ℕbank:List ℕsv:ℕhsv:10 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨10, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨10, hsv⟩) = some (localTerminal ⟨10, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨10, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨10, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1], regs := bank }hsuf:suffix ⟨10, hsv⟩ = [1, 1, 0, 0, 1, 1, 1]⊢ localWalkSuffix 10 = [1, 1, 0, 0, 1, 1] decide +kernel All goals completed! 🐙 : localWalkSuffix 10 = [1, 1, 0, 0, 1, 1]) «10» d:ℕpad:ℕbank:List ℕsv:ℕhsv:10 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨10, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨10, hsv⟩) = some (localTerminal ⟨10, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨10, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨10, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1], regs := bank }hsuf:suffix ⟨10, hsv⟩ = [1, 1, 0, 0, 1, 1, 1]hw:localWalkSuffix ⟨10, hsv⟩ = [1, 1, 0, 0, 1, 1]⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨10, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1]) bank)
have hq : localTerminal ⟨10, hsv⟩ = 43 :=
(by d:ℕpad:ℕbank:List ℕsv:ℕhsv:10 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨10, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨10, hsv⟩) = some (localTerminal ⟨10, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨10, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨10, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1], regs := bank }hsuf:suffix ⟨10, hsv⟩ = [1, 1, 0, 0, 1, 1, 1]hw:localWalkSuffix ⟨10, hsv⟩ = [1, 1, 0, 0, 1, 1]⊢ localTerminal 10 = 43 decide +kernel All goals completed! 🐙 : localTerminal 10 = 43) «10» d:ℕpad:ℕbank:List ℕsv:ℕhsv:10 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨10, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨10, hsv⟩) = some (localTerminal ⟨10, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨10, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨10, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1], regs := bank }hsuf:suffix ⟨10, hsv⟩ = [1, 1, 0, 0, 1, 1, 1]hw:localWalkSuffix ⟨10, hsv⟩ = [1, 1, 0, 0, 1, 1]hq:localTerminal ⟨10, hsv⟩ = 43⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨10, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1]) bank)
have hp' : walkInternal 15 ((callerPrefix d ++ [1]) ++ [1, 0, 0, 1, 1]) = some 43 := by d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
simpa only [localWalk, hw, hq, List.append_assoc, List.cons_append,
List.nil_append] using hp «10» d:ℕpad:ℕbank:List ℕsv:ℕhsv:10 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨10, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨10, hsv⟩) = some (localTerminal ⟨10, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨10, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨10, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1], regs := bank }hsuf:suffix ⟨10, hsv⟩ = [1, 1, 0, 0, 1, 1, 1]hw:localWalkSuffix ⟨10, hsv⟩ = [1, 1, 0, 0, 1, 1]hq:localTerminal ⟨10, hsv⟩ = 43hp':walkInternal 15 (callerPrefix d ++ [1] ++ [1, 0, 0, 1, 1]) = some 43⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨10, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1]) bank)
have hg' :
Riemann104.OnePassGuard.NoThreeZeros
(1 :: ((callerPrefix d ++ [1]) ++ [1])).reverse = true := by d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
simpa only [List.append_assoc, List.cons_append, List.nil_append] using hg «10» d:ℕpad:ℕbank:List ℕsv:ℕhsv:10 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨10, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨10, hsv⟩) = some (localTerminal ⟨10, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨10, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨10, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1], regs := bank }hsuf:suffix ⟨10, hsv⟩ = [1, 1, 0, 0, 1, 1, 1]hw:localWalkSuffix ⟨10, hsv⟩ = [1, 1, 0, 0, 1, 1]hq:localTerminal ⟨10, hsv⟩ = 43hp':walkInternal 15 (callerPrefix d ++ [1] ++ [1, 0, 0, 1, 1]) = some 43hg':Riemann104.OnePassGuard.NoThreeZeros (1 :: (callerPrefix d ++ [1] ++ [1])).reverse = true⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨10, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1]) bank)
have hpad' : ((callerPrefix d ++ [1]) ++ [1, 0, 0, 1, 1]).length + 3 ≤ pad := by d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
simpa only [Control.walked, localWalk, hw, List.append_assoc,
List.cons_append, List.nil_append] using hpad «10» d:ℕpad:ℕbank:List ℕsv:ℕhsv:10 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨10, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨10, hsv⟩) = some (localTerminal ⟨10, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨10, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨10, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1], regs := bank }hsuf:suffix ⟨10, hsv⟩ = [1, 1, 0, 0, 1, 1, 1]hw:localWalkSuffix ⟨10, hsv⟩ = [1, 1, 0, 0, 1, 1]hq:localTerminal ⟨10, hsv⟩ = 43hp':walkInternal 15 (callerPrefix d ++ [1] ++ [1, 0, 0, 1, 1]) = some 43hg':Riemann104.OnePassGuard.NoThreeZeros (1 :: (callerPrefix d ++ [1] ++ [1])).reverse = truehpad':List.length (callerPrefix d ++ [1] ++ [1, 0, 0, 1, 1]) + 3 ≤ pad⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨10, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1]) bank)
simpa only [word, hsuf, List.append_assoc, List.cons_append, List.nil_append] using
root43 (callerPrefix d ++ [1]) pad bank hp' hg' hpad' All goals completed! 🐙
· «13» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:13 < 22h:Control.rawInstr (ControlWord.local d ⟨13, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨13, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨13, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨13, hsv⟩) = some (localTerminal ⟨13, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨13, hsv⟩)) bank) = some (Physical.rootCfg pad target bank) have ht : target = callerPrefix d ++ [1, 1, 0, 1] := by d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
simpa [Control.rawInstr, Control.effect, Control.localEffects, Control.walked,
Control.returned, localWalk, localWalkSuffix, localWalkSuffixes,
Riemann120.Layer2.popContinueRev, List.reverse_append] using h.symm «13» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:13 < 22h:Control.rawInstr (ControlWord.local d ⟨13, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨13, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨13, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨13, hsv⟩) = some (localTerminal ⟨13, hsv⟩)ht:target = callerPrefix d ++ [1, 1, 0, 1]⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨13, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)
subst target «13» d:ℕpad:ℕbank:List ℕsv:ℕhsv:13 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨13, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨13, hsv⟩) = some (localTerminal ⟨13, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 0, 1], regs := bank }.stack).reverse =
trueh:Control.rawInstr (ControlWord.local d ⟨13, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨13, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 0, 1], regs := bank }⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨13, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1, 0, 1]) bank)
have hsuf : suffix ⟨13, hsv⟩ = [1, 1, 0, 1, 1, 1] :=
(by d:ℕpad:ℕbank:List ℕsv:ℕhsv:13 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨13, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨13, hsv⟩) = some (localTerminal ⟨13, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 0, 1], regs := bank }.stack).reverse =
trueh:Control.rawInstr (ControlWord.local d ⟨13, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨13, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 0, 1], regs := bank }⊢ suffix 13 = [1, 1, 0, 1, 1, 1] decide +kernel All goals completed! 🐙 : suffix 13 = [1, 1, 0, 1, 1, 1]) «13» d:ℕpad:ℕbank:List ℕsv:ℕhsv:13 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨13, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨13, hsv⟩) = some (localTerminal ⟨13, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 0, 1], regs := bank }.stack).reverse =
trueh:Control.rawInstr (ControlWord.local d ⟨13, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨13, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 0, 1], regs := bank }hsuf:suffix ⟨13, hsv⟩ = [1, 1, 0, 1, 1, 1]⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨13, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1, 0, 1]) bank)
have hw : localWalkSuffix ⟨13, hsv⟩ = [1, 1, 0, 1, 1] :=
(by d:ℕpad:ℕbank:List ℕsv:ℕhsv:13 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨13, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨13, hsv⟩) = some (localTerminal ⟨13, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 0, 1], regs := bank }.stack).reverse =
trueh:Control.rawInstr (ControlWord.local d ⟨13, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨13, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 0, 1], regs := bank }hsuf:suffix ⟨13, hsv⟩ = [1, 1, 0, 1, 1, 1]⊢ localWalkSuffix 13 = [1, 1, 0, 1, 1] decide +kernel All goals completed! 🐙 : localWalkSuffix 13 = [1, 1, 0, 1, 1]) «13» d:ℕpad:ℕbank:List ℕsv:ℕhsv:13 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨13, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨13, hsv⟩) = some (localTerminal ⟨13, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 0, 1], regs := bank }.stack).reverse =
trueh:Control.rawInstr (ControlWord.local d ⟨13, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨13, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 0, 1], regs := bank }hsuf:suffix ⟨13, hsv⟩ = [1, 1, 0, 1, 1, 1]hw:localWalkSuffix ⟨13, hsv⟩ = [1, 1, 0, 1, 1]⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨13, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1, 0, 1]) bank)
have hq : localTerminal ⟨13, hsv⟩ = 59 :=
(by d:ℕpad:ℕbank:List ℕsv:ℕhsv:13 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨13, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨13, hsv⟩) = some (localTerminal ⟨13, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 0, 1], regs := bank }.stack).reverse =
trueh:Control.rawInstr (ControlWord.local d ⟨13, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨13, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 0, 1], regs := bank }hsuf:suffix ⟨13, hsv⟩ = [1, 1, 0, 1, 1, 1]hw:localWalkSuffix ⟨13, hsv⟩ = [1, 1, 0, 1, 1]⊢ localTerminal 13 = 59 decide +kernel All goals completed! 🐙 : localTerminal 13 = 59) «13» d:ℕpad:ℕbank:List ℕsv:ℕhsv:13 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨13, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨13, hsv⟩) = some (localTerminal ⟨13, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 0, 1], regs := bank }.stack).reverse =
trueh:Control.rawInstr (ControlWord.local d ⟨13, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨13, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 0, 1], regs := bank }hsuf:suffix ⟨13, hsv⟩ = [1, 1, 0, 1, 1, 1]hw:localWalkSuffix ⟨13, hsv⟩ = [1, 1, 0, 1, 1]hq:localTerminal ⟨13, hsv⟩ = 59⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨13, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1, 0, 1]) bank)
have hp' : walkInternal 15 ((callerPrefix d ++ [1, 1, 0]) ++ [1, 1]) = some 59 := by d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
simpa only [localWalk, hw, hq, List.append_assoc, List.cons_append,
List.nil_append] using hp «13» d:ℕpad:ℕbank:List ℕsv:ℕhsv:13 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨13, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨13, hsv⟩) = some (localTerminal ⟨13, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 0, 1], regs := bank }.stack).reverse =
trueh:Control.rawInstr (ControlWord.local d ⟨13, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨13, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 0, 1], regs := bank }hsuf:suffix ⟨13, hsv⟩ = [1, 1, 0, 1, 1, 1]hw:localWalkSuffix ⟨13, hsv⟩ = [1, 1, 0, 1, 1]hq:localTerminal ⟨13, hsv⟩ = 59hp':walkInternal 15 (callerPrefix d ++ [1, 1, 0] ++ [1, 1]) = some 59⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨13, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1, 0, 1]) bank)
have hg' :
Riemann104.OnePassGuard.NoThreeZeros
(1 :: ((callerPrefix d ++ [1, 1, 0]) ++ [1])).reverse = true := by d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
simpa only [List.append_assoc, List.cons_append, List.nil_append] using hg «13» d:ℕpad:ℕbank:List ℕsv:ℕhsv:13 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨13, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨13, hsv⟩) = some (localTerminal ⟨13, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 0, 1], regs := bank }.stack).reverse =
trueh:Control.rawInstr (ControlWord.local d ⟨13, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨13, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 0, 1], regs := bank }hsuf:suffix ⟨13, hsv⟩ = [1, 1, 0, 1, 1, 1]hw:localWalkSuffix ⟨13, hsv⟩ = [1, 1, 0, 1, 1]hq:localTerminal ⟨13, hsv⟩ = 59hp':walkInternal 15 (callerPrefix d ++ [1, 1, 0] ++ [1, 1]) = some 59hg':Riemann104.OnePassGuard.NoThreeZeros (1 :: (callerPrefix d ++ [1, 1, 0] ++ [1])).reverse = true⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨13, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1, 0, 1]) bank)
have hpad' : ((callerPrefix d ++ [1, 1, 0]) ++ [1, 1]).length + 3 ≤ pad := by d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
simpa only [Control.walked, localWalk, hw, List.append_assoc,
List.cons_append, List.nil_append] using hpad «13» d:ℕpad:ℕbank:List ℕsv:ℕhsv:13 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨13, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨13, hsv⟩) = some (localTerminal ⟨13, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 0, 1], regs := bank }.stack).reverse =
trueh:Control.rawInstr (ControlWord.local d ⟨13, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨13, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 0, 1], regs := bank }hsuf:suffix ⟨13, hsv⟩ = [1, 1, 0, 1, 1, 1]hw:localWalkSuffix ⟨13, hsv⟩ = [1, 1, 0, 1, 1]hq:localTerminal ⟨13, hsv⟩ = 59hp':walkInternal 15 (callerPrefix d ++ [1, 1, 0] ++ [1, 1]) = some 59hg':Riemann104.OnePassGuard.NoThreeZeros (1 :: (callerPrefix d ++ [1, 1, 0] ++ [1])).reverse = truehpad':List.length (callerPrefix d ++ [1, 1, 0] ++ [1, 1]) + 3 ≤ pad⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨13, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1, 0, 1]) bank)
simpa only [word, hsuf, List.append_assoc, List.cons_append, List.nil_append] using
root59 (callerPrefix d ++ [1, 1, 0]) pad bank hp' hg' hpad' All goals completed! 🐙
· «17» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:17 < 22h:Control.rawInstr (ControlWord.local d ⟨17, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨17, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨17, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨17, hsv⟩) = some (localTerminal ⟨17, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨17, hsv⟩)) bank) = some (Physical.rootCfg pad target bank) have ht : target = callerPrefix d ++ [1, 1, 1] := by d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
simpa [Control.rawInstr, Control.effect, Control.localEffects, Control.walked,
Control.returned, localWalk, localWalkSuffix, localWalkSuffixes,
Riemann120.Layer2.popContinueRev, List.reverse_append] using h.symm «17» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:17 < 22h:Control.rawInstr (ControlWord.local d ⟨17, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨17, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨17, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨17, hsv⟩) = some (localTerminal ⟨17, hsv⟩)ht:target = callerPrefix d ++ [1, 1, 1]⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨17, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)
subst target «17» d:ℕpad:ℕbank:List ℕsv:ℕhsv:17 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨17, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨17, hsv⟩) = some (localTerminal ⟨17, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨17, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨17, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 1], regs := bank }⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨17, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1, 1]) bank)
have hsuf : suffix ⟨17, hsv⟩ = [1, 1, 1, 0, 0, 1, 1, 1] :=
(by d:ℕpad:ℕbank:List ℕsv:ℕhsv:17 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨17, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨17, hsv⟩) = some (localTerminal ⟨17, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨17, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨17, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 1], regs := bank }⊢ suffix 17 = [1, 1, 1, 0, 0, 1, 1, 1] decide +kernel All goals completed! 🐙 : suffix 17 = [1, 1, 1, 0, 0, 1, 1, 1]) «17» d:ℕpad:ℕbank:List ℕsv:ℕhsv:17 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨17, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨17, hsv⟩) = some (localTerminal ⟨17, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨17, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨17, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 1], regs := bank }hsuf:suffix ⟨17, hsv⟩ = [1, 1, 1, 0, 0, 1, 1, 1]⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨17, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1, 1]) bank)
have hw : localWalkSuffix ⟨17, hsv⟩ = [1, 1, 1, 0, 0, 1, 1] :=
(by d:ℕpad:ℕbank:List ℕsv:ℕhsv:17 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨17, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨17, hsv⟩) = some (localTerminal ⟨17, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨17, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨17, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 1], regs := bank }hsuf:suffix ⟨17, hsv⟩ = [1, 1, 1, 0, 0, 1, 1, 1]⊢ localWalkSuffix 17 = [1, 1, 1, 0, 0, 1, 1] decide +kernel All goals completed! 🐙 : localWalkSuffix 17 = [1, 1, 1, 0, 0, 1, 1]) «17» d:ℕpad:ℕbank:List ℕsv:ℕhsv:17 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨17, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨17, hsv⟩) = some (localTerminal ⟨17, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨17, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨17, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 1], regs := bank }hsuf:suffix ⟨17, hsv⟩ = [1, 1, 1, 0, 0, 1, 1, 1]hw:localWalkSuffix ⟨17, hsv⟩ = [1, 1, 1, 0, 0, 1, 1]⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨17, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1, 1]) bank)
have hq : localTerminal ⟨17, hsv⟩ = 43 :=
(by d:ℕpad:ℕbank:List ℕsv:ℕhsv:17 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨17, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨17, hsv⟩) = some (localTerminal ⟨17, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨17, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨17, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 1], regs := bank }hsuf:suffix ⟨17, hsv⟩ = [1, 1, 1, 0, 0, 1, 1, 1]hw:localWalkSuffix ⟨17, hsv⟩ = [1, 1, 1, 0, 0, 1, 1]⊢ localTerminal 17 = 43 decide +kernel All goals completed! 🐙 : localTerminal 17 = 43) «17» d:ℕpad:ℕbank:List ℕsv:ℕhsv:17 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨17, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨17, hsv⟩) = some (localTerminal ⟨17, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨17, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨17, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 1], regs := bank }hsuf:suffix ⟨17, hsv⟩ = [1, 1, 1, 0, 0, 1, 1, 1]hw:localWalkSuffix ⟨17, hsv⟩ = [1, 1, 1, 0, 0, 1, 1]hq:localTerminal ⟨17, hsv⟩ = 43⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨17, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1, 1]) bank)
have hp' : walkInternal 15 ((callerPrefix d ++ [1, 1]) ++ [1, 0, 0, 1, 1]) = some 43 := by d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
simpa only [localWalk, hw, hq, List.append_assoc, List.cons_append,
List.nil_append] using hp «17» d:ℕpad:ℕbank:List ℕsv:ℕhsv:17 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨17, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨17, hsv⟩) = some (localTerminal ⟨17, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨17, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨17, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 1], regs := bank }hsuf:suffix ⟨17, hsv⟩ = [1, 1, 1, 0, 0, 1, 1, 1]hw:localWalkSuffix ⟨17, hsv⟩ = [1, 1, 1, 0, 0, 1, 1]hq:localTerminal ⟨17, hsv⟩ = 43hp':walkInternal 15 (callerPrefix d ++ [1, 1] ++ [1, 0, 0, 1, 1]) = some 43⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨17, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1, 1]) bank)
have hg' :
Riemann104.OnePassGuard.NoThreeZeros
(1 :: ((callerPrefix d ++ [1, 1]) ++ [1])).reverse = true := by d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
simpa only [List.append_assoc, List.cons_append, List.nil_append] using hg «17» d:ℕpad:ℕbank:List ℕsv:ℕhsv:17 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨17, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨17, hsv⟩) = some (localTerminal ⟨17, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨17, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨17, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 1], regs := bank }hsuf:suffix ⟨17, hsv⟩ = [1, 1, 1, 0, 0, 1, 1, 1]hw:localWalkSuffix ⟨17, hsv⟩ = [1, 1, 1, 0, 0, 1, 1]hq:localTerminal ⟨17, hsv⟩ = 43hp':walkInternal 15 (callerPrefix d ++ [1, 1] ++ [1, 0, 0, 1, 1]) = some 43hg':Riemann104.OnePassGuard.NoThreeZeros (1 :: (callerPrefix d ++ [1, 1] ++ [1])).reverse = true⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨17, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1, 1]) bank)
have hpad' : ((callerPrefix d ++ [1, 1]) ++ [1, 0, 0, 1, 1]).length + 3 ≤ pad := by d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
simpa only [Control.walked, localWalk, hw, List.append_assoc,
List.cons_append, List.nil_append] using hpad «17» d:ℕpad:ℕbank:List ℕsv:ℕhsv:17 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨17, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨17, hsv⟩) = some (localTerminal ⟨17, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 1], regs := bank }.stack).reverse = trueh:Control.rawInstr (ControlWord.local d ⟨17, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨17, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 1], regs := bank }hsuf:suffix ⟨17, hsv⟩ = [1, 1, 1, 0, 0, 1, 1, 1]hw:localWalkSuffix ⟨17, hsv⟩ = [1, 1, 1, 0, 0, 1, 1]hq:localTerminal ⟨17, hsv⟩ = 43hp':walkInternal 15 (callerPrefix d ++ [1, 1] ++ [1, 0, 0, 1, 1]) = some 43hg':Riemann104.OnePassGuard.NoThreeZeros (1 :: (callerPrefix d ++ [1, 1] ++ [1])).reverse = truehpad':List.length (callerPrefix d ++ [1, 1] ++ [1, 0, 0, 1, 1]) + 3 ≤ pad⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨17, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1, 1]) bank)
simpa only [word, hsuf, List.append_assoc, List.cons_append, List.nil_append] using
root43 (callerPrefix d ++ [1, 1]) pad bank hp' hg' hpad' All goals completed! 🐙
· «20» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:20 < 22h:Control.rawInstr (ControlWord.local d ⟨20, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨20, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨20, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨20, hsv⟩) = some (localTerminal ⟨20, hsv⟩)⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨20, hsv⟩)) bank) = some (Physical.rootCfg pad target bank) have ht : target = callerPrefix d ++ [1, 1, 1, 0, 1] := by d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
simpa [Control.rawInstr, Control.effect, Control.localEffects, Control.walked,
Control.returned, localWalk, localWalkSuffix, localWalkSuffixes,
Riemann120.Layer2.popContinueRev, List.reverse_append] using h.symm «20» d:ℕtarget:Wordpad:ℕbank:List ℕhg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := target, regs := bank }.stack).reverse = truesv:ℕhsv:20 < 22h:Control.rawInstr (ControlWord.local d ⟨20, hsv⟩) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d ⟨20, hsv⟩)) + 3 ≤ padhnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨20, hsv⟩)) bank = some { stack := target, regs := bank }hp:walkInternal 15 (localWalk d ⟨20, hsv⟩) = some (localTerminal ⟨20, hsv⟩)ht:target = callerPrefix d ++ [1, 1, 1, 0, 1]⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨20, hsv⟩)) bank) = some (Physical.rootCfg pad target bank)
subst target «20» d:ℕpad:ℕbank:List ℕsv:ℕhsv:20 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨20, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨20, hsv⟩) = some (localTerminal ⟨20, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 1, 0, 1], regs := bank }.stack).reverse =
trueh:Control.rawInstr (ControlWord.local d ⟨20, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨20, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 1, 0, 1], regs := bank }⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨20, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1, 1, 0, 1]) bank)
have hsuf : suffix ⟨20, hsv⟩ = [1, 1, 1, 0, 1, 1, 1] :=
(by d:ℕpad:ℕbank:List ℕsv:ℕhsv:20 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨20, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨20, hsv⟩) = some (localTerminal ⟨20, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 1, 0, 1], regs := bank }.stack).reverse =
trueh:Control.rawInstr (ControlWord.local d ⟨20, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨20, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 1, 0, 1], regs := bank }⊢ suffix 20 = [1, 1, 1, 0, 1, 1, 1] decide +kernel All goals completed! 🐙 : suffix 20 = [1, 1, 1, 0, 1, 1, 1]) «20» d:ℕpad:ℕbank:List ℕsv:ℕhsv:20 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨20, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨20, hsv⟩) = some (localTerminal ⟨20, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 1, 0, 1], regs := bank }.stack).reverse =
trueh:Control.rawInstr (ControlWord.local d ⟨20, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨20, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 1, 0, 1], regs := bank }hsuf:suffix ⟨20, hsv⟩ = [1, 1, 1, 0, 1, 1, 1]⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨20, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1, 1, 0, 1]) bank)
have hw : localWalkSuffix ⟨20, hsv⟩ = [1, 1, 1, 0, 1, 1] :=
(by d:ℕpad:ℕbank:List ℕsv:ℕhsv:20 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨20, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨20, hsv⟩) = some (localTerminal ⟨20, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 1, 0, 1], regs := bank }.stack).reverse =
trueh:Control.rawInstr (ControlWord.local d ⟨20, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨20, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 1, 0, 1], regs := bank }hsuf:suffix ⟨20, hsv⟩ = [1, 1, 1, 0, 1, 1, 1]⊢ localWalkSuffix 20 = [1, 1, 1, 0, 1, 1] decide +kernel All goals completed! 🐙 : localWalkSuffix 20 = [1, 1, 1, 0, 1, 1]) «20» d:ℕpad:ℕbank:List ℕsv:ℕhsv:20 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨20, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨20, hsv⟩) = some (localTerminal ⟨20, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 1, 0, 1], regs := bank }.stack).reverse =
trueh:Control.rawInstr (ControlWord.local d ⟨20, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨20, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 1, 0, 1], regs := bank }hsuf:suffix ⟨20, hsv⟩ = [1, 1, 1, 0, 1, 1, 1]hw:localWalkSuffix ⟨20, hsv⟩ = [1, 1, 1, 0, 1, 1]⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨20, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1, 1, 0, 1]) bank)
have hq : localTerminal ⟨20, hsv⟩ = 19 :=
(by d:ℕpad:ℕbank:List ℕsv:ℕhsv:20 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨20, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨20, hsv⟩) = some (localTerminal ⟨20, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 1, 0, 1], regs := bank }.stack).reverse =
trueh:Control.rawInstr (ControlWord.local d ⟨20, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨20, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 1, 0, 1], regs := bank }hsuf:suffix ⟨20, hsv⟩ = [1, 1, 1, 0, 1, 1, 1]hw:localWalkSuffix ⟨20, hsv⟩ = [1, 1, 1, 0, 1, 1]⊢ localTerminal 20 = 19 decide +kernel All goals completed! 🐙 : localTerminal 20 = 19) «20» d:ℕpad:ℕbank:List ℕsv:ℕhsv:20 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨20, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨20, hsv⟩) = some (localTerminal ⟨20, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 1, 0, 1], regs := bank }.stack).reverse =
trueh:Control.rawInstr (ControlWord.local d ⟨20, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨20, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 1, 0, 1], regs := bank }hsuf:suffix ⟨20, hsv⟩ = [1, 1, 1, 0, 1, 1, 1]hw:localWalkSuffix ⟨20, hsv⟩ = [1, 1, 1, 0, 1, 1]hq:localTerminal ⟨20, hsv⟩ = 19⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨20, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1, 1, 0, 1]) bank)
have hp' : walkInternal 15 ((callerPrefix d ++ [1, 1, 1, 0]) ++ [1, 1]) = some 19 := by d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
simpa only [localWalk, hw, hq, List.append_assoc, List.cons_append,
List.nil_append] using hp «20» d:ℕpad:ℕbank:List ℕsv:ℕhsv:20 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨20, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨20, hsv⟩) = some (localTerminal ⟨20, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 1, 0, 1], regs := bank }.stack).reverse =
trueh:Control.rawInstr (ControlWord.local d ⟨20, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨20, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 1, 0, 1], regs := bank }hsuf:suffix ⟨20, hsv⟩ = [1, 1, 1, 0, 1, 1, 1]hw:localWalkSuffix ⟨20, hsv⟩ = [1, 1, 1, 0, 1, 1]hq:localTerminal ⟨20, hsv⟩ = 19hp':walkInternal 15 (callerPrefix d ++ [1, 1, 1, 0] ++ [1, 1]) = some 19⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨20, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1, 1, 0, 1]) bank)
have hg' :
Riemann104.OnePassGuard.NoThreeZeros
(1 :: ((callerPrefix d ++ [1, 1, 1, 0]) ++ [1])).reverse = true := by d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
simpa only [List.append_assoc, List.cons_append, List.nil_append] using hg «20» d:ℕpad:ℕbank:List ℕsv:ℕhsv:20 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨20, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨20, hsv⟩) = some (localTerminal ⟨20, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 1, 0, 1], regs := bank }.stack).reverse =
trueh:Control.rawInstr (ControlWord.local d ⟨20, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨20, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 1, 0, 1], regs := bank }hsuf:suffix ⟨20, hsv⟩ = [1, 1, 1, 0, 1, 1, 1]hw:localWalkSuffix ⟨20, hsv⟩ = [1, 1, 1, 0, 1, 1]hq:localTerminal ⟨20, hsv⟩ = 19hp':walkInternal 15 (callerPrefix d ++ [1, 1, 1, 0] ++ [1, 1]) = some 19hg':Riemann104.OnePassGuard.NoThreeZeros (1 :: (callerPrefix d ++ [1, 1, 1, 0] ++ [1])).reverse = true⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨20, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1, 1, 0, 1]) bank)
have hpad' : ((callerPrefix d ++ [1, 1, 1, 0]) ++ [1, 1]).length + 3 ≤ pad := by d:ℕs:Fin 22target:Wordh:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ padbank:List ℕ⊢ ∃ n ≥ 1, nSteps n (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank)
simpa only [Control.walked, localWalk, hw, List.append_assoc,
List.cons_append, List.nil_append] using hpad «20» d:ℕpad:ℕbank:List ℕsv:ℕhsv:20 < 22hpad:List.length (Control.walked (ControlWord.local d ⟨20, hsv⟩)) + 3 ≤ padhp:walkInternal 15 (localWalk d ⟨20, hsv⟩) = some (localTerminal ⟨20, hsv⟩)hg:Riemann104.OnePassGuard.NoThreeZeros (1 :: { stack := callerPrefix d ++ [1, 1, 1, 0, 1], regs := bank }.stack).reverse =
trueh:Control.rawInstr (ControlWord.local d ⟨20, hsv⟩) = Riemann120.Layer2.RhInstr.jump (callerPrefix d ++ [1, 1, 1, 0, 1])hnext:Control.applyInstr (Control.rawInstr (ControlWord.local d ⟨20, hsv⟩)) bank =
some { stack := callerPrefix d ++ [1, 1, 1, 0, 1], regs := bank }hsuf:suffix ⟨20, hsv⟩ = [1, 1, 1, 0, 1, 1, 1]hw:localWalkSuffix ⟨20, hsv⟩ = [1, 1, 1, 0, 1, 1]hq:localTerminal ⟨20, hsv⟩ = 19hp':walkInternal 15 (callerPrefix d ++ [1, 1, 1, 0] ++ [1, 1]) = some 19hg':Riemann104.OnePassGuard.NoThreeZeros (1 :: (callerPrefix d ++ [1, 1, 1, 0] ++ [1])).reverse = truehpad':List.length (callerPrefix d ++ [1, 1, 1, 0] ++ [1, 1]) + 3 ≤ pad⊢ ∃ n ≥ 1,
nSteps n (Physical.rootCfg pad (word (ControlWord.local d ⟨20, hsv⟩)) bank) =
some (Physical.rootCfg pad (callerPrefix d ++ [1, 1, 1, 0, 1]) bank)
simpa only [word, hsuf, List.append_assoc, List.cons_append, List.nil_append] using
root19 (callerPrefix d ++ [1, 1, 1, 0]) pad bank hp' hg' hpad' All goals completed! 🐙theorem root_jump (c : ControlWord) (target : Word)
(h : Control.rawInstr c = .jump target) (pad : Nat)
(hpad : (Control.walked c).length + 3 ≤ pad) (bank : List Nat) :
∃ s ≥ 1, nSteps s (Physical.rootCfg pad (word c) bank) =
some (Physical.rootCfg pad target bank) := by c:ControlWordtarget:Wordh:Control.rawInstr c = Riemann120.Layer2.RhInstr.jump targetpad:ℕhpad:List.length (Control.walked c) + 3 ≤ padbank:List ℕ⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad (word c) bank) = some (Physical.rootCfg pad target bank)
cases c with
| outside i => outside target:Wordpad:ℕbank:List ℕi:Fin 97h:Control.rawInstr (ControlWord.outside i) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.outside i)) + 3 ≤ pad⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad (word (ControlWord.outside i)) bank) = some (Physical.rootCfg pad target bank) exact root_outside i target h pad hpad bank All goals completed! 🐙
| entry d => entry target:Wordpad:ℕbank:List ℕd:ℕh:Control.rawInstr (ControlWord.entry d) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.entry d)) + 3 ≤ pad⊢ ∃ s ≥ 1, nSteps s (Physical.rootCfg pad (word (ControlWord.entry d)) bank) = some (Physical.rootCfg pad target bank) simp [Control.rawInstr, Control.effect] at h All goals completed! 🐙
| local d s => local target:Wordpad:ℕbank:List ℕd:ℕs:Fin 22h:Control.rawInstr (ControlWord.local d s) = Riemann120.Layer2.RhInstr.jump targethpad:List.length (Control.walked (ControlWord.local d s)) + 3 ≤ pad⊢ ∃ s_1 ≥ 1,
nSteps s_1 (Physical.rootCfg pad (word (ControlWord.local d s)) bank) = some (Physical.rootCfg pad target bank) exact root_local d s target h pad hpad bank All goals completed! 🐙end ConjectureMachines.Riemann95.RootJumpend