Timed completed runs on preloaded stock tape inputs
DefinitionPaddedSATWorkTimecomplexity-theoryformal-verification
A completed execution of an atomic Mathlib tape machine starts from the track-packed, reversed mission word. It records its successful transition count and its final halting configuration. The crossing-label width is the binary width of the finite source state set plus the two verdict labels and one absence marker.
Definition code
import Definitions.Def_PaddedSATIndex
set_option autoImplicit false
namespace PvsNP.PaddedSATWorkTime
open Turing Function
variable {K : Type} {Track : K → Type} [DecidableEq K]
variable {Q : Type} [Fintype Q] [Inhabited Q]
/-- A complete atomic execution starting from the track-packed input. -/
structure Completed (M : TM0.Machine (TM2to1.Γ' K Track) Q) (k : K) (toInput : Bool → Track k)
(bits : Str) where
steps : ℕ
last : TM0.Cfg (TM2to1.Γ' K Track) Q
walk : (fun x : Option (TM0.Cfg (TM2to1.Γ' K Track) Q) => x.bind (TM0.step M))^[steps]
(some (TM0.init (TM2to1.trInit k (bits.map toInput)))) = some last
halt : TM0.step M last = none
def labelBits (Q : Type) [Fintype Q] : ℕ := (Fintype.card (Sum Q Bool)+1).size
end PvsNP.PaddedSATWorkTime
Source
Mathlib TM0 and the mission binary CNF encoding.