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 #
Cslib.DecisionTree.toFreeM_substitutetranslates query substitution into oracle substitution.Cslib.DecisionTree.weightedDepth_le_iff_isCostBounded_map_unitcharacterizes the query budget after discarding the result, for every result universe.Cslib.DecisionTree.weightedDepth_le_iff_isCostBoundedgives the budget directly for programs whose result is in the Boolean replies' universe.
Substituting Boolean query subroutines agrees with free-program substitution.
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.