TCSLib

38 Boolean Analysis — Restriction

38.1 Overview

This module sets up the basic machinery for the switching lemma: restrictions of Boolean variables, their effect on literals, terms and DNF formulas, the restricted Boolean function, the notion of a bad restriction, and a collection of small auxiliary lemmas about list operations and decision-tree depth used in the main argument.

38.2 Declarations

Definition 38.1 Restriction
✓
#

A restriction on \(n\) variables is a map \(\rho : \mathrm{Fin}\, n \to \mathrm{Option}\, \mathrm{Bool}\), assigning each variable either a fixed Boolean value or leaving it free (none).

Definition 38.2 Free variables of a restriction
✓
#

The set of free variables of a restriction \(\rho \) is the finite set of indices \(i \in \mathrm{Fin}\, n\) for which \(\rho (i)\) is unset (none).

Definition 38.3 Number of free variables
✓

The number of free variables of a restriction \(\rho \) is the cardinality of its set of free variables.

Definition 38.4 Extension of a point along a restriction
✓
#

Given a restriction \(\rho \) and a point \(x : \mathrm{Fin}\, n \to \mathrm{Bool}\), the extension \(\rho .\mathrm{extend}\, x\) is the Boolean assignment that uses the fixed value \(\rho (i)\) where it is set and falls back to \(x(i)\) on the free variables.

Definition 38.5 Fixing variables in a restriction
✓
#

Given a list of (variable, value) pairs, \(\mathrm{fixVars}\) updates the restriction so that each listed variable is set to the corresponding fixed Boolean value.

Definition 38.6 Un-fixing variables in a restriction
✓
#

Given a list of (variable, value) pairs, \(\mathrm{unfixVars}\) resets each listed variable to none, restoring it to a free variable.

Definition 38.7 Restriction with \(s\) free variables
✓

The predicate \(\mathrm{IsRestriction}\, s\, \rho \) holds when the restriction \(\rho \) has exactly \(s\) free variables.

Definition 38.8 Literal killed by a restriction
✓

A literal \(l\) is killed by \(\rho \) when \(\rho \) fixes its variable to the value that makes \(l\) false; concretely \(\rho (l.\mathrm{var}) = \mathrm{some}\, l.\mathrm{neg}\).

Definition 38.9 Literal fixed by a restriction
✓

A literal \(l\) is fixed by \(\rho \) when \(\rho \) fixes its variable to the value that makes \(l\) true; concretely \(\rho (l.\mathrm{var}) = \mathrm{some}\, (\lnot \, l.\mathrm{neg})\).

Definition 38.10 Term killed by a restriction
✓

A term (conjunction of literals) is killed by \(\rho \) when at least one of its literals is killed by \(\rho \), forcing the whole term to evaluate to false.

Definition 38.11 Term fixed by a restriction
✓

A term is fixed by \(\rho \) when every one of its literals is fixed by \(\rho \), forcing the whole term to evaluate to true.

Definition 38.12 Alive term
✓

A term \(t\) is alive under \(\rho \) when it is neither killed nor fixed by \(\rho \).

Definition 38.13 Restricted Boolean function
✓

Given \(f : (\mathrm{Fin}\, n \to \mathrm{Bool}) \to \mathrm{Bool}\) and a restriction \(\rho \), the restricted function maps \(x\) to \(f(\rho .\mathrm{extend}\, x)\), i.e. \(f\) evaluated on the free coordinates with the fixed coordinates set by \(\rho \).

Definition 38.14 Bad restriction
✓

A restriction \(\rho \) is bad for \(f\) at depth \(d\) when the restricted function \(\mathrm{restrictFn}\, f\, \rho \) has decision-tree depth strictly greater than \(d\).

Definition 38.15 Number of \(s\)-restrictions
✓
#

The number of restrictions on \(n\) variables leaving exactly \(s\) free, namely \(\binom {n}{s}\, 2^{\, n-s}\).

Lemma 38.16 Killed literals vanish under the induced assignment
✓

Fix \(n\) and let \(l\) be a literal on \(n\) variables, with underlying variable \(v \in \mathrm{Fin}\, n\) and polarity flag \(b \in \{ \text{false}, \text{true}\} \) (with \(b = \text{true}\) marking a negated literal). Let \(\rho \) be a restriction on \(n\) variables that kills \(l\), meaning \(\rho \) fixes \(v\) to the value \(b\). Then for every assignment \(x : \mathrm{Fin}\, n \to \{ \text{false}, \text{true}\} \), the literal \(l\) evaluates to false at the extension of \(x\) along \(\rho \).

Lemma 38.17 A fixed literal evaluates to true on any extension
✓

Let \(l\) be a literal on \(n\) variables and let \(\rho \) be a restriction on those same variables that fixes \(l\), meaning \(\rho \) assigns \(l\)’s variable the Boolean value that makes \(l\) true. Then for every assignment \(x : \mathrm{Fin}\, n \to \mathrm{Bool}\), the literal \(l\) evaluates to true on the extension of \(x\) along \(\rho \) (the assignment using \(\rho \)’s fixed value on each set variable and \(x\) on the free ones).

Lemma 38.18 Decision-tree depth bound from a computing tree
✓

