Tidy computability in linear time and space #
Tidy computability (Turing.MultiTapeTM.ComputableTidilyInTimeAndSpace) is relative to encodings of
values as words. Tidy computability in linear time and space is closed under case distinctions and
concatenation of encoded values, and contains constant functions and the functions computed by
finite-state transducers.
Main definitions #
Turing.MultiTapeTM.ComputableTidilyInLinearTimeAndSpace: tidy computability in linear time and space, up to a constant.
Main results #
Turing.MultiTapeTM.ComputableTidilyInTimeAndSpace.of_enc_eq: reuse identical encoded outputs with the same machine and exact time and space bounds.Turing.MultiTapeTM.ComputableTidilyInLinearTimeAndSpace.ite,.append: closure properties of linear time and space. Case distinctions accept any encoding ofBool.Turing.MultiTapeTM.ComputableTidilyInLinearTimeAndSpace.const: constant functions.Turing.MultiTapeTM.Transducer.computableTidilyInLinearTimeAndSpace: functions computed by finite-state transducers.
Reuse the same machine when the new function emits the same encoded output word. The time and space bounds are unchanged; no encoding conversion is performed.
Closure properties of linear time and space #
A function tidily computable in linear time and space on all inputs is so on the inputs
satisfying p.
Case distinctions of functions tidily computable in linear time and space, each branch on the inputs where it is taken.
Functions whose encoded value is the encoded input.
A function whose encoded value is the concatenation of the encoded values of two functions tidily computable in linear time and space.
A function computed by a transducer with finitely many states is tidily computable in linear time and space.