The halting verifier along the paper's route: the decider #
Blueprint lem:halt-construction in the paper's form (recursive.tex, fig:halt_f), for the
polynomial-time halting reduction of planning/polytime-halting.md. For a machine M and a
parameter λ, the verifier is
Vhalt M λ = Verifier.ofSamplerDecider U (G.sampler λ) (dec M λ),
the compressed sampler at λ together with the decider dec M λ, wrapped in the question-length
check of def:normal-verifier. The decider is an efficient Kleene fixed point (Cost.kleeneFix)
of the map d' ↦ hardcode body (encode (M, (λ, d'))), so that on (n, x, y, a, b) it runs
body on the pair of its own description (M, (λ, dec M λ)) and the input, where body:
- runs
Mon the empty input for the budgetNat.size n(the clocked universal machine); if it halts, accepts; - otherwise runs the semidecider
S'of the search branch — "val*at levelC₀of the verifier this string describes exceeds1/2" (exists_semL) — on the descriptiondescOf λ (dec M λ), for the budgetNat.size n; if it halts, rejects; - otherwise computes the compressed decider
Compress ((S^compr_λ, wrap (dec M λ)), λ)of its own verifier and runs it on the input through the universal machine.
Branch 2 is Lin's search branch, which the criterion route (Compression.lean, decFunV) has
too: the value form of compression has no base case for soundness, and the search supplies it.
Branches 1 and 3 are the paper's F. The reading of M's and the search's budgets as Nat.size n rather than n is the criterion's, and costs nothing: the levels of the recursion are
n, 2 ^ n, …, along which Nat.size grows without bound.
body is the program of a polynomial-time function prep returning the pair "program to run,
its input" — branch 1 returns the constant-true program, branch 2 the constant-false one,
branch 3 the compressed decider on the input — followed by one call of the universal machine.
That is what makes the acceptance characterization (accepts_iff, blueprint
lem:dhalt-values) a matter of running prep and reading its output, and what keeps the
accounting (Paper/Cost.lean) to prep's time bound plus the universal machine's overhead on
the compressed decider.
Three polynomial-time pieces #
The description string descOf λ d of a pair, as a polynomial-time function: serProg.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The wrapper's description, as a polynomial-time function of the sampler program and the
inner decider: wrapBuildProg.
Equations
- One or more equations did not get rendered due to their size.
Instances For
(λ, d) ↦ wrapCore U.univ (G.samplerProg λ) (encode d), the program of the wrapped decider
of the verifier (S^compr_λ, d).
Equations
Instances For
The pair (n, rest) as the datum encode (n, rest): the identity program.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The program halting with output true on every input.
Instances For
The program halting with output false on every input.
Instances For
The search program of the pair (λ, d): the semidecider S' hard-coded to the description
descOf λ d, to be run on the empty input.
Equations
- MIPRE.Halting.searchP S' lam d = MIPRE.Cost.hardcode S'.onLeft (MIPRE.Cost.encode (MIPRE.Halting.descOf lam d))
Instances For
The preparation, and the decider #
The three branches, as a polynomial-time function of the description (M, (λ, d')) and
the input (n, rest): the program to run and its input.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The compressed decider of the verifier (S^compr_λ, wrap d).
Equations
- MIPRE.Halting.comprDec G U lam d = G.compress.toFun ((G.samplerProg.toFun lam, U.univ.wrapCore (G.samplerProg.toFun lam) (MIPRE.Cost.encode d)), lam)
Instances For
The body of the decider: run prep, then the universal machine on its output.
Equations
- MIPRE.Halting.body G U UT S' = (MIPRE.Halting.prep G U UT S').code.let_ (MIPRE.Cost.Prog.callVar 0 U.univ)
Instances For
The map whose fixed point is the decider: d' ↦ hardcode body (encode (M, (λ, d'))).
Equations
- One or more equations did not get rendered due to their size.
Instances For
The decider 𝒟^halt of the machine M at the parameter λ: the efficient Kleene fixed
point of F.
Equations
- MIPRE.Halting.dec G U UT S' M lam = MIPRE.Cost.kleeneFix U (MIPRE.Halting.F G U UT S' M lam)
Instances For
The verifier 𝒱^halt of the machine M at the parameter λ.
Equations
- MIPRE.Halting.Vhalt G U UT S' M lam = MIPRE.Verifier.ofSamplerDecider U (G.sampler lam) (MIPRE.Halting.dec G U UT S' M lam)
Instances For
Running the decider #
A run of body on (P, (n, rest)) is a run of the program prep returns on the input it
returns.
A run of the decider on v is a run of body on its own description and v.
Acceptance of 𝒱^halt (blueprint lem:dhalt-values): the two questions have the
sampler's dimension, and then: everything is accepted if M halts within Nat.size n; nothing
is if the search halts within Nat.size n; otherwise exactly what the compressed decider of
𝒱^halt itself accepts.