Documentation

CslibFrontier.Probability.Distributional.Search

Distributional search with partially observed state #

A DistributionalSearchProblem specifies a distribution on states, the observation given to a solver, and the relation used to judge its answer. Separating the state from its observation allows both ordinary relation search and recovery of a hidden planted object. The solver receives only the observation; the success test may also use the hidden state.

These are semantic definitions, independent of an encoding or model of computation. The Boolean experiment uses classical decidability only to score the answer, and does not assert that the success relation can be decided by the solver. ofRelation specializes to the ordinary setting where the entire state is observed and answers satisfy a relation on inputs and outputs. Solvers have total output laws; an explicit error or Option output can represent failure.

For a family of problems, HasSolver asks for one admitted program whose failure probability meets a bound at every parameter. An evaluator and a predicate on whole programs specify the model. In particular, admitting a single machine differs from admitting arbitrary families of circuits or arbitrary statistical rules; the definition does not identify these choices.

Main definitions #

structure Cslib.Probability.DistributionalSearchProblem (State : Type u_1) (Input : Type u_2) (Output : Type u_3) :
Type (max (max u_1 u_2) u_3)

A distributional search problem, allowing the success test to depend on hidden state.

  • distribution : PMF State

    The law of the complete state, including any hidden information.

  • observe : State → Input

    The information revealed to the solver.

  • accepts : State → Output → Prop

    When an output counts as a successful answer for the complete state.

noncomputable def Cslib.Probability.DistributionalSearchProblem.experiment {State : Type u_1} {Input : Type u_2} {Output : Type u_3} (P : DistributionalSearchProblem State Input Output) (solver : Input → PMF Output) :

Sample a state, run the solver on its observation, and score its answer. The classical success test is semantic and is not part of the solver's computation.

def Cslib.Probability.DistributionalSearchProblem.ofRelation {Input : Type u_2} {Output : Type u_3} (distribution : PMF Input) (accepts : Input → Output → Prop) :
DistributionalSearchProblem Input Input Output

Ordinary distributional relation search, with the full input revealed to the solver. The relation need not be total: an input with no acceptable output contributes failure probability one. A promise on the distribution's support can exclude such inputs when desired.

theorem Cslib.Probability.DistributionalSearchProblem.experiment_pure {State : Type u_1} {Input : Type u_2} {Output : Type u_3} (P : DistributionalSearchProblem State Input Output) (solver : Input → Output) :
(P.experiment fun (input : Input) => PMF.pure (solver input)) = PMF.map (fun (state : State) => decide (P.accepts state (solver (P.observe state)))) P.distribution

For a deterministic solver, the experiment is the pushforward of the state law by success.

theorem Cslib.Probability.DistributionalSearchProblem.experiment_pure_false {State : Type u_1} {Input : Type u_2} {Output : Type u_3} (P : DistributionalSearchProblem State Input Output) (solver : Input → Output) :
(P.experiment fun (input : Input) => PMF.pure (solver input)) false = P.distribution.toOuterMeasure {state : State | ¬P.accepts state (solver (P.observe state))}

A deterministic solver's failure probability is the mass of states where its answer fails.

theorem Cslib.Probability.DistributionalSearchProblem.experiment_congr {State : Type u_1} {Input : Type u_2} {Output : Type u_3} (P : DistributionalSearchProblem State Input Output) {solver solver' : Input → PMF Output} (h : ∀ state ∈ P.distribution.support, solver (P.observe state) = solver' (P.observe state)) :
P.experiment solver = P.experiment solver'

Solvers with the same output laws on possible observations have the same success experiment.

def Cslib.Probability.DistributionalSearchProblem.HasSolver {State : ℕ → Type u_4} {Input : ℕ → Type u_5} {Output : ℕ → Type u_6} {Program : Type u_7} (P : (n : ℕ) → DistributionalSearchProblem (State n) (Input n) (Output n)) (eval : Program → (n : ℕ) → Input n → PMF (Output n)) (Admissible : Program → Prop) (ε : ℕ → ENNReal) :

One admitted program solves the entire problem family with failure at most ε n. The admissibility predicate applies to a whole program, before the parameter is quantified. The evaluator determines which observations that program can inspect and the law of its output.

theorem Cslib.Probability.DistributionalSearchProblem.HasSolver.mono_error {State : ℕ → Type u_4} {Input : ℕ → Type u_5} {Output : ℕ → Type u_6} {Program : Type u_7} {P : (n : ℕ) → DistributionalSearchProblem (State n) (Input n) (Output n)} {eval : Program → (n : ℕ) → Input n → PMF (Output n)} {Admissible : Program → Prop} {ε δ : ℕ → ENNReal} (h : HasSolver P eval Admissible ε) (hεδ : ∀ (n : ℕ), ε n ≤ δ n) :
HasSolver P eval Admissible δ

Relaxing the failure bound preserves the existence of an admitted solver.

theorem Cslib.Probability.DistributionalSearchProblem.HasSolver.mono_admissible {State : ℕ → Type u_4} {Input : ℕ → Type u_5} {Output : ℕ → Type u_6} {Program : Type u_7} {P : (n : ℕ) → DistributionalSearchProblem (State n) (Input n) (Output n)} {eval : Program → (n : ℕ) → Input n → PMF (Output n)} {Admissible Admissible' : Program → Prop} {ε : ℕ → ENNReal} (h : HasSolver P eval Admissible ε) (hmodel : ∀ (program : Program), Admissible program → Admissible' program) :
HasSolver P eval Admissible' ε

Enlarging the admitted program class preserves the existence of a solver.

theorem Cslib.Probability.DistributionalSearchProblem.HasSolver.of_simulation {State : ℕ → Type u_4} {Input : ℕ → Type u_5} {Output : ℕ → Type u_6} {Program : Type u_7} {Program' : Type u_8} {P : (n : ℕ) → DistributionalSearchProblem (State n) (Input n) (Output n)} {eval : Program → (n : ℕ) → Input n → PMF (Output n)} {Admissible : Program → Prop} {ε : ℕ → ENNReal} (h : HasSolver P eval Admissible ε) {eval' : Program' → (n : ℕ) → Input n → PMF (Output n)} {Admissible' : Program' → Prop} (compile : Program → Program') (hadmissible : ∀ (program : Program), Admissible program → Admissible' (compile program)) (hsimulate : ∀ (program : Program), Admissible program → ∀ (n : ℕ), ∀ state ∈ (P n).distribution.support, eval' (compile program) n ((P n).observe state) = eval program n ((P n).observe state)) :
HasSolver P eval' Admissible' ε

Transport a solver through a compiler preserving admissibility and its output law on every possible observation. This semantic lemma does not assert that any particular compiler or model has these properties; concrete models supply those proofs.