P — surface layer #
This file aggregates the definitions and theorems for P, FP, and PSPACE.
Definitions (from P/Defs.lean) #
P— polynomial time:⋃ k, DTIME(n^k)FP— functions computable in polynomial timePSPACE— polynomial space:⋃ k, DSPACE(n^k)
Theorems #
DTIME_union— DTIME is closed under union (AB Claim 1.5)id_mem_FP— the identity function is computable in linear timemem_P_iff_decidesInTime_polynomial— polynomial-evaluation normal form forPmem_FP_iff_computesInTime_polynomial— polynomial-evaluation normal formmem_FP_comp—FPis closed under function compositionmem_FP_pairWithInput— anFPresult can be paired with its original inputmem_P_preimage—Pis closed under preimages of functions inFPunaryLength_mem_FP— materializing the unary input length belongs toFPite_mem_finset_mem_FP— functions supported on a finite set belong toFP
The identity function belongs to FP. The executable
copyInputToOutputTM copies the input to the output in n + 2 steps, and
this concrete bound is linear.