Adversary bound of a composed function is at most the product
ProvedQAlgorithms.Childs.adversary_compose_leLet and be total Boolean functions, and let be the block composition
where with each block . With the general adversary bound (24.1), taken over the full domains,
This composition upper bound, combined with the dual solutions for OR and AND, gives for balanced binary AND-OR trees.
Formalization Note Input positions of are indexed by pairs (bit of block ) over arbitrary finite index types; this is the source's consecutive-block layout up to the relabelling , under which is invariant. is valued in and is for constant functions.
import Definitions.Def_QAlgorithms_Defs_Adversary set_option autoImplicit false
namespace QAlgorithms.Childs
open scoped NNReal ENNReal
/-- Childs, Theorem 24.2 (PDF p. 126): for total `f : {0,1}^n → {0,1}` and
`g : {0,1}^m → {0,1}`, `Adv±(f ∘ g) ≤ Adv±(f) Adv±(g)`, where
`(f ∘ g)(y) = f(g(y¹), …, g(yⁿ))` with `yⁱ ∈ {0,1}^m` the `i`-th block of `y`. The composed input
is indexed by `ι × κ`, `y (i, j)` being bit `j` of block `i`. -/
theorem adversary_compose_le {ι κ : Type*} [Fintype ι] [DecidableEq ι] [Fintype κ]
[DecidableEq κ] (f : (ι → Bool) → Bool) (g : (κ → Bool) → Bool) :
advPm (blockCompose f g) Finset.univ ≤ advPm f Finset.univ * advPm g Finset.univ := by
sorry
end QAlgorithms.Childs
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let and be finite index sets with decidable equality. Let and be arbitrary Boolean functions.
The composed function. The block composition is the Boolean function on given by
That is, is applied to each block , and is applied to the resulting -indexed string.
The claim. In ,
- Domains. All three quantities use the full domain of all bit strings, so every function is total.
- Definition. is exactly as defined in the previous entry: the supremum, over nonzero real symmetric matrices that vanish on pairs with , of . The spectral norm is used, and the conventions and empty supremum apply.
- Multiplication. The product is taken in , with the convention .
- Inequality only. Only an upper bound is asserted, not equality.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.