Documentation

CslibFrontier.Computability.DecisionTree.FreeM.OracleComp

Substituting and budgeting Boolean query programs #

Translating query substitution on decision trees into free programs gives oracle substitution. A bound on weighted structural depth is precisely an oracle cost bound. Both bounds include branches that answer a repeated variable inconsistently with previous replies. For trees returning a value in a higher universe, postprocessing the result to Unit retains the query structure and puts the result in the universe of the Boolean replies required by OracleComp.IsCostBounded.

Main results #

theorem Cslib.DecisionTree.toFreeM_substitute {ι : Type u_1} {κ : Type u_2} {β : Type u_3} (t : DecisionTree ι β) (s : ι → DecisionTree κ Bool) :
(t.substitute s).toFreeM = OracleComp.substitute (fun (i : ι) => (s i).toFreeM) t.toFreeM

Substituting Boolean query subroutines agrees with free-program substitution.

theorem Cslib.DecisionTree.weightedDepth_le_iff_isCostBounded_map_unit {ι : Type u_1} {β : Type u_3} (t : DecisionTree ι β) (w : ι → ℕ) (n : ℕ) :

The weighted depth bounds precisely the calls of the free program, even when its result is in a higher universe than its Boolean replies. Discarding the result preserves every query branch.

For a result in the Boolean replies' universe, weighted depth is the query budget of the translated program itself.