Composition of Boolean functions and the KRW conjecture #
The composition f ⋄ g of f on m bits with g on n bits applies f
to the values of g on m disjoint blocks of n bits. Here depth and size
are the minimum depth and leaf count of a De Morgan formula (formulaDepth,
formulaSize). Substituting a formula for g into a formula for f gives,
for all f and g, depth (f ⋄ g) ≤ depth f + depth g
(formulaDepth_compose_le) and size (f ⋄ g) ≤ size f · size g
(formulaSize_compose_le). Projections give depth g ≤ depth (f ⋄ g) when
f is not constant and depth f ≤ depth (f ⋄ g) when g is not constant.
The Karchmer–Raz–Wigderson conjecture asserts that for non-constant f and
g the upper bounds are tight up to lower-order terms. It is stated here in
its strong form, with a constant slack. KRWDepthWith c says that
depth f + depth g ≤ depth (f ⋄ g) + c for all m, n and all non-constant
f and g (NonConstant), and KRWSizeWith c says that
size f · size g ≤ c · size (f ⋄ g) for all such f and g. The
conjectures KRWDepth and KRWSize say that some constant c works. They
are open, and nothing here proves them; forms whose slack grows with m or
n are not formalized.
Both non-constancy hypotheses are needed. If f or g is constant then
f ⋄ g is constant, and dropping either hypothesis from KRWDepthWith c or
KRWSizeWith c gives a false statement for every c
(not_forall_depth_of_constant_inner, not_forall_depth_of_constant_outer,
not_forall_size_of_constant_inner, not_forall_size_of_constant_outer).
Relabeling and substitution #
Relabel the variables of a formula.
Equations
- Algebraic.KW.Formula.mapIndex φ (Algebraic.KW.Formula.lit i b) = Algebraic.KW.Formula.lit (φ i) b
- Algebraic.KW.Formula.mapIndex φ (Algebraic.KW.Formula.const b) = Algebraic.KW.Formula.const b
- Algebraic.KW.Formula.mapIndex φ (l.and r) = (Algebraic.KW.Formula.mapIndex φ l).and (Algebraic.KW.Formula.mapIndex φ r)
- Algebraic.KW.Formula.mapIndex φ (l.or r) = (Algebraic.KW.Formula.mapIndex φ l).or (Algebraic.KW.Formula.mapIndex φ r)
Instances For
Substitute a formula, or its negation, for every literal.
Equations
- Algebraic.KW.Formula.subst σ (Algebraic.KW.Formula.lit i b) = if b = true then σ i else (σ i).neg
- Algebraic.KW.Formula.subst σ (Algebraic.KW.Formula.const b) = Algebraic.KW.Formula.const b
- Algebraic.KW.Formula.subst σ (l.and r) = (Algebraic.KW.Formula.subst σ l).and (Algebraic.KW.Formula.subst σ r)
- Algebraic.KW.Formula.subst σ (l.or r) = (Algebraic.KW.Formula.subst σ l).or (Algebraic.KW.Formula.subst σ r)
Instances For
Every Boolean function has a De Morgan formula, by Shannon expansion.
Composition #
The position of coordinate i of block j.
Equations
Instances For
The composition f ⋄ g: f applied to g on m disjoint blocks of n bits.
Equations
- Algebraic.KW.compose f g z = f fun (j : Fin m) => g fun (i : Fin n) => z (Algebraic.KW.blockIndex j i)
Instances For
Substitute a formula for g into a formula for f, block by block.
Equations
- F.compose G = Algebraic.KW.Formula.subst (fun (j : Fin m) => Algebraic.KW.Formula.mapIndex (Algebraic.KW.blockIndex j) G) F
Instances For
Every function has finite formula depth.
Composition adds at most the depths.
Composition multiplies at most the sizes.
Lower bounds by projection #
A non-constant function is sensitive at some point in some coordinate.
The depth of the inner function is at most the depth of the composition, when the outer function is sensitive at some point.
The depth of the outer function is at most the depth of the composition, when the inner function is not constant.
Non-constant functions #
A Boolean function is non-constant when it takes two different values.
Equations
- Algebraic.KW.NonConstant f = ∃ (x : Cslib.BitString n) (y : Cslib.BitString n), f x ≠ f y
Instances For
A non-constant function takes the value false somewhere and true somewhere.
A function that is not non-constant takes a single value.
A constant function has formula depth 0.
Every formula has a leaf, so every formula size is at least 1.
A constant function has formula size 1.
For non-constant g, the depth of f is at most the depth of f ⋄ g.
For non-constant f, the depth of g is at most the depth of f ⋄ g.
The conjecture #
The Karchmer–Raz–Wigderson conjecture, depth form, with additive slack c:
for all non-constant f on m bits and g on n bits,
formulaDepth f + formulaDepth g ≤ formulaDepth (f ⋄ g) + c. The slack c is
a single number, independent of m, n, f and g. The converse inequality
formulaDepth (f ⋄ g) ≤ formulaDepth f + formulaDepth g holds for all f and
g (formulaDepth_compose_le).
Equations
- One or more equations did not get rendered due to their size.
Instances For
The Karchmer–Raz–Wigderson conjecture, size form, with multiplicative slack
c: for all non-constant f on m bits and g on n bits,
formulaSize f * formulaSize g ≤ c * formulaSize (f ⋄ g). The slack c is a
single number, independent of m, n, f and g. The converse inequality
formulaSize (f ⋄ g) ≤ formulaSize f * formulaSize g holds for all f and g
(formulaSize_compose_le).
Equations
- One or more equations did not get rendered due to their size.
Instances For
The KRW conjecture, depth form (open): some constant additive slack
works, ∃ c, KRWDepthWith c.
Equations
- Algebraic.KW.KRWDepth = ∃ (c : ℕ), Algebraic.KW.KRWDepthWith c
Instances For
The KRW conjecture, size form (open): some constant multiplicative slack
works, ∃ c, KRWSizeWith c.
Equations
- Algebraic.KW.KRWSize = ∃ (c : ℕ), Algebraic.KW.KRWSizeWith c
Instances For
A larger additive slack gives a weaker statement.
A larger multiplicative slack gives a weaker statement.
Both non-constancy hypotheses are needed #
If f or g is constant then f ⋄ g is constant, of depth 0 and size 1,
while the other function can have depth or size above any fixed slack. So
dropping either hypothesis from KRWDepthWith c or KRWSizeWith c gives a
false statement, whatever c is. The witness of large depth and size is the
conjunction of all k bits, whose formulas read every bit and so have at
least k leaves and depth at least log₂ k.
A formula reads every coordinate its function is sensitive to.
Without non-constancy of g, the depth form fails for every slack c.
Without non-constancy of f, the depth form fails for every slack c.
Without non-constancy of g, the size form fails for every slack c.
Without non-constancy of f, the size form fails for every slack c.