Documentation

CslibFrontier.Computability.GenericRAM.Native.ExpTimePolySpace.Iteration

Binary-counted iteration in factored time and polynomial space #

A native binary-counted iteration (Cslib.GenericRAM.NativeCertificate.iterate) runs in time (count a + 1) * K a times a polynomial and in polynomial space whenever the round count and initial state are produced in polynomial time, every reached state has polynomially bounded encoded length, and every reached round runs in time K a times a polynomial and polynomial space.

Main results #

theorem Cslib.GenericRAM.NativeCertificate.FactorTimePolySpace.iterate_of_bounds {α β : Type} {enc : α ↪ List Bool} {encState : β ↪ List Bool} {count : α → ℕ} {init : α → β} {step : β → β} (cn : NativeCertificate count enc Turing.MultiTapeTM.encNat) (ci : NativeCertificate init enc encState) (cs : NativeCertificate step encState encState) (hcn : cn.IsPolynomial) (hci : ci.IsPolynomial) {K R Q B : α → ℕ} (hK : ∀ (a : α), 1 ≤ K a) (hR : Turing.MultiTapeTM.PolyBounded (fun (a : α) => (enc a).length) R) (hQ : Turing.MultiTapeTM.PolyBounded (fun (a : α) => (enc a).length) Q) (hB : Turing.MultiTapeTM.PolyBounded (fun (a : α) => (enc a).length) B) (ht : ∀ (a : α), ∀ j ≤ count a, cs.time (step^[j] (init a)) ≤ K a * R a) (hs : ∀ (a : α), ∀ j ≤ count a, cs.space (step^[j] (init a)) ≤ Q a) (hb : ∀ (a : α), ∀ j ≤ count a, (encState (step^[j] (init a))).length ≤ B a) :
(cn.iterate ci cs).FactorTimePolySpace fun (a : α) => (count a + 1) * K a

Binary-counted iteration under explicit reachable-round bounds. Every reached round j ≤ count a uses time at most K a * R a and workspace at most Q a, where R, Q and the live-state bound B are polynomially bounded in the input length.

theorem Cslib.GenericRAM.NativeCertificate.FactorTimePolySpace.iterate {α β : Type} {enc : α ↪ List Bool} {encState : β ↪ List Bool} {count : α → ℕ} {init : α → β} {step : β → β} (cn : NativeCertificate count enc Turing.MultiTapeTM.encNat) (ci : NativeCertificate init enc encState) (cs : NativeCertificate step encState encState) {Ks : β → ℕ} {K B : α → ℕ} (hcn : cn.IsPolynomial) (hci : ci.IsPolynomial) (hcs : cs.FactorTimePolySpace Ks) (hK : ∀ (a : α), 1 ≤ K a) (hB : Turing.MultiTapeTM.PolyBounded (fun (a : α) => (enc a).length) B) (hKs : ∀ (a : α), ∀ j ≤ count a, Ks (step^[j] (init a)) ≤ K a) (hb : ∀ (a : α), ∀ j ≤ count a, (encState (step^[j] (init a))).length ≤ B a) :
(cn.iterate ci cs).FactorTimePolySpace fun (a : α) => (count a + 1) * K a

Binary-counted iteration of a FactorTimePolySpace step certificate under a polynomial reachable-state length bound B and a per-input bound K a on the step factor.

theorem Cslib.GenericRAM.NativeCertificate.ExpTimePolySpace.iterate_of_bounds {α β : Type} {enc : α ↪ List Bool} {encState : β ↪ List Bool} {count : α → ℕ} {init : α → β} {step : β → β} {E R Q B : α → ℕ} (cn : NativeCertificate count enc Turing.MultiTapeTM.encNat) (ci : NativeCertificate init enc encState) (cs : NativeCertificate step encState encState) (hcn : cn.IsPolynomial) (hci : ci.IsPolynomial) (hcount : Turing.MultiTapeTM.PolyBounded (fun (a : α) => (enc a).length) count) (hR : Turing.MultiTapeTM.PolyBounded (fun (a : α) => (enc a).length) R) (hQ : Turing.MultiTapeTM.PolyBounded (fun (a : α) => (enc a).length) Q) (hB : Turing.MultiTapeTM.PolyBounded (fun (a : α) => (enc a).length) B) (ht : ∀ (a : α), ∀ j ≤ count a, cs.time (step^[j] (init a)) ≤ R a * 2 ^ E a) (hs : ∀ (a : α), ∀ j ≤ count a, cs.space (step^[j] (init a)) ≤ Q a) (hb : ∀ (a : α), ∀ j ≤ count a, (encState (step^[j] (init a))).length ≤ B a) :

Polynomially many adaptive calls preserve the common exponential time factor. The round count and state bounds are measured against the original encoded input. Every reached round, including the terminal state, must use time at most R a * 2 ^ E a and space at most Q a, where R, Q and the live-state bound B are polynomially bounded.