Documentation

CslibFrontier.Computability.Machines.Turing.MultiTape.Universal.Complexity

The cost of a step of the simulation #

States, symbols and moves are encoded in unary (Turing.MultiTapeTM.encUnary), head positions on the work tapes as unary integers (Turing.MultiTapeTM.encIntUnary), the position of the input head in binary (Turing.MultiTapeTM.encNat), and a structure as the framed tuple of its fields.

Reading, writing and moving on a zipper are computable in linear time and space (Turing.MultiTapeTM.ComputableInDegree with degrees one). A step of the simulation (Turing.MultiTapeTM.Universal.step_inO) takes space linear in the length L of the encoded context (the description, the input and the configuration). Its time bound separates the configuration length from description lookup and input scanning: for K work tapes, E transitions, description length D, encoded input length N, input position p and binary position length P, the bound is (K + E + 1) * (D + 1) * (L + 1) + (N + 1) * (P + 1) ^ 2. The first word in a transition comparison comes from the description, so its length is bounded by D, even when the simulated configuration is large. The input scanner streams the encoded list with a binary countdown, whose arithmetic is charged to P. The configuration is still copied each round; this bound does not implement the buffered Hennie–Stearns simulation.

Main definitions #

Main results #

Encodings #

@[reducible, inline]

Symbols and blanks.

