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.Riemann95Definition
public import Cryptids.Zf380Blank-tape initialization
@[expose] public sectionFinite execution certificate
sectionnamespace ConjectureMachines.Riemann95.BootCertificateopen Turingopen ConjectureMachinesdef finalL : List (Fin 2) := [1, 0, 0, 0]def finalR : List (Fin 2) := [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]theorem boot_fast :
Zf380.runFast machine 3634 0 [] 0 [] = some (15, finalL, 0, finalR) := ⊢ Zf380.runFast machine 3634 0 [] 0 [] = some (15, finalL, 0, finalR)
All goals completed! 🐙end ConjectureMachines.Riemann95.BootCertificateendFull tape and halting equivalence
sectionnamespace ConjectureMachines.Riemann95.BootCertificateopen Turingopen ConjectureMachinesopen ConjectureMachines.Semantics.Riemann.Layer1 (default_cons_zero)theorem finalCfg_eq_initialRoot :
Zf380.cfgOfFast 15 finalL 0 finalR = initialRoot := ⊢ Zf380.cfgOfFast 15 finalL 0 finalR = initialRoot
hL:ListBlank.append finalL default = ListBlank.cons 1 default⊢ Zf380.cfgOfFast 15 finalL 0 finalR = initialRoot
hL:ListBlank.append finalL default = ListBlank.cons 1 defaulthR:ListBlank.cons 0 (ListBlank.append finalR default) =
ListBlank.mk
(Riemann120.mapStack [] ++ List.replicate (22 - (Riemann120.mapStack []).length) 0 ++ [1, 0] ++
Semantics.Riemann.Layer1.encodeRegs (initialRegs ++ initialExtra))⊢ Zf380.cfgOfFast 15 finalL 0 finalR = initialRoot
unfold Zf380.cfgOfFast initialRoot hL:ListBlank.append finalL default = ListBlank.cons 1 defaulthR:ListBlank.cons 0 (ListBlank.append finalR default) =
ListBlank.mk
(Riemann120.mapStack [] ++ List.replicate (22 - (Riemann120.mapStack []).length) 0 ++ [1, 0] ++
Semantics.Riemann.Layer1.encodeRegs (initialRegs ++ initialExtra))⊢ { state := 15,
tape := Tape.mk' (ListBlank.append finalL default) (ListBlank.cons 0 (ListBlank.append finalR default)) } =
{ state := 15,
tape :=
Tape.mk' (ListBlank.cons 1 default)
(ListBlank.mk
(Riemann120.mapStack [] ++ List.replicate (22 - (Riemann120.mapStack []).length) 0 ++ [1, 0] ++
Semantics.Riemann.Layer1.encodeRegs (initialRegs ++ initialExtra))) }
rw [hL, hL:ListBlank.append finalL default = ListBlank.cons 1 defaulthR:ListBlank.cons 0 (ListBlank.append finalR default) =
ListBlank.mk
(Riemann120.mapStack [] ++ List.replicate (22 - (Riemann120.mapStack []).length) 0 ++ [1, 0] ++
Semantics.Riemann.Layer1.encodeRegs (initialRegs ++ initialExtra))⊢ { state := 15, tape := Tape.mk' (ListBlank.cons 1 default) (ListBlank.cons 0 (ListBlank.append finalR default)) } =
{ state := 15,
tape :=
Tape.mk' (ListBlank.cons 1 default)
(ListBlank.mk
(Riemann120.mapStack [] ++ List.replicate (22 - (Riemann120.mapStack []).length) 0 ++ [1, 0] ++
Semantics.Riemann.Layer1.encodeRegs (initialRegs ++ initialExtra))) } hR hL:ListBlank.append finalL default = ListBlank.cons 1 defaulthR:ListBlank.cons 0 (ListBlank.append finalR default) =
ListBlank.mk
(Riemann120.mapStack [] ++ List.replicate (22 - (Riemann120.mapStack []).length) 0 ++ [1, 0] ++
Semantics.Riemann.Layer1.encodeRegs (initialRegs ++ initialExtra))⊢ { state := 15,
tape :=
Tape.mk' (ListBlank.cons 1 default)
(ListBlank.mk
(Riemann120.mapStack [] ++ List.replicate (22 - (Riemann120.mapStack []).length) 0 ++ [1, 0] ++
Semantics.Riemann.Layer1.encodeRegs (initialRegs ++ initialExtra))) } =
{ state := 15,
tape :=
Tape.mk' (ListBlank.cons 1 default)
(ListBlank.mk
(Riemann120.mapStack [] ++ List.replicate (22 - (Riemann120.mapStack []).length) 0 ++ [1, 0] ++
Semantics.Riemann.Layer1.encodeRegs (initialRegs ++ initialExtra))) }] All goals completed! 🐙theorem nSteps_eq (n : Nat) (c : Cfg 95 2) :
Riemann95.nSteps n c = Zf380.nSteps machine n c := by n:ℕc:Cfg 95 2⊢ nSteps n c = Zf380.nSteps machine n c
induction n generalizing c with
| zero => zero c:Cfg 95 2⊢ nSteps 0 c = Zf380.nSteps machine 0 c rfl All goals completed! 🐙
| succ n ih => succ n:ℕih:∀ (c : Cfg 95 2), nSteps n c = Zf380.nSteps machine n cc:Cfg 95 2⊢ nSteps (n + 1) c = Zf380.nSteps machine (n + 1) c
change (step machine c).bind (Riemann95.nSteps n) =
(step machine c).bind (Zf380.nSteps machine n) succ n:ℕih:∀ (c : Cfg 95 2), nSteps n c = Zf380.nSteps machine n cc:Cfg 95 2⊢ (step machine c).bind (nSteps n) = (step machine c).bind (Zf380.nSteps machine n)
congr 1 succ.e_a n:ℕih:∀ (c : Cfg 95 2), nSteps n c = Zf380.nSteps machine n cc:Cfg 95 2⊢ nSteps n = Zf380.nSteps machine n
funext d succ.e_a n:ℕih:∀ (c : Cfg 95 2), nSteps n c = Zf380.nSteps machine n cc:Cfg 95 2d:Cfg 95 2⊢ nSteps n d = Zf380.nSteps machine n d
exact ih d All goals completed! 🐙Exact 3,634-step blank bootstrap, including the full tape.
theorem boot_reaches_initialRoot :
Riemann95.nSteps 3634 (init : Cfg 95 2) = some initialRoot := by ⊢ nSteps 3634 init = some initialRoot
rw [nSteps_eq, ⊢ Zf380.nSteps machine 3634 init = some initialRoot Zf380.init_eq_cfgOfFast, ⊢ Zf380.nSteps machine 3634 (Zf380.cfgOfFast 0 [] 0 []) = some initialRoot Zf380.nSteps_of_runFast, ⊢ Option.map (fun x ↦ Zf380.cfgOfFast x.1 x.2.1 x.2.2.1 x.2.2.2) (Zf380.runFast machine 3634 0 [] 0 []) = some initialRoot
boot_fast, ⊢ Option.map (fun x ↦ Zf380.cfgOfFast x.1 x.2.1 x.2.2.1 x.2.2.2) (some (15, finalL, 0, finalR)) = some initialRoot Option.map_some ⊢ some
(Zf380.cfgOfFast (15, finalL, 0, finalR).1 (15, finalL, 0, finalR).2.1 (15, finalL, 0, finalR).2.2.1
(15, finalL, 0, finalR).2.2.2) =
some initialRoot] ⊢ some
(Zf380.cfgOfFast (15, finalL, 0, finalR).1 (15, finalL, 0, finalR).2.1 (15, finalL, 0, finalR).2.2.1
(15, finalL, 0, finalR).2.2.2) =
some initialRoot
rw [finalCfg_eq_initialRoot ⊢ some initialRoot = some initialRoot] All goals completed! 🐙The finite prefix may be removed from the remaining halting proof.
theorem halts_iff_initialRoot :
Halts candidate ↔ (StateTransition.eval (step machine) initialRoot).Dom := by ⊢ candidate.Halts ↔ (StateTransition.eval (step machine) initialRoot).Dom
change (StateTransition.eval (step machine) (init : Cfg 95 2)).Dom ↔ _ ⊢ (StateTransition.eval (step machine) init).Dom ↔ (StateTransition.eval (step machine) initialRoot).Dom
have h : Zf380.nSteps machine 3634 (init : Cfg 95 2) = some initialRoot := by ⊢ candidate.Halts ↔ (StateTransition.eval (step machine) initialRoot).Dom
rw [← nSteps_eq ⊢ nSteps 3634 init = some initialRoot] ⊢ nSteps 3634 init = some initialRoot
exact boot_reaches_initialRoot h:Zf380.nSteps machine 3634 init = some initialRoot⊢ (StateTransition.eval (step machine) init).Dom ↔ (StateTransition.eval (step machine) initialRoot).Dom
exact Zf380.nSteps_eval_dom h All goals completed! 🐙end ConjectureMachines.Riemann95.BootCertificateend