Documentation

CslibFrontier.Computability.QueryComplexity.DirectProduct

Capped adaptive direct products #

Let J index independent inputs. For each j, suppose every decision tree of depth at most c j has weighted success at most b j on input j. A tree that may interleave its queries to the inputs adaptively, but queries input j at most c j times on every path, outputs all answers correctly with weighted success at most ∏ j, b j. With r copies of one problem, cap L and bound b, this is the bound b ^ r of [OpenAI2026Quartic, Lemma 4.1].

Each input may have its own partial function, weight, cap and bound; the query positions and the finite, nonempty output alphabet are shared. A partial function takes values in Option β, and an input mapped to none never counts as a success. Weights need only be nonnegative; for probabilities, take normalised weights supported on the promise. The caps are the structural caps DecisionTree.Capped. Neither a total budget of ∑ j, c j queries nor a bound on the expected number of queries to each input suffices; the test module checks a counterexample to each.

Randomized algorithms are handled by averaging over a finitely supported law of trees (StdSimplex, or RandomizedDecisionTree), each of which respects the caps. No definition of promise randomized complexity is introduced.

The proof follows the induction in Will Cook's Lean formalization quartic-query-lean (revision db3feec), which replaces the supermartingale argument of the source. The best success of a depth-c tree for one input is a finite recursive optimum, attained by a tree. Induction on the joint tree then updates one input's weight and spends one unit of its cap at each query, so adaptive interleaving needs no conditioning or division.

Main definitions #

Main results #

References #

def Cslib.DecisionTree.weightedSuccess {ι : Type u_1} {β : Type u_2} [Fintype ι] [DecidableEq ι] [DecidableEq β] (t : DecisionTree ι β) (ν : (ι → Bool) → ℝ) (f : (ι → Bool) → Option β) :

The weighted mass of inputs on which t returns the promised answer. Inputs where f is none contribute zero. No normalisation or sign condition is part of this definition.

theorem Cslib.DecisionTree.weightedSuccess_nonneg {ι : Type u_1} {β : Type u_2} [Fintype ι] [DecidableEq ι] [DecidableEq β] (t : DecisionTree ι β) (f : (ι → Bool) → Option β) {ν : (ι → Bool) → ℝ} (hν : ∀ (x : ι → Bool), 0 ≤ ν x) :

Weighted success is nonnegative for nonnegative weights.

def Cslib.DecisionTree.productSuccess {ι : Type u_1} {β : Type u_2} [Fintype ι] [DecidableEq ι] [DecidableEq β] {J : Type u_3} [Fintype J] [DecidableEq J] (t : DecisionTree (J × ι) (J → β)) (ν : J → (ι → Bool) → ℝ) (f : J → (ι → Bool) → Option β) :

The weighted mass of independent inputs for which every coordinate of the output is correct. Each coordinate has its own partial function and weight.

theorem Cslib.DecisionTree.productSuccess_leaf {ι : Type u_1} {β : Type u_2} [Fintype ι] [DecidableEq ι] [DecidableEq β] {J : Type u_3} [Fintype J] [DecidableEq J] (ν : J → (ι → Bool) → ℝ) (f : J → (ι → Bool) → Option β) (s : J → β) :
(leaf s).productSuccess ν f = ∏ j : J, (leaf (s j)).weightedSuccess (ν j) (f j)

A fixed vector of answers succeeds independently in each coordinate.

theorem Cslib.DecisionTree.productSuccess_le_prod {ι : Type u_1} {β : Type u_2} [Fintype ι] [DecidableEq ι] [DecidableEq β] {J : Type u_3} [Fintype J] [DecidableEq J] [Finite β] [Nonempty β] {f : J → (ι → Bool) → Option β} {ν : J → (ι → Bool) → ℝ} {c : J → ℕ} {b : J → ℝ} (hν : ∀ (j : J) (x : ι → Bool), 0 ≤ ν j x) (hb : ∀ (j : J) (t : DecisionTree ι β), t.depth ≤ c j → t.weightedSuccess (ν j) (f j) ≤ b j) (t : DecisionTree (J × ι) (J → β)) (ht : t.Capped c) :
t.productSuccess ν f ≤ ∏ j : J, b j

Capped direct product theorem [OpenAI2026Quartic, Lemma 4.1], for deterministic trees, with possibly different partial functions, weights, caps and bounds for the inputs. If every tree of depth at most c j has weighted success at most b j on input j, then every tree that queries input j at most c j times on each path, interleaving its queries adaptively, answers all inputs correctly with weighted success at most ∏ j, b j.

