Analysis of Boolean Functions in Lean

6.6. Exercises and notes🔗

The eight exercises used directly by numbered or named results remain beside those results: Exercises 6.2 and 6.8 in Section 6.1; Exercises 6.10, 6.14, and 6.16 in Section 6.2; Exercises 6.30 and 6.31 in Section 6.4; and Exercise 6.29 in Section 6.5. The other twenty-six exercises are collected here in book order.

Lemma6.6.1
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Proposition 1.4.1
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 6.1. For the random p-biased function f in Proposition 6.1, compute \operatorname{Var}[\widehat f(S)] for every S\subseteq[n].

Lean code for Lemma6.6.11 theorem
  • theoremdefined in FABL/Chapter06/Pseudorandomness/RandomFunctions.lean
    complete
    theorem FABL.variance_pBiasedRandomFunction_fourierCoeff {n : } (p : )
      (hp : p  Set.Icc 0 1) (S : Finset (Fin n)) :
      ProbabilityTheory.variance (fun f => FABL.fourierCoeff f.toReal S)
          (FABL.pBiasedRandomFunctionPMF n p hp).toMeasure =
        p * (1 - p) / 2 ^ n
    theorem FABL.variance_pBiasedRandomFunction_fourierCoeff
      {n : } (p : ) (hp : p  Set.Icc 0 1)
      (S : Finset (Fin n)) :
      ProbabilityTheory.variance
          (fun f =>
            FABL.fourierCoeff f.toReal S)
          (FABL.pBiasedRandomFunctionPMF n p
              hp).toMeasure =
        p * (1 - p) / 2 ^ n
    Exercise 6.1: every Fourier coefficient of a `p`-biased random zero-one function has
    variance `p(1-p) / 2ⁿ`. 
Lemma6.6.2
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Definition 2.1.4
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 6.3. Every nonconstant Boolean-valued k-junta f has a coordinate i satisfying \operatorname{Inf}^{(1-\delta)}_i[f] \ge\frac{(1/2-\delta/2)^{k-1}}{k}.

Lean code for Lemma6.6.24 theorems
  • theoremdefined in FABL/Chapter06/Pseudorandomness/JuntaStableInfluence.lean
    complete
    theorem FABL.inv_two_pow_pred_le_variance_of_fourierDegree_le {n : }
      (f : FABL.BooleanFunction n) (k : ) (hk : 0 < k)
      (hdegree : FABL.fourierDegree f.toReal  k)
      (hnonconstant : ¬ c, f = fun x => c) :
      2⁻¹ ^ (k - 1)  FABL.variance f.toReal
    theorem FABL.inv_two_pow_pred_le_variance_of_fourierDegree_le
      {n : } (f : FABL.BooleanFunction n)
      (k : ) (hk : 0 < k)
      (hdegree :
        FABL.fourierDegree f.toReal  k)
      (hnonconstant : ¬ c, f = fun x => c) :
      2⁻¹ ^ (k - 1)  FABL.variance f.toReal
    A nonconstant Boolean function of Fourier degree at most `k`, for positive `k`, has
    variance at least `2⁻⁽ᵏ⁻¹⁾`. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/JuntaStableInfluence.lean
    complete
    theorem FABL.pow_pred_mul_variance_le_totalStableInfluence_of_fourierDegree_le
      {n : } (f : FABL.SignCube n  ) (k : )
      (hdegree : FABL.fourierDegree f  k) (ρ : ) ( : ρ  Set.Icc 0 1) :
      ρ ^ (k - 1) * FABL.variance f  FABL.totalStableInfluence ρ f
    theorem FABL.pow_pred_mul_variance_le_totalStableInfluence_of_fourierDegree_le
      {n : } (f : FABL.SignCube n  )
      (k : )
      (hdegree : FABL.fourierDegree f  k)
      (ρ : ) ( : ρ  Set.Icc 0 1) :
      ρ ^ (k - 1) * FABL.variance f 
        FABL.totalStableInfluence ρ f
    A degree-at-most-`k` function has total stable influence at least its variance times
    `ρ^(k-1)` for `ρ ∈ [0,1]`. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/JuntaStableInfluence.lean
    complete
    theorem FABL.totalStableInfluence_eq_sum_of_dependsOn {n : }
      (f : FABL.SignCube n  ) (J : Finset (Fin n))
      (hdepends : DependsOn f J) (ρ : ) :
      FABL.totalStableInfluence ρ f =  i  J, FABL.stableInfluence ρ f i
    theorem FABL.totalStableInfluence_eq_sum_of_dependsOn
      {n : } (f : FABL.SignCube n  )
      (J : Finset (Fin n))
      (hdepends : DependsOn f J) (ρ : ) :
      FABL.totalStableInfluence ρ f =
         i  J, FABL.stableInfluence ρ f i
    If `f` depends only on `J`, its total stable influence is the sum over `J`. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/JuntaStableInfluence.lean
    complete
    theorem FABL.exists_stableInfluence_ge_of_isKJunta_of_nonconstant {n : }
      (f : FABL.BooleanFunction n) (k : ) (hjunta : FABL.IsKJunta f k)
      (hnonconstant : ¬ c, f = fun x => c) (δ : ) ( : δ  Set.Icc 0 1) :
       i,
        (1 / 2 - δ / 2) ^ (k - 1) / k 
          FABL.stableInfluence (1 - δ) f.toReal i
    theorem FABL.exists_stableInfluence_ge_of_isKJunta_of_nonconstant
      {n : } (f : FABL.BooleanFunction n)
      (k : ) (hjunta : FABL.IsKJunta f k)
      (hnonconstant : ¬ c, f = fun x => c)
      (δ : ) ( : δ  Set.Icc 0 1) :
       i,
        (1 / 2 - δ / 2) ^ (k - 1) / k 
          FABL.stableInfluence (1 - δ)
            f.toReal i
    Exercise 6.3: every nonconstant Boolean `k`-junta has a coordinate whose
    `(1-δ)`-stable influence is at least `(1/2-δ/2)^(k-1)/k`. 
Lemma6.6.3
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 4
Statement dependency previews
Preview
Definition 1.5.5
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 6.4. If \varphi:\mathbb F_2^n\to\mathbb R_{\ge0} is an \epsilon-biased density, then for every d\in\mathbb N_{>0} its d-fold convolution \varphi^{*d} is an \epsilon^d-biased density.

Lean code for Lemma6.6.31 theorem
  • theoremdefined in FABL/Chapter06/Pseudorandomness/SmallBias.lean
    complete
    theorem FABL.ProbabilityDensity.IsBiased.convolutionPower {n : }
      {φ : FABL.ProbabilityDensity n} {ε : } ( : φ.IsBiased ε) (d : ) :
      (φ.convolutionPower d).IsBiased (ε ^ d)
    theorem FABL.ProbabilityDensity.IsBiased.convolutionPower
      {n : } {φ : FABL.ProbabilityDensity n}
      {ε : } ( : φ.IsBiased ε) (d : ) :
      (φ.convolutionPower d).IsBiased (ε ^ d)
    O'Donnell, Exercise 6.4: the `d`-fold convolution of an `ε`-biased density is
    `ε ^ d`-biased. The statement also covers `d = 0`, when the convolution identity is
    `1`-biased. 
Lemma6.6.4
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 6
Statement dependency previews
Preview
Proposition 2.2.11
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 6.5 (comparison of pseudorandomness notions).

(a) If f:\{-1,1\}^n\to\mathbb R has \epsilon-small influences, then it is \sqrt\epsilon-regular.

(b) For every positive even n there is a Boolean-valued 2^{-n/2}-regular function that does not have \epsilon-small influences for any \epsilon<1/2.

(c) For every n>0 there is a Boolean function with ((1-\delta)^{n-1},\delta)-small stable influences that is not \epsilon-regular for any \epsilon<1.

(d) For odd n=2m+1, let f(x_0,x_1,\ldots,x_n)=x_0\operatorname{Maj}_n(x_1,\ldots,x_n) and \delta\in(0,1), \operatorname{Inf}^{(1-\delta)}_0[f] =\operatorname{Stab}_{1-\delta}[\operatorname{Maj}_n], so f cannot have (\epsilon,\delta)-small stable influences unless \epsilon\ge1-\sqrt\delta.

(e) The function in (d) is 1/\sqrt n-regular.

(f) If \delta\in[0,1) and f:\{-1,1\}^n\to\mathbb R has (\epsilon,\delta)-small stable influences, then it is (\eta,k)-regular for \eta=\sqrt{\epsilon/(1-\delta)^{k-1}}.

(g) For \epsilon\ge0, f has (\epsilon,1)-small stable influences if and only if it is (\sqrt\epsilon,1)-regular.

(h) If a monotone Boolean function is (\epsilon,1)-regular, then it is \epsilon-regular and has \epsilon-small influences.

The positive-dimension clauses in (b) and (c) make explicit the book's nontrivial-cube convention: in dimension zero there is no coordinate influence and the literal separation in (b) is false. The majority construction is stated at its odd arity, and the endpoint assumptions in (f) and (g) make the square-root and denominator expressions well-defined.

Lean code for Lemma6.6.419 theorems
  • theoremdefined in FABL/Chapter06/Pseudorandomness/RegularityComparisons.lean
    complete
    theorem FABL.sq_fourierCoeff_le_influence_of_mem {n : }
      (f : FABL.SignCube n  ) (S : Finset (Fin n)) (i : Fin n)
      (hi : i  S) : FABL.fourierCoeff f S ^ 2  FABL.influence f i
    theorem FABL.sq_fourierCoeff_le_influence_of_mem
      {n : } (f : FABL.SignCube n  )
      (S : Finset (Fin n)) (i : Fin n)
      (hi : i  S) :
      FABL.fourierCoeff f S ^ 2 
        FABL.influence f i
    A Fourier coefficient supported on `i` contributes one nonnegative term to the influence of
    `i`. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/RegularityComparisons.lean
    complete
    theorem FABL.HasSmallInfluences.isFourierRegular_sqrt {n : }
      {f : FABL.SignCube n  } {ε : }
      (hsmall : FABL.HasSmallInfluences ε f) : FABL.IsFourierRegular (ε) f
    theorem FABL.HasSmallInfluences.isFourierRegular_sqrt
      {n : } {f : FABL.SignCube n  }
      {ε : }
      (hsmall : FABL.HasSmallInfluences ε f) :
      FABL.IsFourierRegular (ε) f
    Exercise 6.5(a): small ordinary influences imply square-root Fourier regularity. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/RegularityComparisons.lean
    complete
    theorem FABL.isFourierRegular_innerProductModTwoBoolean (m : ) :
      FABL.IsFourierRegular (2 ^ m)⁻¹
        (FABL.innerProductModTwoBoolean m).toReal
    theorem FABL.isFourierRegular_innerProductModTwoBoolean
      (m : ) :
      FABL.IsFourierRegular (2 ^ m)⁻¹
        (FABL.innerProductModTwoBoolean
            m).toReal
    The sign-valued inner-product function is `2⁻ᵐ`-regular on its `2m` variables. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/RegularityComparisons.lean
    complete
    theorem FABL.influence_innerProductModTwoBoolean_eq_half (m : ) (hm : 0 < m)
      (i : Fin (m + m)) :
      FABL.influence (FABL.innerProductModTwoBoolean m).toReal i = 1 / 2
    theorem FABL.influence_innerProductModTwoBoolean_eq_half
      (m : ) (hm : 0 < m) (i : Fin (m + m)) :
      FABL.influence
          (FABL.innerProductModTwoBoolean
              m).toReal
          i =
        1 / 2
    In positive half-dimension, every coordinate of the inner-product function has influence
    `1 / 2`. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/RegularityComparisons.lean
    complete
    theorem FABL.exists_isFourierRegular_not_hasSmallInfluences_of_even (n : )
      (hn : Even n) (hnpos : 0 < n) :
       f,
        FABL.IsFourierRegular (2 ^ (n / 2))⁻¹ f.toReal 
           {ε : }, ε < 1 / 2  ¬FABL.HasSmallInfluences ε f.toReal
    theorem FABL.exists_isFourierRegular_not_hasSmallInfluences_of_even
      (n : ) (hn : Even n) (hnpos : 0 < n) :
       f,
        FABL.IsFourierRegular (2 ^ (n / 2))⁻¹
            f.toReal 
           {ε : },
            ε < 1 / 2 
              ¬FABL.HasSmallInfluences ε
                  f.toReal
    Exercise 6.5(b): every positive even dimension admits a Boolean-valued
    `2⁻ⁿᐟ²`-regular function with a coordinate influence equal to `1 / 2`. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/RegularityComparisons.lean
    complete
    theorem FABL.exists_hasSmallStableInfluences_not_isFourierRegular (n : )
      (hn : 0 < n) (δ : ) (_hδ : δ  Set.Icc 0 1) :
       f,
        FABL.HasSmallStableInfluences ((1 - δ) ^ (n - 1)) δ f.toReal 
           {ε : }, ε < 1  ¬FABL.IsFourierRegular ε f.toReal
    theorem FABL.exists_hasSmallStableInfluences_not_isFourierRegular
      (n : ) (hn : 0 < n) (δ : )
      (_hδ : δ  Set.Icc 0 1) :
       f,
        FABL.HasSmallStableInfluences
            ((1 - δ) ^ (n - 1)) δ f.toReal 
           {ε : },
            ε < 1 
              ¬FABL.IsFourierRegular ε
                  f.toReal
    Exercise 6.5(c): in positive dimension, full parity has exactly the printed stable-influence
    profile while retaining a Fourier coefficient of magnitude one. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/RegularityComparisons.lean
    complete
    theorem FABL.fourierCoeff_leadingCoordinateTimes_tailFrequency_eq_zero {n : }
      (g : FABL.BooleanFunction n) (S : Finset (Fin n)) :
      FABL.fourierCoeff (FABL.leadingCoordinateTimes g).toReal
          (FABL.tailFrequency S) =
        0
    theorem FABL.fourierCoeff_leadingCoordinateTimes_tailFrequency_eq_zero
      {n : } (g : FABL.BooleanFunction n)
      (S : Finset (Fin n)) :
      FABL.fourierCoeff
          (FABL.leadingCoordinateTimes
              g).toReal
          (FABL.tailFrequency S) =
        0
    Frequencies avoiding the leading coordinate have zero coefficient in a leading-coordinate
    product. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/RegularityComparisons.lean
    complete
    theorem FABL.stableInfluence_leadingCoordinateTimes_eq_stabilityCurve {n : }
      (g : FABL.BooleanFunction n) (ρ : ) :
      FABL.stableInfluence ρ (FABL.leadingCoordinateTimes g).toReal 0 =
        FABL.stabilityCurve g.toReal ρ
    theorem FABL.stableInfluence_leadingCoordinateTimes_eq_stabilityCurve
      {n : } (g : FABL.BooleanFunction n)
      (ρ : ) :
      FABL.stableInfluence ρ
          (FABL.leadingCoordinateTimes
              g).toReal
          0 =
        FABL.stabilityCurve g.toReal ρ
    The leading coordinate's stable influence is exactly the stability curve of the tail
    function. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/RegularityComparisons.lean
    complete
    theorem FABL.stableInfluence_leadingCoordinateTimes_majority_odd_eq_noiseStability
      (m : ) (δ : ) ( : δ  Set.Ioo 0 1) :
      FABL.stableInfluence (1 - δ)
          (FABL.leadingCoordinateTimes (FABL.majority (2 * m + 1))).toReal
          0 =
        FABL.noiseStability (1 - δ)  (FABL.majority (2 * m + 1)).toReal
    theorem FABL.stableInfluence_leadingCoordinateTimes_majority_odd_eq_noiseStability
      (m : ) (δ : ) ( : δ  Set.Ioo 0 1) :
      FABL.stableInfluence (1 - δ)
          (FABL.leadingCoordinateTimes
              (FABL.majority
                (2 * m + 1))).toReal
          0 =
        FABL.noiseStability (1 - δ) 
          (FABL.majority (2 * m + 1)).toReal
    For the book's range of `δ`, the exact leading-coordinate identity is the corresponding
    noise-stability identity. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/RegularityComparisons.lean
    complete
    theorem FABL.one_sub_sqrt_le_of_hasSmallStableInfluences_leadingCoordinateTimes_majority_odd
      (m : ) {ε δ : } ( : δ  Set.Ioo 0 1)
      (hsmall :
        FABL.HasSmallStableInfluences ε δ
          (FABL.leadingCoordinateTimes
              (FABL.majority (2 * m + 1))).toReal) :
      1 - δ  ε
    theorem FABL.one_sub_sqrt_le_of_hasSmallStableInfluences_leadingCoordinateTimes_majority_odd
      (m : ) {ε δ : } ( : δ  Set.Ioo 0 1)
      (hsmall :
        FABL.HasSmallStableInfluences ε δ
          (FABL.leadingCoordinateTimes
              (FABL.majority
                (2 * m + 1))).toReal) :
      1 - δ  ε
    Exercise 6.5(d), consequence: the leading-coordinate majority product cannot have
    `(ε,δ)`-small stable influences below `1 - √δ`. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/RegularityComparisons.lean
    complete
    theorem FABL.isBalanced_majority_odd (m : ) :
      FABL.IsBalanced (FABL.majority (2 * m + 1)).toReal
    theorem FABL.isBalanced_majority_odd (m : ) :
      FABL.IsBalanced
        (FABL.majority (2 * m + 1)).toReal
    Odd majority is balanced. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/RegularityComparisons.lean
    complete
    theorem FABL.IsFourierRegular.leadingCoordinateTimes_of_isBalanced {n : }
      {g : FABL.BooleanFunction n} {ε : }
      (hregular : FABL.IsFourierRegular ε g.toReal)
      (hbalanced : FABL.IsBalanced g.toReal) ( : 0  ε) :
      FABL.IsFourierRegular ε (FABL.leadingCoordinateTimes g).toReal
    theorem FABL.IsFourierRegular.leadingCoordinateTimes_of_isBalanced
      {n : } {g : FABL.BooleanFunction n}
      {ε : }
      (hregular :
        FABL.IsFourierRegular ε g.toReal)
      (hbalanced : FABL.IsBalanced g.toReal)
      ( : 0  ε) :
      FABL.IsFourierRegular ε
        (FABL.leadingCoordinateTimes g).toReal
    Multiplying a balanced regular Boolean function by a fresh coordinate preserves its
    regularity parameter. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/RegularityComparisons.lean
    complete
    theorem FABL.isFourierRegular_leadingCoordinateTimes_majority_odd (m : ) :
      FABL.IsFourierRegular (1 / (2 * m + 1))
        (FABL.leadingCoordinateTimes (FABL.majority (2 * m + 1))).toReal
    theorem FABL.isFourierRegular_leadingCoordinateTimes_majority_odd
      (m : ) :
      FABL.IsFourierRegular
        (1 / (2 * m + 1))
        (FABL.leadingCoordinateTimes
            (FABL.majority
              (2 * m + 1))).toReal
    Exercise 6.5(e): for odd tail arity `n = 2m+1`, the function
    `x₀ Majₙ(x₁,…,xₙ)` is `1 / √n`-regular. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/RegularityComparisons.lean
    complete
    theorem FABL.rho_pow_card_sub_one_mul_sq_fourierCoeff_le_stableInfluence {n : }
      (f : FABL.SignCube n  ) (ρ : ) ( : 0  ρ) (S : Finset (Fin n))
      (i : Fin n) (hi : i  S) :
      ρ ^ (S.card - 1) * FABL.fourierCoeff f S ^ 2 
        FABL.stableInfluence ρ f i
    theorem FABL.rho_pow_card_sub_one_mul_sq_fourierCoeff_le_stableInfluence
      {n : } (f : FABL.SignCube n  )
      (ρ : ) ( : 0  ρ)
      (S : Finset (Fin n)) (i : Fin n)
      (hi : i  S) :
      ρ ^ (S.card - 1) *
          FABL.fourierCoeff f S ^ 2 
        FABL.stableInfluence ρ f i
    One supported Fourier term is bounded by its coordinate stable influence at nonnegative
    correlation. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/RegularityComparisons.lean
    complete
    theorem FABL.HasSmallStableInfluences.isLowDegreeFourierRegular {n : }
      {f : FABL.SignCube n  } {ε δ : } {k : }
      (hsmall : FABL.HasSmallStableInfluences ε δ f)
      ( : δ  Set.Ico 0 1) :
      FABL.IsLowDegreeFourierRegular ((ε / (1 - δ) ^ (k - 1))) k f
    theorem FABL.HasSmallStableInfluences.isLowDegreeFourierRegular
      {n : } {f : FABL.SignCube n  }
      {ε δ : } {k : }
      (hsmall :
        FABL.HasSmallStableInfluences ε δ f)
      ( : δ  Set.Ico 0 1) :
      FABL.IsLowDegreeFourierRegular
        ((ε / (1 - δ) ^ (k - 1))) k f
    Exercise 6.5(f): small stable influences imply low-degree regularity with the printed
    square-root loss. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/RegularityComparisons.lean
    complete
    theorem FABL.stableInfluence_zero_eq_sq_fourierCoeff_singleton {n : }
      (f : FABL.SignCube n  ) (i : Fin n) :
      FABL.stableInfluence 0 f i = FABL.fourierCoeff f {i} ^ 2
    theorem FABL.stableInfluence_zero_eq_sq_fourierCoeff_singleton
      {n : } (f : FABL.SignCube n  )
      (i : Fin n) :
      FABL.stableInfluence 0 f i =
        FABL.fourierCoeff f {i} ^ 2
    At correlation zero, stable influence is exactly the square of the singleton Fourier
    coefficient. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/RegularityComparisons.lean
    complete
    theorem FABL.hasSmallStableInfluences_one_iff_isLowDegreeFourierRegular_one
      {n : } (f : FABL.SignCube n  ) (ε : ) ( : 0  ε) :
      FABL.HasSmallStableInfluences ε 1 f 
        FABL.IsLowDegreeFourierRegular (ε) 1 f
    theorem FABL.hasSmallStableInfluences_one_iff_isLowDegreeFourierRegular_one
      {n : } (f : FABL.SignCube n  )
      (ε : ) ( : 0  ε) :
      FABL.HasSmallStableInfluences ε 1 f 
        FABL.IsLowDegreeFourierRegular (ε) 1
          f
    Exercise 6.5(g): at noise parameter one, small stable influences are exactly level-one
    regularity with the square-root parameter. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/RegularityComparisons.lean
    complete
    theorem FABL.abs_fourierCoeff_le_influence_of_monotone {n : }
      (f : FABL.BooleanFunction n) (hf : Monotone f) (S : Finset (Fin n))
      (i : Fin n) (hi : i  S) :
      |FABL.fourierCoeff f.toReal S|  FABL.influence f.toReal i
    theorem FABL.abs_fourierCoeff_le_influence_of_monotone
      {n : } (f : FABL.BooleanFunction n)
      (hf : Monotone f) (S : Finset (Fin n))
      (i : Fin n) (hi : i  S) :
      |FABL.fourierCoeff f.toReal S| 
        FABL.influence f.toReal i
    For a monotone Boolean function, every Fourier coefficient supported on `i` is bounded by
    the influence of `i`. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/RegularityComparisons.lean
    complete
    theorem FABL.IsLowDegreeFourierRegular.isFourierRegular_and_hasSmallInfluences_of_monotone
      {n : } (f : FABL.BooleanFunction n) (hf : Monotone f) {ε : }
      (hregular : FABL.IsLowDegreeFourierRegular ε 1 f.toReal) :
      FABL.IsFourierRegular ε f.toReal  FABL.HasSmallInfluences ε f.toReal
    theorem FABL.IsLowDegreeFourierRegular.isFourierRegular_and_hasSmallInfluences_of_monotone
      {n : } (f : FABL.BooleanFunction n)
      (hf : Monotone f) {ε : }
      (hregular :
        FABL.IsLowDegreeFourierRegular ε 1
          f.toReal) :
      FABL.IsFourierRegular ε f.toReal 
        FABL.HasSmallInfluences ε f.toReal
    Exercise 6.5(h): level-one regularity of a monotone Boolean function implies ordinary
    regularity and small ordinary influences with the same parameter. 
Lemma6.6.5
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Theorem 1.4.2
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 6.6. Let f:\{-1,1\}^n\to\mathbb R and let (J,\overline J) partition [n].

(a) For uniformly random z\in\{-1,1\}^{\overline J}, express \operatorname{Var}_z\!\left[\mathbb E[f_{J\mid z}]\right] in terms of the Fourier coefficients of f.

(b) Use this identity and the probabilistic method to give another proof of Proposition 6.12(2).

Lean code for Lemma6.6.53 theorems
  • theoremdefined in FABL/Chapter06/Pseudorandomness/RestrictionMeanVariance.lean
    complete
    theorem FABL.mean_signRestriction_eq_restrictionFourierCoeff_empty {n : }
      (f : FABL.SignCube n  ) (J : Finset (Fin n))
      (z : FABL.FixedSignCube J) :
      FABL.mean (FABL.signRestriction f J z) =
        FABL.restrictionFourierCoeff f J  z
    theorem FABL.mean_signRestriction_eq_restrictionFourierCoeff_empty
      {n : } (f : FABL.SignCube n  )
      (J : Finset (Fin n))
      (z : FABL.FixedSignCube J) :
      FABL.mean (FABL.signRestriction f J z) =
        FABL.restrictionFourierCoeff f J  z
    The mean of a sign restriction is its empty restricted Fourier coefficient. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/RestrictionMeanVariance.lean
    complete
    theorem FABL.variance_mean_signRestriction_eq_sum_sq_fixed {n : }
      (f : FABL.SignCube n  ) (J : Finset (Fin n)) :
      (FABL.variance fun z => FABL.mean (FABL.signRestriction f J z)) =
         T with T  , FABL.fourierCoeff f (FABL.liftFixedFrequency T) ^ 2
    theorem FABL.variance_mean_signRestriction_eq_sum_sq_fixed
      {n : } (f : FABL.SignCube n  )
      (J : Finset (Fin n)) :
      (FABL.variance fun z =>
          FABL.mean
            (FABL.signRestriction f J z)) =
         T with T  ,
          FABL.fourierCoeff f
              (FABL.liftFixedFrequency T) ^
            2
    O'Donnell, Exercise 6.6(a): the variance of the mean of a uniformly random
    restriction equals the nonconstant Fourier mass on the fixed coordinates. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/RestrictionMeanVariance.lean
    complete
    theorem FABL.exists_signRestriction_mean_change_gt_via_variance {n : }
      (f : FABL.SignCube n  ) {ε : } {k : }
      (hregular : ¬FABL.IsLowDegreeFourierRegular ε k f) :
       J,
        Fintype.card (FABL.FixedIndex J)  k 
           z, ε < |FABL.mean (FABL.signRestriction f J z) - FABL.mean f|
    theorem FABL.exists_signRestriction_mean_change_gt_via_variance
      {n : } (f : FABL.SignCube n  )
      {ε : } {k : }
      (hregular :
        ¬FABL.IsLowDegreeFourierRegular ε k
            f) :
       J,
        Fintype.card (FABL.FixedIndex J)  k 
           z,
            ε <
              |FABL.mean
                    (FABL.signRestriction f J
                      z) -
                  FABL.mean f|
    O'Donnell, Exercise 6.6(b): the restriction witness in Proposition 6.12(2),
    proved from the variance identity and the probabilistic method. 
Lemma6.6.6
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Definition 1.5.3
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Exercise 6.7. Let \varphi:\mathbb F_2^n\to\mathbb R_{\ge0} be the density of the uniform distribution on the support of \operatorname{IP}_n:\mathbb F_2^n\to\{0,1\}. Show that \varphi is \epsilon-biased for \epsilon=\frac{2^{-n/2}}{1-2^{-n/2}}, and is not \epsilon'-biased for any smaller \epsilon'.

Lean code for Lemma6.6.64 declarations
  • defdefined in FABL/Chapter06/Pseudorandomness/InnerProductSupportDensity.lean
    complete
    def FABL.innerProductModTwoOneSet (m : ) : Set (FABL.F₂Cube (m + m))
    def FABL.innerProductModTwoOneSet (m : ) :
      Set (FABL.F₂Cube (m + m))
    The one-set of the binary inner-product-mod-two function. 
  • defdefined in FABL/Chapter06/Pseudorandomness/InnerProductSupportDensity.lean
    complete
    def FABL.innerProductModTwoSupportDensity (m : ) (hm : 0 < m) :
      FABL.ProbabilityDensity (m + m)
    def FABL.innerProductModTwoSupportDensity
      (m : ) (hm : 0 < m) :
      FABL.ProbabilityDensity (m + m)
    The uniform density on inputs where inner product modulo two equals one. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/InnerProductSupportDensity.lean
    complete
    theorem FABL.abs_vectorFourierCoeff_innerProductModTwoSupportDensity (m : )
      (hm : 0 < m) (γ : FABL.F₂Cube (m + m)) ( : γ  0) :
      |FABL.vectorFourierCoeff
            (FABL.innerProductModTwoSupportDensity m hm).toFun γ| =
        (2 ^ m)⁻¹ / (1 - (2 ^ m)⁻¹)
    theorem FABL.abs_vectorFourierCoeff_innerProductModTwoSupportDensity
      (m : ) (hm : 0 < m)
      (γ : FABL.F₂Cube (m + m)) ( : γ  0) :
      |FABL.vectorFourierCoeff
            (FABL.innerProductModTwoSupportDensity
                m hm).toFun
            γ| =
        (2 ^ m)⁻¹ / (1 - (2 ^ m)⁻¹)
    Every nontrivial coefficient of the support density has the same exact magnitude. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/InnerProductSupportDensity.lean
    complete
    theorem FABL.innerProductModTwoSupportDensity_isBiased_iff (m : ) (hm : 0 < m)
      (ε : ) :
      (FABL.innerProductModTwoSupportDensity m hm).IsBiased ε 
        (2 ^ m)⁻¹ / (1 - (2 ^ m)⁻¹)  ε
    theorem FABL.innerProductModTwoSupportDensity_isBiased_iff
      (m : ) (hm : 0 < m) (ε : ) :
      (FABL.innerProductModTwoSupportDensity m
              hm).IsBiased
          ε 
        (2 ^ m)⁻¹ / (1 - (2 ^ m)⁻¹)  ε
    Exercise 6.7: the support density has the exact smallest possible bias parameter. 
