Skip to content
Imports
@[expose] public sectionnamespace ConjectureMachines.Riemann95.Controlopen Schemadef widthCallId : Fin 97 := 88theorem widthCall_word : word (.outside widthCallId) = [1,1,1,1] := ⊢ word (ControlWord.outside widthCallId) = [1, 1, 1, 1] All goals completed! 🐙theorem bounded_outside_edge (s : Fin 97) (regs : List Nat) (next : Cfg)
(he : step ⟨.outside s, regs⟩ = some next) :
BoundedEdge 19 ⟨.outside s,regs⟩ next := ⟨he,outside_frontier_bound s⟩private theorem pc88 (x v f m j : Nat) :
BoundedEdge 19 ⟨.outside 88,[m,v,f,x,j]⟩
⟨.outside (if j = 0 then 92 else 89),[m,v,f,x,j-1]⟩ := x:ℕv:ℕf:ℕm:ℕj:ℕ⊢ BoundedEdge 19 { control := ControlWord.outside 88, regs := [m, v, f, x, j] }
{ control := ControlWord.outside (if j = 0 then 92 else 89), regs := [m, v, f, x, j - 1] }
x:ℕv:ℕf:ℕm:ℕj:ℕ⊢ step { control := ControlWord.outside 88, regs := [m, v, f, x, j] } =
some { control := ControlWord.outside (if j = 0 then 92 else 89), regs := [m, v, f, x, j - 1] }
x:ℕv:ℕf:ℕm:ℕj:ℕhj:j = 0⊢ step { control := ControlWord.outside 88, regs := [m, v, f, x, j] } =
some { control := ControlWord.outside (if j = 0 then 92 else 89), regs := [m, v, f, x, j - 1] }x:ℕv:ℕf:ℕm:ℕj:ℕhj:¬j = 0⊢ step { control := ControlWord.outside 88, regs := [m, v, f, x, j] } =
some { control := ControlWord.outside (if j = 0 then 92 else 89), regs := [m, v, f, x, j - 1] } x:ℕv:ℕf:ℕm:ℕj:ℕhj:j = 0⊢ step { control := ControlWord.outside 88, regs := [m, v, f, x, j] } =
some { control := ControlWord.outside (if j = 0 then 92 else 89), regs := [m, v, f, x, j - 1] }x:ℕv:ℕf:ℕm:ℕj:ℕhj:¬j = 0⊢ step { control := ControlWord.outside 88, regs := [m, v, f, x, j] } =
some { control := ControlWord.outside (if j = 0 then 92 else 89), regs := [m, v, f, x, j - 1] } All goals completed! 🐙private theorem pc89 (x v f m j : Nat) :
BoundedEdge 19 ⟨.outside 89,[m,v,f,x,j]⟩ ⟨.outside 90,[m,v,f,x+1,j]⟩ := x:ℕv:ℕf:ℕm:ℕj:ℕ⊢ BoundedEdge 19 { control := ControlWord.outside 89, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 90, regs := [m, v, f, x + 1, j] }
x:ℕv:ℕf:ℕm:ℕj:ℕ⊢ step { control := ControlWord.outside 89, regs := [m, v, f, x, j] } =
some { control := ControlWord.outside 90, regs := [m, v, f, x + 1, j] }
All goals completed! 🐙private theorem pc90 (x v f m j : Nat) :
BoundedEdge 19 ⟨.outside 90,[m,v,f,x,j]⟩ ⟨.outside 91,[m,v+1,f,x,j]⟩ := x:ℕv:ℕf:ℕm:ℕj:ℕ⊢ BoundedEdge 19 { control := ControlWord.outside 90, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 91, regs := [m, v + 1, f, x, j] }
x:ℕv:ℕf:ℕm:ℕj:ℕ⊢ step { control := ControlWord.outside 90, regs := [m, v, f, x, j] } =
some { control := ControlWord.outside 91, regs := [m, v + 1, f, x, j] }
All goals completed! 🐙private theorem pc91 (x v f m j : Nat) :
BoundedEdge 19 ⟨.outside 91,[m,v,f,x,j]⟩ ⟨.outside 88,[m,v,f,x,j]⟩ := x:ℕv:ℕf:ℕm:ℕj:ℕ⊢ BoundedEdge 19 { control := ControlWord.outside 91, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 88, regs := [m, v, f, x, j] }
x:ℕv:ℕf:ℕm:ℕj:ℕ⊢ step { control := ControlWord.outside 91, regs := [m, v, f, x, j] } =
some { control := ControlWord.outside 88, regs := [m, v, f, x, j] }
All goals completed! 🐙private theorem pc92 (x v f m j : Nat) :
BoundedEdge 19 ⟨.outside 92,[m,v,f,x,j]⟩
⟨if v = 0 then .entry 0 else .outside 93,[m,v-1,f,x,j]⟩ := x:ℕv:ℕf:ℕm:ℕj:ℕ⊢ BoundedEdge 19 { control := ControlWord.outside 92, regs := [m, v, f, x, j] }
{ control := if v = 0 then ControlWord.entry 0 else ControlWord.outside 93, regs := [m, v - 1, f, x, j] }
x:ℕv:ℕf:ℕm:ℕj:ℕ⊢ step { control := ControlWord.outside 92, regs := [m, v, f, x, j] } =
some { control := if v = 0 then ControlWord.entry 0 else ControlWord.outside 93, regs := [m, v - 1, f, x, j] }
x:ℕv:ℕf:ℕm:ℕj:ℕhv:v = 0⊢ step { control := ControlWord.outside 92, regs := [m, v, f, x, j] } =
some { control := if v = 0 then ControlWord.entry 0 else ControlWord.outside 93, regs := [m, v - 1, f, x, j] }x:ℕv:ℕf:ℕm:ℕj:ℕhv:¬v = 0⊢ step { control := ControlWord.outside 92, regs := [m, v, f, x, j] } =
some { control := if v = 0 then ControlWord.entry 0 else ControlWord.outside 93, regs := [m, v - 1, f, x, j] } x:ℕv:ℕf:ℕm:ℕj:ℕhv:v = 0⊢ step { control := ControlWord.outside 92, regs := [m, v, f, x, j] } =
some { control := if v = 0 then ControlWord.entry 0 else ControlWord.outside 93, regs := [m, v - 1, f, x, j] }x:ℕv:ℕf:ℕm:ℕj:ℕhv:¬v = 0⊢ step { control := ControlWord.outside 92, regs := [m, v, f, x, j] } =
some { control := if v = 0 then ControlWord.entry 0 else ControlWord.outside 93, regs := [m, v - 1, f, x, j] } All goals completed! 🐙private theorem pc93 (x v f m j : Nat) :
BoundedEdge 19 ⟨.outside 93,[m,v,f,x,j]⟩ ⟨.outside 94,[m,v,f,x,j+1]⟩ := x:ℕv:ℕf:ℕm:ℕj:ℕ⊢ BoundedEdge 19 { control := ControlWord.outside 93, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 94, regs := [m, v, f, x, j + 1] }
x:ℕv:ℕf:ℕm:ℕj:ℕ⊢ step { control := ControlWord.outside 93, regs := [m, v, f, x, j] } =
some { control := ControlWord.outside 94, regs := [m, v, f, x, j + 1] }
All goals completed! 🐙private theorem pc94 (x v f m j : Nat) :
BoundedEdge 19 ⟨.outside 94,[m,v,f,x,j]⟩ ⟨.outside 92,[m,v,f,x,j]⟩ := x:ℕv:ℕf:ℕm:ℕj:ℕ⊢ BoundedEdge 19 { control := ControlWord.outside 94, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 92, regs := [m, v, f, x, j] }
x:ℕv:ℕf:ℕm:ℕj:ℕ⊢ step { control := ControlWord.outside 94, regs := [m, v, f, x, j] } =
some { control := ControlWord.outside 92, regs := [m, v, f, x, j] }
All goals completed! 🐙theorem precredit_consume (x v f m j : Nat) :
Relation.TransGen (BoundedEdge 19) ⟨.outside 88,[m,v,f,x,j]⟩
⟨.outside 92,[m,v+j,f,x+j,0]⟩ := x:ℕv:ℕf:ℕm:ℕj:ℕ⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 92, regs := [m, v + j, f, x + j, 0] }
induction j generalizing x v with
f:ℕm:ℕx:ℕv:ℕ⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, 0] }
{ control := ControlWord.outside 92, regs := [m, v + 0, f, x + 0, 0] } exact Relation.TransGen.single (f:ℕm:ℕx:ℕv:ℕ⊢ BoundedEdge 19 { control := ControlWord.outside 88, regs := [m, v, f, x, 0] }
{ control := ControlWord.outside 92, regs := [m, v + 0, f, x + 0, 0] } All goals completed! 🐙)
f:ℕm:ℕj:ℕih:∀ (x v : ℕ),
Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 92, regs := [m, v + j, f, x + j, 0] }x:ℕv:ℕ⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j + 1] }
{ control := ControlWord.outside 92, regs := [m, v + (j + 1), f, x + (j + 1), 0] }
succf:ℕm:ℕj:ℕih:∀ (x v : ℕ),
Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 92, regs := [m, v + j, f, x + j, 0] }x:ℕv:ℕh1:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j + 1] }
{ control := ControlWord.outside 89, regs := [m, v, f, x, j] }⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j + 1] }
{ control := ControlWord.outside 92, regs := [m, v + (j + 1), f, x + (j + 1), 0] }
have h2 := Relation.TransGen.single (pc89 x v f m j)succf:ℕm:ℕj:ℕih:∀ (x v : ℕ),
Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 92, regs := [m, v + j, f, x + j, 0] }x:ℕv:ℕh1:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j + 1] }
{ control := ControlWord.outside 89, regs := [m, v, f, x, j] }h2:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 89, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 90, regs := [m, v, f, x + 1, j] }⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j + 1] }
{ control := ControlWord.outside 92, regs := [m, v + (j + 1), f, x + (j + 1), 0] }
have h3 := Relation.TransGen.single (pc90 (x+1) v f m j)succf:ℕm:ℕj:ℕih:∀ (x v : ℕ),
Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 92, regs := [m, v + j, f, x + j, 0] }x:ℕv:ℕh1:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j + 1] }
{ control := ControlWord.outside 89, regs := [m, v, f, x, j] }h2:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 89, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 90, regs := [m, v, f, x + 1, j] }h3:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 90, regs := [m, v, f, x + 1, j] }
{ control := ControlWord.outside 91, regs := [m, v + 1, f, x + 1, j] }⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j + 1] }
{ control := ControlWord.outside 92, regs := [m, v + (j + 1), f, x + (j + 1), 0] }
have h4 := Relation.TransGen.single (pc91 (x+1) (v+1) f m j)succf:ℕm:ℕj:ℕih:∀ (x v : ℕ),
Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 92, regs := [m, v + j, f, x + j, 0] }x:ℕv:ℕh1:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j + 1] }
{ control := ControlWord.outside 89, regs := [m, v, f, x, j] }h2:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 89, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 90, regs := [m, v, f, x + 1, j] }h3:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 90, regs := [m, v, f, x + 1, j] }
{ control := ControlWord.outside 91, regs := [m, v + 1, f, x + 1, j] }h4:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 91, regs := [m, v + 1, f, x + 1, j] }
{ control := ControlWord.outside 88, regs := [m, v + 1, f, x + 1, j] }⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j + 1] }
{ control := ControlWord.outside 92, regs := [m, v + (j + 1), f, x + (j + 1), 0] }
have hx : x+(j+1) = (x+1)+j := byx:ℕv:ℕf:ℕm:ℕj:ℕ⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 92, regs := [m, v + j, f, x + j, 0] } omegasuccf:ℕm:ℕj:ℕih:∀ (x v : ℕ),
Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 92, regs := [m, v + j, f, x + j, 0] }x:ℕv:ℕh1:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j + 1] }
{ control := ControlWord.outside 89, regs := [m, v, f, x, j] }h2:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 89, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 90, regs := [m, v, f, x + 1, j] }h3:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 90, regs := [m, v, f, x + 1, j] }
{ control := ControlWord.outside 91, regs := [m, v + 1, f, x + 1, j] }h4:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 91, regs := [m, v + 1, f, x + 1, j] }
{ control := ControlWord.outside 88, regs := [m, v + 1, f, x + 1, j] }hx:x + (j + 1) = x + 1 + j⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j + 1] }
{ control := ControlWord.outside 92, regs := [m, v + (j + 1), f, x + (j + 1), 0] }
have hv : v+(j+1) = (v+1)+j := byx:ℕv:ℕf:ℕm:ℕj:ℕ⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 92, regs := [m, v + j, f, x + j, 0] } omegasuccf:ℕm:ℕj:ℕih:∀ (x v : ℕ),
Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 92, regs := [m, v + j, f, x + j, 0] }x:ℕv:ℕh1:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j + 1] }
{ control := ControlWord.outside 89, regs := [m, v, f, x, j] }h2:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 89, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 90, regs := [m, v, f, x + 1, j] }h3:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 90, regs := [m, v, f, x + 1, j] }
{ control := ControlWord.outside 91, regs := [m, v + 1, f, x + 1, j] }h4:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 91, regs := [m, v + 1, f, x + 1, j] }
{ control := ControlWord.outside 88, regs := [m, v + 1, f, x + 1, j] }hx:x + (j + 1) = x + 1 + jhv:v + (j + 1) = v + 1 + j⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j + 1] }
{ control := ControlWord.outside 92, regs := [m, v + (j + 1), f, x + (j + 1), 0] }
rw [hx,succf:ℕm:ℕj:ℕih:∀ (x v : ℕ),
Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 92, regs := [m, v + j, f, x + j, 0] }x:ℕv:ℕh1:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j + 1] }
{ control := ControlWord.outside 89, regs := [m, v, f, x, j] }h2:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 89, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 90, regs := [m, v, f, x + 1, j] }h3:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 90, regs := [m, v, f, x + 1, j] }
{ control := ControlWord.outside 91, regs := [m, v + 1, f, x + 1, j] }h4:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 91, regs := [m, v + 1, f, x + 1, j] }
{ control := ControlWord.outside 88, regs := [m, v + 1, f, x + 1, j] }hx:x + (j + 1) = x + 1 + jhv:v + (j + 1) = v + 1 + j⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j + 1] }
{ control := ControlWord.outside 92, regs := [m, v + (j + 1), f, x + 1 + j, 0] }hvsuccf:ℕm:ℕj:ℕih:∀ (x v : ℕ),
Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 92, regs := [m, v + j, f, x + j, 0] }x:ℕv:ℕh1:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j + 1] }
{ control := ControlWord.outside 89, regs := [m, v, f, x, j] }h2:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 89, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 90, regs := [m, v, f, x + 1, j] }h3:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 90, regs := [m, v, f, x + 1, j] }
{ control := ControlWord.outside 91, regs := [m, v + 1, f, x + 1, j] }h4:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 91, regs := [m, v + 1, f, x + 1, j] }
{ control := ControlWord.outside 88, regs := [m, v + 1, f, x + 1, j] }hx:x + (j + 1) = x + 1 + jhv:v + (j + 1) = v + 1 + j⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j + 1] }
{ control := ControlWord.outside 92, regs := [m, v + 1 + j, f, x + 1 + j, 0] }]succf:ℕm:ℕj:ℕih:∀ (x v : ℕ),
Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 92, regs := [m, v + j, f, x + j, 0] }x:ℕv:ℕh1:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j + 1] }
{ control := ControlWord.outside 89, regs := [m, v, f, x, j] }h2:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 89, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 90, regs := [m, v, f, x + 1, j] }h3:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 90, regs := [m, v, f, x + 1, j] }
{ control := ControlWord.outside 91, regs := [m, v + 1, f, x + 1, j] }h4:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 91, regs := [m, v + 1, f, x + 1, j] }
{ control := ControlWord.outside 88, regs := [m, v + 1, f, x + 1, j] }hx:x + (j + 1) = x + 1 + jhv:v + (j + 1) = v + 1 + j⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j + 1] }
{ control := ControlWord.outside 92, regs := [m, v + 1 + j, f, x + 1 + j, 0] }
exact h1.trans (h2.trans (h3.trans (h4.trans (ih (x+1) (v+1)))))All goals completed! 🐙theorem precredit_restore (x v f m j : Nat) :
Relation.TransGen (BoundedEdge 19) ⟨.outside 92,[m,v,f,x,j]⟩
⟨.entry 0,[m,0,f,x,j+v]⟩ := byx:ℕv:ℕf:ℕm:ℕj:ℕ⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, v, f, x, j] }
{ control := ControlWord.entry 0, regs := [m, 0, f, x, j + v] }
induction v generalizing j with
| zero =>zerox:ℕf:ℕm:ℕj:ℕ⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, 0, f, x, j] }
{ control := ControlWord.entry 0, regs := [m, 0, f, x, j + 0] } exact Relation.TransGen.single (byx:ℕf:ℕm:ℕj:ℕ⊢ BoundedEdge 19 { control := ControlWord.outside 92, regs := [m, 0, f, x, j] }
{ control := ControlWord.entry 0, regs := [m, 0, f, x, j + 0] } simpa using pc92 x 0 f m jAll goals completed! 🐙)
| succ v ih =>succx:ℕf:ℕm:ℕv:ℕih:∀ (j : ℕ),
Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, v, f, x, j] }
{ control := ControlWord.entry 0, regs := [m, 0, f, x, j + v] }j:ℕ⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, v + 1, f, x, j] }
{ control := ControlWord.entry 0, regs := [m, 0, f, x, j + (v + 1)] }
have h1 : Relation.TransGen (BoundedEdge 19) ⟨.outside 92,[m,v+1,f,x,j]⟩
⟨.outside 93,[m,v,f,x,j]⟩ := Relation.TransGen.single (byx:ℕf:ℕm:ℕv:ℕih:∀ (j : ℕ),
Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, v, f, x, j] }
{ control := ControlWord.entry 0, regs := [m, 0, f, x, j + v] }j:ℕ⊢ BoundedEdge 19 { control := ControlWord.outside 92, regs := [m, v + 1, f, x, j] }
{ control := ControlWord.outside 93, regs := [m, v, f, x, j] } simpa using pc92 x (v+1) f m jAll goals completed! 🐙)succx:ℕf:ℕm:ℕv:ℕih:∀ (j : ℕ),
Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, v, f, x, j] }
{ control := ControlWord.entry 0, regs := [m, 0, f, x, j + v] }j:ℕh1:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, v + 1, f, x, j] }
{ control := ControlWord.outside 93, regs := [m, v, f, x, j] }⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, v + 1, f, x, j] }
{ control := ControlWord.entry 0, regs := [m, 0, f, x, j + (v + 1)] }
have h2 := Relation.TransGen.single (pc93 x v f m j)succx:ℕf:ℕm:ℕv:ℕih:∀ (j : ℕ),
Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, v, f, x, j] }
{ control := ControlWord.entry 0, regs := [m, 0, f, x, j + v] }j:ℕh1:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, v + 1, f, x, j] }
{ control := ControlWord.outside 93, regs := [m, v, f, x, j] }h2:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 93, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 94, regs := [m, v, f, x, j + 1] }⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, v + 1, f, x, j] }
{ control := ControlWord.entry 0, regs := [m, 0, f, x, j + (v + 1)] }
have h3 := Relation.TransGen.single (pc94 x v f m (j+1))succx:ℕf:ℕm:ℕv:ℕih:∀ (j : ℕ),
Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, v, f, x, j] }
{ control := ControlWord.entry 0, regs := [m, 0, f, x, j + v] }j:ℕh1:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, v + 1, f, x, j] }
{ control := ControlWord.outside 93, regs := [m, v, f, x, j] }h2:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 93, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 94, regs := [m, v, f, x, j + 1] }h3:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 94, regs := [m, v, f, x, j + 1] }
{ control := ControlWord.outside 92, regs := [m, v, f, x, j + 1] }⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, v + 1, f, x, j] }
{ control := ControlWord.entry 0, regs := [m, 0, f, x, j + (v + 1)] }
have hj : j+(v+1) = (j+1)+v := byx:ℕv:ℕf:ℕm:ℕj:ℕ⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, v, f, x, j] }
{ control := ControlWord.entry 0, regs := [m, 0, f, x, j + v] } omegasuccx:ℕf:ℕm:ℕv:ℕih:∀ (j : ℕ),
Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, v, f, x, j] }
{ control := ControlWord.entry 0, regs := [m, 0, f, x, j + v] }j:ℕh1:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, v + 1, f, x, j] }
{ control := ControlWord.outside 93, regs := [m, v, f, x, j] }h2:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 93, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 94, regs := [m, v, f, x, j + 1] }h3:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 94, regs := [m, v, f, x, j + 1] }
{ control := ControlWord.outside 92, regs := [m, v, f, x, j + 1] }hj:j + (v + 1) = j + 1 + v⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, v + 1, f, x, j] }
{ control := ControlWord.entry 0, regs := [m, 0, f, x, j + (v + 1)] }
rw [hjsuccx:ℕf:ℕm:ℕv:ℕih:∀ (j : ℕ),
Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, v, f, x, j] }
{ control := ControlWord.entry 0, regs := [m, 0, f, x, j + v] }j:ℕh1:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, v + 1, f, x, j] }
{ control := ControlWord.outside 93, regs := [m, v, f, x, j] }h2:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 93, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 94, regs := [m, v, f, x, j + 1] }h3:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 94, regs := [m, v, f, x, j + 1] }
{ control := ControlWord.outside 92, regs := [m, v, f, x, j + 1] }hj:j + (v + 1) = j + 1 + v⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, v + 1, f, x, j] }
{ control := ControlWord.entry 0, regs := [m, 0, f, x, j + 1 + v] }]succx:ℕf:ℕm:ℕv:ℕih:∀ (j : ℕ),
Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, v, f, x, j] }
{ control := ControlWord.entry 0, regs := [m, 0, f, x, j + v] }j:ℕh1:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, v + 1, f, x, j] }
{ control := ControlWord.outside 93, regs := [m, v, f, x, j] }h2:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 93, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 94, regs := [m, v, f, x, j + 1] }h3:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 94, regs := [m, v, f, x, j + 1] }
{ control := ControlWord.outside 92, regs := [m, v, f, x, j + 1] }hj:j + (v + 1) = j + 1 + v⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, v + 1, f, x, j] }
{ control := ControlWord.entry 0, regs := [m, 0, f, x, j + 1 + v] }
exact h1.trans (h2.trans (h3.trans (ih (j+1))))All goals completed! 🐙theorem bounded_precredit_all (x v f m j : Nat) :
Relation.TransGen (BoundedEdge 19) ⟨.outside widthCallId,[m,v,f,x,j]⟩
⟨.entry 0,[m,0,f,x+j,j+v]⟩ := byx:ℕv:ℕf:ℕm:ℕj:ℕ⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside widthCallId, regs := [m, v, f, x, j] }
{ control := ControlWord.entry 0, regs := [m, 0, f, x + j, j + v] }
have h1 := precredit_consume x v f m jx:ℕv:ℕf:ℕm:ℕj:ℕh1:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 92, regs := [m, v + j, f, x + j, 0] }⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside widthCallId, regs := [m, v, f, x, j] }
{ control := ControlWord.entry 0, regs := [m, 0, f, x + j, j + v] }
have h2 := precredit_restore (x+j) (v+j) f m 0x:ℕv:ℕf:ℕm:ℕj:ℕh1:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 92, regs := [m, v + j, f, x + j, 0] }h2:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, v + j, f, x + j, 0] }
{ control := ControlWord.entry 0, regs := [m, 0, f, x + j, 0 + (v + j)] }⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside widthCallId, regs := [m, v, f, x, j] }
{ control := ControlWord.entry 0, regs := [m, 0, f, x + j, j + v] }
have hj : v+j = j+v := by omegax:ℕv:ℕf:ℕm:ℕj:ℕh1:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 88, regs := [m, v, f, x, j] }
{ control := ControlWord.outside 92, regs := [m, v + j, f, x + j, 0] }h2:Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside 92, regs := [m, v + j, f, x + j, 0] }
{ control := ControlWord.entry 0, regs := [m, 0, f, x + j, 0 + (v + j)] }hj:v + j = j + v⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside widthCallId, regs := [m, v, f, x, j] }
{ control := ControlWord.entry 0, regs := [m, 0, f, x + j, j + v] }
simpa only [widthCallId,Nat.zero_add,hj] using h1.trans h2All goals completed! 🐙theorem bounded_precredit (x j f : Nat) :
Relation.TransGen (BoundedEdge 19) ⟨.outside widthCallId,[0,0,f,x,j]⟩
⟨.entry 0,[0,0,f,x+j,j]⟩ := byx:ℕj:ℕf:ℕ⊢ Relation.TransGen (BoundedEdge 19) { control := ControlWord.outside widthCallId, regs := [0, 0, f, x, j] }
{ control := ControlWord.entry 0, regs := [0, 0, f, x + j, j] }
simpa only [Nat.add_zero] using bounded_precredit_all x 0 f 0 jAll goals completed! 🐙theorem bounded_precredit_width (x j f : Nat) :
Relation.TransGen (BoundedEdge (widthBudget j)) ⟨.outside widthCallId,[0,0,f,x,j]⟩
⟨if Algorithm.residual j f = 0 then .outside 0 else .outside finalHaltId,
[0,0,Algorithm.residual j f-1,x+j,0]⟩ := byx:ℕj:ℕf:ℕ⊢ Relation.TransGen (BoundedEdge (widthBudget j)) { control := ControlWord.outside widthCallId, regs := [0, 0, f, x, j] }
{ control := if Algorithm.residual j f = 0 then ControlWord.outside 0 else ControlWord.outside finalHaltId,
regs := [0, 0, Algorithm.residual j f - 1, x + j, 0] }
have hbudget : 19 ≤ widthBudget j := by
unfold widthBudgetx:ℕj:ℕf:ℕ⊢ 19 ≤ max 16 (10 + 5 * Riemann120.quarterClock j) + 5
have h := le_max_left 16 (10 + 5 * ConjectureMachines.Riemann120.quarterClock j)x:ℕj:ℕf:ℕh:16 ≤ max 16 (10 + 5 * Riemann120.quarterClock j)⊢ 19 ≤ max 16 (10 + 5 * Riemann120.quarterClock j) + 5
omegax:ℕj:ℕf:ℕhbudget:19 ≤ widthBudget j⊢ Relation.TransGen (BoundedEdge (widthBudget j)) { control := ControlWord.outside widthCallId, regs := [0, 0, f, x, j] }
{ control := if Algorithm.residual j f = 0 then ControlWord.outside 0 else ControlWord.outside finalHaltId,
regs := [0, 0, Algorithm.residual j f - 1, x + j, 0] }
have hp : Relation.TransGen (BoundedEdge (widthBudget j))
⟨.outside widthCallId,[0,0,f,x,j]⟩ ⟨.entry 0,[0,0,f,x+j,j]⟩ :=
Relation.TransGen.mono (r := BoundedEdge 19) (p := BoundedEdge (widthBudget j))
(fun _ _ h => ⟨h.1,le_trans h.2 hbudget⟩) _ _ (bounded_precredit x j f)x:ℕj:ℕf:ℕhbudget: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] }⊢ Relation.TransGen (BoundedEdge (widthBudget j)) { control := ControlWord.outside widthCallId, regs := [0, 0, f, x, j] }
{ control := if Algorithm.residual j f = 0 then ControlWord.outside 0 else ControlWord.outside finalHaltId,
regs := [0, 0, Algorithm.residual j f - 1, x + j, 0] }
exact hp.trans (bounded_width_outcome (x+j) j f)All goals completed! 🐙end ConjectureMachines.Riemann95.Control