Documentation

CslibFrontier.Computability.Probabilistic.DistributionalSearch

Certified programs for distributional search #

A semantic search problem may have parameter-dependent observation and answer types, while a uniform machine processes one fixed encoded input type and returns one fixed encoded output type. HasSolver.of_computableInPolyTime connects these presentations. It uses the existing deterministic-to-PPT realization theorem to certify the actual program fun x => pure (f x).

The input presentation and output interpretation are part of the represented-program model, whose evaluator and IsPPTOn predicate remain explicit in the conclusion. They are not operations granted to the program, and this theorem does not assert that arbitrary transformations preserve an independently specified computational model. A concrete client supplies its intended input and output representations and proves the success bound for those representations.

One certificate applies to every represented input. The parameter may determine the semantic types and the public data presented to the program, but does not select a different program or a different machine certificate.

theorem Cslib.Probability.DistributionalSearchProblem.HasSolver.of_computableInPolyTime {State : ℕ → Type u_1} {Input : ℕ → Type u_2} {Output : ℕ → Type u_3} {EncodedInput EncodedOutput : Type} (P : (n : ℕ) → DistributionalSearchProblem (State n) (Input n) (Output n)) (present : (n : ℕ) → Input n → EncodedInput) (interpret : (n : ℕ) → EncodedOutput → Output n) {encInput : EncodedInput ↪ List Bool} {encOutput : EncodedOutput ↪ List Bool} {f : EncodedInput → EncodedOutput} (hf : Turing.MultiTapeTM.ComputableInPolyTime f encInput encOutput) {ε : ℕ → ENNReal} (hfailure : ∀ (n : ℕ), ((P n).experiment fun (input : Input n) => PMF.pure (interpret n (f (present n input)))) false ≤ ε n) :
HasSolver P (fun (program : EncodedInput → ProbComp EncodedOutput) (n : ℕ) (input : Input n) => PMF.map (interpret n) (program (present n input)).eval) (IsPPTOn encInput encOutput) ε

A certified deterministic function supplies a uniform strict PPT solver in the explicitly represented-program model. The representation maps specify the meaning of machine inputs and outputs; they are not assumed to be free preprocessing or postprocessing in another model.