Lemma6.6.7
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Definition 6.2.4
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 6.9. Compute the \mathbb F_2-polynomial representation of the equality function \operatorname{Eq}_n:\{0,1\}^n\to\{0,1\}, \qquad \operatorname{Eq}_n(x)=1 \ \Longleftrightarrow\ x_1=x_2=\cdots=x_n.

Lean code for Lemma6.6.73 declarations
  • defdefined in FABL/Chapter06/F₂Polynomials/Interpolation.lean
    complete
    def FABL.f₂EqualityFunction {n : } (x : FABL.F₂Cube n) : FABL.𝔽₂
    def FABL.f₂EqualityFunction {n : }
      (x : FABL.F₂Cube n) : FABL.𝔽₂
    The binary equality function: all coordinates have the same value. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/Interpolation.lean
    complete
    theorem FABL.forall_coordinate_eq_iff_eq_zero_or_eq_one {n : } (hn : 0 < n)
      (x : FABL.F₂Cube n) : (∀ (i j : Fin n), x i = x j)  x = 0  x = 1
    theorem FABL.forall_coordinate_eq_iff_eq_zero_or_eq_one
      {n : } (hn : 0 < n)
      (x : FABL.F₂Cube n) :
      (∀ (i j : Fin n), x i = x j) 
        x = 0  x = 1
    On a nonempty cube, a constant binary string is either the zero string or the one string. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/Interpolation.lean
    complete
    theorem FABL.f₂EqualityFunction_eq_pointIndicators {n : } (hn : 0 < n)
      (x : FABL.F₂Cube n) :
      FABL.f₂EqualityFunction x =
        FABL.f₂PointIndicator 0 x + FABL.f₂PointIndicator 1 x
    theorem FABL.f₂EqualityFunction_eq_pointIndicators
      {n : } (hn : 0 < n)
      (x : FABL.F₂Cube n) :
      FABL.f₂EqualityFunction x =
        FABL.f₂PointIndicator 0 x +
          FABL.f₂PointIndicator 1 x
    Exercise 6.9: the equality function is the sum of the all-zero and all-one indicators. 
Lemma6.6.8
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Lemma 3.1.6
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Exercise 6.11. Let f:\mathbb F_2^n\to\mathbb F_2 be nonzero and suppose \deg_{\mathbb F_2}(f)\le k. Then \Pr_{\boldsymbol x\sim\mathbb F_2^n}[f(\boldsymbol x)\ne0]\ge2^{-k}.

Lean code for Lemma6.6.83 theorems
  • theoremdefined in FABL/Chapter06/F₂Polynomials/ExtremalBounds.lean
    complete
    theorem FABL.two_pow_sub_le_hammingNorm_of_functionAlgebraicDegree_le {n k : }
      (f : FABL.F₂BooleanFunction n) (hf : f  0)
      (hdeg : FABL.functionAlgebraicDegree f  k) :
      2 ^ (n - k)  hammingNorm f
    theorem FABL.two_pow_sub_le_hammingNorm_of_functionAlgebraicDegree_le
      {n k : } (f : FABL.F₂BooleanFunction n)
      (hf : f  0)
      (hdeg :
        FABL.functionAlgebraicDegree f  k) :
      2 ^ (n - k)  hammingNorm f
    The minimum-support bound for an F₂ polynomial: a nonzero function of degree at most `k`
    has Hamming norm at least `2 ^ (n - k)`.
    
  • theoremdefined in FABL/Chapter06/F₂Polynomials/ExtremalBounds.lean
    complete
    theorem FABL.uniformProbability_ne_zero_eq_hammingNorm_ratio {n : }
      (f : FABL.F₂BooleanFunction n) :
      (FABL.uniformProbability fun x => f x  0) = (hammingNorm f) / 2 ^ n
    theorem FABL.uniformProbability_ne_zero_eq_hammingNorm_ratio
      {n : } (f : FABL.F₂BooleanFunction n) :
      (FABL.uniformProbability fun x =>
          f x  0) =
        (hammingNorm f) / 2 ^ n
    The uniform nonzero probability is the Hamming norm divided by the cube size. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/ExtremalBounds.lean
    complete
    theorem FABL.inv_two_pow_le_uniformProbability_ne_zero_of_functionAlgebraicDegree_le
      {n k : } (f : FABL.F₂BooleanFunction n) (hf : f  0)
      (hdeg : FABL.functionAlgebraicDegree f  k) :
      2⁻¹ ^ k  FABL.uniformProbability fun x => f x  0
    theorem FABL.inv_two_pow_le_uniformProbability_ne_zero_of_functionAlgebraicDegree_le
      {n k : } (f : FABL.F₂BooleanFunction n)
      (hf : f  0)
      (hdeg :
        FABL.functionAlgebraicDegree f  k) :
      2⁻¹ ^ k 
        FABL.uniformProbability fun x =>
          f x  0
    Exercise 6.11: a nonzero F₂ polynomial of degree at most `k` is nonzero on at least a
    `2⁻ᵏ` fraction of the Boolean cube.
    
Lemma6.6.9
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 4
Statement dependency previews
Preview
Definition 3.2.3
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Exercise 6.12. Let f:\{-1,1\}^n\to\{0,1\}.

(a) Prove \deg_{\mathbb F_2}(f) \le\log_2\!\bigl(\operatorname{sparsity}(\widehat f)\bigr).

(b) If \widehat f is 2^{-k}-granular, prove \deg_{\mathbb F_2}(f)\le k.

Lean code for Lemma6.6.92 theorems
  • theoremdefined in FABL/Chapter06/F₂Polynomials/SpectralDegree.lean
    complete
    theorem FABL.two_pow_functionAlgebraicDegree_le_spectralSparsity_booleanRealEmbedding
      {n : } (f : FABL.F₂BooleanFunction n) (hf : f  0) :
      2 ^ FABL.functionAlgebraicDegree f 
        FABL.spectralSparsity (FABL.booleanRealEmbedding f)
    theorem FABL.two_pow_functionAlgebraicDegree_le_spectralSparsity_booleanRealEmbedding
      {n : } (f : FABL.F₂BooleanFunction n)
      (hf : f  0) :
      2 ^ FABL.functionAlgebraicDegree f 
        FABL.spectralSparsity
          (FABL.booleanRealEmbedding f)
    Exercise 6.12(a), in its exponentiated exact form: a nonzero `𝔽₂`-valued Boolean
    function has at least `2 ^ degree f` nonzero Fourier coefficients after the canonical
    real `0/1` embedding.
    
  • theoremdefined in FABL/Chapter06/F₂Polynomials/SpectralDegree.lean
    complete
    theorem FABL.functionAlgebraicDegree_le_of_isVectorFourierGranular_booleanRealEmbedding
      {n : } (f : FABL.F₂BooleanFunction n) (k : )
      (hgranular :
        FABL.IsVectorFourierGranular (FABL.booleanRealEmbedding f)
          (2 ^ k)⁻¹) :
      FABL.functionAlgebraicDegree f  k
    theorem FABL.functionAlgebraicDegree_le_of_isVectorFourierGranular_booleanRealEmbedding
      {n : } (f : FABL.F₂BooleanFunction n)
      (k : )
      (hgranular :
        FABL.IsVectorFourierGranular
          (FABL.booleanRealEmbedding f)
          (2 ^ k)⁻¹) :
      FABL.functionAlgebraicDegree f  k
    Exercise 6.12(b): if the Fourier transform of the canonical real `0/1` embedding is
    `2⁻ᵏ`-granular, then the algebraic degree over `𝔽₂` is at most `k`.
    
    The result includes the zero function, whose algebraic degree is zero and whose Fourier
    transform is granular at every scale.
    
Lemma6.6.10
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Definition 6.2.8
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 6.13. If f:\{-1,1\}^n\to\{-1,1\} is bent and n>2, then \deg_{\mathbb F_2}(f)\le n/2. The estimate \deg_{\mathbb F_2}(f)\le n/2+1 already follows from Exercise 6.12(b).

Lean code for Lemma6.6.103 theorems
  • theoremdefined in FABL/Chapter06/F₂Polynomials/BentDegree.lean
    complete
    theorem FABL.realSignEncodedFunction_eq_one_sub_two_booleanRealEmbedding {n : }
      (f : FABL.F₂BooleanFunction n) :
      FABL.realSignEncodedFunction f = fun x =>
        1 - 2 * FABL.booleanRealEmbedding f x
    theorem FABL.realSignEncodedFunction_eq_one_sub_two_booleanRealEmbedding
      {n : } (f : FABL.F₂BooleanFunction n) :
      FABL.realSignEncodedFunction f =
        fun x =>
        1 - 2 * FABL.booleanRealEmbedding f x
    The real sign encoding is the affine transform `1 - 2f` of the real
    zero-one embedding. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/BentDegree.lean
    complete
    theorem FABL.restrictionFourierCoeff_realSignEncodedFunction_eq_neg_two_mul
      {n : } (f : FABL.F₂BooleanFunction n) (J : Finset (Fin n))
      (A : Finset J) (hA : A.Nonempty) (z : FABL.FixedSignCube J) :
      FABL.restrictionFourierCoeff
          (FABL.binaryFunctionOnSignCube (FABL.realSignEncodedFunction f)) J
          A z =
        -2 *
          FABL.restrictionFourierCoeff
            (FABL.binaryFunctionOnSignCube (FABL.booleanRealEmbedding f)) J
            A z
    theorem FABL.restrictionFourierCoeff_realSignEncodedFunction_eq_neg_two_mul
      {n : } (f : FABL.F₂BooleanFunction n)
      (J : Finset (Fin n)) (A : Finset J)
      (hA : A.Nonempty)
      (z : FABL.FixedSignCube J) :
      FABL.restrictionFourierCoeff
          (FABL.binaryFunctionOnSignCube
            (FABL.realSignEncodedFunction f))
          J A z =
        -2 *
          FABL.restrictionFourierCoeff
            (FABL.binaryFunctionOnSignCube
              (FABL.booleanRealEmbedding f))
            J A z
    At a nonempty free frequency, sign encoding multiplies the zero-one
    restricted Fourier coefficient by `-2`. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/BentDegree.lean
    complete
    theorem FABL.functionAlgebraicDegree_le_half_of_isBent {n : }
      (f : FABL.F₂BooleanFunction n) (hn : Even n) (hnTwo : 2 < n)
      (hf : FABL.IsBent (FABL.realSignEncodedFunction f)) :
      FABL.functionAlgebraicDegree f  n / 2
    theorem FABL.functionAlgebraicDegree_le_half_of_isBent
      {n : } (f : FABL.F₂BooleanFunction n)
      (hn : Even n) (hnTwo : 2 < n)
      (hf :
        FABL.IsBent
          (FABL.realSignEncodedFunction f)) :
      FABL.functionAlgebraicDegree f  n / 2
    O'Donnell, Exercise 6.13: in even dimension greater than two, a bent
    binary Boolean function has algebraic degree at most half the dimension. 
Lemma6.6.11
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 4
Statement dependency previews
Preview
Definition 6.1.15
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 6.15 (sharpness).

(a) For every n and k<n-1, construct f:\{0,1\}^n\to\{0,1\} that is k-resilient and satisfies \deg_{\mathbb F_2}(f)=n-k-1.

(b) For every n\ge3, construct f:\{0,1\}^n\to\{0,1\} that is first-order correlation immune and satisfies \deg_{\mathbb F_2}(f)=n-1.

(c) For every n divisible by 3, construct a biased function f:\{0,1\}^n\to\{0,1\} that is correlation immune of order 2n/3-1.

Lean code for Lemma6.6.1122 declarations
  • defdefined in FABL/Chapter06/F₂Polynomials/SiegenthalerSharpness.lean
    complete
    def FABL.booleanFunctionF₂Decoding {n : } (f : FABL.F₂BooleanFunction n) :
      FABL.BooleanFunction n
    def FABL.booleanFunctionF₂Decoding {n : }
      (f : FABL.F₂BooleanFunction n) :
      FABL.BooleanFunction n
    Decode an `𝔽₂`-valued Boolean function as a sign-valued Boolean function on the
    sign cube. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/SiegenthalerSharpness.lean
    complete
    theorem FABL.booleanFunctionF₂Encoding_booleanFunctionF₂Decoding {n : }
      (f : FABL.F₂BooleanFunction n) :
      FABL.booleanFunctionF₂Encoding (FABL.booleanFunctionF₂Decoding f) = f
    theorem FABL.booleanFunctionF₂Encoding_booleanFunctionF₂Decoding
      {n : } (f : FABL.F₂BooleanFunction n) :
      FABL.booleanFunctionF₂Encoding
          (FABL.booleanFunctionF₂Decoding f) =
        f
    Encoding after decoding recovers the original `𝔽₂`-valued Boolean function. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/SiegenthalerSharpness.lean
    complete
    theorem FABL.booleanFunctionF₂Decoding_toReal {n : }
      (f : FABL.F₂BooleanFunction n) :
      (FABL.booleanFunctionF₂Decoding f).toReal =
        FABL.binaryFunctionOnSignCube (FABL.realSignEncodedFunction f)
    theorem FABL.booleanFunctionF₂Decoding_toReal
      {n : } (f : FABL.F₂BooleanFunction n) :
      (FABL.booleanFunctionF₂Decoding
            f).toReal =
        FABL.binaryFunctionOnSignCube
          (FABL.realSignEncodedFunction f)
    The real sign view of the decoded Boolean function is the canonical binary-cube sign
    encoding transported to the sign cube. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/SiegenthalerSharpness.lean
    complete
    theorem FABL.booleanFunctionF₂Encoding_parityTimes {n : } (S : Finset (Fin n))
      (g : FABL.BooleanFunction n) :
      FABL.booleanFunctionF₂Encoding (FABL.parityTimes S g) =
        (FABL.coordinateSum S) + FABL.booleanFunctionF₂Encoding g
    theorem FABL.booleanFunctionF₂Encoding_parityTimes
      {n : } (S : Finset (Fin n))
      (g : FABL.BooleanFunction n) :
      FABL.booleanFunctionF₂Encoding
          (FABL.parityTimes S g) =
        (FABL.coordinateSum S) +
          FABL.booleanFunctionF₂Encoding g
    Multiplication by a parity on the sign cube becomes addition of the corresponding
    coordinate sum over `𝔽₂`. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/SiegenthalerSharpness.lean
    complete
    theorem FABL.booleanFunctionF₂Decoding_anfMonomial_dependsOn {n : }
      (S : Finset (Fin n)) :
      DependsOn (FABL.booleanFunctionF₂Decoding (FABL.anfMonomial S)) S
    theorem FABL.booleanFunctionF₂Decoding_anfMonomial_dependsOn
      {n : } (S : Finset (Fin n)) :
      DependsOn
        (FABL.booleanFunctionF₂Decoding
          (FABL.anfMonomial S))
        S
    A decoded square-free monomial depends only on the coordinates in its support. 
  • defdefined in FABL/Chapter06/F₂Polynomials/SiegenthalerSharpness.lean
    complete
    def FABL.resilientSharpnessPrefix (n k : ) (hk : k < n - 1) :
      Finset (Fin n)
    def FABL.resilientSharpnessPrefix (n k : )
      (hk : k < n - 1) : Finset (Fin n)
    The first `k + 1` coordinates in the resilient sharpness construction. 
  • defdefined in FABL/Chapter06/F₂Polynomials/SiegenthalerSharpness.lean
    complete
    def FABL.resilientSharpnessTail (n k : ) (hk : k < n - 1) : Finset (Fin n)
    def FABL.resilientSharpnessTail (n k : )
      (hk : k < n - 1) : Finset (Fin n)
    The complementary coordinates in the resilient sharpness construction. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/SiegenthalerSharpness.lean
    complete
    theorem FABL.card_resilientSharpnessPrefix (n k : ) (hk : k < n - 1) :
      (FABL.resilientSharpnessPrefix n k hk).card = k + 1
    theorem FABL.card_resilientSharpnessPrefix
      (n k : ) (hk : k < n - 1) :
      (FABL.resilientSharpnessPrefix n k
            hk).card =
        k + 1
  • theoremdefined in FABL/Chapter06/F₂Polynomials/SiegenthalerSharpness.lean
    complete
    theorem FABL.card_resilientSharpnessTail (n k : ) (hk : k < n - 1) :
      (FABL.resilientSharpnessTail n k hk).card = n - k - 1
    theorem FABL.card_resilientSharpnessTail (n k : )
      (hk : k < n - 1) :
      (FABL.resilientSharpnessTail n k
            hk).card =
        n - k - 1
  • defdefined in FABL/Chapter06/F₂Polynomials/SiegenthalerSharpness.lean
    complete
    def FABL.resilientDegreeSharpnessFunction (n k : ) (hk : k < n - 1) :
      FABL.BooleanFunction n
    def FABL.resilientDegreeSharpnessFunction
      (n k : ) (hk : k < n - 1) :
      FABL.BooleanFunction n
    The sharp resilient function: parity on `k + 1` coordinates times a decoded AND on
    the complementary coordinates. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/SiegenthalerSharpness.lean
    complete
    theorem FABL.resilientDegreeSharpnessFunction_isResilient (n k : )
      (hk : k < n - 1) :
      FABL.IsResilient k (FABL.resilientDegreeSharpnessFunction n k hk)
    theorem FABL.resilientDegreeSharpnessFunction_isResilient
      (n k : ) (hk : k < n - 1) :
      FABL.IsResilient k
        (FABL.resilientDegreeSharpnessFunction
          n k hk)
    The sharp resilient construction is `k`-resilient. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/SiegenthalerSharpness.lean
    complete
    theorem FABL.booleanFunctionF₂Encoding_resilientDegreeSharpnessFunction
      (n k : ) (hk : k < n - 1) :
      FABL.booleanFunctionF₂Encoding
          (FABL.resilientDegreeSharpnessFunction n k hk) =
        (FABL.coordinateSum (FABL.resilientSharpnessPrefix n k hk)) +
          FABL.anfMonomial (FABL.resilientSharpnessTail n k hk)
    theorem FABL.booleanFunctionF₂Encoding_resilientDegreeSharpnessFunction
      (n k : ) (hk : k < n - 1) :
      FABL.booleanFunctionF₂Encoding
          (FABL.resilientDegreeSharpnessFunction
            n k hk) =
        (FABL.coordinateSum
              (FABL.resilientSharpnessPrefix n
                k hk)) +
          FABL.anfMonomial
            (FABL.resilientSharpnessTail n k
              hk)
    The binary encoding of the sharp resilient construction is the sum of its prefix parity
    and complementary monomial. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/SiegenthalerSharpness.lean
    complete
    theorem FABL.functionAlgebraicDegree_resilientDegreeSharpnessFunction (n k : )
      (hk : k < n - 1) :
      FABL.functionAlgebraicDegree
          (FABL.booleanFunctionF₂Encoding
            (FABL.resilientDegreeSharpnessFunction n k hk)) =
        n - k - 1
    theorem FABL.functionAlgebraicDegree_resilientDegreeSharpnessFunction
      (n k : ) (hk : k < n - 1) :
      FABL.functionAlgebraicDegree
          (FABL.booleanFunctionF₂Encoding
            (FABL.resilientDegreeSharpnessFunction
              n k hk)) =
        n - k - 1
    Exercise 6.15(a): the resilient construction attains algebraic degree `n - k - 1`. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/SiegenthalerSharpness.lean
    complete
    theorem FABL.exists_isResilient_functionAlgebraicDegree_eq_sub_sub_one (n k : )
      (hk : k < n - 1) :
       f,
        FABL.IsResilient k f 
          FABL.functionAlgebraicDegree (FABL.booleanFunctionF₂Encoding f) =
            n - k - 1
    theorem FABL.exists_isResilient_functionAlgebraicDegree_eq_sub_sub_one
      (n k : ) (hk : k < n - 1) :
       f,
        FABL.IsResilient k f 
          FABL.functionAlgebraicDegree
              (FABL.booleanFunctionF₂Encoding
                f) =
            n - k - 1
    Exercise 6.15(a), in the book's existential form. 
  • defdefined in FABL/Chapter06/F₂Polynomials/SiegenthalerSharpness.lean
    complete
    def FABL.constantPairF₂Indicator (n : ) : FABL.F₂BooleanFunction n
    def FABL.constantPairF₂Indicator (n : ) :
      FABL.F₂BooleanFunction n
    The `𝔽₂` indicator of the all-zero/all-one pair. 
  • defdefined in FABL/Chapter06/F₂Polynomials/SiegenthalerSharpness.lean
    complete
    def FABL.constantPairBooleanFunction (n : ) : FABL.BooleanFunction n
    def FABL.constantPairBooleanFunction (n : ) :
      FABL.BooleanFunction n
    The sign-valued Boolean function which is true exactly on the all-zero/all-one pair. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/SiegenthalerSharpness.lean
    complete
    theorem FABL.realSignEncodedFunction_constantPairF₂Indicator (n : ) :
      FABL.realSignEncodedFunction (FABL.constantPairF₂Indicator n) =
        fun x =>
        1 -
          2 *
            FABL.setIndicator
              (↑(FABL.ProbabilityDensity.constantPairSubspace n)) x
    theorem FABL.realSignEncodedFunction_constantPairF₂Indicator
      (n : ) :
      FABL.realSignEncodedFunction
          (FABL.constantPairF₂Indicator n) =
        fun x =>
        1 -
          2 *
            FABL.setIndicator
              (↑(FABL.ProbabilityDensity.constantPairSubspace
                  n))
              x
    The real sign encoding of the constant-pair indicator is one minus twice its real set
    indicator. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/SiegenthalerSharpness.lean
    complete
    theorem FABL.constantPairBooleanFunction_toReal (n : ) :
      (FABL.constantPairBooleanFunction n).toReal =
        FABL.binaryFunctionOnSignCube
          (FABL.realSignEncodedFunction (FABL.constantPairF₂Indicator n))
    theorem FABL.constantPairBooleanFunction_toReal
      (n : ) :
      (FABL.constantPairBooleanFunction
            n).toReal =
        FABL.binaryFunctionOnSignCube
          (FABL.realSignEncodedFunction
            (FABL.constantPairF₂Indicator n))
    The real view of the constant-pair Boolean function through the explicit cube bridge. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/SiegenthalerSharpness.lean
    complete
    theorem FABL.constantPairBooleanFunction_isCorrelationImmune (n : ) :
      FABL.IsCorrelationImmune 1 (FABL.constantPairBooleanFunction n)
    theorem FABL.constantPairBooleanFunction_isCorrelationImmune
      (n : ) :
      FABL.IsCorrelationImmune 1
        (FABL.constantPairBooleanFunction n)
    The all-zero/all-one pair is first-order correlation immune. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/SiegenthalerSharpness.lean
    complete
    theorem FABL.functionAlgebraicDegree_constantPairBooleanFunction (n : )
      (hn : 3  n) :
      FABL.functionAlgebraicDegree
          (FABL.booleanFunctionF₂Encoding
            (FABL.constantPairBooleanFunction n)) =
        n - 1
    theorem FABL.functionAlgebraicDegree_constantPairBooleanFunction
      (n : ) (hn : 3  n) :
      FABL.functionAlgebraicDegree
          (FABL.booleanFunctionF₂Encoding
            (FABL.constantPairBooleanFunction
              n)) =
        n - 1
    Exercise 6.15(b): the first-order correlation-immune constant-pair function has
    algebraic degree `n - 1`. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/SiegenthalerSharpness.lean
    complete
    theorem FABL.exists_firstOrderCorrelationImmune_functionAlgebraicDegree_eq_sub_one
      (n : ) (hn : 3  n) :
       f,
        FABL.IsCorrelationImmune 1 f 
          FABL.functionAlgebraicDegree (FABL.booleanFunctionF₂Encoding f) =
            n - 1
    theorem FABL.exists_firstOrderCorrelationImmune_functionAlgebraicDegree_eq_sub_one
      (n : ) (hn : 3  n) :
       f,
        FABL.IsCorrelationImmune 1 f 
          FABL.functionAlgebraicDegree
              (FABL.booleanFunctionF₂Encoding
                f) =
            n - 1
    Exercise 6.15(b), in the book's existential form. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/SiegenthalerSharpness.lean
    complete
    theorem FABL.exists_not_isBalanced_isCorrelationImmune_two_mul_div_three_sub_one
      (n : ) (hthree : 3  n) :
       f,
        ¬FABL.IsBalanced f.toReal 
          FABL.IsCorrelationImmune (2 * n / 3 - 1) f
    theorem FABL.exists_not_isBalanced_isCorrelationImmune_two_mul_div_three_sub_one
      (n : ) (hthree : 3  n) :
       f,
        ¬FABL.IsBalanced f.toReal 
          FABL.IsCorrelationImmune
            (2 * n / 3 - 1) f
    Exercise 6.15(c): every dimension divisible by three admits a biased function which is
    correlation immune through level `2n / 3 - 1`. 
Lemma6.6.12
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.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 0L∃∀N

Exercise 6.17. Bent functions come in pairs: if f:\mathbb F_2^n\to\{-1,1\} is bent, then the function \gamma\longmapsto 2^{n/2}\widehat f(\gamma) on the dual group \widehat{\mathbb F_2^n} is also bent.

Lean code for Lemma6.6.126 declarations
  • theoremdefined in FABL/Chapter06/Constructions/BentDual.lean
    complete
    theorem FABL.vectorFourierCoeff_vectorFourierCoeff {n : }
      (f : FABL.F₂Cube n  ) (x : FABL.F₂Cube n) :
      FABL.vectorFourierCoeff (fun γ => FABL.vectorFourierCoeff f γ) x =
        (2 ^ n)⁻¹ * f x
    theorem FABL.vectorFourierCoeff_vectorFourierCoeff
      {n : } (f : FABL.F₂Cube n  )
      (x : FABL.F₂Cube n) :
      FABL.vectorFourierCoeff
          (fun γ =>
            FABL.vectorFourierCoeff f γ)
          x =
        (2 ^ n)⁻¹ * f x
    Applying the normalized Fourier transform twice on the binary cube scales the
    original function by the reciprocal of the cube cardinality. 
  • defdefined in FABL/Chapter06/Constructions/BentDual.lean
    complete
    def FABL.bentDual {n : } (f : FABL.F₂Cube n  ) : FABL.F₂Cube n  
    def FABL.bentDual {n : }
      (f : FABL.F₂Cube n  ) :
      FABL.F₂Cube n  
    The normalized Fourier dual of a bent function. 
  • theoremdefined in FABL/Chapter06/Constructions/BentDual.lean
    complete
    theorem FABL.IsBent.isSignValued_bentDual {n : } {f : FABL.F₂Cube n  }
      (hf : FABL.IsBent f) : FABL.IsSignValued (FABL.bentDual f)
    theorem FABL.IsBent.isSignValued_bentDual {n : }
      {f : FABL.F₂Cube n  }
      (hf : FABL.IsBent f) :
      FABL.IsSignValued (FABL.bentDual f)
    The Fourier dual of a bent function is sign-valued. 
  • theoremdefined in FABL/Chapter06/Constructions/BentDual.lean
    complete
    theorem FABL.vectorFourierCoeff_bentDual {n : } {f : FABL.F₂Cube n  }
      (hn : Even n) (x : FABL.F₂Cube n) :
      FABL.vectorFourierCoeff (FABL.bentDual f) x = (2 ^ (n / 2))⁻¹ * f x
    theorem FABL.vectorFourierCoeff_bentDual {n : }
      {f : FABL.F₂Cube n  } (hn : Even n)
      (x : FABL.F₂Cube n) :
      FABL.vectorFourierCoeff
          (FABL.bentDual f) x =
        (2 ^ (n / 2))⁻¹ * f x
    Fourier coefficients of the bent dual recover the original function with the
    expected even-dimensional normalization. 
  • theoremdefined in FABL/Chapter06/Constructions/BentDual.lean
    complete
    theorem FABL.IsSignValued.isBent_bentDual {n : } {f : FABL.F₂Cube n  }
      (hn : Even n) (hsign : FABL.IsSignValued f) :
      FABL.IsBent (FABL.bentDual f)
    theorem FABL.IsSignValued.isBent_bentDual {n : }
      {f : FABL.F₂Cube n  } (hn : Even n)
      (hsign : FABL.IsSignValued f) :
      FABL.IsBent (FABL.bentDual f)
    The scaled Fourier transform of an even-dimensional sign-valued function is bent. 
  • theoremdefined in FABL/Chapter06/Constructions/BentDual.lean
    complete
    theorem FABL.IsBent.bentDual {n : } {f : FABL.F₂Cube n  } (hn : Even n)
      (hf : FABL.IsBent f) (hsign : FABL.IsSignValued f) :
      FABL.IsSignValued (FABL.bentDual f)  FABL.IsBent (FABL.bentDual f)
    theorem FABL.IsBent.bentDual {n : }
      {f : FABL.F₂Cube n  } (hn : Even n)
      (hf : FABL.IsBent f)
      (hsign : FABL.IsSignValued f) :
      FABL.IsSignValued (FABL.bentDual f) 
        FABL.IsBent (FABL.bentDual f)
    O'Donnell, Exercise 6.17: the scaled Fourier transform of a bent sign-valued
    function is again a bent sign-valued function. 
Lemma6.6.13
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Definition 6.3.1
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Exercise 6.18 (Maiorana--McFarland family). If \pi:\mathbb F_2^n\to\mathbb F_2^n is any permutation and g:\mathbb F_2^n\to\{-1,1\} is arbitrary, then f(x,y)=\operatorname{IP}_{2n}(x,\pi(y))g(y) is bent.