Let \(f : (\mathrm{Fin}\, n \to \mathrm{Bool}) \to \mathrm{Bool}\) be a Boolean function, and let \(T\) be a decision tree on \(n\) variables of depth at most \(d\) that computes \(f\), meaning \(T\) evaluates to \(f(x)\) on every input \(x\). Then the decision-tree depth of \(f\) is at most \(d\).

Lemma 38.19 Boolean existential over a list is false when the predicate always fails
✓
#

Let \(l\) be a finite list of elements of a type \(\alpha \), and let \(p \colon \alpha \to \{ \mathrm{true}, \mathrm{false}\} \) be a Boolean predicate. If \(p(x) = \mathrm{false}\) for every entry \(x\) of \(l\), then the Boolean existential \(\bigvee _{x \in l} p(x)\) — the value \(\mathrm{true}\) exactly when some entry of \(l\) satisfies \(p\) — is \(\mathrm{false}\).

Lemma 38.20 A false witness makes a universal test fail
✓
#

Let \(l\) be a list of elements of a type \(\alpha \) and let \(p \colon \alpha \to \{ \mathrm{true}, \mathrm{false}\} \) be a Boolean predicate. If some element \(a\) of \(l\) satisfies \(p(a) = \mathrm{false}\), then the test whether every entry of \(l\) satisfies \(p\) evaluates to \(\mathrm{false}\).

Let \(f\) be a DNF formula on \(n\) Boolean variables and let \(\rho \) be a restriction of those variables. If at least one term of \(f\) is fixed by \(\rho \), then the restricted Boolean function \(x \mapsto f(\rho \text{-extension of }x)\) has decision-tree depth \(0\).

Let \(f\) be a DNF formula on \(n\) Boolean variables and let \(\rho \) be a restriction on these variables. If every term of \(f\) is killed by \(\rho \) — that is, each term contains a literal whose variable \(\rho \) fixes to the value making that literal false — then the restricted function \(x \mapsto f\bigl(\rho .\mathrm{extend}\, x\bigr)\) has decision-tree depth \(0\).

Lemma 38.23 Killing preserved under agreement on fixed variables
✓

Let \(t\) be a term on \(n\) variables and let \(\rho , \sigma : \mathrm{Fin}\, n \to \mathrm{Option}\, \mathrm{Bool}\) be two restrictions such that \(\sigma (v) = \rho (v)\) for every variable \(v\) that \(\rho \) fixes (that is, whenever \(\rho (v) \neq \mathrm{none}\)). If \(t\) is killed by \(\rho \), then \(t\) is also killed by \(\sigma \).

Lemma 38.24 First surviving term is preserved under agreement on fixed variables
✓

Let \(f\) be a DNF formula on \(n\) variables — a list of terms, each a conjunction of literals — and let \(\rho \) and \(\sigma \) be restrictions of these \(n\) variables. Suppose \(\sigma \) agrees with \(\rho \) on every variable that \(\rho \) fixes, that is, \(\sigma (v) = \rho (v)\) for every variable \(v\) on which \(\rho \) takes a Boolean value rather than leaving it free. Let \(t\) be the first term of \(f\) (in list order) that is not killed by \(\rho \), and suppose in addition that \(t\) is not killed by \(\sigma \). Then \(t\) is also the first term of \(f\) that is not killed by \(\sigma \).

Lemma 38.25 Term length bounded by DNF width
✓

Let \(f\) be a DNF formula in \(n\) variables, that is, a disjunction \(t_1 \vee \cdots \vee t_m\) of terms, where each term is a conjunction of literals, and let its width be the largest number of literals occurring in any of its terms (and \(0\) if \(f\) has no terms). Then for every term \(t\) appearing in \(f\), the number of literals in \(t\) is at most the width of \(f\).

Lemma 38.26 Projecting an indexed search back to the list
✓
#

Let \(l\) be a list over a type \(\alpha \), let \(p\colon \alpha \to \{ \text{true},\text{false}\} \) be a predicate, and fix a starting index \(s\). Form the indexed list obtained by pairing each entry of \(l\) with its position, numbered consecutively from \(s\). If the first pair in this indexed list whose first component satisfies \(p\) is the pair \((x,\mathrm{idx})\), then \(x\) is the first entry of \(l\) satisfying \(p\).

Lemma 38.27 Membership in the index-tagged list locates a tail
✓
#

Let \(t\) be a list over a type \(\alpha \), and tag each entry of \(t\) with its zero-based position, forming the list of pairs \((t_i, i)\). If a pair \((l, i)\) occurs among these tagged entries — equivalently, the entry of \(t\) at position \(i\) is \(l\) — then deleting the first \(i\) entries of \(t\) leaves a nonempty list whose first element is \(l\); that is, there is a list \(\mathit{rest}\) with \(t\) from position \(i\) onward equal to \(l\) prepended to \(\mathit{rest}\).

Lemma 38.28 Position index of a filtered tagged list stays below the length bound
✓
#

Let \(t\) be a finite list of elements of a type \(\alpha \), and tag each entry of \(t\) with its position to form the list of pairs \((t_i, i)\), whose second coordinates run through \(0, 1, \dots , |t| - 1\). Let \(p\) be any Boolean predicate on such pairs, and let \(w\) be a natural number with \(|t| \le w\). If a pair \((l, \mathit{idx})\) occurs in the sublist obtained by keeping exactly those tagged pairs on which \(p\) is true, then \(\mathit{idx} \lt w\).