Documentation

CslibFrontier.Computability.Machines.Turing.MultiTape.Complexity.PolyTime.CourseOfValues

Polynomial-time course-of-values tables #

Polynomial-time certificates for List.courseOfValues step n, where stage i reads the table of earlier values [val 0, …, val (i - 1)] and appends step of that prefix. Framed lists (encList encElem) need only a polynomial bound on (encElem (val i)).length along reachable prefixes i < n; raw Boolean stage tables (encBits) need no separate bound because each stage appends one bit.

Main results #

theorem Turing.MultiTapeTM.ComputableInPolyTime.courseOfValuesWith_of_tableBound {γ π β : Type} {encIn : γ ↪ List Bool} {encPar : π ↪ List Bool} {encElem : β ↪ List Bool} {encL : List β ↪ List Bool} {par : γ → π} {count : γ → ℕ} {step : π → List β → β} (hpar : ComputableInPolyTime par encIn encPar) (hcount : ComputableInPolyTime count encIn encUnary) (hstep : ComputableInPolyTime (fun (p : π × List β) => step p.1 p.2) (encPair encPar encL) encElem) (hsnoc : ComputableInPolyTime (fun (p : List β × β) => p.1 ++ [p.2]) (encPair encL encElem) encL) {bound : γ → ℕ} (hbound : PolyBounded (fun (x : γ) => (encIn x).length) bound) (htables : ∀ (x : γ), ∀ i ≤ count x, (encL (List.courseOfValues (step (par x)) i)).length ≤ bound x) :
ComputableInPolyTime (fun (x : γ) => List.courseOfValues (step (par x)) (count x)) encIn encL

Course-of-values certificate for any list encoding supporting single-element append. A captured parameter par, unary stage count count, and polynomial bound on the encoded reachable prefix tables List.courseOfValues (step (par x)) i (i ≤ count x) suffice.

theorem Turing.MultiTapeTM.ComputableInPolyTime.courseOfValuesWith {γ π β : Type} {encIn : γ ↪ List Bool} {encPar : π ↪ List Bool} {encElem : β ↪ List Bool} {par : γ → π} {count : γ → ℕ} {step : π → List β → β} (hpar : ComputableInPolyTime par encIn encPar) (hcount : ComputableInPolyTime count encIn encUnary) (hstep : ComputableInPolyTime (fun (p : π × List β) => step p.1 p.2) (encPair encPar (encList encElem)) encElem) {elemBound : γ → ℕ} (hbound : PolyBounded (fun (x : γ) => (encIn x).length) elemBound) (helem : ∀ (x : γ), ∀ i < count x, (encElem (List.courseOfValuesVal (step (par x)) i)).length ≤ elemBound x) :
ComputableInPolyTime (fun (x : γ) => List.courseOfValues (step (par x)) (count x)) encIn (encList encElem)

Course-of-values certificate for framed lists with a captured parameter par and unary stage count count. Only the values produced along reachable prefixes i < count x need a polynomial size bound.

theorem Turing.MultiTapeTM.ComputableInPolyTime.courseOfValuesWithInput {γ β : Type} {encIn : γ ↪ List Bool} {encElem : β ↪ List Bool} {count : γ → ℕ} {step : γ → List β → β} (hcount : ComputableInPolyTime count encIn encUnary) (hstep : ComputableInPolyTime (fun (p : γ × List β) => step p.1 p.2) (encPair encIn (encList encElem)) encElem) {elemBound : γ → ℕ} (hbound : PolyBounded (fun (x : γ) => (encIn x).length) elemBound) (helem : ∀ (x : γ), ∀ i < count x, (encElem (List.courseOfValuesVal (step x) i)).length ≤ elemBound x) :
ComputableInPolyTime (fun (x : γ) => List.courseOfValues (step x) (count x)) encIn (encList encElem)

Course-of-values recursion on framed lists capturing the original input directly.

theorem Turing.MultiTapeTM.ComputableInPolyTime.courseOfValues {β : Type} {encElem : β ↪ List Bool} {step : List β → β} (hstep : ComputableInPolyTime step (encList encElem) encElem) {elemBound : ℕ → ℕ} (hbound : Cslib.PolynomiallyBounded elemBound) (helem : ∀ (n i : ℕ), i < n → (encElem (List.courseOfValuesVal step i)).length ≤ elemBound n) :

Course-of-values recursion from unary stage n on framed lists. Bounding the encoded entry List.courseOfValuesVal step i for every i < n by a polynomially bounded function of n certifies List.courseOfValues step.

theorem Turing.MultiTapeTM.ComputableInPolyTime.courseOfValuesVal {β : Type} {encElem : β ↪ List Bool} {step : List β → β} (hstep : ComputableInPolyTime step (encList encElem) encElem) {elemBound : ℕ → ℕ} (hbound : Cslib.PolynomiallyBounded elemBound) (helem : ∀ (n i : ℕ), i < n → (encElem (List.courseOfValuesVal step i)).length ≤ elemBound n) :

Course-of-values value from unary stage n on framed lists.

theorem Turing.MultiTapeTM.ComputableInPolyTime.bitsCourseOfValuesWith {γ π : Type} {encIn : γ ↪ List Bool} {encPar : π ↪ List Bool} {par : γ → π} {count : γ → ℕ} {step : π → List Bool → Bool} (hpar : ComputableInPolyTime par encIn encPar) (hcount : ComputableInPolyTime count encIn encUnary) (hstep : ComputableInPolyTime (fun (p : π × List Bool) => step p.1 p.2) (encPair encPar encBits) encBool) :
ComputableInPolyTime (fun (x : γ) => List.courseOfValues (step (par x)) (count x)) encIn encBits

Course-of-values certificate for raw Boolean tables (encBits) with a captured parameter par and unary stage count count. No explicit element bound is needed because every stage appends one bit.

Course-of-values certificate for raw Boolean tables (encBits) from unary stage n. No explicit element bound is needed because every stage appends one bit.

Course-of-values Boolean value on encBits from unary stage n.