Lean code for Lemma6.6.135 declarations
  • defdefined in FABL/Chapter06/Constructions/MaioranaMcFarlandPermutation.lean
    complete
    def FABL.maioranaMcFarlandPermutation {n : }
      (π : Equiv.Perm (FABL.F₂Cube n)) (g : FABL.F₂Cube n  FABL.Sign) :
      FABL.F₂Cube (n + n)  
    def FABL.maioranaMcFarlandPermutation {n : }
      (π : Equiv.Perm (FABL.F₂Cube n))
      (g : FABL.F₂Cube n  FABL.Sign) :
      FABL.F₂Cube (n + n)  
    The Maiorana--McFarland function associated with a permutation of the binary cube. 
  • theoremdefined in FABL/Chapter06/Constructions/MaioranaMcFarlandPermutation.lean
    complete
    theorem FABL.maioranaMcFarlandPermutation_joinF₂CubeBlocks {n : }
      (π : Equiv.Perm (FABL.F₂Cube n)) (g : FABL.F₂Cube n  FABL.Sign)
      (x y : FABL.F₂Cube n) :
      FABL.maioranaMcFarlandPermutation π g (FABL.joinF₂CubeBlocks x y) =
        FABL.binarySign (FABL.f₂DotProduct x (π y)) * FABL.signValue (g y)
    theorem FABL.maioranaMcFarlandPermutation_joinF₂CubeBlocks
      {n : } (π : Equiv.Perm (FABL.F₂Cube n))
      (g : FABL.F₂Cube n  FABL.Sign)
      (x y : FABL.F₂Cube n) :
      FABL.maioranaMcFarlandPermutation π g
          (FABL.joinF₂CubeBlocks x y) =
        FABL.binarySign
            (FABL.f₂DotProduct x (π y)) *
          FABL.signValue (g y)
  • theoremdefined in FABL/Chapter06/Constructions/MaioranaMcFarlandPermutation.lean
    complete
    theorem FABL.vectorFourierCoeff_maioranaMcFarlandPermutation_joinF₂CubeBlocks
      {n : } (π : Equiv.Perm (FABL.F₂Cube n))
      (g : FABL.F₂Cube n  FABL.Sign) (a b : FABL.F₂Cube n) :
      FABL.vectorFourierCoeff (FABL.maioranaMcFarlandPermutation π g)
          (FABL.joinF₂CubeBlocks a b) =
        (2 ^ n)⁻¹ * FABL.signValue (g ((Equiv.symm π) a)) *
          (FABL.vectorWalshCharacter b) ((Equiv.symm π) a)
    theorem FABL.vectorFourierCoeff_maioranaMcFarlandPermutation_joinF₂CubeBlocks
      {n : } (π : Equiv.Perm (FABL.F₂Cube n))
      (g : FABL.F₂Cube n  FABL.Sign)
      (a b : FABL.F₂Cube n) :
      FABL.vectorFourierCoeff
          (FABL.maioranaMcFarlandPermutation π
            g)
          (FABL.joinF₂CubeBlocks a b) =
        (2 ^ n)⁻¹ *
            FABL.signValue
              (g ((Equiv.symm π) a)) *
          (FABL.vectorWalshCharacter b)
            ((Equiv.symm π) a)
    The exact normalized Fourier coefficient of a permuted Maiorana--McFarland
    function. 
  • theoremdefined in FABL/Chapter06/Constructions/MaioranaMcFarlandPermutation.lean
    complete
    theorem FABL.isSignValued_maioranaMcFarlandPermutation {n : }
      (π : Equiv.Perm (FABL.F₂Cube n)) (g : FABL.F₂Cube n  FABL.Sign) :
      FABL.IsSignValued (FABL.maioranaMcFarlandPermutation π g)
    theorem FABL.isSignValued_maioranaMcFarlandPermutation
      {n : } (π : Equiv.Perm (FABL.F₂Cube n))
      (g : FABL.F₂Cube n  FABL.Sign) :
      FABL.IsSignValued
        (FABL.maioranaMcFarlandPermutation π
          g)
    Every permuted Maiorana--McFarland function is sign-valued. 
  • theoremdefined in FABL/Chapter06/Constructions/MaioranaMcFarlandPermutation.lean
    complete
    theorem FABL.isBent_maioranaMcFarlandPermutation {n : }
      (π : Equiv.Perm (FABL.F₂Cube n)) (g : FABL.F₂Cube n  FABL.Sign) :
      FABL.IsBent (FABL.maioranaMcFarlandPermutation π g)
    theorem FABL.isBent_maioranaMcFarlandPermutation
      {n : } (π : Equiv.Perm (FABL.F₂Cube n))
      (g : FABL.F₂Cube n  FABL.Sign) :
      FABL.IsBent
        (FABL.maioranaMcFarlandPermutation π
          g)
    O'Donnell, Exercise 6.18: every member of the full Maiorana--McFarland
    permutation family is bent. 
Lemma6.6.14
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 4
Statement dependency previews
Preview
Lemma 6.2.7
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1XL∃∀N

Exercise 6.19. Dickson's Theorem says that every polynomial p:\mathbb F_2^n\to\mathbb F_2 of degree at most 2 can be written p(x)=\ell_0(x)+\sum_{j=1}^k\ell_j(x)\ell'_j(x), where \ell_0 is affine and \ell_1,\ell'_1,\ldots,\ell_k,\ell'_k are linearly independent linear functions; the integer k, depending only on p, is its rank. Assuming this quoted external theorem, let n be even. For g(x)=(-1)^{p(x)}, prove that g is bent if and only if k=n/2, and that this is equivalent to g arising from the inner-product-mod-2 function by the transformations of Proposition 6.28.

Dickson's 1901 classification theorem is not proved in the book, so this exercise remains statement-only and supplies no assumption to the production library.

Lemma6.6.15
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Proposition 6.2.6
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 6.20. Without using Dickson's Theorem, prove that the complete quadratic polynomial x\longmapsto\sum_{1\le i<j\le n}x_ix_j can be expressed as \ell_0(x)+\sum_{j=1}^{\lfloor n/2\rfloor}\ell_j(x)\ell'_j(x), where \ell_0 is affine and the displayed linear forms are linearly independent. Use induction on n, with different steps according to the parity of n.

Lean code for Lemma6.6.151 theorem
  • theoremdefined in FABL/Chapter06/F₂Polynomials/CompleteQuadraticDecomposition.lean
    complete
    theorem FABL.exists_completeQuadraticBit_affine_independent_decomposition
      (n : ) :
       b a left right,
        LinearIndependent FABL.𝔽₂ (Sum.elim left right) 
           (x : FABL.F₂Cube n),
            FABL.completeQuadraticBit x =
              FABL.affineFunction b a x +  j, (left j) x * (right j) x
    theorem FABL.exists_completeQuadraticBit_affine_independent_decomposition
      (n : ) :
       b a left right,
        LinearIndependent FABL.𝔽₂
            (Sum.elim left right) 
           (x : FABL.F₂Cube n),
            FABL.completeQuadraticBit x =
              FABL.affineFunction b a x +
                 j, (left j) x * (right j) x
    O'Donnell, Exercise 6.20: the complete quadratic polynomial is an affine function plus
    exactly `⌊n / 2⌋` products of pairs of linear forms.  The combined family of
    `2 * ⌊n / 2⌋` linear forms is linearly independent over `𝔽₂`. 
Lemma6.6.16
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Theorem 1.2.3
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 6.21. Define \operatorname{mod}_3:\{-1,1\}^n\to\{0,1\} by \operatorname{mod}_3(x)=1 if and only if \sum_{j=1}^n x_j is divisible by 3. Prove the Fourier expansion \operatorname{mod}_3(x) =\frac13+\frac23\left(-\frac12\right)^n \sum_{\substack{S\subseteq[n]\\ |S|\ \mathrm{even}}} (-1)^{(|S|\bmod4)/2}(\sqrt3)^{|S|}x^S, and conclude that \operatorname{mod}_3 is \frac23\left(\frac{\sqrt3}{2}\right)^n -regular.

Lean code for Lemma6.6.1613 declarations
  • defdefined in FABL/Chapter06/Pseudorandomness/ModThree.lean
    complete
    def FABL.signCoordinateIntegerSum {n : } (x : FABL.SignCube n) : 
    def FABL.signCoordinateIntegerSum {n : }
      (x : FABL.SignCube n) : 
    The integer sum of the coordinates of a sign-cube input. 
  • defdefined in FABL/Chapter06/Pseudorandomness/ModThree.lean
    complete
    def FABL.modThreeBoolean (n : ) : FABL.ZeroOneFunction n
    def FABL.modThreeBoolean (n : ) :
      FABL.ZeroOneFunction n
    Exercise 6.21: the zero-one-valued function detecting coordinate sums divisible by three. 
  • defdefined in FABL/Chapter06/Pseudorandomness/ModThree.lean
    complete
    def FABL.modThree (n : ) : FABL.SignCube n  
    def FABL.modThree (n : ) :
      FABL.SignCube n  
    The real zero-one view of the modulo-three function. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/ModThree.lean
    complete
    theorem FABL.modThree_apply {n : } (x : FABL.SignCube n) :
      FABL.modThree n x =
        if 3  FABL.signCoordinateIntegerSum x then 1 else 0
    theorem FABL.modThree_apply {n : }
      (x : FABL.SignCube n) :
      FABL.modThree n x =
        if
            3 
              FABL.signCoordinateIntegerSum
                x then
          1
        else 0
    The defining divisibility predicate is preserved by the real zero-one encoding. 
  • defdefined in FABL/Chapter06/Pseudorandomness/ModThree.lean
    complete
    def FABL.modThreeResidue {n : } (x : FABL.SignCube n) : ZMod 3
    def FABL.modThreeResidue {n : }
      (x : FABL.SignCube n) : ZMod 3
    The coordinate sum reduced modulo three. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/ModThree.lean
    complete
    theorem FABL.modThreeResidue_eq_zero_iff {n : } (x : FABL.SignCube n) :
      FABL.modThreeResidue x = 0  3  FABL.signCoordinateIntegerSum x
    theorem FABL.modThreeResidue_eq_zero_iff {n : }
      (x : FABL.SignCube n) :
      FABL.modThreeResidue x = 0 
        3  FABL.signCoordinateIntegerSum x
    Explicit bridge from the book's integer divisibility predicate to `ZMod 3`. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/ModThree.lean
    complete
    theorem FABL.modThree_eq_residueIndicator {n : } (x : FABL.SignCube n) :
      FABL.modThree n x = if FABL.modThreeResidue x = 0 then 1 else 0
    theorem FABL.modThree_eq_residueIndicator {n : }
      (x : FABL.SignCube n) :
      FABL.modThree n x =
        if FABL.modThreeResidue x = 0 then 1
        else 0
    The real function is the indicator of the zero residue. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/ModThree.lean
    complete
    theorem FABL.modThree_fourier_expansion {n : } (x : FABL.SignCube n) :
      FABL.modThree n x =
        1 / 3 +
          2 / 3 * (-1 / 2) ^ n *
             S with Even S.card,
              (-1) ^ (S.card % 4 / 2) * 3 ^ S.card * FABL.monomial S x
    theorem FABL.modThree_fourier_expansion {n : }
      (x : FABL.SignCube n) :
      FABL.modThree n x =
        1 / 3 +
          2 / 3 * (-1 / 2) ^ n *
             S with Even S.card,
              (-1) ^ (S.card % 4 / 2) *
                  3 ^ S.card *
                FABL.monomial S x
    Exercise 6.21: the complete pointwise Fourier expansion of the modulo-three function.
    
    The theorem includes dimension zero: the empty-set summand contributes `2 / 3`, so the right-hand
    side is `1`, as is the divisibility indicator of the empty coordinate sum. 
  • defdefined in FABL/Chapter06/Pseudorandomness/ModThree.lean
    complete
    def FABL.modThreeFourierCoefficient (n : ) (S : Finset (Fin n)) : 
    def FABL.modThreeFourierCoefficient (n : )
      (S : Finset (Fin n)) : 
    The coefficients displayed in Exercise 6.21, including the separate constant `1 / 3`. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/ModThree.lean
    complete
    theorem FABL.fourierCoeff_modThree {n : } (S : Finset (Fin n)) :
      FABL.fourierCoeff (FABL.modThree n) S =
        FABL.modThreeFourierCoefficient n S
    theorem FABL.fourierCoeff_modThree {n : }
      (S : Finset (Fin n)) :
      FABL.fourierCoeff (FABL.modThree n) S =
        FABL.modThreeFourierCoefficient n S
    The displayed coefficients are the canonical Fourier coefficients from Theorem 1.1. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/ModThree.lean
    complete
    theorem FABL.fourierCoeff_modThree_of_nonempty {n : } (S : Finset (Fin n))
      (hS : S.Nonempty) :
      FABL.fourierCoeff (FABL.modThree n) S =
        if Even S.card then
          2 / 3 * (-1 / 2) ^ n * (-1) ^ (S.card % 4 / 2) * 3 ^ S.card
        else 0
    theorem FABL.fourierCoeff_modThree_of_nonempty
      {n : } (S : Finset (Fin n))
      (hS : S.Nonempty) :
      FABL.fourierCoeff (FABL.modThree n) S =
        if Even S.card then
          2 / 3 * (-1 / 2) ^ n *
              (-1) ^ (S.card % 4 / 2) *
            3 ^ S.card
        else 0
    Every nonconstant coefficient has exactly the even-cardinality value in the displayed sum. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/ModThree.lean
    complete
    theorem FABL.abs_fourierCoeff_modThree_le {n : } (S : Finset (Fin n))
      (hS : S.Nonempty) :
      |FABL.fourierCoeff (FABL.modThree n) S|  2 / 3 * (3 / 2) ^ n
    theorem FABL.abs_fourierCoeff_modThree_le {n : }
      (S : Finset (Fin n)) (hS : S.Nonempty) :
      |FABL.fourierCoeff (FABL.modThree n)
            S| 
        2 / 3 * (3 / 2) ^ n
    Every nonconstant coefficient obeys the regularity bound claimed in Exercise 6.21. 
  • theoremdefined in FABL/Chapter06/Pseudorandomness/ModThree.lean
    complete
    theorem FABL.modThree_isFourierRegular {n : } :
      FABL.IsFourierRegular (2 / 3 * (3 / 2) ^ n) (FABL.modThree n)
    theorem FABL.modThree_isFourierRegular {n : } :
      FABL.IsFourierRegular
        (2 / 3 * (3 / 2) ^ n)
        (FABL.modThree n)
    Exercise 6.21: `mod₃` is `(2/3)(√3/2)ⁿ`-regular. 
Lemma6.6.17
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Lemma 6.3.7
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Exercise 6.22. In the construction of Theorem 6.30, once r,s\in\mathbb F_{2^\ell} are given, every fixed output bit y_i=\left\langle\operatorname{enc}(r^i), \operatorname{enc}(s)\right\rangle can be computed deterministically in \operatorname{poly}(\ell) time.

Lean code for Lemma6.6.1714 declarations
  • defdefined in FABL/Chapter06/Constructions/SmallBiasOutputBit.lean
    complete
    def FABL.executableBinaryDotProductState { : } (a b : FABL.F₂Cube ) :
        FABL.𝔽₂
    def FABL.executableBinaryDotProductState
      { : } (a b : FABL.F₂Cube ) :
        FABL.𝔽₂
    The dot-product accumulator after reading the first `k` binary coordinates. 
  • defdefined in FABL/Chapter06/Constructions/SmallBiasOutputBit.lean
    complete
    def FABL.executableBinaryDotProduct { : } (a b : FABL.F₂Cube ) : FABL.𝔽₂
    def FABL.executableBinaryDotProduct { : }
      (a b : FABL.F₂Cube ) : FABL.𝔽₂
    The deterministic dot product obtained after exactly `ℓ` accumulator steps. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasOutputBit.lean
    complete
    theorem FABL.executableBinaryDotProductState_eq_sum { : }
      (a b : FABL.F₂Cube ) (k : ) :
      FABL.executableBinaryDotProductState a b k =
         j  Finset.range k,
          FABL.binaryCoefficientAt a j * FABL.binaryCoefficientAt b j
    theorem FABL.executableBinaryDotProductState_eq_sum
      { : } (a b : FABL.F₂Cube ) (k : ) :
      FABL.executableBinaryDotProductState a b
          k =
         j  Finset.range k,
          FABL.binaryCoefficientAt a j *
            FABL.binaryCoefficientAt b j
    The accumulator is the sum over its visible prefix. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasOutputBit.lean
    complete
    theorem FABL.executableBinaryDotProduct_eq_f₂DotProduct { : }
      (a b : FABL.F₂Cube ) :
      FABL.executableBinaryDotProduct a b = FABL.f₂DotProduct a b
    theorem FABL.executableBinaryDotProduct_eq_f₂DotProduct
      { : } (a b : FABL.F₂Cube ) :
      FABL.executableBinaryDotProduct a b =
        FABL.f₂DotProduct a b
    The recursive executable dot product is the established finite-cube dot product. 
  • defdefined in FABL/Chapter06/Constructions/SmallBiasOutputBit.lean
    complete
    def FABL.executableSmallBiasOutputBit {n  : } (hℓ : 0 < )
      (implementation : FABL.CertifiedBinaryFieldImplementation )
      (r s : FABL.F₂Cube ) (i : Fin n) : FABL.𝔽₂
    def FABL.executableSmallBiasOutputBit
      {n  : } (hℓ : 0 < )
      (implementation :
        FABL.CertifiedBinaryFieldImplementation
          )
      (r s : FABL.F₂Cube ) (i : Fin n) :
      FABL.𝔽₂
    The deterministic fixed-output-bit evaluator.  The coordinate is zero-based in Lean, so this is
    the book bit `y_(i+1) = ⟨enc(r^(i+1)), enc(s)⟩`.
    
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasOutputBit.lean
    complete
    theorem FABL.executableSmallBiasOutputBit_eq_generator {n  : } (hℓ : 0 < )
      (implementation : FABL.CertifiedBinaryFieldImplementation )
      (r s : FABL.F₂Cube ) (i : Fin n) :
      FABL.executableSmallBiasOutputBit hℓ implementation r s i =
        FABL.executableSmallBiasGenerator n hℓ implementation r s i
    theorem FABL.executableSmallBiasOutputBit_eq_generator
      {n  : } (hℓ : 0 < )
      (implementation :
        FABL.CertifiedBinaryFieldImplementation
          )
      (r s : FABL.F₂Cube ) (i : Fin n) :
      FABL.executableSmallBiasOutputBit hℓ
          implementation r s i =
        FABL.executableSmallBiasGenerator n hℓ
          implementation r s i
    Computing the selected bit agrees exactly with evaluating the full generator at that index. 
  • defdefined in FABL/Chapter06/Constructions/SmallBiasOutputBit.lean
    complete
    def FABL.executableBinaryDotProductWork ( : ) : 
    def FABL.executableBinaryDotProductWork
      ( : ) : 
    Two primitive binary-field operations are charged per dot-product accumulator step. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasOutputBit.lean
    complete
    theorem FABL.executableBinaryDotProductWork_eq ( : ) :
      FABL.executableBinaryDotProductWork  = 2 * 
    theorem FABL.executableBinaryDotProductWork_eq
      ( : ) :
      FABL.executableBinaryDotProductWork  =
        2 * 
    The recursive dot product has exactly `2ℓ` charged primitive operations. 
  • defdefined in FABL/Chapter06/Constructions/SmallBiasOutputBit.lean
    complete
    def FABL.executableSmallBiasOutputBitWork ( coordinate : ) : 
    def FABL.executableSmallBiasOutputBitWork
      ( coordinate : ) : 
    Work for one zero-based coordinate: compute `r^(coordinate+1)`, take one length-`ℓ` dot product,
    and emit the resulting bit.
    
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasOutputBit.lean
    complete
    theorem FABL.executableSmallBiasOutputBitWork_eq ( coordinate : ) :
      FABL.executableSmallBiasOutputBitWork  coordinate =
         + (coordinate + 1) * (FABL.binaryMulModWork  + 1) + 2 *  + 1
    theorem FABL.executableSmallBiasOutputBitWork_eq
      ( coordinate : ) :
      FABL.executableSmallBiasOutputBitWork 
          coordinate =
         +
              (coordinate + 1) *
                (FABL.binaryMulModWork  +
                  1) +
            2 *  +
          1
    Exact constructor-derived cost of one selected output bit. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasOutputBit.lean
    complete
    theorem FABL.executableSmallBiasOutputBitWork_le ( coordinate : ) :
      FABL.executableSmallBiasOutputBitWork  coordinate 
        16 * (coordinate + 1) * ( + 1) ^ 2
    theorem FABL.executableSmallBiasOutputBitWork_le
      ( coordinate : ) :
      FABL.executableSmallBiasOutputBitWork 
          coordinate 
        16 * (coordinate + 1) * ( + 1) ^ 2
    One selected output bit has an explicit polynomial bound in its field degree and coordinate. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasOutputBit.lean
    complete
    theorem FABL.executableSmallBiasOutputBit_spec {n  : } (hℓ : 0 < )
      (implementation : FABL.CertifiedBinaryFieldImplementation )
      (r s : FABL.F₂Cube ) (i : Fin n) :
      FABL.executableSmallBiasOutputBit hℓ implementation r s i =
          FABL.executableSmallBiasGenerator n hℓ implementation r s i 
        FABL.executableSmallBiasOutputBitWork  i 
          16 * (i + 1) * ( + 1) ^ 2
    theorem FABL.executableSmallBiasOutputBit_spec
      {n  : } (hℓ : 0 < )
      (implementation :
        FABL.CertifiedBinaryFieldImplementation
          )
      (r s : FABL.F₂Cube ) (i : Fin n) :
      FABL.executableSmallBiasOutputBit hℓ
            implementation r s i =
          FABL.executableSmallBiasGenerator n
            hℓ implementation r s i 
        FABL.executableSmallBiasOutputBitWork
             i 
          16 * (i + 1) * ( + 1) ^ 2
    Joint certificate for a valid output coordinate. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasOutputBit.lean
    complete
    theorem FABL.executableSmallBiasOutputBitWork_isBigO :
      (fun parameters =>
          (FABL.executableSmallBiasOutputBitWork parameters.1
              parameters.2)) =O[Filter.atTop]
        fun parameters => ((parameters.2 + 1) * (parameters.1 + 1) ^ 2)
    theorem FABL.executableSmallBiasOutputBitWork_isBigO :
      (fun parameters =>
          (FABL.executableSmallBiasOutputBitWork
              parameters.1
              parameters.2)) =O[Filter.atTop]
        fun parameters =>
        ((parameters.2 + 1) *
            (parameters.1 + 1) ^ 2)
    The output-bit cost is jointly polynomial in `(ℓ, coordinate)`. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasOutputBit.lean
    complete
    theorem FABL.executableSmallBiasOutputBitWork_fixedCoordinate_isBigO
      (coordinate : ) :
      (fun  =>
          (FABL.executableSmallBiasOutputBitWork 
              coordinate)) =O[Filter.atTop]
        fun  => (( + 1) ^ 2)
    theorem FABL.executableSmallBiasOutputBitWork_fixedCoordinate_isBigO
      (coordinate : ) :
      (fun  =>
          (FABL.executableSmallBiasOutputBitWork
               coordinate)) =O[Filter.atTop]
        fun  => (( + 1) ^ 2)
    For a coordinate fixed independently of `ℓ`, one output bit takes `O((ℓ+1)^2)` work.  The hidden
    constant is explicitly at most `16 * (coordinate + 1)`.
    
Lemma6.6.18
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 4
Statement dependency previews
Preview
Lemma 6.3.7
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 6.23.

(a) Modify Theorem 6.30 so that p_\gamma has degree at most n-1, and obtain a (2^{-t}-2^{-\ell})-biased density.

(b) Let v_1,\ldots,v_\ell be a basis of \mathbb F_{2^\ell} over \mathbb F_2. Modify the construction to produce a density on \mathbb F_2^{n\ell} by setting y_{ij} =\left\langle\operatorname{enc}(v_jr^i), \operatorname{enc}(s)\right\rangle, \qquad i\in[n],\ j\in[\ell]. Prove that this density remains 2^{-t}-biased.

