The graph of an explicit block-counting network in polynomial time #
The ports of the vertices of the explicit block-counting networks, on numbers
(Turing.MultiTapePTM.explicitPortsNum), are computable in polynomial time from the number of
intervals and the number of bits of a letter in unary and the schedule number in binary. Every
step is arithmetic on numbers polynomial in the input, except the digits of the schedule number,
which are read in binary.
Main results #
Turing.MultiTapePTM.computableInPolyTime_digitCount,Turing.MultiTapePTM.computableInPolyTime_firstAfterNum,Turing.MultiTapePTM.computableInPolyTime_edgeTargetNum: digit counts, next appearances and edge targets.Turing.MultiTapePTM.computableInPolyTime_explicitSrcNum,Turing.MultiTapePTM.computableInPolyTime_explicitTgtNum: the endpoints of the explicit edges.Turing.MultiTapePTM.computableInPolyTime_explicitPortsNum: the ports of a vertex, as a list of binary numbers.
theorem Turing.MultiTapePTM.computableInPolyTime_digitCount {k : ℕ} {α : Type} {input : α ↪ List Bool} {σ c δ i : α → ℕ} (hσ : MultiTapeTM.ComputableInPolyTime σ input MultiTapeTM.encNat) (hc : MultiTapeTM.ComputableInPolyTime c input MultiTapeTM.encUnary) (hδ : MultiTapeTM.ComputableInPolyTime δ input MultiTapeTM.encUnary) (hi : MultiTapeTM.ComputableInPolyTime i input MultiTapeTM.encUnary) :
MultiTapeTM.ComputableInPolyTime (fun (a : α) => digitCount k (σ a) (c a) (δ a) (i a)) input MultiTapeTM.encUnary
Digit counts are polynomial-time.
theorem Turing.MultiTapePTM.computableInPolyTime_inWindowNum {k : ℕ} {α : Type} {input : α ↪ List Bool} {σ c i δ i' : α → ℕ} (hσ : MultiTapeTM.ComputableInPolyTime σ input MultiTapeTM.encNat) (hc : MultiTapeTM.ComputableInPolyTime c input MultiTapeTM.encUnary) (hi : MultiTapeTM.ComputableInPolyTime i input MultiTapeTM.encUnary) (hδ : MultiTapeTM.ComputableInPolyTime δ input MultiTapeTM.encUnary) (hi' : MultiTapeTM.ComputableInPolyTime i' input MultiTapeTM.encUnary) :
MultiTapeTM.ComputableInPolyTime (fun (a : α) => inWindowNum k (σ a) (c a) (i a) (δ a) (i' a)) input MultiTapeTM.encBool
Windows on numbers are polynomial-time.
theorem Turing.MultiTapePTM.computableInPolyTime_firstAfterNum {k : ℕ} {α : Type} {input : α ↪ List Bool} {q σ c i δ : α → ℕ} (hq : MultiTapeTM.ComputableInPolyTime q input MultiTapeTM.encUnary) (hσ : MultiTapeTM.ComputableInPolyTime σ input MultiTapeTM.encNat) (hc : MultiTapeTM.ComputableInPolyTime c input MultiTapeTM.encUnary) (hi : MultiTapeTM.ComputableInPolyTime i input MultiTapeTM.encUnary) (hδ : MultiTapeTM.ComputableInPolyTime δ input MultiTapeTM.encUnary) :
MultiTapeTM.ComputableInPolyTime (fun (a : α) => firstAfterNum k (q a) (σ a) (c a) (i a) (δ a)) input
(MultiTapeTM.encOption MultiTapeTM.encUnary)
Next appearances are polynomial-time: a search over the intervals.
theorem Turing.MultiTapePTM.computableInPolyTime_edgeTargetNum {k : ℕ} {α : Type} {input : α ↪ List Bool} {q σ n : α → ℕ} (hq : MultiTapeTM.ComputableInPolyTime q input MultiTapeTM.encUnary) (hσ : MultiTapeTM.ComputableInPolyTime σ input MultiTapeTM.encNat) (hn : MultiTapeTM.ComputableInPolyTime n input MultiTapeTM.encUnary) :
MultiTapeTM.ComputableInPolyTime (fun (a : α) => edgeTargetNum k (q a) (σ a) (n a)) input MultiTapeTM.encUnary
Edge targets are polynomial-time.
theorem Turing.MultiTapePTM.computableInPolyTime_explicitSrcNum {k : ℕ} {α : Type} {input : α ↪ List Bool} {q m σ j : α → ℕ} (hq : MultiTapeTM.ComputableInPolyTime q input MultiTapeTM.encUnary) (hm : MultiTapeTM.ComputableInPolyTime m input MultiTapeTM.encUnary) (hσ : MultiTapeTM.ComputableInPolyTime σ input MultiTapeTM.encNat) (hj : MultiTapeTM.ComputableInPolyTime j input MultiTapeTM.encUnary) :
MultiTapeTM.ComputableInPolyTime (fun (a : α) => explicitSrcNum k (q a) (m a) (σ a) (j a)) input MultiTapeTM.encUnary
The sources of the explicit edges are polynomial-time.
theorem Turing.MultiTapePTM.computableInPolyTime_explicitTgtNum {k : ℕ} {α : Type} {input : α ↪ List Bool} {q m j : α → ℕ} (hq : MultiTapeTM.ComputableInPolyTime q input MultiTapeTM.encUnary) (hm : MultiTapeTM.ComputableInPolyTime m input MultiTapeTM.encUnary) (hj : MultiTapeTM.ComputableInPolyTime j input MultiTapeTM.encUnary) :
MultiTapeTM.ComputableInPolyTime (fun (a : α) => explicitTgtNum k (q a) (m a) (j a)) input MultiTapeTM.encUnary
The targets of the explicit edges are polynomial-time.
theorem Turing.MultiTapePTM.computableInPolyTime_explicitPortsNum {k : ℕ} {α : Type} {input : α ↪ List Bool} {q m σ v : α → ℕ} (hq : MultiTapeTM.ComputableInPolyTime q input MultiTapeTM.encUnary) (hm : MultiTapeTM.ComputableInPolyTime m input MultiTapeTM.encUnary) (hσ : MultiTapeTM.ComputableInPolyTime σ input MultiTapeTM.encNat) (hv : MultiTapeTM.ComputableInPolyTime v input MultiTapeTM.encUnary) :
MultiTapeTM.ComputableInPolyTime (fun (a : α) => explicitPortsNum k (q a) (m a) (σ a) (v a)) input
(MultiTapeTM.encList MultiTapeTM.encNat)
The ports of a vertex are polynomial-time, as a list of binary numbers.