Documentation

CslibFrontier.Computability.Machines.Turing.MultiTape.Universal.Encoding

Encodings shared by universal multi-tape machines #

This module contains the low-level encodings of deterministic universal-machine symbols, transition keys and actions. It is intentionally independent of the universal interpreter's complexity proofs so other finite machine descriptions can reuse the same encoded words and generated projection certificates.

Main definitions #

Main results #

The enc_structure declarations generate the scoped projection and constructor certificates used by the universal interpreter's complexity proofs.

References #

These encodings are extracted unchanged from the deterministic universal-machine development.

@[reducible, inline]

Symbols and blanks.

theorem Turing.MultiTapeTM.Universal.eKey_work_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → Key} :
ComputableInPolyTime g✝ encIn✝ eKey → ComputableInPolyTime (fun (c : γ✝) => (g✝ c).work) encIn✝ (encList eSym)

Keys of transitions, as their fields.

theorem Turing.MultiTapeTM.Universal.eKey_mk_deg :
ComputableInDegree (fun (p : ℕ × Option ℕ × List (Option ℕ)) => { state := p.1, input := p.2.1, work := p.2.2 }) eKeyFields eKey 1 1
theorem Turing.MultiTapeTM.Universal.eKey_mk_inO {γ : Type} {encIn : γ ↪ List Bool} {x0 T0 S0 : γ → ℕ} {x1 : γ → Option ℕ} {T1 S1 : γ → ℕ} {x2 : γ → List (Option ℕ)} {T2 S2 : γ → ℕ} (h0 : ComputableInO x0 encIn encUnary T0 S0) (h1 : ComputableInO x1 encIn eSym T1 S1) (h2 : ComputableInO x2 encIn (encList eSym) T2 S2) :
ComputableInO (fun (x : γ) => { state := x0 x, input := x1 x, work := x2 x }) encIn eKey (fun (x : γ) => T0 x + (T1 x + T2 x)) fun (x : γ) => S0 x + (S1 x + S2 x)
theorem Turing.MultiTapeTM.Universal.eKey_input_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → Key} :
ComputableInPolyTime g✝ encIn✝ eKey → ComputableInPolyTime (fun (c : γ✝) => (g✝ c).input) encIn✝ eSym
@[reducible, inline]

The tuple of the fields of eKey.

theorem Turing.MultiTapeTM.Universal.eKey_mk_budget {γ : Type} {encIn : γ ↪ List Bool} {budget x0 : γ → ℕ} {x1 : γ → Option ℕ} {x2 : γ → List (Option ℕ)} (h0 : ComputableInSpace x0 encIn encUnary budget) (h1 : ComputableInSpace x1 encIn eSym budget) (h2 : ComputableInSpace x2 encIn (encList eSym) budget) :
ComputableInSpace (fun (x : γ) => { state := x0 x, input := x1 x, work := x2 x }) encIn eKey budget
theorem Turing.MultiTapeTM.Universal.eKey_input_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Key} :
ComputableInSpace g✝ encIn✝ eKey S✝ → ComputableInSpace (fun (c : γ✝) => (g✝ c).input) encIn✝ eSym S✝
theorem Turing.MultiTapeTM.Universal.eKey_mk_polyTime {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → ℕ} {x1 : γ → Option ℕ} {x2 : γ → List (Option ℕ)} (h0 : ComputableInPolyTime x0 encIn encUnary) (h1 : ComputableInPolyTime x1 encIn eSym) (h2 : ComputableInPolyTime x2 encIn (encList eSym)) :
ComputableInPolyTime (fun (x : γ) => { state := x0 x, input := x1 x, work := x2 x }) encIn eKey
theorem Turing.MultiTapeTM.Universal.eKey_state_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Key} :
ComputableInSpace g✝ encIn✝ eKey S✝ → ComputableInSpace (fun (c : γ✝) => (g✝ c).state) encIn✝ encUnary S✝
theorem Turing.MultiTapeTM.Universal.eKey_state_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → Key} :
ComputableInPolyTime g✝ encIn✝ eKey → ComputableInPolyTime (fun (c : γ✝) => (g✝ c).state) encIn✝ encUnary
theorem Turing.MultiTapeTM.Universal.eKey_work_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Key} :
ComputableInSpace g✝ encIn✝ eKey S✝ → ComputableInSpace (fun (c : γ✝) => (g✝ c).work) encIn✝ (encList eSym) S✝
@[reducible, inline]

An action on a work tape.

@[reducible, inline]

Actions on a work tape.

