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.PaddingRaw95
public import Cryptids.ReductionSupport.Riemann95.Physical95@[expose] public sectionnamespace ConjectureMachines.Riemann95Auxiliary.Physicalopen Turing ConjectureMachinesopen ConjectureMachines.Riemann120 ConjectureMachines.Riemann120.Layer2open ConjectureMachines.Semantics.Riemann.Layer1 (regsTape)theorem fenceReturn_exact (k : Fin 2) (walked : List (Fin 2)) (fill : Nat)
(hfill : 3 ≤ fill) (hk : k.val ≤ walked.count 0)
(hguard : Riemann104.OnePassGuard.NoThreeZeros
(1 :: (popBreakRev k.val walked.reverse).reverse).reverse = true) (bank : List Nat) :
∃ s ≥ 1, nSteps s
⟨(if k = 0 then 9 else 63), Tape.mk'
(ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank))⟩ =
some (rawRoot98 (PhysicalRaw.exactPad k walked fill)
(popBreakRev k.val walked.reverse).reverse bank) := k:Fin 2walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:↑k ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev (↑k) walked.reverse).reverse).reverse = truebank:List ℕ⊢ ∃ s ≥ 1,
nSteps s
{ state := if k = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) } =
some (rawRoot98 (PhysicalRaw.exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank)
k:Fin 2walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:↑k ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev (↑k) walked.reverse).reverse).reverse = truebank:List ℕs:ℕhs:s ≥ 1h:Raw.nSteps s
{ state := if k = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) } =
some (PhysicalRaw.rawRoot98 (PhysicalRaw.exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank)⊢ ∃ s ≥ 1,
nSteps s
{ state := if k = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) } =
some (rawRoot98 (PhysicalRaw.exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank)
k:Fin 2walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:↑k ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev (↑k) walked.reverse).reverse).reverse = truebank:List ℕs:ℕhs:s ≥ 1h:Raw.nSteps s
{ state := if k = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) } =
some (PhysicalRaw.rawRoot98 (PhysicalRaw.exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank)ht:nSteps s
(Renaming.renameCfg
{ state := if k = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) }) =
some
(Renaming.renameCfg
(PhysicalRaw.rawRoot98 (PhysicalRaw.exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank))⊢ ∃ s ≥ 1,
nSteps s
{ state := if k = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) } =
some (rawRoot98 (PhysicalRaw.exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank)
k:Fin 2walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:↑k ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev (↑k) walked.reverse).reverse).reverse = truebank:List ℕs:ℕhs:s ≥ 1h:Raw.nSteps s
{ state := if k = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) } =
some (PhysicalRaw.rawRoot98 (PhysicalRaw.exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank)ht:nSteps s
(Renaming.renameCfg
{ state := if k = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) }) =
some (rawRoot98 (PhysicalRaw.exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank)⊢ ∃ s ≥ 1,
nSteps s
{ state := if k = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) } =
some (rawRoot98 (PhysicalRaw.exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank)
refine ⟨s, hs, ?_⟩ k:Fin 2walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:↑k ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev (↑k) walked.reverse).reverse).reverse = truebank:List ℕs:ℕhs:s ≥ 1h:Raw.nSteps s
{ state := if k = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) } =
some (PhysicalRaw.rawRoot98 (PhysicalRaw.exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank)ht:nSteps s
(Renaming.renameCfg
{ state := if k = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) }) =
some (rawRoot98 (PhysicalRaw.exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank)⊢ nSteps s
{ state := if k = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) } =
some (rawRoot98 (PhysicalRaw.exactPad k walked fill) (popBreakRev (↑k) walked.reverse).reverse bank)
simpa only [Renaming.renameCfg, swap_fence] using ht All goals completed! 🐙end ConjectureMachines.Riemann95Auxiliary.Physicalnamespace ConjectureMachines.Riemann95.Physicalopen Turing ConjectureMachinesopen ConjectureMachines.Riemann120 ConjectureMachines.Riemann120.Layer2open ConjectureMachines.Semantics.Riemann.Layer1 (regsTape)abbrev exactPad := Riemann95Auxiliary.PhysicalRaw.exactPadtheorem exactPad_ge (k : Fin 2) (walked : List (Fin 2)) (fill : Nat) :
walked.length + fill ≤ exactPad k walked fill := by k:Fin 2walked:List (Fin 2)fill:ℕ⊢ walked.length + fill ≤ exactPad k walked fill
unfold exactPad Riemann95Auxiliary.PhysicalRaw.exactPad k:Fin 2walked:List (Fin 2)fill:ℕ⊢ walked.length + fill ≤ walked.length + fill + if ↑k < List.count 0 walked then 0 else 1
omega All goals completed! 🐙theorem exactPad_of_eq (k : Fin 2) (walked : List (Fin 2)) (fill : Nat)
(h : k.val = walked.count 0) : exactPad k walked fill = walked.length + fill + 1 := by k:Fin 2walked:List (Fin 2)fill:ℕh:↑k = List.count 0 walked⊢ exactPad k walked fill = walked.length + fill + 1
simp only [exactPad, Riemann95Auxiliary.PhysicalRaw.exactPad, h, lt_self_iff_false,
ite_false] All goals completed! 🐙A genuine caller zero remains precisely when the root marker is not exhausted.
theorem popBreakRev_ne_nil (j : Nat) (rev : List (Fin 2)) (h : j < rev.count 0) :
popBreakRev j rev ≠ [] := by j:ℕrev:List (Fin 2)h:j < List.count 0 rev⊢ popBreakRev j rev ≠ []
induction rev generalizing j with
| nil => nil j:ℕh:j < List.count 0 []⊢ popBreakRev j [] ≠ [] simp only [List.count_nil] at h nil j:ℕh:j < 0⊢ popBreakRev j [] ≠ []; omega All goals completed! 🐙
| cons b xs ih => cons b:Fin 2xs:List (Fin 2)ih:∀ j < List.count 0 xs, popBreakRev j xs ≠ []j:ℕh:j < List.count 0 (b :: xs)⊢ popBreakRev j (b :: xs) ≠ []
rcases Semantics.Riemann.Layer1.fin2_cases b with rfl | rfl cons.inl xs:List (Fin 2)ih:∀ j < List.count 0 xs, popBreakRev j xs ≠ []j:ℕh:j < List.count 0 (0 :: xs)⊢ popBreakRev j (0 :: xs) ≠ []cons.inr xs:List (Fin 2)ih:∀ j < List.count 0 xs, popBreakRev j xs ≠ []j:ℕh:j < List.count 0 (1 :: xs)⊢ popBreakRev j (1 :: xs) ≠ []
· cons.inl xs:List (Fin 2)ih:∀ j < List.count 0 xs, popBreakRev j xs ≠ []j:ℕh:j < List.count 0 (0 :: xs)⊢ popBreakRev j (0 :: xs) ≠ [] cases j with
| zero => cons.inl.zero xs:List (Fin 2)ih:∀ j < List.count 0 xs, popBreakRev j xs ≠ []h:0 < List.count 0 (0 :: xs)⊢ popBreakRev 0 (0 :: xs) ≠ []
change (1 :: xs : List (Fin 2)) ≠ [] cons.inl.zero xs:List (Fin 2)ih:∀ j < List.count 0 xs, popBreakRev j xs ≠ []h:0 < List.count 0 (0 :: xs)⊢ 1 :: xs ≠ []
intro hnil cons.inl.zero xs:List (Fin 2)ih:∀ j < List.count 0 xs, popBreakRev j xs ≠ []h:0 < List.count 0 (0 :: xs)hnil:1 :: xs = []⊢ False
cases hnil All goals completed! 🐙
| succ j => cons.inl.succ xs:List (Fin 2)ih:∀ j < List.count 0 xs, popBreakRev j xs ≠ []j:ℕh:j + 1 < List.count 0 (0 :: xs)⊢ popBreakRev (j + 1) (0 :: xs) ≠ []
have hj : j < xs.count 0 := by j:ℕrev:List (Fin 2)h:j < List.count 0 rev⊢ popBreakRev j rev ≠ [] simp only [List.count_cons_self] at h xs:List (Fin 2)ih:∀ j < List.count 0 xs, popBreakRev j xs ≠ []j:ℕh:j + 1 < List.count 0 xs + 1⊢ j < List.count 0 xs; omega cons.inl.succ xs:List (Fin 2)ih:∀ j < List.count 0 xs, popBreakRev j xs ≠ []j:ℕh:j + 1 < List.count 0 (0 :: xs)hj:j < List.count 0 xs⊢ popBreakRev (j + 1) (0 :: xs) ≠ []
simpa only [popBreakRev, beq_self_eq_true, ↓reduceIte] using ih j hj All goals completed! 🐙
· cons.inr xs:List (Fin 2)ih:∀ j < List.count 0 xs, popBreakRev j xs ≠ []j:ℕh:j < List.count 0 (1 :: xs)⊢ popBreakRev j (1 :: xs) ≠ [] have hj : j < xs.count 0 := by j:ℕrev:List (Fin 2)h:j < List.count 0 rev⊢ popBreakRev j rev ≠ []
simpa only [List.count_cons, show ((1 : Fin 2) == 0) = false from rfl,
Bool.false_eq_true, ite_false, Nat.add_zero] using h cons.inr xs:List (Fin 2)ih:∀ j < List.count 0 xs, popBreakRev j xs ≠ []j:ℕh:j < List.count 0 (1 :: xs)hj:j < List.count 0 xs⊢ popBreakRev j (1 :: xs) ≠ []
have hp : popBreakRev j (1 :: xs) = popBreakRev j xs := by j:ℕrev:List (Fin 2)h:j < List.count 0 rev⊢ popBreakRev j rev ≠ [] cases j zero xs:List (Fin 2)ih:∀ j < List.count 0 xs, popBreakRev j xs ≠ []h:0 < List.count 0 (1 :: xs)hj:0 < List.count 0 xs⊢ popBreakRev 0 (1 :: xs) = popBreakRev 0 xssucc xs:List (Fin 2)ih:∀ j < List.count 0 xs, popBreakRev j xs ≠ []n✝:ℕh:n✝ + 1 < List.count 0 (1 :: xs)hj:n✝ + 1 < List.count 0 xs⊢ popBreakRev (n✝ + 1) (1 :: xs) = popBreakRev (n✝ + 1) xs <;> zero xs:List (Fin 2)ih:∀ j < List.count 0 xs, popBreakRev j xs ≠ []h:0 < List.count 0 (1 :: xs)hj:0 < List.count 0 xs⊢ popBreakRev 0 (1 :: xs) = popBreakRev 0 xssucc xs:List (Fin 2)ih:∀ j < List.count 0 xs, popBreakRev j xs ≠ []n✝:ℕh:n✝ + 1 < List.count 0 (1 :: xs)hj:n✝ + 1 < List.count 0 xs⊢ popBreakRev (n✝ + 1) (1 :: xs) = popBreakRev (n✝ + 1) xs rfl cons.inr xs:List (Fin 2)ih:∀ j < List.count 0 xs, popBreakRev j xs ≠ []j:ℕh:j < List.count 0 (1 :: xs)hj:j < List.count 0 xshp:popBreakRev j (1 :: xs) = popBreakRev j xs⊢ popBreakRev j (1 :: xs) ≠ []
rw [hp cons.inr xs:List (Fin 2)ih:∀ j < List.count 0 xs, popBreakRev j xs ≠ []j:ℕh:j < List.count 0 (1 :: xs)hj:j < List.count 0 xshp:popBreakRev j (1 :: xs) = popBreakRev j xs⊢ popBreakRev j xs ≠ []] cons.inr xs:List (Fin 2)ih:∀ j < List.count 0 xs, popBreakRev j xs ≠ []j:ℕh:j < List.count 0 (1 :: xs)hj:j < List.count 0 xshp:popBreakRev j (1 :: xs) = popBreakRev j xs⊢ popBreakRev j xs ≠ []
exact ih j hj All goals completed! 🐙theorem exactPad_of_return_empty (k : Fin 2) (walked : List (Fin 2)) (fill : Nat)
(hk : k.val ≤ walked.count 0)
(he : (popBreakRev k.val walked.reverse).reverse = []) :
exactPad k walked fill = walked.length + fill + 1 := by k:Fin 2walked:List (Fin 2)fill:ℕhk:↑k ≤ List.count 0 walkedhe:(popBreakRev (↑k) walked.reverse).reverse = []⊢ exactPad k walked fill = walked.length + fill + 1
have hp : popBreakRev k.val walked.reverse = [] := by
have h := congrArg List.reverse he k:Fin 2walked:List (Fin 2)fill:ℕhk:↑k ≤ List.count 0 walkedhe:(popBreakRev (↑k) walked.reverse).reverse = []h:(popBreakRev (↑k) walked.reverse).reverse.reverse = [].reverse⊢ popBreakRev (↑k) walked.reverse = []
simpa only [List.reverse_reverse, List.reverse_nil] using h k:Fin 2walked:List (Fin 2)fill:ℕhk:↑k ≤ List.count 0 walkedhe:(popBreakRev (↑k) walked.reverse).reverse = []hp:popBreakRev (↑k) walked.reverse = []⊢ exactPad k walked fill = walked.length + fill + 1
have hnot : ¬ k.val < walked.count 0 := by
intro h k:Fin 2walked:List (Fin 2)fill:ℕhk:↑k ≤ List.count 0 walkedhe:(popBreakRev (↑k) walked.reverse).reverse = []hp:popBreakRev (↑k) walked.reverse = []h:↑k < List.count 0 walked⊢ False
exact popBreakRev_ne_nil k.val walked.reverse (by k:Fin 2walked:List (Fin 2)fill:ℕhk:↑k ≤ List.count 0 walkedhe:(popBreakRev (↑k) walked.reverse).reverse = []hp:popBreakRev (↑k) walked.reverse = []h:↑k < List.count 0 walked⊢ ↑k < List.count 0 walked.reverse simpa only [List.count_reverse] using h All goals completed! 🐙) hp k:Fin 2walked:List (Fin 2)fill:ℕhk:↑k ≤ List.count 0 walkedhe:(popBreakRev (↑k) walked.reverse).reverse = []hp:popBreakRev (↑k) walked.reverse = []hnot:¬↑k < List.count 0 walked⊢ exactPad k walked fill = walked.length + fill + 1
exact exactPad_of_eq k walked fill (by k:Fin 2walked:List (Fin 2)fill:ℕhk:↑k ≤ List.count 0 walkedhe:(popBreakRev (↑k) walked.reverse).reverse = []hp:popBreakRev (↑k) walked.reverse = []hnot:¬↑k < List.count 0 walked⊢ ↑k = List.count 0 walked omega All goals completed! 🐙)theorem macro_inc_exact (r : Fin 5) (bank : List Nat) (hr : r.val < bank.length)
(walked : List (Fin 2)) (fill : Nat) (hfill : 3 ≤ fill)
(hguard : Riemann104.OnePassGuard.NoThreeZeros
(1 :: (popBreakRev 0 walked.reverse).reverse).reverse = true) :
∃ s ≥ 1, nSteps s
⟨incLeaf r, Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank)))⟩ =
some (rootCfg (exactPad 0 walked fill) (popBreakRev 0 walked.reverse).reverse
(bank.set r.val (bank.getD r.val 0 + 1))) := by r:Fin 5bank:List ℕhr:↑r < bank.lengthwalked:List (Fin 2)fill:ℕhfill:3 ≤ fillhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 0 walked.reverse).reverse).reverse = true⊢ ∃ s ≥ 1,
nSteps s
{ state := incLeaf r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(rootCfg (exactPad 0 walked fill) (popBreakRev 0 walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 + 1)))
have hf := Riemann95Auxiliary.Physical.leaf98_fill r true fill (stackLeftOf true walked)
(ListBlank.append [1, 0] (regsTape bank)) r:Fin 5bank:List ℕhr:↑r < bank.lengthwalked:List (Fin 2)fill:ℕhfill:3 ≤ fillhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 0 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{ state := if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{ state := if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }⊢ ∃ s ≥ 1,
nSteps s
{ state := incLeaf r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(rootCfg (exactPad 0 walked fill) (popBreakRev 0 walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 + 1)))
obtain ⟨su, hsu, hu⟩ := Riemann95Auxiliary.Physical.unary98_inc r bank hr
(ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) r:Fin 5bank:List ℕhr:↑r < bank.lengthwalked:List (Fin 2)fill:ℕhfill:3 ≤ fillhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 0 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{ state := if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{ state := if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }su:ℕhsu:su ≥ 1hu:Riemann95Auxiliary.nSteps su
{ state := Riemann95Auxiliary.Physical.incLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) } =
some
{ state := 9,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 + 1)))) }⊢ ∃ s ≥ 1,
nSteps s
{ state := incLeaf r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(rootCfg (exactPad 0 walked fill) (popBreakRev 0 walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 + 1)))
obtain ⟨sf, hsf, hret⟩ := Riemann95Auxiliary.Physical.fenceReturn_exact
0 walked fill hfill (by r:Fin 5bank:List ℕhr:↑r < bank.lengthwalked:List (Fin 2)fill:ℕhfill:3 ≤ fillhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 0 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{ state := if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{ state := if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }su:ℕhsu:su ≥ 1hu:Riemann95Auxiliary.nSteps su
{ state := Riemann95Auxiliary.Physical.incLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) } =
some
{ state := 9,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 + 1)))) }⊢ ↑0 ≤ List.count 0 walked simp All goals completed! 🐙) hguard (bank.set r.val (bank.getD r.val 0 + 1)) r:Fin 5bank:List ℕhr:↑r < bank.lengthwalked:List (Fin 2)fill:ℕhfill:3 ≤ fillhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 0 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{ state := if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{ state := if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }su:ℕhsu:su ≥ 1hu:Riemann95Auxiliary.nSteps su
{ state := Riemann95Auxiliary.Physical.incLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) } =
some
{ state := 9,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 + 1)))) }sf:ℕhsf:sf ≥ 1hret:Riemann95Auxiliary.nSteps sf
{ state := if 0 = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 + 1)))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill)
(popBreakRev (↑0) walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 + 1)))⊢ ∃ s ≥ 1,
nSteps s
{ state := incLeaf r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(rootCfg (exactPad 0 walked fill) (popBreakRev 0 walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 + 1)))
have h := Riemann95Auxiliary.Return.nSteps_bind_eq
(Riemann95Auxiliary.Return.nSteps_bind_eq hf hu) hret r:Fin 5bank:List ℕhr:↑r < bank.lengthwalked:List (Fin 2)fill:ℕhfill:3 ≤ fillhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 0 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{ state := if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{ state := if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }su:ℕhsu:su ≥ 1hu:Riemann95Auxiliary.nSteps su
{ state := Riemann95Auxiliary.Physical.incLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) } =
some
{ state := 9,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 + 1)))) }sf:ℕhsf:sf ≥ 1hret:Riemann95Auxiliary.nSteps sf
{ state := if 0 = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 + 1)))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill)
(popBreakRev (↑0) walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 + 1)))h:Riemann95Auxiliary.nSteps (fill + su + sf)
{ state := if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill)
(popBreakRev (↑0) walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 + 1)))⊢ ∃ s ≥ 1,
nSteps s
{ state := incLeaf r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(rootCfg (exactPad 0 walked fill) (popBreakRev 0 walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 + 1)))
have ht := Projection.of_aux h r:Fin 5bank:List ℕhr:↑r < bank.lengthwalked:List (Fin 2)fill:ℕhfill:3 ≤ fillhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 0 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{ state := if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{ state := if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }su:ℕhsu:su ≥ 1hu:Riemann95Auxiliary.nSteps su
{ state := Riemann95Auxiliary.Physical.incLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) } =
some
{ state := 9,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 + 1)))) }sf:ℕhsf:sf ≥ 1hret:Riemann95Auxiliary.nSteps sf
{ state := if 0 = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 + 1)))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill)
(popBreakRev (↑0) walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 + 1)))h:Riemann95Auxiliary.nSteps (fill + su + sf)
{ state := if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill)
(popBreakRev (↑0) walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 + 1)))ht:nSteps (fill + su + sf)
(Projection.cfgMap
{
state :=
if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) }) =
some
(Projection.cfgMap
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill)
(popBreakRev (↑0) walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 + 1))))⊢ ∃ s ≥ 1,
nSteps s
{ state := incLeaf r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(rootCfg (exactPad 0 walked fill) (popBreakRev 0 walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 + 1)))
rw [cfgMap_root r:Fin 5bank:List ℕhr:↑r < bank.lengthwalked:List (Fin 2)fill:ℕhfill:3 ≤ fillhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 0 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{ state := if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{ state := if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }su:ℕhsu:su ≥ 1hu:Riemann95Auxiliary.nSteps su
{ state := Riemann95Auxiliary.Physical.incLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) } =
some
{ state := 9,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 + 1)))) }sf:ℕhsf:sf ≥ 1hret:Riemann95Auxiliary.nSteps sf
{ state := if 0 = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 + 1)))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill)
(popBreakRev (↑0) walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 + 1)))h:Riemann95Auxiliary.nSteps (fill + su + sf)
{ state := if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill)
(popBreakRev (↑0) walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 + 1)))ht:nSteps (fill + su + sf)
(Projection.cfgMap
{
state :=
if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) }) =
some
(rootCfg (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill) (popBreakRev (↑0) walked.reverse).reverse
(bank.set (↑r) (bank.getD (↑r) 0 + 1)))⊢ ∃ s ≥ 1,
nSteps s
{ state := incLeaf r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(rootCfg (exactPad 0 walked fill) (popBreakRev 0 walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 + 1)))] at ht r:Fin 5bank:List ℕhr:↑r < bank.lengthwalked:List (Fin 2)fill:ℕhfill:3 ≤ fillhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 0 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{ state := if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{ state := if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }su:ℕhsu:su ≥ 1hu:Riemann95Auxiliary.nSteps su
{ state := Riemann95Auxiliary.Physical.incLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) } =
some
{ state := 9,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 + 1)))) }sf:ℕhsf:sf ≥ 1hret:Riemann95Auxiliary.nSteps sf
{ state := if 0 = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 + 1)))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill)
(popBreakRev (↑0) walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 + 1)))h:Riemann95Auxiliary.nSteps (fill + su + sf)
{ state := if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill)
(popBreakRev (↑0) walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 + 1)))ht:nSteps (fill + su + sf)
(Projection.cfgMap
{
state :=
if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) }) =
some
(rootCfg (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill) (popBreakRev (↑0) walked.reverse).reverse
(bank.set (↑r) (bank.getD (↑r) 0 + 1)))⊢ ∃ s ≥ 1,
nSteps s
{ state := incLeaf r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(rootCfg (exactPad 0 walked fill) (popBreakRev 0 walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 + 1)))
exact ⟨fill + su + sf, by r:Fin 5bank:List ℕhr:↑r < bank.lengthwalked:List (Fin 2)fill:ℕhfill:3 ≤ fillhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 0 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{ state := if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{ state := if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }su:ℕhsu:su ≥ 1hu:Riemann95Auxiliary.nSteps su
{ state := Riemann95Auxiliary.Physical.incLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) } =
some
{ state := 9,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 + 1)))) }sf:ℕhsf:sf ≥ 1hret:Riemann95Auxiliary.nSteps sf
{ state := if 0 = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 + 1)))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill)
(popBreakRev (↑0) walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 + 1)))h:Riemann95Auxiliary.nSteps (fill + su + sf)
{ state := if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill)
(popBreakRev (↑0) walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 + 1)))ht:nSteps (fill + su + sf)
(Projection.cfgMap
{
state :=
if true = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) }) =
some
(rootCfg (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill) (popBreakRev (↑0) walked.reverse).reverse
(bank.set (↑r) (bank.getD (↑r) 0 + 1)))⊢ fill + su + sf ≥ 1 omega All goals completed! 🐙, ht⟩theorem macro_dec_pos_exact (r : Fin 5) (bank : List Nat) (hr : r.val < bank.length)
(hpos : 0 < bank.getD r.val 0) (walked : List (Fin 2)) (fill : Nat) (hfill : 3 ≤ fill)
(hguard : Riemann104.OnePassGuard.NoThreeZeros
(1 :: (popBreakRev 0 walked.reverse).reverse).reverse = true) :
∃ s ≥ 1, nSteps s
⟨decLeaf r, Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank)))⟩ =
some (rootCfg (exactPad 0 walked fill) (popBreakRev 0 walked.reverse).reverse
(bank.set r.val (bank.getD r.val 0 - 1) ++ [0])) := by r:Fin 5bank:List ℕhr:↑r < bank.lengthhpos:0 < bank.getD (↑r) 0walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 0 walked.reverse).reverse).reverse = true⊢ ∃ s ≥ 1,
nSteps s
{ state := decLeaf r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(rootCfg (exactPad 0 walked fill) (popBreakRev 0 walked.reverse).reverse
(bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))
have hf := Riemann95Auxiliary.Physical.leaf98_fill r false fill (stackLeftOf true walked)
(ListBlank.append [1, 0] (regsTape bank)) r:Fin 5bank:List ℕhr:↑r < bank.lengthhpos:0 < bank.getD (↑r) 0walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 0 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }⊢ ∃ s ≥ 1,
nSteps s
{ state := decLeaf r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(rootCfg (exactPad 0 walked fill) (popBreakRev 0 walked.reverse).reverse
(bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))
obtain ⟨su, hsu, hu⟩ := Riemann95Auxiliary.Physical.unary98_dec_pos r bank hr hpos
(ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) r:Fin 5bank:List ℕhr:↑r < bank.lengthhpos:0 < bank.getD (↑r) 0walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 0 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }su:ℕhsu:su ≥ 1hu:Riemann95Auxiliary.nSteps su
{ state := Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) } =
some
{ state := 9,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))) }⊢ ∃ s ≥ 1,
nSteps s
{ state := decLeaf r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(rootCfg (exactPad 0 walked fill) (popBreakRev 0 walked.reverse).reverse
(bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))
obtain ⟨sf, hsf, hret⟩ := Riemann95Auxiliary.Physical.fenceReturn_exact
0 walked fill hfill (by r:Fin 5bank:List ℕhr:↑r < bank.lengthhpos:0 < bank.getD (↑r) 0walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 0 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }su:ℕhsu:su ≥ 1hu:Riemann95Auxiliary.nSteps su
{ state := Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) } =
some
{ state := 9,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))) }⊢ ↑0 ≤ List.count 0 walked simp All goals completed! 🐙) hguard (bank.set r.val (bank.getD r.val 0 - 1) ++ [0]) r:Fin 5bank:List ℕhr:↑r < bank.lengthhpos:0 < bank.getD (↑r) 0walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 0 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }su:ℕhsu:su ≥ 1hu:Riemann95Auxiliary.nSteps su
{ state := Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) } =
some
{ state := 9,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))) }sf:ℕhsf:sf ≥ 1hret:Riemann95Auxiliary.nSteps sf
{ state := if 0 = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill)
(popBreakRev (↑0) walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))⊢ ∃ s ≥ 1,
nSteps s
{ state := decLeaf r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(rootCfg (exactPad 0 walked fill) (popBreakRev 0 walked.reverse).reverse
(bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))
have h := Riemann95Auxiliary.Return.nSteps_bind_eq
(Riemann95Auxiliary.Return.nSteps_bind_eq hf hu) hret r:Fin 5bank:List ℕhr:↑r < bank.lengthhpos:0 < bank.getD (↑r) 0walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 0 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }su:ℕhsu:su ≥ 1hu:Riemann95Auxiliary.nSteps su
{ state := Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) } =
some
{ state := 9,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))) }sf:ℕhsf:sf ≥ 1hret:Riemann95Auxiliary.nSteps sf
{ state := if 0 = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill)
(popBreakRev (↑0) walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))h:Riemann95Auxiliary.nSteps (fill + su + sf)
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill)
(popBreakRev (↑0) walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))⊢ ∃ s ≥ 1,
nSteps s
{ state := decLeaf r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(rootCfg (exactPad 0 walked fill) (popBreakRev 0 walked.reverse).reverse
(bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))
have ht := Projection.of_aux h r:Fin 5bank:List ℕhr:↑r < bank.lengthhpos:0 < bank.getD (↑r) 0walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 0 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }su:ℕhsu:su ≥ 1hu:Riemann95Auxiliary.nSteps su
{ state := Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) } =
some
{ state := 9,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))) }sf:ℕhsf:sf ≥ 1hret:Riemann95Auxiliary.nSteps sf
{ state := if 0 = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill)
(popBreakRev (↑0) walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))h:Riemann95Auxiliary.nSteps (fill + su + sf)
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill)
(popBreakRev (↑0) walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))ht:nSteps (fill + su + sf)
(Projection.cfgMap
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) }) =
some
(Projection.cfgMap
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill)
(popBreakRev (↑0) walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0])))⊢ ∃ s ≥ 1,
nSteps s
{ state := decLeaf r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(rootCfg (exactPad 0 walked fill) (popBreakRev 0 walked.reverse).reverse
(bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))
rw [cfgMap_root r:Fin 5bank:List ℕhr:↑r < bank.lengthhpos:0 < bank.getD (↑r) 0walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 0 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }su:ℕhsu:su ≥ 1hu:Riemann95Auxiliary.nSteps su
{ state := Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) } =
some
{ state := 9,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))) }sf:ℕhsf:sf ≥ 1hret:Riemann95Auxiliary.nSteps sf
{ state := if 0 = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill)
(popBreakRev (↑0) walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))h:Riemann95Auxiliary.nSteps (fill + su + sf)
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill)
(popBreakRev (↑0) walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))ht:nSteps (fill + su + sf)
(Projection.cfgMap
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) }) =
some
(rootCfg (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill) (popBreakRev (↑0) walked.reverse).reverse
(bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))⊢ ∃ s ≥ 1,
nSteps s
{ state := decLeaf r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(rootCfg (exactPad 0 walked fill) (popBreakRev 0 walked.reverse).reverse
(bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))] at ht r:Fin 5bank:List ℕhr:↑r < bank.lengthhpos:0 < bank.getD (↑r) 0walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 0 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }su:ℕhsu:su ≥ 1hu:Riemann95Auxiliary.nSteps su
{ state := Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) } =
some
{ state := 9,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))) }sf:ℕhsf:sf ≥ 1hret:Riemann95Auxiliary.nSteps sf
{ state := if 0 = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill)
(popBreakRev (↑0) walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))h:Riemann95Auxiliary.nSteps (fill + su + sf)
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill)
(popBreakRev (↑0) walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))ht:nSteps (fill + su + sf)
(Projection.cfgMap
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) }) =
some
(rootCfg (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill) (popBreakRev (↑0) walked.reverse).reverse
(bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))⊢ ∃ s ≥ 1,
nSteps s
{ state := decLeaf r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(rootCfg (exactPad 0 walked fill) (popBreakRev 0 walked.reverse).reverse
(bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))
exact ⟨fill + su + sf, by r:Fin 5bank:List ℕhr:↑r < bank.lengthhpos:0 < bank.getD (↑r) 0walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 0 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }su:ℕhsu:su ≥ 1hu:Riemann95Auxiliary.nSteps su
{ state := Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) } =
some
{ state := 9,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))) }sf:ℕhsf:sf ≥ 1hret:Riemann95Auxiliary.nSteps sf
{ state := if 0 = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill)
(popBreakRev (↑0) walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))h:Riemann95Auxiliary.nSteps (fill + su + sf)
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill)
(popBreakRev (↑0) walked.reverse).reverse (bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))ht:nSteps (fill + su + sf)
(Projection.cfgMap
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) }) =
some
(rootCfg (Riemann95Auxiliary.PhysicalRaw.exactPad 0 walked fill) (popBreakRev (↑0) walked.reverse).reverse
(bank.set (↑r) (bank.getD (↑r) 0 - 1) ++ [0]))⊢ fill + su + sf ≥ 1 omega All goals completed! 🐙, ht⟩theorem macro_dec_zero_exact (r : Fin 5) (bank : List Nat) (hr : r.val < bank.length)
(hz : bank.getD r.val 0 = 0) (walked : List (Fin 2)) (fill : Nat) (hfill : 3 ≤ fill)
(hk : 1 ≤ walked.count 0) (hguard : Riemann104.OnePassGuard.NoThreeZeros
(1 :: (popBreakRev 1 walked.reverse).reverse).reverse = true) :
∃ s ≥ 1, nSteps s
⟨decLeaf r, Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank)))⟩ =
some (rootCfg (exactPad 1 walked fill) (popBreakRev 1 walked.reverse).reverse bank) := by r:Fin 5bank:List ℕhr:↑r < bank.lengthhz:bank.getD (↑r) 0 = 0walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:1 ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 1 walked.reverse).reverse).reverse = true⊢ ∃ s ≥ 1,
nSteps s
{ state := decLeaf r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some (rootCfg (exactPad 1 walked fill) (popBreakRev 1 walked.reverse).reverse bank)
have hf := Riemann95Auxiliary.Physical.leaf98_fill r false fill (stackLeftOf true walked)
(ListBlank.append [1, 0] (regsTape bank)) r:Fin 5bank:List ℕhr:↑r < bank.lengthhz:bank.getD (↑r) 0 = 0walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:1 ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 1 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }⊢ ∃ s ≥ 1,
nSteps s
{ state := decLeaf r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some (rootCfg (exactPad 1 walked fill) (popBreakRev 1 walked.reverse).reverse bank)
obtain ⟨su, hsu, hu⟩ := Riemann95Auxiliary.Physical.unary98_dec_zero r bank hr hz
(ListBlank.append (List.replicate fill 1) (stackLeftOf true walked)) r:Fin 5bank:List ℕhr:↑r < bank.lengthhz:bank.getD (↑r) 0 = 0walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:1 ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 1 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }su:ℕhsu:su ≥ 1hu:Riemann95Auxiliary.nSteps su
{ state := Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) } =
some
{ state := 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) }⊢ ∃ s ≥ 1,
nSteps s
{ state := decLeaf r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some (rootCfg (exactPad 1 walked fill) (popBreakRev 1 walked.reverse).reverse bank)
obtain ⟨sf, hsf, hret⟩ := Riemann95Auxiliary.Physical.fenceReturn_exact
1 walked fill hfill (by r:Fin 5bank:List ℕhr:↑r < bank.lengthhz:bank.getD (↑r) 0 = 0walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:1 ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 1 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }su:ℕhsu:su ≥ 1hu:Riemann95Auxiliary.nSteps su
{ state := Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) } =
some
{ state := 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) }⊢ ↑1 ≤ List.count 0 walked simpa only [Fin.val_one] using hk All goals completed! 🐙) hguard bank r:Fin 5bank:List ℕhr:↑r < bank.lengthhz:bank.getD (↑r) 0 = 0walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:1 ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 1 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }su:ℕhsu:su ≥ 1hu:Riemann95Auxiliary.nSteps su
{ state := Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) } =
some
{ state := 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) }sf:ℕhsf:sf ≥ 1hret:Riemann95Auxiliary.nSteps sf
{ state := if 1 = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 1 walked fill)
(popBreakRev (↑1) walked.reverse).reverse bank)⊢ ∃ s ≥ 1,
nSteps s
{ state := decLeaf r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some (rootCfg (exactPad 1 walked fill) (popBreakRev 1 walked.reverse).reverse bank)
have h := Riemann95Auxiliary.Return.nSteps_bind_eq
(Riemann95Auxiliary.Return.nSteps_bind_eq hf hu) hret r:Fin 5bank:List ℕhr:↑r < bank.lengthhz:bank.getD (↑r) 0 = 0walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:1 ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 1 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }su:ℕhsu:su ≥ 1hu:Riemann95Auxiliary.nSteps su
{ state := Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) } =
some
{ state := 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) }sf:ℕhsf:sf ≥ 1hret:Riemann95Auxiliary.nSteps sf
{ state := if 1 = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 1 walked fill)
(popBreakRev (↑1) walked.reverse).reverse bank)h:Riemann95Auxiliary.nSteps (fill + su + sf)
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 1 walked fill)
(popBreakRev (↑1) walked.reverse).reverse bank)⊢ ∃ s ≥ 1,
nSteps s
{ state := decLeaf r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some (rootCfg (exactPad 1 walked fill) (popBreakRev 1 walked.reverse).reverse bank)
have ht := Projection.of_aux h r:Fin 5bank:List ℕhr:↑r < bank.lengthhz:bank.getD (↑r) 0 = 0walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:1 ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 1 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }su:ℕhsu:su ≥ 1hu:Riemann95Auxiliary.nSteps su
{ state := Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) } =
some
{ state := 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) }sf:ℕhsf:sf ≥ 1hret:Riemann95Auxiliary.nSteps sf
{ state := if 1 = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 1 walked fill)
(popBreakRev (↑1) walked.reverse).reverse bank)h:Riemann95Auxiliary.nSteps (fill + su + sf)
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 1 walked fill)
(popBreakRev (↑1) walked.reverse).reverse bank)ht:nSteps (fill + su + sf)
(Projection.cfgMap
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) }) =
some
(Projection.cfgMap
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 1 walked fill)
(popBreakRev (↑1) walked.reverse).reverse bank))⊢ ∃ s ≥ 1,
nSteps s
{ state := decLeaf r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some (rootCfg (exactPad 1 walked fill) (popBreakRev 1 walked.reverse).reverse bank)
rw [cfgMap_root r:Fin 5bank:List ℕhr:↑r < bank.lengthhz:bank.getD (↑r) 0 = 0walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:1 ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 1 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }su:ℕhsu:su ≥ 1hu:Riemann95Auxiliary.nSteps su
{ state := Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) } =
some
{ state := 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) }sf:ℕhsf:sf ≥ 1hret:Riemann95Auxiliary.nSteps sf
{ state := if 1 = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 1 walked fill)
(popBreakRev (↑1) walked.reverse).reverse bank)h:Riemann95Auxiliary.nSteps (fill + su + sf)
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 1 walked fill)
(popBreakRev (↑1) walked.reverse).reverse bank)ht:nSteps (fill + su + sf)
(Projection.cfgMap
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) }) =
some (rootCfg (Riemann95Auxiliary.PhysicalRaw.exactPad 1 walked fill) (popBreakRev (↑1) walked.reverse).reverse bank)⊢ ∃ s ≥ 1,
nSteps s
{ state := decLeaf r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some (rootCfg (exactPad 1 walked fill) (popBreakRev 1 walked.reverse).reverse bank)] at ht r:Fin 5bank:List ℕhr:↑r < bank.lengthhz:bank.getD (↑r) 0 = 0walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:1 ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 1 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }su:ℕhsu:su ≥ 1hu:Riemann95Auxiliary.nSteps su
{ state := Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) } =
some
{ state := 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) }sf:ℕhsf:sf ≥ 1hret:Riemann95Auxiliary.nSteps sf
{ state := if 1 = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 1 walked fill)
(popBreakRev (↑1) walked.reverse).reverse bank)h:Riemann95Auxiliary.nSteps (fill + su + sf)
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 1 walked fill)
(popBreakRev (↑1) walked.reverse).reverse bank)ht:nSteps (fill + su + sf)
(Projection.cfgMap
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) }) =
some (rootCfg (Riemann95Auxiliary.PhysicalRaw.exactPad 1 walked fill) (popBreakRev (↑1) walked.reverse).reverse bank)⊢ ∃ s ≥ 1,
nSteps s
{ state := decLeaf r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some (rootCfg (exactPad 1 walked fill) (popBreakRev 1 walked.reverse).reverse bank)
exact ⟨fill + su + sf, by r:Fin 5bank:List ℕhr:↑r < bank.lengthhz:bank.getD (↑r) 0 = 0walked:List (Fin 2)fill:ℕhfill:3 ≤ fillhk:1 ≤ List.count 0 walkedhguard:Riemann104.OnePassGuard.NoThreeZeros (1 :: (popBreakRev 1 walked.reverse).reverse).reverse = truehf:Riemann95Auxiliary.nSteps fill
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) }su:ℕhsu:su ≥ 1hu:Riemann95Auxiliary.nSteps su
{ state := Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [1, 0] (regsTape bank)) } =
some
{ state := 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) }sf:ℕhsf:sf ≥ 1hret:Riemann95Auxiliary.nSteps sf
{ state := if 1 = 0 then 9 else 63,
tape :=
Tape.mk' (ListBlank.append (List.replicate fill 1) (stackLeftOf true walked))
(ListBlank.append [0, 0] (regsTape bank)) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 1 walked fill)
(popBreakRev (↑1) walked.reverse).reverse bank)h:Riemann95Auxiliary.nSteps (fill + su + sf)
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) } =
some
(Riemann95Auxiliary.Physical.rawRoot98 (Riemann95Auxiliary.PhysicalRaw.exactPad 1 walked fill)
(popBreakRev (↑1) walked.reverse).reverse bank)ht:nSteps (fill + su + sf)
(Projection.cfgMap
{
state :=
if false = true then Riemann95Auxiliary.Physical.incLeaf98 r else Riemann95Auxiliary.Physical.decLeaf98 r,
tape :=
Tape.mk' (stackLeftOf true walked)
(ListBlank.append (List.replicate fill 0) (ListBlank.append [1, 0] (regsTape bank))) }) =
some (rootCfg (Riemann95Auxiliary.PhysicalRaw.exactPad 1 walked fill) (popBreakRev (↑1) walked.reverse).reverse bank)⊢ fill + su + sf ≥ 1 omega All goals completed! 🐙, ht⟩end ConjectureMachines.Riemann95.Physical