Linear-space finite case analysis #
A computed tag selects a branch retaining the original input. The finite tag type and branch machines are fixed independently of runtime input. Encodings are arbitrary, and neither the tag nor result type requires an inhabitant.
Main results #
Turing.MultiTapeTM.ComputableInSpace.finite_cases: dispatch within linear encoded-input space.
theorem Turing.MultiTapeTM.ComputableInSpace.finite_cases {α β Tag : Type} [Finite Tag] {input : α ↪ List Bool} {output : β ↪ List Bool} {tagEncoding : Tag ↪ List Bool} {tag : α → Tag} {branch : Tag → α → β} (htag : ComputableInSpace tag input tagEncoding fun (a : α) => (input a).length) (hbranch : ∀ (choice : Tag), ComputableInSpace (branch choice) input output fun (a : α) => (input a).length) :
ComputableInSpace (fun (a : α) => branch (tag a) a) input output fun (a : α) => (input a).length
A fixed finite tag selects a linear-space branch with the original input captured. This also handles an empty tag type (and hence an empty input type).
theorem Turing.MultiTapeTM.ComputableInSpace.budget_listAll {α ι : Type} {enc : α ↪ List Bool} {S : α → ℕ} (l : List ι) {f : ι → α → Bool} (hf : ∀ (i : ι), ComputableInSpace (f i) enc encBool S) :
Check all predicates indexed by a fixed list within their common workspace budget.
theorem Turing.MultiTapeTM.ComputableInSpace.budget_listAny {α ι : Type} {enc : α ↪ List Bool} {S : α → ℕ} (l : List ι) {f : ι → α → Bool} (hf : ∀ (i : ι), ComputableInSpace (f i) enc encBool S) :
Check whether any predicate indexed by a fixed list holds within their common budget.