Zulip Chat Archive

Stream: Is there code for X?

Topic: Complexity : Time Computable functions


Shreyas Srinivas (Apr 29 2025 at 12:40):

I notice that we have all the pieces we need to define Time computable functions, but I can't find them in mathlib. Do we have those? If not, I can make a quick PR

Shreyas Srinivas (Apr 29 2025 at 12:41):

Basically they are

  1. Functions in the linear and superlinear range which are likely to appear naturally in complexity
  2. Important for time and space hierarchy theorems

Bolton Bailey (Apr 29 2025 at 20:42):

Turing.TM2ComputableInTime?

Shreyas Srinivas (Apr 29 2025 at 20:44):

Not not that. I might have made a terminology error. I’m talking about time constructible functions

Bolton Bailey (Apr 29 2025 at 20:44):

Or perhaps you are talking about what wikipedia calls "Time-Constructible functions"? I haven't seen those.

Shreyas Srinivas (Apr 29 2025 at 22:16):

Something like this :

import Mathlib

open Computability Turing


abbrev TimeConstructible (T :   ) : Prop :=
   M : @TM2ComputableInTime   unaryFinEncodingNat unaryFinEncodingNat T,
     c d,  n : , M.time n  c * (T n) + d

Shreyas Srinivas (Apr 29 2025 at 22:19):

Naturally this defintion is only useful when we prove that for common classes of super linear functions, this property holds

Shreyas Srinivas (Apr 29 2025 at 22:28):

The purpose of this definition is to be able to stop a turing machine after O(T(n)) steps for a specified T(n). In the context of relevant theorems, this is only possible for time constructible functions


Last updated: May 02 2025 at 03:31 UTC