Documentation

CslibFrontier.Computability.PCP.LocalTest.DecisionTree

Executing Boolean local tests as decision trees #

An explicit enumeration of the query layout turns a Boolean LocalTest into a decision tree for each random string. The tree reads the listed positions and decides the existing acceptance predicate from their answers. This preserves acceptance and makes at most |Q| queries. The bound counts occurrences, including repeated positions, and certifies query cost; evaluating the acceptance predicate is free in this decision-tree model.

Main definitions #

Main results #

References #

@[instance_reducible]
instance Cslib.PCP.LocalTest.instDecidablePassesBool {P : Type u_1} {R : Type u_2} {Q : Type u_3} (T : LocalTest P R Q Bool) [(r : R) → (a : Q → Bool) → Decidable (T.Accepts r a)] (r : R) (π : P → Bool) :
Decidable (T.Passes π r)
def Cslib.PCP.LocalTest.decisionTree {P : Type u_1} {R : Type u_2} {Q : Type u_3} (T : LocalTest P R Q Bool) [FinEnum Q] [DecidableEq P] [(r : R) → (a : Q → Bool) → Decidable (T.Accepts r a)] (r : R) :

Read the positions in query order, then decide the test's acceptance from their values. The enumeration and the acceptance decision are supplied explicitly by instances.

theorem Cslib.PCP.LocalTest.eval_decisionTree {P : Type u_1} {R : Type u_2} {Q : Type u_3} (T : LocalTest P R Q Bool) [FinEnum Q] [DecidableEq P] [(r : R) → (a : Q → Bool) → Decidable (T.Accepts r a)] (r : R) (π : P → Bool) :
(T.decisionTree r).eval π = decide (T.Passes π r)

Executing a local test decides exactly its original acceptance predicate.

theorem Cslib.PCP.LocalTest.depth_decisionTree_le {P : Type u_1} {R : Type u_2} {Q : Type u_3} (T : LocalTest P R Q Bool) [FinEnum Q] [DecidableEq P] [(r : R) → (a : Q → Bool) → Decidable (T.Accepts r a)] (r : R) :

Execution reads at most one position for each query-layout occurrence.

theorem Cslib.PCP.LocalTest.acceptProb_eq_expect_decisionTree {P : Type u_1} {R : Type u_2} {Q : Type u_3} (T : LocalTest P R Q Bool) [FinEnum Q] [DecidableEq P] [(r : R) → (a : Q → Bool) → Decidable (T.Accepts r a)] [Fintype R] (π : P → Bool) :
T.acceptProb π = Finset.univ.expect fun (r : R) => if (T.decisionTree r).eval π = true then 1 else 0

The distribution of acceptance decisions produced by execution agrees with acceptProb.

theorem Cslib.PCP.LocalTest.depth_decisionTree_repeatAll_le {P : Type u_1} {R : Type u_2} {Q : Type u_3} (T : LocalTest P R Q Bool) [FinEnum Q] [DecidableEq P] [(r : R) → (a : Q → Bool) → Decidable (T.Accepts r a)] (k : ℕ) (r : Fin k → R) :

Executing k independent trials makes at most k * |Q| queries on every seed and input.