Documentation

MIPRE.Foundations.Cost.Clocked

Clocked simulation as a polynomial-time predicate #

Given a clocked universal machine UT, PolyTimeFun.haltsWithin UT : PolyTimeFun (Prog × ℕ) Bool decides whether e halts on the empty input within Nat.size n steps: it computes the budget in unary from the binary n (lenProg), assembles the machine's input (ofNat k, (encode e, nil)), runs UT.univT, and reads the halting flag of clockedResult. This is the "run e for log n steps" of [MNY, Lemma 5.1].

The program of PolyTimeFun.haltsWithin. Input: cons (encode e) (encode n).

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    theorem MIPRE.Cost.Prog.haltsWithinProg_runs (UT : ClockedUniversalMachine) (e : Prog) (n : ) :
    tPolynomial.eval (n.size + esize e + 1) UT.bound + (n.size + 1 + 1) * (esize n + 1 + 2 * n.size + 13) + 3 * esize e + 4 * n.size + 2 * esize n + 40, UT.univT.haltsWithinProg.Runs ((encode e).cons (encode n)) (encode (evalWithin e Data.nil n.size).isSome) t

    The run of haltsWithinProg, in terms of the clocked machine's result.

    Decides "e halts on the empty input within Nat.size n steps", in polynomial time, given a clocked universal machine.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For