Documentation

CslibFrontier.Computability.Machines.Turing.MultiTape.Probabilistic.ExplicitBlockNetwork.TablePolyTime

The tables of an explicit block-counting network in polynomial time #

The explicit block-counting network on numbers (Turing.MultiTapePTM.explicitNetworkNum) is computable in polynomial time from the input, the block length and the number of intervals in unary, and the schedule number in binary, provided that 2 ^ b is bounded by a computed unary number. Its tables have 2 ^ (number of ports) entries, at most (2 ^ b) ^ (2 (3 k + 1) (s + k + 4)), and each entry decodes letters by arithmetic and evaluates an interval count (Turing.MultiTapePTM.computableInPolyTime_localIntervalCount).

Main results #

Small numbers and digits #

Decoding letters #

theorem Turing.MultiTapePTM.computableInPolyTime_decodeControlData {k s : ℕ} {State α : Type} {inp : α ↪ List Bool} [Finite State] (e : State ≃ Fin s) {b n : α → ℕ} (hb : MultiTapeTM.ComputableInPolyTime b inp MultiTapeTM.encUnary) (hb0 : ∀ (a : α), 0 < b a) (hn : MultiTapeTM.ComputableInPolyTime n inp MultiTapeTM.encNat) :

Control records of numbers are polynomial-time, on plain data.

theorem Turing.MultiTapePTM.computableInPolyTime_controlDataOfNum {k s : ℕ} {State α : Type} {inp : α ↪ List Bool} [Finite State] (e : State ≃ Fin s) {b n : α → ℕ} (hb : MultiTapeTM.ComputableInPolyTime b inp MultiTapeTM.encUnary) (hb0 : ∀ (a : α), 0 < b a) (hn : MultiTapeTM.ComputableInPolyTime n inp MultiTapeTM.encNat) :

Entering control records from letter numbers are polynomial-time.

Block indices, movements and the entering window #

Block indices as digit counts are polynomial-time.

Block movements of a schedule number are polynomial-time.

The tensor of an interval #

The cells of a window entering an interval are polynomial-time.

The cells of a window leaving an interval are polynomial-time.

theorem Turing.MultiTapePTM.computableInPolyTime_intervalEntryNum {k s : ℕ} {State α : Type} {inp : α ↪ List Bool} [Finite State] [DecidableEq State] (e : State ≃ Fin s) (machine : MultiTapePTM k Bool State) {x : α → List Bool} {b q σ cap : α → ℕ} {L : α → ℕ → ℕ} {i : α → ℕ} (hx : MultiTapeTM.ComputableInPolyTime x inp MultiTapeTM.encBits) (hb : MultiTapeTM.ComputableInPolyTime b inp MultiTapeTM.encUnary) (hb0 : ∀ (a : α), 0 < b a) (hq : MultiTapeTM.ComputableInPolyTime q inp MultiTapeTM.encUnary) (hσ : MultiTapeTM.ComputableInPolyTime σ inp MultiTapeTM.encNat) (hcap : MultiTapeTM.ComputableInPolyTime cap inp MultiTapeTM.encUnary) (h2b : ∀ (a : α), 2 ^ b a ≤ cap a) (hL : MultiTapeTM.ComputableInPolyTime (fun (p : α × ℕ) => L p.1 p.2) (MultiTapeTM.encPair inp MultiTapeTM.encUnary) MultiTapeTM.encNat) (hi : MultiTapeTM.ComputableInPolyTime i inp MultiTapeTM.encUnary) :
MultiTapeTM.ComputableInPolyTime (fun (a : α) => intervalEntryNum e (b a) machine (x a) (q a) (σ a) (L a) (i a)) inp MultiTapeTM.encUnary

The tensor of an interval on numbers is polynomial-time, from the letter numbers of the edges, when 2 ^ b is bounded by a computed unary number.

Reading letters and the tables #

Letter numbers read from table indices are polynomial-time.

The letter numbers read at an old vertex are polynomial-time, at a computed edge number.

theorem Turing.MultiTapePTM.computableInPolyTime_tableEntryNum {k s : ℕ} {State α : Type} {inp : α ↪ List Bool} [Finite State] [DecidableEq State] (e : State ≃ Fin s) (machine : MultiTapePTM k Bool State) {x : α → List Bool} {b q σ cap v j : α → ℕ} {P : α → List ℕ} (hx : MultiTapeTM.ComputableInPolyTime x inp MultiTapeTM.encBits) (hb : MultiTapeTM.ComputableInPolyTime b inp MultiTapeTM.encUnary) (hb0 : ∀ (a : α), 0 < b a) (hq : MultiTapeTM.ComputableInPolyTime q inp MultiTapeTM.encUnary) (hσ : MultiTapeTM.ComputableInPolyTime σ inp MultiTapeTM.encNat) (hcap : MultiTapeTM.ComputableInPolyTime cap inp MultiTapeTM.encUnary) (h2b : ∀ (a : α), 2 ^ b a ≤ cap a) (hv : MultiTapeTM.ComputableInPolyTime v inp MultiTapeTM.encUnary) (hP : MultiTapeTM.ComputableInPolyTime P inp (MultiTapeTM.encList MultiTapeTM.encNat)) (hj : MultiTapeTM.ComputableInPolyTime j inp MultiTapeTM.encUnary) :
MultiTapeTM.ComputableInPolyTime (fun (a : α) => tableEntryNum e (b a) machine (x a) (q a) (σ a) (v a) (P a) (j a)) inp MultiTapeTM.encNat

Table entries on numbers are polynomial-time.

theorem Turing.MultiTapePTM.computableInPolyTime_explicitTableNum {k s : ℕ} {State α : Type} {inp : α ↪ List Bool} [Finite State] [DecidableEq State] (e : State ≃ Fin s) (machine : MultiTapePTM k Bool State) {x : α → List Bool} {b q σ cap v : α → ℕ} (hx : MultiTapeTM.ComputableInPolyTime x inp MultiTapeTM.encBits) (hb : MultiTapeTM.ComputableInPolyTime b inp MultiTapeTM.encUnary) (hb0 : ∀ (a : α), 0 < b a) (hq : MultiTapeTM.ComputableInPolyTime q inp MultiTapeTM.encUnary) (hσ : MultiTapeTM.ComputableInPolyTime σ inp MultiTapeTM.encNat) (hcap : MultiTapeTM.ComputableInPolyTime cap inp MultiTapeTM.encUnary) (h2b : ∀ (a : α), 2 ^ b a ≤ cap a) (hv : MultiTapeTM.ComputableInPolyTime v inp MultiTapeTM.encUnary) :
MultiTapeTM.ComputableInPolyTime (fun (a : α) => explicitTableNum e (b a) machine (x a) (q a) (σ a) (v a)) inp (MultiTapeTM.encList MultiTapeTM.encNat)

Tables on numbers are polynomial-time.

The explicit block-counting network on numbers is polynomial-time, as its number of edges in unary and its list of vertices, each the pair of its ports and its table as lists of binary numbers.