theorem Cslib.DecisionTree.sum_mul_productSuccess_le_prod {ι : Type u_1} {β : Type u_2} [Fintype ι] [DecidableEq ι] [DecidableEq β] {J : Type u_3} [Fintype J] [DecidableEq J] [Finite β] [Nonempty β] {S : Type u_4} {f : J → (ι → Bool) → Option β} {ν : J → (ι → Bool) → ℝ} {c : J → ℕ} {b : J → ℝ} (hν : ∀ (j : J) (x : ι → Bool), 0 ≤ ν j x) (hb : ∀ (j : J) (t : DecisionTree ι β), t.depth ≤ c j → t.weightedSuccess (ν j) (f j) ≤ b j) (p : Convexity.StdSimplex ℝ S) (T : S → DecisionTree (J × ι) (J → β)) (hT : ∀ s ∈ p.support, (T s).Capped c) :
(p.sum fun (s : S) (w : ℝ) => w * (T s).productSuccess ν f) ≤ ∏ j : J, b j

The capped direct product bound after drawing side information s, independent of the inputs, from a finitely supported probability distribution p and running the tree T s. The caps are required only for seeds in the support of p.

theorem Cslib.DecisionTree.productSuccess_le_prod_of_depth_le {ι : Type u_1} {β : Type u_2} [Fintype ι] [DecidableEq ι] [DecidableEq β] {J : Type u_3} [Fintype J] [DecidableEq J] [Finite β] [Nonempty β] {f : J → (ι → Bool) → Option β} {ν : J → (ι → Bool) → ℝ} {c : J → ℕ} {b : J → ℝ} {d : ℕ} (hν : ∀ (j : J) (x : ι → Bool), 0 ≤ ν j x) (hb : ∀ (j : J) (t : DecisionTree ι β), t.depth ≤ c j → t.weightedSuccess (ν j) (f j) ≤ b j) (t : DecisionTree (J × ι) (J → β)) (ht : t.depth ≤ d) (hc : ∀ (j : J), d ≤ c j) :
t.productSuccess ν f ≤ ∏ j : J, b j

A total depth bound d suffices for the capped direct product bound when d ≤ c j for every input j.

theorem Cslib.RandomizedDecisionTree.sum_mul_productSuccess_le_prod {ι : Type u_1} {β : Type u_2} {J : Type u_3} [Fintype ι] [DecidableEq ι] [DecidableEq β] [Finite β] [Nonempty β] [Fintype J] [DecidableEq J] {f : J → (ι → Bool) → Option β} {ν : J → (ι → Bool) → ℝ} {c : J → ℕ} {b : J → ℝ} (hν : ∀ (j : J) (x : ι → Bool), 0 ≤ ν j x) (hb : ∀ (j : J) (t : DecisionTree ι β), t.depth ≤ c j → t.weightedSuccess (ν j) (f j) ≤ b j) (μ : RandomizedDecisionTree (J × ι) (J → β)) (hμ : ∀ t ∈ μ.support, t.Capped c) :
(μ.sum fun (t : DecisionTree (J × ι) (J → β)) (w : ℝ) => w * t.productSuccess ν f) ≤ ∏ j : J, b j

The capped direct product bound for a randomized decision tree μ: the average over the drawn tree of its simultaneous success is at most ∏ j, b j. Every tree that μ can draw must respect the caps, so the caps hold in the worst case over the coins.

theorem Cslib.RandomizedDecisionTree.sum_mul_productSuccess_le_prod_of_depth_le {ι : Type u_1} {β : Type u_2} {J : Type u_3} [Fintype ι] [DecidableEq ι] [DecidableEq β] [Finite β] [Nonempty β] [Fintype J] [DecidableEq J] {f : J → (ι → Bool) → Option β} {ν : J → (ι → Bool) → ℝ} {c : J → ℕ} {b : J → ℝ} {d : ℕ} (hν : ∀ (j : J) (x : ι → Bool), 0 ≤ ν j x) (hb : ∀ (j : J) (t : DecisionTree ι β), t.depth ≤ c j → t.weightedSuccess (ν j) (f j) ≤ b j) (μ : RandomizedDecisionTree (J × ι) (J → β)) (hμ : μ.depth ≤ d) (hc : ∀ (j : J), d ≤ c j) :
(μ.sum fun (t : DecisionTree (J × ι) (J → β)) (w : ℝ) => w * t.productSuccess ν f) ≤ ∏ j : J, b j

The randomized capped direct product bound under a bound d ≤ c j on the depth of μ, the largest depth of a tree it can draw.