theorem Turing.MultiTapeTM.Universal.eAct_inputTape_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Act} :
ComputableInSpace g✝ encIn✝ eAct S✝ → ComputableInSpace (fun (c : γ✝) => (g✝ c).inputTape) encIn✝ encSign S✝
theorem Turing.MultiTapeTM.Universal.eAct_workTapes_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → Act} :
ComputableInPolyTime g✝ encIn✝ eAct → ComputableInPolyTime (fun (c : γ✝) => (g✝ c).workTapes) encIn✝ (encList eTA)
theorem Turing.MultiTapeTM.Universal.eAct_mk_polyTime {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → SignType} {x1 : γ → List (Option (Option ℕ) × SignType)} {x2 x3 : γ → Option ℕ} (h0 : ComputableInPolyTime x0 encIn encSign) (h1 : ComputableInPolyTime x1 encIn (encList eTA)) (h2 : ComputableInPolyTime x2 encIn eSym) (h3 : ComputableInPolyTime x3 encIn eSym) :
ComputableInPolyTime (fun (x : γ) => { inputTape := x0 x, workTapes := x1 x, output := x2 x, state := x3 x }) encIn eAct
theorem Turing.MultiTapeTM.Universal.eAct_mk_budget {γ : Type} {encIn : γ ↪ List Bool} {budget : γ → ℕ} {x0 : γ → SignType} {x1 : γ → List (Option (Option ℕ) × SignType)} {x2 x3 : γ → Option ℕ} (h0 : ComputableInSpace x0 encIn encSign budget) (h1 : ComputableInSpace x1 encIn (encList eTA) budget) (h2 : ComputableInSpace x2 encIn eSym budget) (h3 : ComputableInSpace x3 encIn eSym budget) :
ComputableInSpace (fun (x : γ) => { inputTape := x0 x, workTapes := x1 x, output := x2 x, state := x3 x }) encIn eAct budget
theorem Turing.MultiTapeTM.Universal.eAct_mk_inO {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → SignType} {T0 S0 : γ → ℕ} {x1 : γ → List (Option (Option ℕ) × SignType)} {T1 S1 : γ → ℕ} {x2 : γ → Option ℕ} {T2 S2 : γ → ℕ} {x3 : γ → Option ℕ} {T3 S3 : γ → ℕ} (h0 : ComputableInO x0 encIn encSign T0 S0) (h1 : ComputableInO x1 encIn (encList eTA) T1 S1) (h2 : ComputableInO x2 encIn eSym T2 S2) (h3 : ComputableInO x3 encIn eSym T3 S3) :
ComputableInO (fun (x : γ) => { inputTape := x0 x, workTapes := x1 x, output := x2 x, state := x3 x }) encIn eAct (fun (x : γ) => T0 x + (T1 x + (T2 x + T3 x))) fun (x : γ) => S0 x + (S1 x + (S2 x + S3 x))
theorem Turing.MultiTapeTM.Universal.eAct_inputTape_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → Act} :
ComputableInPolyTime g✝ encIn✝ eAct → ComputableInPolyTime (fun (c : γ✝) => (g✝ c).inputTape) encIn✝ encSign
theorem Turing.MultiTapeTM.Universal.eAct_workTapes_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Act} :
ComputableInSpace g✝ encIn✝ eAct S✝ → ComputableInSpace (fun (c : γ✝) => (g✝ c).workTapes) encIn✝ (encList eTA) S✝
theorem Turing.MultiTapeTM.Universal.eAct_state_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Act} :
ComputableInSpace g✝ encIn✝ eAct S✝ → ComputableInSpace (fun (c : γ✝) => (g✝ c).state) encIn✝ eSym S✝
theorem Turing.MultiTapeTM.Universal.eAct_mk_deg :
ComputableInDegree (fun (p : SignType × List (Option (Option ℕ) × SignType) × Option ℕ × Option ℕ) => { inputTape := p.1, workTapes := p.2.1, output := p.2.2.1, state := p.2.2.2 }) eActFields eAct 1 1
theorem Turing.MultiTapeTM.Universal.eAct_state_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → Act} :
ComputableInPolyTime g✝ encIn✝ eAct → ComputableInPolyTime (fun (c : γ✝) => (g✝ c).state) encIn✝ eSym
theorem Turing.MultiTapeTM.Universal.eAct_output_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Act} :
ComputableInSpace g✝ encIn✝ eAct S✝ → ComputableInSpace (fun (c : γ✝) => (g✝ c).output) encIn✝ eSym S✝
theorem Turing.MultiTapeTM.Universal.eAct_output_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → Act} :
ComputableInPolyTime g✝ encIn✝ eAct → ComputableInPolyTime (fun (c : γ✝) => (g✝ c).output) encIn✝ eSym