The switching lemma #
Håstad's switching lemma: if every term of a formula F in disjunctive normal form has at most
k literals and reads each variable once, then few restrictions (partial assignments,
BitString.PartialAssignment) leaving ℓ variables free make the canonical decision tree of F
deep. Precisely, at most #R(ℓ - s) (4k)^s of them leave a query path of length at least s
(DNF.card_filter_pathLength_le), and so at most that many leave F with decision tree
complexity at least s (DNF.card_switching_le), where R(m) is the set of restrictions of the
n variables ι leaving m of them free. Since #R(ℓ - s) / #R(ℓ) is about (2ℓ / n) ^ s, a
random restriction leaving ℓ ≪ n / k variables free turns F into a function of decision tree
complexity less than s, except with probability exponentially small in s [Has86]. Both
statements hold more generally among the extensions of any fixed restriction, which is the form
used to restrict a formula in several stages.
We follow Razborov's proof by encoding [Raz95], Jukna, Chapter 12. A
restriction ρ with a query path of length at least s on the input x is encoded by an extension
of ρ with s fewer free variables, which fixes each of the first s queried variables to the
value that satisfies the term it was queried for, together with a word of s letters from an
alphabet of size 4k: the position of each queried variable in its term, its value in x, and
whether it ends its stage (DNF.encode). Since the terms queried in the encoding are again the
first terms not falsified, the decoder can replay the path (DNF.decode, DNF.decode_encode).
Main definitions #
Cslib.Logic.PL.DNF.encode,Cslib.Logic.PL.DNF.decode: Razborov's encoding of a restriction with a long query path.
Main results #
Cslib.Logic.PL.DNF.decode_encode: the encoding is invertible.Cslib.Logic.PL.DNF.card_filter_pathLength_le: few restrictions leave long query paths.Cslib.Logic.PL.DNF.card_switching_le: the switching lemma, counting version.
References #
A restriction falsifies more terms than any restriction it extends.
The values of the variables making the literals of t true.
Instances For
Replay the canonical path from the code: cur is the term of the current stage, if the stage
has started, θ the restriction so far, and Q the variables replayed so far.
Instances For
Razborov's decoding: recover the restriction from its encoding.
Instances For
Razborov's encoding of the first s queries of the canonical path of x from ρ: the
restriction fixing the queried variables to the values satisfying their terms, and the code of
the path.
Instances For
Razborov's decoding. The encoding of a restriction with a query path of length at least
s determines the restriction.
Counting bad extensions. Among the extensions of ρ₀ leaving ℓ variables free, at most
#E(ℓ - s) (4k)^s have a canonical query path of length at least s, where E(m) are the
extensions of ρ₀ leaving m variables free, if every term of F has at most k literals and
reads each variable once.
Håstad's switching lemma, counting version. If every term of F has at most k literals
and reads each variable once, then at most #E(ℓ - s) (4k)^s of the extensions of ρ₀ leaving ℓ
variables free leave F with decision tree complexity at least s, where E(m) are the
extensions of ρ₀ leaving m variables free. For ρ₀ fixing nothing, these are all restrictions
(PartialAssignment.withFree).