Analysis of Boolean Functions in Lean

4.1. DNF formulas🔗

Definition4.1.1
Group: Chapter 4: DNF formulas and small-depth circuits (44)
Group member previews
Preview
Lemma 4.1.2
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 0
Used by 11
Reverse dependency previews
Preview
Lemma 4.1.2
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

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.114 declarations
  • structure(2 fields)defined in FABL/Chapter04/DNFFormulas.lean
    complete
    structure FABL.Literal (n : ) : Type
    structure FABL.Literal (n : ) : Type
    A literal: coordinate `index` must equal `required`. 
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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. 
  • structure(2 fields)defined in FABL/Chapter04/DNFFormulas.lean
    complete
    structure FABL.DNFTerm (n : ) : Type
    structure FABL.DNFTerm (n : ) : Type
    A DNF term: AND of literals on pairwise-distinct variables. 
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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
  • structure(1 field)defined in FABL/Chapter04/DNFFormulas.lean
    complete
    structure FABL.DNFFormula (n : ) : Type
    structure FABL.DNFFormula (n : ) : Type
    A DNF formula: logical OR of terms. 
    terms : List (FABL.DNFTerm n)
    Terms of the DNF (OR). 
  • defdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    def FABL.DNFFormula.size {n : } (φ : FABL.DNFFormula n) : 
    def FABL.DNFFormula.size {n : }
      (φ : FABL.DNFFormula n) : 
  • defdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    def FABL.DNFFormula.toBooleanFunction {n : } (φ : FABL.DNFFormula n) :
      FABL.BooleanFunction n
    def FABL.DNFFormula.toBooleanFunction {n : }
      (φ : FABL.DNFFormula n) :
      FABL.BooleanFunction n
Lemma4.1.2
Group: Chapter 4: DNF formulas and small-depth circuits (44)
Group member previews
Preview
Definition 4.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 1used by 1L∃∀N

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.210 declarations
  • defdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    def FABL.signToBit (s : FABL.Sign) : Bool
    def FABL.signToBit (s : FABL.Sign) : Bool
  • defdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    theorem FABL.sort3ReducedDNF_toBooleanFunction :
      FABL.sort3ReducedDNF.toBooleanFunction = FABL.sort3
    theorem FABL.sort3ReducedDNF_toBooleanFunction :
      FABL.sort3ReducedDNF.toBooleanFunction =
        FABL.sort3
  • theoremdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    theorem FABL.sort3DNF_toBooleanFunction :
      FABL.sort3DNF.toBooleanFunction = FABL.sort3
    theorem FABL.sort3DNF_toBooleanFunction :
      FABL.sort3DNF.toBooleanFunction =
        FABL.sort3
  • theoremdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    theorem FABL.size_sort3ReducedDNF : FABL.sort3ReducedDNF.size = 3
    theorem FABL.size_sort3ReducedDNF :
      FABL.sort3ReducedDNF.size = 3
  • theoremdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    theorem FABL.width_sort3ReducedDNF : FABL.sort3ReducedDNF.width = 2
    theorem FABL.width_sort3ReducedDNF :
      FABL.sort3ReducedDNF.width = 2
  • theoremdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    theorem FABL.size_sort3DNF : FABL.sort3DNF.size = 4
    theorem FABL.size_sort3DNF :
      FABL.sort3DNF.size = 4
  • theoremdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    theorem FABL.width_sort3DNF : FABL.sort3DNF.width = 2
    theorem FABL.width_sort3DNF :
      FABL.sort3DNF.width = 2
Lemma4.1.3
Group: Chapter 4: DNF formulas and small-depth circuits (44)
Group member previews
Preview
Definition 4.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 1used by 1L∃∀N

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.310 declarations
  • defdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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
Definition4.1.4
Group: Chapter 4: DNF formulas and small-depth circuits (44)
Group member previews
Preview
Definition 4.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Definition 4.1.1
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 10
Reverse dependency previews
Preview
Proposition 4.1.7
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

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.46 declarations
  • defdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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)