Lean code for Lemma6.6.1836 declarations
  • defdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    def FABL.fieldPairingCoefficient {d  : } (γ : FABL.F₂Cube d)
      (a : Fin d  FABL.BinaryExtensionField ) :
      FABL.BinaryExtensionField 
    def FABL.fieldPairingCoefficient {d  : }
      (γ : FABL.F₂Cube d)
      (a :
        Fin d  FABL.BinaryExtensionField ) :
      FABL.BinaryExtensionField 
    The extension-field linear combination selected by a binary frequency. 
  • defdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    def FABL.fieldPairingGenerator {d  : } (hℓ :   0)
      (a : Fin d  FABL.BinaryExtensionField )
      (s : FABL.BinaryExtensionField ) : FABL.F₂Cube d
    def FABL.fieldPairingGenerator {d  : }
      (hℓ :   0)
      (a :
        Fin d  FABL.BinaryExtensionField )
      (s : FABL.BinaryExtensionField ) :
      FABL.F₂Cube d
    Pair the encoded field element at each output coordinate with the encoding of a second
    extension-field seed. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    theorem FABL.f₂DotProduct_fieldPairingGenerator {d  : } (hℓ :   0)
      (γ : FABL.F₂Cube d) (a : Fin d  FABL.BinaryExtensionField )
      (s : FABL.BinaryExtensionField ) :
      FABL.f₂DotProduct γ (FABL.fieldPairingGenerator hℓ a s) =
        FABL.f₂DotProduct
          ((FABL.binaryExtensionEncode hℓ)
            (FABL.fieldPairingCoefficient γ a))
          ((FABL.binaryExtensionEncode hℓ) s)
    theorem FABL.f₂DotProduct_fieldPairingGenerator
      {d  : } (hℓ :   0)
      (γ : FABL.F₂Cube d)
      (a :
        Fin d  FABL.BinaryExtensionField )
      (s : FABL.BinaryExtensionField ) :
      FABL.f₂DotProduct γ
          (FABL.fieldPairingGenerator hℓ a
            s) =
        FABL.f₂DotProduct
          ((FABL.binaryExtensionEncode hℓ)
            (FABL.fieldPairingCoefficient γ
              a))
          ((FABL.binaryExtensionEncode hℓ) s)
    The character phase of the shared pairing generator is indexed by the encoded field linear
    combination. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    theorem FABL.vectorWalshCharacter_fieldPairingGenerator {d  : } (hℓ :   0)
      (γ : FABL.F₂Cube d) (a : Fin d  FABL.BinaryExtensionField )
      (s : FABL.BinaryExtensionField ) :
      (FABL.vectorWalshCharacter γ) (FABL.fieldPairingGenerator hℓ a s) =
        (FABL.vectorWalshCharacter
            ((FABL.binaryExtensionEncode hℓ)
              (FABL.fieldPairingCoefficient γ a)))
          ((FABL.binaryExtensionEncode hℓ) s)
    theorem FABL.vectorWalshCharacter_fieldPairingGenerator
      {d  : } (hℓ :   0)
      (γ : FABL.F₂Cube d)
      (a :
        Fin d  FABL.BinaryExtensionField )
      (s : FABL.BinaryExtensionField ) :
      (FABL.vectorWalshCharacter γ)
          (FABL.fieldPairingGenerator hℓ a
            s) =
        (FABL.vectorWalshCharacter
            ((FABL.binaryExtensionEncode hℓ)
              (FABL.fieldPairingCoefficient γ
                a)))
          ((FABL.binaryExtensionEncode hℓ) s)
    The shared generator character is the field-coordinate character indexed by the selected
    linear combination. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    theorem FABL.expect_fieldPairingGenerator {d  : } (hℓ :   0)
      (γ : FABL.F₂Cube d) (a : Fin d  FABL.BinaryExtensionField ) :
      (Finset.univ.expect fun s =>
          (FABL.vectorWalshCharacter γ)
            (FABL.fieldPairingGenerator hℓ a s)) =
        if FABL.fieldPairingCoefficient γ a = 0 then 1 else 0
    theorem FABL.expect_fieldPairingGenerator
      {d  : } (hℓ :   0)
      (γ : FABL.F₂Cube d)
      (a :
        Fin d  FABL.BinaryExtensionField ) :
      (Finset.univ.expect fun s =>
          (FABL.vectorWalshCharacter γ)
            (FABL.fieldPairingGenerator hℓ a
              s)) =
        if
            FABL.fieldPairingCoefficient γ a =
              0 then
          1
        else 0
    Averaging the shared generator over its second seed tests whether the selected field linear
    combination is zero. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    theorem FABL.fieldPairingGenerator_characterExpectation_eq_rootProbability
      {d  : } (hℓ :   0) (γ : FABL.F₂Cube d)
      (a :
        FABL.BinaryExtensionField   Fin d  FABL.BinaryExtensionField )
      (p : Polynomial (FABL.BinaryExtensionField )) (hp : p  0)
      (heval :
         (r : FABL.BinaryExtensionField ),
          Polynomial.eval r p = FABL.fieldPairingCoefficient γ (a r)) :
      (Finset.univ.expect fun rs =>
          (FABL.vectorWalshCharacter γ)
            (FABL.fieldPairingGenerator hℓ (a rs.1) rs.2)) =
        (p.rootSet (FABL.BinaryExtensionField )).ncard / 2 ^ 
    theorem FABL.fieldPairingGenerator_characterExpectation_eq_rootProbability
      {d  : } (hℓ :   0)
      (γ : FABL.F₂Cube d)
      (a :
        FABL.BinaryExtensionField  
          Fin d  FABL.BinaryExtensionField )
      (p :
        Polynomial
          (FABL.BinaryExtensionField ))
      (hp : p  0)
      (heval :
         (r : FABL.BinaryExtensionField ),
          Polynomial.eval r p =
            FABL.fieldPairingCoefficient γ
              (a r)) :
      (Finset.univ.expect fun rs =>
          (FABL.vectorWalshCharacter γ)
            (FABL.fieldPairingGenerator hℓ
              (a rs.1) rs.2)) =
        (p.rootSet
                (FABL.BinaryExtensionField
                  )).ncard /
          2 ^ 
    If an associated nonzero polynomial evaluates to the selected field coefficient, the shared
    generator character expectation is exactly its uniform root probability. 
  • defdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    def FABL.fieldPairingDensity {d  : } (hℓ :   0)
      (a :
        FABL.BinaryExtensionField   Fin d  FABL.BinaryExtensionField ) :
      FABL.ProbabilityDensity d
    def FABL.fieldPairingDensity {d  : }
      (hℓ :   0)
      (a :
        FABL.BinaryExtensionField  
          Fin d 
            FABL.BinaryExtensionField ) :
      FABL.ProbabilityDensity d
    The probability density induced by the shared generator with two uniform extension-field
    seeds. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    theorem FABL.vectorFourierCoeff_fieldPairingDensity_eq_rootProbability {d  : }
      (hℓ :   0) (γ : FABL.F₂Cube d)
      (a :
        FABL.BinaryExtensionField   Fin d  FABL.BinaryExtensionField )
      (p : Polynomial (FABL.BinaryExtensionField )) (hp : p  0)
      (heval :
         (r : FABL.BinaryExtensionField ),
          Polynomial.eval r p = FABL.fieldPairingCoefficient γ (a r)) :
      FABL.vectorFourierCoeff (FABL.fieldPairingDensity hℓ a).toFun γ =
        (p.rootSet (FABL.BinaryExtensionField )).ncard / 2 ^ 
    theorem FABL.vectorFourierCoeff_fieldPairingDensity_eq_rootProbability
      {d  : } (hℓ :   0)
      (γ : FABL.F₂Cube d)
      (a :
        FABL.BinaryExtensionField  
          Fin d  FABL.BinaryExtensionField )
      (p :
        Polynomial
          (FABL.BinaryExtensionField ))
      (hp : p  0)
      (heval :
         (r : FABL.BinaryExtensionField ),
          Polynomial.eval r p =
            FABL.fieldPairingCoefficient γ
              (a r)) :
      FABL.vectorFourierCoeff
          (FABL.fieldPairingDensity hℓ
              a).toFun
          γ =
        (p.rootSet
                (FABL.BinaryExtensionField
                  )).ncard /
          2 ^ 
    The Fourier coefficient of a shared pairing density is the exact root probability of any
    nonzero associated polynomial with the specified evaluation identity. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    theorem FABL.fieldPairingDensity_isBiased_of_polynomial {d  : } (hℓ :   0)
      (a :
        FABL.BinaryExtensionField   Fin d  FABL.BinaryExtensionField )
      (p : FABL.F₂Cube d  Polynomial (FABL.BinaryExtensionField )) (D : )
      (hnonzero :  (γ : FABL.F₂Cube d), γ  0  p γ  0)
      (heval :
         (γ : FABL.F₂Cube d) (r : FABL.BinaryExtensionField ),
          Polynomial.eval r (p γ) = FABL.fieldPairingCoefficient γ (a r))
      (hdegree :  (γ : FABL.F₂Cube d), (p γ).natDegree  D) :
      (FABL.fieldPairingDensity hℓ a).IsBiased (D / 2 ^ )
    theorem FABL.fieldPairingDensity_isBiased_of_polynomial
      {d  : } (hℓ :   0)
      (a :
        FABL.BinaryExtensionField  
          Fin d  FABL.BinaryExtensionField )
      (p :
        FABL.F₂Cube d 
          Polynomial
            (FABL.BinaryExtensionField ))
      (D : )
      (hnonzero :
         (γ : FABL.F₂Cube d),
          γ  0  p γ  0)
      (heval :
         (γ : FABL.F₂Cube d)
          (r : FABL.BinaryExtensionField ),
          Polynomial.eval r (p γ) =
            FABL.fieldPairingCoefficient γ
              (a r))
      (hdegree :
         (γ : FABL.F₂Cube d),
          (p γ).natDegree  D) :
      (FABL.fieldPairingDensity hℓ a).IsBiased
        (D / 2 ^ )
    Shared root-bound combinator: polynomial nonvanishing, an evaluation identity, and a uniform
    degree bound imply the corresponding density bias bound. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    theorem FABL.dyadicFieldRatio_eq_invPow { t : } (htℓ : t  ) :
      (2 ^ ( - t)) / 2 ^  = 2⁻¹ ^ t
    theorem FABL.dyadicFieldRatio_eq_invPow { t : }
      (htℓ : t  ) :
      (2 ^ ( - t)) / 2 ^  = 2⁻¹ ^ t
    A dyadic numerator divided by the extension-field cardinality is an exact inverse power of
    two.  The side condition prevents truncated natural subtraction from changing the parameter. 
  • defdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    def FABL.shiftedSmallBiasFieldFamily { : } (n : )
      (r : FABL.BinaryExtensionField ) :
      Fin n  FABL.BinaryExtensionField 
    def FABL.shiftedSmallBiasFieldFamily { : }
      (n : )
      (r : FABL.BinaryExtensionField ) :
      Fin n  FABL.BinaryExtensionField 
    The shifted field family `1,r,…,r^(n-1)`. 
  • defdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    def FABL.shiftedSmallBiasPolynomial {n : } ( : ) (γ : FABL.F₂Cube n) :
      Polynomial (FABL.BinaryExtensionField )
    def FABL.shiftedSmallBiasPolynomial {n : }
      ( : ) (γ : FABL.F₂Cube n) :
      Polynomial (FABL.BinaryExtensionField )
    The shifted associated polynomial `∑ i, γᵢ X^i`. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    theorem FABL.shiftedSmallBiasPolynomial_eval {n  : } (γ : FABL.F₂Cube n)
      (r : FABL.BinaryExtensionField ) :
      Polynomial.eval r (FABL.shiftedSmallBiasPolynomial  γ) =
        FABL.fieldPairingCoefficient γ
          (FABL.shiftedSmallBiasFieldFamily n r)
    theorem FABL.shiftedSmallBiasPolynomial_eval
      {n  : } (γ : FABL.F₂Cube n)
      (r : FABL.BinaryExtensionField ) :
      Polynomial.eval r
          (FABL.shiftedSmallBiasPolynomial 
            γ) =
        FABL.fieldPairingCoefficient γ
          (FABL.shiftedSmallBiasFieldFamily n
            r)
    Evaluation of the shifted polynomial is the field coefficient selected from
    `1,r,…,r^(n-1)`. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    theorem FABL.shiftedSmallBiasPolynomial_ne_zero {n  : } {γ : FABL.F₂Cube n}
      ( : γ  0) : FABL.shiftedSmallBiasPolynomial  γ  0
    theorem FABL.shiftedSmallBiasPolynomial_ne_zero
      {n  : } {γ : FABL.F₂Cube n}
      ( : γ  0) :
      FABL.shiftedSmallBiasPolynomial  γ  0
    A nonzero frequency gives a nonzero shifted associated polynomial. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    theorem FABL.shiftedSmallBiasPolynomial_natDegree_le {n  : }
      (γ : FABL.F₂Cube n) :
      (FABL.shiftedSmallBiasPolynomial  γ).natDegree  n - 1
    theorem FABL.shiftedSmallBiasPolynomial_natDegree_le
      {n  : } (γ : FABL.F₂Cube n) :
      (FABL.shiftedSmallBiasPolynomial 
            γ).natDegree 
        n - 1
    Starting the exponents at zero lowers the associated polynomial degree to at most `n-1`. 
  • defdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    def FABL.shiftedSmallBiasGenerator (n : ) { : } (hℓ :   0)
      (r s : FABL.BinaryExtensionField ) : FABL.F₂Cube n
    def FABL.shiftedSmallBiasGenerator (n : )
      { : } (hℓ :   0)
      (r s : FABL.BinaryExtensionField ) :
      FABL.F₂Cube n
    The shifted generator uses the powers `1,r,…,r^(n-1)`. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    theorem FABL.shiftedSmallBiasGenerator_characterExpectation_eq_rootProbability
      {n  : } (hℓ :   0) {γ : FABL.F₂Cube n} ( : γ  0) :
      (Finset.univ.expect fun rs =>
          (FABL.vectorWalshCharacter γ)
            (FABL.shiftedSmallBiasGenerator n hℓ rs.1 rs.2)) =
        ((FABL.shiftedSmallBiasPolynomial  γ).rootSet
                (FABL.BinaryExtensionField )).ncard /
          2 ^ 
    theorem FABL.shiftedSmallBiasGenerator_characterExpectation_eq_rootProbability
      {n  : } (hℓ :   0)
      {γ : FABL.F₂Cube n} ( : γ  0) :
      (Finset.univ.expect fun rs =>
          (FABL.vectorWalshCharacter γ)
            (FABL.shiftedSmallBiasGenerator n
              hℓ rs.1 rs.2)) =
        ((FABL.shiftedSmallBiasPolynomial 
                    γ).rootSet
                (FABL.BinaryExtensionField
                  )).ncard /
          2 ^ 
    Exercise 6.23(a): every nonzero shifted-generator character has expectation equal to the
    uniform root probability of its degree-at-most-`n-1` polynomial. 
  • defdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    def FABL.shiftedSmallBiasGeneratorDensity (n : ) { : } (hℓ :   0) :
      FABL.ProbabilityDensity n
    def FABL.shiftedSmallBiasGeneratorDensity
      (n : ) { : } (hℓ :   0) :
      FABL.ProbabilityDensity n
    The density induced by the shifted two-seed generator. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    theorem FABL.shiftedSmallBiasGeneratorDensity_isBiased {n  : } (hℓ :   0) :
      (FABL.shiftedSmallBiasGeneratorDensity n hℓ).IsBiased
        ((n - 1) / 2 ^ )
    theorem FABL.shiftedSmallBiasGeneratorDensity_isBiased
      {n  : } (hℓ :   0) :
      (FABL.shiftedSmallBiasGeneratorDensity n
            hℓ).IsBiased
        ((n - 1) / 2 ^ )
    Exercise 6.23(a): shifting the powers improves the general bias bound from
    `n / 2^ℓ` to `(n-1) / 2^ℓ`. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    theorem FABL.shiftedSmallBias_dyadicParameter {n  t : } (htℓ : t  )
      (hdyadic : n = 2 ^ ( - t)) : (n - 1) / 2 ^  = 2⁻¹ ^ t - 2⁻¹ ^ 
    theorem FABL.shiftedSmallBias_dyadicParameter
      {n  t : } (htℓ : t  )
      (hdyadic : n = 2 ^ ( - t)) :
      (n - 1) / 2 ^  = 2⁻¹ ^ t - 2⁻¹ ^ 
    Under the dyadic relation `n=2^(ℓ-t)`, the shifted root bound is exactly
    `2⁻ᵗ-2⁻ˡ`. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    theorem FABL.shiftedSmallBiasGeneratorDensity_isBiased_dyadic {n  t : }
      (hℓ :   0) (htℓ : t  ) (hdyadic : n = 2 ^ ( - t)) :
      (FABL.shiftedSmallBiasGeneratorDensity n hℓ).IsBiased
        (2⁻¹ ^ t - 2⁻¹ ^ )
    theorem FABL.shiftedSmallBiasGeneratorDensity_isBiased_dyadic
      {n  t : } (hℓ :   0) (htℓ : t  )
      (hdyadic : n = 2 ^ ( - t)) :
      (FABL.shiftedSmallBiasGeneratorDensity n
            hℓ).IsBiased
        (2⁻¹ ^ t - 2⁻¹ ^ )
    Exercise 6.23(a), exact dyadic form: the shifted construction is
    `(2⁻ᵗ-2⁻ˡ)`-biased. 
  • defdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    def FABL.binaryExtensionBasisVector { : } (hℓ :   0) (j : Fin ) :
      FABL.BinaryExtensionField 
    def FABL.binaryExtensionBasisVector { : }
      (hℓ :   0) (j : Fin ) :
      FABL.BinaryExtensionField 
    The `j`th extension-field basis vector, defined through the inverse coordinate equivalence
    used by `binaryExtensionEncode`. 
  • defdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    def FABL.basisExpandedGroupedCoefficient {n  : } (hℓ :   0)
      (γ : FABL.F₂Cube (n * )) (i : Fin n) : FABL.BinaryExtensionField 
    def FABL.basisExpandedGroupedCoefficient
      {n  : } (hℓ :   0)
      (γ : FABL.F₂Cube (n * )) (i : Fin n) :
      FABL.BinaryExtensionField 
    Group the `ℓ` flattened binary coefficients in block `i` into one extension-field
    coefficient via the inverse coordinate equivalence. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    theorem FABL.basisExpandedGroupedCoefficient_eq_sum {n  : } (hℓ :   0)
      (γ : FABL.F₂Cube (n * )) (i : Fin n) :
      FABL.basisExpandedGroupedCoefficient hℓ γ i =
         j,
          γ (finProdFinEquiv (i, j))  FABL.binaryExtensionBasisVector hℓ j
    theorem FABL.basisExpandedGroupedCoefficient_eq_sum
      {n  : } (hℓ :   0)
      (γ : FABL.F₂Cube (n * )) (i : Fin n) :
      FABL.basisExpandedGroupedCoefficient hℓ
          γ i =
         j,
          γ (finProdFinEquiv (i, j)) 
            FABL.binaryExtensionBasisVector hℓ
              j
    The grouped coefficient is the linear combination of the basis vectors with the flattened
    binary block as coefficients. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    theorem FABL.exists_basisExpandedGroupedCoefficient_ne_zero {n  : }
      (hℓ :   0) {γ : FABL.F₂Cube (n * )} ( : γ  0) :
       i, FABL.basisExpandedGroupedCoefficient hℓ γ i  0
    theorem FABL.exists_basisExpandedGroupedCoefficient_ne_zero
      {n  : } (hℓ :   0)
      {γ : FABL.F₂Cube (n * )} ( : γ  0) :
       i,
        FABL.basisExpandedGroupedCoefficient
            hℓ γ i 
          0
    A nonzero flattened frequency has a nonzero grouped extension-field coefficient in at least
    one block. 
  • defdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    def FABL.basisExpandedSmallBiasFieldFamily (n : ) { : } (hℓ :   0)
      (r : FABL.BinaryExtensionField ) :
      Fin (n * )  FABL.BinaryExtensionField 
    def FABL.basisExpandedSmallBiasFieldFamily
      (n : ) { : } (hℓ :   0)
      (r : FABL.BinaryExtensionField ) :
      Fin (n * ) 
        FABL.BinaryExtensionField 
    The field element paired with the second seed at flattened coordinate `(i,j)` is
    `v_j r^(i+1)`. 
  • defdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    def FABL.basisExpandedSmallBiasPolynomial {n  : } (hℓ :   0)
      (γ : FABL.F₂Cube (n * )) : Polynomial (FABL.BinaryExtensionField )
    def FABL.basisExpandedSmallBiasPolynomial
      {n  : } (hℓ :   0)
      (γ : FABL.F₂Cube (n * )) :
      Polynomial (FABL.BinaryExtensionField )
    The basis-expanded associated polynomial has grouped block coefficients and powers
    `X,…,X^n`. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    theorem FABL.basisExpandedSmallBiasPolynomial_eval {n  : } (hℓ :   0)
      (γ : FABL.F₂Cube (n * )) (r : FABL.BinaryExtensionField ) :
      Polynomial.eval r (FABL.basisExpandedSmallBiasPolynomial hℓ γ) =
        FABL.fieldPairingCoefficient γ
          (FABL.basisExpandedSmallBiasFieldFamily n hℓ r)
    theorem FABL.basisExpandedSmallBiasPolynomial_eval
      {n  : } (hℓ :   0)
      (γ : FABL.F₂Cube (n * ))
      (r : FABL.BinaryExtensionField ) :
      Polynomial.eval r
          (FABL.basisExpandedSmallBiasPolynomial
            hℓ γ) =
        FABL.fieldPairingCoefficient γ
          (FABL.basisExpandedSmallBiasFieldFamily
            n hℓ r)
    Evaluation of the basis-expanded polynomial is the field coefficient selected from the
    flattened family `v_j r^(i+1)`. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    theorem FABL.basisExpandedSmallBiasPolynomial_ne_zero {n  : } (hℓ :   0)
      {γ : FABL.F₂Cube (n * )} ( : γ  0) :
      FABL.basisExpandedSmallBiasPolynomial hℓ γ  0
    theorem FABL.basisExpandedSmallBiasPolynomial_ne_zero
      {n  : } (hℓ :   0)
      {γ : FABL.F₂Cube (n * )} ( : γ  0) :
      FABL.basisExpandedSmallBiasPolynomial hℓ
          γ 
        0
    A nonzero flattened frequency gives a nonzero basis-expanded associated polynomial. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    theorem FABL.basisExpandedSmallBiasPolynomial_natDegree_le {n  : }
      (hℓ :   0) (γ : FABL.F₂Cube (n * )) :
      (FABL.basisExpandedSmallBiasPolynomial hℓ γ).natDegree  n
    theorem FABL.basisExpandedSmallBiasPolynomial_natDegree_le
      {n  : } (hℓ :   0)
      (γ : FABL.F₂Cube (n * )) :
      (FABL.basisExpandedSmallBiasPolynomial
            hℓ γ).natDegree 
        n
    The basis-expanded associated polynomial has degree at most `n`. 
  • defdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    def FABL.basisExpandedSmallBiasGenerator (n : ) { : } (hℓ :   0)
      (r s : FABL.BinaryExtensionField ) : FABL.F₂Cube (n * )
    def FABL.basisExpandedSmallBiasGenerator
      (n : ) { : } (hℓ :   0)
      (r s : FABL.BinaryExtensionField ) :
      FABL.F₂Cube (n * )
    The basis-expanded generator, flattened through `finProdFinEquiv`. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    theorem FABL.basisExpandedSmallBiasGenerator_characterExpectation_eq_rootProbability
      {n  : } (hℓ :   0) {γ : FABL.F₂Cube (n * )} ( : γ  0) :
      (Finset.univ.expect fun rs =>
          (FABL.vectorWalshCharacter γ)
            (FABL.basisExpandedSmallBiasGenerator n hℓ rs.1 rs.2)) =
        ((FABL.basisExpandedSmallBiasPolynomial hℓ γ).rootSet
                (FABL.BinaryExtensionField )).ncard /
          2 ^ 
    theorem FABL.basisExpandedSmallBiasGenerator_characterExpectation_eq_rootProbability
      {n  : } (hℓ :   0)
      {γ : FABL.F₂Cube (n * )} ( : γ  0) :
      (Finset.univ.expect fun rs =>
          (FABL.vectorWalshCharacter γ)
            (FABL.basisExpandedSmallBiasGenerator
              n hℓ rs.1 rs.2)) =
        ((FABL.basisExpandedSmallBiasPolynomial
                    hℓ γ).rootSet
                (FABL.BinaryExtensionField
                  )).ncard /
          2 ^ 
    Exercise 6.23(b): every nonzero flattened character has expectation equal to the uniform root
    probability of its degree-at-most-`n` grouped polynomial. 
  • defdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    def FABL.basisExpandedSmallBiasGeneratorDensity (n : ) { : }
      (hℓ :   0) : FABL.ProbabilityDensity (n * )
    def FABL.basisExpandedSmallBiasGeneratorDensity
      (n : ) { : } (hℓ :   0) :
      FABL.ProbabilityDensity (n * )
    The density on `F₂Cube (n*ℓ)` induced by the basis-expanded two-seed generator. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    theorem FABL.basisExpandedSmallBiasGeneratorDensity_isBiased {n  : }
      (hℓ :   0) :
      (FABL.basisExpandedSmallBiasGeneratorDensity n hℓ).IsBiased
        (n / 2 ^ )
    theorem FABL.basisExpandedSmallBiasGeneratorDensity_isBiased
      {n  : } (hℓ :   0) :
      (FABL.basisExpandedSmallBiasGeneratorDensity
            n hℓ).IsBiased
        (n / 2 ^ )
    Exercise 6.23(b): the basis-expanded density has bias at most `n/2^ℓ`. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    theorem FABL.basisExpandedSmallBias_dyadicParameter {n  t : } (htℓ : t  )
      (hdyadic : n = 2 ^ ( - t)) : n / 2 ^  = 2⁻¹ ^ t
    theorem FABL.basisExpandedSmallBias_dyadicParameter
      {n  t : } (htℓ : t  )
      (hdyadic : n = 2 ^ ( - t)) :
      n / 2 ^  = 2⁻¹ ^ t
    Under `n=2^(ℓ-t)`, the basis-expanded root bound is exactly `2⁻ᵗ`. 
  • theoremdefined in FABL/Chapter06/Constructions/SmallBiasVariants.lean
    complete
    theorem FABL.basisExpandedSmallBiasGeneratorDensity_isBiased_dyadic {n  t : }
      (hℓ :   0) (htℓ : t  ) (hdyadic : n = 2 ^ ( - t)) :
      (FABL.basisExpandedSmallBiasGeneratorDensity n hℓ).IsBiased (2⁻¹ ^ t)
    theorem FABL.basisExpandedSmallBiasGeneratorDensity_isBiased_dyadic
      {n  t : } (hℓ :   0) (htℓ : t  )
      (hdyadic : n = 2 ^ ( - t)) :
      (FABL.basisExpandedSmallBiasGeneratorDensity
            n hℓ).IsBiased
        (2⁻¹ ^ t)
    Exercise 6.23(b), dyadic form: the density on `F₂Cube (n*ℓ)` is `2⁻ᵗ`-biased. 
Lemma6.6.19
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Proposition 6.1.1
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 6.24. Fix \epsilon\in(0,1) and n\in\mathbb N. Form a random multiset A\subseteq\mathbb F_2^n by drawing \left\lceil\frac{Cn}{\epsilon^2}\right\rceil elements independently and uniformly. If C is a sufficiently large universal constant, prove that A is \epsilon-biased except with probability at most 2^{-n}.

Lean code for Lemma6.6.1914 declarations
  • defdefined in FABL/Chapter06/Constructions/RandomSmallBias.lean
    complete
    def FABL.randomSmallBiasConstant : 
    def FABL.randomSmallBiasConstant : 
    The explicit universal constant used in Exercise 6.24. 
  • defdefined in FABL/Chapter06/Constructions/RandomSmallBias.lean
    complete
    def FABL.randomSmallBiasSampleCount (n : ) (ε : ) : 
    def FABL.randomSmallBiasSampleCount (n : )
      (ε : ) : 
    The number of independent uniform points drawn in Exercise 6.24. 
  • theoremdefined in FABL/Chapter06/Constructions/RandomSmallBias.lean
    complete
    theorem FABL.randomSmallBiasSampleCount_pos {n : } {ε : } (hn : 0 < n)
      ( : 0 < ε) : 0 < FABL.randomSmallBiasSampleCount n ε
    theorem FABL.randomSmallBiasSampleCount_pos
      {n : } {ε : } (hn : 0 < n)
      ( : 0 < ε) :
      0 < FABL.randomSmallBiasSampleCount n ε
    Positive dimension and positive accuracy give a nonempty sample. 
  • defdefined in FABL/Chapter06/Constructions/RandomSmallBias.lean
    complete
    def FABL.randomSmallBiasMultiset {n m : }
      (samples : Fin m  FABL.F₂Cube n) : Multiset (FABL.F₂Cube n)
    def FABL.randomSmallBiasMultiset {n m : }
      (samples : Fin m  FABL.F₂Cube n) :
      Multiset (FABL.F₂Cube n)
    The multiset represented by an indexed sample, retaining repeated points. 
  • defdefined in FABL/Chapter06/Constructions/RandomSmallBias.lean
    complete
    def FABL.IsSmallBiasedSample {n m : } (samples : Fin m  FABL.F₂Cube n)
      (ε : ) : Prop
    def FABL.IsSmallBiasedSample {n m : }
      (samples : Fin m  FABL.F₂Cube n)
      (ε : ) : Prop
    The direct character condition for a finite indexed sample.  This remains meaningful for the
    empty zero-dimensional multiset, where there are no nonzero frequencies. 
  • theoremdefined in FABL/Chapter06/Constructions/RandomSmallBias.lean
    complete
    theorem FABL.isSmallBiasedSample_zero {m : } (samples : Fin m  FABL.F₂Cube 0)
      (ε : ) : FABL.IsSmallBiasedSample samples ε
    theorem FABL.isSmallBiasedSample_zero {m : }
      (samples : Fin m  FABL.F₂Cube 0)
      (ε : ) :
      FABL.IsSmallBiasedSample samples ε
    Every zero-dimensional sample satisfies the character condition, including the empty one. 
  • defdefined in FABL/Chapter06/Constructions/RandomSmallBias.lean
    complete
    def FABL.randomSmallBiasDensity {n m : } (hm : 0 < m)
      (samples : Fin m  FABL.F₂Cube n) : FABL.ProbabilityDensity n
    def FABL.randomSmallBiasDensity {n m : }
      (hm : 0 < m)
      (samples : Fin m  FABL.F₂Cube n) :
      FABL.ProbabilityDensity n
    The probability density obtained by choosing an index of a nonempty sample uniformly. 
  • theoremdefined in FABL/Chapter06/Constructions/RandomSmallBias.lean
    complete
    theorem FABL.vectorFourierCoeff_randomSmallBiasDensity {n m : } (hm : 0 < m)
      (samples : Fin m  FABL.F₂Cube n) (γ : FABL.F₂Cube n) :
      FABL.vectorFourierCoeff (FABL.randomSmallBiasDensity hm samples).toFun
          γ =
        FABL.finiteUniformEmpiricalMean (⇑(FABL.vectorWalshCharacter γ))
          samples
    theorem FABL.vectorFourierCoeff_randomSmallBiasDensity
      {n m : } (hm : 0 < m)
      (samples : Fin m  FABL.F₂Cube n)
      (γ : FABL.F₂Cube n) :
      FABL.vectorFourierCoeff
          (FABL.randomSmallBiasDensity hm
              samples).toFun
          γ =
        FABL.finiteUniformEmpiricalMean
          (⇑(FABL.vectorWalshCharacter γ))
          samples
    A coefficient of the empirical density is the corresponding empirical character mean. 
  • theoremdefined in FABL/Chapter06/Constructions/RandomSmallBias.lean
    complete
    theorem FABL.randomSmallBiasDensity_isBiased_iff {n m : } (hm : 0 < m)
      (samples : Fin m  FABL.F₂Cube n) (ε : ) :
      (FABL.randomSmallBiasDensity hm samples).IsBiased ε 
        FABL.IsSmallBiasedSample samples ε
    theorem FABL.randomSmallBiasDensity_isBiased_iff
      {n m : } (hm : 0 < m)
      (samples : Fin m  FABL.F₂Cube n)
      (ε : ) :
      (FABL.randomSmallBiasDensity hm
              samples).IsBiased
          ε 
        FABL.IsSmallBiasedSample samples ε
    For a nonempty sample, the direct character condition is exactly density small bias. 
  • defdefined in FABL/Chapter06/Constructions/RandomSmallBias.lean
    complete
    def FABL.randomSmallBiasFrequencyBadSet (n : ) (ε : )
      (γ : FABL.F₂Cube n) :
      Set (Fin (FABL.randomSmallBiasSampleCount n ε)  FABL.F₂Cube n)
    def FABL.randomSmallBiasFrequencyBadSet
      (n : ) (ε : ) (γ : FABL.F₂Cube n) :
      Set
        (Fin
            (FABL.randomSmallBiasSampleCount n
              ε) 
          FABL.F₂Cube n)
    The bad event for one frequency.  Including `γ ≠ 0` makes the union range over the
    whole dual cube without changing the mathematical event. 
  • defdefined in FABL/Chapter06/Constructions/RandomSmallBias.lean
    complete
    def FABL.randomSmallBiasFailureSet (n : ) (ε : ) :
      Set (Fin (FABL.randomSmallBiasSampleCount n ε)  FABL.F₂Cube n)
    def FABL.randomSmallBiasFailureSet (n : )
      (ε : ) :
      Set
        (Fin
            (FABL.randomSmallBiasSampleCount n
              ε) 
          FABL.F₂Cube n)
    The failure event for the direct finite-sample bias condition. 
  • theoremdefined in FABL/Chapter06/Constructions/RandomSmallBias.lean
    complete
    theorem FABL.measure_randomSmallBiasFrequencyBadSet_le {n : } {ε : }
      (hn : 0 < n) ( : 0 < ε) (γ : FABL.F₂Cube n) :
      (FABL.uniformPMF
                (Fin (FABL.randomSmallBiasSampleCount n ε) 
                  FABL.F₂Cube n)).toMeasure.real
          (FABL.randomSmallBiasFrequencyBadSet n ε γ) 
        2 * Real.exp (-(4 * n))
    theorem FABL.measure_randomSmallBiasFrequencyBadSet_le
      {n : } {ε : } (hn : 0 < n)
      ( : 0 < ε) (γ : FABL.F₂Cube n) :
      (FABL.uniformPMF
                (Fin
                    (FABL.randomSmallBiasSampleCount
                      n ε) 
                  FABL.F₂Cube
                    n)).toMeasure.real
          (FABL.randomSmallBiasFrequencyBadSet
            n ε γ) 
        2 * Real.exp (-(4 * n))
    The Hoeffding bound for one nonzero frequency, strengthened using the prescribed sample
    count. 
  • theoremdefined in FABL/Chapter06/Constructions/RandomSmallBias.lean
    complete
    theorem FABL.measure_randomSmallBiasSample_not_isBiased_le (n : ) {ε : }
      ( : 0 < ε) (_hε_one : ε < 1) :
      (FABL.uniformPMF
                (Fin (FABL.randomSmallBiasSampleCount n ε) 
                  FABL.F₂Cube n)).toMeasure.real
          (FABL.randomSmallBiasFailureSet n ε) 
        2 ^ (-n)
    theorem FABL.measure_randomSmallBiasSample_not_isBiased_le
      (n : ) {ε : } ( : 0 < ε)
      (_hε_one : ε < 1) :
      (FABL.uniformPMF
                (Fin
                    (FABL.randomSmallBiasSampleCount
                      n ε) 
                  FABL.F₂Cube
                    n)).toMeasure.real
          (FABL.randomSmallBiasFailureSet n
            ε) 
        2 ^ (-n)
    O'Donnell, Exercise 6.24: for all dimensions, including `n = 0`, the random indexed
    multiset fails the direct `ε`-bias condition with probability at most `2⁻ⁿ`. 
  • theoremdefined in FABL/Chapter06/Constructions/RandomSmallBias.lean
    complete
    theorem FABL.measure_randomSmallBiasDensity_not_isBiased_le (n : ) {ε : }
      (hn : 0 < n) ( : 0 < ε) (hε_one : ε < 1) :
      (FABL.uniformPMF
                (Fin (FABL.randomSmallBiasSampleCount n ε) 
                  FABL.F₂Cube n)).toMeasure.real
          {samples | ¬(FABL.randomSmallBiasDensity  samples).IsBiased ε} 
        2 ^ (-n)
    theorem FABL.measure_randomSmallBiasDensity_not_isBiased_le
      (n : ) {ε : } (hn : 0 < n)
      ( : 0 < ε) (hε_one : ε < 1) :
      (FABL.uniformPMF
                (Fin
                    (FABL.randomSmallBiasSampleCount
                      n ε) 
                  FABL.F₂Cube
                    n)).toMeasure.real
          {samples |
            ¬(FABL.randomSmallBiasDensity 
                    samples).IsBiased
                ε} 
        2 ^ (-n)
    The positive-dimensional density form of Exercise 6.24, with the exact
    `ProbabilityDensity.IsBiased ε` conclusion. 