Instances For
    @[reducible, inline]

    The tuple of the fields of eKey.

    Instances For
      theorem Turing.MultiTapeTM.Universal.eKey_work_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → Key} :
      ComputableInPolyTime g✝ encIn✝ eKey → ComputableInPolyTime (fun (a : γ✝) => (g✝ a).work) encIn✝ (encList eSym)
      theorem Turing.MultiTapeTM.Universal.eKey_input_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Key} :
      ComputableInSpace g✝ encIn✝ eKey S✝ → ComputableInSpace (fun (a : γ✝) => (g✝ a).input) encIn✝ eSym S✝
      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

      Keys of transitions, as their fields.

      Instances For
        theorem Turing.MultiTapeTM.Universal.eKey_state_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → Key} :
        ComputableInPolyTime g✝ encIn✝ eKey → ComputableInPolyTime (fun (a : γ✝) => (g✝ a).state) encIn✝ encUnary
        theorem Turing.MultiTapeTM.Universal.eKey_work_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Key} :
        ComputableInSpace g✝ encIn✝ eKey S✝ → ComputableInSpace (fun (a : γ✝) => (g✝ a).work) encIn✝ (encList eSym) S✝
        theorem Turing.MultiTapeTM.Universal.eKey_state_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Key} :
        ComputableInSpace g✝ encIn✝ eKey S✝ → ComputableInSpace (fun (a : γ✝) => (g✝ a).state) encIn✝ encUnary 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_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_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_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → Key} :
        ComputableInPolyTime g✝ encIn✝ eKey → ComputableInPolyTime (fun (a : γ✝) => (g✝ a).input) encIn✝ eSym
        @[reducible, inline]

        An action on a work tape.

        Instances For
          @[reducible, inline]

          Actions on a work tape.

          Instances For
            theorem Turing.MultiTapeTM.Universal.eAct_state_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Act} :
            ComputableInSpace g✝ encIn✝ eAct S✝ → ComputableInSpace (fun (a : γ✝) => (g✝ a).state) encIn✝ eSym S✝
            @[reducible, inline]

            The tuple of the fields of eAct.

            Instances For
              theorem Turing.MultiTapeTM.Universal.eAct_workTapes_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → Act} :
              ComputableInPolyTime g✝ encIn✝ eAct → ComputableInPolyTime (fun (a : γ✝) => (g✝ a).workTapes) encIn✝ (encList eTA)
              theorem Turing.MultiTapeTM.Universal.eAct_workTapes_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Act} :
              ComputableInSpace g✝ encIn✝ eAct S✝ → ComputableInSpace (fun (a : γ✝) => (g✝ a).workTapes) encIn✝ (encList eTA) S✝
              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_output_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Act} :
              ComputableInSpace g✝ encIn✝ eAct S✝ → ComputableInSpace (fun (a : γ✝) => (g✝ a).output) encIn✝ eSym S✝
              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))

              Actions, as their fields.

              Instances For
                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_output_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → Act} :
                ComputableInPolyTime g✝ encIn✝ eAct → ComputableInPolyTime (fun (a : γ✝) => (g✝ a).output) encIn✝ eSym
                theorem Turing.MultiTapeTM.Universal.eAct_inputTape_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → Act} :
                ComputableInPolyTime g✝ encIn✝ eAct → ComputableInPolyTime (fun (a : γ✝) => (g✝ a).inputTape) encIn✝ encSign
                theorem Turing.MultiTapeTM.Universal.eAct_inputTape_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Act} :
                ComputableInSpace g✝ encIn✝ eAct S✝ → ComputableInSpace (fun (a : γ✝) => (g✝ a).inputTape) encIn✝ encSign 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 (a : γ✝) => (g✝ a).state) encIn✝ eSym
                theorem Turing.MultiTapeTM.Universal.eDesc_q₀_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → Desc} :
                ComputableInPolyTime g✝ encIn✝ eDesc → ComputableInPolyTime (fun (a : γ✝) => (g✝ a).q₀) encIn✝ encUnary
                theorem Turing.MultiTapeTM.Universal.eDesc_mk_budget {γ : Type} {encIn : γ ↪ List Bool} {budget x0 x1 : γ → ℕ} {x2 : γ → List (Key × Act)} (h0 : ComputableInSpace x0 encIn encUnary budget) (h1 : ComputableInSpace x1 encIn encUnary budget) (h2 : ComputableInSpace x2 encIn (encList (encPair eKey eAct)) budget) :
                ComputableInSpace (fun (x : γ) => { tapes := x0 x, q₀ := x1 x, table := x2 x }) encIn eDesc budget
                theorem Turing.MultiTapeTM.Universal.eDesc_q₀_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Desc} :
                ComputableInSpace g✝ encIn✝ eDesc S✝ → ComputableInSpace (fun (a : γ✝) => (g✝ a).q₀) encIn✝ encUnary S✝
                theorem Turing.MultiTapeTM.Universal.eDesc_mk_inO {γ : Type} {encIn : γ ↪ List Bool} {x0 T0 S0 x1 T1 S1 : γ → ℕ} {x2 : γ → List (Key × Act)} {T2 S2 : γ → ℕ} (h0 : ComputableInO x0 encIn encUnary T0 S0) (h1 : ComputableInO x1 encIn encUnary T1 S1) (h2 : ComputableInO x2 encIn (encList (encPair eKey eAct)) T2 S2) :
                ComputableInO (fun (x : γ) => { tapes := x0 x, q₀ := x1 x, table := x2 x }) encIn eDesc (fun (x : γ) => T0 x + (T1 x + T2 x)) fun (x : γ) => S0 x + (S1 x + S2 x)
                theorem Turing.MultiTapeTM.Universal.eDesc_table_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → Desc} :
                ComputableInPolyTime g✝ encIn✝ eDesc → ComputableInPolyTime (fun (a : γ✝) => (g✝ a).table) encIn✝ (encList (encPair eKey eAct))
                @[reducible, inline]

                The tuple of the fields of eDesc.

                Instances For
                  theorem Turing.MultiTapeTM.Universal.eDesc_tapes_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → Desc} :
                  ComputableInPolyTime g✝ encIn✝ eDesc → ComputableInPolyTime (fun (a : γ✝) => (g✝ a).tapes) encIn✝ encUnary

                  Descriptions, as their fields.

                  Instances For
                    theorem Turing.MultiTapeTM.Universal.eDesc_mk_deg :
                    ComputableInDegree (fun (p : ℕ × ℕ × List (Key × Act)) => { tapes := p.1, q₀ := p.2.1, table := p.2.2 }) eDescFields eDesc 1 1
                    theorem Turing.MultiTapeTM.Universal.eDesc_tapes_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Desc} :
                    ComputableInSpace g✝ encIn✝ eDesc S✝ → ComputableInSpace (fun (a : γ✝) => (g✝ a).tapes) encIn✝ encUnary S✝
                    theorem Turing.MultiTapeTM.Universal.eDesc_table_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Desc} :
                    ComputableInSpace g✝ encIn✝ eDesc S✝ → ComputableInSpace (fun (a : γ✝) => (g✝ a).table) encIn✝ (encList (encPair eKey eAct)) S✝
                    theorem Turing.MultiTapeTM.Universal.eDesc_mk_polyTime {γ : Type} {encIn : γ ↪ List Bool} {x0 x1 : γ → ℕ} {x2 : γ → List (Key × Act)} (h0 : ComputableInPolyTime x0 encIn encUnary) (h1 : ComputableInPolyTime x1 encIn encUnary) (h2 : ComputableInPolyTime x2 encIn (encList (encPair eKey eAct))) :
                    ComputableInPolyTime (fun (x : γ) => { tapes := x0 x, q₀ := x1 x, table := x2 x }) encIn eDesc
                    theorem Turing.MultiTapeTM.Universal.eTape_right_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Tape} :
                    ComputableInSpace g✝ encIn✝ eTape S✝ → ComputableInSpace (fun (a : γ✝) => (g✝ a).right) encIn✝ (encList eSym) S✝
                    theorem Turing.MultiTapeTM.Universal.eTape_mk_budget {γ : Type} {encIn : γ ↪ List Bool} {budget : γ → ℕ} {x0 : γ → ℤ} {x1 x2 : γ → List (Option ℕ)} (h0 : ComputableInSpace x0 encIn encIntUnary budget) (h1 : ComputableInSpace x1 encIn (encList eSym) budget) (h2 : ComputableInSpace x2 encIn (encList eSym) budget) :
                    ComputableInSpace (fun (x : γ) => { head := x0 x, left := x1 x, right := x2 x }) encIn eTape budget
                    theorem Turing.MultiTapeTM.Universal.eTape_mk_inO {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → ℤ} {T0 S0 : γ → ℕ} {x1 : γ → List (Option ℕ)} {T1 S1 : γ → ℕ} {x2 : γ → List (Option ℕ)} {T2 S2 : γ → ℕ} (h0 : ComputableInO x0 encIn encIntUnary T0 S0) (h1 : ComputableInO x1 encIn (encList eSym) T1 S1) (h2 : ComputableInO x2 encIn (encList eSym) T2 S2) :
                    ComputableInO (fun (x : γ) => { head := x0 x, left := x1 x, right := x2 x }) encIn eTape (fun (x : γ) => T0 x + (T1 x + T2 x)) fun (x : γ) => S0 x + (S1 x + S2 x)
                    @[reducible, inline]

                    The tuple of the fields of eTape.

                    Instances For

                      Work tapes, as their fields.

                      Instances For
                        theorem Turing.MultiTapeTM.Universal.eTape_head_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → Tape} :
                        ComputableInPolyTime g✝ encIn✝ eTape → ComputableInPolyTime (fun (a : γ✝) => (g✝ a).head) encIn✝ encIntUnary
                        theorem Turing.MultiTapeTM.Universal.eTape_right_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → Tape} :
                        ComputableInPolyTime g✝ encIn✝ eTape → ComputableInPolyTime (fun (a : γ✝) => (g✝ a).right) encIn✝ (encList eSym)
                        theorem Turing.MultiTapeTM.Universal.eTape_mk_deg :
                        ComputableInDegree (fun (p : ℤ × List (Option ℕ) × List (Option ℕ)) => { head := p.1, left := p.2.1, right := p.2.2 }) eTapeFields eTape 1 1
                        theorem Turing.MultiTapeTM.Universal.eTape_left_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Tape} :
                        ComputableInSpace g✝ encIn✝ eTape S✝ → ComputableInSpace (fun (a : γ✝) => (g✝ a).left) encIn✝ (encList eSym) S✝
                        theorem Turing.MultiTapeTM.Universal.eTape_left_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → Tape} :
                        ComputableInPolyTime g✝ encIn✝ eTape → ComputableInPolyTime (fun (a : γ✝) => (g✝ a).left) encIn✝ (encList eSym)
                        theorem Turing.MultiTapeTM.Universal.eTape_head_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Tape} :
                        ComputableInSpace g✝ encIn✝ eTape S✝ → ComputableInSpace (fun (a : γ✝) => (g✝ a).head) encIn✝ encIntUnary S✝
                        theorem Turing.MultiTapeTM.Universal.eTape_mk_polyTime {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → ℤ} {x1 x2 : γ → List (Option ℕ)} (h0 : ComputableInPolyTime x0 encIn encIntUnary) (h1 : ComputableInPolyTime x1 encIn (encList eSym)) (h2 : ComputableInPolyTime x2 encIn (encList eSym)) :
                        ComputableInPolyTime (fun (x : γ) => { head := x0 x, left := x1 x, right := x2 x }) encIn eTape
                        theorem Turing.MultiTapeTM.Universal.eCfg_mk_deg :
                        ComputableInDegree (fun (p : Option ℕ × ℕ × List Tape) => { state := p.1, inputPos := p.2.1, workTapes := p.2.2 }) eCfgFields eCfg 1 1
                        @[reducible, inline]

                        The tuple of the fields of eCfg.

                        Instances For
                          theorem Turing.MultiTapeTM.Universal.eCfg_mk_inO {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → Option ℕ} {T0 S0 x1 T1 S1 : γ → ℕ} {x2 : γ → List Tape} {T2 S2 : γ → ℕ} (h0 : ComputableInO x0 encIn eSym T0 S0) (h1 : ComputableInO x1 encIn encNat T1 S1) (h2 : ComputableInO x2 encIn (encList eTape) T2 S2) :
                          ComputableInO (fun (x : γ) => { state := x0 x, inputPos := x1 x, workTapes := x2 x }) encIn eCfg (fun (x : γ) => T0 x + (T1 x + T2 x)) fun (x : γ) => S0 x + (S1 x + S2 x)
                          theorem Turing.MultiTapeTM.Universal.eCfg_state_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → SCfg} :
                          ComputableInPolyTime g✝ encIn✝ eCfg → ComputableInPolyTime (fun (a : γ✝) => (g✝ a).state) encIn✝ eSym

                          Configurations, as their fields.

                          Instances For
                            theorem Turing.MultiTapeTM.Universal.eCfg_state_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → SCfg} :
                            ComputableInSpace g✝ encIn✝ eCfg S✝ → ComputableInSpace (fun (a : γ✝) => (g✝ a).state) encIn✝ eSym S✝
                            theorem Turing.MultiTapeTM.Universal.eCfg_inputPos_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → SCfg} :
                            ComputableInPolyTime g✝ encIn✝ eCfg → ComputableInPolyTime (fun (a : γ✝) => (g✝ a).inputPos) encIn✝ encNat
                            theorem Turing.MultiTapeTM.Universal.eCfg_mk_polyTime {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → Option ℕ} {x1 : γ → ℕ} {x2 : γ → List Tape} (h0 : ComputableInPolyTime x0 encIn eSym) (h1 : ComputableInPolyTime x1 encIn encNat) (h2 : ComputableInPolyTime x2 encIn (encList eTape)) :
                            ComputableInPolyTime (fun (x : γ) => { state := x0 x, inputPos := x1 x, workTapes := x2 x }) encIn eCfg
                            theorem Turing.MultiTapeTM.Universal.eCfg_workTapes_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → SCfg} :
                            ComputableInPolyTime g✝ encIn✝ eCfg → ComputableInPolyTime (fun (a : γ✝) => (g✝ a).workTapes) encIn✝ (encList eTape)
                            theorem Turing.MultiTapeTM.Universal.eCfg_mk_budget {γ : Type} {encIn : γ ↪ List Bool} {budget : γ → ℕ} {x0 : γ → Option ℕ} {x1 : γ → ℕ} {x2 : γ → List Tape} (h0 : ComputableInSpace x0 encIn eSym budget) (h1 : ComputableInSpace x1 encIn encNat budget) (h2 : ComputableInSpace x2 encIn (encList eTape) budget) :
                            ComputableInSpace (fun (x : γ) => { state := x0 x, inputPos := x1 x, workTapes := x2 x }) encIn eCfg budget
                            theorem Turing.MultiTapeTM.Universal.eCfg_inputPos_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → SCfg} :
                            ComputableInSpace g✝ encIn✝ eCfg S✝ → ComputableInSpace (fun (a : γ✝) => (g✝ a).inputPos) encIn✝ encNat S✝
                            theorem Turing.MultiTapeTM.Universal.eCfg_workTapes_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → SCfg} :
                            ComputableInSpace g✝ encIn✝ eCfg S✝ → ComputableInSpace (fun (a : γ✝) => (g✝ a).workTapes) encIn✝ (encList eTape) S✝

                            The state of a configuration, in linear time.

                            Reading, writing and moving on a work tape, in linear time #

                            Applying actions to all work tapes #

                            Applying no actions leaves the work tapes unchanged.

                            The action that neither writes nor moves leaves a work tape unchanged.

                            Sizes #

                            An integer's unary encoding is nonempty. Its natural home is the Primitives module, next to length_encIntUnary; it is stated here, in that namespace, because Primitives has about 2,400 transitive importers against about 500 here.

                            The symbol under the head is no longer than the work tape.

                            All work tapes #

                            Applying actions to the work tapes, within time the number of work tapes times the length of the arguments, and linear space.

                            theorem Turing.MultiTapeTM.Universal.reads_inO :
                            ComputableInO (fun (ts : List Tape) => List.map Tape.read ts) (encList eTape) (encList eSym) (fun (ts : List Tape) => (ts.length + 1) * (((encList eTape) ts).length + 1)) fun (ts : List Tape) => ((encList eTape) ts).length

                            The symbols under the heads of the work tapes, within time the number of work tapes times their length, and linear space.

                            The input head #

                            Moving the input head, charging binary arithmetic only to the encoded position length.

                            A step without the input #

                            @[reducible, inline]

                            The context of a step without the input: the description, the configuration and the symbol under the input head.

                            Instances For
                              @[reducible, inline]

                              The encoding of contexts without the input.

                              Instances For
                                @[reducible, inline]

                                The description of a context without the input.

                                Instances For
                                  @[reducible, inline]

                                  The configuration of a context without the input.

                                  Instances For
                                    @[reducible, inline]

                                    The symbol under the input head, in a context without the input.

                                    Instances For
                                      @[reducible, inline]

                                      The context of a step: the description, the input and the configuration.

                                      Instances For
                                        @[reducible, inline]

                                        The encoding of contexts.

                                        Instances For
                                          @[reducible, inline]

                                          The description of a context.

                                          Instances For
                                            @[reducible, inline]

                                            The input of a context.

                                            Instances For
                                              @[reducible, inline]

                                              The configuration of a context.

                                              Instances For

                                                A step without input lookup: tape passes and description comparisons are linear in context length; only binary input-head arithmetic is quadratic in its own encoded length.

                                                Instances For

                                                  Rules for fun_prop #

                                                  One step of the simulation without the input, within the time wTime and linear space. The machine is assembled from the definition of stepWith, and its bounds are checked once.

                                                  A step #

                                                  The step bound separates linear configuration passes from a streaming input lookup with binary countdown arithmetic. In particular, the whole configuration length is never squared.

                                                  Instances For

                                                    One step of the simulation, on contexts, within the time stepTime and linear space: the symbol under the input head, and the step without the input.