Definition4.1.5
Group: Chapter 4: DNF formulas and small-depth circuits (44)
Group member previews
Preview
Definition 4.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 1
Used by 6
Reverse dependency previews
Preview
Lemma 4.1.6
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

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.58 definitions
  • structure(1 field)defined in FABL/Chapter04/DNFFormulas.lean
    complete
    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. 
    clauses : List (FABL.DNFTerm n)
    Clauses of the CNF (AND of ORs of the stored literals). 
  • defdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    def FABL.CNFFormula.size {n : } (ψ : FABL.CNFFormula n) : 
    def FABL.CNFFormula.size {n : }
      (ψ : FABL.CNFFormula n) : 
  • defdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    def FABL.CNFFormula.width {n : } (ψ : FABL.CNFFormula n) : 
    def FABL.CNFFormula.width {n : }
      (ψ : FABL.CNFFormula n) : 
  • defdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    def FABL.HasCNFWidthLE {n : } (f : FABL.BooleanFunction n) (w : ) : Prop
    def FABL.HasCNFWidthLE {n : }
      (f : FABL.BooleanFunction n) (w : ) :
      Prop
Lemma4.1.6
Group: Chapter 4: DNF formulas and small-depth circuits (44)
Group member previews
Preview
Definition 4.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 1used by 0L∃∀N

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.65 declarations
  • defdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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. 
Proposition4.1.7
Group: Chapter 4: DNF formulas and small-depth circuits (44)
Group member previews
Preview
Definition 4.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 5
Statement dependency previews
Preview
Definition 3.2.10
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 2
Reverse dependency previews
Preview
Lemma 4.1.8
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

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.723 declarations
  • defdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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). 
Lemma4.1.8
Group: Chapter 4: DNF formulas and small-depth circuits (44)
Group member previews
Preview
Definition 4.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Definition 3.2.10
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

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.89 declarations
  • defdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    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.lean
    complete
    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.lean
    complete
    theorem FABL.size_sort3DecisionTreeDNFPrinted :
      FABL.sort3DecisionTreeDNFPrinted.size = 4
    theorem FABL.size_sort3DecisionTreeDNFPrinted :
      FABL.sort3DecisionTreeDNFPrinted.size =
        4
  • theoremdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    theorem FABL.width_sort3DecisionTreeDNFPrinted :
      FABL.sort3DecisionTreeDNFPrinted.width = 3
    theorem FABL.width_sort3DecisionTreeDNFPrinted :
      FABL.sort3DecisionTreeDNFPrinted.width =
        3
  • theoremdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    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.lean
    complete
    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.lean
    complete
    theorem FABL.size_sort3DecisionTreeDNF : FABL.sort3DecisionTreeDNF.size = 4
    theorem FABL.size_sort3DecisionTreeDNF :
      FABL.sort3DecisionTreeDNF.size = 4
  • theoremdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    theorem FABL.width_sort3DecisionTreeDNF : FABL.sort3DecisionTreeDNF.width = 3
    theorem FABL.width_sort3DecisionTreeDNF :
      FABL.sort3DecisionTreeDNF.width = 3
  • theoremdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    theorem FABL.sort3DecisionTreeDNF_toBooleanFunction :
      FABL.sort3DecisionTreeDNF.toBooleanFunction = FABL.sort3
    theorem FABL.sort3DecisionTreeDNF_toBooleanFunction :
      FABL.sort3DecisionTreeDNF.toBooleanFunction =
        FABL.sort3
Lemma4.1.9
Group: Chapter 4: DNF formulas and small-depth circuits (44)
Group member previews
Preview
Definition 4.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 4
Statement dependency previews
Preview
Definition 2.2.1
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

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.93 declarations
  • defdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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. 
Proposition4.1.10
Group: Chapter 4: DNF formulas and small-depth circuits (44)
Group member previews
Preview
Definition 4.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Definition 4.1.4
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 2
Reverse dependency previews
Preview
Corollary 4.1.11
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

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.105 theorems
  • theoremdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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). 
