4.1. DNF formulas
-
FABL.Literal[complete] -
FABL.Literal.eval[complete] -
FABL.Literal.eval_eq_neg_one_iff[complete] -
FABL.Literal.negate[complete] -
FABL.DNFTerm[complete] -
FABL.DNFTerm.width[complete] -
FABL.DNFTerm.eval[complete] -
FABL.DNFTerm.eval_eq_neg_one_iff[complete] -
FABL.DNFFormula[complete] -
FABL.DNFFormula.size[complete] -
FABL.DNFFormula.width[complete] -
FABL.DNFFormula.eval[complete] -
FABL.DNFFormula.eval_eq_neg_one_iff[complete] -
FABL.DNFFormula.toBooleanFunction[complete]
Definition 4.1. A DNF (disjunctive normal form) formula over Boolean
variables x_1,\ldots,x_n is a logical OR of terms, each of which is a
logical AND of literals. A literal is either a variable x_i or its
logical negation \overline{x_i}. No term contains both a variable and its
negation. The number of literals in a term is its width. A DNF formula is
often identified with the Boolean function f:\{0,1\}^n\to\{0,1\} (or, in
\pm1 notation, f:\{-1,1\}^n\to\{-1,1\}) that it computes.
In \pm1 notation, a literal is a coordinate together with its required
sign, with -1 representing logical True.
Lean code for Definition4.1.1●14 declarations
Associated Lean declarations
-
FABL.Literal[complete]
-
FABL.Literal.eval[complete]
-
FABL.Literal.eval_eq_neg_one_iff[complete]
-
FABL.Literal.negate[complete]
-
FABL.DNFTerm[complete]
-
FABL.DNFTerm.width[complete]
-
FABL.DNFTerm.eval[complete]
-
FABL.DNFTerm.eval_eq_neg_one_iff[complete]
-
FABL.DNFFormula[complete]
-
FABL.DNFFormula.size[complete]
-
FABL.DNFFormula.width[complete]
-
FABL.DNFFormula.eval[complete]
-
FABL.DNFFormula.eval_eq_neg_one_iff[complete]
-
FABL.DNFFormula.toBooleanFunction[complete]
-
FABL.Literal[complete] -
FABL.Literal.eval[complete] -
FABL.Literal.eval_eq_neg_one_iff[complete] -
FABL.Literal.negate[complete] -
FABL.DNFTerm[complete] -
FABL.DNFTerm.width[complete] -
FABL.DNFTerm.eval[complete] -
FABL.DNFTerm.eval_eq_neg_one_iff[complete] -
FABL.DNFFormula[complete] -
FABL.DNFFormula.size[complete] -
FABL.DNFFormula.width[complete] -
FABL.DNFFormula.eval[complete] -
FABL.DNFFormula.eval_eq_neg_one_iff[complete] -
FABL.DNFFormula.toBooleanFunction[complete]
-
structuredefined in FABL/Chapter04/DNFFormulas.leancomplete
structure FABL.Literal (n : ℕ) : Type
structure FABL.Literal (n : ℕ) : Type
A literal: coordinate `index` must equal `required`.
Fields
index : Fin n
Variable coordinate of the literal.
required : FABL.Sign
Required sign for the coordinate (`-1` = unnegated True under book convention).
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.Literal.eval {n : ℕ} (ℓ : FABL.Literal n) (x : FABL.SignCube n) : FABL.Sign
def FABL.Literal.eval {n : ℕ} (ℓ : FABL.Literal n) (x : FABL.SignCube n) : FABL.Sign
Evaluate a literal: `-1` (True) when the coordinate matches.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.Literal.eval_eq_neg_one_iff {n : ℕ} (ℓ : FABL.Literal n) (x : FABL.SignCube n) : ℓ.eval x = -1 ↔ x ℓ.index = ℓ.required
theorem FABL.Literal.eval_eq_neg_one_iff {n : ℕ} (ℓ : FABL.Literal n) (x : FABL.SignCube n) : ℓ.eval x = -1 ↔ x ℓ.index = ℓ.required
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.Literal.negate {n : ℕ} (ℓ : FABL.Literal n) : FABL.Literal n
def FABL.Literal.negate {n : ℕ} (ℓ : FABL.Literal n) : FABL.Literal n
Negate a literal by flipping its required sign.
-
structuredefined in FABL/Chapter04/DNFFormulas.leancomplete
structure FABL.DNFTerm (n : ℕ) : Type
structure FABL.DNFTerm (n : ℕ) : Type
A DNF term: AND of literals on pairwise-distinct variables.
Fields
literals : List (FABL.Literal n)
Literals in the term (AND).
nodupIndices : (List.map FABL.Literal.index self.literals).Nodup
Indices of the literals are pairwise distinct.
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.DNFTerm.width {n : ℕ} (T : FABL.DNFTerm n) : ℕ
def FABL.DNFTerm.width {n : ℕ} (T : FABL.DNFTerm n) : ℕ
Width of a term.
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.DNFTerm.eval {n : ℕ} (T : FABL.DNFTerm n) (x : FABL.SignCube n) : FABL.Sign
def FABL.DNFTerm.eval {n : ℕ} (T : FABL.DNFTerm n) (x : FABL.SignCube n) : FABL.Sign
Evaluate a term: `-1` iff every literal is satisfied.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.DNFTerm.eval_eq_neg_one_iff {n : ℕ} (T : FABL.DNFTerm n) (x : FABL.SignCube n) : T.eval x = -1 ↔ ∀ ℓ ∈ T.literals, x ℓ.index = ℓ.required
theorem FABL.DNFTerm.eval_eq_neg_one_iff {n : ℕ} (T : FABL.DNFTerm n) (x : FABL.SignCube n) : T.eval x = -1 ↔ ∀ ℓ ∈ T.literals, x ℓ.index = ℓ.required
-
structuredefined in FABL/Chapter04/DNFFormulas.leancomplete
structure FABL.DNFFormula (n : ℕ) : Type
structure FABL.DNFFormula (n : ℕ) : Type
A DNF formula: logical OR of terms.
Fields
terms : List (FABL.DNFTerm n)
Terms of the DNF (OR).
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.DNFFormula.size {n : ℕ} (φ : FABL.DNFFormula n) : ℕ
def FABL.DNFFormula.size {n : ℕ} (φ : FABL.DNFFormula n) : ℕ
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.DNFFormula.width {n : ℕ} (φ : FABL.DNFFormula n) : ℕ
def FABL.DNFFormula.width {n : ℕ} (φ : FABL.DNFFormula n) : ℕ
Width: maximum term width (0 if empty).
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.DNFFormula.eval {n : ℕ} (φ : FABL.DNFFormula n) (x : FABL.SignCube n) : FABL.Sign
def FABL.DNFFormula.eval {n : ℕ} (φ : FABL.DNFFormula n) (x : FABL.SignCube n) : FABL.Sign
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.DNFFormula.eval_eq_neg_one_iff {n : ℕ} (φ : FABL.DNFFormula n) (x : FABL.SignCube n) : φ.eval x = -1 ↔ ∃ T ∈ φ.terms, T.eval x = -1
theorem FABL.DNFFormula.eval_eq_neg_one_iff {n : ℕ} (φ : FABL.DNFFormula n) (x : FABL.SignCube n) : φ.eval x = -1 ↔ ∃ T ∈ φ.terms, T.eval x = -1
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.DNFFormula.toBooleanFunction {n : ℕ} (φ : FABL.DNFFormula n) : FABL.BooleanFunction n
def FABL.DNFFormula.toBooleanFunction {n : ℕ} (φ : FABL.DNFFormula n) : FABL.BooleanFunction n
-
FABL.signToBit[complete] -
FABL.sort3[complete] -
FABL.sort3ReducedDNF[complete] -
FABL.sort3DNF[complete] -
FABL.sort3ReducedDNF_toBooleanFunction[complete] -
FABL.sort3DNF_toBooleanFunction[complete] -
FABL.size_sort3ReducedDNF[complete] -
FABL.width_sort3ReducedDNF[complete] -
FABL.size_sort3DNF[complete] -
FABL.width_sort3DNF[complete]
Example 4.2. The function \operatorname{Sort}_3:\{-1,1\}^3\to\{-1,1\} is
defined by \operatorname{Sort}_3(x_1,x_2,x_3)=-1 if and only if the bits are
sorted in either nondecreasing or nonincreasing order under the canonical
embedding 0\mapsto+1, 1\mapsto-1. It is computed by the width-2 DNF
(x_1\wedge x_2)
\vee
(\overline{x_2}\wedge\overline{x_3})
\vee
(\overline{x_1}\wedge x_3)
\vee
(x_1\wedge\overline{x_3}).
The displayed formula has four terms, with its last term redundant; deleting it
gives the size-3, width-2 formula asserted in the following paragraph of
the book. Both formulas compute \operatorname{Sort}_3.
Lean code for Lemma4.1.2●10 declarations
Associated Lean declarations
-
FABL.signToBit[complete]
-
FABL.sort3[complete]
-
FABL.sort3ReducedDNF[complete]
-
FABL.sort3DNF[complete]
-
FABL.sort3ReducedDNF_toBooleanFunction[complete]
-
FABL.sort3DNF_toBooleanFunction[complete]
-
FABL.size_sort3ReducedDNF[complete]
-
FABL.width_sort3ReducedDNF[complete]
-
FABL.size_sort3DNF[complete]
-
FABL.width_sort3DNF[complete]
-
FABL.signToBit[complete] -
FABL.sort3[complete] -
FABL.sort3ReducedDNF[complete] -
FABL.sort3DNF[complete] -
FABL.sort3ReducedDNF_toBooleanFunction[complete] -
FABL.sort3DNF_toBooleanFunction[complete] -
FABL.size_sort3ReducedDNF[complete] -
FABL.width_sort3ReducedDNF[complete] -
FABL.size_sort3DNF[complete] -
FABL.width_sort3DNF[complete]
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.signToBit (s : FABL.Sign) : Bool
def FABL.signToBit (s : FABL.Sign) : Bool
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.sort3 : FABL.BooleanFunction 3
def FABL.sort3 : FABL.BooleanFunction 3
O'Donnell's `Sort₃` via the canonical bit-to-sign embedding `1 ↦ -1`.
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.sort3ReducedDNF : FABL.DNFFormula 3
def FABL.sort3ReducedDNF : FABL.DNFFormula 3
The three-term reduction of the displayed DNF in Example 4.2.
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.sort3DNF : FABL.DNFFormula 3
def FABL.sort3DNF : FABL.DNFFormula 3
Example 4.2's displayed four-term DNF; its last term is redundant.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.sort3ReducedDNF_toBooleanFunction : FABL.sort3ReducedDNF.toBooleanFunction = FABL.sort3
theorem FABL.sort3ReducedDNF_toBooleanFunction : FABL.sort3ReducedDNF.toBooleanFunction = FABL.sort3
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.sort3DNF_toBooleanFunction : FABL.sort3DNF.toBooleanFunction = FABL.sort3
theorem FABL.sort3DNF_toBooleanFunction : FABL.sort3DNF.toBooleanFunction = FABL.sort3
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.size_sort3ReducedDNF : FABL.sort3ReducedDNF.size = 3
theorem FABL.size_sort3ReducedDNF : FABL.sort3ReducedDNF.size = 3
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.width_sort3ReducedDNF : FABL.sort3ReducedDNF.width = 2
theorem FABL.width_sort3ReducedDNF : FABL.sort3ReducedDNF.width = 2
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.size_sort3DNF : FABL.sort3DNF.size = 4
theorem FABL.size_sort3DNF : FABL.sort3DNF.size = 4
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.width_sort3DNF : FABL.sort3DNF.width = 2
theorem FABL.width_sort3DNF : FABL.sort3DNF.width = 2
-
FABL.DNFTerm.minterm[complete] -
FABL.DNFTerm.width_minterm[complete] -
FABL.DNFTerm.eval_minterm_eq_neg_one_iff[complete] -
FABL.mintermDNF[complete] -
FABL.size_mintermDNF_le[complete] -
FABL.width_mintermDNF_le[complete] -
FABL.mintermDNF_toBooleanFunction[complete] -
FABL.exists_DNFFormula_size_width_bound[complete] -
FABL.hasDNFSizeLE_two_pow[complete] -
FABL.hasDNFWidthLE_dimension[complete]
Exercise 4.1. Every function f:\{-1,1\}^n\to\{-1,1\} is computable by a
DNF formula of size at most 2^n and width at most n. (Take the OR of
all full minterms corresponding to inputs where f is True.)
Lean code for Lemma4.1.3●10 declarations
Associated Lean declarations
-
FABL.DNFTerm.minterm[complete]
-
FABL.DNFTerm.width_minterm[complete]
-
FABL.DNFTerm.eval_minterm_eq_neg_one_iff[complete]
-
FABL.mintermDNF[complete]
-
FABL.size_mintermDNF_le[complete]
-
FABL.width_mintermDNF_le[complete]
-
FABL.mintermDNF_toBooleanFunction[complete]
-
FABL.exists_DNFFormula_size_width_bound[complete]
-
FABL.hasDNFSizeLE_two_pow[complete]
-
FABL.hasDNFWidthLE_dimension[complete]
-
FABL.DNFTerm.minterm[complete] -
FABL.DNFTerm.width_minterm[complete] -
FABL.DNFTerm.eval_minterm_eq_neg_one_iff[complete] -
FABL.mintermDNF[complete] -
FABL.size_mintermDNF_le[complete] -
FABL.width_mintermDNF_le[complete] -
FABL.mintermDNF_toBooleanFunction[complete] -
FABL.exists_DNFFormula_size_width_bound[complete] -
FABL.hasDNFSizeLE_two_pow[complete] -
FABL.hasDNFWidthLE_dimension[complete]
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.DNFTerm.minterm {n : ℕ} (x : FABL.SignCube n) : FABL.DNFTerm n
def FABL.DNFTerm.minterm {n : ℕ} (x : FABL.SignCube n) : FABL.DNFTerm n
Full minterm forcing every coordinate of `x`.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.DNFTerm.width_minterm {n : ℕ} (x : FABL.SignCube n) : (FABL.DNFTerm.minterm x).width = n
theorem FABL.DNFTerm.width_minterm {n : ℕ} (x : FABL.SignCube n) : (FABL.DNFTerm.minterm x).width = n
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.DNFTerm.eval_minterm_eq_neg_one_iff {n : ℕ} (x y : FABL.SignCube n) : (FABL.DNFTerm.minterm x).eval y = -1 ↔ y = x
theorem FABL.DNFTerm.eval_minterm_eq_neg_one_iff {n : ℕ} (x y : FABL.SignCube n) : (FABL.DNFTerm.minterm x).eval y = -1 ↔ y = x
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.mintermDNF {n : ℕ} (f : FABL.BooleanFunction n) : FABL.DNFFormula n
def FABL.mintermDNF {n : ℕ} (f : FABL.BooleanFunction n) : FABL.DNFFormula n
Canonical minterm DNF for a Boolean function.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.size_mintermDNF_le {n : ℕ} (f : FABL.BooleanFunction n) : (FABL.mintermDNF f).size ≤ 2 ^ n
theorem FABL.size_mintermDNF_le {n : ℕ} (f : FABL.BooleanFunction n) : (FABL.mintermDNF f).size ≤ 2 ^ n
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.width_mintermDNF_le {n : ℕ} (f : FABL.BooleanFunction n) : (FABL.mintermDNF f).width ≤ n
theorem FABL.width_mintermDNF_le {n : ℕ} (f : FABL.BooleanFunction n) : (FABL.mintermDNF f).width ≤ n
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.mintermDNF_toBooleanFunction {n : ℕ} (f : FABL.BooleanFunction n) : (FABL.mintermDNF f).toBooleanFunction = f
theorem FABL.mintermDNF_toBooleanFunction {n : ℕ} (f : FABL.BooleanFunction n) : (FABL.mintermDNF f).toBooleanFunction = f
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.exists_DNFFormula_size_width_bound {n : ℕ} (f : FABL.BooleanFunction n) : ∃ φ, φ.size ≤ 2 ^ n ∧ φ.width ≤ n ∧ φ.toBooleanFunction = f
theorem FABL.exists_DNFFormula_size_width_bound {n : ℕ} (f : FABL.BooleanFunction n) : ∃ φ, φ.size ≤ 2 ^ n ∧ φ.width ≤ n ∧ φ.toBooleanFunction = f
Exercise 4.1.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.hasDNFSizeLE_two_pow {n : ℕ} (f : FABL.BooleanFunction n) : FABL.HasDNFSizeLE f (2 ^ n)
theorem FABL.hasDNFSizeLE_two_pow {n : ℕ} (f : FABL.BooleanFunction n) : FABL.HasDNFSizeLE f (2 ^ n)
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.hasDNFWidthLE_dimension {n : ℕ} (f : FABL.BooleanFunction n) : FABL.HasDNFWidthLE f n
theorem FABL.hasDNFWidthLE_dimension {n : ℕ} (f : FABL.BooleanFunction n) : FABL.HasDNFWidthLE f n
-
FABL.HasDNFSizeLE[complete] -
FABL.HasDNFWidthLE[complete] -
FABL.DNFsize[complete] -
FABL.DNFwidth[complete] -
FABL.hasDNFSizeLE_DNFsize[complete] -
FABL.hasDNFWidthLE_DNFwidth[complete]
Definition 4.3. The size of a DNF formula is its number of terms. The
width is the maximum width of its terms. For
f:\{-1,1\}^n\to\{-1,1\} write \operatorname{DNFsize}(f) (respectively,
\operatorname{DNFwidth}(f)) for the least size (respectively, width) of a
DNF formula computing f.
Lean code for Definition4.1.4●6 declarations
Associated Lean declarations
-
FABL.HasDNFSizeLE[complete]
-
FABL.HasDNFWidthLE[complete]
-
FABL.DNFsize[complete]
-
FABL.DNFwidth[complete]
-
FABL.hasDNFSizeLE_DNFsize[complete]
-
FABL.hasDNFWidthLE_DNFwidth[complete]
-
FABL.HasDNFSizeLE[complete] -
FABL.HasDNFWidthLE[complete] -
FABL.DNFsize[complete] -
FABL.DNFwidth[complete] -
FABL.hasDNFSizeLE_DNFsize[complete] -
FABL.hasDNFWidthLE_DNFwidth[complete]
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.HasDNFSizeLE {n : ℕ} (f : FABL.BooleanFunction n) (s : ℕ) : Prop
def FABL.HasDNFSizeLE {n : ℕ} (f : FABL.BooleanFunction n) (s : ℕ) : Prop
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.HasDNFWidthLE {n : ℕ} (f : FABL.BooleanFunction n) (w : ℕ) : Prop
def FABL.HasDNFWidthLE {n : ℕ} (f : FABL.BooleanFunction n) (w : ℕ) : Prop
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.DNFsize {n : ℕ} (f : FABL.BooleanFunction n) : ℕ
def FABL.DNFsize {n : ℕ} (f : FABL.BooleanFunction n) : ℕ
O'Donnell, Definition 4.3: least DNF size.
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.DNFwidth {n : ℕ} (f : FABL.BooleanFunction n) : ℕ
def FABL.DNFwidth {n : ℕ} (f : FABL.BooleanFunction n) : ℕ
O'Donnell, Definition 4.3: least DNF width.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.hasDNFSizeLE_DNFsize {n : ℕ} (f : FABL.BooleanFunction n) : FABL.HasDNFSizeLE f (FABL.DNFsize f)
theorem FABL.hasDNFSizeLE_DNFsize {n : ℕ} (f : FABL.BooleanFunction n) : FABL.HasDNFSizeLE f (FABL.DNFsize f)
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.hasDNFWidthLE_DNFwidth {n : ℕ} (f : FABL.BooleanFunction n) : FABL.HasDNFWidthLE f (FABL.DNFwidth f)
theorem FABL.hasDNFWidthLE_DNFwidth {n : ℕ} (f : FABL.BooleanFunction n) : FABL.HasDNFWidthLE f (FABL.DNFwidth f)
-
FABL.CNFFormula[complete] -
FABL.CNFFormula.size[complete] -
FABL.CNFFormula.width[complete] -
FABL.CNFFormula.clauseEval[complete] -
FABL.CNFFormula.eval[complete] -
FABL.CNFFormula.toBooleanFunction[complete] -
FABL.HasCNFSizeLE[complete] -
FABL.HasCNFWidthLE[complete]
Definition 4.4. A CNF (conjunctive normal form) formula is a logical AND of clauses, each of which is a logical OR of literals. Size and width are defined exactly as for DNFs.
Lean code for Definition4.1.5●8 definitions
Associated Lean declarations
-
FABL.CNFFormula[complete]
-
FABL.CNFFormula.size[complete]
-
FABL.CNFFormula.width[complete]
-
FABL.CNFFormula.clauseEval[complete]
-
FABL.CNFFormula.eval[complete]
-
FABL.CNFFormula.toBooleanFunction[complete]
-
FABL.HasCNFSizeLE[complete]
-
FABL.HasCNFWidthLE[complete]
-
FABL.CNFFormula[complete] -
FABL.CNFFormula.size[complete] -
FABL.CNFFormula.width[complete] -
FABL.CNFFormula.clauseEval[complete] -
FABL.CNFFormula.eval[complete] -
FABL.CNFFormula.toBooleanFunction[complete] -
FABL.HasCNFSizeLE[complete] -
FABL.HasCNFWidthLE[complete]
-
structuredefined in FABL/Chapter04/DNFFormulas.leancomplete
structure FABL.CNFFormula (n : ℕ) : Type
structure FABL.CNFFormula (n : ℕ) : Type
A CNF formula: AND of clauses; each clause is an OR of the stored literals.
Fields
clauses : List (FABL.DNFTerm n)
Clauses of the CNF (AND of ORs of the stored literals).
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.CNFFormula.size {n : ℕ} (ψ : FABL.CNFFormula n) : ℕ
def FABL.CNFFormula.size {n : ℕ} (ψ : FABL.CNFFormula n) : ℕ
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.CNFFormula.width {n : ℕ} (ψ : FABL.CNFFormula n) : ℕ
def FABL.CNFFormula.width {n : ℕ} (ψ : FABL.CNFFormula n) : ℕ
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.CNFFormula.clauseEval {n : ℕ} (C : FABL.DNFTerm n) (x : FABL.SignCube n) : FABL.Sign
def FABL.CNFFormula.clauseEval {n : ℕ} (C : FABL.DNFTerm n) (x : FABL.SignCube n) : FABL.Sign
Clause as OR of literals.
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.CNFFormula.eval {n : ℕ} (ψ : FABL.CNFFormula n) (x : FABL.SignCube n) : FABL.Sign
def FABL.CNFFormula.eval {n : ℕ} (ψ : FABL.CNFFormula n) (x : FABL.SignCube n) : FABL.Sign
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.CNFFormula.toBooleanFunction {n : ℕ} (ψ : FABL.CNFFormula n) : FABL.BooleanFunction n
def FABL.CNFFormula.toBooleanFunction {n : ℕ} (ψ : FABL.CNFFormula n) : FABL.BooleanFunction n
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.HasCNFSizeLE {n : ℕ} (f : FABL.BooleanFunction n) (s : ℕ) : Prop
def FABL.HasCNFSizeLE {n : ℕ} (f : FABL.BooleanFunction n) (s : ℕ) : Prop
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.HasCNFWidthLE {n : ℕ} (f : FABL.BooleanFunction n) (w : ℕ) : Prop
def FABL.HasCNFWidthLE {n : ℕ} (f : FABL.BooleanFunction n) (w : ℕ) : Prop
-
FABL.CNFFormula.booleanDual[complete] -
FABL.CNFFormula.switchAndOr[complete] -
FABL.CNFFormula.clauseEval_neg_iff_termEval[complete] -
FABL.CNFFormula.switchAndOr_toBooleanFunction[complete] -
FABL.hasDNFSizeWidth_of_hasCNFSizeWidth[complete]
Exercise 4.2. Suppose a CNF computes f:\{0,1\}^n\to\{0,1\}. Switching
ANDs with ORs yields a DNF computing the Boolean dual
f^\dagger:\{0,1\}^n\to\{0,1\} defined by
f^\dagger(x)=\neg f(\neg x) (cf. Exercise 1.8). In \pm1 notation this is
f^\dagger(x)=-f(-x).
Lean code for Lemma4.1.6●5 declarations
Associated Lean declarations
-
FABL.CNFFormula.booleanDual[complete]
-
FABL.CNFFormula.switchAndOr[complete]
-
FABL.CNFFormula.clauseEval_neg_iff_termEval[complete]
-
FABL.CNFFormula.switchAndOr_toBooleanFunction[complete]
-
FABL.hasDNFSizeWidth_of_hasCNFSizeWidth[complete]
-
FABL.CNFFormula.booleanDual[complete] -
FABL.CNFFormula.switchAndOr[complete] -
FABL.CNFFormula.clauseEval_neg_iff_termEval[complete] -
FABL.CNFFormula.switchAndOr_toBooleanFunction[complete] -
FABL.hasDNFSizeWidth_of_hasCNFSizeWidth[complete]
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.CNFFormula.booleanDual {n : ℕ} (f : FABL.BooleanFunction n) : FABL.BooleanFunction n
def FABL.CNFFormula.booleanDual {n : ℕ} (f : FABL.BooleanFunction n) : FABL.BooleanFunction n
Boolean dual: `f†(x) = -f(-x)` (Exercise 1.8).
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.CNFFormula.switchAndOr {n : ℕ} (ψ : FABL.CNFFormula n) : FABL.DNFFormula n
def FABL.CNFFormula.switchAndOr {n : ℕ} (ψ : FABL.CNFFormula n) : FABL.DNFFormula n
Exercise 4.2: switch AND/OR, keeping the same literal lists as DNF terms.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.CNFFormula.clauseEval_neg_iff_termEval {n : ℕ} (C : FABL.DNFTerm n) (x : FABL.SignCube n) : (FABL.CNFFormula.clauseEval C fun i => -x i) = 1 ↔ C.eval x = -1
theorem FABL.CNFFormula.clauseEval_neg_iff_termEval {n : ℕ} (C : FABL.DNFTerm n) (x : FABL.SignCube n) : (FABL.CNFFormula.clauseEval C fun i => -x i) = 1 ↔ C.eval x = -1
A clause (OR of literals) is false at `-x` iff the same literals form a true term at `x`.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.CNFFormula.switchAndOr_toBooleanFunction {n : ℕ} (ψ : FABL.CNFFormula n) : ψ.switchAndOr.toBooleanFunction = FABL.CNFFormula.booleanDual ψ.toBooleanFunction
theorem FABL.CNFFormula.switchAndOr_toBooleanFunction {n : ℕ} (ψ : FABL.CNFFormula n) : ψ.switchAndOr.toBooleanFunction = FABL.CNFFormula.booleanDual ψ.toBooleanFunction
O'Donnell, Exercise 4.2: switching AND/OR turns a CNF for `f` into a DNF for the dual.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.hasDNFSizeWidth_of_hasCNFSizeWidth {n : ℕ} {f : FABL.BooleanFunction n} {s w : ℕ} (hs : FABL.HasCNFSizeLE f s) (hw : FABL.HasCNFWidthLE f w) : FABL.HasDNFSizeLE (FABL.CNFFormula.booleanDual f) s ∧ FABL.HasDNFWidthLE (FABL.CNFFormula.booleanDual f) w
theorem FABL.hasDNFSizeWidth_of_hasCNFSizeWidth {n : ℕ} {f : FABL.BooleanFunction n} {s w : ℕ} (hs : FABL.HasCNFSizeLE f s) (hw : FABL.HasCNFWidthLE f w) : FABL.HasDNFSizeLE (FABL.CNFFormula.booleanDual f) s ∧ FABL.HasDNFWidthLE (FABL.CNFFormula.booleanDual f) w
Exercise 4.2 consequence: dual of a size/width-bounded CNF is a size/width-bounded DNF.
-
FABL.booleanFunctionOfBinary[complete] -
FABL.binaryOfBooleanFunction[complete] -
FABL.F₂DecisionTree.Path.toDNFTerm[complete] -
FABL.F₂DecisionTree.Path.width_toDNFTerm[complete] -
FABL.F₂DecisionTree.Path.eval_toDNFTerm_eq_neg_one_iff[complete] -
FABL.F₂DecisionTree.Path.toCNFClause[complete] -
FABL.F₂DecisionTree.Path.width_toCNFClause[complete] -
FABL.F₂DecisionTree.Path.clauseEval_toCNFClause_eq_one_iff[complete] -
FABL.F₂DecisionTree.toDNFFormula[complete] -
FABL.F₂DecisionTree.size_toDNFFormula_le[complete] -
FABL.F₂DecisionTree.width_toDNFFormula_le[complete] -
FABL.F₂DecisionTree.toDNFFormula_toBooleanFunction[complete] -
FABL.F₂DecisionTree.hasDNFSizeWidth_of_decisionTree[complete] -
FABL.F₂DecisionTree.hasDNFSizeWidth_of_computes[complete] -
FABL.F₂DecisionTree.toCNFFormula[complete] -
FABL.F₂DecisionTree.size_toCNFFormula_le[complete] -
FABL.F₂DecisionTree.width_toCNFFormula_le[complete] -
FABL.F₂DecisionTree.eval_toCNFFormula_eq_one[complete] -
FABL.F₂DecisionTree.toCNFFormula_toBooleanFunction[complete] -
FABL.F₂DecisionTree.hasCNFSizeWidth_of_decisionTree[complete] -
FABL.F₂DecisionTree.hasCNFSizeWidth_of_computes[complete] -
FABL.exists_DNF_of_decisionTree[complete] -
FABL.exists_CNF_of_decisionTree[complete]
Proposition 4.5. Let f:\{0,1\}^n\to\{0,1\} be computable by a decision
tree T of size s and depth k. Then f is computable by a DNF (and
also by a CNF) of size at most s and width at most k.
Take one DNF term for each True leaf path and one clause excluding each False
leaf path. Under the standard
\mathbb F_2\leftrightarrow\{\pm1\} correspondence, these formulas compute
f and have the asserted size and width.
Lean code for Proposition4.1.7●23 declarations
Associated Lean declarations
-
FABL.booleanFunctionOfBinary[complete]
-
FABL.binaryOfBooleanFunction[complete]
-
FABL.F₂DecisionTree.Path.toDNFTerm[complete]
-
FABL.F₂DecisionTree.Path.width_toDNFTerm[complete]
-
FABL.F₂DecisionTree.Path.eval_toDNFTerm_eq_neg_one_iff[complete]
-
FABL.F₂DecisionTree.Path.toCNFClause[complete]
-
FABL.F₂DecisionTree.Path.width_toCNFClause[complete]
-
FABL.F₂DecisionTree.Path.clauseEval_toCNFClause_eq_one_iff[complete]
-
FABL.F₂DecisionTree.toDNFFormula[complete]
-
FABL.F₂DecisionTree.size_toDNFFormula_le[complete]
-
FABL.F₂DecisionTree.width_toDNFFormula_le[complete]
-
FABL.F₂DecisionTree.toDNFFormula_toBooleanFunction[complete]
-
FABL.F₂DecisionTree.hasDNFSizeWidth_of_decisionTree[complete]
-
FABL.F₂DecisionTree.hasDNFSizeWidth_of_computes[complete]
-
FABL.F₂DecisionTree.toCNFFormula[complete]
-
FABL.F₂DecisionTree.size_toCNFFormula_le[complete]
-
FABL.F₂DecisionTree.width_toCNFFormula_le[complete]
-
FABL.F₂DecisionTree.eval_toCNFFormula_eq_one[complete]
-
FABL.F₂DecisionTree.toCNFFormula_toBooleanFunction[complete]
-
FABL.F₂DecisionTree.hasCNFSizeWidth_of_decisionTree[complete]
-
FABL.F₂DecisionTree.hasCNFSizeWidth_of_computes[complete]
-
FABL.exists_DNF_of_decisionTree[complete]
-
FABL.exists_CNF_of_decisionTree[complete]
-
FABL.booleanFunctionOfBinary[complete] -
FABL.binaryOfBooleanFunction[complete] -
FABL.F₂DecisionTree.Path.toDNFTerm[complete] -
FABL.F₂DecisionTree.Path.width_toDNFTerm[complete] -
FABL.F₂DecisionTree.Path.eval_toDNFTerm_eq_neg_one_iff[complete] -
FABL.F₂DecisionTree.Path.toCNFClause[complete] -
FABL.F₂DecisionTree.Path.width_toCNFClause[complete] -
FABL.F₂DecisionTree.Path.clauseEval_toCNFClause_eq_one_iff[complete] -
FABL.F₂DecisionTree.toDNFFormula[complete] -
FABL.F₂DecisionTree.size_toDNFFormula_le[complete] -
FABL.F₂DecisionTree.width_toDNFFormula_le[complete] -
FABL.F₂DecisionTree.toDNFFormula_toBooleanFunction[complete] -
FABL.F₂DecisionTree.hasDNFSizeWidth_of_decisionTree[complete] -
FABL.F₂DecisionTree.hasDNFSizeWidth_of_computes[complete] -
FABL.F₂DecisionTree.toCNFFormula[complete] -
FABL.F₂DecisionTree.size_toCNFFormula_le[complete] -
FABL.F₂DecisionTree.width_toCNFFormula_le[complete] -
FABL.F₂DecisionTree.eval_toCNFFormula_eq_one[complete] -
FABL.F₂DecisionTree.toCNFFormula_toBooleanFunction[complete] -
FABL.F₂DecisionTree.hasCNFSizeWidth_of_decisionTree[complete] -
FABL.F₂DecisionTree.hasCNFSizeWidth_of_computes[complete] -
FABL.exists_DNF_of_decisionTree[complete] -
FABL.exists_CNF_of_decisionTree[complete]
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.booleanFunctionOfBinary {n : ℕ} (f : FABL.F₂Cube n → FABL.Sign) : FABL.BooleanFunction n
def FABL.booleanFunctionOfBinary {n : ℕ} (f : FABL.F₂Cube n → FABL.Sign) : FABL.BooleanFunction n
Pull a binary-cube Boolean function back to the sign cube via the standard equivalence.
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.binaryOfBooleanFunction {n : ℕ} (f : FABL.BooleanFunction n) : FABL.F₂Cube n → FABL.Sign
def FABL.binaryOfBooleanFunction {n : ℕ} (f : FABL.BooleanFunction n) : FABL.F₂Cube n → FABL.Sign
Push a sign-cube Boolean function forward to the binary cube.
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.F₂DecisionTree.Path.toDNFTerm {n : ℕ} (path : FABL.F₂DecisionTree.Path n FABL.Sign) : FABL.DNFTerm n
def FABL.F₂DecisionTree.Path.toDNFTerm {n : ℕ} (path : FABL.F₂DecisionTree.Path n FABL.Sign) : FABL.DNFTerm n
DNF term associated to a path (used for True leaves).
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.F₂DecisionTree.Path.width_toDNFTerm {n : ℕ} (path : FABL.F₂DecisionTree.Path n FABL.Sign) : path.toDNFTerm.width = path.length
theorem FABL.F₂DecisionTree.Path.width_toDNFTerm {n : ℕ} (path : FABL.F₂DecisionTree.Path n FABL.Sign) : path.toDNFTerm.width = path.length
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.F₂DecisionTree.Path.eval_toDNFTerm_eq_neg_one_iff {n : ℕ} (path : FABL.F₂DecisionTree.Path n FABL.Sign) (x : FABL.SignCube n) : path.toDNFTerm.eval x = -1 ↔ path.Matches ((FABL.binaryCubeSignEquiv n).symm x)
theorem FABL.F₂DecisionTree.Path.eval_toDNFTerm_eq_neg_one_iff {n : ℕ} (path : FABL.F₂DecisionTree.Path n FABL.Sign) (x : FABL.SignCube n) : path.toDNFTerm.eval x = -1 ↔ path.Matches ((FABL.binaryCubeSignEquiv n).symm x)
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.F₂DecisionTree.Path.toCNFClause {n : ℕ} (path : FABL.F₂DecisionTree.Path n FABL.Sign) : FABL.DNFTerm n
def FABL.F₂DecisionTree.Path.toCNFClause {n : ℕ} (path : FABL.F₂DecisionTree.Path n FABL.Sign) : FABL.DNFTerm n
CNF clause excluding a path assignment (used for False leaves).
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.F₂DecisionTree.Path.width_toCNFClause {n : ℕ} (path : FABL.F₂DecisionTree.Path n FABL.Sign) : path.toCNFClause.width = path.length
theorem FABL.F₂DecisionTree.Path.width_toCNFClause {n : ℕ} (path : FABL.F₂DecisionTree.Path n FABL.Sign) : path.toCNFClause.width = path.length
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.F₂DecisionTree.Path.clauseEval_toCNFClause_eq_one_iff {n : ℕ} (path : FABL.F₂DecisionTree.Path n FABL.Sign) (x : FABL.SignCube n) : FABL.CNFFormula.clauseEval path.toCNFClause x = 1 ↔ path.Matches ((FABL.binaryCubeSignEquiv n).symm x)
theorem FABL.F₂DecisionTree.Path.clauseEval_toCNFClause_eq_one_iff {n : ℕ} (path : FABL.F₂DecisionTree.Path n FABL.Sign) (x : FABL.SignCube n) : FABL.CNFFormula.clauseEval path.toCNFClause x = 1 ↔ path.Matches ((FABL.binaryCubeSignEquiv n).symm x)
The path-excluding clause is false exactly on the corresponding path subcube.
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.F₂DecisionTree.toDNFFormula {n : ℕ} {available : Finset (Fin n)} (T : FABL.F₂DecisionTree n FABL.Sign available) : FABL.DNFFormula n
def FABL.F₂DecisionTree.toDNFFormula {n : ℕ} {available : Finset (Fin n)} (T : FABL.F₂DecisionTree n FABL.Sign available) : FABL.DNFFormula n
DNF obtained by taking one term per True leaf path.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.F₂DecisionTree.size_toDNFFormula_le {n : ℕ} {available : Finset (Fin n)} (T : FABL.F₂DecisionTree n FABL.Sign available) : T.toDNFFormula.size ≤ T.leafCount
theorem FABL.F₂DecisionTree.size_toDNFFormula_le {n : ℕ} {available : Finset (Fin n)} (T : FABL.F₂DecisionTree n FABL.Sign available) : T.toDNFFormula.size ≤ T.leafCount
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.F₂DecisionTree.width_toDNFFormula_le {n : ℕ} {available : Finset (Fin n)} (T : FABL.F₂DecisionTree n FABL.Sign available) : T.toDNFFormula.width ≤ T.depth
theorem FABL.F₂DecisionTree.width_toDNFFormula_le {n : ℕ} {available : Finset (Fin n)} (T : FABL.F₂DecisionTree n FABL.Sign available) : T.toDNFFormula.width ≤ T.depth
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.F₂DecisionTree.toDNFFormula_toBooleanFunction {n : ℕ} {available : Finset (Fin n)} (T : FABL.F₂DecisionTree n FABL.Sign available) : T.toDNFFormula.toBooleanFunction = FABL.booleanFunctionOfBinary T.eval
theorem FABL.F₂DecisionTree.toDNFFormula_toBooleanFunction {n : ℕ} {available : Finset (Fin n)} (T : FABL.F₂DecisionTree n FABL.Sign available) : T.toDNFFormula.toBooleanFunction = FABL.booleanFunctionOfBinary T.eval
Evaluation of the DNF agrees with the tree on the sign cube.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.F₂DecisionTree.hasDNFSizeWidth_of_decisionTree {n : ℕ} {available : Finset (Fin n)} (T : FABL.F₂DecisionTree n FABL.Sign available) : FABL.HasDNFSizeLE (FABL.booleanFunctionOfBinary T.eval) T.leafCount ∧ FABL.HasDNFWidthLE (FABL.booleanFunctionOfBinary T.eval) T.depth
theorem FABL.F₂DecisionTree.hasDNFSizeWidth_of_decisionTree {n : ℕ} {available : Finset (Fin n)} (T : FABL.F₂DecisionTree n FABL.Sign available) : FABL.HasDNFSizeLE (FABL.booleanFunctionOfBinary T.eval) T.leafCount ∧ FABL.HasDNFWidthLE (FABL.booleanFunctionOfBinary T.eval) T.depth
O'Donnell, Proposition 4.5 (DNF form): a decision tree of size `s` and depth `k` yields a DNF of size at most `s` and width at most `k`.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.F₂DecisionTree.hasDNFSizeWidth_of_computes {n : ℕ} (T : FABL.DecisionTree n FABL.Sign) (f : FABL.BooleanFunction n) (hT : FABL.F₂DecisionTree.Computes T (FABL.binaryOfBooleanFunction f)) : FABL.HasDNFSizeLE f (FABL.F₂DecisionTree.leafCount T) ∧ FABL.HasDNFWidthLE f (FABL.F₂DecisionTree.depth T)
theorem FABL.F₂DecisionTree.hasDNFSizeWidth_of_computes {n : ℕ} (T : FABL.DecisionTree n FABL.Sign) (f : FABL.BooleanFunction n) (hT : FABL.F₂DecisionTree.Computes T (FABL.binaryOfBooleanFunction f)) : FABL.HasDNFSizeLE f (FABL.F₂DecisionTree.leafCount T) ∧ FABL.HasDNFWidthLE f (FABL.F₂DecisionTree.depth T)
O'Donnell, Proposition 4.5 for a complete available-coordinate tree computing a Boolean function on the sign cube.
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.F₂DecisionTree.toCNFFormula {n : ℕ} {available : Finset (Fin n)} (T : FABL.F₂DecisionTree n FABL.Sign available) : FABL.CNFFormula n
def FABL.F₂DecisionTree.toCNFFormula {n : ℕ} {available : Finset (Fin n)} (T : FABL.F₂DecisionTree n FABL.Sign available) : FABL.CNFFormula n
CNF obtained by taking one clause per False leaf path (dual construction).
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.F₂DecisionTree.size_toCNFFormula_le {n : ℕ} {available : Finset (Fin n)} (T : FABL.F₂DecisionTree n FABL.Sign available) : T.toCNFFormula.size ≤ T.leafCount
theorem FABL.F₂DecisionTree.size_toCNFFormula_le {n : ℕ} {available : Finset (Fin n)} (T : FABL.F₂DecisionTree n FABL.Sign available) : T.toCNFFormula.size ≤ T.leafCount
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.F₂DecisionTree.width_toCNFFormula_le {n : ℕ} {available : Finset (Fin n)} (T : FABL.F₂DecisionTree n FABL.Sign available) : T.toCNFFormula.width ≤ T.depth
theorem FABL.F₂DecisionTree.width_toCNFFormula_le {n : ℕ} {available : Finset (Fin n)} (T : FABL.F₂DecisionTree n FABL.Sign available) : T.toCNFFormula.width ≤ T.depth
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.F₂DecisionTree.eval_toCNFFormula_eq_one {n : ℕ} {available : Finset (Fin n)} (T : FABL.F₂DecisionTree n FABL.Sign available) (x : FABL.SignCube n) : T.toCNFFormula.eval x = 1 ↔ ∃ path ∈ T.paths, path.output = 1 ∧ path.Matches ((FABL.binaryCubeSignEquiv n).symm x)
theorem FABL.F₂DecisionTree.eval_toCNFFormula_eq_one {n : ℕ} {available : Finset (Fin n)} (T : FABL.F₂DecisionTree n FABL.Sign available) (x : FABL.SignCube n) : T.toCNFFormula.eval x = 1 ↔ ∃ path ∈ T.paths, path.output = 1 ∧ path.Matches ((FABL.binaryCubeSignEquiv n).symm x)
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.F₂DecisionTree.toCNFFormula_toBooleanFunction {n : ℕ} {available : Finset (Fin n)} (T : FABL.F₂DecisionTree n FABL.Sign available) : T.toCNFFormula.toBooleanFunction = FABL.booleanFunctionOfBinary T.eval
theorem FABL.F₂DecisionTree.toCNFFormula_toBooleanFunction {n : ℕ} {available : Finset (Fin n)} (T : FABL.F₂DecisionTree n FABL.Sign available) : T.toCNFFormula.toBooleanFunction = FABL.booleanFunctionOfBinary T.eval
Evaluation of the CNF agrees with the tree on the sign cube.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.F₂DecisionTree.hasCNFSizeWidth_of_decisionTree {n : ℕ} {available : Finset (Fin n)} (T : FABL.F₂DecisionTree n FABL.Sign available) : FABL.HasCNFSizeLE (FABL.booleanFunctionOfBinary T.eval) T.leafCount ∧ FABL.HasCNFWidthLE (FABL.booleanFunctionOfBinary T.eval) T.depth
theorem FABL.F₂DecisionTree.hasCNFSizeWidth_of_decisionTree {n : ℕ} {available : Finset (Fin n)} (T : FABL.F₂DecisionTree n FABL.Sign available) : FABL.HasCNFSizeLE (FABL.booleanFunctionOfBinary T.eval) T.leafCount ∧ FABL.HasCNFWidthLE (FABL.booleanFunctionOfBinary T.eval) T.depth
O'Donnell, Proposition 4.5 (CNF form): a decision tree of size `s` and depth `k` yields a CNF of size at most `s` and width at most `k`.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.F₂DecisionTree.hasCNFSizeWidth_of_computes {n : ℕ} (T : FABL.DecisionTree n FABL.Sign) (f : FABL.BooleanFunction n) (hT : FABL.F₂DecisionTree.Computes T (FABL.binaryOfBooleanFunction f)) : FABL.HasCNFSizeLE f (FABL.F₂DecisionTree.leafCount T) ∧ FABL.HasCNFWidthLE f (FABL.F₂DecisionTree.depth T)
theorem FABL.F₂DecisionTree.hasCNFSizeWidth_of_computes {n : ℕ} (T : FABL.DecisionTree n FABL.Sign) (f : FABL.BooleanFunction n) (hT : FABL.F₂DecisionTree.Computes T (FABL.binaryOfBooleanFunction f)) : FABL.HasCNFSizeLE f (FABL.F₂DecisionTree.leafCount T) ∧ FABL.HasCNFWidthLE f (FABL.F₂DecisionTree.depth T)
Proposition 4.5 (CNF form) for a complete available-coordinate tree computing a sign-cube Boolean function.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.exists_DNF_of_decisionTree {n : ℕ} (f : FABL.BooleanFunction n) (s k : ℕ) (T : FABL.DecisionTree n FABL.Sign) (hT : FABL.F₂DecisionTree.Computes T (FABL.binaryOfBooleanFunction f)) (hs : FABL.F₂DecisionTree.leafCount T ≤ s) (hk : FABL.F₂DecisionTree.depth T ≤ k) : FABL.HasDNFSizeLE f s ∧ FABL.HasDNFWidthLE f k
theorem FABL.exists_DNF_of_decisionTree {n : ℕ} (f : FABL.BooleanFunction n) (s k : ℕ) (T : FABL.DecisionTree n FABL.Sign) (hT : FABL.F₂DecisionTree.Computes T (FABL.binaryOfBooleanFunction f)) (hs : FABL.F₂DecisionTree.leafCount T ≤ s) (hk : FABL.F₂DecisionTree.depth T ≤ k) : FABL.HasDNFSizeLE f s ∧ FABL.HasDNFWidthLE f k
O'Donnell, Proposition 4.5 (existential form).
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.exists_CNF_of_decisionTree {n : ℕ} (f : FABL.BooleanFunction n) (s k : ℕ) (T : FABL.DecisionTree n FABL.Sign) (hT : FABL.F₂DecisionTree.Computes T (FABL.binaryOfBooleanFunction f)) (hs : FABL.F₂DecisionTree.leafCount T ≤ s) (hk : FABL.F₂DecisionTree.depth T ≤ k) : FABL.HasCNFSizeLE f s ∧ FABL.HasCNFWidthLE f k
theorem FABL.exists_CNF_of_decisionTree {n : ℕ} (f : FABL.BooleanFunction n) (s k : ℕ) (T : FABL.DecisionTree n FABL.Sign) (hT : FABL.F₂DecisionTree.Computes T (FABL.binaryOfBooleanFunction f)) (hs : FABL.F₂DecisionTree.leafCount T ≤ s) (hk : FABL.F₂DecisionTree.depth T ≤ k) : FABL.HasCNFSizeLE f s ∧ FABL.HasCNFWidthLE f k
O'Donnell, Proposition 4.5 (CNF existential form).
-
FABL.sort3DecisionTreeDNFPrefix[complete] -
FABL.sort3DecisionTreeDNFPrinted[complete] -
FABL.size_sort3DecisionTreeDNFPrinted[complete] -
FABL.width_sort3DecisionTreeDNFPrinted[complete] -
FABL.sort3DecisionTreeDNFPrinted_counterexample[complete] -
FABL.sort3DecisionTreeDNF[complete] -
FABL.size_sort3DecisionTreeDNF[complete] -
FABL.width_sort3DecisionTreeDNF[complete] -
FABL.sort3DecisionTreeDNF_toBooleanFunction[complete]
Example 4.6. Converting the decision tree for \operatorname{Sort}_3 from
Figure 3.1 by the construction of Proposition 4.5 is printed as
(\overline{x_1}\wedge\overline{x_3}\wedge\overline{x_2})
\vee(\overline{x_1}\wedge x_3)
\vee(x_1\wedge\overline{x_2}\wedge\overline{x_3})
\vee(x_2\wedge x_3).
It has size 4 (at most the tree size 6) and width 3 (at most the tree
depth 3). In the May 2021 edition the printed formula is not equivalent to
\operatorname{Sort}_3: on the sorted input 110 it is False. Replacing
the last term by x_1\wedge x_2 gives a formula that computes
\operatorname{Sort}_3 with the same size and width.
Lean code for Lemma4.1.8●9 declarations
Associated Lean declarations
-
FABL.sort3DecisionTreeDNFPrefix[complete]
-
FABL.sort3DecisionTreeDNFPrinted[complete]
-
FABL.size_sort3DecisionTreeDNFPrinted[complete]
-
FABL.width_sort3DecisionTreeDNFPrinted[complete]
-
FABL.sort3DecisionTreeDNFPrinted_counterexample[complete]
-
FABL.sort3DecisionTreeDNF[complete]
-
FABL.size_sort3DecisionTreeDNF[complete]
-
FABL.width_sort3DecisionTreeDNF[complete]
-
FABL.sort3DecisionTreeDNF_toBooleanFunction[complete]
-
FABL.sort3DecisionTreeDNFPrefix[complete] -
FABL.sort3DecisionTreeDNFPrinted[complete] -
FABL.size_sort3DecisionTreeDNFPrinted[complete] -
FABL.width_sort3DecisionTreeDNFPrinted[complete] -
FABL.sort3DecisionTreeDNFPrinted_counterexample[complete] -
FABL.sort3DecisionTreeDNF[complete] -
FABL.size_sort3DecisionTreeDNF[complete] -
FABL.width_sort3DecisionTreeDNF[complete] -
FABL.sort3DecisionTreeDNF_toBooleanFunction[complete]
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.sort3DecisionTreeDNFPrefix : List (FABL.DNFTerm 3)
def FABL.sort3DecisionTreeDNFPrefix : List (FABL.DNFTerm 3)
The three width-at-most-three paths shared by the printed and corrected Example 4.6 DNFs.
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.sort3DecisionTreeDNFPrinted : FABL.DNFFormula 3
def FABL.sort3DecisionTreeDNFPrinted : FABL.DNFFormula 3
The DNF printed in Example 4.6 of the May 2021 edition.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.size_sort3DecisionTreeDNFPrinted : FABL.sort3DecisionTreeDNFPrinted.size = 4
theorem FABL.size_sort3DecisionTreeDNFPrinted : FABL.sort3DecisionTreeDNFPrinted.size = 4
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.width_sort3DecisionTreeDNFPrinted : FABL.sort3DecisionTreeDNFPrinted.width = 3
theorem FABL.width_sort3DecisionTreeDNFPrinted : FABL.sort3DecisionTreeDNFPrinted.width = 3
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.sort3DecisionTreeDNFPrinted_counterexample : FABL.sort3DecisionTreeDNFPrinted.eval ![-1, -1, 1] = 1 ∧ FABL.sort3 ![-1, -1, 1] = -1
theorem FABL.sort3DecisionTreeDNFPrinted_counterexample : FABL.sort3DecisionTreeDNFPrinted.eval ![-1, -1, 1] = 1 ∧ FABL.sort3 ![-1, -1, 1] = -1
The printed Example 4.6 formula disagrees with `Sort₃` on the sorted input `110`.
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.sort3DecisionTreeDNF : FABL.DNFFormula 3
def FABL.sort3DecisionTreeDNF : FABL.DNFFormula 3
Corrected Example 4.6 formula, replacing the last printed term by `x₁ ∧ x₂`.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.size_sort3DecisionTreeDNF : FABL.sort3DecisionTreeDNF.size = 4
theorem FABL.size_sort3DecisionTreeDNF : FABL.sort3DecisionTreeDNF.size = 4
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.width_sort3DecisionTreeDNF : FABL.sort3DecisionTreeDNF.width = 3
theorem FABL.width_sort3DecisionTreeDNF : FABL.sort3DecisionTreeDNF.width = 3
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.sort3DecisionTreeDNF_toBooleanFunction : FABL.sort3DecisionTreeDNF.toBooleanFunction = FABL.sort3
theorem FABL.sort3DecisionTreeDNF_toBooleanFunction : FABL.sort3DecisionTreeDNF.toBooleanFunction = FABL.sort3
Exercise 2.10 (negative-one-pivotal form used by Proposition 4.7). For
f:\{-1,1\}^n\to\{-1,1\},
\mathbf I[f]
=2\,\mathbb E_{\boldsymbol x\sim\{-1,1\}^n}
\bigl[\#\{i : i\text{ is }(-1)\text{-pivotal for }f\text{ on }\boldsymbol x\}\bigr],
where coordinate i is (-1)-pivotal on x if f(x)=-1 (True) and
f(x^{\oplus i})=1 (False). Equivalently,
\operatorname{Inf}_i[f]=2\Pr[i\text{ is }(-1)\text{-pivotal}].
Lean code for Lemma4.1.9●3 declarations
Associated Lean declarations
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.IsNegOnePivotal {n : ℕ} (f : FABL.BooleanFunction n) (i : Fin n) (x : FABL.SignCube n) : Prop
def FABL.IsNegOnePivotal {n : ℕ} (f : FABL.BooleanFunction n) (i : Fin n) (x : FABL.SignCube n) : Prop
`(-1)`-pivotal coordinates (book Exercise 2.10 form).
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.booleanInfluence_eq_two_mul_negOnePivotal_probability {n : ℕ} (f : FABL.BooleanFunction n) (i : Fin n) : FABL.booleanInfluence f i = 2 * FABL.uniformProbability (FABL.IsNegOnePivotal f i)
theorem FABL.booleanInfluence_eq_two_mul_negOnePivotal_probability {n : ℕ} (f : FABL.BooleanFunction n) (i : Fin n) : FABL.booleanInfluence f i = 2 * FABL.uniformProbability (FABL.IsNegOnePivotal f i)
For a fixed coordinate, `Inf_i[f] = 2 Pr[(-1)-pivotal]`.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.totalInfluence_eq_two_mul_expect_card_negOnePivotal {n : ℕ} (f : FABL.BooleanFunction n) : FABL.totalInfluence f.toReal = 2 * Finset.univ.expect fun x => ↑{i | FABL.IsNegOnePivotal f i x}.card
theorem FABL.totalInfluence_eq_two_mul_expect_card_negOnePivotal {n : ℕ} (f : FABL.BooleanFunction n) : FABL.totalInfluence f.toReal = 2 * Finset.univ.expect fun x => ↑{i | FABL.IsNegOnePivotal f i x}.card
Total influence is twice the expected number of `(-1)`-pivotal coordinates.
-
FABL.card_negOnePivotal_le_width[complete] -
FABL.totalInfluence_le_two_mul_of_hasDNFWidthLE[complete] -
FABL.sq_discreteDerivative_booleanDual[complete] -
FABL.totalInfluence_booleanDual[complete] -
FABL.totalInfluence_le_two_mul_of_hasCNFWidthLE[complete]
Proposition 4.7. Suppose f:\{-1,1\}^n\to\{-1,1\} has
\operatorname{DNFwidth}(f)\le w. Then \mathbf I[f]\le 2w.
(The same bound holds for CNFs of width at most w, since
\mathbf I[f^\dagger]=\mathbf I[f].)
Lean code for Proposition4.1.10●5 theorems
Associated Lean declarations
-
FABL.card_negOnePivotal_le_width[complete]
-
FABL.totalInfluence_le_two_mul_of_hasDNFWidthLE[complete]
-
FABL.sq_discreteDerivative_booleanDual[complete]
-
FABL.totalInfluence_booleanDual[complete]
-
FABL.totalInfluence_le_two_mul_of_hasCNFWidthLE[complete]
-
FABL.card_negOnePivotal_le_width[complete] -
FABL.totalInfluence_le_two_mul_of_hasDNFWidthLE[complete] -
FABL.sq_discreteDerivative_booleanDual[complete] -
FABL.totalInfluence_booleanDual[complete] -
FABL.totalInfluence_le_two_mul_of_hasCNFWidthLE[complete]
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.card_negOnePivotal_le_width {n : ℕ} (φ : FABL.DNFFormula n) (x : FABL.SignCube n) : {i | FABL.IsNegOnePivotal φ.toBooleanFunction i x}.card ≤ φ.width
theorem FABL.card_negOnePivotal_le_width {n : ℕ} (φ : FABL.DNFFormula n) (x : FABL.SignCube n) : {i | FABL.IsNegOnePivotal φ.toBooleanFunction i x}.card ≤ φ.width
On any input, a width-`w` DNF has at most `w` many `(-1)`-pivotal coordinates.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.totalInfluence_le_two_mul_of_hasDNFWidthLE {n : ℕ} {f : FABL.BooleanFunction n} {w : ℕ} (hf : FABL.HasDNFWidthLE f w) : FABL.totalInfluence f.toReal ≤ 2 * ↑w
theorem FABL.totalInfluence_le_two_mul_of_hasDNFWidthLE {n : ℕ} {f : FABL.BooleanFunction n} {w : ℕ} (hf : FABL.HasDNFWidthLE f w) : FABL.totalInfluence f.toReal ≤ 2 * ↑w
O'Donnell, Proposition 4.7.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.sq_discreteDerivative_booleanDual {n : ℕ} (f : FABL.BooleanFunction n) (i : Fin n) (x : FABL.SignCube n) : (FABL.discreteDerivative i) (FABL.CNFFormula.booleanDual f).toReal x ^ 2 = (FABL.discreteDerivative i) f.toReal ((FABL.signCubeNegEquiv n) x) ^ 2
theorem FABL.sq_discreteDerivative_booleanDual {n : ℕ} (f : FABL.BooleanFunction n) (i : Fin n) (x : FABL.SignCube n) : (FABL.discreteDerivative i) (FABL.CNFFormula.booleanDual f).toReal x ^ 2 = (FABL.discreteDerivative i) f.toReal ((FABL.signCubeNegEquiv n) x) ^ 2
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.totalInfluence_booleanDual {n : ℕ} (f : FABL.BooleanFunction n) : FABL.totalInfluence (FABL.CNFFormula.booleanDual f).toReal = FABL.totalInfluence f.toReal
theorem FABL.totalInfluence_booleanDual {n : ℕ} (f : FABL.BooleanFunction n) : FABL.totalInfluence (FABL.CNFFormula.booleanDual f).toReal = FABL.totalInfluence f.toReal
Boolean duality preserves total influence.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.totalInfluence_le_two_mul_of_hasCNFWidthLE {n : ℕ} {f : FABL.BooleanFunction n} {w : ℕ} (hf : FABL.HasCNFWidthLE f w) : FABL.totalInfluence f.toReal ≤ 2 * ↑w
theorem FABL.totalInfluence_le_two_mul_of_hasCNFWidthLE {n : ℕ} {f : FABL.BooleanFunction n} {w : ℕ} (hf : FABL.HasCNFWidthLE f w) : FABL.totalInfluence f.toReal ≤ 2 * ↑w
O'Donnell, Proposition 4.7 (CNF form).
Corollary 4.8. Let f:\{-1,1\}^n\to\{-1,1\} have
\operatorname{DNFwidth}(f)\le w. Then for every \epsilon>0, the Fourier
spectrum of f is \epsilon-concentrated on degree up to 2w/\epsilon.
Lean code for Corollary4.1.11●1 theorem
Associated Lean declarations
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.isFourierSpectrumConcentratedUpTo_of_hasDNFWidthLE {n : ℕ} {f : FABL.BooleanFunction n} {w : ℕ} (hf : FABL.HasDNFWidthLE f w) {ε : ℝ} (hε : 0 < ε) : FABL.IsFourierSpectrumConcentratedUpTo f.toReal ε (2 * ↑w / ε)
theorem FABL.isFourierSpectrumConcentratedUpTo_of_hasDNFWidthLE {n : ℕ} {f : FABL.BooleanFunction n} {w : ℕ} (hf : FABL.HasDNFWidthLE f w) {ε : ℝ} (hε : 0 < ε) : FABL.IsFourierSpectrumConcentratedUpTo f.toReal ε (2 * ↑w / ε)
O'Donnell, Corollary 4.8.
-
FABL.DNFFormula.truncateWidth[complete] -
FABL.DNFFormula.width_truncateWidth_le[complete] -
FABL.dnfWidthTruncationCutoff[complete] -
FABL.relativeHammingDist_truncateWidth_le[complete] -
FABL.exists_DNF_width_truncation_close[complete] -
FABL.CNFFormula.booleanDual_involutive[complete] -
FABL.CNFFormula.relativeHammingDist_booleanDual[complete] -
FABL.CNFFormula.truncateWidth[complete] -
FABL.CNFFormula.width_truncateWidth_le[complete] -
FABL.CNFFormula.relativeHammingDist_truncateWidth_le_of_size_le[complete] -
FABL.exists_CNF_width_truncation_close[complete]
Proposition 4.9. Let f:\{-1,1\}^n\to\{-1,1\} be computable by a DNF (or
CNF) of size s and let \epsilon\in(0,1]. Then f is \epsilon-close
(in relative Hamming distance) to a function g computable by a DNF of
width \log(s/\epsilon).
The May 2021 text prints “DNF” in the conclusion even for the parenthetical CNF input, then says
that the analogous proof works for CNFs. Thus a DNF input gives a DNF output
and a CNF input gives a CNF output, both with the natural cutoff
\lceil\log_2(s/\epsilon)\rceil.
Lean code for Proposition4.1.12●11 declarations
Associated Lean declarations
-
FABL.DNFFormula.truncateWidth[complete]
-
FABL.DNFFormula.width_truncateWidth_le[complete]
-
FABL.dnfWidthTruncationCutoff[complete]
-
FABL.relativeHammingDist_truncateWidth_le[complete]
-
FABL.exists_DNF_width_truncation_close[complete]
-
FABL.CNFFormula.booleanDual_involutive[complete]
-
FABL.CNFFormula.relativeHammingDist_booleanDual[complete]
-
FABL.CNFFormula.truncateWidth[complete]
-
FABL.CNFFormula.width_truncateWidth_le[complete]
-
FABL.CNFFormula.relativeHammingDist_truncateWidth_le_of_size_le[complete]
-
FABL.exists_CNF_width_truncation_close[complete]
-
FABL.DNFFormula.truncateWidth[complete] -
FABL.DNFFormula.width_truncateWidth_le[complete] -
FABL.dnfWidthTruncationCutoff[complete] -
FABL.relativeHammingDist_truncateWidth_le[complete] -
FABL.exists_DNF_width_truncation_close[complete] -
FABL.CNFFormula.booleanDual_involutive[complete] -
FABL.CNFFormula.relativeHammingDist_booleanDual[complete] -
FABL.CNFFormula.truncateWidth[complete] -
FABL.CNFFormula.width_truncateWidth_le[complete] -
FABL.CNFFormula.relativeHammingDist_truncateWidth_le_of_size_le[complete] -
FABL.exists_CNF_width_truncation_close[complete]
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.DNFFormula.truncateWidth {n : ℕ} (φ : FABL.DNFFormula n) (w : ℕ) : FABL.DNFFormula n
def FABL.DNFFormula.truncateWidth {n : ℕ} (φ : FABL.DNFFormula n) (w : ℕ) : FABL.DNFFormula n
Delete all terms of width greater than `w`.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.DNFFormula.width_truncateWidth_le {n : ℕ} (φ : FABL.DNFFormula n) (w : ℕ) : (φ.truncateWidth w).width ≤ w
theorem FABL.DNFFormula.width_truncateWidth_le {n : ℕ} (φ : FABL.DNFFormula n) (w : ℕ) : (φ.truncateWidth w).width ≤ w
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.dnfWidthTruncationCutoff (s : ℕ) (ε : ℝ) : ℕ
def FABL.dnfWidthTruncationCutoff (s : ℕ) (ε : ℝ) : ℕ
Book cutoff `⌈log₂(s / ε)⌉` for DNF width truncation.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.relativeHammingDist_truncateWidth_le {n : ℕ} (φ : FABL.DNFFormula n) {ε : ℝ} (hε : 0 < ε) : FABL.relativeHammingDist φ.toBooleanFunction (φ.truncateWidth (FABL.dnfWidthTruncationCutoff φ.size ε)).toBooleanFunction ≤ ε
theorem FABL.relativeHammingDist_truncateWidth_le {n : ℕ} (φ : FABL.DNFFormula n) {ε : ℝ} (hε : 0 < ε) : FABL.relativeHammingDist φ.toBooleanFunction (φ.truncateWidth (FABL.dnfWidthTruncationCutoff φ.size ε)).toBooleanFunction ≤ ε
O'Donnell, Proposition 4.9 (quantitative form on a formula's own size).
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.exists_DNF_width_truncation_close {n : ℕ} {f : FABL.BooleanFunction n} {s : ℕ} (hf : FABL.HasDNFSizeLE f s) {ε : ℝ} (hε : 0 < ε) : ∃ g, FABL.HasDNFWidthLE g (FABL.dnfWidthTruncationCutoff s ε) ∧ FABL.relativeHammingDist f g ≤ ε
theorem FABL.exists_DNF_width_truncation_close {n : ℕ} {f : FABL.BooleanFunction n} {s : ℕ} (hf : FABL.HasDNFSizeLE f s) {ε : ℝ} (hε : 0 < ε) : ∃ g, FABL.HasDNFWidthLE g (FABL.dnfWidthTruncationCutoff s ε) ∧ FABL.relativeHammingDist f g ≤ ε
O'Donnell, Proposition 4.9 (existential form).
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.CNFFormula.booleanDual_involutive {n : ℕ} (f : FABL.BooleanFunction n) : FABL.CNFFormula.booleanDual (FABL.CNFFormula.booleanDual f) = f
theorem FABL.CNFFormula.booleanDual_involutive {n : ℕ} (f : FABL.BooleanFunction n) : FABL.CNFFormula.booleanDual (FABL.CNFFormula.booleanDual f) = f
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.CNFFormula.relativeHammingDist_booleanDual {n : ℕ} (f g : FABL.BooleanFunction n) : FABL.relativeHammingDist (FABL.CNFFormula.booleanDual f) (FABL.CNFFormula.booleanDual g) = FABL.relativeHammingDist f g
theorem FABL.CNFFormula.relativeHammingDist_booleanDual {n : ℕ} (f g : FABL.BooleanFunction n) : FABL.relativeHammingDist (FABL.CNFFormula.booleanDual f) (FABL.CNFFormula.booleanDual g) = FABL.relativeHammingDist f g
Boolean duality preserves uniform Hamming distance.
-
defdefined in FABL/Chapter04/DNFFormulas.leancomplete
def FABL.CNFFormula.truncateWidth {n : ℕ} (ψ : FABL.CNFFormula n) (w : ℕ) : FABL.CNFFormula n
def FABL.CNFFormula.truncateWidth {n : ℕ} (ψ : FABL.CNFFormula n) (w : ℕ) : FABL.CNFFormula n
Delete all CNF clauses of width greater than `w`.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.CNFFormula.width_truncateWidth_le {n : ℕ} (ψ : FABL.CNFFormula n) (w : ℕ) : (ψ.truncateWidth w).width ≤ w
theorem FABL.CNFFormula.width_truncateWidth_le {n : ℕ} (ψ : FABL.CNFFormula n) (w : ℕ) : (ψ.truncateWidth w).width ≤ w
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.CNFFormula.relativeHammingDist_truncateWidth_le_of_size_le {n : ℕ} (ψ : FABL.CNFFormula n) {s : ℕ} (hsψ : ψ.size ≤ s) {ε : ℝ} (hε : 0 < ε) : FABL.relativeHammingDist ψ.toBooleanFunction (ψ.truncateWidth (FABL.dnfWidthTruncationCutoff s ε)).toBooleanFunction ≤ ε
theorem FABL.CNFFormula.relativeHammingDist_truncateWidth_le_of_size_le {n : ℕ} (ψ : FABL.CNFFormula n) {s : ℕ} (hsψ : ψ.size ≤ s) {ε : ℝ} (hε : 0 < ε) : FABL.relativeHammingDist ψ.toBooleanFunction (ψ.truncateWidth (FABL.dnfWidthTruncationCutoff s ε)).toBooleanFunction ≤ ε
O'Donnell, Proposition 4.9 (CNF form), quantitatively and with the output kept in CNF.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.exists_CNF_width_truncation_close {n : ℕ} {f : FABL.BooleanFunction n} {s : ℕ} (hf : FABL.HasCNFSizeLE f s) {ε : ℝ} (hε : 0 < ε) : ∃ g, FABL.HasCNFWidthLE g (FABL.dnfWidthTruncationCutoff s ε) ∧ FABL.relativeHammingDist f g ≤ ε
theorem FABL.exists_CNF_width_truncation_close {n : ℕ} {f : FABL.BooleanFunction n} {s : ℕ} (hf : FABL.HasCNFSizeLE f s) {ε : ℝ} (hε : 0 < ε) : ∃ g, FABL.HasCNFWidthLE g (FABL.dnfWidthTruncationCutoff s ε) ∧ FABL.relativeHammingDist f g ≤ ε
O'Donnell, Proposition 4.9 (CNF existential form).
Exercise 3.17 (concentration transfer). Suppose the Fourier spectrum of
f:\{-1,1\}^n\to\mathbb R is \epsilon_1-concentrated on a collection
\mathcal F, and g:\{-1,1\}^n\to\mathbb R satisfies
\lVert f-g\rVert_2^2\le\epsilon_2. Then the Fourier spectrum of g is
2(\epsilon_1+\epsilon_2)-concentrated on \mathcal F.
Lean code for Lemma4.1.13●2 theorems
Associated Lean declarations
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.fourierCoeff_sub {n : ℕ} (f g : FABL.SignCube n → ℝ) (S : Finset (Fin n)) : FABL.fourierCoeff (fun x => f x - g x) S = FABL.fourierCoeff f S - FABL.fourierCoeff g S
theorem FABL.fourierCoeff_sub {n : ℕ} (f g : FABL.SignCube n → ℝ) (S : Finset (Fin n)) : FABL.fourierCoeff (fun x => f x - g x) S = FABL.fourierCoeff f S - FABL.fourierCoeff g S
Fourier coefficients commute with pointwise subtraction.
-
theoremdefined in FABL/Chapter04/DNFFormulas.leancomplete
theorem FABL.IsFourierSpectrumConcentratedOn.transfer_of_uniformLpNorm_sub_sq_le {n : ℕ} (f g : FABL.SignCube n → ℝ) (𝓕 : Set (Finset (Fin n))) {ε₁ ε₂ : ℝ} (hf : FABL.IsFourierSpectrumConcentratedOn f ε₁ 𝓕) (hfg : (FABL.uniformLpNorm 2 fun x => f x - g x) ^ 2 ≤ ε₂) : FABL.IsFourierSpectrumConcentratedOn g (2 * (ε₁ + ε₂)) 𝓕
theorem FABL.IsFourierSpectrumConcentratedOn.transfer_of_uniformLpNorm_sub_sq_le {n : ℕ} (f g : FABL.SignCube n → ℝ) (𝓕 : Set (Finset (Fin n))) {ε₁ ε₂ : ℝ} (hf : FABL.IsFourierSpectrumConcentratedOn f ε₁ 𝓕) (hfg : (FABL.uniformLpNorm 2 fun x => f x - g x) ^ 2 ≤ ε₂) : FABL.IsFourierSpectrumConcentratedOn g (2 * (ε₁ + ε₂)) 𝓕
O'Donnell, Exercise 3.17: squared-`L²` perturbations transfer spectral concentration.
Mansour's Conjecture. Let f:\{-1,1\}^n\to\{-1,1\} be computable by a DNF
of size s>1 and let \epsilon\in(0,1/2].
Strong form. The Fourier spectrum of f is \epsilon-concentrated on a
collection \mathcal F with |\mathcal F|\le s^{O(\log(1/\epsilon))}.
Weaker form. If s\le\operatorname{poly}(n) and \epsilon>0 is any fixed
constant, then one may take |\mathcal F|\le\operatorname{poly}(n).
This conjecture remains open.