Documentation

CslibFrontier.Algorithms.Lean.PessimisticEstimator

Method of conditional expectations on a finite product space #

Cslib.PessimisticEstimator.greedy in CslibFrontier.Foundations.Combinatorics.PessimisticEstimator models binary pessimistic-estimator rounds, and CslibFrontier.Computability.PolyTime.PessimisticEstimator certifies multi-tape Turing polynomial-time computability of greedy derandomizers.

This module packages the pure method of conditional expectations over a general finite product space ∀ i : ι, α i (ProductDerandomizer): for each coordinate i in order, it evaluates the conditional-expectation oracle condExp (insert i fixed) (Function.update x i a) across every candidate a ∈ choices i and selects a minimizing coordinate value. When condExp agrees with PMF.condExpect p f through a monotone map M → ℝ, derandomize_spec proves f (D.derandomize order init) ≤ E_{y ∼ pi p}[f y].

Main definitions #

Main results #

Deterministic conditional-expectation derandomizer over ∀ i : ι, α i: at each coordinate i, evaluates condExp (insert i fixed) (Function.update x i a) across every candidate a ∈ choices i and picks a value minimizing the returned conditional expectation.

  • choices (i : ι) : List (α i)

    Candidate list of domain values tested at coordinate i.

  • condExp : Finset ι → ((i : ι) → α i) → M

    Conditional-expectation oracle given fixed coordinates and current assignment.

def Cslib.Algorithms.Lean.PessimisticEstimator.ProductDerandomizer.scanCandidates {ι : Type} [DecidableEq ι] {α : ι → Type} {M : Type} [LE M] [DecidableRel fun (x1 x2 : M) => x1 ≤ x2] (D : ProductDerandomizer ι α M) (fixedNext : Finset ι) (x : (i : ι) → α i) (i : ι) :
List (α i) → α i × M → α i × M

Evaluate candidates in cs starting from best pair (bestA, bestV).

def Cslib.Algorithms.Lean.PessimisticEstimator.ProductDerandomizer.stepCoord {ι : Type} [DecidableEq ι] {α : ι → Type} {M : Type} [LE M] [DecidableRel fun (x1 x2 : M) => x1 ≤ x2] (D : ProductDerandomizer ι α M) (state : Finset ι × ((i : ι) → α i)) (i : ι) :
Finset ι × ((i : ι) → α i)

Choose the best value for coordinate i among D.choices i (leaving x unchanged if D.choices i is empty).

def Cslib.Algorithms.Lean.PessimisticEstimator.ProductDerandomizer.runFrom {ι : Type} [DecidableEq ι] {α : ι → Type} {M : Type} [LE M] [DecidableRel fun (x1 x2 : M) => x1 ≤ x2] (D : ProductDerandomizer ι α M) (order : List ι) (fixed : Finset ι) (x : (i : ι) → α i) :
Finset ι × ((i : ι) → α i)

Run coordinate fixing along order starting from (fixed, x).

def Cslib.Algorithms.Lean.PessimisticEstimator.ProductDerandomizer.derandomize {ι : Type} [DecidableEq ι] {α : ι → Type} {M : Type} [LE M] [DecidableRel fun (x1 x2 : M) => x1 ≤ x2] (D : ProductDerandomizer ι α M) (order : List ι) (init : (i : ι) → α i) (i : ι) :
α i

Deterministic assignment produced by fixing all coordinates in order from ∅.

theorem Cslib.Algorithms.Lean.PessimisticEstimator.ProductDerandomizer.derandomize_spec {ι : Type} [DecidableEq ι] {α : ι → Type} {M : Type} [LinearOrder M] (D : ProductDerandomizer ι α M) [Fintype ι] [(i : ι) → Fintype (α i)] (p : (i : ι) → PMF (α i)) (f : ((i : ι) → α i) → ℝ) {toReal : M → ℝ} (hmono : Monotone toReal) (heval : ∀ (fixed : Finset ι) (x : (i : ι) → α i), toReal (D.condExp fixed x) = Probability.PMF.condExpect p f fixed x) (hchoices : ∀ (i : ι), ∀ a ∈ (p i).support, a ∈ D.choices i) (order : List ι) (hnd : order.Nodup) (hcov : ∀ (i : ι), i ∈ order) (init : (i : ι) → α i) :
f (D.derandomize order init) ≤ ∑ y : (i : ι) → α i, ((Probability.PMF.pi p) y).toReal * f y

Method of conditional expectations on a finite product space: if order visits every coordinate without repetition, D.choices i covers (p i).support, and D.condExp computes PMF.condExpect p f (via monotone toReal : M → ℝ), then D.derandomize order init returns a deterministic point x* with f x* ≤ E_{y ∼ pi p}[f y].