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.PrecreditTrace95
@[expose] public sectionnamespace ConjectureMachines.Riemann95.Controlopen Schemaopen ConjectureMachines.Riemann120 (quarterClock)

A final zero DECf edge, separated from its possibly empty bounded prefix.

def StrictExitTrace (B : Nat) (a b : Cfg) : Prop := ∃ mid, Relation.ReflTransGen (BoundedEdge B) a mid ∧ BoundedEdge B mid b ∧ effect mid.control = .decnz 2 ∧ mid.regs.getD 2 0 = 0 ∧ mid.regs = b.regstheorem strictExit_prepend (B : Nat) (a b c : Cfg) (hab : Relation.ReflTransGen (BoundedEdge B) a b) (hbc : StrictExitTrace B b c) : StrictExitTrace B a c := B:ℕa:Cfgb:Cfgc:Cfghab:Relation.ReflTransGen (BoundedEdge B) a bhbc:StrictExitTrace B b c⊢ StrictExitTrace B a c B:ℕa:Cfgb:Cfgc:Cfghab:Relation.ReflTransGen (BoundedEdge B) a bmid:Cfghm:Relation.ReflTransGen (BoundedEdge B) b midhe:BoundedEdge B mid chf:effect mid.control = Effect.decnz 2hz:mid.regs.getD 2 0 = 0hr:mid.regs = c.regs⊢ StrictExitTrace B a c All goals completed! 🐙theorem strict_test_zero (B x : Nat) (hB : 19 ≤ B) : StrictExitTrace B ⟨.outside finalTestId,[0,0,0,x,0]⟩ ⟨.outside 0,[0,0,0,x,0]⟩ := B:ℕx:ℕhB:19 ≤ B⊢ StrictExitTrace B { control := ControlWord.outside finalTestId, regs := [0, 0, 0, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } B:ℕx:ℕhB:19 ≤ B⊢ BoundedEdge B { control := ControlWord.outside finalTestId, regs := [0, 0, 0, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] }B:ℕx:ℕhB:19 ≤ B⊢ effect { control := ControlWord.outside finalTestId, regs := [0, 0, 0, x, 0] }.control = Effect.decnz 2B:ℕx:ℕhB:19 ≤ B⊢ { control := ControlWord.outside finalTestId, regs := [0, 0, 0, x, 0] }.regs.getD 2 0 = 0 B:ℕx:ℕhB:19 ≤ B⊢ BoundedEdge B { control := ControlWord.outside finalTestId, regs := [0, 0, 0, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } exact ⟨B:ℕx:ℕhB:19 ≤ B⊢ step { control := ControlWord.outside finalTestId, regs := [0, 0, 0, x, 0] } = some { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } All goals completed! 🐙,le_trans (outside_frontier_bound _) hB⟩ B:ℕx:ℕhB:19 ≤ B⊢ effect { control := ControlWord.outside finalTestId, regs := [0, 0, 0, x, 0] }.control = Effect.decnz 2 All goals completed! 🐙 B:ℕx:ℕhB:19 ≤ B⊢ { control := ControlWord.outside finalTestId, regs := [0, 0, 0, x, 0] }.regs.getD 2 0 = 0 All goals completed! 🐙theorem strict_unwind0_zero (B x : Nat) (hB : 18 ≤ B) : StrictExitTrace B ⟨unwind 0,[0,0,0,x,0]⟩ ⟨.outside 0,[0,0,0,x,0]⟩ := B:ℕx:ℕhB:18 ≤ B⊢ StrictExitTrace B { control := unwind 0, regs := [0, 0, 0, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } B:ℕx:ℕhB:18 ≤ B⊢ BoundedEdge B { control := unwind 0, regs := [0, 0, 0, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] }B:ℕx:ℕhB:18 ≤ B⊢ effect { control := unwind 0, regs := [0, 0, 0, x, 0] }.control = Effect.decnz 2B:ℕx:ℕhB:18 ≤ B⊢ { control := unwind 0, regs := [0, 0, 0, x, 0] }.regs.getD 2 0 = 0 B:ℕx:ℕhB:18 ≤ B⊢ BoundedEdge B { control := unwind 0, regs := [0, 0, 0, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } exact bounded_unwind_edge B 0 0 x hB _ (B:ℕx:ℕhB:18 ≤ B⊢ step { control := unwind 0, regs := [0, 0, 0, x, 0] } = some { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } All goals completed! 🐙) B:ℕx:ℕhB:18 ≤ B⊢ effect { control := unwind 0, regs := [0, 0, 0, x, 0] }.control = Effect.decnz 2 All goals completed! 🐙 B:ℕx:ℕhB:18 ≤ B⊢ { control := unwind 0, regs := [0, 0, 0, x, 0] }.regs.getD 2 0 = 0 All goals completed! 🐙theorem strict_unwind_zero (B d x f : Nat) (hB : 5 * d + 18 ≤ B) (hO : 19 ≤ B) (hf : f ≤ d + 1) : StrictExitTrace B ⟨unwind d,[0,0,f,x,0]⟩ ⟨.outside 0,[0,0,0,x,0]⟩ := B:ℕd:ℕx:ℕf:ℕhB:5 * d + 18 ≤ BhO:19 ≤ Bhf:f ≤ d + 1⊢ StrictExitTrace B { control := unwind d, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } induction d using Nat.strong_induction_on generalizing f with B:ℕx:ℕhO:19 ≤ Bd:ℕih:∀ m < d, ∀ (f : ℕ), 5 * m + 18 ≤ B → f ≤ m + 1 → StrictExitTrace B { control := unwind m, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] }f:ℕhB:5 * d + 18 ≤ Bhf:f ≤ d + 1⊢ StrictExitTrace B { control := unwind d, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } cases d with B:ℕx:ℕhO:19 ≤ Bf:ℕih:∀ m < 0, ∀ (f : ℕ), 5 * m + 18 ≤ B → f ≤ m + 1 → StrictExitTrace B { control := unwind m, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] }hB:5 * 0 + 18 ≤ Bhf:f ≤ 0 + 1⊢ StrictExitTrace B { control := unwind 0, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } cases f with B:ℕx:ℕhO:19 ≤ Bih:∀ m < 0, ∀ (f : ℕ), 5 * m + 18 ≤ B → f ≤ m + 1 → StrictExitTrace B { control := unwind m, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] }hB:5 * 0 + 18 ≤ Bhf:0 ≤ 0 + 1⊢ StrictExitTrace B { control := unwind 0, regs := [0, 0, 0, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } All goals completed! 🐙 B:ℕx:ℕhO:19 ≤ Bih:∀ m < 0, ∀ (f : ℕ), 5 * m + 18 ≤ B → f ≤ m + 1 → StrictExitTrace B { control := unwind m, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] }hB:5 * 0 + 18 ≤ Bf:ℕhf:f + 1 ≤ 0 + 1⊢ StrictExitTrace B { control := unwind 0, regs := [0, 0, f + 1, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } B:ℕx:ℕhO:19 ≤ Bih:∀ m < 0, ∀ (f : ℕ), 5 * m + 18 ≤ B → f ≤ m + 1 → StrictExitTrace B { control := unwind m, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] }hB:5 * 0 + 18 ≤ Bf:ℕhf:f + 1 ≤ 0 + 1hz:f = 0⊢ StrictExitTrace B { control := unwind 0, regs := [0, 0, f + 1, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } B:ℕx:ℕhO:19 ≤ Bih:∀ m < 0, ∀ (f : ℕ), 5 * m + 18 ≤ B → f ≤ m + 1 → StrictExitTrace B { control := unwind m, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] }hB:5 * 0 + 18 ≤ Bhf:0 + 1 ≤ 0 + 1⊢ StrictExitTrace B { control := unwind 0, regs := [0, 0, 0 + 1, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } B:ℕx:ℕhO:19 ≤ Bih:∀ m < 0, ∀ (f : ℕ), 5 * m + 18 ≤ B → f ≤ m + 1 → StrictExitTrace B { control := unwind m, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] }hB:5 * 0 + 18 ≤ Bhf:0 + 1 ≤ 0 + 1⊢ BoundedEdge B { control := unwind 0, regs := [0, 0, 0 + 1, x, 0] } { control := ControlWord.outside finalTestId, regs := [0, 0, 0, x, 0] } exact bounded_unwind_edge B 0 1 x hB _ (B:ℕx:ℕhO:19 ≤ Bih:∀ m < 0, ∀ (f : ℕ), 5 * m + 18 ≤ B → f ≤ m + 1 → StrictExitTrace B { control := unwind m, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] }hB:5 * 0 + 18 ≤ Bhf:0 + 1 ≤ 0 + 1⊢ step { control := unwind 0, regs := [0, 0, 1, x, 0] } = some { control := ControlWord.outside finalTestId, regs := [0, 0, 0, x, 0] } All goals completed! 🐙) B:ℕx:ℕhO:19 ≤ Bf:ℕd:ℕih:∀ m < d + 1, ∀ (f : ℕ), 5 * m + 18 ≤ B → f ≤ m + 1 → StrictExitTrace B { control := unwind m, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] }hB:5 * (d + 1) + 18 ≤ Bhf:f ≤ d + 1 + 1⊢ StrictExitTrace B { control := unwind (d + 1), regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } cases f with B:ℕx:ℕhO:19 ≤ Bd:ℕih:∀ m < d + 1, ∀ (f : ℕ), 5 * m + 18 ≤ B → f ≤ m + 1 → StrictExitTrace B { control := unwind m, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] }hB:5 * (d + 1) + 18 ≤ Bhf:0 ≤ d + 1 + 1⊢ StrictExitTrace B { control := unwind (d + 1), regs := [0, 0, 0, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } cases d with B:ℕx:ℕhO:19 ≤ Bih:∀ m < 0 + 1, ∀ (f : ℕ), 5 * m + 18 ≤ B → f ≤ m + 1 → StrictExitTrace B { control := unwind m, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] }hB:5 * (0 + 1) + 18 ≤ Bhf:0 ≤ 0 + 1 + 1⊢ StrictExitTrace B { control := unwind (0 + 1), regs := [0, 0, 0, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } B:ℕx:ℕhO:19 ≤ Bih:∀ m < 0 + 1, ∀ (f : ℕ), 5 * m + 18 ≤ B → f ≤ m + 1 → StrictExitTrace B { control := unwind m, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] }hB:5 * (0 + 1) + 18 ≤ Bhf:0 ≤ 0 + 1 + 1⊢ BoundedEdge B { control := unwind (0 + 1), regs := [0, 0, 0, x, 0] } { control := ControlWord.outside finalTestId, regs := [0, 0, 0, x, 0] } All goals completed! 🐙 B:ℕx:ℕhO:19 ≤ Bd:ℕih:∀ m < d + 1 + 1, ∀ (f : ℕ), 5 * m + 18 ≤ B → f ≤ m + 1 → StrictExitTrace B { control := unwind m, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] }hB:5 * (d + 1 + 1) + 18 ≤ Bhf:0 ≤ d + 1 + 1 + 1⊢ StrictExitTrace B { control := unwind (d + 1 + 1), regs := [0, 0, 0, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } apply strictExit_prepend B _ ⟨unwind d,[0,0,0,x,0]⟩ _ (Relation.ReflTransGen.single ?_) (ih d (B:ℕx:ℕhO:19 ≤ Bd:ℕih:∀ m < d + 1 + 1, ∀ (f : ℕ), 5 * m + 18 ≤ B → f ≤ m + 1 → StrictExitTrace B { control := unwind m, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] }hB:5 * (d + 1 + 1) + 18 ≤ Bhf:0 ≤ d + 1 + 1 + 1⊢ d < d + 1 + 1 All goals completed! 🐙) 0 (B:ℕx:ℕhO:19 ≤ Bd:ℕih:∀ m < d + 1 + 1, ∀ (f : ℕ), 5 * m + 18 ≤ B → f ≤ m + 1 → StrictExitTrace B { control := unwind m, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] }hB:5 * (d + 1 + 1) + 18 ≤ Bhf:0 ≤ d + 1 + 1 + 1⊢ 5 * d + 18 ≤ B All goals completed! 🐙) (B:ℕx:ℕhO:19 ≤ Bd:ℕih:∀ m < d + 1 + 1, ∀ (f : ℕ), 5 * m + 18 ≤ B → f ≤ m + 1 → StrictExitTrace B { control := unwind m, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] }hB:5 * (d + 1 + 1) + 18 ≤ Bhf:0 ≤ d + 1 + 1 + 1⊢ 0 ≤ d + 1 All goals completed! 🐙)) All goals completed! 🐙 B:ℕx:ℕhO:19 ≤ Bd:ℕih:∀ m < d + 1, ∀ (f : ℕ), 5 * m + 18 ≤ B → f ≤ m + 1 → StrictExitTrace B { control := unwind m, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] }hB:5 * (d + 1) + 18 ≤ Bf:ℕhf:f + 1 ≤ d + 1 + 1⊢ StrictExitTrace B { control := unwind (d + 1), regs := [0, 0, f + 1, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } apply strictExit_prepend B _ ⟨unwind d,[0,0,f,x,0]⟩ _ (Relation.ReflTransGen.single ?_) (ih d (B:ℕx:ℕhO:19 ≤ Bd:ℕih:∀ m < d + 1, ∀ (f : ℕ), 5 * m + 18 ≤ B → f ≤ m + 1 → StrictExitTrace B { control := unwind m, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] }hB:5 * (d + 1) + 18 ≤ Bf:ℕhf:f + 1 ≤ d + 1 + 1⊢ d < d + 1 All goals completed! 🐙) f (B:ℕx:ℕhO:19 ≤ Bd:ℕih:∀ m < d + 1, ∀ (f : ℕ), 5 * m + 18 ≤ B → f ≤ m + 1 → StrictExitTrace B { control := unwind m, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] }hB:5 * (d + 1) + 18 ≤ Bf:ℕhf:f + 1 ≤ d + 1 + 1⊢ 5 * d + 18 ≤ B All goals completed! 🐙) (B:ℕx:ℕhO:19 ≤ Bd:ℕih:∀ m < d + 1, ∀ (f : ℕ), 5 * m + 18 ≤ B → f ≤ m + 1 → StrictExitTrace B { control := unwind m, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] }hB:5 * (d + 1) + 18 ≤ Bf:ℕhf:f + 1 ≤ d + 1 + 1⊢ f ≤ d + 1 All goals completed! 🐙)) All goals completed! 🐙theorem strict_finish_zero (J q f x : Nat) (hq : q ≤ quarterClock J) (hf : f ≤ q) : StrictExitTrace (widthBudget J) ⟨.entry q,[0,0,f,x,0]⟩ ⟨.outside 0,[0,0,0,x,0]⟩ := J:ℕq:ℕf:ℕx:ℕhq:q ≤ quarterClock Jhf:f ≤ q⊢ StrictExitTrace (widthBudget J) { control := ControlWord.entry q, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } J:ℕq:ℕf:ℕx:ℕhq:q ≤ quarterClock Jhf:f ≤ qhO:19 ≤ widthBudget J⊢ StrictExitTrace (widthBudget J) { control := ControlWord.entry q, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } J:ℕq:ℕf:ℕx:ℕhq:q ≤ quarterClock Jhf:f ≤ qhO:19 ≤ widthBudget Jhmax:10 + 5 * quarterClock J ≤ max 16 (10 + 5 * quarterClock J)⊢ StrictExitTrace (widthBudget J) { control := ControlWord.entry q, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } cases q with J:ℕf:ℕx:ℕhO:19 ≤ widthBudget Jhmax:10 + 5 * quarterClock J ≤ max 16 (10 + 5 * quarterClock J)hq:0 ≤ quarterClock Jhf:f ≤ 0⊢ StrictExitTrace (widthBudget J) { control := ControlWord.entry 0, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } J:ℕf:ℕx:ℕhO:19 ≤ widthBudget Jhmax:10 + 5 * quarterClock J ≤ max 16 (10 + 5 * quarterClock J)hq:0 ≤ quarterClock Jhf:f ≤ 0hz:f = 0⊢ StrictExitTrace (widthBudget J) { control := ControlWord.entry 0, regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } J:ℕx:ℕhO:19 ≤ widthBudget Jhmax:10 + 5 * quarterClock J ≤ max 16 (10 + 5 * quarterClock J)hq:0 ≤ quarterClock Jhf:0 ≤ 0⊢ StrictExitTrace (widthBudget J) { control := ControlWord.entry 0, regs := [0, 0, 0, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } J:ℕx:ℕhO:19 ≤ widthBudget Jhmax:10 + 5 * quarterClock J ≤ max 16 (10 + 5 * quarterClock J)hq:0 ≤ quarterClock Jhf:0 ≤ 0⊢ BoundedEdge (widthBudget J) { control := ControlWord.entry 0, regs := [0, 0, 0, x, 0] } { control := ControlWord.outside finalTestId, regs := [0, 0, 0, x, 0] } J:ℕx:ℕhO:19 ≤ widthBudget Jhmax:10 + 5 * quarterClock J ≤ max 16 (10 + 5 * quarterClock J)hq:0 ≤ quarterClock Jhf:0 ≤ 0⊢ step { control := ControlWord.entry 0, regs := [0, 0, 0, x, 0] } = some { control := ControlWord.outside finalTestId, regs := [0, 0, 0, x, 0] }J:ℕx:ℕhO:19 ≤ widthBudget Jhmax:10 + 5 * quarterClock J ≤ max 16 (10 + 5 * quarterClock J)hq:0 ≤ quarterClock Jhf:0 ≤ 0⊢ List.length (walked { control := ControlWord.entry 0, regs := [0, 0, 0, x, 0] }.control) + 3 ≤ widthBudget J J:ℕx:ℕhO:19 ≤ widthBudget Jhmax:10 + 5 * quarterClock J ≤ max 16 (10 + 5 * quarterClock J)hq:0 ≤ quarterClock Jhf:0 ≤ 0⊢ step { control := ControlWord.entry 0, regs := [0, 0, 0, x, 0] } = some { control := ControlWord.outside finalTestId, regs := [0, 0, 0, x, 0] } All goals completed! 🐙 J:ℕx:ℕhO:19 ≤ widthBudget Jhmax:10 + 5 * quarterClock J ≤ max 16 (10 + 5 * quarterClock J)hq:0 ≤ quarterClock Jhf:0 ≤ 0⊢ List.length (walked { control := ControlWord.entry 0, regs := [0, 0, 0, x, 0] }.control) + 3 ≤ widthBudget J J:ℕx:ℕhO:19 ≤ widthBudget Jhmax:10 + 5 * quarterClock J ≤ max 16 (10 + 5 * quarterClock J)hq:0 ≤ quarterClock Jhf:0 ≤ 0⊢ 5 * 0 + 10 ≤ widthBudget J All goals completed! 🐙 J:ℕf:ℕx:ℕhO:19 ≤ widthBudget Jhmax:10 + 5 * quarterClock J ≤ max 16 (10 + 5 * quarterClock J)d:ℕhq:d + 1 ≤ quarterClock Jhf:f ≤ d + 1⊢ StrictExitTrace (widthBudget J) { control := ControlWord.entry (d + 1), regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } J:ℕf:ℕx:ℕhO:19 ≤ widthBudget Jhmax:10 + 5 * quarterClock J ≤ max 16 (10 + 5 * quarterClock J)d:ℕhq:d + 1 ≤ quarterClock Jhf:f ≤ d + 1hB:5 * d + 18 ≤ widthBudget J⊢ StrictExitTrace (widthBudget J) { control := ControlWord.entry (d + 1), regs := [0, 0, f, x, 0] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } J:ℕf:ℕx:ℕhO:19 ≤ widthBudget Jhmax:10 + 5 * quarterClock J ≤ max 16 (10 + 5 * quarterClock J)d:ℕhq:d + 1 ≤ quarterClock Jhf:f ≤ d + 1hB:5 * d + 18 ≤ widthBudget J⊢ BoundedEdge (widthBudget J) { control := ControlWord.entry (d + 1), regs := [0, 0, f, x, 0] } { control := unwind d, regs := [0, 0, f, x, 0] } J:ℕf:ℕx:ℕhO:19 ≤ widthBudget Jhmax:10 + 5 * quarterClock J ≤ max 16 (10 + 5 * quarterClock J)d:ℕhq:d + 1 ≤ quarterClock Jhf:f ≤ d + 1hB:5 * d + 18 ≤ widthBudget J⊢ step { control := ControlWord.entry (d + 1), regs := [0, 0, f, x, 0] } = some { control := unwind d, regs := [0, 0, f, x, 0] }J:ℕf:ℕx:ℕhO:19 ≤ widthBudget Jhmax:10 + 5 * quarterClock J ≤ max 16 (10 + 5 * quarterClock J)d:ℕhq:d + 1 ≤ quarterClock Jhf:f ≤ d + 1hB:5 * d + 18 ≤ widthBudget J⊢ List.length (walked { control := ControlWord.entry (d + 1), regs := [0, 0, f, x, 0] }.control) + 3 ≤ widthBudget J J:ℕf:ℕx:ℕhO:19 ≤ widthBudget Jhmax:10 + 5 * quarterClock J ≤ max 16 (10 + 5 * quarterClock J)d:ℕhq:d + 1 ≤ quarterClock Jhf:f ≤ d + 1hB:5 * d + 18 ≤ widthBudget J⊢ step { control := ControlWord.entry (d + 1), regs := [0, 0, f, x, 0] } = some { control := unwind d, regs := [0, 0, f, x, 0] } All goals completed! 🐙 J:ℕf:ℕx:ℕhO:19 ≤ widthBudget Jhmax:10 + 5 * quarterClock J ≤ max 16 (10 + 5 * quarterClock J)d:ℕhq:d + 1 ≤ quarterClock Jhf:f ≤ d + 1hB:5 * d + 18 ≤ widthBudget J⊢ List.length (walked { control := ControlWord.entry (d + 1), regs := [0, 0, f, x, 0] }.control) + 3 ≤ widthBudget J J:ℕf:ℕx:ℕhO:19 ≤ widthBudget Jhmax:10 + 5 * quarterClock J ≤ max 16 (10 + 5 * quarterClock J)d:ℕhq:d + 1 ≤ quarterClock Jhf:f ≤ d + 1hB:5 * d + 18 ≤ widthBudget J⊢ 5 * (d + 1) + 10 ≤ widthBudget J J:ℕf:ℕx:ℕhO:19 ≤ widthBudget Jhmax:10 + 5 * quarterClock J ≤ max 16 (10 + 5 * quarterClock J)d:ℕhq:d + 1 ≤ quarterClock Jhf:f ≤ d + 1hB:5 * d + 18 ≤ widthBudget J⊢ 5 * (d + 1) + 10 ≤ max 16 (10 + 5 * quarterClock J) + 5 All goals completed! 🐙theorem strict_width_zero (x j f : Nat) (hr : Algorithm.residual j f = 0) : StrictExitTrace (widthBudget j) ⟨.entry 0,[0,0,f,x,j]⟩ ⟨.outside 0,[0,0,0,x,0]⟩ := x:ℕj:ℕf:ℕhr:Algorithm.residual j f = 0⊢ StrictExitTrace (widthBudget j) { control := ControlWord.entry 0, regs := [0, 0, f, x, j] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } x:ℕj:ℕf:ℕhr:Algorithm.residual j f = 0hf:f / 2 ^ quarterClock j ≤ quarterClock j⊢ StrictExitTrace (widthBudget j) { control := ControlWord.entry 0, regs := [0, 0, f, x, j] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } x:ℕj:ℕf:ℕhr:Algorithm.residual j f = 0hf:f / 2 ^ quarterClock j ≤ quarterClock jhd:Relation.ReflTransGen (BoundedEdge (widthBudget j)) { control := ControlWord.entry 0, regs := [0, 0, f, x, j] } { control := ControlWord.entry (0 + quarterClock j), regs := [0, 0, f / 2 ^ quarterClock j, x, 0] }⊢ StrictExitTrace (widthBudget j) { control := ControlWord.entry 0, regs := [0, 0, f, x, j] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } x:ℕj:ℕf:ℕhr:Algorithm.residual j f = 0hf:f / 2 ^ quarterClock j ≤ quarterClock jhd:Relation.ReflTransGen (BoundedEdge (widthBudget j)) { control := ControlWord.entry 0, regs := [0, 0, f, x, j] } { control := ControlWord.entry (quarterClock j), regs := [0, 0, f / 2 ^ quarterClock j, x, 0] }⊢ StrictExitTrace (widthBudget j) { control := ControlWord.entry 0, regs := [0, 0, f, x, j] } { control := ControlWord.outside 0, regs := [0, 0, 0, x, 0] } exact strictExit_prepend _ _ _ _ hd (strict_finish_zero j (quarterClock j) (f/2^quarterClock j) x (x:ℕj:ℕf:ℕhr:Algorithm.residual j f = 0hf:f / 2 ^ quarterClock j ≤ quarterClock jhd:Relation.ReflTransGen (BoundedEdge (widthBudget j)) { control := ControlWord.entry 0, regs := [0, 0, f, x, j] } { control := ControlWord.entry (quarterClock j), regs := [0, 0, f / 2 ^ quarterClock j, x, 0] }⊢ quarterClock j ≤ quarterClock j All goals completed! 🐙) hf)theorem strict_precredit_width_zero (x j f : Nat) (hr : Algorithm.residual j f = 0) : StrictExitTrace (widthBudget j) ⟨.outside widthCallId,[0,0,f,x,j]⟩ ⟨.outside 0,[0,0,0,x+j,0]⟩ := x:ℕj:ℕf:ℕhr:Algorithm.residual j f = 0⊢ StrictExitTrace (widthBudget j) { control := ControlWord.outside widthCallId, regs := [0, 0, f, x, j] } { control := ControlWord.outside 0, regs := [0, 0, 0, x + j, 0] } x:ℕj:ℕf:ℕhr:Algorithm.residual j f = 0hbudget:19 ≤ widthBudget j⊢ StrictExitTrace (widthBudget j) { control := ControlWord.outside widthCallId, regs := [0, 0, f, x, j] } { control := ControlWord.outside 0, regs := [0, 0, 0, x + j, 0] } x:ℕj:ℕf:ℕhr:Algorithm.residual j f = 0hbudget:19 ≤ widthBudget jhp:Relation.TransGen (BoundedEdge (widthBudget j)) { control := ControlWord.outside widthCallId, regs := [0, 0, f, x, j] } { control := ControlWord.entry 0, regs := [0, 0, f, x + j, j] }⊢ StrictExitTrace (widthBudget j) { control := ControlWord.outside widthCallId, regs := [0, 0, f, x, j] } { control := ControlWord.outside 0, regs := [0, 0, 0, x + j, 0] } All goals completed! 🐙end ConjectureMachines.Riemann95.Control