Certificates in factored time and polynomial space #
A native certificate runs in time K times a polynomial and in polynomial space
(Cslib.GenericRAM.NativeCertificate.FactorTimePolySpace) when, for constants C and d, its time
is at most C K a (n + 1) ^ d and its space at most C (n + 1) ^ d on inputs a of encoded
length n. Because a polynomial space bound also bounds the encoded intermediate value
(Cslib.GenericRAM.NativeCertificate.polyBounded_length_of_space), this shape closes under pairing,
sequential composition, conditional branching and retained-input option elimination, recovering
Cslib.GenericRAM.NativeCertificate.ExpTimePolySpace at K a = 2 ^ E a.
Main definitions #
Cslib.GenericRAM.NativeCertificate.FactorTimePolySpace,Cslib.GenericRAM.NativeCertificate.ExpTimePolySpace.
Main results #
Cslib.GenericRAM.NativeCertificate.polyBounded_length_of_space,Cslib.GenericRAM.NativeCertificate.computableInPolySpace: polynomial output-length and polynomial-space bounds fromPolyBoundedcertificate workspace.Cslib.GenericRAM.NativeCertificate.FactorTimePolySpace.prod,Cslib.GenericRAM.NativeCertificate.FactorTimePolySpace.comp,Cslib.GenericRAM.NativeCertificate.FactorTimePolySpace.branch,Cslib.GenericRAM.NativeCertificate.FactorTimePolySpace.option: closure across combinators.Cslib.GenericRAM.NativeCertificate.FactorTimePolySpace.computableInO,Cslib.GenericRAM.NativeCertificate.FactorTimePolySpace.exists_poly_computableInO,Cslib.GenericRAM.NativeCertificate.FactorTimePolySpace.computableInPolySpace: machine bounds.Cslib.GenericRAM.NativeCertificate.expTimePolySpace_ofPolyTime,Cslib.GenericRAM.NativeCertificate.ExpTimePolySpace.prod,Cslib.GenericRAM.NativeCertificate.ExpTimePolySpace.comp_ofPolyTime,Cslib.GenericRAM.NativeCertificate.ExpTimePolySpace.computableInO,Cslib.GenericRAM.NativeCertificate.branch_bounds_of_two_pow:2 ^ Especializations.
A polynomial space bound on a native certificate also polynomially bounds the encoded output length.
A native certificate with polynomially bounded workspace witnesses ComputableInPolySpace,
regardless of its running time.
A certificate runs in time K times a polynomial and in polynomial space: for constants
C and d, its time is at most C K a (n + 1) ^ d and its space at most C (n + 1) ^ d on
inputs a of encoded length n.
Package polynomial space and a factored time bound c.time a ≤ K a * T a with polynomial
T.
A polynomially bounded factor in M a * K a is absorbed into the polynomial overhead.
Pairs add the time factors while retaining polynomial workspace.
Sequential composition adds the producer's factor and the consumer's factor evaluated at the intermediate value, whose encoded length is polynomially bounded by the producer's workspace.
Polynomial-time postprocessing preserves the factor when 1 ≤ K a.
Polynomial-time preprocessing pulls back the factor when 1 ≤ K₂ (f a).
Selected-branch conditional: the yes factor need only be bounded by K where condition
holds.
Retained-input option elimination: the some factor need only be bounded by K a on pairs
(a, b) with value a = Option.some b, whose encoded length is polynomially bounded by cVal's
workspace.
When the factor K is itself polynomially bounded, the certificate computes f in polynomial
time.
Extract a single monotone polynomial poly bounding c.time a ≤ K a * poly n and
c.space a ≤ poly n.
The machine bounds of a certificate in time K times a polynomial and polynomial space.
Existential polynomial form of computableInO.
A certificate runs in time 2 ^ E times a polynomial and in polynomial space: for constants
C and d, its time is at most C 2 ^ E a (n + 1) ^ d and its space at most C (n + 1) ^ d on
inputs a of encoded length n.
Pairs add the exponents.
Polynomial-time postprocessing keeps the shape: the polynomial space bound also bounds the encoded intermediate value, on which the postprocessing runs.
The machine bounds of a certificate in time 2 ^ E times a polynomial and polynomial
space.
Polynomial-time certificates run in time 2 ^ E times a polynomial for every E.
A branch whose yes side runs in time 2 ^ N times a polynomial runs in polynomial space
and in time 2 ^ N times a polynomial, when the test and the no side are polynomial and the
yes side has polynomial space. The yes time bound is needed only where condition holds. The
polynomial factor T is left implicit, unlike the explicit constants of ExpTimePolySpace.