Sums of Query Signatures #
SumQuery F G is the disjoint sum of two query signatures F G : Type → Type: a program in
FreeM (SumQuery F G) may ask queries of either kind, and an oracle for the sum is a pair of
oracles (SumQuery.combine). The counters countInl and countInr charge the two kinds of
queries separately, and add up to FreeM.countQueries. This is used, for example, to charge
value-oracle and independence-oracle calls of constrained submodular maximization separately.
Main definitions #
Cslib.Query.SumQuery: the sum of two query signatures.Cslib.Query.SumQuery.combine: the oracle forSumQuery F Gbuilt from oracles forFandG.Cslib.Query.SumQuery.liftInl,Cslib.Query.SumQuery.liftInr: lift single queries.Cslib.Query.SumQuery.countInl,Cslib.Query.SumQuery.countInr: the number ofF-queries and ofG-queries along an oracle path.
Main results #
SumQuery.countInl_add_countInr:countInl + countInr = countQueries.