Lemma6.6.20
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Lemma 1.3.5
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 6.25 (verifying matrix multiplication). Given A,B,C'\in\mathbb F_2^{n\times n}, test whether C'=AB.

(a) Give an O(n^2)-time algorithm using exactly n random bits which accepts with probability 1 if C'=AB and with probability at most 1/2 if C'\ne AB. The test compares C'x and ABx for uniform x\in\mathbb F_2^n.

(b) Replace the uniform x by the output of the construction in Theorem 6.30. Reduce the random-bit cost to O(\log n), retain O(n^2) running time, preserve perfect completeness, and make the soundness error at most 2/3.

Lean code for Lemma6.6.2060 declarations
  • defdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    def FABL.matrixProductVerificationPredicate {n : }
      (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂) (x : FABL.F₂Cube n) : Prop
    def FABL.matrixProductVerificationPredicate
      {n : }
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (x : FABL.F₂Cube n) : Prop
    The pure Freivalds predicate over the binary field. 
  • defdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    def FABL.matrixProductVerificationPredicate_decidable {n : }
      (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂) (x : FABL.F₂Cube n) :
      Decidable (FABL.matrixProductVerificationPredicate A B C' x)
    def FABL.matrixProductVerificationPredicate_decidable
      {n : }
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (x : FABL.F₂Cube n) :
      Decidable
        (FABL.matrixProductVerificationPredicate
          A B C' x)
  • defdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    def FABL.matrixProductVerificationDecision {n : }
      (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂) (x : FABL.F₂Cube n) : Bool
    def FABL.matrixProductVerificationDecision
      {n : }
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (x : FABL.F₂Cube n) : Bool
    The executable Boolean decision associated with the pure predicate. 
  • defdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    def FABL.matrixProductDifference {n : }
      (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂) :
      Matrix (Fin n) (Fin n) FABL.𝔽₂
    def FABL.matrixProductDifference {n : }
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂) :
      Matrix (Fin n) (Fin n) FABL.𝔽₂
    The matrix whose kernel is tested by the verifier. 
  • defdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    def FABL.matrixProductDifferenceRow {n : }
      (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂) (i : Fin n) : FABL.F₂Cube n
    def FABL.matrixProductDifferenceRow {n : }
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (i : Fin n) : FABL.F₂Cube n
    One row of the matrix-product difference, viewed as a binary frequency. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.matrixProductVerificationPredicate_iff_difference_mulVec_eq_zero
      {n : } (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (x : FABL.F₂Cube n) :
      FABL.matrixProductVerificationPredicate A B C' x 
        (FABL.matrixProductDifference A B C').mulVec x = 0
    theorem FABL.matrixProductVerificationPredicate_iff_difference_mulVec_eq_zero
      {n : }
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (x : FABL.F₂Cube n) :
      FABL.matrixProductVerificationPredicate
          A B C' x 
        (FABL.matrixProductDifference A B
                C').mulVec
            x =
          0
    The verification predicate is exactly membership in the kernel of the
    matrix-product difference. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.matrixProductVerificationDecision_eq_true_iff {n : }
      (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂) (x : FABL.F₂Cube n) :
      FABL.matrixProductVerificationDecision A B C' x = true 
        (FABL.matrixProductDifference A B C').mulVec x = 0
    theorem FABL.matrixProductVerificationDecision_eq_true_iff
      {n : }
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (x : FABL.F₂Cube n) :
      FABL.matrixProductVerificationDecision A
            B C' x =
          true 
        (FABL.matrixProductDifference A B
                C').mulVec
            x =
          0
    Boolean acceptance is the same kernel predicate. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.matrixProductVerificationPredicate_of_eq {n : }
      (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂) (hproduct : C' = A * B)
      (x : FABL.F₂Cube n) : FABL.matrixProductVerificationPredicate A B C' x
    theorem FABL.matrixProductVerificationPredicate_of_eq
      {n : }
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (hproduct : C' = A * B)
      (x : FABL.F₂Cube n) :
      FABL.matrixProductVerificationPredicate
        A B C' x
    Correct matrix products satisfy the verification predicate for every
    input. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.exists_matrixProductDifferenceRow_ne_zero {n : }
      (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂) (hproduct : C'  A * B) :
       i, FABL.matrixProductDifferenceRow A B C' i  0
    theorem FABL.exists_matrixProductDifferenceRow_ne_zero
      {n : }
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (hproduct : C'  A * B) :
       i,
        FABL.matrixProductDifferenceRow A B C'
            i 
          0
    A false product has a nonzero row in its difference matrix. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.f₂DotProduct_matrixProductDifferenceRow {n : }
      (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂) (i : Fin n)
      (x : FABL.F₂Cube n) :
      FABL.f₂DotProduct (FABL.matrixProductDifferenceRow A B C' i) x =
        (FABL.matrixProductDifference A B C').mulVec x i
    theorem FABL.f₂DotProduct_matrixProductDifferenceRow
      {n : }
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (i : Fin n) (x : FABL.F₂Cube n) :
      FABL.f₂DotProduct
          (FABL.matrixProductDifferenceRow A B
            C' i)
          x =
        (FABL.matrixProductDifference A B
              C').mulVec
          x i
    A difference-row dot product is the corresponding coordinate of the
    difference matrix-vector product. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.matrixProductVerificationPredicate_imp_row_dot_eq_zero {n : }
      (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂) (x : FABL.F₂Cube n)
      (i : Fin n)
      (haccepts : FABL.matrixProductVerificationPredicate A B C' x) :
      FABL.f₂DotProduct (FABL.matrixProductDifferenceRow A B C' i) x = 0
    theorem FABL.matrixProductVerificationPredicate_imp_row_dot_eq_zero
      {n : }
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (x : FABL.F₂Cube n) (i : Fin n)
      (haccepts :
        FABL.matrixProductVerificationPredicate
          A B C' x) :
      FABL.f₂DotProduct
          (FABL.matrixProductDifferenceRow A B
            C' i)
          x =
        0
    Acceptance forces every selected difference row to have zero dot product
    with the sampled vector. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.f₂ZeroIndicator_eq (b : FABL.𝔽₂) :
      (if b = 0 then 1 else 0) = (1 + FABL.binarySign b) / 2
    theorem FABL.f₂ZeroIndicator_eq (b : FABL.𝔽₂) :
      (if b = 0 then 1 else 0) =
        (1 + FABL.binarySign b) / 2
    The indicator of zero in `𝔽₂` is the affine transform of its nontrivial
    sign character. 
  • defdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    def FABL.matrixProductVerificationAcceptanceProbability {n : }
      (φ : FABL.ProbabilityDensity n)
      (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂) : 
    def FABL.matrixProductVerificationAcceptanceProbability
      {n : } (φ : FABL.ProbabilityDensity n)
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂) :
      
    Acceptance probability under an arbitrary binary-cube density. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.matrixProductRowZeroProbability_eq {n : }
      (φ : FABL.ProbabilityDensity n) (γ : FABL.F₂Cube n) :
      (φ.expectation fun x => if FABL.f₂DotProduct γ x = 0 then 1 else 0) =
        (1 + φ.expectation fun x => (FABL.vectorWalshCharacter γ) x) / 2
    theorem FABL.matrixProductRowZeroProbability_eq
      {n : } (φ : FABL.ProbabilityDensity n)
      (γ : FABL.F₂Cube n) :
      (φ.expectation fun x =>
          if FABL.f₂DotProduct γ x = 0 then 1
          else 0) =
        (1 +
            φ.expectation fun x =>
              (FABL.vectorWalshCharacter γ)
                x) /
          2
    The probability that one frequency has zero dot product is controlled by
    its Walsh expectation. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.ProbabilityDensity.IsBiased.rowZeroProbability_le {n : }
      {φ : FABL.ProbabilityDensity n} {ε : } (hbiased : φ.IsBiased ε)
      (γ : FABL.F₂Cube n) ( : γ  0) :
      (φ.expectation fun x => if FABL.f₂DotProduct γ x = 0 then 1 else 0) 
        (1 + ε) / 2
    theorem FABL.ProbabilityDensity.IsBiased.rowZeroProbability_le
      {n : } {φ : FABL.ProbabilityDensity n}
      {ε : } (hbiased : φ.IsBiased ε)
      (γ : FABL.F₂Cube n) ( : γ  0) :
      (φ.expectation fun x =>
          if FABL.f₂DotProduct γ x = 0 then 1
          else 0) 
        (1 + ε) / 2
    Small bias bounds the probability that a nonzero frequency has zero dot
    product. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.matrixProductVerificationAcceptanceProbability_eq_one_of_eq {n : }
      (φ : FABL.ProbabilityDensity n)
      (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂) (hproduct : C' = A * B) :
      FABL.matrixProductVerificationAcceptanceProbability φ A B C' = 1
    theorem FABL.matrixProductVerificationAcceptanceProbability_eq_one_of_eq
      {n : } (φ : FABL.ProbabilityDensity n)
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (hproduct : C' = A * B) :
      FABL.matrixProductVerificationAcceptanceProbability
          φ A B C' =
        1
    Every density gives perfect completeness when the claimed matrix product
    is correct. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.matrixProductVerificationAcceptanceProbability_le {n : }
      {φ : FABL.ProbabilityDensity n} {ε : } (hbiased : φ.IsBiased ε)
      (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂) (hproduct : C'  A * B) :
      FABL.matrixProductVerificationAcceptanceProbability φ A B C' 
        (1 + ε) / 2
    theorem FABL.matrixProductVerificationAcceptanceProbability_le
      {n : } {φ : FABL.ProbabilityDensity n}
      {ε : } (hbiased : φ.IsBiased ε)
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (hproduct : C'  A * B) :
      FABL.matrixProductVerificationAcceptanceProbability
          φ A B C' 
        (1 + ε) / 2
    If the claimed product is false, an `ε`-biased input distribution has
    soundness at most `(1+ε)/2`. 
  • defdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    def FABL.matrixProductVerificationLocalWork (n : ) : 
    def FABL.matrixProductVerificationLocalWork
      (n : ) : 
    The visible matrix-verification work after the seed has supplied `x`:
    three dense matrix-vector products, their binary additions, and one vector
    comparison. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.matrixProductVerificationLocalWork_le (n : ) :
      FABL.matrixProductVerificationLocalWork n  11 * (n + 1) ^ 2
    theorem FABL.matrixProductVerificationLocalWork_le
      (n : ) :
      FABL.matrixProductVerificationLocalWork
          n 
        11 * (n + 1) ^ 2
    The local verifier work has an explicit quadratic envelope. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.matrixProductVerificationLocalWork_isBigO :
      (fun n =>
          (FABL.matrixProductVerificationLocalWork n)) =O[Filter.atTop]
        fun n => ((n + 1) ^ 2)
    theorem FABL.matrixProductVerificationLocalWork_isBigO :
      (fun n =>
          (FABL.matrixProductVerificationLocalWork
              n)) =O[Filter.atTop]
        fun n => ((n + 1) ^ 2)
    The verifier's local work is `O(n²)`. 
  • defdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    def FABL.matrixProductVerificationCost (n r : ) : FABL.LearningCost
    def FABL.matrixProductVerificationCost
      (n r : ) : FABL.LearningCost
    Exact cost of drawing `r` unbiased seed bits and running the local
    verifier. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.matrixProductVerificationCost_eq (n r : ) :
      { randomExamples := 0, queries := 0, work := r } +
          { randomExamples := 0, queries := 0,
            work := FABL.matrixProductVerificationLocalWork n } =
        FABL.matrixProductVerificationCost n r
    theorem FABL.matrixProductVerificationCost_eq
      (n r : ) :
      { randomExamples := 0, queries := 0,
            work := r } +
          { randomExamples := 0, queries := 0,
            work :=
              FABL.matrixProductVerificationLocalWork
                n } =
        FABL.matrixProductVerificationCost n r
    The two visible cost stages add to the displayed exact cost. 
  • defdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    def FABL.seededMatrixProductVerificationResult {n r : }
      (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (seed : (Fin r  Bool)  FABL.F₂Cube n) (bits : Fin r  Bool) : Bool
    def FABL.seededMatrixProductVerificationResult
      {n r : }
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (seed : (Fin r  Bool)  FABL.F₂Cube n)
      (bits : Fin r  Bool) : Bool
    The deterministic result selected by an arbitrary seed evaluator. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.seededMatrixProductVerificationResult_eq_true_iff {n r : }
      (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (seed : (Fin r  Bool)  FABL.F₂Cube n) (bits : Fin r  Bool) :
      FABL.seededMatrixProductVerificationResult A B C' seed bits = true 
        FABL.matrixProductVerificationPredicate A B C' (seed bits)
    theorem FABL.seededMatrixProductVerificationResult_eq_true_iff
      {n r : }
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (seed : (Fin r  Bool)  FABL.F₂Cube n)
      (bits : Fin r  Bool) :
      FABL.seededMatrixProductVerificationResult
            A B C' seed bits =
          true 
        FABL.matrixProductVerificationPredicate
          A B C' (seed bits)
    The returned Boolean is true exactly when the sampled seed output passes
    the pure predicate. 
  • defdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    def FABL.seededMatrixProductVerificationProgram {n r : }
      (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (seed : (Fin r  Bool)  FABL.F₂Cube n) :
      FABL.LearningProgram n FABL.LearningAccess.queries Bool
    def FABL.seededMatrixProductVerificationProgram
      {n r : }
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (seed :
        (Fin r  Bool)  FABL.F₂Cube n) :
      FABL.LearningProgram n
        FABL.LearningAccess.queries Bool
    The generic finite-seed verifier.  Every random bit is a visible `.coin`
    constructor supplied by `randomBitVectorProgram`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.runWithCost_seededMatrixProductVerificationAfterSeed {n r : }
      (target : FABL.BooleanFunction n)
      (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (seed : (Fin r  Bool)  FABL.F₂Cube n) (bits : Fin r  Bool) :
      FABL.LearningProgram.runWithCost target
          (FABL.LearningProgram.tick
            (FABL.matrixProductVerificationLocalWork n)
            (FABL.LearningProgram.pure
              (FABL.seededMatrixProductVerificationResult A B C' seed
                bits))) =
        PMF.pure
          (FABL.seededMatrixProductVerificationResult A B C' seed bits,
            { randomExamples := 0, queries := 0,
              work := FABL.matrixProductVerificationLocalWork n })
    theorem FABL.runWithCost_seededMatrixProductVerificationAfterSeed
      {n r : }
      (target : FABL.BooleanFunction n)
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (seed : (Fin r  Bool)  FABL.F₂Cube n)
      (bits : Fin r  Bool) :
      FABL.LearningProgram.runWithCost target
          (FABL.LearningProgram.tick
            (FABL.matrixProductVerificationLocalWork
              n)
            (FABL.LearningProgram.pure
              (FABL.seededMatrixProductVerificationResult
                A B C' seed bits))) =
        PMF.pure
          (FABL.seededMatrixProductVerificationResult
              A B C' seed bits,
            { randomExamples := 0,
              queries := 0,
              work :=
                FABL.matrixProductVerificationLocalWork
                  n })
    The post-seed stage is deterministic and has exactly the local-work
    charge. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.runWithCost_seededMatrixProductVerificationProgram {n r : }
      (target : FABL.BooleanFunction n)
      (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (seed : (Fin r  Bool)  FABL.F₂Cube n) :
      FABL.LearningProgram.runWithCost target
          (FABL.seededMatrixProductVerificationProgram A B C' seed) =
        PMF.map
          (fun bits =>
            (FABL.seededMatrixProductVerificationResult A B C' seed bits,
              FABL.matrixProductVerificationCost n r))
          (FABL.uniformPMF (Fin r  Bool))
    theorem FABL.runWithCost_seededMatrixProductVerificationProgram
      {n r : }
      (target : FABL.BooleanFunction n)
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (seed :
        (Fin r  Bool)  FABL.F₂Cube n) :
      FABL.LearningProgram.runWithCost target
          (FABL.seededMatrixProductVerificationProgram
            A B C' seed) =
        PMF.map
          (fun bits =>
            (FABL.seededMatrixProductVerificationResult
                A B C' seed bits,
              FABL.matrixProductVerificationCost
                n r))
          (FABL.uniformPMF (Fin r  Bool))
    Exact output law and pathwise cost of the arbitrary-seed verifier. 
  • defdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    def FABL.seededMatrixProductVerificationAcceptanceProbability {n r : }
      (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (seed : (Fin r  Bool)  FABL.F₂Cube n) : 
    def FABL.seededMatrixProductVerificationAcceptanceProbability
      {n r : }
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (seed :
        (Fin r  Bool)  FABL.F₂Cube n) :
      
    Acceptance probability of an arbitrary bit-seed evaluator. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.seededMatrixProductVerificationAcceptanceProbability_eq {n r : }
      (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (seed : (Fin r  Bool)  FABL.F₂Cube n) :
      FABL.seededMatrixProductVerificationAcceptanceProbability A B C'
          seed =
        FABL.matrixProductVerificationAcceptanceProbability
          (FABL.ProbabilityDensity.uniformPushforward seed) A B C'
    theorem FABL.seededMatrixProductVerificationAcceptanceProbability_eq
      {n r : }
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (seed :
        (Fin r  Bool)  FABL.F₂Cube n) :
      FABL.seededMatrixProductVerificationAcceptanceProbability
          A B C' seed =
        FABL.matrixProductVerificationAcceptanceProbability
          (FABL.ProbabilityDensity.uniformPushforward
            seed)
          A B C'
    The finite-seed probability is exactly the density probability of the
    uniform pushforward. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.seededMatrixProductVerificationAcceptanceProbability_eq_one_of_eq
      {n r : } (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (seed : (Fin r  Bool)  FABL.F₂Cube n) (hproduct : C' = A * B) :
      FABL.seededMatrixProductVerificationAcceptanceProbability A B C'
          seed =
        1
    theorem FABL.seededMatrixProductVerificationAcceptanceProbability_eq_one_of_eq
      {n r : }
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (seed : (Fin r  Bool)  FABL.F₂Cube n)
      (hproduct : C' = A * B) :
      FABL.seededMatrixProductVerificationAcceptanceProbability
          A B C' seed =
        1
    Every seed evaluator preserves perfect completeness. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.seededMatrixProductVerificationAcceptanceProbability_le {n r : }
      {ε : } (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (seed : (Fin r  Bool)  FABL.F₂Cube n)
      (hbiased :
        (FABL.ProbabilityDensity.uniformPushforward seed).IsBiased ε)
      (hproduct : C'  A * B) :
      FABL.seededMatrixProductVerificationAcceptanceProbability A B C'
          seed 
        (1 + ε) / 2
    theorem FABL.seededMatrixProductVerificationAcceptanceProbability_le
      {n r : } {ε : }
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (seed : (Fin r  Bool)  FABL.F₂Cube n)
      (hbiased :
        (FABL.ProbabilityDensity.uniformPushforward
              seed).IsBiased
          ε)
      (hproduct : C'  A * B) :
      FABL.seededMatrixProductVerificationAcceptanceProbability
          A B C' seed 
        (1 + ε) / 2
    An `ε`-biased seed evaluator has soundness at most `(1+ε)/2`. 
  • defdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    def FABL.matrixProductVerificationProgram {n : }
      (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂) :
      FABL.LearningProgram n FABL.LearningAccess.queries Bool
    def FABL.matrixProductVerificationProgram
      {n : }
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂) :
      FABL.LearningProgram n
        FABL.LearningAccess.queries Bool
    The uniform verifier is the generic seed program instantiated with the
    coordinatewise Bool/`𝔽₂` equivalence. 
  • defdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    def FABL.matrixProductVerificationRandomBits (n : ) : 
    def FABL.matrixProductVerificationRandomBits
      (n : ) : 
    The uniform verifier exposes exactly `n` random bits. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.runWithCost_matrixProductVerificationProgram {n : }
      (target : FABL.BooleanFunction n)
      (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂) :
      FABL.LearningProgram.runWithCost target
          (FABL.matrixProductVerificationProgram A B C') =
        PMF.map
          (fun bits =>
            (FABL.seededMatrixProductVerificationResult A B C'
                (⇑(FABL.boolVectorF₂CubeEquiv n)) bits,
              FABL.matrixProductVerificationCost n
                (FABL.matrixProductVerificationRandomBits n)))
          (FABL.uniformPMF (Fin n  Bool))
    theorem FABL.runWithCost_matrixProductVerificationProgram
      {n : }
      (target : FABL.BooleanFunction n)
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂) :
      FABL.LearningProgram.runWithCost target
          (FABL.matrixProductVerificationProgram
            A B C') =
        PMF.map
          (fun bits =>
            (FABL.seededMatrixProductVerificationResult
                A B C'
                (⇑(FABL.boolVectorF₂CubeEquiv
                    n))
                bits,
              FABL.matrixProductVerificationCost
                n
                (FABL.matrixProductVerificationRandomBits
                  n)))
          (FABL.uniformPMF (Fin n  Bool))
    Exact uniform output law and exact `n`-coin cost. 
  • defdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    def FABL.uniformMatrixProductVerificationAcceptanceProbability {n : }
      (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂) : 
    def FABL.uniformMatrixProductVerificationAcceptanceProbability
      {n : }
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂) :
      
    Uniform-cube acceptance probability. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.seededMatrixProductVerificationAcceptanceProbability_boolVector_eq
      {n : } (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂) :
      FABL.seededMatrixProductVerificationAcceptanceProbability A B C'
          (FABL.boolVectorF₂CubeEquiv n) =
        FABL.uniformMatrixProductVerificationAcceptanceProbability A B C'
    theorem FABL.seededMatrixProductVerificationAcceptanceProbability_boolVector_eq
      {n : }
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂) :
      FABL.seededMatrixProductVerificationAcceptanceProbability
          A B C'
          (FABL.boolVectorF₂CubeEquiv n) =
        FABL.uniformMatrixProductVerificationAcceptanceProbability
          A B C'
    The `n`-coin program induces the uniform-cube acceptance probability. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.uniformPushforward_id_isBiased_zero (n : ) :
      (FABL.ProbabilityDensity.uniformPushforward id).IsBiased 0
    theorem FABL.uniformPushforward_id_isBiased_zero
      (n : ) :
      (FABL.ProbabilityDensity.uniformPushforward
            id).IsBiased
        0
    The uniform cube is `0`-biased, directly by Walsh orthogonality. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.uniformMatrixProductVerificationAcceptanceProbability_eq_one_of_eq
      {n : } (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (hproduct : C' = A * B) :
      FABL.uniformMatrixProductVerificationAcceptanceProbability A B C' = 1
    theorem FABL.uniformMatrixProductVerificationAcceptanceProbability_eq_one_of_eq
      {n : }
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (hproduct : C' = A * B) :
      FABL.uniformMatrixProductVerificationAcceptanceProbability
          A B C' =
        1
    Uniform perfect completeness. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.uniformMatrixProductVerificationAcceptanceProbability_le_half
      {n : } (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (hproduct : C'  A * B) :
      FABL.uniformMatrixProductVerificationAcceptanceProbability A B C' 
        2⁻¹
    theorem FABL.uniformMatrixProductVerificationAcceptanceProbability_le_half
      {n : }
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (hproduct : C'  A * B) :
      FABL.uniformMatrixProductVerificationAcceptanceProbability
          A B C' 
        2⁻¹
    Uniform soundness is at most one half for every false product. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.matrixProductVerificationAlgorithm_spec {n : }
      (target : FABL.BooleanFunction n)
      (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂) :
      FABL.LearningProgram.runWithCost target
            (FABL.matrixProductVerificationProgram A B C') =
          PMF.map
            (fun bits =>
              (FABL.seededMatrixProductVerificationResult A B C'
                  (⇑(FABL.boolVectorF₂CubeEquiv n)) bits,
                FABL.matrixProductVerificationCost n n))
            (FABL.uniformPMF (Fin n  Bool)) 
        (∀ (x : FABL.F₂Cube n),
            FABL.matrixProductVerificationDecision A B C' x = true 
              (FABL.matrixProductDifference A B C').mulVec x = 0) 
          FABL.matrixProductVerificationRandomBits n = n 
            FABL.matrixProductVerificationLocalWork n  11 * (n + 1) ^ 2 
              ((fun n =>
                    (FABL.matrixProductVerificationLocalWork
                        n)) =O[Filter.atTop]
                  fun n => ((n + 1) ^ 2)) 
                (C' = A * B 
                    FABL.uniformMatrixProductVerificationAcceptanceProbability
                        A B C' =
                      1) 
                  (C'  A * B 
                    FABL.uniformMatrixProductVerificationAcceptanceProbability
                        A B C' 
                      2⁻¹)
    theorem FABL.matrixProductVerificationAlgorithm_spec
      {n : }
      (target : FABL.BooleanFunction n)
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂) :
      FABL.LearningProgram.runWithCost target
            (FABL.matrixProductVerificationProgram
              A B C') =
          PMF.map
            (fun bits =>
              (FABL.seededMatrixProductVerificationResult
                  A B C'
                  (⇑(FABL.boolVectorF₂CubeEquiv
                      n))
                  bits,
                FABL.matrixProductVerificationCost
                  n n))
            (FABL.uniformPMF (Fin n  Bool)) 
        (∀ (x : FABL.F₂Cube n),
            FABL.matrixProductVerificationDecision
                  A B C' x =
                true 
              (FABL.matrixProductDifference A
                      B C').mulVec
                  x =
                0) 
          FABL.matrixProductVerificationRandomBits
                n =
              n 
            FABL.matrixProductVerificationLocalWork
                  n 
                11 * (n + 1) ^ 2 
              ((fun n =>
                    (FABL.matrixProductVerificationLocalWork
                        n)) =O[Filter.atTop]
                  fun n => ((n + 1) ^ 2)) 
                (C' = A * B 
                    FABL.uniformMatrixProductVerificationAcceptanceProbability
                        A B C' =
                      1) 
                  (C'  A * B 
                    FABL.uniformMatrixProductVerificationAcceptanceProbability
                        A B C' 
                      2⁻¹)
    Exercise 6.25(a): exact random bits, quadratic local work, perfect
    completeness, and one-half soundness. 
  • defdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    def FABL.boolSmallBiasSeedPairEquiv ( : ) :
      (Fin ( + )  Bool)  FABL.F₂Cube  × FABL.F₂Cube 
    def FABL.boolSmallBiasSeedPairEquiv ( : ) :
      (Fin ( + )  Bool) 
        FABL.F₂Cube  × FABL.F₂Cube 
    Split two equal Bool blocks and convert both blocks to binary field
    coefficient vectors. 
  • defdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    def FABL.matrixProductSmallBiasSeed (input : FABL.SmallBiasInput)
      (bits : Fin (input.fieldDegree + input.fieldDegree)  Bool) :
      FABL.F₂Cube input.n
    def FABL.matrixProductSmallBiasSeed
      (input : FABL.SmallBiasInput)
      (bits :
        Fin
            (input.fieldDegree +
              input.fieldDegree) 
          Bool) :
      FABL.F₂Cube input.n
    The deterministic Theorem 6.30 seed evaluator, computed coordinatewise by
    Exercise 6.22. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.matrixProductSmallBiasSeed_eq_generator
      (input : FABL.SmallBiasInput)
      (bits : Fin (input.fieldDegree + input.fieldDegree)  Bool) :
      FABL.matrixProductSmallBiasSeed input bits =
        have seeds :=
          (FABL.boolSmallBiasSeedPairEquiv input.fieldDegree) bits;
        FABL.executableSmallBiasGenerator input.n 
          (FABL.deterministicSmallBiasAlgorithm
                input).fieldModel.implementation
          seeds.1 seeds.2
    theorem FABL.matrixProductSmallBiasSeed_eq_generator
      (input : FABL.SmallBiasInput)
      (bits :
        Fin
            (input.fieldDegree +
              input.fieldDegree) 
          Bool) :
      FABL.matrixProductSmallBiasSeed input
          bits =
        have seeds :=
          (FABL.boolSmallBiasSeedPairEquiv
              input.fieldDegree)
            bits;
        FABL.executableSmallBiasGenerator
          input.n 
          (FABL.deterministicSmallBiasAlgorithm
                input).fieldModel.implementation
          seeds.1 seeds.2
    The coordinatewise evaluator is extensionally the executable Theorem 6.30
    generator at the same pair of seeds. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.matrixProductSmallBiasSeed_apply_spec (input : FABL.SmallBiasInput)
      (bits : Fin (input.fieldDegree + input.fieldDegree)  Bool)
      (i : Fin input.n) :
      FABL.matrixProductSmallBiasSeed input bits i =
          FABL.executableSmallBiasGenerator input.n 
            (FABL.deterministicSmallBiasAlgorithm
                  input).fieldModel.implementation
            ((FABL.boolSmallBiasSeedPairEquiv input.fieldDegree) bits).1
            ((FABL.boolSmallBiasSeedPairEquiv input.fieldDegree) bits).2 i 
        FABL.executableSmallBiasOutputBitWork input.fieldDegree i 
          16 * (i + 1) * (input.fieldDegree + 1) ^ 2
    theorem FABL.matrixProductSmallBiasSeed_apply_spec
      (input : FABL.SmallBiasInput)
      (bits :
        Fin
            (input.fieldDegree +
              input.fieldDegree) 
          Bool)
      (i : Fin input.n) :
      FABL.matrixProductSmallBiasSeed input
            bits i =
          FABL.executableSmallBiasGenerator
            input.n 
            (FABL.deterministicSmallBiasAlgorithm
                  input).fieldModel.implementation
            ((FABL.boolSmallBiasSeedPairEquiv
                  input.fieldDegree)
                bits).1
            ((FABL.boolSmallBiasSeedPairEquiv
                  input.fieldDegree)
                bits).2
            i 
        FABL.executableSmallBiasOutputBitWork
            input.fieldDegree i 
          16 * (i + 1) *
            (input.fieldDegree + 1) ^ 2
    Each coordinate of the verifier seed uses the Exercise 6.22 evaluator and
    inherits its explicit work bound. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.matrixProductSmallBiasSeed_isBiased (input : FABL.SmallBiasInput) :
      (FABL.ProbabilityDensity.uniformPushforward
            (FABL.matrixProductSmallBiasSeed input)).IsBiased
        input.epsilon
    theorem FABL.matrixProductSmallBiasSeed_isBiased
      (input : FABL.SmallBiasInput) :
      (FABL.ProbabilityDensity.uniformPushforward
            (FABL.matrixProductSmallBiasSeed
              input)).IsBiased
        input.epsilon
    The Bool-seed evaluator induces the same small-bias guarantee as the
    deterministic Theorem 6.30 pair-seed algorithm. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.matrixProductSmallBiasVerification_complete
      (input : FABL.SmallBiasInput)
      (A B C' : Matrix (Fin input.n) (Fin input.n) FABL.𝔽₂)
      (hproduct : C' = A * B) :
      FABL.seededMatrixProductVerificationAcceptanceProbability A B C'
          (FABL.matrixProductSmallBiasSeed input) =
        1
    theorem FABL.matrixProductSmallBiasVerification_complete
      (input : FABL.SmallBiasInput)
      (A B C' :
        Matrix (Fin input.n) (Fin input.n)
          FABL.𝔽₂)
      (hproduct : C' = A * B) :
      FABL.seededMatrixProductVerificationAcceptanceProbability
          A B C'
          (FABL.matrixProductSmallBiasSeed
            input) =
        1
    Perfect completeness for the deterministic small-bias seed program. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.matrixProductSmallBiasVerification_sound
      (input : FABL.SmallBiasInput) (hthird : input.epsilon  3⁻¹)
      (A B C' : Matrix (Fin input.n) (Fin input.n) FABL.𝔽₂)
      (hproduct : C'  A * B) :
      FABL.seededMatrixProductVerificationAcceptanceProbability A B C'
          (FABL.matrixProductSmallBiasSeed input) 
        2 / 3
    theorem FABL.matrixProductSmallBiasVerification_sound
      (input : FABL.SmallBiasInput)
      (hthird : input.epsilon  3⁻¹)
      (A B C' :
        Matrix (Fin input.n) (Fin input.n)
          FABL.𝔽₂)
      (hproduct : C'  A * B) :
      FABL.seededMatrixProductVerificationAcceptanceProbability
          A B C'
          (FABL.matrixProductSmallBiasSeed
            input) 
        2 / 3
    Bias at most one third gives soundness at most two thirds. 
  • defdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    def FABL.matrixProductOneThirdSmallBiasInput (n : ) (hn : 0 < n) :
      FABL.SmallBiasInput
    def FABL.matrixProductOneThirdSmallBiasInput
      (n : ) (hn : 0 < n) :
      FABL.SmallBiasInput
    The fixed one-third-bias finite input used for the logarithmic-randomness
    specialization. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.matrixProductOneThirdSmallBiasInput_epsilon (n : ) (hn : 0 < n) :
      (FABL.matrixProductOneThirdSmallBiasInput n hn).epsilon = 3⁻¹
    theorem FABL.matrixProductOneThirdSmallBiasInput_epsilon
      (n : ) (hn : 0 < n) :
      (FABL.matrixProductOneThirdSmallBiasInput
            n hn).epsilon =
        3⁻¹
    The selected rational bias is exactly one third. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.matrixProductOneThirdSmallBiasInput_scale (n : ) (hn : 0 < n) :
      (FABL.matrixProductOneThirdSmallBiasInput n hn).scale = 3 * n
    theorem FABL.matrixProductOneThirdSmallBiasInput_scale
      (n : ) (hn : 0 < n) :
      (FABL.matrixProductOneThirdSmallBiasInput
            n hn).scale =
        3 * n
    The one-third input has integral construction scale `3n`. 
  • defdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    def FABL.matrixProductSmallBiasDegree (n : ) : 
    def FABL.matrixProductSmallBiasDegree
      (n : ) : 
    Closed field degree for the one-third-bias specialization. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.matrixProductOneThirdSmallBiasInput_fieldDegree (n : )
      (hn : 0 < n) :
      (FABL.matrixProductOneThirdSmallBiasInput n hn).fieldDegree =
        FABL.matrixProductSmallBiasDegree n
    theorem FABL.matrixProductOneThirdSmallBiasInput_fieldDegree
      (n : ) (hn : 0 < n) :
      (FABL.matrixProductOneThirdSmallBiasInput
            n hn).fieldDegree =
        FABL.matrixProductSmallBiasDegree n
    The fixed input selects the closed field degree. 
  • defdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    def FABL.matrixProductSmallBiasRandomBits (n : ) : 
    def FABL.matrixProductSmallBiasRandomBits
      (n : ) : 
    Exact two-field-seed random-bit count. 
  • defdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    def FABL.matrixProductSmallBiasLogScale (n : ) : 
    def FABL.matrixProductSmallBiasLogScale
      (n : ) : 
    Guarded logarithmic comparison scale. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.matrixProductSmallBiasDegree_le (n : ) :
      FABL.matrixProductSmallBiasDegree n  2 + Nat.clog 2 (n + 1)
    theorem FABL.matrixProductSmallBiasDegree_le
      (n : ) :
      FABL.matrixProductSmallBiasDegree n 
        2 + Nat.clog 2 (n + 1)
    The selected one-third-bias field degree is logarithmic in `n`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.matrixProductSmallBiasRandomBits_le (n : ) :
      FABL.matrixProductSmallBiasRandomBits n 
        4 * FABL.matrixProductSmallBiasLogScale n
    theorem FABL.matrixProductSmallBiasRandomBits_le
      (n : ) :
      FABL.matrixProductSmallBiasRandomBits
          n 
        4 *
          FABL.matrixProductSmallBiasLogScale
            n
    The exact seed length has a constant-factor guarded logarithmic bound. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.matrixProductSmallBiasRandomBits_isBigO :
      (fun n => (FABL.matrixProductSmallBiasRandomBits n)) =O[Filter.atTop]
        fun n => (FABL.matrixProductSmallBiasLogScale n)
    theorem FABL.matrixProductSmallBiasRandomBits_isBigO :
      (fun n =>
          (FABL.matrixProductSmallBiasRandomBits
              n)) =O[Filter.atTop]
        fun n =>
        (FABL.matrixProductSmallBiasLogScale
            n)
    The one-third-bias seed length is `O(log n)`. 
  • defdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    def FABL.matrixProductOneThirdSmallBiasVerificationProgram {n : }
      (hn : 0 < n) (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂) :
      FABL.LearningProgram n FABL.LearningAccess.queries Bool
    def FABL.matrixProductOneThirdSmallBiasVerificationProgram
      {n : } (hn : 0 < n)
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂) :
      FABL.LearningProgram n
        FABL.LearningAccess.queries Bool
    The one-third-bias verifier program. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.matrixProductOneThirdSmallBiasRandomBits_eq (n : ) (hn : 0 < n) :
      (FABL.matrixProductOneThirdSmallBiasInput n hn).fieldDegree +
          (FABL.matrixProductOneThirdSmallBiasInput n hn).fieldDegree =
        FABL.matrixProductSmallBiasRandomBits n
    theorem FABL.matrixProductOneThirdSmallBiasRandomBits_eq
      (n : ) (hn : 0 < n) :
      (FABL.matrixProductOneThirdSmallBiasInput
              n hn).fieldDegree +
          (FABL.matrixProductOneThirdSmallBiasInput
              n hn).fieldDegree =
        FABL.matrixProductSmallBiasRandomBits
          n
    The fixed program's visible seed length is the closed logarithmic count. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixProductVerification.lean
    complete
    theorem FABL.matrixProductOneThirdSmallBiasVerificationAlgorithm_spec {n : }
      (hn : 0 < n) (target : FABL.BooleanFunction n)
      (A B C' : Matrix (Fin n) (Fin n) FABL.𝔽₂) :
      let input := FABL.matrixProductOneThirdSmallBiasInput n hn;
      FABL.LearningProgram.runWithCost target
            (FABL.matrixProductOneThirdSmallBiasVerificationProgram hn A B
              C') =
          PMF.map
            (fun bits =>
              (FABL.seededMatrixProductVerificationResult A B C'
                  (FABL.matrixProductSmallBiasSeed input) bits,
                FABL.matrixProductVerificationCost n
                  (input.fieldDegree + input.fieldDegree)))
            (FABL.uniformPMF
              (Fin (input.fieldDegree + input.fieldDegree)  Bool)) 
        input.epsilon = 3⁻¹ 
          (FABL.ProbabilityDensity.uniformPushforward
                  (FABL.matrixProductSmallBiasSeed input)).IsBiased
              input.epsilon 
            input.fieldDegree + input.fieldDegree =
                FABL.matrixProductSmallBiasRandomBits n 
              FABL.matrixProductSmallBiasRandomBits n 
                  4 * FABL.matrixProductSmallBiasLogScale n 
                ((fun n =>
                      (FABL.matrixProductSmallBiasRandomBits
                          n)) =O[Filter.atTop]
                    fun n => (FABL.matrixProductSmallBiasLogScale n)) 
                  FABL.matrixProductVerificationLocalWork n 
                      11 * (n + 1) ^ 2 
                    ((fun n =>
                          (FABL.matrixProductVerificationLocalWork
                              n)) =O[Filter.atTop]
                        fun n => ((n + 1) ^ 2)) 
                      (∀
                          (bits :
                            Fin (input.fieldDegree + input.fieldDegree) 
                              Bool)
                          (i : Fin input.n),
                          FABL.matrixProductSmallBiasSeed input bits i =
                              FABL.executableSmallBiasGenerator input.n 
                                (FABL.deterministicSmallBiasAlgorithm
                                      input).fieldModel.implementation
                                ((FABL.boolSmallBiasSeedPairEquiv
                                      input.fieldDegree)
                                    bits).1
                                ((FABL.boolSmallBiasSeedPairEquiv
                                      input.fieldDegree)
                                    bits).2
                                i 
                            FABL.executableSmallBiasOutputBitWork
                                input.fieldDegree i 
                              16 * (i + 1) * (input.fieldDegree + 1) ^ 2) 
                        (C' = A * B 
                            FABL.seededMatrixProductVerificationAcceptanceProbability
                                A B C'
                                (FABL.matrixProductSmallBiasSeed input) =
                              1) 
                          (C'  A * B 
                            FABL.seededMatrixProductVerificationAcceptanceProbability
                                A B C'
                                (FABL.matrixProductSmallBiasSeed input) 
                              2 / 3)
    theorem FABL.matrixProductOneThirdSmallBiasVerificationAlgorithm_spec
      {n : } (hn : 0 < n)
      (target : FABL.BooleanFunction n)
      (A B C' :
        Matrix (Fin n) (Fin n) FABL.𝔽₂) :
      let input :=
        FABL.matrixProductOneThirdSmallBiasInput
          n hn;
      FABL.LearningProgram.runWithCost target
            (FABL.matrixProductOneThirdSmallBiasVerificationProgram
              hn A B C') =
          PMF.map
            (fun bits =>
              (FABL.seededMatrixProductVerificationResult
                  A B C'
                  (FABL.matrixProductSmallBiasSeed
                    input)
                  bits,
                FABL.matrixProductVerificationCost
                  n
                  (input.fieldDegree +
                    input.fieldDegree)))
            (FABL.uniformPMF
              (Fin
                  (input.fieldDegree +
                    input.fieldDegree) 
                Bool)) 
        input.epsilon = 3⁻¹ 
          (FABL.ProbabilityDensity.uniformPushforward
                  (FABL.matrixProductSmallBiasSeed
                    input)).IsBiased
              input.epsilon 
            input.fieldDegree +
                  input.fieldDegree =
                FABL.matrixProductSmallBiasRandomBits
                  n 
              FABL.matrixProductSmallBiasRandomBits
                    n 
                  4 *
                    FABL.matrixProductSmallBiasLogScale
                      n 
                ((fun n =>
                      (FABL.matrixProductSmallBiasRandomBits
                          n)) =O[Filter.atTop]
                    fun n =>
                    (FABL.matrixProductSmallBiasLogScale
                        n)) 
                  FABL.matrixProductVerificationLocalWork
                        n 
                      11 * (n + 1) ^ 2 
                    ((fun n =>
                          (FABL.matrixProductVerificationLocalWork
                              n)) =O[Filter.atTop]
                        fun n =>
                        ((n + 1) ^ 2)) 
                      (∀
                          (bits :
                            Fin
                                (input.fieldDegree +
                                  input.fieldDegree) 
                              Bool)
                          (i : Fin input.n),
                          FABL.matrixProductSmallBiasSeed
                                input bits i =
                              FABL.executableSmallBiasGenerator
                                input.n 
                                (FABL.deterministicSmallBiasAlgorithm
                                      input).fieldModel.implementation
                                ((FABL.boolSmallBiasSeedPairEquiv
                                      input.fieldDegree)
                                    bits).1
                                ((FABL.boolSmallBiasSeedPairEquiv
                                      input.fieldDegree)
                                    bits).2
                                i 
                            FABL.executableSmallBiasOutputBitWork
                                input.fieldDegree
                                i 
                              16 * (i + 1) *
                                (input.fieldDegree +
                                    1) ^
                                  2) 
                        (C' = A * B 
                            FABL.seededMatrixProductVerificationAcceptanceProbability
                                A B C'
                                (FABL.matrixProductSmallBiasSeed
                                  input) =
                              1) 
                          (C'  A * B 
                            FABL.seededMatrixProductVerificationAcceptanceProbability
                                A B C'
                                (FABL.matrixProductSmallBiasSeed
                                  input) 
                              2 / 3)
    Exercise 6.25(b): the deterministic Theorem 6.30 seed gives perfect
    completeness, two-thirds soundness, logarithmic randomness, and the same
    quadratic verification work. 
Lemma6.6.21
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Theorem 6.3.13
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 6.26. Specialize Theorem 6.32 and Corollary 6.33 to k=2, simplify their construction and analysis, and improve m=(k-1)\ell+1 to m=\ell.

Concretely, the \ell-row construction takes n\le2^\ell-1 distinct nonzero binary columns; this capacity bound is forced by pairwise independence. For arbitrary n\ge1, choosing \ell=\max\{1,\lceil\log_2(n+1)\rceil\} gives a pairwise-independent row-space density supported on at most 4n points, matching the k=2 specialization of Corollary 6.33 while using one fewer row.

Lean code for Lemma6.6.2112 declarations
  • defdefined in FABL/Chapter06/Constructions/PairwiseIndependence.lean
    complete
    def FABL.nonzeroBinaryVectorEquiv ( : ) : Fin (2 ^  - 1)  { x // x  0 }
    def FABL.nonzeroBinaryVectorEquiv ( : ) :
      Fin (2 ^  - 1)  { x // x  0 }
    The nonzero vectors in `F₂^ℓ` are indexed by `Fin (2^ℓ - 1)`. 
  • defdefined in FABL/Chapter06/Constructions/PairwiseIndependence.lean
    complete
    def FABL.pairwiseIndependentColumn { n : } (hn : n  2 ^  - 1)
      (j : Fin n) : FABL.F₂Cube 
    def FABL.pairwiseIndependentColumn { n : }
      (hn : n  2 ^  - 1) (j : Fin n) :
      FABL.F₂Cube 
    The first `n` nonzero binary vectors, for any admissible row dimension. 
  • theoremdefined in FABL/Chapter06/Constructions/PairwiseIndependence.lean
    complete
    theorem FABL.pairwiseIndependentColumn_ne_zero { n : } (hn : n  2 ^  - 1)
      (j : Fin n) : FABL.pairwiseIndependentColumn hn j  0
    theorem FABL.pairwiseIndependentColumn_ne_zero
      { n : } (hn : n  2 ^  - 1)
      (j : Fin n) :
      FABL.pairwiseIndependentColumn hn j  0
    Every selected column is nonzero. 
  • theoremdefined in FABL/Chapter06/Constructions/PairwiseIndependence.lean
    complete
    theorem FABL.pairwiseIndependentColumn_injective { n : }
      (hn : n  2 ^  - 1) :
      Function.Injective (FABL.pairwiseIndependentColumn hn)
    theorem FABL.pairwiseIndependentColumn_injective
      { n : } (hn : n  2 ^  - 1) :
      Function.Injective
        (FABL.pairwiseIndependentColumn hn)
    The selected columns are pairwise distinct. 
  • defdefined in FABL/Chapter06/Constructions/PairwiseIndependence.lean
    complete
    def FABL.pairwiseIndependentMatrix { n : } (hn : n  2 ^  - 1) :
      Matrix (Fin ) (Fin n) FABL.𝔽₂
    def FABL.pairwiseIndependentMatrix { n : }
      (hn : n  2 ^  - 1) :
      Matrix (Fin ) (Fin n) FABL.𝔽₂
    The `ℓ × n` matrix whose columns are the selected nonzero binary vectors. 
  • theoremdefined in FABL/Chapter06/Constructions/PairwiseIndependence.lean
    complete
    theorem FABL.pairwiseIndependentMatrix_column { n : } (hn : n  2 ^  - 1)
      (j : Fin n) :
      (fun i => FABL.pairwiseIndependentMatrix hn i j) =
        FABL.pairwiseIndependentColumn hn j
    theorem FABL.pairwiseIndependentMatrix_column
      { n : } (hn : n  2 ^  - 1)
      (j : Fin n) :
      (fun i =>
          FABL.pairwiseIndependentMatrix hn i
            j) =
        FABL.pairwiseIndependentColumn hn j
    A matrix column is the corresponding selected nonzero vector. 
  • theoremdefined in FABL/Chapter06/Constructions/PairwiseIndependence.lean
    complete
    theorem FABL.pairwiseIndependentMatrix_hasNonzeroColumnSumsUpTo { n : }
      (hn : n  2 ^  - 1) :
      FABL.HasNonzeroColumnSumsUpTo (FABL.pairwiseIndependentMatrix hn) 2
    theorem FABL.pairwiseIndependentMatrix_hasNonzeroColumnSumsUpTo
      { n : } (hn : n  2 ^  - 1) :
      FABL.HasNonzeroColumnSumsUpTo
        (FABL.pairwiseIndependentMatrix hn) 2
    Distinct nonzero columns have no vanishing nonempty sum of at most two columns. 
  • theoremdefined in FABL/Chapter06/Constructions/PairwiseIndependence.lean
    complete
    theorem FABL.exists_pairwiseIndependentMatrix { n : } (hn : n  2 ^  - 1) :
       H, FABL.HasNonzeroColumnSumsUpTo H 2
    theorem FABL.exists_pairwiseIndependentMatrix
      { n : } (hn : n  2 ^  - 1) :
       H, FABL.HasNonzeroColumnSumsUpTo H 2
    Exercise 6.26, matrix form: `n ≤ 2^ℓ - 1` distinct nonzero columns give an
    `ℓ × n` binary matrix in which every nonempty sum of at most two columns is nonzero. 
  • defdefined in FABL/Chapter06/Constructions/PairwiseIndependence.lean
    complete
    def FABL.pairwiseIndependentRowCount (n : ) : 
    def FABL.pairwiseIndependentRowCount (n : ) :
      
    The least positive row dimension containing at least `n` nonzero binary columns. 
  • theoremdefined in FABL/Chapter06/Constructions/PairwiseIndependence.lean
    complete
    theorem FABL.n_le_two_pow_pairwiseIndependentRowCount_sub_one (n : ) :
      n  2 ^ FABL.pairwiseIndependentRowCount n - 1
    theorem FABL.n_le_two_pow_pairwiseIndependentRowCount_sub_one
      (n : ) :
      n 
        2 ^
            FABL.pairwiseIndependentRowCount
              n -
          1
    The selected row count supplies at least `n` nonzero columns. 
  • theoremdefined in FABL/Chapter06/Constructions/PairwiseIndependence.lean
    complete
    theorem FABL.two_pow_pairwiseIndependentRowCount_le_four_mul {n : }
      (hn : 0 < n) : 2 ^ FABL.pairwiseIndependentRowCount n  4 * n
    theorem FABL.two_pow_pairwiseIndependentRowCount_le_four_mul
      {n : } (hn : 0 < n) :
      2 ^ FABL.pairwiseIndependentRowCount n 
        4 * n
    For positive `n`, the resulting row-space cardinality is at most `4n`. 
  • theoremdefined in FABL/Chapter06/Constructions/PairwiseIndependence.lean
    complete
    theorem FABL.exists_pairwiseIndependentSubspace_card_le (n : ) (hn : 0 < n) :
       A,
        FABL.IsLowDegreeFourierRegular 0 2
            (FABL.binaryFunctionOnSignCube
              (FABL.subsetDensity A ).toFun) 
          Nat.card A  4 * n
    theorem FABL.exists_pairwiseIndependentSubspace_card_le
      (n : ) (hn : 0 < n) :
       A,
        FABL.IsLowDegreeFourierRegular 0 2
            (FABL.binaryFunctionOnSignCube
              (FABL.subsetDensity A
                  ).toFun) 
          Nat.card A  4 * n
    Exercise 6.26, Corollary 6.33 form: for positive `n`, a pairwise-independent
    binary row-space density exists with at most `4n` points and uses only
    `max 1 (clog₂ (n + 1))` matrix rows. 
Lemma6.6.22
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Theorem 6.3.13
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 6.27. In the matrix H'\in\mathbb F_{2^\ell}^{k\times n} from Theorem 6.32, delete every row corresponding to an even nonzero power of the elements \alpha_j. Prove that every nonempty sum of at most k columns remains nonzero, using \left(\sum_j\beta_j\right)^2=\sum_j\beta_j^2 \qquad(\beta_j\in\mathbb F_{2^\ell}). Deduce that Corollary 6.33 can be strengthened to |A|\le 2(2n)^{\lfloor k/2\rfloor}.

Lean code for Lemma6.6.228 declarations
  • abbrevdefined in FABL/Chapter06/Constructions/ReducedVandermonde.lean
    complete
    abbrev FABL.ReducedVandermondeBinaryRow (k  : ) : Type
    abbrev FABL.ReducedVandermondeBinaryRow
      (k  : ) : Type
    The reduced binary rows consist of the constant row and the binary
    coordinates of powers `1, 3, ..., 2 * (k / 2 - 1) + 1`. 
  • defdefined in FABL/Chapter06/Constructions/ReducedVandermonde.lean
    complete
    def FABL.reducedVandermondeBinaryRowEquiv (k  : ) :
      Fin (k / 2 *  + 1)  FABL.ReducedVandermondeBinaryRow k 
    def FABL.reducedVandermondeBinaryRowEquiv
      (k  : ) :
      Fin (k / 2 *  + 1) 
        FABL.ReducedVandermondeBinaryRow k 
    Reindex the structured reduced rows by their cardinality. 
  • defdefined in FABL/Chapter06/Constructions/ReducedVandermonde.lean
    complete
    def FABL.reducedVandermondeBinaryMatrixOfPoints (k : ) { n : }
      (hℓ :   0) (α : Fin n  FABL.BinaryExtensionField ) :
      Matrix (Fin (k / 2 *  + 1)) (Fin n) FABL.𝔽₂
    def FABL.reducedVandermondeBinaryMatrixOfPoints
      (k : ) { n : } (hℓ :   0)
      (α :
        Fin n  FABL.BinaryExtensionField ) :
      Matrix (Fin (k / 2 *  + 1)) (Fin n)
        FABL.𝔽₂
    The binary Vandermonde matrix retaining only odd nonzero powers. 
  • theoremdefined in FABL/Chapter06/Constructions/ReducedVandermonde.lean
    complete
    theorem FABL.reducedVandermondeBinaryMatrixOfPoints_constantRow (k : )
      { n : } (hℓ :   0) (α : Fin n  FABL.BinaryExtensionField )
      (j : Fin n) :
      FABL.reducedVandermondeBinaryMatrixOfPoints k hℓ α
          ((FABL.reducedVandermondeBinaryRowEquiv k ).symm (Sum.inl ()))
          j =
        1
    theorem FABL.reducedVandermondeBinaryMatrixOfPoints_constantRow
      (k : ) { n : } (hℓ :   0)
      (α :
        Fin n  FABL.BinaryExtensionField )
      (j : Fin n) :
      FABL.reducedVandermondeBinaryMatrixOfPoints
          k hℓ α
          ((FABL.reducedVandermondeBinaryRowEquiv
                k ).symm
            (Sum.inl ()))
          j =
        1
  • theoremdefined in FABL/Chapter06/Constructions/ReducedVandermonde.lean
    complete
    theorem FABL.reducedVandermondeBinaryMatrixOfPoints_oddPowerRow (k : )
      { n : } (hℓ :   0) (α : Fin n  FABL.BinaryExtensionField )
      (q : Fin (k / 2)) (i : Fin ) (j : Fin n) :
      FABL.reducedVandermondeBinaryMatrixOfPoints k hℓ α
          ((FABL.reducedVandermondeBinaryRowEquiv k ).symm
            (Sum.inr (q, i)))
          j =
        (FABL.binaryExtensionEncode hℓ) (α j ^ (2 * q + 1)) i
    theorem FABL.reducedVandermondeBinaryMatrixOfPoints_oddPowerRow
      (k : ) { n : } (hℓ :   0)
      (α :
        Fin n  FABL.BinaryExtensionField )
      (q : Fin (k / 2)) (i : Fin )
      (j : Fin n) :
      FABL.reducedVandermondeBinaryMatrixOfPoints
          k hℓ α
          ((FABL.reducedVandermondeBinaryRowEquiv
                k ).symm
            (Sum.inr (q, i)))
          j =
        (FABL.binaryExtensionEncode hℓ)
          (α j ^ (2 * q + 1)) i
  • theoremdefined in FABL/Chapter06/Constructions/ReducedVandermonde.lean
    complete
    theorem FABL.extensionField_moments_eq_zero_of_oddMoments_eq_zero { n k : }
      (α : Fin n  FABL.BinaryExtensionField ) (S : Finset (Fin n))
      (hzero :  _j  S, 1 = 0)
      (hodd :  (q : ), 2 * q + 1 < k   j  S, α j ^ (2 * q + 1) = 0)
      (p : ) : p < k   j  S, α j ^ p = 0
    theorem FABL.extensionField_moments_eq_zero_of_oddMoments_eq_zero
      { n k : }
      (α :
        Fin n  FABL.BinaryExtensionField )
      (S : Finset (Fin n))
      (hzero :  _j  S, 1 = 0)
      (hodd :
         (q : ),
          2 * q + 1 < k 
             j  S, α j ^ (2 * q + 1) = 0)
      (p : ) : p < k   j  S, α j ^ p = 0
    In a binary extension field, vanishing of the constant and odd power
    moments up to `k - 1` forces every power moment up to `k - 1` to vanish. 
  • theoremdefined in FABL/Chapter06/Constructions/ReducedVandermonde.lean
    complete
    theorem FABL.reducedVandermondeBinaryMatrixOfPoints_hasNonzeroColumnSumsUpTo
      (k : ) { n : } (hℓ :   0)
      (α : Fin n  FABL.BinaryExtensionField )
      ( : Function.Injective α) :
      FABL.HasNonzeroColumnSumsUpTo
        (FABL.reducedVandermondeBinaryMatrixOfPoints k hℓ α) k
    theorem FABL.reducedVandermondeBinaryMatrixOfPoints_hasNonzeroColumnSumsUpTo
      (k : ) { n : } (hℓ :   0)
      (α :
        Fin n  FABL.BinaryExtensionField )
      ( : Function.Injective α) :
      FABL.HasNonzeroColumnSumsUpTo
        (FABL.reducedVandermondeBinaryMatrixOfPoints
          k hℓ α)
        k
    Every deleted even row is forced by the retained odd rows, so the
    reduced matrix has the same nonzero-column-sum guarantee as the full
    Vandermonde matrix. 
  • theoremdefined in FABL/Chapter06/Constructions/ReducedVandermonde.lean
    complete
    theorem FABL.exists_kWiseIndependentSubspace_card_le_two_mul_two_n_pow_half
      (k n : ) (hk : 1  k) (hkn : k  n) :
       A,
        FABL.IsLowDegreeFourierRegular 0 k
            (FABL.binaryFunctionOnSignCube
              (FABL.subsetDensity A ).toFun) 
          Nat.card A  2 * (2 * n) ^ (k / 2)
    theorem FABL.exists_kWiseIndependentSubspace_card_le_two_mul_two_n_pow_half
      (k n : ) (hk : 1  k) (hkn : k  n) :
       A,
        FABL.IsLowDegreeFourierRegular 0 k
            (FABL.binaryFunctionOnSignCube
              (FABL.subsetDensity A
                  ).toFun) 
          Nat.card A  2 * (2 * n) ^ (k / 2)
    Exercise 6.27: for `1 ≤ k ≤ n`, there is a `k`-wise independent
    binary subspace supported on at most `2 * (2 * n) ^ (k / 2)` points. 
Lemma6.6.23
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Theorem 1.3.3
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 6.28 (lower bound for k-wise independent multisets). Let A\subseteq\{-1,1\}^n be a multiset whose density is k-wise independent.

(a) Suppose \mathcal F\subseteq2^{[n]} satisfies |S\cup T|\le k for all S,T\in\mathcal F. For S\in\mathcal F, let \chi_S^A\in\mathbb R^{|A|} be the vector whose entry at a\in A is \prod_{i\in S}a_i. Prove that \left\{|A|^{-1/2}\chi_S^A:S\in\mathcal F\right\} is orthonormal, and hence |A|\ge|\mathcal F|.

(b) Construct such a family satisfying |\mathcal F|\ge \begin{cases} \displaystyle\sum_{j=0}^{k/2}\binom nj,&k\text{ even},\\[1.2ex] \displaystyle\sum_{j=0}^{(k-1)/2}\binom nj +\binom{n-1}{(k-1)/2},&k\text{ odd}. \end{cases} Conclude, for constant k, that |A|\ge\Omega(n^{\lfloor k/2\rfloor}). For the displayed odd-k refinement the formal theorem records n\ge1, which is necessary to choose the distinguished coordinate and excludes the degenerate n=0,k=1 case where that printed formula is false.

Lean code for Lemma6.6.2321 declarations
  • defdefined in FABL/Chapter06/Constructions/KWiseIndependentLowerBound.lean
    complete
    def FABL.signMultisetDensity.{u} {n : } {Ω : Type u} [Fintype Ω]
      [Nonempty Ω] (A : Ω  FABL.SignCube n) : FABL.ProbabilityDensity n
    def FABL.signMultisetDensity.{u} {n : }
      {Ω : Type u} [Fintype Ω] [Nonempty Ω]
      (A : Ω  FABL.SignCube n) :
      FABL.ProbabilityDensity n
    The density of a finite indexed family of sign-cube points.  The index type records
    multiplicity, so this is the density of the corresponding multiset. 
  • defdefined in FABL/Chapter06/Constructions/KWiseIndependentLowerBound.lean
    complete
    def FABL.IsKWiseIndependentMultiset.{u} {n : } {Ω : Type u} [Fintype Ω]
      [Nonempty Ω] (k : ) (A : Ω  FABL.SignCube n) : Prop
    def FABL.IsKWiseIndependentMultiset.{u}
      {n : } {Ω : Type u} [Fintype Ω]
      [Nonempty Ω] (k : )
      (A : Ω  FABL.SignCube n) : Prop
    A finite sign-cube multiset is `k`-wise independent when its density is `(0,k)`-regular,
    as in Definition 6.15. 
  • theoremdefined in FABL/Chapter06/Constructions/KWiseIndependentLowerBound.lean
    complete
    theorem FABL.fourierCoeff_signMultisetDensity.{u} {n : } {Ω : Type u}
      [Fintype Ω] [Nonempty Ω] (A : Ω  FABL.SignCube n)
      (S : Finset (Fin n)) :
      FABL.fourierCoeff
          (FABL.binaryFunctionOnSignCube (FABL.signMultisetDensity A).toFun)
          S =
        Finset.univ.expect fun ω => FABL.monomial S (A ω)
    theorem FABL.fourierCoeff_signMultisetDensity.{u}
      {n : } {Ω : Type u} [Fintype Ω]
      [Nonempty Ω] (A : Ω  FABL.SignCube n)
      (S : Finset (Fin n)) :
      FABL.fourierCoeff
          (FABL.binaryFunctionOnSignCube
            (FABL.signMultisetDensity
                A).toFun)
          S =
        Finset.univ.expect fun ω =>
          FABL.monomial S (A ω)
    A Fourier coefficient of a finite multiset density is the corresponding uniform average
    over the multiset indices. 
  • theoremdefined in FABL/Chapter06/Constructions/KWiseIndependentLowerBound.lean
    complete
    theorem FABL.IsKWiseIndependentMultiset.expect_monomial_mul.{u} {n k : }
      {Ω : Type u} [Fintype Ω] [Nonempty Ω] {A : Ω  FABL.SignCube n}
      (hA : FABL.IsKWiseIndependentMultiset k A) (S T : Finset (Fin n))
      (hcard : (S  T).card  k) :
      (Finset.univ.expect fun ω =>
          FABL.monomial S (A ω) * FABL.monomial T (A ω)) =
        if S = T then 1 else 0
    theorem FABL.IsKWiseIndependentMultiset.expect_monomial_mul.{u}
      {n k : } {Ω : Type u} [Fintype Ω]
      [Nonempty Ω] {A : Ω  FABL.SignCube n}
      (hA :
        FABL.IsKWiseIndependentMultiset k A)
      (S T : Finset (Fin n))
      (hcard : (S  T).card  k) :
      (Finset.univ.expect fun ω =>
          FABL.monomial S (A ω) *
            FABL.monomial T (A ω)) =
        if S = T then 1 else 0
    On a `k`-wise independent multiset, two Walsh characters whose union has size at most `k`
    have Kronecker-delta correlation. 
  • defdefined in FABL/Chapter06/Constructions/KWiseIndependentLowerBound.lean
    complete
    def FABL.normalizedRestrictedWalshVector.{u} {n : } {Ω : Type u}
      [Fintype Ω] [Nonempty Ω] (A : Ω  FABL.SignCube n)
      (S : Finset (Fin n)) : EuclideanSpace  Ω
    def FABL.normalizedRestrictedWalshVector.{u}
      {n : } {Ω : Type u} [Fintype Ω]
      [Nonempty Ω] (A : Ω  FABL.SignCube n)
      (S : Finset (Fin n)) :
      EuclideanSpace  Ω
    The Walsh character restricted to a finite sign-cube multiset, normalized by the square root
    of the multiset cardinality. 
  • theoremdefined in FABL/Chapter06/Constructions/KWiseIndependentLowerBound.lean
    complete
    theorem FABL.normalizedRestrictedWalshVector_orthonormal.{u} {n k : }
      {Ω : Type u} [Fintype Ω] [Nonempty Ω] {A : Ω  FABL.SignCube n}
      (hA : FABL.IsKWiseIndependentMultiset k A)
      (𝓕 : Finset (Finset (Fin n)))
      (h𝓕 :  S  𝓕,  T  𝓕, (S  T).card  k) :
      Orthonormal  fun S => FABL.normalizedRestrictedWalshVector A S
    theorem FABL.normalizedRestrictedWalshVector_orthonormal.{u}
      {n k : } {Ω : Type u} [Fintype Ω]
      [Nonempty Ω] {A : Ω  FABL.SignCube n}
      (hA :
        FABL.IsKWiseIndependentMultiset k A)
      (𝓕 : Finset (Finset (Fin n)))
      (h𝓕 :
         S  𝓕,  T  𝓕, (S  T).card  k) :
      Orthonormal  fun S =>
        FABL.normalizedRestrictedWalshVector A
          S
    Exercise 6.28(a): every frequency family whose pairwise unions have size at most `k`
    restricts to an orthonormal family on a `k`-wise independent multiset. 
  • theoremdefined in FABL/Chapter06/Constructions/KWiseIndependentLowerBound.lean
    complete
    theorem FABL.card_frequencyFamily_le_card_of_isKWiseIndependentMultiset.{u}
      {n k : } {Ω : Type u} [Fintype Ω] [Nonempty Ω]
      {A : Ω  FABL.SignCube n} (hA : FABL.IsKWiseIndependentMultiset k A)
      (𝓕 : Finset (Finset (Fin n)))
      (h𝓕 :  S  𝓕,  T  𝓕, (S  T).card  k) : 𝓕.card  Fintype.card Ω
    theorem FABL.card_frequencyFamily_le_card_of_isKWiseIndependentMultiset.{u}
      {n k : } {Ω : Type u} [Fintype Ω]
      [Nonempty Ω] {A : Ω  FABL.SignCube n}
      (hA :
        FABL.IsKWiseIndependentMultiset k A)
      (𝓕 : Finset (Finset (Fin n)))
      (h𝓕 :
         S  𝓕,  T  𝓕, (S  T).card  k) :
      𝓕.card  Fintype.card Ω
    Exercise 6.28(a): orthonormality in the real function space on the multiset indices gives
    the frequency-family cardinality bound. 
  • theoremdefined in FABL/Chapter06/Constructions/KWiseIndependentLowerBound.lean
    complete
    theorem FABL.card_union_le_two_mul_of_mem_lowDegreeFourierFamily {n m : }
      {S T : Finset (Fin n)} (hS : S  FABL.lowDegreeFourierFamily n m)
      (hT : T  FABL.lowDegreeFourierFamily n m) : (S  T).card  2 * m
    theorem FABL.card_union_le_two_mul_of_mem_lowDegreeFourierFamily
      {n m : } {S T : Finset (Fin n)}
      (hS :
        S  FABL.lowDegreeFourierFamily n m)
      (hT :
        T  FABL.lowDegreeFourierFamily n m) :
      (S  T).card  2 * m
    Two degree-at-most-`m` frequencies have union size at most `2m`. 
  • theoremdefined in FABL/Chapter06/Constructions/KWiseIndependentLowerBound.lean
    complete
    theorem FABL.exists_even_kWiseFrequencyFamily {n k : } (hk : Even k) :
       𝓕,
        (∀ S  𝓕,  T  𝓕, (S  T).card  k) 
          𝓕.card =  j  Finset.range (k / 2 + 1), n.choose j
    theorem FABL.exists_even_kWiseFrequencyFamily
      {n k : } (hk : Even k) :
       𝓕,
        (∀ S  𝓕,  T  𝓕, (S  T).card  k) 
          𝓕.card =
             j  Finset.range (k / 2 + 1),
              n.choose j
    Exercise 6.28(b), even case: the low-degree frequency family has the required pairwise-union
    bound and the stated binomial cardinality. 
  • defdefined in FABL/Chapter06/Constructions/KWiseIndependentLowerBound.lean
    complete
    def FABL.oddKWiseFrequencyExtension (n m : ) (i : Fin n) :
      Finset (Finset (Fin n))
    def FABL.oddKWiseFrequencyExtension (n m : )
      (i : Fin n) : Finset (Finset (Fin n))
    The extra layer in the odd-`k` construction: choose `m` coordinates away from `i`, then add
    the common distinguished coordinate `i`. 
  • theoremdefined in FABL/Chapter06/Constructions/KWiseIndependentLowerBound.lean
    complete
    theorem FABL.mem_oddKWiseFrequencyExtension_card {n m : } (i : Fin n)
      {S : Finset (Fin n)}
      (hS : S  FABL.oddKWiseFrequencyExtension n m i) :
      i  S  S.card = m + 1
    theorem FABL.mem_oddKWiseFrequencyExtension_card
      {n m : } (i : Fin n)
      {S : Finset (Fin n)}
      (hS :
        S 
          FABL.oddKWiseFrequencyExtension n m
            i) :
      i  S  S.card = m + 1
    Every frequency in the odd extra layer contains the distinguished coordinate and has
    cardinality `m+1`. 
  • theoremdefined in FABL/Chapter06/Constructions/KWiseIndependentLowerBound.lean
    complete
    theorem FABL.card_oddKWiseFrequencyExtension (n m : ) (i : Fin n) :
      (FABL.oddKWiseFrequencyExtension n m i).card = (n - 1).choose m
    theorem FABL.card_oddKWiseFrequencyExtension
      (n m : ) (i : Fin n) :
      (FABL.oddKWiseFrequencyExtension n m
            i).card =
        (n - 1).choose m
    The odd extra layer has one member for each `m`-subset of the other `n-1` coordinates. 
  • defdefined in FABL/Chapter06/Constructions/KWiseIndependentLowerBound.lean
    complete
    def FABL.oddKWiseFrequencyFamily (n m : ) (i : Fin n) :
      Finset (Finset (Fin n))
    def FABL.oddKWiseFrequencyFamily (n m : )
      (i : Fin n) : Finset (Finset (Fin n))
    The odd-`k` frequency family consists of all levels through `m`, together with the extra
    `(m+1)`st level containing a fixed coordinate. 
  • theoremdefined in FABL/Chapter06/Constructions/KWiseIndependentLowerBound.lean
    complete
    theorem FABL.disjoint_lowDegreeFourierFamily_oddKWiseFrequencyExtension
      (n m : ) (i : Fin n) :
      Disjoint (FABL.lowDegreeFourierFamily n m)
        (FABL.oddKWiseFrequencyExtension n m i)
    theorem FABL.disjoint_lowDegreeFourierFamily_oddKWiseFrequencyExtension
      (n m : ) (i : Fin n) :
      Disjoint
        (FABL.lowDegreeFourierFamily n m)
        (FABL.oddKWiseFrequencyExtension n m
          i)
    The low-degree part and the extra layer of the odd construction are disjoint. 
  • theoremdefined in FABL/Chapter06/Constructions/KWiseIndependentLowerBound.lean
    complete
    theorem FABL.card_oddKWiseFrequencyFamily (n m : ) (i : Fin n) :
      (FABL.oddKWiseFrequencyFamily n m i).card =
         j  Finset.range (m + 1), n.choose j + (n - 1).choose m
    theorem FABL.card_oddKWiseFrequencyFamily
      (n m : ) (i : Fin n) :
      (FABL.oddKWiseFrequencyFamily n m
            i).card =
         j  Finset.range (m + 1),
            n.choose j +
          (n - 1).choose m
    The odd-`k` frequency family has the binomial cardinality stated in Exercise 6.28(b). 
  • theoremdefined in FABL/Chapter06/Constructions/KWiseIndependentLowerBound.lean
    complete
    theorem FABL.card_union_le_two_mul_add_one_of_mem_oddKWiseFrequencyFamily
      {n m : } (i : Fin n) {S T : Finset (Fin n)}
      (hS : S  FABL.oddKWiseFrequencyFamily n m i)
      (hT : T  FABL.oddKWiseFrequencyFamily n m i) :
      (S  T).card  2 * m + 1
    theorem FABL.card_union_le_two_mul_add_one_of_mem_oddKWiseFrequencyFamily
      {n m : } (i : Fin n)
      {S T : Finset (Fin n)}
      (hS :
        S 
          FABL.oddKWiseFrequencyFamily n m i)
      (hT :
        T 
          FABL.oddKWiseFrequencyFamily n m
            i) :
      (S  T).card  2 * m + 1
    Any two members of the odd frequency family have union size at most `2m+1`; two extra-layer
    members save one coordinate because both contain the distinguished coordinate. 
  • theoremdefined in FABL/Chapter06/Constructions/KWiseIndependentLowerBound.lean
    complete
    theorem FABL.exists_odd_kWiseFrequencyFamily {n k : } (hn : 0 < n)
      (hk : Odd k) :
       𝓕,
        (∀ S  𝓕,  T  𝓕, (S  T).card  k) 
          𝓕.card =
             j  Finset.range ((k - 1) / 2 + 1), n.choose j +
              (n - 1).choose ((k - 1) / 2)
    theorem FABL.exists_odd_kWiseFrequencyFamily
      {n k : } (hn : 0 < n) (hk : Odd k) :
       𝓕,
        (∀ S  𝓕,  T  𝓕, (S  T).card  k) 
          𝓕.card =
            
                j 
                  Finset.range
                    ((k - 1) / 2 + 1),
                n.choose j +
              (n - 1).choose ((k - 1) / 2)
    Exercise 6.28(b), odd case.  A distinguished coordinate is needed, so `n>0` is explicit.
    This boundary is necessary: the displayed odd formula is false for `n=0`, `k=1`. 
  • theoremdefined in FABL/Chapter06/Constructions/KWiseIndependentLowerBound.lean
    complete
    theorem FABL.even_kWiseIndependentMultiset_card_lowerBound.{u} {n k : }
      {Ω : Type u} [Fintype Ω] [Nonempty Ω] {A : Ω  FABL.SignCube n}
      (hA : FABL.IsKWiseIndependentMultiset k A) (hk : Even k) :
       j  Finset.range (k / 2 + 1), n.choose j  Fintype.card Ω
    theorem FABL.even_kWiseIndependentMultiset_card_lowerBound.{u}
      {n k : } {Ω : Type u} [Fintype Ω]
      [Nonempty Ω] {A : Ω  FABL.SignCube n}
      (hA :
        FABL.IsKWiseIndependentMultiset k A)
      (hk : Even k) :
       j  Finset.range (k / 2 + 1),
          n.choose j 
        Fintype.card Ω
    The even-case numerical lower bound for a `k`-wise independent multiset. 
  • theoremdefined in FABL/Chapter06/Constructions/KWiseIndependentLowerBound.lean
    complete
    theorem FABL.odd_kWiseIndependentMultiset_card_lowerBound.{u} {n k : }
      {Ω : Type u} [Fintype Ω] [Nonempty Ω] {A : Ω  FABL.SignCube n}
      (hA : FABL.IsKWiseIndependentMultiset k A) (hn : 0 < n) (hk : Odd k) :
       j  Finset.range ((k - 1) / 2 + 1), n.choose j +
          (n - 1).choose ((k - 1) / 2) 
        Fintype.card Ω
    theorem FABL.odd_kWiseIndependentMultiset_card_lowerBound.{u}
      {n k : } {Ω : Type u} [Fintype Ω]
      [Nonempty Ω] {A : Ω  FABL.SignCube n}
      (hA :
        FABL.IsKWiseIndependentMultiset k A)
      (hn : 0 < n) (hk : Odd k) :
       j  Finset.range ((k - 1) / 2 + 1),
            n.choose j +
          (n - 1).choose ((k - 1) / 2) 
        Fintype.card Ω
    The odd-case numerical lower bound for a `k`-wise independent multiset.  The positivity
    assumption on `n` supplies the distinguished coordinate used by the book's construction. 
  • theoremdefined in FABL/Chapter06/Constructions/KWiseIndependentLowerBound.lean
    complete
    theorem FABL.choose_floor_half_le_card_of_isKWiseIndependentMultiset.{u}
      {n k : } {Ω : Type u} [Fintype Ω] [Nonempty Ω]
      {A : Ω  FABL.SignCube n} (hA : FABL.IsKWiseIndependentMultiset k A) :
      n.choose (k / 2)  Fintype.card Ω
    theorem FABL.choose_floor_half_le_card_of_isKWiseIndependentMultiset.{u}
      {n k : } {Ω : Type u} [Fintype Ω]
      [Nonempty Ω] {A : Ω  FABL.SignCube n}
      (hA :
        FABL.IsKWiseIndependentMultiset k A) :
      n.choose (k / 2)  Fintype.card Ω
    For every `k`, the central binomial term at degree `⌊k/2⌋` is already a lower bound for the
    size of a `k`-wise independent multiset. 
  • theoremdefined in FABL/Chapter06/Constructions/KWiseIndependentLowerBound.lean
    complete
    theorem FABL.kWiseIndependentMultiset_card_isOmega.{u} (k : ) (Ω :   Type u)
      [(n : )  Fintype (Ω n)] [ (n : ), Nonempty (Ω n)]
      (A : (n : )  Ω n  FABL.SignCube n)
      (hA :  (n : ), FABL.IsKWiseIndependentMultiset k (A n)) :
      (fun n => n ^ (k / 2)) =O[Filter.atTop] fun n =>
        (Fintype.card (Ω n))
    theorem FABL.kWiseIndependentMultiset_card_isOmega.{u}
      (k : ) (Ω :   Type u)
      [(n : )  Fintype (Ω n)]
      [ (n : ), Nonempty (Ω n)]
      (A : (n : )  Ω n  FABL.SignCube n)
      (hA :
         (n : ),
          FABL.IsKWiseIndependentMultiset k
            (A n)) :
      (fun n => n ^ (k / 2)) =O[Filter.atTop]
        fun n => (Fintype.card (Ω n))
    Exercise 6.28(b), asymptotic conclusion.  With `k` fixed, the multiset cardinality is
    `Ω(n^⌊k/2⌋)`.  Mathlib writes this lower-bound direction as `n^⌊k/2⌋ = O(|A_n|)`. 
Lemma6.6.24
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Lemma 6.4.6
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Exercise 6.32.

(a) Improve Lemma 6.38 to \left| \mathbb E_{x\sim\varphi}[f(x)]-\mathbb E[f] \right| \le \bigl(\lVert\widehat f\rVert_1-|\widehat f(\varnothing)|\bigr)\epsilon, and improve Corollary 6.39 to \left| \mathbb E_{x\sim\varphi}[f(x)^2]-\mathbb E[f^2] \right| \le \bigl(\lVert\widehat f\rVert_1^2-\lVert f\rVert_2^2\bigr)\epsilon.

(b) Improve the correlation lower bound in Theorem 6.44 to \frac{\sqrt{\theta^2-\epsilon}}{\sqrt{1-\epsilon}}. For the formal real-valued statement, Mathlib's square root and field division make the displayed ratio 0 when \epsilon\ge1; the nontrivial book regime is 0\le\epsilon<1.

Lean code for Lemma6.6.243 theorems
  • theoremdefined in FABL/Chapter06/LearningAndTesting/FourierNorms.lean
    complete
    theorem FABL.ProbabilityDensity.abs_expectation_signFunction_sub_mean_le_fourierOneNorm_sub
      {n : } (φ : FABL.ProbabilityDensity n) (f : FABL.SignCube n  )
      {ε : } ( : φ.IsBiased ε) :
      |(φ.expectation fun x => f ((FABL.binaryCubeSignEquiv n) x)) -
            FABL.mean f| 
        (FABL.fourierOneNorm f - |FABL.fourierCoeff f |) * ε
    theorem FABL.ProbabilityDensity.abs_expectation_signFunction_sub_mean_le_fourierOneNorm_sub
      {n : } (φ : FABL.ProbabilityDensity n)
      (f : FABL.SignCube n  ) {ε : }
      ( : φ.IsBiased ε) :
      |(φ.expectation fun x =>
              f
                ((FABL.binaryCubeSignEquiv n)
                  x)) -
            FABL.mean f| 
        (FABL.fourierOneNorm f -
            |FABL.fourierCoeff f |) *
          ε
    Exercise 6.32(a), refined Lemma 6.38: the constant Fourier coefficient contributes
    no small-bias error. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/FourierNorms.lean
    complete
    theorem FABL.ProbabilityDensity.abs_expectation_signFunction_sq_sub_mean_sq_le_refined
      {n : } (φ : FABL.ProbabilityDensity n) (f : FABL.SignCube n  )
      {ε : } ( : φ.IsBiased ε) ( : 0  ε) :
      |(φ.expectation fun x => f ((FABL.binaryCubeSignEquiv n) x) ^ 2) -
            FABL.mean fun x => f x ^ 2| 
        (FABL.fourierOneNorm f ^ 2 - FABL.uniformLpNorm 2 f ^ 2) * ε
    theorem FABL.ProbabilityDensity.abs_expectation_signFunction_sq_sub_mean_sq_le_refined
      {n : } (φ : FABL.ProbabilityDensity n)
      (f : FABL.SignCube n  ) {ε : }
      ( : φ.IsBiased ε) ( : 0  ε) :
      |(φ.expectation fun x =>
              f
                  ((FABL.binaryCubeSignEquiv
                      n)
                    x) ^
                2) -
            FABL.mean fun x => f x ^ 2| 
        (FABL.fourierOneNorm f ^ 2 -
            FABL.uniformLpNorm 2 f ^ 2) *
          ε
    Exercise 6.32(a), refined Corollary 6.39: the uniform second moment is the
    constant coefficient of the pointwise square and therefore contributes no error. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/DerandomizedBLR.lean
    complete
    theorem FABL.exists_affine_correlation_ge_sqrt_div_sqrt_of_derandomizedBLRAcceptanceProbability_eq
      {n : } (φ : FABL.ProbabilityDensity n) (f : FABL.F₂BooleanFunction n)
      (ε θ : ) ( : 0  ε) ( : φ.IsBiased ε)
      (haccept :
        FABL.derandomizedBLRAcceptanceProbability φ f = 1 / 2 + 1 / 2 * θ) :
       b γ,
        ((θ ^ 2 - ε) / (1 - ε) 
            Finset.univ.expect fun x =>
              FABL.realSignEncodedFunction f x *
                FABL.realSignEncodedFunction (FABL.affineFunction b γ) x) 
          FABL.relativeHammingDist f (FABL.affineFunction b γ) 
            1 / 2 - (θ ^ 2 - ε) / (1 - ε) / 2
    theorem FABL.exists_affine_correlation_ge_sqrt_div_sqrt_of_derandomizedBLRAcceptanceProbability_eq
      {n : } (φ : FABL.ProbabilityDensity n)
      (f : FABL.F₂BooleanFunction n) (ε θ : )
      ( : 0  ε) ( : φ.IsBiased ε)
      (haccept :
        FABL.derandomizedBLRAcceptanceProbability
            φ f =
          1 / 2 + 1 / 2 * θ) :
       b γ,
        ((θ ^ 2 - ε) / (1 - ε) 
            Finset.univ.expect fun x =>
              FABL.realSignEncodedFunction f
                  x *
                FABL.realSignEncodedFunction
                  (FABL.affineFunction b γ)
                  x) 
          FABL.relativeHammingDist f
              (FABL.affineFunction b γ) 
            1 / 2 -
              (θ ^ 2 - ε) / (1 - ε) / 2
    Exercise 6.32(b): the refined second-moment estimate improves the affine-correlation
    lower bound by the factor `1 / √(1 - ε)`.
    
Lemma6.6.25
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Definition 6.4.16
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 6.33. Let 0\le\epsilon<1. Suppose f passes the Derandomized BLR Test with probability 1-\delta in the explicit near-perfect regime \frac{1+\epsilon}{2}\le(1-2\delta)^2. Then there is \gamma^\ast\in\widehat{\mathbb F_2^n} such that |\widehat f(\gamma^\ast)| \ge \frac{\sqrt{1-2\delta-\epsilon}}{\sqrt{1-\epsilon}}. This improves the near-perfect-acceptance distance bound by a factor of roughly 2.

The book qualifies this exercise only by saying that the acceptance probability is “near 1”. The displayed threshold makes that regime quantitative: it ensures that one Fourier coefficient carries at least half of the spectral square mass, where the unique-decoding argument applies. Without some such near-perfect hypothesis, the asserted bound is false even for a uniform test in dimension 4.

Lean code for Lemma6.6.254 theorems
  • theoremdefined in FABL/Chapter06/LearningAndTesting/DerandomizedBLR.lean
    complete
    theorem FABL.two_mul_derandomizedBLRAcceptanceProbability_sub_one_eq_sum_sq_mul_correlation
      {n : } (φ : FABL.ProbabilityDensity n)
      (f : FABL.F₂BooleanFunction n) :
      2 * FABL.derandomizedBLRAcceptanceProbability φ f - 1 =
         γ,
          FABL.vectorFourierCoeff (FABL.realSignEncodedFunction f) γ ^ 2 *
            φ.expectation fun y =>
              FABL.realSignEncodedFunction f y *
                (FABL.vectorWalshCharacter γ) y
    theorem FABL.two_mul_derandomizedBLRAcceptanceProbability_sub_one_eq_sum_sq_mul_correlation
      {n : } (φ : FABL.ProbabilityDensity n)
      (f : FABL.F₂BooleanFunction n) :
      2 *
            FABL.derandomizedBLRAcceptanceProbability
              φ f -
          1 =
         γ,
          FABL.vectorFourierCoeff
                (FABL.realSignEncodedFunction
                  f)
                γ ^
              2 *
            φ.expectation fun y =>
              FABL.realSignEncodedFunction f
                  y *
                (FABL.vectorWalshCharacter γ)
                  y
    The centered derandomized BLR acceptance probability is a Fourier-square-weighted
    average of the density correlations with the Walsh characters. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/DerandomizedBLR.lean
    complete
    theorem FABL.probabilityDensityCorrelation_add_le_one_add_bias {n : }
      (φ : FABL.ProbabilityDensity n) {F : FABL.F₂Cube n  } {ε : }
      (hF : FABL.IsSignValued F) ( : φ.IsBiased ε) {γ η : FABL.F₂Cube n}
      (hγη : γ  η) :
      ((φ.expectation fun x => F x * (FABL.vectorWalshCharacter γ) x) +
          φ.expectation fun x => F x * (FABL.vectorWalshCharacter η) x) 
        1 + ε
    theorem FABL.probabilityDensityCorrelation_add_le_one_add_bias
      {n : } (φ : FABL.ProbabilityDensity n)
      {F : FABL.F₂Cube n  } {ε : }
      (hF : FABL.IsSignValued F)
      ( : φ.IsBiased ε)
      {γ η : FABL.F₂Cube n} (hγη : γ  η) :
      ((φ.expectation fun x =>
            F x *
              (FABL.vectorWalshCharacter γ)
                x) +
          φ.expectation fun x =>
            F x *
              (FABL.vectorWalshCharacter η)
                x) 
        1 + ε
    Two distinct Walsh characters cannot both correlate too strongly with the same
    sign-valued function under an `ε`-biased density. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/DerandomizedBLR.lean
    complete
    theorem FABL.two_mul_derandomizedBLRAcceptanceProbability_sub_one_le_of_half_le_sq
      {n : } (φ : FABL.ProbabilityDensity n) (f : FABL.F₂BooleanFunction n)
      (ε : ) (γ₀ : FABL.F₂Cube n) ( : φ.IsBiased ε)
      (hhalf :
        1 / 2 
          FABL.vectorFourierCoeff (FABL.realSignEncodedFunction f) γ₀ ^ 2) :
      2 * FABL.derandomizedBLRAcceptanceProbability φ f - 1 
        ε +
          (1 - ε) *
            FABL.vectorFourierCoeff (FABL.realSignEncodedFunction f) γ₀ ^ 2
    theorem FABL.two_mul_derandomizedBLRAcceptanceProbability_sub_one_le_of_half_le_sq
      {n : } (φ : FABL.ProbabilityDensity n)
      (f : FABL.F₂BooleanFunction n) (ε : )
      (γ₀ : FABL.F₂Cube n) ( : φ.IsBiased ε)
      (hhalf :
        1 / 2 
          FABL.vectorFourierCoeff
              (FABL.realSignEncodedFunction f)
              γ₀ ^
            2) :
      2 *
            FABL.derandomizedBLRAcceptanceProbability
              φ f -
          1 
        ε +
          (1 - ε) *
            FABL.vectorFourierCoeff
                (FABL.realSignEncodedFunction
                  f)
                γ₀ ^
              2
    In the unique-decoding branch, where one Fourier coefficient carries at least half
    the spectral square mass, the centered derandomized BLR acceptance has the sharper
    linear upper bound needed for Exercise 6.33. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/DerandomizedBLR.lean
    complete
    theorem FABL.exists_abs_vectorFourierCoeff_ge_sqrt_div_sqrt_of_near_perfect_derandomizedBLR
      {n : } (φ : FABL.ProbabilityDensity n) (f : FABL.F₂BooleanFunction n)
      (ε δ : ) ( : 0  ε) (hεlt : ε < 1) ( : φ.IsBiased ε)
      (haccept : FABL.derandomizedBLRAcceptanceProbability φ f = 1 - δ)
      (hnear : (1 + ε) / 2  (1 - 2 * δ) ^ 2) :
       γ,
        (1 - 2 * δ - ε) / (1 - ε) 
          |FABL.vectorFourierCoeff (FABL.realSignEncodedFunction f) γ|
    theorem FABL.exists_abs_vectorFourierCoeff_ge_sqrt_div_sqrt_of_near_perfect_derandomizedBLR
      {n : } (φ : FABL.ProbabilityDensity n)
      (f : FABL.F₂BooleanFunction n) (ε δ : )
      ( : 0  ε) (hεlt : ε < 1)
      ( : φ.IsBiased ε)
      (haccept :
        FABL.derandomizedBLRAcceptanceProbability
            φ f =
          1 - δ)
      (hnear :
        (1 + ε) / 2  (1 - 2 * δ) ^ 2) :
       γ,
        (1 - 2 * δ - ε) / (1 - ε) 
          |FABL.vectorFourierCoeff
              (FABL.realSignEncodedFunction f)
              γ|
    Exercise 6.33 in its explicit near-perfect-acceptance regime.  The displayed
    threshold guarantees, via Exercise 6.32(b), that one Fourier coefficient carries
    at least half of the spectral square mass; the unique-decoding estimate above then
    gives the sharper correlation bound.
    
Lemma6.6.26
Group: Chapter 6: Pseudorandomness and F₂-polynomials (115)
Group member previews
Preview
Proposition 6.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 4
Statement dependency previews
Preview
Theorem 1.2.3
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 6.34 (Gowers inner products and norms). Fix k\in\mathbb N_{>0}. Let (f_s)_{s\in\{0,1\}^k} be a family of functions f_s:\mathbb F_2^n\to\mathbb R. Define the kth Gowers inner product by \left\langle(f_s)_s\right\rangle_{U^k} = \mathbb E_{x,y_1,\ldots,y_k} \left[ \prod_{s\in\{0,1\}^k} f_s\!\left(x+\sum_{i:s_i=1}y_i\right) \right], where x,y_1,\ldots,y_k are independent and uniform on \mathbb F_2^n. Define \lVert f\rVert_{U^k} = \left\langle(f,f,\ldots,f)\right\rangle_{U^k}^{\,1/2^k}.

(a) Prove \langle f_0,f_1\rangle_{U^1} =\mathbb E[f_0]\mathbb E[f_1], \qquad \lVert f\rVert_{U^1}^2=\mathbb E[f]^2.

(b) Prove \langle f_{00},f_{10},f_{01},f_{11}\rangle_{U^2} = \sum_{\gamma\in\widehat{\mathbb F_2^n}} \widehat f_{00}(\gamma) \widehat f_{10}(\gamma) \widehat f_{01}(\gamma) \widehat f_{11}(\gamma), and consequently \lVert f\rVert_{U^2}^4 =\lVert\widehat f\rVert_4^4.

(c) If x' is independent of x,y_1,\ldots,y_{k-1} and uniform on \mathbb F_2^n, prove the recursive identity \begin{aligned} \left\langle(f_s)_s\right\rangle_{U^k} =\mathbb E_{y_1,\ldots,y_{k-1}} \bigg[ &\mathbb E_x \prod_{s:s_k=0} f_s\!\left(x+\sum_{\substack{i<k\\s_i=1}}y_i\right)\\ \cdot{}& \mathbb E_{x'} \prod_{s:s_k=1} f_s\!\left(x'+\sum_{\substack{i<k\\s_i=1}}y_i\right) \bigg]. \end{aligned} \tag{6.9} The restriction i<k in the two inner sums makes explicit the bound variables implicit in the book's displayed notation.

(d) Deduce that \langle(f,f,\ldots,f)\rangle_{U^k}\ge0.

(e) For b\in\{0,1\} and s\in\{0,1\}^k, put f_s^{(b)}=f_{(s_1,\ldots,s_{k-1},b)}. Using (6.9) and Cauchy--Schwarz, prove \left\langle(f_s)_s\right\rangle_{U^k} \le \sqrt{\left\langle(f_s^{(0)})_s\right\rangle_{U^k}}\, \sqrt{\left\langle(f_s^{(1)})_s\right\rangle_{U^k}}.

(f) Iterating part (e), prove the Gowers--Cauchy--Schwarz inequality \left\langle(f_s)_s\right\rangle_{U^k} \le\prod_{s\in\{0,1\}^k}\lVert f_s\rVert_{U^k}. \tag{6.10}

(g) For every f:\mathbb F_2^n\to\mathbb R, prove \lVert f\rVert_{U^k}\le\lVert f\rVert_{U^{k+1}}.

(h) Prove the triangle inequality \lVert f_0+f_1\rVert_{U^k} \le\lVert f_0\rVert_{U^k}+\lVert f_1\rVert_{U^k}, and hence prove that \lVert\cdot\rVert_{U^k} is a seminorm. One may first expand \lVert f_0+f_1\rVert_{U^k}^{2^k} = \sum_{S\subseteq\{0,1\}^k} \left\langle \bigl(f_{\mathbf1[s\in S]}\bigr)_{s\in\{0,1\}^k} \right\rangle_{U^k} and then apply (6.10).

(i) For every k\ge2, prove that this seminorm is a norm: \lVert f\rVert_{U^k}=0\quad\Longrightarrow\quad f=0.

Lean code for Lemma6.6.2647 declarations
  • abbrevdefined in FABL/Chapter06/Gowers.lean
    complete
    abbrev FABL.GowersFamily (n k : ) : Type
    abbrev FABL.GowersFamily (n k : ) : Type
    A family of real-valued binary-cube functions indexed by the vertices of a `k`-cube. 
  • defdefined in FABL/Chapter06/Gowers.lean
    complete
    def FABL.gowersCubePoint {n k : } (x : FABL.F₂Cube n)
      (y : Fin k  FABL.F₂Cube n) (s : FABL.F₂Cube k) : FABL.F₂Cube n
    def FABL.gowersCubePoint {n k : }
      (x : FABL.F₂Cube n)
      (y : Fin k  FABL.F₂Cube n)
      (s : FABL.F₂Cube k) : FABL.F₂Cube n
    The point at vertex `s` of the affine cube generated by `x` and the directions `y`. 
  • defdefined in FABL/Chapter06/Gowers.lean
    complete
    def FABL.gowersInner {n k : } (F : FABL.GowersFamily n k) : 
    def FABL.gowersInner {n k : }
      (F : FABL.GowersFamily n k) : 
    O'Donnell, Exercise 6.34: the `k`th Gowers inner product. 
  • defdefined in FABL/Chapter06/Gowers.lean
    complete
    def FABL.gowersDiagonalInner {n : } (k : ) (f : FABL.F₂Cube n  ) : 
    def FABL.gowersDiagonalInner {n : } (k : )
      (f : FABL.F₂Cube n  ) : 
    The diagonal Gowers inner product. 
  • defdefined in FABL/Chapter06/Gowers.lean
    complete
    def FABL.gowersNorm {n : } (k : ) (f : FABL.F₂Cube n  ) : 
    def FABL.gowersNorm {n : } (k : )
      (f : FABL.F₂Cube n  ) : 
    O'Donnell, Exercise 6.34: the `k`th Gowers uniformity quantity. 
  • defdefined in FABL/Chapter06/Gowers.lean
    complete
    def FABL.gowersBit (b : FABL.𝔽₂) : FABL.F₂Cube 1
    def FABL.gowersBit (b : FABL.𝔽₂) :
      FABL.F₂Cube 1
    The one-dimensional cube vertex with bit `b`. 
  • defdefined in FABL/Chapter06/Gowers.lean
    complete
    def FABL.gowersPair (a b : FABL.𝔽₂) : FABL.F₂Cube 2
    def FABL.gowersPair (a b : FABL.𝔽₂) :
      FABL.F₂Cube 2
    The two-dimensional cube vertex with first bit `a` and last bit `b`. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowersCubePoint_insertNth {n k : } (i : Fin (k + 1))
      (x h : FABL.F₂Cube n) (y : Fin k  FABL.F₂Cube n) (b : FABL.𝔽₂)
      (s : FABL.F₂Cube k) :
      FABL.gowersCubePoint x (i.insertNth h y) (i.insertNth b s) =
        FABL.gowersCubePoint (x + b  h) y s
    theorem FABL.gowersCubePoint_insertNth {n k : }
      (i : Fin (k + 1)) (x h : FABL.F₂Cube n)
      (y : Fin k  FABL.F₂Cube n)
      (b : FABL.𝔽₂) (s : FABL.F₂Cube k) :
      FABL.gowersCubePoint x (i.insertNth h y)
          (i.insertNth b s) =
        FABL.gowersCubePoint (x + b  h) y s
    Splitting both a direction tuple and a vertex tuple at the same coordinate preserves the
    affine-cube point after translating the base point by the removed contribution. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.prod_f₂Cube_succ.{u_1} {k : } {M : Type u_1} [CommMonoid M]
      (f : FABL.F₂Cube (k + 1)  M) :
       s, f s = (∏ t, f (Fin.snoc t 0)) *  t, f (Fin.snoc t 1)
    theorem FABL.prod_f₂Cube_succ.{u_1} {k : }
      {M : Type u_1} [CommMonoid M]
      (f : FABL.F₂Cube (k + 1)  M) :
       s, f s =
        (∏ t, f (Fin.snoc t 0)) *
           t, f (Fin.snoc t 1)
    The product over binary vertices splits according to the last bit. 
  • theoremdefined in FABL/Chapter01/CubeCardinality.lean
    complete
    theorem FABL.card_f₂Cube (n : ) : Fintype.card (FABL.F₂Cube n) = 2 ^ n
    theorem FABL.card_f₂Cube (n : ) :
      Fintype.card (FABL.F₂Cube n) = 2 ^ n
    The binary cube has `2^n` vertices. 
  • defdefined in FABL/Chapter06/Gowers.lean
    complete
    def FABL.gowersHalfProductAt {n k : } (F : FABL.GowersFamily n (k + 1))
      (i : Fin (k + 1)) (b : FABL.𝔽₂) (x : FABL.F₂Cube n)
      (y : Fin k  FABL.F₂Cube n) : 
    def FABL.gowersHalfProductAt {n k : }
      (F : FABL.GowersFamily n (k + 1))
      (i : Fin (k + 1)) (b : FABL.𝔽₂)
      (x : FABL.F₂Cube n)
      (y : Fin k  FABL.F₂Cube n) : 
    The half-cube product obtained by fixing coordinate `i` to `b`. 
  • defdefined in FABL/Chapter06/Gowers.lean
    complete
    def FABL.gowersHalfExpectationAt {n k : } (F : FABL.GowersFamily n (k + 1))
      (i : Fin (k + 1)) (b : FABL.𝔽₂) (y : Fin k  FABL.F₂Cube n) : 
    def FABL.gowersHalfExpectationAt {n k : }
      (F : FABL.GowersFamily n (k + 1))
      (i : Fin (k + 1)) (b : FABL.𝔽₂)
      (y : Fin k  FABL.F₂Cube n) : 
    The half-cube expectation obtained by fixing coordinate `i` to `b`. 
  • defdefined in FABL/Chapter06/Gowers.lean
    complete
    def FABL.gowersHalfExpectation {n k : } (F : FABL.GowersFamily n (k + 1))
      (b : FABL.𝔽₂) (y : Fin k  FABL.F₂Cube n) : 
    def FABL.gowersHalfExpectation {n k : }
      (F : FABL.GowersFamily n (k + 1))
      (b : FABL.𝔽₂)
      (y : Fin k  FABL.F₂Cube n) : 
    The half-cube expectation obtained by fixing the last coordinate. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowersInner_split_at {n k : } (F : FABL.GowersFamily n (k + 1))
      (i : Fin (k + 1)) :
      FABL.gowersInner F =
        Finset.univ.expect fun y =>
          FABL.gowersHalfExpectationAt F i 0 y *
            FABL.gowersHalfExpectationAt F i 1 y
    theorem FABL.gowersInner_split_at {n k : }
      (F : FABL.GowersFamily n (k + 1))
      (i : Fin (k + 1)) :
      FABL.gowersInner F =
        Finset.univ.expect fun y =>
          FABL.gowersHalfExpectationAt F i 0
              y *
            FABL.gowersHalfExpectationAt F i 1
              y
    Exercise 6.34(c), in coordinate-independent form: removing any direction makes the two
    half-cube base points independent. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowersInner_succ {n k : } (F : FABL.GowersFamily n (k + 1)) :
      FABL.gowersInner F =
        Finset.univ.expect fun y =>
          FABL.gowersHalfExpectation F 0 y *
            FABL.gowersHalfExpectation F 1 y
    theorem FABL.gowersInner_succ {n k : }
      (F : FABL.GowersFamily n (k + 1)) :
      FABL.gowersInner F =
        Finset.univ.expect fun y =>
          FABL.gowersHalfExpectation F 0 y *
            FABL.gowersHalfExpectation F 1 y
    Exercise 6.34(c), equation (6.9), with the last coordinate split off. 
  • defdefined in FABL/Chapter06/Gowers.lean
    complete
    def FABL.gowersDuplicateAt {n k : } (F : FABL.GowersFamily n k) (i : Fin k)
      (b : FABL.𝔽₂) : FABL.GowersFamily n k
    def FABL.gowersDuplicateAt {n k : }
      (F : FABL.GowersFamily n k) (i : Fin k)
      (b : FABL.𝔽₂) : FABL.GowersFamily n k
    Overwriting one cube coordinate produces the duplicated family used in the
    Gowers--Cauchy--Schwarz iteration. 
  • defdefined in FABL/Chapter06/Gowers.lean
    complete
    def FABL.gowersLastDuplicate {n k : } (F : FABL.GowersFamily n (k + 1))
      (b : FABL.𝔽₂) : FABL.GowersFamily n (k + 1)
    def FABL.gowersLastDuplicate {n k : }
      (F : FABL.GowersFamily n (k + 1))
      (b : FABL.𝔽₂) :
      FABL.GowersFamily n (k + 1)
    The book's family `f_s^(b)`, obtained by copying the `b` half across the last bit. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowersLastDuplicate_apply {n k : }
      (F : FABL.GowersFamily n (k + 1)) (b : FABL.𝔽₂)
      (s : FABL.F₂Cube (k + 1)) :
      FABL.gowersLastDuplicate F b s = F (Fin.snoc (Fin.init s) b)
    theorem FABL.gowersLastDuplicate_apply {n k : }
      (F : FABL.GowersFamily n (k + 1))
      (b : FABL.𝔽₂)
      (s : FABL.F₂Cube (k + 1)) :
      FABL.gowersLastDuplicate F b s =
        F (Fin.snoc (Fin.init s) b)
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowersInner_duplicateAt {n k : } (F : FABL.GowersFamily n (k + 1))
      (i : Fin (k + 1)) (b : FABL.𝔽₂) :
      FABL.gowersInner (FABL.gowersDuplicateAt F i b) =
        Finset.univ.expect fun y => FABL.gowersHalfExpectationAt F i b y ^ 2
    theorem FABL.gowersInner_duplicateAt {n k : }
      (F : FABL.GowersFamily n (k + 1))
      (i : Fin (k + 1)) (b : FABL.𝔽₂) :
      FABL.gowersInner
          (FABL.gowersDuplicateAt F i b) =
        Finset.univ.expect fun y =>
          FABL.gowersHalfExpectationAt F i b
              y ^
            2
    The inner product of a duplicated family is the expectation of a square. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowersInner_duplicateAt_nonneg {n k : }
      (F : FABL.GowersFamily n (k + 1)) (i : Fin (k + 1)) (b : FABL.𝔽₂) :
      0  FABL.gowersInner (FABL.gowersDuplicateAt F i b)
    theorem FABL.gowersInner_duplicateAt_nonneg
      {n k : }
      (F : FABL.GowersFamily n (k + 1))
      (i : Fin (k + 1)) (b : FABL.𝔽₂) :
      0 
        FABL.gowersInner
          (FABL.gowersDuplicateAt F i b)
    Every duplicated-family inner product is nonnegative. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowersDiagonalInner_nonneg {n : } (k : )
      (f : FABL.F₂Cube n  ) : 0  FABL.gowersDiagonalInner (k + 1) f
    theorem FABL.gowersDiagonalInner_nonneg {n : }
      (k : ) (f : FABL.F₂Cube n  ) :
      0  FABL.gowersDiagonalInner (k + 1) f
    Exercise 6.34(d): every diagonal Gowers inner product of positive dimension is
    nonnegative. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowersNorm_nonneg {n k : } (hk : 0 < k) (f : FABL.F₂Cube n  ) :
      0  FABL.gowersNorm k f
    theorem FABL.gowersNorm_nonneg {n k : }
      (hk : 0 < k) (f : FABL.F₂Cube n  ) :
      0  FABL.gowersNorm k f
    The Gowers quantity is nonnegative in every positive dimension. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowersNorm_pow {n k : } (hk : 0 < k) (f : FABL.F₂Cube n  ) :
      FABL.gowersNorm k f ^ 2 ^ k = FABL.gowersDiagonalInner k f
    theorem FABL.gowersNorm_pow {n k : } (hk : 0 < k)
      (f : FABL.F₂Cube n  ) :
      FABL.gowersNorm k f ^ 2 ^ k =
        FABL.gowersDiagonalInner k f
    Raising a positive-dimensional Gowers quantity to `2^k` recovers its diagonal inner
    product. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowers_cauchy_schwarz_at {n k : } (F : FABL.GowersFamily n k)
      (i : Fin k) :
      FABL.gowersInner F 
        (FABL.gowersInner (FABL.gowersDuplicateAt F i 0)) *
          (FABL.gowersInner (FABL.gowersDuplicateAt F i 1))
    theorem FABL.gowers_cauchy_schwarz_at {n k : }
      (F : FABL.GowersFamily n k)
      (i : Fin k) :
      FABL.gowersInner F 
        (FABL.gowersInner
              (FABL.gowersDuplicateAt F i
                0)) *
          (FABL.gowersInner
              (FABL.gowersDuplicateAt F i 1))
    Exercise 6.34(e), with an arbitrary coordinate chosen for the duplicated halves. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowers_cauchy_schwarz_last {n k : }
      (F : FABL.GowersFamily n (k + 1)) :
      FABL.gowersInner F 
        (FABL.gowersInner (FABL.gowersLastDuplicate F 0)) *
          (FABL.gowersInner (FABL.gowersLastDuplicate F 1))
    theorem FABL.gowers_cauchy_schwarz_last {n k : }
      (F : FABL.GowersFamily n (k + 1)) :
      FABL.gowersInner F 
        (FABL.gowersInner
              (FABL.gowersLastDuplicate F
                0)) *
          (FABL.gowersInner
              (FABL.gowersLastDuplicate F 1))
    Exercise 6.34(e): Cauchy--Schwarz for the two families obtained by fixing the last bit. 
  • defdefined in FABL/Chapter06/Gowers.lean
    complete
    def FABL.gowersLiftFamilyAlong {n k r : } (e : Fin r  Fin k)
      (F : FABL.GowersFamily n r) : FABL.GowersFamily n k
    def FABL.gowersLiftFamilyAlong {n k r : }
      (e : Fin r  Fin k)
      (F : FABL.GowersFamily n r) :
      FABL.GowersFamily n k
    A vertex family restricted along an embedding of its active coordinates. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowersDuplicateAt_liftFamilyAlong {n k r : }
      (e : Fin (r + 1)  Fin k) (F : FABL.GowersFamily n (r + 1))
      (b : FABL.𝔽₂) :
      FABL.gowersDuplicateAt (FABL.gowersLiftFamilyAlong e F)
          (e (Fin.last r)) b =
        FABL.gowersLiftFamilyAlong (Fin.castSuccEmb.trans e) fun s =>
          F (Fin.snoc s b)
    theorem FABL.gowersDuplicateAt_liftFamilyAlong
      {n k r : } (e : Fin (r + 1)  Fin k)
      (F : FABL.GowersFamily n (r + 1))
      (b : FABL.𝔽₂) :
      FABL.gowersDuplicateAt
          (FABL.gowersLiftFamilyAlong e F)
          (e (Fin.last r)) b =
        FABL.gowersLiftFamilyAlong
          (Fin.castSuccEmb.trans e) fun s =>
          F (Fin.snoc s b)
    Fixing the last active coordinate of a lifted family gives the corresponding lifted
    half-family. 
  • defdefined in FABL/Chapter06/Gowers.lean
    complete
    def FABL.gowersCSBound {n : } (k r : ) : FABL.GowersFamily n r  
    def FABL.gowersCSBound {n : } (k r : ) :
      FABL.GowersFamily n r  
    The iterated Cauchy--Schwarz expression for an `r`-dimensional family, with all leaf
    diagonal products evaluated in ambient dimension `k`. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowersInner_liftFamilyAlong_le_csBound {n k r : }
      (e : Fin r  Fin k) (F : FABL.GowersFamily n r) :
      FABL.gowersInner (FABL.gowersLiftFamilyAlong e F) 
        FABL.gowersCSBound k r F
    theorem FABL.gowersInner_liftFamilyAlong_le_csBound
      {n k r : } (e : Fin r  Fin k)
      (F : FABL.GowersFamily n r) :
      FABL.gowersInner
          (FABL.gowersLiftFamilyAlong e F) 
        FABL.gowersCSBound k r F
    Iterating the one-coordinate Cauchy--Schwarz inequality bounds every lifted active family
    by its Cauchy--Schwarz leaf expression. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowersCSBound_eq_prod_rpow {n k : } (hk : 0 < k) (r : )
      (F : FABL.GowersFamily n r) :
      FABL.gowersCSBound k r F =
         s, FABL.gowersDiagonalInner k (F s) ^ (↑(2 ^ r))⁻¹
    theorem FABL.gowersCSBound_eq_prod_rpow {n k : }
      (hk : 0 < k) (r : )
      (F : FABL.GowersFamily n r) :
      FABL.gowersCSBound k r F =
         s,
          FABL.gowersDiagonalInner k (F s) ^
            (↑(2 ^ r))⁻¹
    The iterated Cauchy--Schwarz expression is the product of equal fractional powers of its
    diagonal leaves. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowersCSBound_eq_prod_norm {n k : } (hk : 0 < k)
      (F : FABL.GowersFamily n k) :
      FABL.gowersCSBound k k F =  s, FABL.gowersNorm k (F s)
    theorem FABL.gowersCSBound_eq_prod_norm {n k : }
      (hk : 0 < k)
      (F : FABL.GowersFamily n k) :
      FABL.gowersCSBound k k F =
         s, FABL.gowersNorm k (F s)
    At full depth, the Cauchy--Schwarz leaf expression is the product of Gowers quantities. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowers_cauchy_schwarz {n k : } (hk : 0 < k)
      (F : FABL.GowersFamily n k) :
      FABL.gowersInner F   s, FABL.gowersNorm k (F s)
    theorem FABL.gowers_cauchy_schwarz {n k : }
      (hk : 0 < k)
      (F : FABL.GowersFamily n k) :
      FABL.gowersInner F 
         s, FABL.gowersNorm k (F s)
    Exercise 6.34(f), equation (6.10): the Gowers--Cauchy--Schwarz inequality. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowersInner_one_eq {n : } (F : FABL.GowersFamily n 1) :
      FABL.gowersInner F =
        FABL.mean (F (FABL.gowersBit 0)) * FABL.mean (F (FABL.gowersBit 1))
    theorem FABL.gowersInner_one_eq {n : }
      (F : FABL.GowersFamily n 1) :
      FABL.gowersInner F =
        FABL.mean (F (FABL.gowersBit 0)) *
          FABL.mean (F (FABL.gowersBit 1))
    Exercise 6.34(a): the first Gowers inner product is the product of the two means. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowersNorm_one_sq {n : } (f : FABL.F₂Cube n  ) :
      FABL.gowersNorm 1 f ^ 2 = FABL.mean f ^ 2
    theorem FABL.gowersNorm_one_sq {n : }
      (f : FABL.F₂Cube n  ) :
      FABL.gowersNorm 1 f ^ 2 =
        FABL.mean f ^ 2
    Exercise 6.34(a): the square of `U¹` is the square of the mean. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowersInner_two_eq_fourier {n : } (F : FABL.GowersFamily n 2) :
      FABL.gowersInner F =
         γ,
          FABL.vectorFourierCoeff (F (FABL.gowersPair 0 0)) γ *
                FABL.vectorFourierCoeff (F (FABL.gowersPair 1 0)) γ *
              FABL.vectorFourierCoeff (F (FABL.gowersPair 0 1)) γ *
            FABL.vectorFourierCoeff (F (FABL.gowersPair 1 1)) γ
    theorem FABL.gowersInner_two_eq_fourier {n : }
      (F : FABL.GowersFamily n 2) :
      FABL.gowersInner F =
         γ,
          FABL.vectorFourierCoeff
                  (F (FABL.gowersPair 0 0))
                  γ *
                FABL.vectorFourierCoeff
                  (F (FABL.gowersPair 1 0))
                  γ *
              FABL.vectorFourierCoeff
                (F (FABL.gowersPair 0 1)) γ *
            FABL.vectorFourierCoeff
              (F (FABL.gowersPair 1 1)) γ
    Exercise 6.34(b): the mixed `U²` inner product is the pointwise fourth Fourier
    coefficient sum. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowersNorm_two_pow_four_eq {n : } (f : FABL.F₂Cube n  ) :
      FABL.gowersNorm 2 f ^ 4 = FABL.vectorFourierFourthMoment f
    theorem FABL.gowersNorm_two_pow_four_eq {n : }
      (f : FABL.F₂Cube n  ) :
      FABL.gowersNorm 2 f ^ 4 =
        FABL.vectorFourierFourthMoment f
    Exercise 6.34(b): the fourth power of `U²` is the fourth spectral moment. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowersNorm_one {n k : } (hk : 0 < k) :
      (FABL.gowersNorm k fun x => 1) = 1
    theorem FABL.gowersNorm_one {n k : }
      (hk : 0 < k) :
      (FABL.gowersNorm k fun x => 1) = 1
    The constant-one function has Gowers quantity one in every positive dimension. 
  • defdefined in FABL/Chapter06/Gowers.lean
    complete
    def FABL.gowersMonotonicityFamily {n k : } (f : FABL.F₂Cube n  ) :
      FABL.GowersFamily n (k + 1)
    def FABL.gowersMonotonicityFamily {n k : }
      (f : FABL.F₂Cube n  ) :
      FABL.GowersFamily n (k + 1)
    The family used to compare consecutive Gowers quantities. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowersNorm_mono {n k : } (hk : 0 < k) (f : FABL.F₂Cube n  ) :
      FABL.gowersNorm k f  FABL.gowersNorm (k + 1) f
    theorem FABL.gowersNorm_mono {n k : }
      (hk : 0 < k) (f : FABL.F₂Cube n  ) :
      FABL.gowersNorm k f 
        FABL.gowersNorm (k + 1) f
    Exercise 6.34(g): Gowers quantities are monotone in their positive dimension. 
  • defdefined in FABL/Chapter06/Gowers.lean
    complete
    def FABL.gowersChoiceFamily {n k : } (f g : FABL.F₂Cube n  )
      (A : Finset (FABL.F₂Cube k)) : FABL.GowersFamily n k
    def FABL.gowersChoiceFamily {n k : }
      (f g : FABL.F₂Cube n  )
      (A : Finset (FABL.F₂Cube k)) :
      FABL.GowersFamily n k
    Select `f` or `g` independently at every vertex of the Gowers cube. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowersDiagonalInner_add_expansion {n k : }
      (f g : FABL.F₂Cube n  ) :
      FABL.gowersDiagonalInner k (f + g) =
         A, FABL.gowersInner (FABL.gowersChoiceFamily f g A)
    theorem FABL.gowersDiagonalInner_add_expansion
      {n k : } (f g : FABL.F₂Cube n  ) :
      FABL.gowersDiagonalInner k (f + g) =
         A,
          FABL.gowersInner
            (FABL.gowersChoiceFamily f g A)
    The diagonal inner product of a sum expands into all vertexwise choices of the two
    summands. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowersNorm_add_le {n k : } (hk : 0 < k)
      (f g : FABL.F₂Cube n  ) :
      FABL.gowersNorm k (f + g)  FABL.gowersNorm k f + FABL.gowersNorm k g
    theorem FABL.gowersNorm_add_le {n k : }
      (hk : 0 < k) (f g : FABL.F₂Cube n  ) :
      FABL.gowersNorm k (f + g) 
        FABL.gowersNorm k f +
          FABL.gowersNorm k g
    Exercise 6.34(h): the Gowers quantity satisfies the triangle inequality. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowersDiagonalInner_smul {n k : } (a : )
      (f : FABL.F₂Cube n  ) :
      FABL.gowersDiagonalInner k (a  f) =
        a ^ 2 ^ k * FABL.gowersDiagonalInner k f
    theorem FABL.gowersDiagonalInner_smul {n k : }
      (a : ) (f : FABL.F₂Cube n  ) :
      FABL.gowersDiagonalInner k (a  f) =
        a ^ 2 ^ k *
          FABL.gowersDiagonalInner k f
    Scaling every vertex factor scales the diagonal inner product by the corresponding
    `2^k`th power. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowersNorm_smul {n k : } (hk : 0 < k) (a : )
      (f : FABL.F₂Cube n  ) :
      FABL.gowersNorm k (a  f) = |a| * FABL.gowersNorm k f
    theorem FABL.gowersNorm_smul {n k : }
      (hk : 0 < k) (a : )
      (f : FABL.F₂Cube n  ) :
      FABL.gowersNorm k (a  f) =
        |a| * FABL.gowersNorm k f
    The Gowers quantity is absolutely homogeneous. 
  • defdefined in FABL/Chapter06/Gowers.lean
    complete
    def FABL.gowersSeminorm {n : } (k : ) (hk : 0 < k) :
      Seminorm  (FABL.F₂Cube n  )
    def FABL.gowersSeminorm {n : } (k : )
      (hk : 0 < k) :
      Seminorm  (FABL.F₂Cube n  )
    Exercise 6.34(h): the positive-dimensional Gowers quantity as a Mathlib `Seminorm`. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.gowersNorm_two_le {n k : } (hk : 2  k) (f : FABL.F₂Cube n  ) :
      FABL.gowersNorm 2 f  FABL.gowersNorm k f
    theorem FABL.gowersNorm_two_le {n k : }
      (hk : 2  k) (f : FABL.F₂Cube n  ) :
      FABL.gowersNorm 2 f 
        FABL.gowersNorm k f
    Every `U²` quantity is bounded by every higher-dimensional Gowers quantity. 
  • theoremdefined in FABL/Chapter06/Gowers.lean
    complete
    theorem FABL.eq_zero_of_gowersNorm_eq_zero {n k : } (hk : 2  k)
      (f : FABL.F₂Cube n  ) (hf : FABL.gowersNorm k f = 0) : f = 0
    theorem FABL.eq_zero_of_gowersNorm_eq_zero
      {n k : } (hk : 2  k)
      (f : FABL.F₂Cube n  )
      (hf : FABL.gowersNorm k f = 0) : f = 0
    Exercise 6.34(i): for `k ≥ 2`, vanishing Gowers quantity implies that the function
    vanishes.