Corollary4.1.11
Group: Chapter 4: DNF formulas and small-depth circuits (44)
Group member previews
Preview
Definition 4.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Definition 3.1.1
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

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.111 theorem
  • theoremdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    theorem FABL.isFourierSpectrumConcentratedUpTo_of_hasDNFWidthLE {n : }
      {f : FABL.BooleanFunction n} {w : } (hf : FABL.HasDNFWidthLE f w)
      {ε : } ( : 0 < ε) :
      FABL.IsFourierSpectrumConcentratedUpTo f.toReal ε (2 * w / ε)
    theorem FABL.isFourierSpectrumConcentratedUpTo_of_hasDNFWidthLE
      {n : } {f : FABL.BooleanFunction n}
      {w : } (hf : FABL.HasDNFWidthLE f w)
      {ε : } ( : 0 < ε) :
      FABL.IsFourierSpectrumConcentratedUpTo
        f.toReal ε (2 * w / ε)
    O'Donnell, Corollary 4.8. 
Proposition4.1.12
Group: Chapter 4: DNF formulas and small-depth circuits (44)
Group member previews
Preview
Definition 4.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 4
Statement dependency previews
Preview
Definition 1.4.5
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

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.1211 declarations
  • defdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    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.lean
    complete
    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.lean
    complete
    def FABL.dnfWidthTruncationCutoff (s : ) (ε : ) : 
    def FABL.dnfWidthTruncationCutoff (s : )
      (ε : ) : 
    Book cutoff `⌈log₂(s / ε)⌉` for DNF width truncation. 
  • theoremdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    theorem FABL.relativeHammingDist_truncateWidth_le {n : }
      (φ : FABL.DNFFormula n) {ε : } ( : 0 < ε) :
      FABL.relativeHammingDist φ.toBooleanFunction
          (φ.truncateWidth
              (FABL.dnfWidthTruncationCutoff φ.size ε)).toBooleanFunction 
        ε
    theorem FABL.relativeHammingDist_truncateWidth_le
      {n : } (φ : FABL.DNFFormula n) {ε : }
      ( : 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.lean
    complete
    theorem FABL.exists_DNF_width_truncation_close {n : }
      {f : FABL.BooleanFunction n} {s : } (hf : FABL.HasDNFSizeLE f s)
      {ε : } ( : 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)
      {ε : } ( : 0 < ε) :
       g,
        FABL.HasDNFWidthLE g
            (FABL.dnfWidthTruncationCutoff s
              ε) 
          FABL.relativeHammingDist f g  ε
    O'Donnell, Proposition 4.9 (existential form). 
  • theoremdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    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.lean
    complete
    theorem FABL.CNFFormula.relativeHammingDist_truncateWidth_le_of_size_le {n : }
      (ψ : FABL.CNFFormula n) {s : } (hsψ : ψ.size  s) {ε : }
      ( : 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) {ε : }
      ( : 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.lean
    complete
    theorem FABL.exists_CNF_width_truncation_close {n : }
      {f : FABL.BooleanFunction n} {s : } (hf : FABL.HasCNFSizeLE f s)
      {ε : } ( : 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)
      {ε : } ( : 0 < ε) :
       g,
        FABL.HasCNFWidthLE g
            (FABL.dnfWidthTruncationCutoff s
              ε) 
          FABL.relativeHammingDist f g  ε
    O'Donnell, Proposition 4.9 (CNF existential form). 
Lemma4.1.13
Group: Chapter 4: DNF formulas and small-depth circuits (44)
Group member previews
Preview
Definition 4.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Theorem 1.4.2
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 2
Reverse dependency previews
Preview
Theorem 4.4.9
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

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.132 theorems
  • theoremdefined in FABL/Chapter04/DNFFormulas.lean
    complete
    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.lean
    complete
    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. 
Theorem4.1.14
Group: Chapter 4: DNF formulas and small-depth circuits (44)
Group member previews
Preview
Definition 4.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Definition 3.4.2
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0XL∃∀N

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.