Documentation

CslibFrontier.Computability.Machines.Turing.MultiTape.Complexity.InSpace.Sum

Tagged sums within a fixed workspace budget #

Each injection prepends a single bit to the computed payload.

Main results #

theorem Turing.MultiTapeTM.ComputableInSpace.budget_sumInl {α β γ : Type} {encA : α ↪ List Bool} {encB : β ↪ List Bool} {encC : γ ↪ List Bool} {S : α → ℕ} {f : α → β} (hf : ComputableInSpace f encA encB S) :
ComputableInSpace (fun (a : α) => Sum.inl (f a)) encA (encSum encB encC) S

Attach the left tag to a value computed within the supplied budget.

theorem Turing.MultiTapeTM.ComputableInSpace.budget_sumInr {α β γ : Type} {encA : α ↪ List Bool} {encB : β ↪ List Bool} {encC : γ ↪ List Bool} {S : α → ℕ} {f : α → γ} (hf : ComputableInSpace f encA encC S) :
ComputableInSpace (fun (a : α) => Sum.inr (f a)) encA (encSum encB encC) S

Attach the right tag to a value computed within the supplied budget.