Analysis of Boolean Functions in Lean

6.4. Applications in learning and testing🔗

Theorem6.4.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
Definition 2.1.4
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0XL∃∀N

Open problem (learning juntas from random examples). It is not known whether k-juntas for any unbounded k=\omega(1) can be learned from random examples in \operatorname{poly}(n) time. In particular, learning O(\log n)-juntas this way is a necessary prerequisite for polynomial-time random-example learning of polynomial-size decision trees, DNFs, or CNFs.

Lemma6.4.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 1L∃∀N

Fourier gap for juntas. If f:\{-1,1\}^n\to\{-1,1\} is a k-junta, then every Fourier coefficient \widehat f(S) is either 0 or has |\widehat f(S)|\ge2^{-k}. Whenever \widehat f(S)\ne0, every coordinate i\in S is relevant for f.

Lean code for Lemma6.4.24 theorems
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaFourierGap.lean
    complete
    theorem FABL.inv_two_pow_card_le_abs_fourierCoeff_of_dependsOn {n : }
      (f : FABL.BooleanFunction n) (J S : Finset (Fin n))
      (hdepends : DependsOn f J)
      (hcoeff : FABL.fourierCoeff f.toReal S  0) :
      1 / 2 ^ J.card  |FABL.fourierCoeff f.toReal S|
    theorem FABL.inv_two_pow_card_le_abs_fourierCoeff_of_dependsOn
      {n : } (f : FABL.BooleanFunction n)
      (J S : Finset (Fin n))
      (hdepends : DependsOn f J)
      (hcoeff :
        FABL.fourierCoeff f.toReal S  0) :
      1 / 2 ^ J.card 
        |FABL.fourierCoeff f.toReal S|
    Strong form of the junta Fourier gap: if `f` depends on `J`, every nonzero coefficient
    has magnitude at least `2^(-|J|)`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaFourierGap.lean
    complete
    theorem FABL.isRelevant_toReal_of_fourierCoeff_ne_zero {n : }
      (f : FABL.BooleanFunction n) {S : Finset (Fin n)} {i : Fin n}
      (hcoeff : FABL.fourierCoeff f.toReal S  0) (hiS : i  S) :
      FABL.IsRelevant f.toReal i
    theorem FABL.isRelevant_toReal_of_fourierCoeff_ne_zero
      {n : } (f : FABL.BooleanFunction n)
      {S : Finset (Fin n)} {i : Fin n}
      (hcoeff :
        FABL.fourierCoeff f.toReal S  0)
      (hiS : i  S) :
      FABL.IsRelevant f.toReal i
    A nonzero Fourier coefficient witnesses relevance of each coordinate in its frequency. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaFourierGap.lean
    complete
    theorem FABL.fourierCoeff_eq_zero_or_inv_two_pow_le_abs_of_isKJunta {n k : }
      (f : FABL.BooleanFunction n) (hjunta : FABL.IsKJunta f k)
      (S : Finset (Fin n)) :
      FABL.fourierCoeff f.toReal S = 0 
        1 / 2 ^ k  |FABL.fourierCoeff f.toReal S|
    theorem FABL.fourierCoeff_eq_zero_or_inv_two_pow_le_abs_of_isKJunta
      {n k : } (f : FABL.BooleanFunction n)
      (hjunta : FABL.IsKJunta f k)
      (S : Finset (Fin n)) :
      FABL.fourierCoeff f.toReal S = 0 
        1 / 2 ^ k 
          |FABL.fourierCoeff f.toReal S|
    Fourier gap for a Boolean `k`-junta, in reciprocal-natural-power form. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaFourierGap.lean
    complete
    theorem FABL.fourierCoeff_eq_zero_or_two_zpow_neg_le_abs_of_isKJunta {n k : }
      (f : FABL.BooleanFunction n) (hjunta : FABL.IsKJunta f k)
      (S : Finset (Fin n)) :
      FABL.fourierCoeff f.toReal S = 0 
        2 ^ (-k)  |FABL.fourierCoeff f.toReal S|
    theorem FABL.fourierCoeff_eq_zero_or_two_zpow_neg_le_abs_of_isKJunta
      {n k : } (f : FABL.BooleanFunction n)
      (hjunta : FABL.IsKJunta f k)
      (S : Finset (Fin n)) :
      FABL.fourierCoeff f.toReal S = 0 
        2 ^ (-k) 
          |FABL.fourierCoeff f.toReal S|
    The same junta Fourier gap written with an integer negative exponent. 
Theorem6.4.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 6
Statement dependency previews
Preview
Definition 3.4.1
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Theorem 6.36. For k\le O(\log n), the concept class \mathcal C =\{f:\mathbb F_2^n\to\mathbb F_2:f\text{ is a }k\text{-junta}\} can be learned exactly from random examples in time n^{(3/4)k}\operatorname{poly}(n). Thus the output agrees with the target on every input, with the constant high success probability of the learning model.

Lean code for Theorem6.4.328 declarations
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaLearning.lean
    complete
    def FABL.lowDegreeJuntaCutoff (k : ) : 
    def FABL.lowDegreeJuntaCutoff (k : ) : 
    The Fourier-enumeration cutoff `⌊3k/4⌋` in Theorem 6.36. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaLearning.lean
    complete
    def FABL.lowDegreeJuntaPolynomialDegree (k : ) : 
    def FABL.lowDegreeJuntaPolynomialDegree
      (k : ) : 
    The complementary algebraic-degree budget after the Fourier scan. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaLearningAlgorithm.lean
    complete
    def FABL.kJuntaConceptClass (n k : ) : Set (FABL.BooleanFunction n)
    def FABL.kJuntaConceptClass (n k : ) :
      Set (FABL.BooleanFunction n)
    The concept class of sign-valued functions depending on at most `k` coordinates. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaLearningAlgorithm.lean
    complete
    def FABL.lowDegreeJuntaLearningFailure : FABL.PositiveLearningParameter
    def FABL.lowDegreeJuntaLearningFailure :
      FABL.PositiveLearningParameter
    The fixed Theorem 6.36 failure budget; its success probability is stronger than Definition
    3.27's required threshold `9 / 10`. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaLearningAlgorithm.lean
    complete
    def FABL.lowDegreeJuntaHypothesisOfOutput {n : } :
      Option (FABL.DecisionTree n FABL.Sign)  FABL.DecisionTreeHypothesis n
    def FABL.lowDegreeJuntaHypothesisOfOutput
      {n : } :
      Option (FABL.DecisionTree n FABL.Sign) 
        FABL.DecisionTreeHypothesis n
    Total raw hypothesis produced at the boundary of the optional exact learner. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaLearningAlgorithm.lean
    complete
    def FABL.lowDegreeJuntaLearningProgram (n k : )
      (_accuracy : FABL.LearningAccuracy) :
      FABL.LearningProgram n FABL.LearningAccess.randomExamples
        (FABL.DecisionTreeHypothesis n)
    def FABL.lowDegreeJuntaLearningProgram
      (n k : )
      (_accuracy : FABL.LearningAccuracy) :
      FABL.LearningProgram n
        FABL.LearningAccess.randomExamples
        (FABL.DecisionTreeHypothesis n)
    Definition 3.27 program obtained by erasing the exact learner's dependent tree index. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaLearningAlgorithm.lean
    complete
    def FABL.lowDegreeJuntaLearningAlgorithm (n k : ) :
      FABL.LearningAlgorithm n FABL.LearningAccess.randomExamples
        (FABL.DecisionTreeHypothesis.finiteRepresentation n)
    def FABL.lowDegreeJuntaLearningAlgorithm
      (n k : ) :
      FABL.LearningAlgorithm n
        FABL.LearningAccess.randomExamples
        (FABL.DecisionTreeHypothesis.finiteRepresentation
          n)
    The exact junta learner as an honest Definition 3.27 random-example learning algorithm. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaLearningAlgorithm.lean
    complete
    theorem FABL.lowDegreeJuntaLearningAlgorithm_successProbability_ge {n : }
      (target : FABL.BooleanFunction n) (k : )
      (hjunta : FABL.IsKJunta target k)
      (accuracy : FABL.LearningAccuracy) :
      9 / 10 
        (FABL.lowDegreeJuntaLearningAlgorithm n k).successProbability target
          accuracy
    theorem FABL.lowDegreeJuntaLearningAlgorithm_successProbability_ge
      {n : }
      (target : FABL.BooleanFunction n)
      (k : )
      (hjunta : FABL.IsKJunta target k)
      (accuracy : FABL.LearningAccuracy) :
      9 / 10 
        (FABL.lowDegreeJuntaLearningAlgorithm
              n k).successProbability
          target accuracy
    Every `k`-junta is output accurately with Definition 3.27 probability at least `9 / 10`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaLearningAlgorithm.lean
    complete
    theorem FABL.lowDegreeJuntaLearningAlgorithm_learns (n k : )
      (accuracy : FABL.LearningAccuracy) :
      FABL.LearnsConceptClassWithError
        (FABL.lowDegreeJuntaLearningAlgorithm n k)
        (FABL.kJuntaConceptClass n k) accuracy
    theorem FABL.lowDegreeJuntaLearningAlgorithm_learns
      (n k : )
      (accuracy : FABL.LearningAccuracy) :
      FABL.LearnsConceptClassWithError
        (FABL.lowDegreeJuntaLearningAlgorithm
          n k)
        (FABL.kJuntaConceptClass n k) accuracy
    The concrete Definition 3.27 algorithm learns the class of `k`-juntas at every requested
    uniform-distribution error. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaLearning.lean
    complete
    def FABL.lowDegreeJuntaLearnerProgram (n k : )
      (failure : FABL.PositiveLearningParameter) :
      FABL.LearningProgram n FABL.LearningAccess.randomExamples
        (Option (FABL.DecisionTree n FABL.Sign))
    def FABL.lowDegreeJuntaLearnerProgram
      (n k : )
      (failure :
        FABL.PositiveLearningParameter) :
      FABL.LearningProgram n
        FABL.LearningAccess.randomExamples
        (Option
          (FABL.DecisionTree n FABL.Sign))
    Theorem 6.36's complete exact learner, obtained by the Exercise 6.31 recursion from the
    concrete Lemma 6.37 finder. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaLearning.lean
    complete
    theorem FABL.lowDegreeJuntaLearnerProgram_failureProbability_le {n : }
      (target : FABL.BooleanFunction n) (k : )
      (hjunta : FABL.IsKJunta target k)
      (failure : FABL.PositiveLearningParameter) :
      ((FABL.lowDegreeJuntaLearnerProgram n k failure).eventProbability
          target fun outcome =>
          FABL.JuntaLearnerOutputBad target outcome.1) 
        failure
    theorem FABL.lowDegreeJuntaLearnerProgram_failureProbability_le
      {n : }
      (target : FABL.BooleanFunction n)
      (k : )
      (hjunta : FABL.IsKJunta target k)
      (failure :
        FABL.PositiveLearningParameter) :
      ((FABL.lowDegreeJuntaLearnerProgram n k
              failure).eventProbability
          target fun outcome =>
          FABL.JuntaLearnerOutputBad target
            outcome.1) 
        failure
    The complete learner exactly computes every `k`-junta except with the requested total failure
    probability. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaLearning.lean
    complete
    theorem FABL.lowDegreeJuntaLearnerProgram_depth_le {n : }
      (target : FABL.BooleanFunction n) (k : )
      (failure : FABL.PositiveLearningParameter)
      (outcome : Option (FABL.DecisionTree n FABL.Sign) × FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost target
              (FABL.lowDegreeJuntaLearnerProgram n k failure)).support)
      (tree : FABL.DecisionTree n FABL.Sign)
      (htree : outcome.1 = some tree) : FABL.F₂DecisionTree.depth tree  k
    theorem FABL.lowDegreeJuntaLearnerProgram_depth_le
      {n : }
      (target : FABL.BooleanFunction n)
      (k : )
      (failure :
        FABL.PositiveLearningParameter)
      (outcome :
        Option
            (FABL.DecisionTree n FABL.Sign) ×
          FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost
              target
              (FABL.lowDegreeJuntaLearnerProgram
                n k failure)).support)
      (tree : FABL.DecisionTree n FABL.Sign)
      (htree : outcome.1 = some tree) :
      FABL.F₂DecisionTree.depth tree  k
    Every successful exact hypothesis has decision-tree depth at most `k`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaLearning.lean
    complete
    theorem FABL.lowDegreeJuntaLearnerProgram_cost_le {n : }
      (target : FABL.BooleanFunction n) (k : )
      (failure : FABL.PositiveLearningParameter)
      (outcome : Option (FABL.DecisionTree n FABL.Sign) × FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost target
              (FABL.lowDegreeJuntaLearnerProgram n k failure)).support) :
      outcome.2.randomExamples 
          FABL.juntaTreeCallCount k *
            FABL.lowDegreeJuntaNodeRandomExampleBound n k
              (FABL.juntaTreePerCallFailure k failure) 
        outcome.2.queries = 0 
          outcome.2.work 
            FABL.juntaTreeCallCount k *
              FABL.lowDegreeJuntaNodeUniformWorkBound n k
                (FABL.juntaTreePerCallFailure k failure)
    theorem FABL.lowDegreeJuntaLearnerProgram_cost_le
      {n : }
      (target : FABL.BooleanFunction n)
      (k : )
      (failure :
        FABL.PositiveLearningParameter)
      (outcome :
        Option
            (FABL.DecisionTree n FABL.Sign) ×
          FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost
              target
              (FABL.lowDegreeJuntaLearnerProgram
                n k failure)).support) :
      outcome.2.randomExamples 
          FABL.juntaTreeCallCount k *
            FABL.lowDegreeJuntaNodeRandomExampleBound
              n k
              (FABL.juntaTreePerCallFailure k
                failure) 
        outcome.2.queries = 0 
          outcome.2.work 
            FABL.juntaTreeCallCount k *
              FABL.lowDegreeJuntaNodeUniformWorkBound
                n k
                (FABL.juntaTreePerCallFailure
                  k failure)
    Constructor-derived pathwise oracle and local-work closure for the complete learner. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaResources.lean
    complete
    def FABL.lowDegreeJuntaTotalRandomExampleBudget (n k : )
      (failure : FABL.PositiveLearningParameter) : 
    def FABL.lowDegreeJuntaTotalRandomExampleBudget
      (n k : )
      (failure :
        FABL.PositiveLearningParameter) :
      
    Total ambient random-example budget for the complete depth-`k` learner. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaResources.lean
    complete
    def FABL.lowDegreeJuntaTotalWorkBudget (n k : )
      (failure : FABL.PositiveLearningParameter) : 
    def FABL.lowDegreeJuntaTotalWorkBudget
      (n k : )
      (failure :
        FABL.PositiveLearningParameter) :
      
    Total charged local-work budget for the complete depth-`k` learner. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaResources.lean
    complete
    theorem FABL.lowDegreeJuntaLearnerProgram_cost_le_totalBudget {n : }
      (target : FABL.BooleanFunction n) (k : )
      (failure : FABL.PositiveLearningParameter)
      (outcome : Option (FABL.DecisionTree n FABL.Sign) × FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost target
              (FABL.lowDegreeJuntaLearnerProgram n k failure)).support) :
      outcome.2.randomExamples 
          FABL.lowDegreeJuntaTotalRandomExampleBudget n k failure 
        outcome.2.queries = 0 
          outcome.2.work  FABL.lowDegreeJuntaTotalWorkBudget n k failure
    theorem FABL.lowDegreeJuntaLearnerProgram_cost_le_totalBudget
      {n : }
      (target : FABL.BooleanFunction n)
      (k : )
      (failure :
        FABL.PositiveLearningParameter)
      (outcome :
        Option
            (FABL.DecisionTree n FABL.Sign) ×
          FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost
              target
              (FABL.lowDegreeJuntaLearnerProgram
                n k failure)).support) :
      outcome.2.randomExamples 
          FABL.lowDegreeJuntaTotalRandomExampleBudget
            n k failure 
        outcome.2.queries = 0 
          outcome.2.work 
            FABL.lowDegreeJuntaTotalWorkBudget
              n k failure
    Every execution path of the recursive learner is controlled by the explicit whole-tree
    random-example and local-work budgets. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaLearning.lean
    complete
    theorem FABL.lowDegreeJuntaRuntimeExponentLedger (k : ) :
      FABL.lowDegreeJuntaCutoff k  FABL.lowDegreeJuntaCutoff k + 3 
        3 * FABL.lowDegreeJuntaPolynomialDegree k 
          FABL.lowDegreeJuntaCutoff k + 3
    theorem FABL.lowDegreeJuntaRuntimeExponentLedger
      (k : ) :
      FABL.lowDegreeJuntaCutoff k 
          FABL.lowDegreeJuntaCutoff k + 3 
        3 *
            FABL.lowDegreeJuntaPolynomialDegree
              k 
          FABL.lowDegreeJuntaCutoff k + 3
    The integer-balanced standard schedule has both `n`-exponents at most
    `⌊3k/4⌋ + 3`; the additive constant is absorbed by the theorem's `poly(n)` factor. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaResources.lean
    complete
    def FABL.lowDegreeJuntaNodeBaseResourceExponent (k : ) : 
    def FABL.lowDegreeJuntaNodeBaseResourceExponent
      (k : ) : 
    The largest exponent needed before testing the coordinates of a sampled ambient example. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaResources.lean
    complete
    def FABL.lowDegreeJuntaNodeWorkResourceExponent (k : ) : 
    def FABL.lowDegreeJuntaNodeWorkResourceExponent
      (k : ) : 
    The final fixed-parameter exponent, including the linear scan of fixed coordinates in the
    rejection sampler. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaResources.lean
    complete
    theorem FABL.lowDegreeJuntaTotalRandomExampleBudget_le_linearConfidence
      (n k confidenceBits : ) :
      FABL.lowDegreeJuntaTotalRandomExampleBudget n k
          (FABL.lowDegreeJuntaDyadicFailure confidenceBits) 
        FABL.juntaTreeCallCount k *
              FABL.lowDegreeJuntaNodeRandomExampleLinearCoefficient k *
            (n + 1) ^ FABL.lowDegreeJuntaNodeBaseResourceExponent k *
          (confidenceBits + 1)
    theorem FABL.lowDegreeJuntaTotalRandomExampleBudget_le_linearConfidence
      (n k confidenceBits : ) :
      FABL.lowDegreeJuntaTotalRandomExampleBudget
          n k
          (FABL.lowDegreeJuntaDyadicFailure
            confidenceBits) 
        FABL.juntaTreeCallCount k *
              FABL.lowDegreeJuntaNodeRandomExampleLinearCoefficient
                k *
            (n + 1) ^
              FABL.lowDegreeJuntaNodeBaseResourceExponent
                k *
          (confidenceBits + 1)
    Every dyadic-confidence whole-tree random-example budget is linear in
    `log₂(1 / failure)` and has exponent `⌊3k/4⌋ + 3` in `n + 1`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaResources.lean
    complete
    theorem FABL.lowDegreeJuntaTotalWorkBudget_le_linearConfidence
      (n k confidenceBits : ) :
      FABL.lowDegreeJuntaTotalWorkBudget n k
          (FABL.lowDegreeJuntaDyadicFailure confidenceBits) 
        FABL.juntaTreeCallCount k *
              FABL.lowDegreeJuntaNodeWorkLinearCoefficient k *
            (n + 1) ^ FABL.lowDegreeJuntaNodeWorkResourceExponent k *
          (confidenceBits + 1)
    theorem FABL.lowDegreeJuntaTotalWorkBudget_le_linearConfidence
      (n k confidenceBits : ) :
      FABL.lowDegreeJuntaTotalWorkBudget n k
          (FABL.lowDegreeJuntaDyadicFailure
            confidenceBits) 
        FABL.juntaTreeCallCount k *
              FABL.lowDegreeJuntaNodeWorkLinearCoefficient
                k *
            (n + 1) ^
              FABL.lowDegreeJuntaNodeWorkResourceExponent
                k *
          (confidenceBits + 1)
    Every dyadic-confidence whole-tree charged-work budget is linear in
    `log₂(1 / failure)` and has exponent `⌊3k/4⌋ + 4` in `n + 1`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaResources.lean
    complete
    theorem FABL.lowDegreeJuntaTotalRandomExampleBudget_isBigO_linearConfidence
      (k : ) :
      (fun input =>
          (FABL.lowDegreeJuntaTotalRandomExampleBudget input.1 k
              (FABL.lowDegreeJuntaDyadicFailure input.2))) =O[Filter.atTop]
        fun input =>
        ((input.1 + 1) ^ FABL.lowDegreeJuntaNodeBaseResourceExponent k *
            (input.2 + 1))
    theorem FABL.lowDegreeJuntaTotalRandomExampleBudget_isBigO_linearConfidence
      (k : ) :
      (fun input =>
          (FABL.lowDegreeJuntaTotalRandomExampleBudget
              input.1 k
              (FABL.lowDegreeJuntaDyadicFailure
                input.2))) =O[Filter.atTop]
        fun input =>
        ((input.1 + 1) ^
              FABL.lowDegreeJuntaNodeBaseResourceExponent
                k *
            (input.2 + 1))
    For fixed `k`, the whole-tree random-example budget is jointly polynomial in `n` and linear
    in the dyadic index `log₂(1 / failure)`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaResources.lean
    complete
    theorem FABL.lowDegreeJuntaTotalWorkBudget_isBigO_linearConfidence (k : ) :
      (fun input =>
          (FABL.lowDegreeJuntaTotalWorkBudget input.1 k
              (FABL.lowDegreeJuntaDyadicFailure input.2))) =O[Filter.atTop]
        fun input =>
        ((input.1 + 1) ^ FABL.lowDegreeJuntaNodeWorkResourceExponent k *
            (input.2 + 1))
    theorem FABL.lowDegreeJuntaTotalWorkBudget_isBigO_linearConfidence
      (k : ) :
      (fun input =>
          (FABL.lowDegreeJuntaTotalWorkBudget
              input.1 k
              (FABL.lowDegreeJuntaDyadicFailure
                input.2))) =O[Filter.atTop]
        fun input =>
        ((input.1 + 1) ^
              FABL.lowDegreeJuntaNodeWorkResourceExponent
                k *
            (input.2 + 1))
    For fixed `k`, the whole-tree charged work is jointly polynomial in `n` and linear in the
    dyadic index `log₂(1 / failure)`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaResources.lean
    complete
    theorem FABL.lowDegreeJuntaLearningFailure_eq_dyadicFailure :
      FABL.lowDegreeJuntaLearningFailure =
        FABL.lowDegreeJuntaDyadicFailure 3
    theorem FABL.lowDegreeJuntaLearningFailure_eq_dyadicFailure :
      FABL.lowDegreeJuntaLearningFailure =
        FABL.lowDegreeJuntaDyadicFailure 3
    The fixed failure parameter of Theorem 6.36 is the dyadic confidence level with index three. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaResources.lean
    complete
    theorem FABL.lowDegreeJuntaLearningAlgorithm_randomExampleCost_le (n k : )
      (accuracy : FABL.LearningAccuracy) :
      (FABL.lowDegreeJuntaLearningAlgorithm n k).randomExampleCost
          accuracy 
        4 * FABL.juntaTreeCallCount k *
            FABL.lowDegreeJuntaNodeRandomExampleLinearCoefficient k *
          (n + 1) ^ FABL.lowDegreeJuntaNodeBaseResourceExponent k
    theorem FABL.lowDegreeJuntaLearningAlgorithm_randomExampleCost_le
      (n k : )
      (accuracy : FABL.LearningAccuracy) :
      (FABL.lowDegreeJuntaLearningAlgorithm n
              k).randomExampleCost
          accuracy 
        4 * FABL.juntaTreeCallCount k *
            FABL.lowDegreeJuntaNodeRandomExampleLinearCoefficient
              k *
          (n + 1) ^
            FABL.lowDegreeJuntaNodeBaseResourceExponent
              k
    The formal Theorem 6.36 algorithm has an explicit finite random-example bound.  Its fixed
    dyadic confidence factor `3 + 1` is absorbed into the coefficient depending only on `k`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaResources.lean
    complete
    theorem FABL.lowDegreeJuntaLearningAlgorithm_workCost_le (n k : )
      (accuracy : FABL.LearningAccuracy) :
      (FABL.lowDegreeJuntaLearningAlgorithm n k).workCost accuracy 
        4 * FABL.juntaTreeCallCount k *
            FABL.lowDegreeJuntaNodeWorkLinearCoefficient k *
          (n + 1) ^ FABL.lowDegreeJuntaNodeWorkResourceExponent k
    theorem FABL.lowDegreeJuntaLearningAlgorithm_workCost_le
      (n k : )
      (accuracy : FABL.LearningAccuracy) :
      (FABL.lowDegreeJuntaLearningAlgorithm n
              k).workCost
          accuracy 
        4 * FABL.juntaTreeCallCount k *
            FABL.lowDegreeJuntaNodeWorkLinearCoefficient
              k *
          (n + 1) ^
            FABL.lowDegreeJuntaNodeWorkResourceExponent
              k
    The formal Theorem 6.36 algorithm has an explicit finite charged-work bound.  Its fixed
    dyadic confidence factor `3 + 1` is absorbed into the coefficient depending only on `k`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaResources.lean
    complete
    theorem FABL.lowDegreeJuntaLearningAlgorithm_randomExampleCost_isBigO (k : )
      (accuracy : FABL.LearningAccuracy) :
      (fun n =>
          ((FABL.lowDegreeJuntaLearningAlgorithm n k).randomExampleCost
              accuracy)) =O[Filter.atTop]
        fun n => ((n + 1) ^ FABL.lowDegreeJuntaNodeBaseResourceExponent k)
    theorem FABL.lowDegreeJuntaLearningAlgorithm_randomExampleCost_isBigO
      (k : )
      (accuracy : FABL.LearningAccuracy) :
      (fun n =>
          ((FABL.lowDegreeJuntaLearningAlgorithm
                  n k).randomExampleCost
              accuracy)) =O[Filter.atTop]
        fun n =>
        ((n + 1) ^
            FABL.lowDegreeJuntaNodeBaseResourceExponent
              k)
    For fixed `k`, the actual random-example cost field of the formal Theorem 6.36 algorithm is
    polynomial in the ambient dimension with exponent `⌊3k/4⌋ + 3`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaResources.lean
    complete
    theorem FABL.lowDegreeJuntaLearningAlgorithm_workCost_isBigO (k : )
      (accuracy : FABL.LearningAccuracy) :
      (fun n =>
          ((FABL.lowDegreeJuntaLearningAlgorithm n k).workCost
              accuracy)) =O[Filter.atTop]
        fun n => ((n + 1) ^ FABL.lowDegreeJuntaNodeWorkResourceExponent k)
    theorem FABL.lowDegreeJuntaLearningAlgorithm_workCost_isBigO
      (k : )
      (accuracy : FABL.LearningAccuracy) :
      (fun n =>
          ((FABL.lowDegreeJuntaLearningAlgorithm
                  n k).workCost
              accuracy)) =O[Filter.atTop]
        fun n =>
        ((n + 1) ^
            FABL.lowDegreeJuntaNodeWorkResourceExponent
              k)
    For fixed `k`, the actual charged-work cost field of the formal Theorem 6.36 algorithm is
    polynomial in the ambient dimension with exponent `⌊3k/4⌋ + 4`. 
Lemma6.4.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 2
Statement dependency previews
Preview
Definition 2.2.8
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Lemma 6.37. Theorem 6.36 follows from an algorithm which, given random examples from a nonconstant k-junta f:\mathbb F_2^n\to\mathbb F_2, finds at least one relevant coordinate with probability at least 1-\delta in time n^{(3/4)k}\operatorname{poly}(n)\log(1/\delta).

Lean code for Lemma6.4.415 declarations
  • structure(5 fields)defined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    structure FABL.JuntaRelevantCoordinateFinder (n k : ) : Type 1
    structure FABL.JuntaRelevantCoordinateFinder
      (n k : ) : Type 1
    The narrow injected algorithmic interface used by Lemma 6.37.  A realization combines the
    constant test from part (a), the restriction sampler from part (b), and the assumed algorithm for
    finding one relevant coordinate of a nonconstant restriction.  Its program remains ordinary
    ambient random-example syntax; the two bounds charge every oracle call and every local step. 
    program : (P : Finset (Fin n)) 
      FABL.JuntaFixedAssignment P 
        FABL.PositiveLearningParameter 
          FABL.LearningProgram n FABL.LearningAccess.randomExamples (Option (FABL.JuntaNodeDecision P))
    One adaptive node call at total confidence parameter `failure`. 
    randomExampleBound : FABL.PositiveLearningParameter  
    Uniform random-example bound for one node call. 
    workBound : FABL.PositiveLearningParameter  
    Uniform local-work bound for one node call. 
    cost_le :  (target : FABL.BooleanFunction n) (P : Finset (Fin n)) (z : FABL.JuntaFixedAssignment P)
      (failure : FABL.PositiveLearningParameter),
       outcome  (FABL.LearningProgram.runWithCost target (self.program P z failure)).support,
        outcome.2.randomExamples  self.randomExampleBound failure 
          outcome.2.queries = 0  outcome.2.work  self.workBound failure
    The implementation uses only random examples and respects both declared pathwise bounds. 
    failureProbability_le :  (target : FABL.BooleanFunction n) (J P : Finset (Fin n)) (z : FABL.JuntaFixedAssignment P),
      J.card  k 
        DependsOn target J 
          P  J 
             (failure : FABL.PositiveLearningParameter),
              ((self.program P z failure).eventProbability target fun outcome =>
                  FABL.JuntaNodeDecision.IsBad target P z outcome.1) 
                failure
    On any `k`-junta witness, one node call fails with probability at most `failure`. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.recursiveJuntaLearner {n k : }
      (finder : FABL.JuntaRelevantCoordinateFinder n k)
      (failure : FABL.PositiveLearningParameter) :
      FABL.LearningProgram n FABL.LearningAccess.randomExamples
        (Option (FABL.DecisionTree n FABL.Sign))
    def FABL.recursiveJuntaLearner {n k : }
      (finder :
        FABL.JuntaRelevantCoordinateFinder n
          k)
      (failure :
        FABL.PositiveLearningParameter) :
      FABL.LearningProgram n
        FABL.LearningAccess.randomExamples
        (Option
          (FABL.DecisionTree n FABL.Sign))
    Exercise 6.31(c)'s learner.  The confidence scheduler allocates the requested total failure
    budget across the full binary recursion tree. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.DecisionTreeComputesTarget {n : }
      (tree : FABL.DecisionTree n FABL.Sign)
      (target : FABL.BooleanFunction n) : Prop
    def FABL.DecisionTreeComputesTarget {n : }
      (tree : FABL.DecisionTree n FABL.Sign)
      (target : FABL.BooleanFunction n) : Prop
    A complete decision tree computes the sign-valued target under the explicit additive/sign
    cube equivalence. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.JuntaLearnerOutputBad {n : } (target : FABL.BooleanFunction n) :
      Option (FABL.DecisionTree n FABL.Sign)  Prop
    def FABL.JuntaLearnerOutputBad {n : }
      (target : FABL.BooleanFunction n) :
      Option (FABL.DecisionTree n FABL.Sign) 
        Prop
    Failure event for the complete learner. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.recursiveJuntaLearner_failureProbability_le {n k : }
      (finder : FABL.JuntaRelevantCoordinateFinder n k)
      (target : FABL.BooleanFunction n) (hjunta : FABL.IsKJunta target k)
      (failure : FABL.PositiveLearningParameter) :
      ((FABL.recursiveJuntaLearner finder failure).eventProbability target
          fun outcome => FABL.JuntaLearnerOutputBad target outcome.1) 
        failure
    theorem FABL.recursiveJuntaLearner_failureProbability_le
      {n k : }
      (finder :
        FABL.JuntaRelevantCoordinateFinder n
          k)
      (target : FABL.BooleanFunction n)
      (hjunta : FABL.IsKJunta target k)
      (failure :
        FABL.PositiveLearningParameter) :
      ((FABL.recursiveJuntaLearner finder
              failure).eventProbability
          target fun outcome =>
          FABL.JuntaLearnerOutputBad target
            outcome.1) 
        failure
    Exercise 6.31(c) and Lemma 6.37: a `k`-junta is learned by the actual recursive
    random-example program with total failure probability at most the requested budget. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.recursiveJuntaLearner_depth_le {n k : }
      (finder : FABL.JuntaRelevantCoordinateFinder n k)
      (target : FABL.BooleanFunction n)
      (failure : FABL.PositiveLearningParameter)
      (outcome : Option (FABL.DecisionTree n FABL.Sign) × FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost target
              (FABL.recursiveJuntaLearner finder failure)).support)
      (tree : FABL.DecisionTree n FABL.Sign)
      (htree : outcome.1 = some tree) : FABL.F₂DecisionTree.depth tree  k
    theorem FABL.recursiveJuntaLearner_depth_le
      {n k : }
      (finder :
        FABL.JuntaRelevantCoordinateFinder n
          k)
      (target : FABL.BooleanFunction n)
      (failure :
        FABL.PositiveLearningParameter)
      (outcome :
        Option
            (FABL.DecisionTree n FABL.Sign) ×
          FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost
              target
              (FABL.recursiveJuntaLearner
                finder failure)).support)
      (tree : FABL.DecisionTree n FABL.Sign)
      (htree : outcome.1 = some tree) :
      FABL.F₂DecisionTree.depth tree  k
    Every successful complete-tree output has depth at most `k`, independently of whether a
    finder failure occurred on another execution path. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.recursiveJuntaLearner_cost_le {n k : }
      (finder : FABL.JuntaRelevantCoordinateFinder n k)
      (target : FABL.BooleanFunction n)
      (failure : FABL.PositiveLearningParameter)
      (outcome : Option (FABL.DecisionTree n FABL.Sign) × FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost target
              (FABL.recursiveJuntaLearner finder failure)).support) :
      outcome.2.randomExamples 
          FABL.juntaTreeCallCount k *
            finder.randomExampleBound
              (FABL.juntaTreePerCallFailure k failure) 
        outcome.2.queries = 0 
          outcome.2.work 
            FABL.juntaTreeCallCount k *
              finder.workBound (FABL.juntaTreePerCallFailure k failure)
    theorem FABL.recursiveJuntaLearner_cost_le
      {n k : }
      (finder :
        FABL.JuntaRelevantCoordinateFinder n
          k)
      (target : FABL.BooleanFunction n)
      (failure :
        FABL.PositiveLearningParameter)
      (outcome :
        Option
            (FABL.DecisionTree n FABL.Sign) ×
          FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost
              target
              (FABL.recursiveJuntaLearner
                finder failure)).support) :
      outcome.2.randomExamples 
          FABL.juntaTreeCallCount k *
            finder.randomExampleBound
              (FABL.juntaTreePerCallFailure k
                failure) 
        outcome.2.queries = 0 
          outcome.2.work 
            FABL.juntaTreeCallCount k *
              finder.workBound
                (FABL.juntaTreePerCallFailure
                  k failure)
    Complete pathwise resource closure for Lemma 6.37. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaLearning.lean
    complete
    def FABL.LowDegreeJuntaRootFinderBad {n : }
      (target : FABL.BooleanFunction n) :
      Option (FABL.JuntaNodeDecision )  Prop
    def FABL.LowDegreeJuntaRootFinderBad {n : }
      (target : FABL.BooleanFunction n) :
      Option (FABL.JuntaNodeDecision )  Prop
    Root-level failure for the relevant-coordinate task: rejection, a constant certificate, or
    an alleged coordinate that is not relevant to the original target. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaLearning.lean
    complete
    theorem FABL.lowDegreeJuntaRelevantCoordinateProgram_root_failureProbability_le
      {n : } (target : FABL.BooleanFunction n) (k : )
      (hjunta : FABL.IsKJunta target k)
      (hnonconstant : ¬ (x y : FABL.SignCube n), target x = target y)
      (failure : FABL.PositiveLearningParameter) :
      ((FABL.lowDegreeJuntaRelevantCoordinateProgram k  (fun x => 1)
              failure).eventProbability
          target fun outcome =>
          FABL.LowDegreeJuntaRootFinderBad target outcome.1) 
        failure
    theorem FABL.lowDegreeJuntaRelevantCoordinateProgram_root_failureProbability_le
      {n : }
      (target : FABL.BooleanFunction n)
      (k : )
      (hjunta : FABL.IsKJunta target k)
      (hnonconstant :
        ¬ (x y : FABL.SignCube n),
            target x = target y)
      (failure :
        FABL.PositiveLearningParameter) :
      ((FABL.lowDegreeJuntaRelevantCoordinateProgram
              k  (fun x => 1)
              failure).eventProbability
          target fun outcome =>
          FABL.LowDegreeJuntaRootFinderBad
            target outcome.1) 
        failure
    The root invocation of the concrete learner returns a genuinely relevant coordinate except
    with probability at most `failure`; `none` and constant certificates both count as failures. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaLearning.lean
    complete
    theorem FABL.lowDegreeJuntaRelevantCoordinateProgram_cost_le {n : }
      (target : FABL.BooleanFunction n) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (k : )
      (failure : FABL.PositiveLearningParameter)
      (outcome : Option (FABL.JuntaNodeDecision P) × FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost target
              (FABL.lowDegreeJuntaRelevantCoordinateProgram k P z
                failure)).support) :
      outcome.2.randomExamples 
          FABL.lowDegreeJuntaNodeRandomExampleBound n k failure 
        outcome.2.queries = 0 
          outcome.2.work 
            FABL.lowDegreeJuntaNodeUniformWorkBound n k failure
    theorem FABL.lowDegreeJuntaRelevantCoordinateProgram_cost_le
      {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (k : )
      (failure :
        FABL.PositiveLearningParameter)
      (outcome :
        Option (FABL.JuntaNodeDecision P) ×
          FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost
              target
              (FABL.lowDegreeJuntaRelevantCoordinateProgram
                k P z failure)).support) :
      outcome.2.randomExamples 
          FABL.lowDegreeJuntaNodeRandomExampleBound
            n k failure 
        outcome.2.queries = 0 
          outcome.2.work 
            FABL.lowDegreeJuntaNodeUniformWorkBound
              n k failure
    Every execution follows the constructor-derived random-example and local-work envelopes. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaLearning.lean
    complete
    def FABL.lowDegreeJuntaRelevantCoordinateFinder (n k : ) :
      FABL.JuntaRelevantCoordinateFinder n k
    def FABL.lowDegreeJuntaRelevantCoordinateFinder
      (n k : ) :
      FABL.JuntaRelevantCoordinateFinder n k
    Lemma 6.37's concrete relevant-coordinate finder obtained from the Fourier/ANF node
    controller and Exercise 6.31's finite rejection sampler. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaResources.lean
    complete
    def FABL.lowDegreeJuntaDyadicFailure (bits : ) :
      FABL.PositiveLearningParameter
    def FABL.lowDegreeJuntaDyadicFailure
      (bits : ) :
      FABL.PositiveLearningParameter
    Dyadic total failure `2⁻⁽ᵇⁱᵗˢ⁺¹⁾`; `bits` is the exact binary-logarithmic
    confidence index up to the displayed additive one. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaResources.lean
    complete
    def FABL.lowDegreeJuntaDyadicNodeFailure (k confidenceBits : ) :
      FABL.PositiveLearningParameter
    def FABL.lowDegreeJuntaDyadicNodeFailure
      (k confidenceBits : ) :
      FABL.PositiveLearningParameter
    The failure assigned to one possible node of the depth-`k` recursion under a dyadic total
    failure budget. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaResources.lean
    complete
    theorem FABL.lowDegreeJuntaNodeRandomExampleBound_le_linearConfidence
      (n k confidenceBits : ) :
      FABL.lowDegreeJuntaNodeRandomExampleBound n k
          (FABL.lowDegreeJuntaDyadicNodeFailure k confidenceBits) 
        FABL.lowDegreeJuntaNodeRandomExampleLinearCoefficient k *
            (n + 1) ^ FABL.lowDegreeJuntaNodeBaseResourceExponent k *
          (confidenceBits + 1)
    theorem FABL.lowDegreeJuntaNodeRandomExampleBound_le_linearConfidence
      (n k confidenceBits : ) :
      FABL.lowDegreeJuntaNodeRandomExampleBound
          n k
          (FABL.lowDegreeJuntaDyadicNodeFailure
            k confidenceBits) 
        FABL.lowDegreeJuntaNodeRandomExampleLinearCoefficient
              k *
            (n + 1) ^
              FABL.lowDegreeJuntaNodeBaseResourceExponent
                k *
          (confidenceBits + 1)
    The finite supremum defining the public node random-example bound obeys the same linear
    confidence envelope. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaResources.lean
    complete
    theorem FABL.lowDegreeJuntaNodeUniformWorkBound_le_linearConfidence
      (n k confidenceBits : ) :
      FABL.lowDegreeJuntaNodeUniformWorkBound n k
          (FABL.lowDegreeJuntaDyadicNodeFailure k confidenceBits) 
        FABL.lowDegreeJuntaNodeWorkLinearCoefficient k *
            (n + 1) ^ FABL.lowDegreeJuntaNodeWorkResourceExponent k *
          (confidenceBits + 1)
    theorem FABL.lowDegreeJuntaNodeUniformWorkBound_le_linearConfidence
      (n k confidenceBits : ) :
      FABL.lowDegreeJuntaNodeUniformWorkBound
          n k
          (FABL.lowDegreeJuntaDyadicNodeFailure
            k confidenceBits) 
        FABL.lowDegreeJuntaNodeWorkLinearCoefficient
              k *
            (n + 1) ^
              FABL.lowDegreeJuntaNodeWorkResourceExponent
                k *
          (confidenceBits + 1)
    The finite supremum defining the public node work bound obeys the same linear confidence
    envelope. 
Lemma6.4.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 2
Statement dependency previews
Preview
Theorem 6.4.3
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Matrix-exponent refinement of Theorem 6.36. If n\times n matrices can be multiplied in time O(n^\omega), then the exponent 3/4 in Theorem 6.36 can be replaced by \frac{\omega}{\omega+1}.

The formal runtime boundary is the exact finite consequence needed by the proof: an executable \mathbb F_2 linear solver whose charged work has exponent \omega. Such a solver is supplied through F₂LinearSolverExponentCertificate; the verified balance then gives the displayed exponent, and the existing Gaussian solver supplies the \omega=3 certificate internally. The standard complexity-theoretic reduction from matrix multiplication to linear-system solving is not an API of the pinned Mathlib or CSLib releases, so it remains an explicit external adapter rather than an implicit assumption.

Lean code for Lemma6.4.518 declarations
  • abbrevdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaLearning.lean
    complete
    abbrev FABL.PositiveMatrixExponent : Set 
    abbrev FABL.PositiveMatrixExponent : Set 
    A positive exponent `ω` for the algebraic row-reduction routine. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaLearning.lean
    complete
    def FABL.matrixExponentJuntaBalancedExponent
      (ω : FABL.PositiveMatrixExponent) (k : ) : 
    def FABL.matrixExponentJuntaBalancedExponent
      (ω : FABL.PositiveMatrixExponent)
      (k : ) : 
    The real-valued balance point solving `ω(k-d) = d`. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaLearning.lean
    complete
    def FABL.matrixExponentJuntaCutoff (ω : FABL.PositiveMatrixExponent)
      (k : ) : 
    def FABL.matrixExponentJuntaCutoff
      (ω : FABL.PositiveMatrixExponent)
      (k : ) : 
    The integer Fourier cutoff `⌈ωk/(ω+1)⌉`. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaLearning.lean
    complete
    def FABL.matrixExponentJuntaSolverExponent
      (ω : FABL.PositiveMatrixExponent) (k : ) : 
    def FABL.matrixExponentJuntaSolverExponent
      (ω : FABL.PositiveMatrixExponent)
      (k : ) : 
    The row-reduction exponent after using the rounded cutoff. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeJuntaLearning.lean
    complete
    theorem FABL.matrixExponentJuntaRuntimeExponentLedger
      (ω : FABL.PositiveMatrixExponent) (k : ) :
      FABL.matrixExponentJuntaBalancedExponent ω k = ω / (ω + 1) * k 
        0  FABL.matrixExponentJuntaSolverExponent ω k 
          FABL.matrixExponentJuntaSolverExponent ω k 
              (FABL.matrixExponentJuntaCutoff ω k) 
            max (FABL.matrixExponentJuntaSolverExponent ω k)
                (FABL.matrixExponentJuntaCutoff ω k) <
              ω / (ω + 1) * k + 1
    theorem FABL.matrixExponentJuntaRuntimeExponentLedger
      (ω : FABL.PositiveMatrixExponent)
      (k : ) :
      FABL.matrixExponentJuntaBalancedExponent
            ω k =
          ω / (ω + 1) * k 
        0 
            FABL.matrixExponentJuntaSolverExponent
              ω k 
          FABL.matrixExponentJuntaSolverExponent
                ω k 
              (FABL.matrixExponentJuntaCutoff
                  ω k) 
            max
                (FABL.matrixExponentJuntaSolverExponent
                  ω k)
                (FABL.matrixExponentJuntaCutoff
                    ω k) <
              ω / (ω + 1) * k + 1
    The complete matrix-exponent ledger records the exact fraction, rounded solver
    bound, and the single-unit rounding loss. 
  • structure(3 fields)defined in FABL/Chapter06/LearningAndTesting/MatrixExponentSolver.lean
    complete
    structure FABL.F₂LinearSolverBackend : Type 1
    structure FABL.F₂LinearSolverBackend : Type 1
    A finite `𝔽₂` linear solver together with the work charged by the same execution.
    Correctness is required only on consistent systems, which is exactly what the low-degree learner
    uses. 
    solve : {ν : Type}  [Fintype ν]  [DecidableEq ν]  [Encodable ν]  List (FABL.F₂LinearEquation ν)  ν  FABL.𝔽₂
    work : {ν : Type}  [Fintype ν]  [DecidableEq ν]  [Encodable ν]  List (FABL.F₂LinearEquation ν)  
    satisfies_of_exists :  {ν : Type} [inst : Fintype ν] [inst_1 : DecidableEq ν] [inst_2 : Encodable ν] (rows : List (FABL.F₂LinearEquation ν)),
      (∃ assignment, FABL.F₂SatisfiesRows rows assignment)  FABL.F₂SatisfiesRows rows (self.solve rows)
  • defdefined in FABL/Chapter06/LearningAndTesting/MatrixExponentSolver.lean
    complete
    def FABL.solveLowDegreeF₂SamplesWithBackend
      (backend : FABL.F₂LinearSolverBackend) {n  m : }
      (samples : Fin m  FABL.F₂Cube n × FABL.𝔽₂) :
      FABL.LowDegreeF₂Hypothesis n 
    def FABL.solveLowDegreeF₂SamplesWithBackend
      (backend : FABL.F₂LinearSolverBackend)
      {n  m : }
      (samples :
        Fin m  FABL.F₂Cube n × FABL.𝔽₂) :
      FABL.LowDegreeF₂Hypothesis n 
    Solve a low-degree ANF sample system with the selected finite linear solver. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixExponentSolver.lean
    complete
    theorem FABL.solveLowDegreeF₂SamplesWithBackend_evaluate_eq
      (backend : FABL.F₂LinearSolverBackend) {n  m : }
      (f : FABL.F₂BooleanFunction n)
      (hdegree : FABL.functionAlgebraicDegree f  )
      (sampleInputs : Fin m  FABL.F₂Cube n)
      (hseparates : FABL.SeparatesLowDegreeF₂Coefficients sampleInputs) :
      (FABL.solveLowDegreeF₂SamplesWithBackend backend fun i =>
            (sampleInputs i, f (sampleInputs i))).evaluate =
        f
    theorem FABL.solveLowDegreeF₂SamplesWithBackend_evaluate_eq
      (backend : FABL.F₂LinearSolverBackend)
      {n  m : }
      (f : FABL.F₂BooleanFunction n)
      (hdegree :
        FABL.functionAlgebraicDegree f  )
      (sampleInputs : Fin m  FABL.F₂Cube n)
      (hseparates :
        FABL.SeparatesLowDegreeF₂Coefficients
          sampleInputs) :
      (FABL.solveLowDegreeF₂SamplesWithBackend
            backend fun i =>
            (sampleInputs i,
              f (sampleInputs i))).evaluate =
        f
    Separation turns any consistent backend solution into exact low-degree recovery. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixExponentSolver.lean
    complete
    theorem FABL.lowDegreeF₂PolynomialLearnerLabeledOutputWithBackend_evaluate_eq
      (backend : FABL.F₂LinearSolverBackend) {n  m : }
      (target : FABL.BooleanFunction n)
      (hdegree :
        FABL.functionAlgebraicDegree
            (FABL.booleanFunctionF₂Encoding target) 
          )
      (sampleInputs : Fin m  FABL.SignCube n)
      (hseparates :
        FABL.SeparatesLowDegreeF₂Coefficients fun i =>
          (FABL.binaryCubeSignEquiv n).symm (sampleInputs i)) :
      (FABL.lowDegreeF₂PolynomialLearnerLabeledOutputWithBackend backend n 
            m fun i => (sampleInputs i, target (sampleInputs i))).evaluate =
        FABL.booleanFunctionF₂Encoding target
    theorem FABL.lowDegreeF₂PolynomialLearnerLabeledOutputWithBackend_evaluate_eq
      (backend : FABL.F₂LinearSolverBackend)
      {n  m : }
      (target : FABL.BooleanFunction n)
      (hdegree :
        FABL.functionAlgebraicDegree
            (FABL.booleanFunctionF₂Encoding
              target) 
          )
      (sampleInputs : Fin m  FABL.SignCube n)
      (hseparates :
        FABL.SeparatesLowDegreeF₂Coefficients
          fun i =>
          (FABL.binaryCubeSignEquiv n).symm
            (sampleInputs i)) :
      (FABL.lowDegreeF₂PolynomialLearnerLabeledOutputWithBackend
            backend n  m fun i =>
            (sampleInputs i,
              target
                (sampleInputs i))).evaluate =
        FABL.booleanFunctionF₂Encoding target
    A backend-parameterized labeled learner is exact on a separating target-generated batch. 
  • defdefined in FABL/Chapter06/LearningAndTesting/MatrixExponentSolver.lean
    complete
    def FABL.lowDegreeF₂PolynomialLearnerWorkWithBackend
      (backend : FABL.F₂LinearSolverBackend) (n  m : )
      (samples : Fin m  FABL.SignCube n × FABL.Sign) : 
    def FABL.lowDegreeF₂PolynomialLearnerWorkWithBackend
      (backend : FABL.F₂LinearSolverBackend)
      (n  m : )
      (samples :
        Fin m  FABL.SignCube n × FABL.Sign) :
      
    Row construction plus the selected solver's charged work. 
  • structure(3 fields)defined in FABL/Chapter06/LearningAndTesting/MatrixExponentSolver.lean
    complete
    structure FABL.F₂LinearSolverExponentCertificate
      (backend : FABL.F₂LinearSolverBackend)
      (ω : FABL.PositiveMatrixExponent) : Type
    structure FABL.F₂LinearSolverExponentCertificate
      (backend : FABL.F₂LinearSolverBackend)
      (ω : FABL.PositiveMatrixExponent) :
      Type
    A uniform finite realization of a solver exponent.
    
    If dimension and row count are respectively bounded by `dimensionCoefficient · base^degree`
    and `rowCoefficient · base^degree`, the charged solver work has exponent
    `⌈ω · degree⌉`.  The leading coefficient may depend on the two scale coefficients and on
    `degree`, but crucially not on `base`.  This is the explicit adapter required from any faster
    linear solver. 
    two_le : 2  ω
    coefficient :       
    work_le :  {ν : Type} [inst : Fintype ν] [inst_1 : DecidableEq ν] [inst_2 : Encodable ν] (rows : List (FABL.F₂LinearEquation ν))
      (base degree dimensionCoefficient rowCoefficient : ),
      0 < base 
        Fintype.card ν  dimensionCoefficient * base ^ degree 
          rows.length  rowCoefficient * base ^ degree 
            backend.work rows  self.coefficient dimensionCoefficient rowCoefficient degree * base ^ ω * degree⌉₊
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixExponentSolver.lean
    complete
    theorem FABL.scheduledLowDegreeF₂PolynomialLearnerWorkWithBackend_le_exponentEnvelope
      {backend : FABL.F₂LinearSolverBackend}
      {ω : FABL.PositiveMatrixExponent}
      (certificate : FABL.F₂LinearSolverExponentCertificate backend ω)
      (n  : ) (δ : FABL.PositiveLearningParameter)
      (samples :
        Fin (FABL.lowDegreeF₂LearningSampleCount n  δ) 
          FABL.SignCube n × FABL.Sign) :
      FABL.lowDegreeF₂PolynomialLearnerWorkWithBackend backend n 
          (FABL.lowDegreeF₂LearningSampleCount n  δ) samples 
        FABL.lowDegreeF₂BackendExponentCoefficient certificate  δ *
          (n + 1) ^ ω * ⌉₊
    theorem FABL.scheduledLowDegreeF₂PolynomialLearnerWorkWithBackend_le_exponentEnvelope
      {backend : FABL.F₂LinearSolverBackend}
      {ω : FABL.PositiveMatrixExponent}
      (certificate :
        FABL.F₂LinearSolverExponentCertificate
          backend ω)
      (n  : )
      (δ : FABL.PositiveLearningParameter)
      (samples :
        Fin
            (FABL.lowDegreeF₂LearningSampleCount
              n  δ) 
          FABL.SignCube n × FABL.Sign) :
      FABL.lowDegreeF₂PolynomialLearnerWorkWithBackend
          backend n 
          (FABL.lowDegreeF₂LearningSampleCount
            n  δ)
          samples 
        FABL.lowDegreeF₂BackendExponentCoefficient
            certificate  δ *
          (n + 1) ^ ω * ⌉₊
    A certified solver exponent gives a finite, trace-charged bound for the complete scheduled
    low-degree learner, including row construction. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixExponentSolver.lean
    complete
    theorem FABL.matrixExponentJuntaCeilSolverExponent_le_cutoff
      (ω : FABL.PositiveMatrixExponent) (k : ) :
      ω * (k - FABL.matrixExponentJuntaCutoff ω k)⌉₊ 
        FABL.matrixExponentJuntaCutoff ω k
    theorem FABL.matrixExponentJuntaCeilSolverExponent_le_cutoff
      (ω : FABL.PositiveMatrixExponent)
      (k : ) :
      ω *
            (k -
                FABL.matrixExponentJuntaCutoff
                  ω k)⌉₊ 
        FABL.matrixExponentJuntaCutoff ω k
    The rounded certified solver exponent is no larger than the balanced Fourier cutoff. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixExponentSolver.lean
    complete
    theorem FABL.matrixExponentLowDegreeF₂WorkWithBackend_le_balancedCutoff
      {backend : FABL.F₂LinearSolverBackend}
      {ω : FABL.PositiveMatrixExponent}
      (certificate : FABL.F₂LinearSolverExponentCertificate backend ω)
      (n k : ) (δ : FABL.PositiveLearningParameter)
      (samples :
        Fin
            (FABL.lowDegreeF₂LearningSampleCount n
              (k - FABL.matrixExponentJuntaCutoff ω k) δ) 
          FABL.SignCube n × FABL.Sign) :
      FABL.lowDegreeF₂PolynomialLearnerWorkWithBackend backend n
          (k - FABL.matrixExponentJuntaCutoff ω k)
          (FABL.lowDegreeF₂LearningSampleCount n
            (k - FABL.matrixExponentJuntaCutoff ω k) δ)
          samples 
        FABL.lowDegreeF₂BackendExponentCoefficient certificate
            (k - FABL.matrixExponentJuntaCutoff ω k) δ *
          (n + 1) ^ FABL.matrixExponentJuntaCutoff ω k
    theorem FABL.matrixExponentLowDegreeF₂WorkWithBackend_le_balancedCutoff
      {backend : FABL.F₂LinearSolverBackend}
      {ω : FABL.PositiveMatrixExponent}
      (certificate :
        FABL.F₂LinearSolverExponentCertificate
          backend ω)
      (n k : )
      (δ : FABL.PositiveLearningParameter)
      (samples :
        Fin
            (FABL.lowDegreeF₂LearningSampleCount
              n
              (k -
                FABL.matrixExponentJuntaCutoff
                  ω k)
              δ) 
          FABL.SignCube n × FABL.Sign) :
      FABL.lowDegreeF₂PolynomialLearnerWorkWithBackend
          backend n
          (k -
            FABL.matrixExponentJuntaCutoff ω
              k)
          (FABL.lowDegreeF₂LearningSampleCount
            n
            (k -
              FABL.matrixExponentJuntaCutoff ω
                k)
            δ)
          samples 
        FABL.lowDegreeF₂BackendExponentCoefficient
            certificate
            (k -
              FABL.matrixExponentJuntaCutoff ω
                k)
            δ *
          (n + 1) ^
            FABL.matrixExponentJuntaCutoff ω k
    At the balanced cutoff, a certified solver backend's complete low-degree fallback has an
    actual finite `(n+1)^cutoff` bound. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixExponentSolver.lean
    complete
    theorem FABL.matrixExponentBackendRuntimeLedger
      {backend : FABL.F₂LinearSolverBackend}
      {ω : FABL.PositiveMatrixExponent}
      (certificate : FABL.F₂LinearSolverExponentCertificate backend ω)
      (n k : ) (δ : FABL.PositiveLearningParameter)
      (samples :
        Fin
            (FABL.lowDegreeF₂LearningSampleCount n
              (k - FABL.matrixExponentJuntaCutoff ω k) δ) 
          FABL.SignCube n × FABL.Sign) :
      FABL.lowDegreeF₂PolynomialLearnerWorkWithBackend backend n
            (k - FABL.matrixExponentJuntaCutoff ω k)
            (FABL.lowDegreeF₂LearningSampleCount n
              (k - FABL.matrixExponentJuntaCutoff ω k) δ)
            samples 
          FABL.lowDegreeF₂BackendExponentCoefficient certificate
              (k - FABL.matrixExponentJuntaCutoff ω k) δ *
            (n + 1) ^ FABL.matrixExponentJuntaCutoff ω k 
        max (FABL.matrixExponentJuntaSolverExponent ω k)
            (FABL.matrixExponentJuntaCutoff ω k) <
          ω / (ω + 1) * k + 1
    theorem FABL.matrixExponentBackendRuntimeLedger
      {backend : FABL.F₂LinearSolverBackend}
      {ω : FABL.PositiveMatrixExponent}
      (certificate :
        FABL.F₂LinearSolverExponentCertificate
          backend ω)
      (n k : )
      (δ : FABL.PositiveLearningParameter)
      (samples :
        Fin
            (FABL.lowDegreeF₂LearningSampleCount
              n
              (k -
                FABL.matrixExponentJuntaCutoff
                  ω k)
              δ) 
          FABL.SignCube n × FABL.Sign) :
      FABL.lowDegreeF₂PolynomialLearnerWorkWithBackend
            backend n
            (k -
              FABL.matrixExponentJuntaCutoff ω
                k)
            (FABL.lowDegreeF₂LearningSampleCount
              n
              (k -
                FABL.matrixExponentJuntaCutoff
                  ω k)
              δ)
            samples 
          FABL.lowDegreeF₂BackendExponentCoefficient
              certificate
              (k -
                FABL.matrixExponentJuntaCutoff
                  ω k)
              δ *
            (n + 1) ^
              FABL.matrixExponentJuntaCutoff ω
                k 
        max
            (FABL.matrixExponentJuntaSolverExponent
              ω k)
            (FABL.matrixExponentJuntaCutoff ω
                k) <
          ω / (ω + 1) * k + 1
    The finite backend bound and the algebraic balance ledger compose without assuming a
    matrix-multiplication reduction. 
  • defdefined in FABL/Chapter06/LearningAndTesting/MatrixExponentSolver.lean
    complete
    def FABL.cubicF₂LinearSolverBackend : FABL.F₂LinearSolverBackend
    def FABL.cubicF₂LinearSolverBackend :
      FABL.F₂LinearSolverBackend
    The canonical cubic backend is exactly the existing proved executable solver. 
  • defdefined in FABL/Chapter06/LearningAndTesting/MatrixExponentSolver.lean
    complete
    def FABL.cubicF₂LinearSolverExponentCertificate :
      FABL.F₂LinearSolverExponentCertificate FABL.cubicF₂LinearSolverBackend
        FABL.cubicMatrixExponent
    def FABL.cubicF₂LinearSolverExponentCertificate :
      FABL.F₂LinearSolverExponentCertificate
        FABL.cubicF₂LinearSolverBackend
        FABL.cubicMatrixExponent
    The existing Gaussian backend carries a genuine exponent-three certificate. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/MatrixExponentSolver.lean
    complete
    theorem FABL.cubicLowDegreeF₂PolynomialLearnerWork_le_balancedCutoff (n k : )
      (δ : FABL.PositiveLearningParameter)
      (samples :
        Fin
            (FABL.lowDegreeF₂LearningSampleCount n
              (k -
                FABL.matrixExponentJuntaCutoff FABL.cubicMatrixExponent k)
              δ) 
          FABL.SignCube n × FABL.Sign) :
      FABL.lowDegreeF₂PolynomialLearnerWork n
          (k - FABL.matrixExponentJuntaCutoff FABL.cubicMatrixExponent k)
          (FABL.lowDegreeF₂LearningSampleCount n
            (k - FABL.matrixExponentJuntaCutoff FABL.cubicMatrixExponent k)
            δ)
          samples 
        FABL.lowDegreeF₂BackendExponentCoefficient
            FABL.cubicF₂LinearSolverExponentCertificate
            (k - FABL.matrixExponentJuntaCutoff FABL.cubicMatrixExponent k)
            δ *
          (n + 1) ^
            FABL.matrixExponentJuntaCutoff FABL.cubicMatrixExponent k
    theorem FABL.cubicLowDegreeF₂PolynomialLearnerWork_le_balancedCutoff
      (n k : )
      (δ : FABL.PositiveLearningParameter)
      (samples :
        Fin
            (FABL.lowDegreeF₂LearningSampleCount
              n
              (k -
                FABL.matrixExponentJuntaCutoff
                  FABL.cubicMatrixExponent k)
              δ) 
          FABL.SignCube n × FABL.Sign) :
      FABL.lowDegreeF₂PolynomialLearnerWork n
          (k -
            FABL.matrixExponentJuntaCutoff
              FABL.cubicMatrixExponent k)
          (FABL.lowDegreeF₂LearningSampleCount
            n
            (k -
              FABL.matrixExponentJuntaCutoff
                FABL.cubicMatrixExponent k)
            δ)
          samples 
        FABL.lowDegreeF₂BackendExponentCoefficient
            FABL.cubicF₂LinearSolverExponentCertificate
            (k -
              FABL.matrixExponentJuntaCutoff
                FABL.cubicMatrixExponent k)
            δ *
          (n + 1) ^
            FABL.matrixExponentJuntaCutoff
              FABL.cubicMatrixExponent k
    The exponent-three specialization is the current trace-derived Exercise 6.30 work, not a
    second solver implementation. 
Lemma6.4.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 4
Statement dependency previews
Preview
Theorem 1.4.3
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 3
Reverse dependency previews
Preview
Corollary 6.4.8
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Lemma 6.38. If f:\{-1,1\}^n\to\mathbb R and \varphi:\{-1,1\}^n\to\mathbb R_{\ge0} is an \epsilon-biased density, where \epsilon\ge0, then \left| \mathbb E_{x\sim\varphi}[f(x)]-\mathbb E[f] \right| \le \lVert\widehat f\rVert_1\epsilon.

Lean code for Lemma6.4.61 theorem
  • theoremdefined in FABL/Chapter06/LearningAndTesting/FourierNorms.lean
    complete
    theorem FABL.ProbabilityDensity.abs_expectation_signFunction_sub_mean_le_fourierOneNorm_mul
      {n : } (φ : FABL.ProbabilityDensity n) (f : FABL.SignCube n  )
      {ε : } ( : φ.IsBiased ε) ( : 0  ε) :
      |(φ.expectation fun x => f ((FABL.binaryCubeSignEquiv n) x)) -
            FABL.mean f| 
        FABL.fourierOneNorm f * ε
    theorem FABL.ProbabilityDensity.abs_expectation_signFunction_sub_mean_le_fourierOneNorm_mul
      {n : } (φ : FABL.ProbabilityDensity n)
      (f : FABL.SignCube n  ) {ε : }
      ( : φ.IsBiased ε) ( : 0  ε) :
      |(φ.expectation fun x =>
              f
                ((FABL.binaryCubeSignEquiv n)
                  x)) -
            FABL.mean f| 
        FABL.fourierOneNorm f * ε
    O'Donnell, Lemma 6.38: an `ε`-biased density fools a real-valued function up to its
    Fourier `1`-norm times `ε`. 
Lemma6.4.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
Theorem 1.2.3
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Fourier 1-norm under products. For f,g:\{-1,1\}^n\to\mathbb R, \lVert\widehat{fg}\rVert_1 \le\lVert\widehat f\rVert_1\lVert\widehat g\rVert_1. In particular, \lVert\widehat{f^2}\rVert_1\le\lVert\widehat f\rVert_1^2.

Lean code for Lemma6.4.72 theorems
  • theoremdefined in FABL/Chapter06/LearningAndTesting/FourierNorms.lean
    complete
    theorem FABL.fourierOneNorm_pointwise_mul_le {n : }
      (f g : FABL.SignCube n  ) :
      (FABL.fourierOneNorm fun x => f x * g x) 
        FABL.fourierOneNorm f * FABL.fourierOneNorm g
    theorem FABL.fourierOneNorm_pointwise_mul_le
      {n : } (f g : FABL.SignCube n  ) :
      (FABL.fourierOneNorm fun x =>
          f x * g x) 
        FABL.fourierOneNorm f *
          FABL.fourierOneNorm g
    The Fourier `1`-norm is submultiplicative under pointwise multiplication. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/FourierNorms.lean
    complete
    theorem FABL.fourierOneNorm_sq_le {n : } (f : FABL.SignCube n  ) :
      (FABL.fourierOneNorm fun x => f x ^ 2)  FABL.fourierOneNorm f ^ 2
    theorem FABL.fourierOneNorm_sq_le {n : }
      (f : FABL.SignCube n  ) :
      (FABL.fourierOneNorm fun x => f x ^ 2) 
        FABL.fourierOneNorm f ^ 2
    The Fourier `1`-norm of a pointwise square is at most the square of the original
    Fourier `1`-norm. 
Corollary6.4.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 2
Statement dependency previews
Preview
Lemma 6.4.6
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 4
Reverse dependency previews
Preview
Lemma 6.4.12
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Corollary 6.39. If f:\{-1,1\}^n\to\mathbb R and \varphi:\{-1,1\}^n\to\mathbb R_{\ge0} is an \epsilon-biased density, where \epsilon\ge0, then \left| \mathbb E_{x\sim\varphi}[f(x)^2]-\mathbb E[f^2] \right| \le \lVert\widehat f\rVert_1^2\epsilon.

Lean code for Corollary6.4.81 theorem
  • theoremdefined in FABL/Chapter06/LearningAndTesting/FourierNorms.lean
    complete
    theorem FABL.ProbabilityDensity.abs_expectation_signFunction_sq_sub_mean_sq_le
      {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 * ε
    theorem FABL.ProbabilityDensity.abs_expectation_signFunction_sq_sub_mean_sq_le
      {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 * ε
    O'Donnell, Corollary 6.39: an `ε`-biased density estimates the second moment of a
    real-valued function up to `‖f̂‖₁² ε`. 
Proposition6.4.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 3
Statement dependency previews
Preview
Proposition 1.4.1
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 2
Reverse dependency previews
Preview
Proposition 6.4.13
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Proposition 6.40. There is a deterministic algorithm which, given query access to f:\{-1,1\}^n\to\mathbb R, a set U\subseteq[n], 0<\epsilon\le1/2, and s\ge1, outputs an estimate \widetilde f(U) such that |\widetilde f(U)-\widehat f(U)|\le\epsilon, provided \lVert\widehat f\rVert_1\le s. Its running time is \operatorname{poly}(n,s,1/\epsilon).

The algorithm constructs an (\epsilon/s)-biased multiset, enumerates it, and queries f(x)\chi_U(x) at every multiset element.

The executable interface represents \epsilon by a positive rational and s by a positive natural-number upper bound. Its complete charged cost is O(\lceil ns/\epsilon\rceil^8), while the correctness theorem interprets both encoded parameters in \mathbb R.

Lean code for Proposition6.4.925 declarations
  • theoremdefined in FABL/Chapter06/LearningAndTesting/SmallBiasFourierAlgorithm.lean
    complete
    theorem FABL.ProbabilityDensity.IsBiased.uniformPushforward_comp_equiv.{u_1,
        u_2}
      {n : } {Ω : Type u_1} {Ω' : Type u_2} [Fintype Ω] [Nonempty Ω]
      [Fintype Ω'] [Nonempty Ω'] {g : Ω  FABL.F₂Cube n} {ε : }
      (hbiased : (FABL.ProbabilityDensity.uniformPushforward g).IsBiased ε)
      (e : Ω'  Ω) :
      (FABL.ProbabilityDensity.uniformPushforward (g  e)).IsBiased ε
    theorem FABL.ProbabilityDensity.IsBiased.uniformPushforward_comp_equiv.{u_1,
        u_2}
      {n : } {Ω : Type u_1} {Ω' : Type u_2}
      [Fintype Ω] [Nonempty Ω] [Fintype Ω']
      [Nonempty Ω'] {g : Ω  FABL.F₂Cube n}
      {ε : }
      (hbiased :
        (FABL.ProbabilityDensity.uniformPushforward
              g).IsBiased
          ε)
      (e : Ω'  Ω) :
      (FABL.ProbabilityDensity.uniformPushforward
            (g  e)).IsBiased
        ε
    Small bias is unchanged when a finite uniform seed type is reindexed by an
    equivalence.
    
  • structure(3 fields)defined in FABL/Chapter06/LearningAndTesting/SmallBiasFourierAlgorithm.lean
    complete
    structure FABL.SmallBiasFourierInput : Type
    structure FABL.SmallBiasFourierInput : Type
    Finite input for Proposition 6.40.  The target accuracy is `bias.epsilon`;
    `fourierBound` is an integral upper bound for the Fourier `1`-norm.
    
    bias : FABL.SmallBiasInput
    The dimension and positive rational target accuracy. 
    fourierBound : 
    An integral upper bound for the target's Fourier `1`-norm. 
    fourierBound_pos : 1  self.fourierBound
    The Fourier bound is at least one. 
  • defdefined in FABL/Chapter06/LearningAndTesting/SmallBiasFourierAlgorithm.lean
    complete
    def FABL.SmallBiasFourierInput.epsilon
      (input : FABL.SmallBiasFourierInput) : 
    def FABL.SmallBiasFourierInput.epsilon
      (input : FABL.SmallBiasFourierInput) : 
    The real target accuracy denoted by the finite input. 
  • abbrevdefined in FABL/Chapter06/LearningAndTesting/SmallBiasFourierAlgorithm.lean
    complete
    abbrev FABL.SmallBiasFourierInput.generatorInput
      (input : FABL.SmallBiasFourierInput) : FABL.SmallBiasInput
    abbrev FABL.SmallBiasFourierInput.generatorInput
      (input : FABL.SmallBiasFourierInput) :
      FABL.SmallBiasInput
    The small-bias construction input with requested bias `ε / s`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/SmallBiasFourierAlgorithm.lean
    complete
    theorem FABL.SmallBiasFourierInput.generatorInput_epsilon
      (input : FABL.SmallBiasFourierInput) :
      input.generatorInput.epsilon = input.epsilon / input.fourierBound
    theorem FABL.SmallBiasFourierInput.generatorInput_epsilon
      (input : FABL.SmallBiasFourierInput) :
      input.generatorInput.epsilon =
        input.epsilon / input.fourierBound
    The generator's bias is exactly the target accuracy divided by the norm bound. 
  • defdefined in FABL/Chapter06/LearningAndTesting/SmallBiasFourierAlgorithm.lean
    complete
    def FABL.SmallBiasFourierInput.sampleCount
      (input : FABL.SmallBiasFourierInput) : 
    def FABL.SmallBiasFourierInput.sampleCount
      (input : FABL.SmallBiasFourierInput) : 
    The number of seed pairs enumerated by the generator. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/SmallBiasFourierAlgorithm.lean
    complete
    theorem FABL.SmallBiasFourierInput.sampleCount_pos
      (input : FABL.SmallBiasFourierInput) : 0 < input.sampleCount
    theorem FABL.SmallBiasFourierInput.sampleCount_pos
      (input : FABL.SmallBiasFourierInput) :
      0 < input.sampleCount
  • defdefined in FABL/Chapter06/LearningAndTesting/SmallBiasFourierAlgorithm.lean
    complete
    def FABL.SmallBiasFourierInput.construction
      (input : FABL.SmallBiasFourierInput) :
      FABL.ExecutableSmallBiasConstruction input.generatorInput.n
    def FABL.SmallBiasFourierInput.construction
      (input : FABL.SmallBiasFourierInput) :
      FABL.ExecutableSmallBiasConstruction
        input.generatorInput.n
    The selected deterministic small-bias construction. 
  • defdefined in FABL/Chapter06/LearningAndTesting/SmallBiasFourierAlgorithm.lean
    complete
    def FABL.SmallBiasFourierInput.sample (input : FABL.SmallBiasFourierInput) :
      Fin input.sampleCount  FABL.F₂Cube input.generatorInput.n
    def FABL.SmallBiasFourierInput.sample
      (input : FABL.SmallBiasFourierInput) :
      Fin input.sampleCount 
        FABL.F₂Cube input.generatorInput.n
    The fixed query sample, indexed by the canonical recursive enumeration of
    the two binary field seeds.
    
  • defdefined in FABL/Chapter06/LearningAndTesting/SmallBiasFourierAlgorithm.lean
    complete
    def FABL.SmallBiasFourierInput.sampleDensity
      (input : FABL.SmallBiasFourierInput) :
      FABL.ProbabilityDensity input.generatorInput.n
    def FABL.SmallBiasFourierInput.sampleDensity
      (input : FABL.SmallBiasFourierInput) :
      FABL.ProbabilityDensity
        input.generatorInput.n
    The probability density induced by the explicitly indexed query sample. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/SmallBiasFourierAlgorithm.lean
    complete
    theorem FABL.SmallBiasFourierInput.sample_isBiased
      (input : FABL.SmallBiasFourierInput) :
      input.sampleDensity.IsBiased (input.epsilon / input.fourierBound)
    theorem FABL.SmallBiasFourierInput.sample_isBiased
      (input : FABL.SmallBiasFourierInput) :
      input.sampleDensity.IsBiased
        (input.epsilon / input.fourierBound)
    The explicitly indexed query sample has bias `ε / s`. 
  • defdefined in FABL/Chapter06/LearningAndTesting/SmallBiasFourierAlgorithm.lean
    complete
    def FABL.deterministicSmallBiasFourierEstimatorCost
      (input : FABL.SmallBiasFourierInput)
      (U : Finset (Fin input.generatorInput.n)) : FABL.LearningCost
    def FABL.deterministicSmallBiasFourierEstimatorCost
      (input : FABL.SmallBiasFourierInput)
      (U :
        Finset (Fin input.generatorInput.n)) :
      FABL.LearningCost
    Full cost of constructing the sample and running its query estimator. 
  • defdefined in FABL/Chapter06/LearningAndTesting/SmallBiasFourierAlgorithm.lean
    complete
    def FABL.deterministicSmallBiasFourierEstimatorProgram
      (input : FABL.SmallBiasFourierInput)
      (U : Finset (Fin input.generatorInput.n)) :
      FABL.DeterministicQueryProgram (FABL.SignCube input.generatorInput.n)
         
    def FABL.deterministicSmallBiasFourierEstimatorProgram
      (input : FABL.SmallBiasFourierInput)
      (U :
        Finset (Fin input.generatorInput.n)) :
      FABL.DeterministicQueryProgram
        (FABL.SignCube input.generatorInput.n)
         
    The deterministic program charges the complete sample construction before
    enumerating the real-valued oracle queries.
    
  • theoremdefined in FABL/Chapter06/LearningAndTesting/SmallBiasFourierAlgorithm.lean
    complete
    theorem FABL.DeterministicQueryProgram.runWithCost_deterministicSmallBiasFourierEstimatorProgram
      (input : FABL.SmallBiasFourierInput)
      (f : FABL.SignCube input.generatorInput.n  )
      (U : Finset (Fin input.generatorInput.n)) :
      FABL.DeterministicQueryProgram.runWithCost f
          (FABL.deterministicSmallBiasFourierEstimatorProgram input U) =
        (FABL.smallBiasFourierEstimate f input.sample U,
          FABL.deterministicSmallBiasFourierEstimatorCost input U)
    theorem FABL.DeterministicQueryProgram.runWithCost_deterministicSmallBiasFourierEstimatorProgram
      (input : FABL.SmallBiasFourierInput)
      (f :
        FABL.SignCube input.generatorInput.n 
          )
      (U :
        Finset (Fin input.generatorInput.n)) :
      FABL.DeterministicQueryProgram.runWithCost
          f
          (FABL.deterministicSmallBiasFourierEstimatorProgram
            input U) =
        (FABL.smallBiasFourierEstimate f
            input.sample U,
          FABL.deterministicSmallBiasFourierEstimatorCost
            input U)
    The program returns the empirical Fourier estimate with exact visible cost. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/SmallBiasFourierAlgorithm.lean
    complete
    theorem FABL.abs_deterministicSmallBiasFourierEstimate_sub_fourierCoeff_le
      (input : FABL.SmallBiasFourierInput)
      (f : FABL.SignCube input.generatorInput.n  )
      (U : Finset (Fin input.generatorInput.n))
      (hf : FABL.fourierOneNorm f  input.fourierBound) :
      |FABL.smallBiasFourierEstimate f input.sample U -
            FABL.fourierCoeff f U| 
        input.epsilon
    theorem FABL.abs_deterministicSmallBiasFourierEstimate_sub_fourierCoeff_le
      (input : FABL.SmallBiasFourierInput)
      (f :
        FABL.SignCube input.generatorInput.n 
          )
      (U :
        Finset (Fin input.generatorInput.n))
      (hf :
        FABL.fourierOneNorm f 
          input.fourierBound) :
      |FABL.smallBiasFourierEstimate f
              input.sample U -
            FABL.fourierCoeff f U| 
        input.epsilon
    O'Donnell, Proposition 6.40: under the advertised Fourier `1`-norm bound,
    the deterministic finite-input program estimates the requested coefficient
    to within `ε`.
    
  • theoremdefined in FABL/Chapter06/LearningAndTesting/SmallBiasFourierAlgorithm.lean
    complete
    theorem FABL.deterministicSmallBiasFourierEstimatorCost_queries
      (input : FABL.SmallBiasFourierInput)
      (U : Finset (Fin input.generatorInput.n)) :
      (FABL.deterministicSmallBiasFourierEstimatorCost input U).queries =
        input.sampleCount
    theorem FABL.deterministicSmallBiasFourierEstimatorCost_queries
      (input : FABL.SmallBiasFourierInput)
      (U :
        Finset (Fin input.generatorInput.n)) :
      (FABL.deterministicSmallBiasFourierEstimatorCost
            input U).queries =
        input.sampleCount
    The complete deterministic program makes exactly one query per seed pair. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/SmallBiasFourierAlgorithm.lean
    complete
    theorem FABL.deterministicSmallBiasFourierEstimatorCost_randomExamples
      (input : FABL.SmallBiasFourierInput)
      (U : Finset (Fin input.generatorInput.n)) :
      (FABL.deterministicSmallBiasFourierEstimatorCost input
            U).randomExamples =
        0
    theorem FABL.deterministicSmallBiasFourierEstimatorCost_randomExamples
      (input : FABL.SmallBiasFourierInput)
      (U :
        Finset (Fin input.generatorInput.n)) :
      (FABL.deterministicSmallBiasFourierEstimatorCost
            input U).randomExamples =
        0
    The deterministic estimator uses no random examples. 
  • defdefined in FABL/Chapter06/LearningAndTesting/SmallBiasFourierAlgorithm.lean
    complete
    def FABL.SmallBiasFourierInput.polynomialBudget
      (input : FABL.SmallBiasFourierInput) : 
    def FABL.SmallBiasFourierInput.polynomialBudget
      (input : FABL.SmallBiasFourierInput) : 
    A common polynomial budget in the integral scale `⌈n s / ε⌉`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/SmallBiasFourierAlgorithm.lean
    complete
    theorem FABL.SmallBiasFourierInput.sampleCount_le_four_mul_scale_sq
      (input : FABL.SmallBiasFourierInput) :
      input.sampleCount  4 * input.generatorInput.scale ^ 2
    theorem FABL.SmallBiasFourierInput.sampleCount_le_four_mul_scale_sq
      (input : FABL.SmallBiasFourierInput) :
      input.sampleCount 
        4 * input.generatorInput.scale ^ 2
    The number of enumerated seed pairs is at most four times the squared scale. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/SmallBiasFourierAlgorithm.lean
    complete
    theorem FABL.deterministicSmallBiasFourierEstimatorCost_work
      (input : FABL.SmallBiasFourierInput)
      (U : Finset (Fin input.generatorInput.n)) :
      (FABL.deterministicSmallBiasFourierEstimatorCost input U).work =
        FABL.deterministicSmallBiasWork input.generatorInput +
            input.sampleCount +
          FABL.smallBiasFourierEstimatorWork input.sampleCount U
    theorem FABL.deterministicSmallBiasFourierEstimatorCost_work
      (input : FABL.SmallBiasFourierInput)
      (U :
        Finset (Fin input.generatorInput.n)) :
      (FABL.deterministicSmallBiasFourierEstimatorCost
            input U).work =
        FABL.deterministicSmallBiasWork
              input.generatorInput +
            input.sampleCount +
          FABL.smallBiasFourierEstimatorWork
            input.sampleCount U
    Exact local-work decomposition of the complete deterministic estimator. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/SmallBiasFourierAlgorithm.lean
    complete
    theorem FABL.deterministicSmallBiasFourierEstimatorCost_resource_bounds
      (input : FABL.SmallBiasFourierInput)
      (U : Finset (Fin input.generatorInput.n)) :
      (FABL.deterministicSmallBiasFourierEstimatorCost input
              U).randomExamples =
          0 
        (FABL.deterministicSmallBiasFourierEstimatorCost input U).queries 
            input.polynomialBudget 
          (FABL.deterministicSmallBiasFourierEstimatorCost input U).work 
            input.polynomialBudget
    theorem FABL.deterministicSmallBiasFourierEstimatorCost_resource_bounds
      (input : FABL.SmallBiasFourierInput)
      (U :
        Finset (Fin input.generatorInput.n)) :
      (FABL.deterministicSmallBiasFourierEstimatorCost
              input U).randomExamples =
          0 
        (FABL.deterministicSmallBiasFourierEstimatorCost
                input U).queries 
            input.polynomialBudget 
          (FABL.deterministicSmallBiasFourierEstimatorCost
                input U).work 
            input.polynomialBudget
    Every execution obeys one common degree-eight polynomial bound in
    `⌈n s / ε⌉`.
    
  • abbrevdefined in FABL/Chapter06/LearningAndTesting/SmallBiasFourierAlgorithm.lean
    complete
    abbrev FABL.SmallBiasFourierTask : Type
    abbrev FABL.SmallBiasFourierTask : Type
    A dimension-compatible estimator task for uniform asymptotic statements. 
  • defdefined in FABL/Chapter06/LearningAndTesting/SmallBiasFourierAlgorithm.lean
    complete
    def FABL.smallBiasFourierTaskScale (task : FABL.SmallBiasFourierTask) : 
    def FABL.smallBiasFourierTaskScale
      (task : FABL.SmallBiasFourierTask) : 
    Scale of a complete Fourier-estimation task. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/SmallBiasFourierAlgorithm.lean
    complete
    theorem FABL.deterministicSmallBiasFourierEstimator_queries_isBigO :
      (fun task =>
          (FABL.deterministicSmallBiasFourierEstimatorCost task.fst
                task.snd).queries) =O[Filter.comap
          FABL.smallBiasFourierTaskScale Filter.atTop]
        fun task => ((FABL.smallBiasFourierTaskScale task + 1) ^ 8)
    theorem FABL.deterministicSmallBiasFourierEstimator_queries_isBigO :
      (fun task =>
          (FABL.deterministicSmallBiasFourierEstimatorCost
                task.fst
                task.snd).queries) =O[Filter.comap
          FABL.smallBiasFourierTaskScale
          Filter.atTop]
        fun task =>
        ((FABL.smallBiasFourierTaskScale
                task +
              1) ^
            8)
    Query complexity is polynomial in `⌈n s / ε⌉`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/SmallBiasFourierAlgorithm.lean
    complete
    theorem FABL.deterministicSmallBiasFourierEstimator_work_isBigO :
      (fun task =>
          (FABL.deterministicSmallBiasFourierEstimatorCost task.fst
                task.snd).work) =O[Filter.comap
          FABL.smallBiasFourierTaskScale Filter.atTop]
        fun task => ((FABL.smallBiasFourierTaskScale task + 1) ^ 8)
    theorem FABL.deterministicSmallBiasFourierEstimator_work_isBigO :
      (fun task =>
          (FABL.deterministicSmallBiasFourierEstimatorCost
                task.fst
                task.snd).work) =O[Filter.comap
          FABL.smallBiasFourierTaskScale
          Filter.atTop]
        fun task =>
        ((FABL.smallBiasFourierTaskScale
                task +
              1) ^
            8)
    Charged local work is polynomial in `⌈n s / ε⌉`. 
Lemma6.4.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 3.3.5
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Equation (6.6). For S\subseteq J\subseteq[n], \mathbf W^{S\mid\overline J}[f] =\sum_{T\subseteq\overline J}\widehat f(S\cup T)^2 =\mathbb E_{z\sim\{-1,1\}^{\overline J}} \left[\widehat{f_{J\mid z}}(S)^2\right] =\lVert F_{S\mid\overline J}f\rVert_2^2. \tag{6.6}

Lean code for Lemma6.4.101 theorem
  • theoremdefined in FABL/Chapter06/LearningAndTesting/RestrictionWeights.lean
    complete
    theorem FABL.restrictedFourierWeight_equation6_6 {n : }
      (f : FABL.SignCube n  ) (J : Finset (Fin n)) (S : Finset J) :
      FABL.restrictedFourierWeight f J S =
           T,
            FABL.fourierCoeff f
                (FABL.liftFreeFrequency S  FABL.liftFixedFrequency T) ^
              2 
         T,
            FABL.fourierCoeff f
                (FABL.liftFreeFrequency S  FABL.liftFixedFrequency T) ^
              2 =
          FABL.mean fun z => FABL.restrictionFourierCoeff f J S z ^ 2
    theorem FABL.restrictedFourierWeight_equation6_6
      {n : } (f : FABL.SignCube n  )
      (J : Finset (Fin n)) (S : Finset J) :
      FABL.restrictedFourierWeight f J S =
           T,
            FABL.fourierCoeff f
                (FABL.liftFreeFrequency S 
                  FABL.liftFixedFrequency T) ^
              2 
         T,
            FABL.fourierCoeff f
                (FABL.liftFreeFrequency S 
                  FABL.liftFixedFrequency T) ^
              2 =
          FABL.mean fun z =>
            FABL.restrictionFourierCoeff f J S
                z ^
              2
    O'Donnell, Equation (6.6): the restricted Fourier weight is both the sum of
    the squared coefficients in its frequency bucket and the uniform second moment of
    the associated restricted-coefficient function. 
Lemma6.4.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 3
Statement dependency previews
Preview
Definition 3.2.2
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Exercise 3.7 (Fourier 1-norm under restriction). For every restriction f_{J\mid z} of f:\{-1,1\}^n\to\mathbb R, \lVert\widehat{f_{J\mid z}}\rVert_1 \le\lVert\widehat f\rVert_1. The associated function F_{S\mid\overline J}f also satisfies \lVert\widehat{F_{S\mid\overline J}f}\rVert_1 \le\lVert\widehat f\rVert_1.

Lean code for Lemma6.4.114 declarations
  • theoremdefined in FABL/Chapter06/LearningAndTesting/RestrictionWeights.lean
    complete
    theorem FABL.sum_abs_indexedFourierCoeff_signRestriction_le_fourierOneNorm
      {n : } (f : FABL.SignCube n  ) (J : Finset (Fin n))
      (z : FABL.FixedSignCube J) :
       S, |FABL.indexedFourierCoeff (FABL.signRestriction f J z) S| 
        FABL.fourierOneNorm f
    theorem FABL.sum_abs_indexedFourierCoeff_signRestriction_le_fourierOneNorm
      {n : } (f : FABL.SignCube n  )
      (J : Finset (Fin n))
      (z : FABL.FixedSignCube J) :
       S,
          |FABL.indexedFourierCoeff
              (FABL.signRestriction f J z)
              S| 
        FABL.fourierOneNorm f
    O'Donnell, Exercise 3.7: restriction cannot increase the Fourier `1`-norm.
    The left side is the subtype-indexed Fourier `1`-norm of the restricted function. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/RestrictionWeights.lean
    complete
    theorem FABL.sum_abs_indexedFourierCoeff_restrictionFourierCoeff_le_fourierOneNorm
      {n : } (f : FABL.SignCube n  ) (J : Finset (Fin n))
      (S : Finset J) :
       T,
          |FABL.indexedFourierCoeff (FABL.restrictionFourierCoeff f J S)
              T| 
        FABL.fourierOneNorm f
    theorem FABL.sum_abs_indexedFourierCoeff_restrictionFourierCoeff_le_fourierOneNorm
      {n : } (f : FABL.SignCube n  )
      (J : Finset (Fin n)) (S : Finset J) :
       T,
          |FABL.indexedFourierCoeff
              (FABL.restrictionFourierCoeff f
                J S)
              T| 
        FABL.fourierOneNorm f
    O'Donnell, Exercise 3.7: the associated restricted-coefficient function has
    Fourier `1`-norm at most that of the ambient function. 
  • defdefined in FABL/Chapter06/LearningAndTesting/RestrictionWeights.lean
    complete
    def FABL.fixedSignCubeEquiv {n : } (J : Finset (Fin n)) :
      FABL.SignCube (Fintype.card (FABL.FixedIndex J)) 
        FABL.FixedSignCube J
    def FABL.fixedSignCubeEquiv {n : }
      (J : Finset (Fin n)) :
      FABL.SignCube
          (Fintype.card (FABL.FixedIndex J)) 
        FABL.FixedSignCube J
    Reindex assignments on the complementary coordinate subtype by a standard finite cube. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/RestrictionWeights.lean
    complete
    theorem FABL.fourierOneNorm_restrictionFourierCoeff_comp_fixedSignCubeEquiv_le
      {n : } (f : FABL.SignCube n  ) (J : Finset (Fin n))
      (S : Finset J) :
      (FABL.fourierOneNorm fun z =>
          FABL.restrictionFourierCoeff f J S
            ((FABL.fixedSignCubeEquiv J) z)) 
        FABL.fourierOneNorm f
    theorem FABL.fourierOneNorm_restrictionFourierCoeff_comp_fixedSignCubeEquiv_le
      {n : } (f : FABL.SignCube n  )
      (J : Finset (Fin n)) (S : Finset J) :
      (FABL.fourierOneNorm fun z =>
          FABL.restrictionFourierCoeff f J S
            ((FABL.fixedSignCubeEquiv J) z)) 
        FABL.fourierOneNorm f
    The standard-cube reindexing of the associated restricted-coefficient function
    also has Fourier `1`-norm at most that of the ambient function. 
Lemma6.4.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 3
Statement dependency previews
Preview
Proposition 3.3.6
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Equation (6.7). Suppose \lVert\widehat f\rVert_1\le s, put F=F_{S\mid\overline J}f, and let \varphi be an \epsilon/(4s^2)-biased density on \{-1,1\}^{\overline J}. Then \left| \mathbb E_{z\sim\varphi}[F(z)^2] -\mathbb E_{z\sim\{-1,1\}^{\overline J}}[F(z)^2] \right| \le \lVert\widehat F\rVert_1^2\frac{\epsilon}{4s^2} \le\frac{\epsilon}{4}. \tag{6.7}

Lean code for Lemma6.4.121 theorem
  • theoremdefined in FABL/Chapter06/LearningAndTesting/RestrictionWeights.lean
    complete
    theorem FABL.restrictionFourierWeight_equation6_7 {n : }
      (f : FABL.SignCube n  ) (J : Finset (Fin n)) (S : Finset J)
      (φ : FABL.ProbabilityDensity (Fintype.card (FABL.FixedIndex J)))
      {ε s : } ( : φ.IsBiased (ε / (4 * s ^ 2))) ( : 0  ε)
      (hs : 1  s) (hf : FABL.fourierOneNorm f  s) :
      have F := fun z =>
        FABL.restrictionFourierCoeff f J S ((FABL.fixedSignCubeEquiv J) z);
      |(φ.expectation fun x =>
                F
                    ((FABL.binaryCubeSignEquiv
                        (Fintype.card (FABL.FixedIndex J)))
                      x) ^
                  2) -
              FABL.mean fun z => F z ^ 2| 
          FABL.fourierOneNorm F ^ 2 * (ε / (4 * s ^ 2)) 
        FABL.fourierOneNorm F ^ 2 * (ε / (4 * s ^ 2))  ε / 4
    theorem FABL.restrictionFourierWeight_equation6_7
      {n : } (f : FABL.SignCube n  )
      (J : Finset (Fin n)) (S : Finset J)
      (φ :
        FABL.ProbabilityDensity
          (Fintype.card (FABL.FixedIndex J)))
      {ε s : }
      ( : φ.IsBiased (ε / (4 * s ^ 2)))
      ( : 0  ε) (hs : 1  s)
      (hf : FABL.fourierOneNorm f  s) :
      have F := fun z =>
        FABL.restrictionFourierCoeff f J S
          ((FABL.fixedSignCubeEquiv J) z);
      |(φ.expectation fun x =>
                F
                    ((FABL.binaryCubeSignEquiv
                        (Fintype.card
                          (FABL.FixedIndex
                            J)))
                      x) ^
                  2) -
              FABL.mean fun z => F z ^ 2| 
          FABL.fourierOneNorm F ^ 2 *
            (ε / (4 * s ^ 2)) 
        FABL.fourierOneNorm F ^ 2 *
            (ε / (4 * s ^ 2)) 
          ε / 4
    O'Donnell, Equation (6.7): a density with nonnegative bias parameter
    `ε / (4s²)` estimates the restricted Fourier weight to within `ε / 4`.
    The first conjunct records the Corollary 6.39 bound and the second its
    specialization using the Fourier `1`-norm hypothesis. 
Proposition6.4.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 4
Statement dependency previews
Preview
Corollary 6.4.8
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Proposition 6.41. There is a deterministic algorithm which, given query access to f:\{-1,1\}^n\to\{-1,1\}, sets S\subseteq J\subseteq[n], 0<\epsilon\le1/2, and s\ge1, outputs \beta satisfying \left|\mathbf W^{S\mid\overline J}[f]-\beta\right|\le\epsilon, provided \lVert\widehat f\rVert_1\le s. Its running time is \operatorname{poly}(n,s,1/\epsilon).

Lean code for Proposition6.4.1334 declarations
  • structure(3 fields)defined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    structure FABL.RestrictedWeightInput : Type
    structure FABL.RestrictedWeightInput : Type
    Finite rational input for Proposition 6.41. 
    bias : FABL.SmallBiasInput
    Dimension and target accuracy `ε`. 
    fourierBound : 
    Integral upper bound `s` for the Fourier `1`-norm. 
    fourierBound_pos : 1  self.fourierBound
    The Fourier bound is at least one. 
  • defdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    def FABL.RestrictedWeightInput.quarterBias
      (input : FABL.RestrictedWeightInput) : FABL.SmallBiasInput
    def FABL.RestrictedWeightInput.quarterBias
      (input : FABL.RestrictedWeightInput) :
      FABL.SmallBiasInput
    The valid small-bias input encoding `ε / 4` in the ambient dimension. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    theorem FABL.RestrictedWeightInput.quarterBias_epsilon
      (input : FABL.RestrictedWeightInput) :
      input.quarterBias.epsilon = input.epsilon / 4
    theorem FABL.RestrictedWeightInput.quarterBias_epsilon
      (input : FABL.RestrictedWeightInput) :
      input.quarterBias.epsilon =
        input.epsilon / 4
    The quarter-accuracy input denotes exactly `ε / 4`. 
  • defdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    def FABL.RestrictedWeightInput.innerInput
      (input : FABL.RestrictedWeightInput) : FABL.SmallBiasFourierInput
    def FABL.RestrictedWeightInput.innerInput
      (input : FABL.RestrictedWeightInput) :
      FABL.SmallBiasFourierInput
    The inner construction has bias `ε / (4s)`. 
  • defdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    def FABL.RestrictedWeightInput.outerInput
      (input : FABL.RestrictedWeightInput) : FABL.SmallBiasFourierInput
    def FABL.RestrictedWeightInput.outerInput
      (input : FABL.RestrictedWeightInput) :
      FABL.SmallBiasFourierInput
    The outer construction has bias `ε / (4s²)`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    theorem FABL.RestrictedWeightInput.innerInput_biasParameter
      (input : FABL.RestrictedWeightInput) :
      input.innerInput.epsilon / input.innerInput.fourierBound =
        input.epsilon / (4 * input.fourierBound)
    theorem FABL.RestrictedWeightInput.innerInput_biasParameter
      (input : FABL.RestrictedWeightInput) :
      input.innerInput.epsilon /
          input.innerInput.fourierBound =
        input.epsilon /
          (4 * input.fourierBound)
    Exact inner bias parameter. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    theorem FABL.RestrictedWeightInput.outerInput_biasParameter
      (input : FABL.RestrictedWeightInput) :
      input.outerInput.epsilon / input.outerInput.fourierBound =
        input.epsilon / (4 * input.fourierBound ^ 2)
    theorem FABL.RestrictedWeightInput.outerInput_biasParameter
      (input : FABL.RestrictedWeightInput) :
      input.outerInput.epsilon /
          input.outerInput.fourierBound =
        input.epsilon /
          (4 * input.fourierBound ^ 2)
    Exact outer bias parameter. 
  • defdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    def FABL.RestrictedWeightInput.innerCount
      (input : FABL.RestrictedWeightInput) : 
    def FABL.RestrictedWeightInput.innerCount
      (input : FABL.RestrictedWeightInput) : 
    The inner sample cardinality. 
  • defdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    def FABL.RestrictedWeightInput.outerCount
      (input : FABL.RestrictedWeightInput) : 
    def FABL.RestrictedWeightInput.outerCount
      (input : FABL.RestrictedWeightInput) : 
    The outer sample cardinality. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    theorem FABL.RestrictedWeightInput.innerCount_pos
      (input : FABL.RestrictedWeightInput) : 0 < input.innerCount
    theorem FABL.RestrictedWeightInput.innerCount_pos
      (input : FABL.RestrictedWeightInput) :
      0 < input.innerCount
  • theoremdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    theorem FABL.RestrictedWeightInput.outerCount_pos
      (input : FABL.RestrictedWeightInput) : 0 < input.outerCount
    theorem FABL.RestrictedWeightInput.outerCount_pos
      (input : FABL.RestrictedWeightInput) :
      0 < input.outerCount
  • theoremdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    theorem FABL.restrictedWeightFreeSample_isBiased
      (input : FABL.RestrictedWeightInput) (J : Finset (Fin input.bias.n)) :
      (FABL.ProbabilityDensity.uniformPushforward
            (FABL.restrictedWeightFreeSample input J)).IsBiased
        (input.epsilon / (4 * input.fourierBound))
    theorem FABL.restrictedWeightFreeSample_isBiased
      (input : FABL.RestrictedWeightInput)
      (J : Finset (Fin input.bias.n)) :
      (FABL.ProbabilityDensity.uniformPushforward
            (FABL.restrictedWeightFreeSample
              input J)).IsBiased
        (input.epsilon /
          (4 * input.fourierBound))
    The projected inner sample retains bias `ε / (4s)`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    theorem FABL.restrictedWeightFixedSample_isBiased
      (input : FABL.RestrictedWeightInput) (J : Finset (Fin input.bias.n)) :
      (FABL.ProbabilityDensity.uniformPushforward
            (FABL.restrictedWeightFixedSample input J)).IsBiased
        (input.epsilon / (4 * input.fourierBound ^ 2))
    theorem FABL.restrictedWeightFixedSample_isBiased
      (input : FABL.RestrictedWeightInput)
      (J : Finset (Fin input.bias.n)) :
      (FABL.ProbabilityDensity.uniformPushforward
            (FABL.restrictedWeightFixedSample
              input J)).IsBiased
        (input.epsilon /
          (4 * input.fourierBound ^ 2))
    The projected outer sample retains bias `ε / (4s²)`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    theorem FABL.abs_restrictedFourierCoefficientEstimate_sub_le
      (input : FABL.RestrictedWeightInput)
      (target : FABL.BooleanFunction input.bias.n)
      (J : Finset (Fin input.bias.n)) (S : Finset J)
      (z : FABL.FixedSignCube J)
      (hf : FABL.fourierOneNorm target.toReal  input.fourierBound) :
      |FABL.restrictedFourierCoefficientEstimate input target J S z -
            FABL.restrictionFourierCoeff target.toReal J S z| 
        input.epsilon / 4
    theorem FABL.abs_restrictedFourierCoefficientEstimate_sub_le
      (input : FABL.RestrictedWeightInput)
      (target :
        FABL.BooleanFunction input.bias.n)
      (J : Finset (Fin input.bias.n))
      (S : Finset J)
      (z : FABL.FixedSignCube J)
      (hf :
        FABL.fourierOneNorm target.toReal 
          input.fourierBound) :
      |FABL.restrictedFourierCoefficientEstimate
              input target J S z -
            FABL.restrictionFourierCoeff
              target.toReal J S z| 
        input.epsilon / 4
    Every inner estimate is within `ε / 4` of the true restricted coefficient. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    theorem FABL.abs_restrictionFourierCoeff_toReal_le_one {n : }
      (target : FABL.BooleanFunction n) (J : Finset (Fin n)) (S : Finset J)
      (z : FABL.FixedSignCube J) :
      |FABL.restrictionFourierCoeff target.toReal J S z|  1
    theorem FABL.abs_restrictionFourierCoeff_toReal_le_one
      {n : }
      (target : FABL.BooleanFunction n)
      (J : Finset (Fin n)) (S : Finset J)
      (z : FABL.FixedSignCube J) :
      |FABL.restrictionFourierCoeff
            target.toReal J S z| 
        1
    A restricted Fourier coefficient of a Boolean target has magnitude at most one. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    theorem FABL.abs_restrictedFourierWeightOuterMean_sub_le
      (input : FABL.RestrictedWeightInput)
      (target : FABL.BooleanFunction input.bias.n)
      (J : Finset (Fin input.bias.n)) (S : Finset J)
      (hf : FABL.fourierOneNorm target.toReal  input.fourierBound) :
      |FABL.restrictedFourierWeightOuterMean input target J S -
            FABL.restrictedFourierWeight target.toReal J S| 
        input.epsilon / 4
    theorem FABL.abs_restrictedFourierWeightOuterMean_sub_le
      (input : FABL.RestrictedWeightInput)
      (target :
        FABL.BooleanFunction input.bias.n)
      (J : Finset (Fin input.bias.n))
      (S : Finset J)
      (hf :
        FABL.fourierOneNorm target.toReal 
          input.fourierBound) :
      |FABL.restrictedFourierWeightOuterMean
              input target J S -
            FABL.restrictedFourierWeight
              target.toReal J S| 
        input.epsilon / 4
    Equation (6.7) controls the outer empirical mean by `ε / 4`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    theorem FABL.abs_restrictedFourierWeightEstimate_sub_outerMean_le
      (input : FABL.RestrictedWeightInput)
      (target : FABL.BooleanFunction input.bias.n)
      (J : Finset (Fin input.bias.n)) (S : Finset J)
      (hf : FABL.fourierOneNorm target.toReal  input.fourierBound) :
      |FABL.restrictedFourierWeightEstimate input target J S -
            FABL.restrictedFourierWeightOuterMean input target J S| 
        3 * input.epsilon / 4
    theorem FABL.abs_restrictedFourierWeightEstimate_sub_outerMean_le
      (input : FABL.RestrictedWeightInput)
      (target :
        FABL.BooleanFunction input.bias.n)
      (J : Finset (Fin input.bias.n))
      (S : Finset J)
      (hf :
        FABL.fourierOneNorm target.toReal 
          input.fourierBound) :
      |FABL.restrictedFourierWeightEstimate
              input target J S -
            FABL.restrictedFourierWeightOuterMean
              input target J S| 
        3 * input.epsilon / 4
    Replacing every true inner coefficient by its estimate changes the outer mean by
    at most `3ε / 4`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    theorem FABL.abs_restrictedFourierWeightEstimate_sub_le
      (input : FABL.RestrictedWeightInput)
      (target : FABL.BooleanFunction input.bias.n)
      (J : Finset (Fin input.bias.n)) (S : Finset J)
      (hf : FABL.fourierOneNorm target.toReal  input.fourierBound) :
      |FABL.restrictedFourierWeight target.toReal J S -
            FABL.restrictedFourierWeightEstimate input target J S| 
        input.epsilon
    theorem FABL.abs_restrictedFourierWeightEstimate_sub_le
      (input : FABL.RestrictedWeightInput)
      (target :
        FABL.BooleanFunction input.bias.n)
      (J : Finset (Fin input.bias.n))
      (S : Finset J)
      (hf :
        FABL.fourierOneNorm target.toReal 
          input.fourierBound) :
      |FABL.restrictedFourierWeight
              target.toReal J S -
            FABL.restrictedFourierWeightEstimate
              input target J S| 
        input.epsilon
    O'Donnell, Proposition 6.41: the deterministic estimate is within `ε` of the
    restricted Fourier weight. 
  • defdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    def FABL.deterministicRestrictedWeightQueryCount
      (input : FABL.RestrictedWeightInput) : 
    def FABL.deterministicRestrictedWeightQueryCount
      (input : FABL.RestrictedWeightInput) : 
    The number of visible oracle queries, one for every outer/inner seed pair. 
  • defdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    def FABL.deterministicRestrictedWeightQueryPair
      (input : FABL.RestrictedWeightInput)
      (q : Fin (FABL.deterministicRestrictedWeightQueryCount input)) :
      Fin input.outerInput.sampleCount × Fin input.innerInput.sampleCount
    def FABL.deterministicRestrictedWeightQueryPair
      (input : FABL.RestrictedWeightInput)
      (q :
        Fin
          (FABL.deterministicRestrictedWeightQueryCount
            input)) :
      Fin input.outerInput.sampleCount ×
        Fin input.innerInput.sampleCount
    Decode a flat query index as an outer/inner seed pair. 
  • defdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    def FABL.deterministicRestrictedWeightLocalWork.{u_1}
      (input : FABL.RestrictedWeightInput) {ι : Type u_1} (S : Finset ι) : 
    def FABL.deterministicRestrictedWeightLocalWork.{u_1}
      (input : FABL.RestrictedWeightInput)
      {ι : Type u_1} (S : Finset ι) : 
    Arithmetic work after the finite query batch has been collected. 
  • defdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    def FABL.deterministicRestrictedWeightConstructionWork
      (input : FABL.RestrictedWeightInput) : 
    def FABL.deterministicRestrictedWeightConstructionWork
      (input : FABL.RestrictedWeightInput) : 
    Work charged for constructing both deterministic small-bias samples. 
  • defdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    def FABL.deterministicRestrictedWeightCost.{u_1}
      (input : FABL.RestrictedWeightInput) {ι : Type u_1} (S : Finset ι) :
      FABL.LearningCost
    def FABL.deterministicRestrictedWeightCost.{u_1}
      (input : FABL.RestrictedWeightInput)
      {ι : Type u_1} (S : Finset ι) :
      FABL.LearningCost
    Exact constructor-derived cost of Proposition 6.41's algorithm. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    theorem FABL.DeterministicQueryProgram.runWithCost_deterministicRestrictedWeightProgram
      (input : FABL.RestrictedWeightInput)
      (target : FABL.BooleanFunction input.bias.n)
      (J : Finset (Fin input.bias.n)) (S : Finset J) :
      FABL.DeterministicQueryProgram.runWithCost target
          (FABL.deterministicRestrictedWeightProgram input J S) =
        (FABL.restrictedFourierWeightEstimate input target J S,
          FABL.deterministicRestrictedWeightCost input S)
    theorem FABL.DeterministicQueryProgram.runWithCost_deterministicRestrictedWeightProgram
      (input : FABL.RestrictedWeightInput)
      (target :
        FABL.BooleanFunction input.bias.n)
      (J : Finset (Fin input.bias.n))
      (S : Finset J) :
      FABL.DeterministicQueryProgram.runWithCost
          target
          (FABL.deterministicRestrictedWeightProgram
            input J S) =
        (FABL.restrictedFourierWeightEstimate
            input target J S,
          FABL.deterministicRestrictedWeightCost
            input S)
    The visible program returns the proved estimator with its exact path cost. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    theorem FABL.deterministicRestrictedWeightCost_queries.{u_1}
      (input : FABL.RestrictedWeightInput) {ι : Type u_1} (S : Finset ι) :
      (FABL.deterministicRestrictedWeightCost input S).queries =
        input.outerCount * input.innerCount
    theorem FABL.deterministicRestrictedWeightCost_queries.{u_1}
      (input : FABL.RestrictedWeightInput)
      {ι : Type u_1} (S : Finset ι) :
      (FABL.deterministicRestrictedWeightCost
            input S).queries =
        input.outerCount * input.innerCount
    The program issues exactly the Cartesian product of the two finite samples. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    theorem FABL.deterministicRestrictedWeightCost_randomExamples.{u_1}
      (input : FABL.RestrictedWeightInput) {ι : Type u_1} (S : Finset ι) :
      (FABL.deterministicRestrictedWeightCost input S).randomExamples = 0
    theorem FABL.deterministicRestrictedWeightCost_randomExamples.{u_1}
      (input : FABL.RestrictedWeightInput)
      {ι : Type u_1} (S : Finset ι) :
      (FABL.deterministicRestrictedWeightCost
            input S).randomExamples =
        0
    The deterministic restricted-weight estimator uses no random examples. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    theorem FABL.deterministicRestrictedWeightCost_work.{u_1}
      (input : FABL.RestrictedWeightInput) {ι : Type u_1} (S : Finset ι) :
      (FABL.deterministicRestrictedWeightCost input S).work =
        FABL.deterministicRestrictedWeightConstructionWork input +
            FABL.deterministicRestrictedWeightQueryCount input +
          FABL.deterministicRestrictedWeightLocalWork input S
    theorem FABL.deterministicRestrictedWeightCost_work.{u_1}
      (input : FABL.RestrictedWeightInput)
      {ι : Type u_1} (S : Finset ι) :
      (FABL.deterministicRestrictedWeightCost
            input S).work =
        FABL.deterministicRestrictedWeightConstructionWork
              input +
            FABL.deterministicRestrictedWeightQueryCount
              input +
          FABL.deterministicRestrictedWeightLocalWork
            input S
    Exact charged-work decomposition. 
  • defdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    def FABL.RestrictedWeightInput.algorithmScale
      (input : FABL.RestrictedWeightInput) : 
    def FABL.RestrictedWeightInput.algorithmScale
      (input : FABL.RestrictedWeightInput) : 
    A common integral scale dominating both small-bias constructions. 
  • defdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    def FABL.RestrictedWeightInput.polynomialBudget
      (input : FABL.RestrictedWeightInput) : 
    def FABL.RestrictedWeightInput.polynomialBudget
      (input : FABL.RestrictedWeightInput) : 
    One explicit degree-eight polynomial resource budget. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    theorem FABL.deterministicRestrictedWeightCost_resource_bounds
      (input : FABL.RestrictedWeightInput) (J : Finset (Fin input.bias.n))
      (S : Finset J) :
      (FABL.deterministicRestrictedWeightCost input S).randomExamples = 0 
        (FABL.deterministicRestrictedWeightCost input S).queries 
            input.polynomialBudget 
          (FABL.deterministicRestrictedWeightCost input S).work 
            input.polynomialBudget
    theorem FABL.deterministicRestrictedWeightCost_resource_bounds
      (input : FABL.RestrictedWeightInput)
      (J : Finset (Fin input.bias.n))
      (S : Finset J) :
      (FABL.deterministicRestrictedWeightCost
              input S).randomExamples =
          0 
        (FABL.deterministicRestrictedWeightCost
                input S).queries 
            input.polynomialBudget 
          (FABL.deterministicRestrictedWeightCost
                input S).work 
            input.polynomialBudget
    The query count and charged work obey one explicit polynomial budget. 
  • abbrevdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    abbrev FABL.RestrictedWeightTask : Type
    abbrev FABL.RestrictedWeightTask : Type
    A dimension-compatible restricted-weight estimation task. 
  • defdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    def FABL.restrictedWeightTaskScale (task : FABL.RestrictedWeightTask) : 
    def FABL.restrictedWeightTaskScale
      (task : FABL.RestrictedWeightTask) : 
    Scale of a complete restricted-weight task. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    theorem FABL.deterministicRestrictedWeight_queries_isBigO :
      (fun task =>
          (FABL.deterministicRestrictedWeightCost task.fst
                task.snd.snd).queries) =O[Filter.comap
          FABL.restrictedWeightTaskScale Filter.atTop]
        fun task => ((FABL.restrictedWeightTaskScale task + 1) ^ 8)
    theorem FABL.deterministicRestrictedWeight_queries_isBigO :
      (fun task =>
          (FABL.deterministicRestrictedWeightCost
                task.fst
                task.snd.snd).queries) =O[Filter.comap
          FABL.restrictedWeightTaskScale
          Filter.atTop]
        fun task =>
        ((FABL.restrictedWeightTaskScale
                task +
              1) ^
            8)
    Query complexity is polynomial in the combined finite-input scale. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/RestrictedWeightAlgorithm.lean
    complete
    theorem FABL.deterministicRestrictedWeight_work_isBigO :
      (fun task =>
          (FABL.deterministicRestrictedWeightCost task.fst
                task.snd.snd).work) =O[Filter.comap
          FABL.restrictedWeightTaskScale Filter.atTop]
        fun task => ((FABL.restrictedWeightTaskScale task + 1) ^ 8)
    theorem FABL.deterministicRestrictedWeight_work_isBigO :
      (fun task =>
          (FABL.deterministicRestrictedWeightCost
                task.fst
                task.snd.snd).work) =O[Filter.comap
          FABL.restrictedWeightTaskScale
          Filter.atTop]
        fun task =>
        ((FABL.restrictedWeightTaskScale
                task +
              1) ^
            8)
    Charged local work is polynomial in the combined finite-input scale. 
Theorem6.4.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 5
Statement dependency previews
Preview
Definition 3.4.1
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Theorem 6.42. Let \mathcal C =\left\{ f:\{-1,1\}^n\to\{-1,1\}: \lVert\widehat f\rVert_1\le s \right\}. The class \mathcal C is deterministically learnable from queries with error \epsilon in time \operatorname{poly}(n,s,1/\epsilon).

Lean code for Theorem6.4.1419 declarations
  • structure(3 fields)defined in FABL/Chapter06/LearningAndTesting/DeterministicGoldreichLevin.lean
    complete
    structure FABL.DeterministicGoldreichLevinInput : Type
    structure FABL.DeterministicGoldreichLevinInput :
      Type
    Finite input for Theorem 6.42.  The learning error is the positive
    rational encoded by `accuracy`; `fourierBound` is the promised integral
    upper bound for the Fourier `1`-norm. 
    accuracy : FABL.SmallBiasInput
    Dimension and positive rational learning error. 
    fourierBound : 
    Integral Fourier `1`-norm bound. 
    fourierBound_pos : 1  self.fourierBound
    The Fourier bound is at least one. 
  • defdefined in FABL/Chapter06/LearningAndTesting/DeterministicGoldreichLevin.lean
    complete
    def FABL.DeterministicGoldreichLevinInput.learningParameter
      (input : FABL.DeterministicGoldreichLevinInput) :
      FABL.PositiveLearningParameter
    def FABL.DeterministicGoldreichLevinInput.learningParameter
      (input :
        FABL.DeterministicGoldreichLevinInput) :
      FABL.PositiveLearningParameter
    The positive rational learning parameter encoded by the finite input. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/DeterministicGoldreichLevin.lean
    complete
    theorem FABL.DeterministicGoldreichLevinInput.learningParameter_cast
      (input : FABL.DeterministicGoldreichLevinInput) :
      input.learningParameter = input.accuracy.epsilon
    theorem FABL.DeterministicGoldreichLevinInput.learningParameter_cast
      (input :
        FABL.DeterministicGoldreichLevinInput) :
      input.learningParameter =
        input.accuracy.epsilon
    The real value of the learning parameter is the input's encoded error. 
  • defdefined in FABL/Chapter06/LearningAndTesting/DeterministicGoldreichLevin.lean
    complete
    def FABL.deterministicGoldreichLevinLearner
      (input : FABL.DeterministicGoldreichLevinInput) :
      FABL.DeterministicQueryProgram (FABL.SignCube input.accuracy.n)
        FABL.Sign (FABL.SparseFourierHypothesis input.accuracy.n)
    def FABL.deterministicGoldreichLevinLearner
      (input :
        FABL.DeterministicGoldreichLevinInput) :
      FABL.DeterministicQueryProgram
        (FABL.SignCube input.accuracy.n)
        FABL.Sign
        (FABL.SparseFourierHypothesis
          input.accuracy.n)
    The complete deterministic learner is the existing prefix controller
    followed by one shared Proposition 6.40 coefficient batch. 
  • defdefined in FABL/Chapter06/LearningAndTesting/DeterministicGoldreichLevin.lean
    complete
    def FABL.deterministicGoldreichLevinLearningProgram
      (input : FABL.DeterministicGoldreichLevinInput) :
      FABL.LearningProgram input.accuracy.n FABL.LearningAccess.queries
        (FABL.SparseFourierHypothesis input.accuracy.n)
    def FABL.deterministicGoldreichLevinLearningProgram
      (input :
        FABL.DeterministicGoldreichLevinInput) :
      FABL.LearningProgram input.accuracy.n
        FABL.LearningAccess.queries
        (FABL.SparseFourierHypothesis
          input.accuracy.n)
    Chapter 3 membership-query presentation of the deterministic learner. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/DeterministicGoldreichLevin.lean
    complete
    theorem FABL.deterministicGoldreichLevinLearner_relativeHammingDist_le
      (input : FABL.DeterministicGoldreichLevinInput)
      (target : FABL.BooleanFunction input.accuracy.n)
      (hnorm : FABL.fourierOneNorm target.toReal  input.fourierBound) :
      FABL.relativeHammingDist target
          (FABL.DeterministicQueryProgram.runWithCost target
                (FABL.deterministicGoldreichLevinLearner
                  input)).1.evaluate 
        input.learningParameter
    theorem FABL.deterministicGoldreichLevinLearner_relativeHammingDist_le
      (input :
        FABL.DeterministicGoldreichLevinInput)
      (target :
        FABL.BooleanFunction input.accuracy.n)
      (hnorm :
        FABL.fourierOneNorm target.toReal 
          input.fourierBound) :
      FABL.relativeHammingDist target
          (FABL.DeterministicQueryProgram.runWithCost
                target
                (FABL.deterministicGoldreichLevinLearner
                  input)).1.evaluate 
        input.learningParameter
    O'Donnell, Theorem 6.42: every target satisfying the advertised Fourier
    `1`-norm promise is learned deterministically to the requested error. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/DeterministicGoldreichLevin.lean
    complete
    theorem FABL.deterministicGoldreichLevinLearningProgram_spec
      (input : FABL.DeterministicGoldreichLevinInput)
      (target : FABL.BooleanFunction input.accuracy.n)
      (hnorm : FABL.fourierOneNorm target.toReal  input.fourierBound)
      (outcome :
        FABL.SparseFourierHypothesis input.accuracy.n × FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost target
              (FABL.deterministicGoldreichLevinLearningProgram
                input)).support) :
      FABL.relativeHammingDist target outcome.1.evaluate 
          input.learningParameter 
        outcome.2.randomExamples = 0 
          outcome.2.queries  input.polynomialRuntimeBound 
            outcome.2.work  input.polynomialRuntimeBound
    theorem FABL.deterministicGoldreichLevinLearningProgram_spec
      (input :
        FABL.DeterministicGoldreichLevinInput)
      (target :
        FABL.BooleanFunction input.accuracy.n)
      (hnorm :
        FABL.fourierOneNorm target.toReal 
          input.fourierBound)
      (outcome :
        FABL.SparseFourierHypothesis
            input.accuracy.n ×
          FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost
              target
              (FABL.deterministicGoldreichLevinLearningProgram
                input)).support) :
      FABL.relativeHammingDist target
            outcome.1.evaluate 
          input.learningParameter 
        outcome.2.randomExamples = 0 
          outcome.2.queries 
              input.polynomialRuntimeBound 
            outcome.2.work 
              input.polynomialRuntimeBound
    Book-facing Theorem 6.42 conclusion in the Chapter 3 query model: every
    execution is accurate, deterministic, query-polynomial, and work-polynomial. 
  • defdefined in FABL/Chapter06/LearningAndTesting/DeterministicGoldreichLevin.lean
    complete
    def FABL.deterministicGoldreichLevinQueryBudget
      (input : FABL.DeterministicGoldreichLevinInput) : 
    def FABL.deterministicGoldreichLevinQueryBudget
      (input :
        FABL.DeterministicGoldreichLevinInput) :
      
    Total membership-query budget of Theorem 6.42. 
  • defdefined in FABL/Chapter06/LearningAndTesting/DeterministicGoldreichLevin.lean
    complete
    def FABL.deterministicGoldreichLevinWorkBudget
      (input : FABL.DeterministicGoldreichLevinInput) : 
    def FABL.deterministicGoldreichLevinWorkBudget
      (input :
        FABL.DeterministicGoldreichLevinInput) :
      
    Total charged-work budget of Theorem 6.42. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/DeterministicGoldreichLevin.lean
    complete
    theorem FABL.deterministicGoldreichLevinLearner_resource_bounds
      (input : FABL.DeterministicGoldreichLevinInput)
      (target : FABL.BooleanFunction input.accuracy.n) :
      (FABL.DeterministicQueryProgram.runWithCost target
                (FABL.deterministicGoldreichLevinLearner
                  input)).2.randomExamples =
          0 
        (FABL.DeterministicQueryProgram.runWithCost target
                  (FABL.deterministicGoldreichLevinLearner
                    input)).2.queries 
            FABL.deterministicGoldreichLevinQueryBudget input 
          (FABL.DeterministicQueryProgram.runWithCost target
                  (FABL.deterministicGoldreichLevinLearner input)).2.work 
            FABL.deterministicGoldreichLevinWorkBudget input
    theorem FABL.deterministicGoldreichLevinLearner_resource_bounds
      (input :
        FABL.DeterministicGoldreichLevinInput)
      (target :
        FABL.BooleanFunction
          input.accuracy.n) :
      (FABL.DeterministicQueryProgram.runWithCost
                target
                (FABL.deterministicGoldreichLevinLearner
                  input)).2.randomExamples =
          0 
        (FABL.DeterministicQueryProgram.runWithCost
                  target
                  (FABL.deterministicGoldreichLevinLearner
                    input)).2.queries 
            FABL.deterministicGoldreichLevinQueryBudget
              input 
          (FABL.DeterministicQueryProgram.runWithCost
                  target
                  (FABL.deterministicGoldreichLevinLearner
                    input)).2.work 
            FABL.deterministicGoldreichLevinWorkBudget
              input
    Every target, including targets outside the promised class, follows a
    path below the explicit Theorem 6.42 resource budgets. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/DeterministicGoldreichLevin.lean
    complete
    theorem FABL.deterministicGoldreichLevinLearningProgram_resource_bounds
      (input : FABL.DeterministicGoldreichLevinInput)
      (target : FABL.BooleanFunction input.accuracy.n)
      (outcome :
        FABL.SparseFourierHypothesis input.accuracy.n × FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost target
              (FABL.deterministicGoldreichLevinLearningProgram
                input)).support) :
      outcome.2.randomExamples = 0 
        outcome.2.queries 
            FABL.deterministicGoldreichLevinQueryBudget input 
          outcome.2.work  FABL.deterministicGoldreichLevinWorkBudget input
    theorem FABL.deterministicGoldreichLevinLearningProgram_resource_bounds
      (input :
        FABL.DeterministicGoldreichLevinInput)
      (target :
        FABL.BooleanFunction input.accuracy.n)
      (outcome :
        FABL.SparseFourierHypothesis
            input.accuracy.n ×
          FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost
              target
              (FABL.deterministicGoldreichLevinLearningProgram
                input)).support) :
      outcome.2.randomExamples = 0 
        outcome.2.queries 
            FABL.deterministicGoldreichLevinQueryBudget
              input 
          outcome.2.work 
            FABL.deterministicGoldreichLevinWorkBudget
              input
    The Chapter 3 query-model execution has the same deterministic resource
    bounds. 
  • defdefined in FABL/Chapter06/LearningAndTesting/DeterministicGoldreichLevin.lean
    complete
    def FABL.DeterministicGoldreichLevinInput.runtimeScale
      (input : FABL.DeterministicGoldreichLevinInput) : 
    def FABL.DeterministicGoldreichLevinInput.runtimeScale
      (input :
        FABL.DeterministicGoldreichLevinInput) :
      
    Book-facing runtime scale.  Its three varying factors are exactly
    `n + 1`, `s + 1`, and `1 / ε`. 
  • defdefined in FABL/Chapter06/LearningAndTesting/DeterministicGoldreichLevin.lean
    complete
    def FABL.DeterministicGoldreichLevinInput.polynomialRuntimeBound
      (input : FABL.DeterministicGoldreichLevinInput) : 
    def FABL.DeterministicGoldreichLevinInput.polynomialRuntimeBound
      (input :
        FABL.DeterministicGoldreichLevinInput) :
      
    One common explicit polynomial envelope for both resource components. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/DeterministicGoldreichLevin.lean
    complete
    theorem FABL.deterministicGoldreichLevinLearner_queries_polynomial_le
      (input : FABL.DeterministicGoldreichLevinInput)
      (target : FABL.BooleanFunction input.accuracy.n) :
      (FABL.DeterministicQueryProgram.runWithCost target
                (FABL.deterministicGoldreichLevinLearner input)).2.queries 
        input.polynomialRuntimeBound
    theorem FABL.deterministicGoldreichLevinLearner_queries_polynomial_le
      (input :
        FABL.DeterministicGoldreichLevinInput)
      (target :
        FABL.BooleanFunction
          input.accuracy.n) :
      (FABL.DeterministicQueryProgram.runWithCost
                target
                (FABL.deterministicGoldreichLevinLearner
                  input)).2.queries 
        input.polynomialRuntimeBound
    Actual deterministic query execution obeys the book-parameter query
    polynomial. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/DeterministicGoldreichLevin.lean
    complete
    theorem FABL.deterministicGoldreichLevinLearner_work_polynomial_le
      (input : FABL.DeterministicGoldreichLevinInput)
      (target : FABL.BooleanFunction input.accuracy.n) :
      (FABL.DeterministicQueryProgram.runWithCost target
                (FABL.deterministicGoldreichLevinLearner input)).2.work 
        input.polynomialRuntimeBound
    theorem FABL.deterministicGoldreichLevinLearner_work_polynomial_le
      (input :
        FABL.DeterministicGoldreichLevinInput)
      (target :
        FABL.BooleanFunction
          input.accuracy.n) :
      (FABL.DeterministicQueryProgram.runWithCost
                target
                (FABL.deterministicGoldreichLevinLearner
                  input)).2.work 
        input.polynomialRuntimeBound
    Actual deterministic query execution obeys the book-parameter work
    polynomial. 
  • abbrevdefined in FABL/Chapter06/LearningAndTesting/DeterministicGoldreichLevin.lean
    complete
    abbrev FABL.DeterministicGoldreichLevinTask : Type
    abbrev FABL.DeterministicGoldreichLevinTask :
      Type
    A complete finite Theorem 6.42 task, including the varying input and
    its dimension-compatible target oracle. 
  • defdefined in FABL/Chapter06/LearningAndTesting/DeterministicGoldreichLevin.lean
    complete
    def FABL.deterministicGoldreichLevinTaskScale
      (task : FABL.DeterministicGoldreichLevinTask) : 
    def FABL.deterministicGoldreichLevinTaskScale
      (task :
        FABL.DeterministicGoldreichLevinTask) :
      
    Genuine asymptotic scale of a complete task. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/DeterministicGoldreichLevin.lean
    complete
    theorem FABL.deterministicGoldreichLevinLearner_queries_isBigO :
      (fun task =>
          (FABL.DeterministicQueryProgram.runWithCost task.snd
                  (FABL.deterministicGoldreichLevinLearner
                    task.fst)).2.queries) =O[Filter.comap
          FABL.deterministicGoldreichLevinTaskScale Filter.atTop]
        fun task => FABL.deterministicGoldreichLevinTaskScale task ^ 100
    theorem FABL.deterministicGoldreichLevinLearner_queries_isBigO :
      (fun task =>
          (FABL.DeterministicQueryProgram.runWithCost
                  task.snd
                  (FABL.deterministicGoldreichLevinLearner
                    task.fst)).2.queries) =O[Filter.comap
          FABL.deterministicGoldreichLevinTaskScale
          Filter.atTop]
        fun task =>
        FABL.deterministicGoldreichLevinTaskScale
            task ^
          100
    Actual membership-query complexity is polynomial in `n`, `s`, and
    `1 / ε`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/DeterministicGoldreichLevin.lean
    complete
    theorem FABL.deterministicGoldreichLevinLearner_work_isBigO :
      (fun task =>
          (FABL.DeterministicQueryProgram.runWithCost task.snd
                  (FABL.deterministicGoldreichLevinLearner
                    task.fst)).2.work) =O[Filter.comap
          FABL.deterministicGoldreichLevinTaskScale Filter.atTop]
        fun task => FABL.deterministicGoldreichLevinTaskScale task ^ 100
    theorem FABL.deterministicGoldreichLevinLearner_work_isBigO :
      (fun task =>
          (FABL.DeterministicQueryProgram.runWithCost
                  task.snd
                  (FABL.deterministicGoldreichLevinLearner
                    task.fst)).2.work) =O[Filter.comap
          FABL.deterministicGoldreichLevinTaskScale
          Filter.atTop]
        fun task =>
        FABL.deterministicGoldreichLevinTaskScale
            task ^
          100
    Actual charged local work is polynomial in `n`, `s`, and `1 / ε`. 
Theorem6.4.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
Lemma 3.5.5
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Theorem 6.43. Let \mathcal C =\left\{ f:\{-1,1\}^n\to\{-1,1\}: \operatorname{sparsity}(\widehat f)\le2^{O(k)} \right\}. The class \mathcal C is deterministically learnable exactly, with error 0, from queries in time \operatorname{poly}(n,2^k).

Lean code for Theorem6.4.158 declarations
  • defdefined in FABL/Chapter06/LearningAndTesting/ExactSparseSpectrumLearning.lean
    complete
    def FABL.exactSparseSpectrumConceptClass (n k : ) :
      Set (FABL.BooleanFunction n)
    def FABL.exactSparseSpectrumConceptClass
      (n k : ) : Set (FABL.BooleanFunction n)
    The concept class represented by the explicit `2^(k+1)` member of `2^{O(k)}`. 
  • defdefined in FABL/Chapter06/LearningAndTesting/ExactSparseSpectrumLearning.lean
    complete
    def FABL.exactSparseSpectrumLearningProgram (n k : ) :
      FABL.LearningProgram n FABL.LearningAccess.queries
        (FABL.SparseFourierHypothesis n)
    def FABL.exactSparseSpectrumLearningProgram
      (n k : ) :
      FABL.LearningProgram n
        FABL.LearningAccess.queries
        (FABL.SparseFourierHypothesis n)
    Chapter 3 membership-query presentation of the exact deterministic program. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/ExactSparseSpectrumLearning.lean
    complete
    theorem FABL.runWithCost_exactSparseSpectrumLearningProgram {n : }
      (target : FABL.BooleanFunction n) (k : ) :
      FABL.LearningProgram.runWithCost target
          (FABL.exactSparseSpectrumLearningProgram n k) =
        PMF.pure
          (FABL.DeterministicQueryProgram.runWithCost target
            (FABL.exactSparseSpectrumLearner n k))
    theorem FABL.runWithCost_exactSparseSpectrumLearningProgram
      {n : }
      (target : FABL.BooleanFunction n)
      (k : ) :
      FABL.LearningProgram.runWithCost target
          (FABL.exactSparseSpectrumLearningProgram
            n k) =
        PMF.pure
          (FABL.DeterministicQueryProgram.runWithCost
            target
            (FABL.exactSparseSpectrumLearner n
              k))
    The query-model adapter preserves the unique deterministic output and its exact cost. 
  • defdefined in FABL/Chapter06/LearningAndTesting/ExactSparseSpectrumLearning.lean
    complete
    def FABL.exactSparseSpectrumLearningAlgorithm (n k : ) :
      FABL.LearningAlgorithm n FABL.LearningAccess.queries
        FABL.SparseFourierHypothesis.finiteRepresentation
    def FABL.exactSparseSpectrumLearningAlgorithm
      (n k : ) :
      FABL.LearningAlgorithm n
        FABL.LearningAccess.queries
        FABL.SparseFourierHypothesis.finiteRepresentation
    Exercise 3.37(c) and Theorem 6.43 as an honest deterministic Definition 3.27 query learner. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/ExactSparseSpectrumLearning.lean
    complete
    theorem FABL.exactSparseSpectrumLearningAlgorithm_successProbability_eq_one
      {n : } (target : FABL.BooleanFunction n) (k : )
      (htarget : target  FABL.exactSparseSpectrumConceptClass n k)
      (accuracy : FABL.LearningAccuracy) :
      (FABL.exactSparseSpectrumLearningAlgorithm n k).successProbability
          target accuracy =
        1
    theorem FABL.exactSparseSpectrumLearningAlgorithm_successProbability_eq_one
      {n : }
      (target : FABL.BooleanFunction n)
      (k : )
      (htarget :
        target 
          FABL.exactSparseSpectrumConceptClass
            n k)
      (accuracy : FABL.LearningAccuracy) :
      (FABL.exactSparseSpectrumLearningAlgorithm
              n k).successProbability
          target accuracy =
        1
    On every promised target the exact learner's success probability is one, at every requested
    accuracy including zero. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/ExactSparseSpectrumLearning.lean
    complete
    theorem FABL.exactSparseSpectrumLearningAlgorithm_learns (n k : )
      (accuracy : FABL.LearningAccuracy) :
      FABL.LearnsConceptClassWithError
        (FABL.exactSparseSpectrumLearningAlgorithm n k)
        (FABL.exactSparseSpectrumConceptClass n k) accuracy
    theorem FABL.exactSparseSpectrumLearningAlgorithm_learns
      (n k : )
      (accuracy : FABL.LearningAccuracy) :
      FABL.LearnsConceptClassWithError
        (FABL.exactSparseSpectrumLearningAlgorithm
          n k)
        (FABL.exactSparseSpectrumConceptClass
          n k)
        accuracy
    The concrete deterministic algorithm learns the sparse-spectrum class exactly. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/ExactSparseSpectrumLearning.lean
    complete
    theorem FABL.exactSparseSpectrumLearningProgram_zero_error {n : }
      (target : FABL.BooleanFunction n) (k : )
      (htarget : target  FABL.exactSparseSpectrumConceptClass n k)
      (outcome : FABL.SparseFourierHypothesis n × FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost target
              (FABL.exactSparseSpectrumLearningProgram n k)).support) :
      outcome.1.evaluate = target 
        FABL.relativeHammingDist target outcome.1.evaluate = 0
    theorem FABL.exactSparseSpectrumLearningProgram_zero_error
      {n : }
      (target : FABL.BooleanFunction n)
      (k : )
      (htarget :
        target 
          FABL.exactSparseSpectrumConceptClass
            n k)
      (outcome :
        FABL.SparseFourierHypothesis n ×
          FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost
              target
              (FABL.exactSparseSpectrumLearningProgram
                n k)).support) :
      outcome.1.evaluate = target 
        FABL.relativeHammingDist target
            outcome.1.evaluate =
          0
    Book-facing zero-error statement: the unique output hypothesis equals the target, not merely
    an approximation to it. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/ExactSparseSpectrumLearning.lean
    complete
    theorem FABL.exactSparseSpectrumLearningProgram_spec {n : }
      (target : FABL.BooleanFunction n) (k : )
      (htarget : target  FABL.exactSparseSpectrumConceptClass n k)
      (outcome : FABL.SparseFourierHypothesis n × FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost target
              (FABL.exactSparseSpectrumLearningProgram n k)).support) :
      outcome.1.evaluate = target 
        FABL.relativeHammingDist target outcome.1.evaluate = 0 
          outcome.2.randomExamples = 0 
            outcome.2.queries 
                FABL.exactSparseSpectrumPolynomialRuntimeBound n k 
              outcome.2.work 
                FABL.exactSparseSpectrumPolynomialRuntimeBound n k
    theorem FABL.exactSparseSpectrumLearningProgram_spec
      {n : }
      (target : FABL.BooleanFunction n)
      (k : )
      (htarget :
        target 
          FABL.exactSparseSpectrumConceptClass
            n k)
      (outcome :
        FABL.SparseFourierHypothesis n ×
          FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost
              target
              (FABL.exactSparseSpectrumLearningProgram
                n k)).support) :
      outcome.1.evaluate = target 
        FABL.relativeHammingDist target
              outcome.1.evaluate =
            0 
          outcome.2.randomExamples = 0 
            outcome.2.queries 
                FABL.exactSparseSpectrumPolynomialRuntimeBound
                  n k 
              outcome.2.work 
                FABL.exactSparseSpectrumPolynomialRuntimeBound
                  n k
    O'Donnell, Exercise 3.37(c) and Theorem 6.43: every execution has zero error, consumes no
    random examples, and has query and charged-work costs polynomial in `n` and `2^k`. 
Definition6.4.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 3
Statement dependency previews
Preview
Definition 1.6.3
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 2
Reverse dependency previews
Preview
Theorem 6.4.17
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Derandomized BLR Test. Given query access to f:\mathbb F_2^n\to\mathbb F_2 and an \epsilon-biased density \varphi:

  1. Choose independent x\sim\mathbb F_2^n and y\sim\varphi.

  2. Query f at x, y, and x+y.

  3. Accept if f(x)+f(y)=f(x+y).

The test makes exactly three membership queries. Using the density from Theorem 6.30, it requires n+O(\log(n/\epsilon)) independent random bits. Every \mathbb F_2-linear f is accepted with probability 1.

Lean code for Definition6.4.1619 declarations
  • defdefined in FABL/Chapter06/LearningAndTesting/DerandomizedBLRProgram.lean
    complete
    def FABL.boolF₂Equiv : Bool  FABL.𝔽₂
    def FABL.boolF₂Equiv : Bool  FABL.𝔽₂
    The canonical identification of a random Boolean bit with a bit in `𝔽₂`. 
  • defdefined in FABL/Chapter06/LearningAndTesting/DerandomizedBLRProgram.lean
    complete
    def FABL.boolVectorF₂CubeEquiv (n : ) : (Fin n  Bool)  FABL.F₂Cube n
    def FABL.boolVectorF₂CubeEquiv (n : ) :
      (Fin n  Bool)  FABL.F₂Cube n
    Coordinatewise identification of `n` random Boolean bits with the additive Boolean cube. 
  • defdefined in FABL/Chapter06/LearningAndTesting/DerandomizedBLRProgram.lean
    complete
    def FABL.randomBitVectorProgram (dimension bits : ) :
      FABL.LearningProgram dimension FABL.LearningAccess.queries
        (Fin bits  Bool)
    def FABL.randomBitVectorProgram
      (dimension bits : ) :
      FABL.LearningProgram dimension
        FABL.LearningAccess.queries
        (Fin bits  Bool)
    A finite program that draws exactly `bits` independent unbiased random bits. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/DerandomizedBLRProgram.lean
    complete
    theorem FABL.runWithCost_randomBitVectorProgram {n : }
      (target : FABL.BooleanFunction n) (bits : ) :
      FABL.LearningProgram.runWithCost target
          (FABL.randomBitVectorProgram n bits) =
        PMF.map
          (fun vector =>
            (vector, { randomExamples := 0, queries := 0, work := bits }))
          (FABL.uniformPMF (Fin bits  Bool))
    theorem FABL.runWithCost_randomBitVectorProgram
      {n : }
      (target : FABL.BooleanFunction n)
      (bits : ) :
      FABL.LearningProgram.runWithCost target
          (FABL.randomBitVectorProgram n
            bits) =
        PMF.map
          (fun vector =>
            (vector,
              { randomExamples := 0,
                queries := 0, work := bits }))
          (FABL.uniformPMF (Fin bits  Bool))
    The bit-vector program has the uniform output law, with its exact constructor-derived cost. 
  • defdefined in FABL/Chapter06/LearningAndTesting/DerandomizedBLRProgram.lean
    complete
    def FABL.derandomizedBLRDecision {n : } (target : FABL.BooleanFunction n)
      (x y : FABL.F₂Cube n) : Bool
    def FABL.derandomizedBLRDecision {n : }
      (target : FABL.BooleanFunction n)
      (x y : FABL.F₂Cube n) : Bool
    The Boolean decision returned after the three BLR membership-query answers are collected. 
  • defdefined in FABL/Chapter06/LearningAndTesting/DerandomizedBLRProgram.lean
    complete
    def FABL.derandomizedBLRQueryProgram {n : } (x y : FABL.F₂Cube n) :
      FABL.LearningProgram n FABL.LearningAccess.queries Bool
    def FABL.derandomizedBLRQueryProgram {n : }
      (x y : FABL.F₂Cube n) :
      FABL.LearningProgram n
        FABL.LearningAccess.queries Bool
    The three-query core of the Derandomized BLR Test at fixed points `x` and `y`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/DerandomizedBLRProgram.lean
    complete
    theorem FABL.runWithCost_derandomizedBLRQueryProgram {n : }
      (target : FABL.BooleanFunction n) (x y : FABL.F₂Cube n) :
      FABL.LearningProgram.runWithCost target
          (FABL.derandomizedBLRQueryProgram x y) =
        PMF.pure
          (FABL.derandomizedBLRDecision target x y,
            { randomExamples := 0, queries := 3, work := 3 })
    theorem FABL.runWithCost_derandomizedBLRQueryProgram
      {n : }
      (target : FABL.BooleanFunction n)
      (x y : FABL.F₂Cube n) :
      FABL.LearningProgram.runWithCost target
          (FABL.derandomizedBLRQueryProgram x
            y) =
        PMF.pure
          (FABL.derandomizedBLRDecision target
              x y,
            { randomExamples := 0,
              queries := 3, work := 3 })
    The fixed-point BLR core makes exactly three membership queries. 
  • defdefined in FABL/Chapter06/LearningAndTesting/DerandomizedBLRProgram.lean
    complete
    def FABL.derandomizedBLRLocalWork (n : ) : 
    def FABL.derandomizedBLRLocalWork (n : ) : 
    Explicit local-work charge for materializing `x`, forming `x + y`, and evaluating the BLR
    predicate.  This is a mathematical charge in the oracle model, not Lean evaluator runtime. 
  • defdefined in FABL/Chapter06/LearningAndTesting/DerandomizedBLRProgram.lean
    complete
    def FABL.derandomizedBLRCost (n r : ) : FABL.LearningCost
    def FABL.derandomizedBLRCost (n r : ) :
      FABL.LearningCost
    The exact cost of the Derandomized BLR oracle program.  Its work field is the `n + r` random
    bits, `2n + 1` charged local steps, and the three membership-query nodes. 
  • defdefined in FABL/Chapter06/LearningAndTesting/DerandomizedBLRProgram.lean
    complete
    def FABL.derandomizedBLRRandomBits (n r : ) : 
    def FABL.derandomizedBLRRandomBits (n r : ) :
      
    The number of unbiased random bits exposed by the Derandomized BLR program. 
  • defdefined in FABL/Chapter06/LearningAndTesting/DerandomizedBLRProgram.lean
    complete
    def FABL.derandomizedBLRAfterInputProgram {n r : }
      (seed : (Fin r  Bool)  FABL.F₂Cube n) (inputBits : Fin n  Bool) :
      FABL.LearningProgram n FABL.LearningAccess.queries Bool
    def FABL.derandomizedBLRAfterInputProgram
      {n r : }
      (seed : (Fin r  Bool)  FABL.F₂Cube n)
      (inputBits : Fin n  Bool) :
      FABL.LearningProgram n
        FABL.LearningAccess.queries Bool
    Draw the generator seed after `x` is fixed, charge local work, and execute the three queries. 
  • defdefined in FABL/Chapter06/LearningAndTesting/DerandomizedBLRProgram.lean
    complete
    def FABL.derandomizedBLRProgram {n r : }
      (seed : (Fin r  Bool)  FABL.F₂Cube n) :
      FABL.LearningProgram n FABL.LearningAccess.queries Bool
    def FABL.derandomizedBLRProgram {n r : }
      (seed :
        (Fin r  Bool)  FABL.F₂Cube n) :
      FABL.LearningProgram n
        FABL.LearningAccess.queries Bool
    The visible finite oracle program for the Derandomized BLR Test. 
  • defdefined in FABL/Chapter06/LearningAndTesting/DerandomizedBLRProgram.lean
    complete
    def FABL.derandomizedBLRProgramResult {n r : }
      (target : FABL.BooleanFunction n)
      (seed : (Fin r  Bool)  FABL.F₂Cube n)
      (bits : (Fin n  Bool) × (Fin r  Bool)) : Bool
    def FABL.derandomizedBLRProgramResult
      {n r : }
      (target : FABL.BooleanFunction n)
      (seed : (Fin r  Bool)  FABL.F₂Cube n)
      (bits :
        (Fin n  Bool) × (Fin r  Bool)) :
      Bool
    The deterministic result selected by a pair of input and generator bit vectors. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/DerandomizedBLRProgram.lean
    complete
    theorem FABL.runWithCost_derandomizedBLRProgram {n r : }
      (target : FABL.BooleanFunction n)
      (seed : (Fin r  Bool)  FABL.F₂Cube n) :
      FABL.LearningProgram.runWithCost target
          (FABL.derandomizedBLRProgram seed) =
        PMF.map
          (fun bits =>
            (FABL.derandomizedBLRProgramResult target seed bits,
              FABL.derandomizedBLRCost n r))
          (FABL.uniformPMF ((Fin n  Bool) × (Fin r  Bool)))
    theorem FABL.runWithCost_derandomizedBLRProgram
      {n r : }
      (target : FABL.BooleanFunction n)
      (seed :
        (Fin r  Bool)  FABL.F₂Cube n) :
      FABL.LearningProgram.runWithCost target
          (FABL.derandomizedBLRProgram seed) =
        PMF.map
          (fun bits =>
            (FABL.derandomizedBLRProgramResult
                target seed bits,
              FABL.derandomizedBLRCost n r))
          (FABL.uniformPMF
            ((Fin n  Bool) × (Fin r  Bool)))
    Exact output distribution and pathwise cost of the Derandomized BLR program. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/DerandomizedBLRProgram.lean
    complete
    theorem FABL.derandomizedBLRProgram_cost_eq_of_mem_support {n r : }
      (target : FABL.BooleanFunction n)
      (seed : (Fin r  Bool)  FABL.F₂Cube n)
      (outcome : Bool × FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost target
              (FABL.derandomizedBLRProgram seed)).support) :
      outcome.2 = FABL.derandomizedBLRCost n r
    theorem FABL.derandomizedBLRProgram_cost_eq_of_mem_support
      {n r : }
      (target : FABL.BooleanFunction n)
      (seed : (Fin r  Bool)  FABL.F₂Cube n)
      (outcome : Bool × FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost
              target
              (FABL.derandomizedBLRProgram
                seed)).support) :
      outcome.2 = FABL.derandomizedBLRCost n r
    Every execution path makes exactly three membership queries and has the displayed exact cost. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/DerandomizedBLRProgram.lean
    complete
    theorem FABL.derandomizedBLRProgram_resources_of_mem_support {n r : }
      (target : FABL.BooleanFunction n)
      (seed : (Fin r  Bool)  FABL.F₂Cube n)
      (outcome : Bool × FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost target
              (FABL.derandomizedBLRProgram seed)).support) :
      outcome.2.randomExamples = 0 
        outcome.2.queries = 3  outcome.2.work = n + r + (2 * n + 1) + 3
    theorem FABL.derandomizedBLRProgram_resources_of_mem_support
      {n r : }
      (target : FABL.BooleanFunction n)
      (seed : (Fin r  Bool)  FABL.F₂Cube n)
      (outcome : Bool × FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost
              target
              (FABL.derandomizedBLRProgram
                seed)).support) :
      outcome.2.randomExamples = 0 
        outcome.2.queries = 3 
          outcome.2.work =
            n + r + (2 * n + 1) + 3
    Component form of the exact resource law, including the three-query guarantee and the
    `n + r + (2n + 1) + 3` work formula. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/DerandomizedBLRProgram.lean
    complete
    theorem FABL.runWithCost_derandomizedBLRProgram_eq_pure_of_isF₂Linear {n r : }
      (target : FABL.BooleanFunction n)
      (seed : (Fin r  Bool)  FABL.F₂Cube n)
      (htarget : FABL.IsF₂Linear (FABL.booleanFunctionF₂Encoding target)) :
      FABL.LearningProgram.runWithCost target
          (FABL.derandomizedBLRProgram seed) =
        PMF.pure (true, FABL.derandomizedBLRCost n r)
    theorem FABL.runWithCost_derandomizedBLRProgram_eq_pure_of_isF₂Linear
      {n r : }
      (target : FABL.BooleanFunction n)
      (seed : (Fin r  Bool)  FABL.F₂Cube n)
      (htarget :
        FABL.IsF₂Linear
          (FABL.booleanFunctionF₂Encoding
            target)) :
      FABL.LearningProgram.runWithCost target
          (FABL.derandomizedBLRProgram seed) =
        PMF.pure
          (true, FABL.derandomizedBLRCost n r)
    A linear target is accepted on every execution path. 
  • defdefined in FABL/Chapter06/LearningAndTesting/DerandomizedBLRProgram.lean
    complete
    def FABL.derandomizedBLRProgramAcceptanceProbability {n r : }
      (target : FABL.BooleanFunction n)
      (seed : (Fin r  Bool)  FABL.F₂Cube n) : 
    def FABL.derandomizedBLRProgramAcceptanceProbability
      {n r : }
      (target : FABL.BooleanFunction n)
      (seed :
        (Fin r  Bool)  FABL.F₂Cube n) :
      
    Acceptance probability computed directly from the program's uniform random-bit source. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/DerandomizedBLRProgram.lean
    complete
    theorem FABL.derandomizedBLRProgramAcceptanceProbability_eq {n r : }
      (target : FABL.BooleanFunction n)
      (seed : (Fin r  Bool)  FABL.F₂Cube n) :
      FABL.derandomizedBLRProgramAcceptanceProbability target seed =
        FABL.derandomizedBLRAcceptanceProbability
          (FABL.ProbabilityDensity.uniformPushforward seed)
          (FABL.booleanFunctionF₂Encoding target)
    theorem FABL.derandomizedBLRProgramAcceptanceProbability_eq
      {n r : }
      (target : FABL.BooleanFunction n)
      (seed :
        (Fin r  Bool)  FABL.F₂Cube n) :
      FABL.derandomizedBLRProgramAcceptanceProbability
          target seed =
        FABL.derandomizedBLRAcceptanceProbability
          (FABL.ProbabilityDensity.uniformPushforward
            seed)
          (FABL.booleanFunctionF₂Encoding
            target)
    The program's acceptance probability is the existing semantic Derandomized BLR probability
    for the density obtained by pushing uniform seed bits through the generator. 
Theorem6.4.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 6
Statement dependency previews
Preview
Theorem 1.4.2
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 2
Reverse dependency previews
Preview
Lemma 6.6.24
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Theorem 6.44. Let \epsilon\ge0. Suppose the Derandomized BLR Test with an \epsilon-biased density accepts f:\mathbb F_2^n\to\mathbb F_2 with probability \frac12+\frac12\theta. Then there is an affine g:\mathbb F_2^n\to\mathbb F_2 whose sign encoding has correlation at least \sqrt{\theta^2-\epsilon} with the sign encoding of f. Equivalently, \operatorname{dist}(f,g) \le\frac12-\frac12\sqrt{\theta^2-\epsilon}. In the formal real-valued statement, the square root is Real.sqrt; therefore it is 0 when \theta^2<\epsilon, making the bound vacuous without adding a hypothesis absent from the book.

Lean code for Theorem6.4.171 theorem
  • theoremdefined in FABL/Chapter06/LearningAndTesting/DerandomizedBLR.lean
    complete
    theorem FABL.exists_affine_correlation_ge_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 - ε) 
            Finset.univ.expect fun x =>
              FABL.realSignEncodedFunction f x *
                FABL.realSignEncodedFunction (FABL.affineFunction b γ) x) 
          FABL.relativeHammingDist f (FABL.affineFunction b γ) 
            1 / 2 - (θ ^ 2 - ε) / 2
    theorem FABL.exists_affine_correlation_ge_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 - ε) 
            Finset.univ.expect fun x =>
              FABL.realSignEncodedFunction f
                  x *
                FABL.realSignEncodedFunction
                  (FABL.affineFunction b γ)
                  x) 
          FABL.relativeHammingDist f
              (FABL.affineFunction b γ) 
            1 / 2 - (θ ^ 2 - ε) / 2
    Theorem 6.44, with both its correlation and relative-distance conclusions. 
Lemma6.4.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.
uses 0used by 0XL∃∀N

Remark 6.45. Theorem 6.44 is useful both when \theta is close to 0 and when it is close to 1. In particular, if \theta=1-2\delta, then acceptance probability 1-\delta implies that f is nearly \delta-close to an affine function whenever \epsilon\ll\delta.

Lemma6.4.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 3
Statement dependency previews
Preview
Definition 3.4.1
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 3
Reverse dependency previews
Preview
Theorem 6.4.3
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Exercise 6.30 (exactly learning low-degree \mathbb F_2-polynomials). Fix \ell\ge1.

(a) Let p:\mathbb F_2^n\to\mathbb F_2 satisfy \deg_{\mathbb F_2}(p)\le\ell, and draw x^{(1)},\ldots,x^{(m)} independently and uniformly from \mathbb F_2^n. If m\ge C\,2^\ell\bigl(n^\ell+\log(1/\delta)\bigr), \qquad 0<\delta\le1/2, for a sufficiently large universal constant C, then, except with probability at most \delta, the only q:\mathbb F_2^n\to\mathbb F_2 of degree at most \ell satisfying q(x^{(i)})=p(x^{(i)}) for every i\in[m] is q=p.

(b) The class of degree-at-most-\ell polynomials \mathbb F_2^n\to\mathbb F_2 can be learned exactly from random examples in time O(n)^{3\ell} by solving the resulting \mathbb F_2-linear system. If matrix multiplication takes O(n^\omega) time, the bound improves to O(n)^{\omega\ell}.

(c) The learner can be amplified to success probability at least 1-\delta in time O(n)^{3\ell}\log(1/\delta).

The cubic solver and the amplified random-example program are verified internally. The \omega\ell refinement is represented by the explicit F₂LinearSolverExponentCertificate boundary used by the matrix-exponent refinement below; the standard reduction from matrix multiplication to linear-system solving is not available in the pinned Mathlib or CSLib APIs and therefore remains an external adapter.

Lean code for Lemma6.4.1930 declarations
  • structure(2 fields)defined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    structure FABL.F₂LinearEquation.{u} (ν : Type u) : Type u
    structure FABL.F₂LinearEquation.{u} (ν : Type u) :
      Type u
    One finite linear equation over `𝔽₂`. 
    coefficient : ν  FABL.𝔽₂
    constant : FABL.𝔽₂
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    def FABL.F₂SatisfiesRows.{u} {ν : Type u} [Fintype ν]
      (rows : List (FABL.F₂LinearEquation ν)) (assignment : ν  FABL.𝔽₂) :
      Prop
    def FABL.F₂SatisfiesRows.{u} {ν : Type u}
      [Fintype ν]
      (rows : List (FABL.F₂LinearEquation ν))
      (assignment : ν  FABL.𝔽₂) : Prop
    Simultaneous satisfaction of a finite list of equations. 
  • structure(3 fields)defined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    structure FABL.F₂EliminationResult.{u} (ν : Type u) : Type u
    structure FABL.F₂EliminationResult.{u}
      (ν : Type u) : Type u
    Output of executable forward elimination. 
    pivots : List (ν × FABL.F₂LinearEquation ν)
    residual : List (FABL.F₂LinearEquation ν)
    work : 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    def FABL.eliminateF₂Rows.{u} {ν : Type u} [Fintype ν] (coordinates : List ν)
      (rows : List (FABL.F₂LinearEquation ν)) : FABL.F₂EliminationResult ν
    def FABL.eliminateF₂Rows.{u} {ν : Type u}
      [Fintype ν] (coordinates : List ν)
      (rows :
        List (FABL.F₂LinearEquation ν)) :
      FABL.F₂EliminationResult ν
    Forward elimination and its exact elementary-operation charge. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    theorem FABL.satisfiesRows_eliminateF₂Rows_iff.{u} {ν : Type u} [Fintype ν]
      (coordinates : List ν) (rows : List (FABL.F₂LinearEquation ν))
      (assignment : ν  FABL.𝔽₂) :
      FABL.F₂SatisfiesRows rows assignment 
        (∀ pivot  (FABL.eliminateF₂Rows coordinates rows).pivots,
            pivot.2.IsSatisfied assignment) 
          FABL.F₂SatisfiesRows
            (FABL.eliminateF₂Rows coordinates rows).residual assignment
    theorem FABL.satisfiesRows_eliminateF₂Rows_iff.{u}
      {ν : Type u} [Fintype ν]
      (coordinates : List ν)
      (rows : List (FABL.F₂LinearEquation ν))
      (assignment : ν  FABL.𝔽₂) :
      FABL.F₂SatisfiesRows rows assignment 
        (∀
            pivot 
              (FABL.eliminateF₂Rows
                  coordinates rows).pivots,
            pivot.2.IsSatisfied assignment) 
          FABL.F₂SatisfiesRows
            (FABL.eliminateF₂Rows coordinates
                rows).residual
            assignment
    Forward elimination preserves exactly the original solution set. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    def FABL.solveF₂Rows.{u} {ν : Type u} [Fintype ν] [DecidableEq ν]
      [Encodable ν] (rows : List (FABL.F₂LinearEquation ν)) : ν  FABL.𝔽₂
    def FABL.solveF₂Rows.{u} {ν : Type u}
      [Fintype ν] [DecidableEq ν]
      [Encodable ν]
      (rows :
        List (FABL.F₂LinearEquation ν)) :
      ν  FABL.𝔽₂
    The executable Gaussian solver: forward elimination followed by back substitution. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    theorem FABL.solveF₂Rows_satisfies_of_exists.{u} {ν : Type u} [Fintype ν]
      [DecidableEq ν] [Encodable ν] (rows : List (FABL.F₂LinearEquation ν))
      (hconsistent :  assignment, FABL.F₂SatisfiesRows rows assignment) :
      FABL.F₂SatisfiesRows rows (FABL.solveF₂Rows rows)
    theorem FABL.solveF₂Rows_satisfies_of_exists.{u}
      {ν : Type u} [Fintype ν] [DecidableEq ν]
      [Encodable ν]
      (rows : List (FABL.F₂LinearEquation ν))
      (hconsistent :
         assignment,
          FABL.F₂SatisfiesRows rows
            assignment) :
      FABL.F₂SatisfiesRows rows
        (FABL.solveF₂Rows rows)
    The executable solver returns a genuine solution whenever the input system is consistent. 
  • abbrevdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    abbrev FABL.LowDegreeMonomial (n  : ) : Type
    abbrev FABL.LowDegreeMonomial (n  : ) : Type
    A square-free monomial whose degree is at most `ℓ`. 
  • abbrevdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    abbrev FABL.LowDegreeF₂Coefficients (n  : ) : Type
    abbrev FABL.LowDegreeF₂Coefficients (n  : ) :
      Type
    Coefficients of an ANF supported in degrees at most `ℓ`. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    def FABL.lowDegreeF₂MonomialCount (n  : ) : 
    def FABL.lowDegreeF₂MonomialCount (n  : ) :
      
    The monomial count in the low-degree linear system. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    theorem FABL.lowDegreeF₂MonomialCount_le (n  : ) :
      FABL.lowDegreeF₂MonomialCount n   ( + 1) * (n + 1) ^ 
    theorem FABL.lowDegreeF₂MonomialCount_le
      (n  : ) :
      FABL.lowDegreeF₂MonomialCount n  
        ( + 1) * (n + 1) ^ 
    The Chapter 3 low-degree-family bound also bounds the ANF system dimension. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    def FABL.lowDegreeF₂Eval {n  : }
      (coefficient : FABL.LowDegreeF₂Coefficients n ) (x : FABL.F₂Cube n) :
      FABL.𝔽₂
    def FABL.lowDegreeF₂Eval {n  : }
      (coefficient :
        FABL.LowDegreeF₂Coefficients n )
      (x : FABL.F₂Cube n) : FABL.𝔽₂
    Evaluate a degree-at-most-`ℓ` coefficient vector on the binary cube. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    theorem FABL.lowDegreeF₂Eval_injective {n  : } :
      Function.Injective FABL.lowDegreeF₂Eval
    theorem FABL.lowDegreeF₂Eval_injective {n  : } :
      Function.Injective FABL.lowDegreeF₂Eval
    Low-degree ANF evaluation is injective in its coefficient vector. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    theorem FABL.functionAlgebraicDegree_lowDegreeF₂Eval_le {n  : }
      (coefficient : FABL.LowDegreeF₂Coefficients n ) :
      FABL.functionAlgebraicDegree (FABL.lowDegreeF₂Eval coefficient)  
    theorem FABL.functionAlgebraicDegree_lowDegreeF₂Eval_le
      {n  : }
      (coefficient :
        FABL.LowDegreeF₂Coefficients n ) :
      FABL.functionAlgebraicDegree
          (FABL.lowDegreeF₂Eval coefficient) 
        
    Every function represented by a low-degree coefficient vector has algebraic degree at most
    `ℓ`. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    def FABL.lowDegreeF₂CoefficientsOfFunction {n  : }
      (f : FABL.F₂BooleanFunction n) : FABL.LowDegreeF₂Coefficients n 
    def FABL.lowDegreeF₂CoefficientsOfFunction
      {n  : }
      (f : FABL.F₂BooleanFunction n) :
      FABL.LowDegreeF₂Coefficients n 
    Restriction of the canonical ANF coefficients to degrees at most `ℓ`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    theorem FABL.lowDegreeF₂Eval_coefficientsOfFunction {n  : }
      (f : FABL.F₂BooleanFunction n)
      (hdegree : FABL.functionAlgebraicDegree f  ) :
      FABL.lowDegreeF₂Eval (FABL.lowDegreeF₂CoefficientsOfFunction f) = f
    theorem FABL.lowDegreeF₂Eval_coefficientsOfFunction
      {n  : } (f : FABL.F₂BooleanFunction n)
      (hdegree :
        FABL.functionAlgebraicDegree f  ) :
      FABL.lowDegreeF₂Eval
          (FABL.lowDegreeF₂CoefficientsOfFunction
            f) =
        f
    A function of algebraic degree at most `ℓ` is evaluated by its restricted coefficient
    vector. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    def FABL.SeparatesLowDegreeF₂Coefficients {n  m : }
      (sampleInputs : Fin m  FABL.F₂Cube n) : Prop
    def FABL.SeparatesLowDegreeF₂Coefficients
      {n  m : }
      (sampleInputs : Fin m  FABL.F₂Cube n) :
      Prop
    A sample vector separates all low-degree coefficient vectors when evaluation on the vector is
    injective. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    def FABL.lowDegreeF₂LearningSampleCount (n  : )
      (δ : FABL.PositiveLearningParameter) : 
    def FABL.lowDegreeF₂LearningSampleCount
      (n  : )
      (δ : FABL.PositiveLearningParameter) :
      
    Computable sample scheduler for Exercise 6.30(a).  It allocates one `2^ℓ` block for every
    low-degree coefficient bit and every requested confidence bit. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    theorem FABL.measure_lowDegreeF₂SeparationFailureSet_scheduled_le (n  : )
      (δ : FABL.PositiveLearningParameter) :
      (FABL.uniformPMF
                (Fin (FABL.lowDegreeF₂LearningSampleCount n  δ) 
                  FABL.F₂Cube n)).toMeasure.real
          FABL.lowDegreeF₂SeparationFailureSet 
        δ
    theorem FABL.measure_lowDegreeF₂SeparationFailureSet_scheduled_le
      (n  : )
      (δ : FABL.PositiveLearningParameter) :
      (FABL.uniformPMF
                (Fin
                    (FABL.lowDegreeF₂LearningSampleCount
                      n  δ) 
                  FABL.F₂Cube
                    n)).toMeasure.real
          FABL.lowDegreeF₂SeparationFailureSet 
        δ
    Exercise 6.30(a): the scheduled uniform sample vector fails to identify the low-degree ANF
    with probability at most `δ`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    theorem FABL.lowDegreeF₂LearningSampleCount_le (n  : )
      (δ : FABL.PositiveLearningParameter) :
      FABL.lowDegreeF₂LearningSampleCount n  δ 
        2 ^  * (( + 1) * (n + 1) ^  + FABL.fourierEstimatorFailureBits δ)
    theorem FABL.lowDegreeF₂LearningSampleCount_le
      (n  : )
      (δ : FABL.PositiveLearningParameter) :
      FABL.lowDegreeF₂LearningSampleCount n 
          δ 
        2 ^  *
          (( + 1) * (n + 1) ^  +
            FABL.fourierEstimatorFailureBits
              δ)
    The scheduler has the explicit `2^ℓ(D + clog₂⌈2/δ⌉)` form and inherits the Chapter 3
    polynomial monomial-count bound. 
  • structure(1 field)defined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    structure FABL.LowDegreeF₂Hypothesis (n  : ) : Type
    structure FABL.LowDegreeF₂Hypothesis (n  : ) :
      Type
    A finite degree-at-most-`ℓ` ANF hypothesis. 
    coefficient : FABL.LowDegreeF₂Coefficients n 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    def FABL.solveLowDegreeF₂Samples {n  m : }
      (samples : Fin m  FABL.F₂Cube n × FABL.𝔽₂) :
      FABL.LowDegreeF₂Hypothesis n 
    def FABL.solveLowDegreeF₂Samples {n  m : }
      (samples :
        Fin m  FABL.F₂Cube n × FABL.𝔽₂) :
      FABL.LowDegreeF₂Hypothesis n 
    Solve the ANF linear system represented by binary-cube labeled samples. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    theorem FABL.solveLowDegreeF₂Samples_evaluate_eq {n  m : }
      (f : FABL.F₂BooleanFunction n)
      (hdegree : FABL.functionAlgebraicDegree f  )
      (sampleInputs : Fin m  FABL.F₂Cube n)
      (hseparates : FABL.SeparatesLowDegreeF₂Coefficients sampleInputs) :
      (FABL.solveLowDegreeF₂Samples fun i =>
            (sampleInputs i, f (sampleInputs i))).evaluate =
        f
    theorem FABL.solveLowDegreeF₂Samples_evaluate_eq
      {n  m : }
      (f : FABL.F₂BooleanFunction n)
      (hdegree :
        FABL.functionAlgebraicDegree f  )
      (sampleInputs : Fin m  FABL.F₂Cube n)
      (hseparates :
        FABL.SeparatesLowDegreeF₂Coefficients
          sampleInputs) :
      (FABL.solveLowDegreeF₂Samples fun i =>
            (sampleInputs i,
              f (sampleInputs i))).evaluate =
        f
    On a separating sample, the executable solver recovers the target ANF exactly. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    def FABL.lowDegreeF₂PolynomialLearnerWork (n  m : )
      (samples : Fin m  FABL.SignCube n × FABL.Sign) : 
    def FABL.lowDegreeF₂PolynomialLearnerWork
      (n  m : )
      (samples :
        Fin m  FABL.SignCube n × FABL.Sign) :
      
    The charged work of row construction, forward elimination, and back substitution on one
    labeled batch. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    theorem FABL.scheduledLowDegreeF₂PolynomialLearnerWork_le_cubicScale (n  : )
      (δ : FABL.PositiveLearningParameter)
      (samples :
        Fin (FABL.lowDegreeF₂LearningSampleCount n  δ) 
          FABL.SignCube n × FABL.Sign) :
      FABL.lowDegreeF₂PolynomialLearnerWork n 
          (FABL.lowDegreeF₂LearningSampleCount n  δ) samples 
        3 * FABL.lowDegreeF₂PolynomialLearnerCubicScale n  δ ^ 3
    theorem FABL.scheduledLowDegreeF₂PolynomialLearnerWork_le_cubicScale
      (n  : )
      (δ : FABL.PositiveLearningParameter)
      (samples :
        Fin
            (FABL.lowDegreeF₂LearningSampleCount
              n  δ) 
          FABL.SignCube n × FABL.Sign) :
      FABL.lowDegreeF₂PolynomialLearnerWork n
          
          (FABL.lowDegreeF₂LearningSampleCount
            n  δ)
          samples 
        3 *
          FABL.lowDegreeF₂PolynomialLearnerCubicScale
              n  δ ^
            3
    The scheduled learner's charged local work is bounded by three cubes of its common
    dimension-confidence scale. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    theorem FABL.scheduledLowDegreeF₂PolynomialLearnerWork_le_fixedParameterEnvelope
      (n  : ) (δ : FABL.PositiveLearningParameter)
      (samples :
        Fin (FABL.lowDegreeF₂LearningSampleCount n  δ) 
          FABL.SignCube n × FABL.Sign) :
      FABL.lowDegreeF₂PolynomialLearnerWork n 
          (FABL.lowDegreeF₂LearningSampleCount n  δ) samples 
        3 * (2 ^  * ( + FABL.fourierEstimatorFailureBits δ + 3)) ^ 3 *
          (n + 1) ^ (3 * )
    theorem FABL.scheduledLowDegreeF₂PolynomialLearnerWork_le_fixedParameterEnvelope
      (n  : )
      (δ : FABL.PositiveLearningParameter)
      (samples :
        Fin
            (FABL.lowDegreeF₂LearningSampleCount
              n  δ) 
          FABL.SignCube n × FABL.Sign) :
      FABL.lowDegreeF₂PolynomialLearnerWork n
          
          (FABL.lowDegreeF₂LearningSampleCount
            n  δ)
          samples 
        3 *
            (2 ^  *
                ( +
                    FABL.fourierEstimatorFailureBits
                      δ +
                  3)) ^
              3 *
          (n + 1) ^ (3 * )
    Explicit `O(n)^(3ℓ)` envelope: for fixed `ℓ` and `δ`, the coefficient is independent
    of `n`, while the only `n`-dependent factor is `(n + 1)^(3ℓ)`. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    def FABL.lowDegreeF₂PolynomialLearnerProgram (n  m : ) :
      FABL.LearningProgram n FABL.LearningAccess.randomExamples
        (FABL.LowDegreeF₂Hypothesis n )
    def FABL.lowDegreeF₂PolynomialLearnerProgram
      (n  m : ) :
      FABL.LearningProgram n
        FABL.LearningAccess.randomExamples
        (FABL.LowDegreeF₂Hypothesis n )
    The finite random-example program for Exercise 6.30(b), with work read from the same
    elimination trace that determines the output. 
  • defdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    def FABL.scheduledLowDegreeF₂PolynomialLearnerProgram (n  : )
      (δ : FABL.PositiveLearningParameter) :
      FABL.LearningProgram n FABL.LearningAccess.randomExamples
        (FABL.LowDegreeF₂Hypothesis n )
    def FABL.scheduledLowDegreeF₂PolynomialLearnerProgram
      (n  : )
      (δ : FABL.PositiveLearningParameter) :
      FABL.LearningProgram n
        FABL.LearningAccess.randomExamples
        (FABL.LowDegreeF₂Hypothesis n )
    The Exercise 6.30 learner with the computable confidence scheduler. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    theorem FABL.scheduledLowDegreeF₂PolynomialLearnerProgram_failureProbability_le
      (n  : ) (target : FABL.BooleanFunction n) (_hℓ : 1  )
      (δ : FABL.PositiveLearningParameter)
      (hdegree :
        FABL.functionAlgebraicDegree
            (FABL.booleanFunctionF₂Encoding target) 
          ) :
      ((FABL.scheduledLowDegreeF₂PolynomialLearnerProgram n 
              δ).eventProbability
          target fun outcome =>
          outcome.1.evaluate  FABL.booleanFunctionF₂Encoding target) 
        δ
    theorem FABL.scheduledLowDegreeF₂PolynomialLearnerProgram_failureProbability_le
      (n  : )
      (target : FABL.BooleanFunction n)
      (_hℓ : 1  )
      (δ : FABL.PositiveLearningParameter)
      (hdegree :
        FABL.functionAlgebraicDegree
            (FABL.booleanFunctionF₂Encoding
              target) 
          ) :
      ((FABL.scheduledLowDegreeF₂PolynomialLearnerProgram
              n  δ).eventProbability
          target fun outcome =>
          outcome.1.evaluate 
            FABL.booleanFunctionF₂Encoding
              target) 
        δ
    Exercise 6.30(a)--(c): for `ℓ ≥ 1` and `0 < δ ≤ 1/2`, the scheduled finite
    random-example program exactly learns every degree-at-most-`ℓ` target except with probability at
    most `δ`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/LowDegreeF₂PolynomialLearning.lean
    complete
    theorem FABL.scheduledLowDegreeF₂PolynomialLearnerProgram_sampleCount (n  : )
      (δ : FABL.PositiveLearningParameter) :
      FABL.lowDegreeF₂LearningSampleCount n  δ =
        2 ^  * (FABL.lowDegreeF₂MonomialCount n  + Nat.clog 2 2 / δ⌉₊)
    theorem FABL.scheduledLowDegreeF₂PolynomialLearnerProgram_sampleCount
      (n  : )
      (δ : FABL.PositiveLearningParameter) :
      FABL.lowDegreeF₂LearningSampleCount n 
          δ =
        2 ^  *
          (FABL.lowDegreeF₂MonomialCount n  +
            Nat.clog 2 2 / δ⌉₊)
    The confidence scheduler simply amplifies the constant-confidence learner by adding
    `clog₂ ⌈2/δ⌉` independent confidence blocks. 
Lemma6.4.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
Definition 2.1.4
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Exercise 6.31 (reduction to finding one relevant coordinate).

(a) Give a \operatorname{poly}(n,2^k)\log(1/\delta)-time algorithm which, from random examples of a k-junta f:\mathbb F_2^n\to\mathbb F_2, determines with failure probability at most \delta whether f is constant and, if so, which constant it is.

(b) Let P\subseteq[n] be a set of relevant coordinates of f and let z\in\mathbb F_2^P. Obtain M independent random examples from the (k-|P|)-junta f_{P\mid z} in time \operatorname{poly}(n,2^k)\,M\log(1/\delta), except with probability at most \delta.

(c) Using a relevant-coordinate finder as in Lemma 6.37, recursively build a depth-k decision tree for f and thereby prove Lemma 6.37.

Lean code for Lemma6.4.20125 declarations
  • inductive(2 constructors)defined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    inductive FABL.JuntaConstantDecision : Type
    inductive FABL.JuntaConstantDecision : Type
    The three possible outcomes of the constant test. 
    FABL.JuntaConstantDecision.constant (value : FABL.Sign) :
      FABL.JuntaConstantDecision
    The target is the indicated constant sign. 
    FABL.JuntaConstantDecision.nonconstant :
      FABL.JuntaConstantDecision
    The target is nonconstant. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.JuntaConstantDecision.IsCorrect {n : }
      (target : FABL.BooleanFunction n) : FABL.JuntaConstantDecision  Prop
    def FABL.JuntaConstantDecision.IsCorrect
      {n : }
      (target : FABL.BooleanFunction n) :
      FABL.JuntaConstantDecision  Prop
    Semantic correctness of a constant-test decision. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.JuntaConstantDecision.constantValueF₂? :
      FABL.JuntaConstantDecision  Option FABL.𝔽₂
    def FABL.JuntaConstantDecision.constantValueF₂? :
      FABL.JuntaConstantDecision 
        Option FABL.𝔽₂
    The output constant transported to the book's `𝔽₂` convention. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.juntaConstantAccuracy (k : ) : FABL.PositiveLearningParameter
    def FABL.juntaConstantAccuracy (k : ) :
      FABL.PositiveLearningParameter
    Accuracy `2⁻⁽ᵏ⁺²⁾` used to distinguish a constant `k`-junta from a nonconstant one. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.juntaConstantAccuracy_cast (k : ) :
      (FABL.juntaConstantAccuracy k) = 1 / 2 ^ (k + 2)
    theorem FABL.juntaConstantAccuracy_cast (k : ) :
      (FABL.juntaConstantAccuracy k) =
        1 / 2 ^ (k + 2)
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.juntaConstantThreshold (k : ) : 
    def FABL.juntaConstantThreshold (k : ) : 
    Rational decision threshold halfway inside the junta mean gap. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.juntaConstantThreshold_cast (k : ) :
      (FABL.juntaConstantThreshold k) = 1 - 2 * (1 / 2 ^ (k + 2))
    theorem FABL.juntaConstantThreshold_cast (k : ) :
      (FABL.juntaConstantThreshold k) =
        1 - 2 * (1 / 2 ^ (k + 2))
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.decideJuntaConstant (k : ) (estimate : ) :
      FABL.JuntaConstantDecision
    def FABL.decideJuntaConstant (k : )
      (estimate : ) :
      FABL.JuntaConstantDecision
    Pure controller for the empirical constant Fourier coefficient. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.exists_eq_const_of_isKJunta_zero {n : }
      (target : FABL.BooleanFunction n) (hjunta : FABL.IsKJunta target 0) :
       value, target = fun x => value
    theorem FABL.exists_eq_const_of_isKJunta_zero
      {n : }
      (target : FABL.BooleanFunction n)
      (hjunta : FABL.IsKJunta target 0) :
       value, target = fun x => value
    A `0`-junta is constant. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.abs_mean_le_one_sub_inv_two_pow_of_isKJunta_of_nonconstant {n : }
      (target : FABL.BooleanFunction n) (k : )
      (hjunta : FABL.IsKJunta target k)
      (hnonconstant : ¬ value, target = fun x => value) :
      |FABL.mean target.toReal|  1 - 2⁻¹ ^ k
    theorem FABL.abs_mean_le_one_sub_inv_two_pow_of_isKJunta_of_nonconstant
      {n : }
      (target : FABL.BooleanFunction n)
      (k : )
      (hjunta : FABL.IsKJunta target k)
      (hnonconstant :
        ¬ value, target = fun x => value) :
      |FABL.mean target.toReal|  1 - 2⁻¹ ^ k
    Public-API form of the constant-distance gap needed by Exercise 6.31(a).  The proof reuses
    the variance gap from `JuntaStableInfluence`; it does not repeat the low-degree support argument
    hidden inside that module. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.inv_two_pow_eq_four_mul_juntaConstantAccuracy (k : ) :
      2⁻¹ ^ k = 4 * (FABL.juntaConstantAccuracy k)
    theorem FABL.inv_two_pow_eq_four_mul_juntaConstantAccuracy
      (k : ) :
      2⁻¹ ^ k =
        4 * (FABL.juntaConstantAccuracy k)
    The mean gap is four times the estimator accuracy. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.decideJuntaConstant_isCorrect_of_close {n : }
      (target : FABL.BooleanFunction n) (k : )
      (hjunta : FABL.IsKJunta target k) (estimate : )
      (hclose :
        |estimate - FABL.fourierCoeff target.toReal | <
          (FABL.juntaConstantAccuracy k)) :
      FABL.JuntaConstantDecision.IsCorrect target
        (FABL.decideJuntaConstant k estimate)
    theorem FABL.decideJuntaConstant_isCorrect_of_close
      {n : }
      (target : FABL.BooleanFunction n)
      (k : )
      (hjunta : FABL.IsKJunta target k)
      (estimate : )
      (hclose :
        |estimate -
              FABL.fourierCoeff target.toReal
                | <
          (FABL.juntaConstantAccuracy k)) :
      FABL.JuntaConstantDecision.IsCorrect
        target
        (FABL.decideJuntaConstant k estimate)
    Any estimate inside the scheduled accuracy radius yields the correct constant decision. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.juntaConstantTestProgram {n : } (k : )
      (failure : FABL.PositiveLearningParameter) :
      FABL.LearningProgram n FABL.LearningAccess.randomExamples
        FABL.JuntaConstantDecision
    def FABL.juntaConstantTestProgram {n : }
      (k : )
      (failure :
        FABL.PositiveLearningParameter) :
      FABL.LearningProgram n
        FABL.LearningAccess.randomExamples
        FABL.JuntaConstantDecision
    Exercise 6.31(a)'s actual random-example program. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.juntaConstantTestProgram_cost_eq {n : }
      (target : FABL.BooleanFunction n) (k : )
      (failure : FABL.PositiveLearningParameter)
      (outcome : FABL.JuntaConstantDecision × FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost target
              (FABL.juntaConstantTestProgram k failure)).support) :
      outcome.2 =
        {
          randomExamples :=
            FABL.fourierEstimatorSampleCount (FABL.juntaConstantAccuracy k)
              failure,
          queries := 0,
          work :=
            2 *
              FABL.fourierEstimatorSampleCount
                (FABL.juntaConstantAccuracy k) failure }
    theorem FABL.juntaConstantTestProgram_cost_eq
      {n : }
      (target : FABL.BooleanFunction n)
      (k : )
      (failure :
        FABL.PositiveLearningParameter)
      (outcome :
        FABL.JuntaConstantDecision ×
          FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost
              target
              (FABL.juntaConstantTestProgram k
                failure)).support) :
      outcome.2 =
        {
          randomExamples :=
            FABL.fourierEstimatorSampleCount
              (FABL.juntaConstantAccuracy k)
              failure,
          queries := 0,
          work :=
            2 *
              FABL.fourierEstimatorSampleCount
                (FABL.juntaConstantAccuracy k)
                failure }
    The constant tester has exactly the constructor-derived sample and work counts. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.juntaConstantTestProgram_failureProbability_le {n : }
      (target : FABL.BooleanFunction n) (k : )
      (hjunta : FABL.IsKJunta target k)
      (failure : FABL.PositiveLearningParameter) :
      ((FABL.juntaConstantTestProgram k failure).eventProbability target
          fun outcome =>
          ¬FABL.JuntaConstantDecision.IsCorrect target outcome.1) 
        failure
    theorem FABL.juntaConstantTestProgram_failureProbability_le
      {n : }
      (target : FABL.BooleanFunction n)
      (k : )
      (hjunta : FABL.IsKJunta target k)
      (failure :
        FABL.PositiveLearningParameter) :
      ((FABL.juntaConstantTestProgram k
              failure).eventProbability
          target fun outcome =>
          ¬FABL.JuntaConstantDecision.IsCorrect
              target outcome.1) 
        failure
    Exercise 6.31(a): the actual program misclassifies a `k`-junta with probability at most
    `failure`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.juntaConstantTestSampleCount_cast_le (k : )
      (failure : FABL.PositiveLearningParameter) :
      (FABL.fourierEstimatorSampleCount (FABL.juntaConstantAccuracy k)
            failure) 
        64 * 4 ^ k * (FABL.fourierEstimatorFailureBits failure)
    theorem FABL.juntaConstantTestSampleCount_cast_le
      (k : )
      (failure :
        FABL.PositiveLearningParameter) :
      (FABL.fourierEstimatorSampleCount
            (FABL.juntaConstantAccuracy k)
            failure) 
        64 * 4 ^ k *
          (FABL.fourierEstimatorFailureBits
              failure)
    Explicit `poly(n,2^k) log(1/failure)` sample bound for Exercise 6.31(a). 
  • abbrevdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    abbrev FABL.JuntaFreeIndex {n : } (P : Finset (Fin n)) : Type
    abbrev FABL.JuntaFreeIndex {n : }
      (P : Finset (Fin n)) : Type
    Coordinates not yet fixed by the partial assignment `P`. 
  • abbrevdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    abbrev FABL.JuntaFixedAssignment {n : } (P : Finset (Fin n)) : Type
    abbrev FABL.JuntaFixedAssignment {n : }
      (P : Finset (Fin n)) : Type
    A sign assignment on the coordinates fixed by `P`. 
  • abbrevdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    abbrev FABL.JuntaFreeAssignment {n : } (P : Finset (Fin n)) : Type
    abbrev FABL.JuntaFreeAssignment {n : }
      (P : Finset (Fin n)) : Type
    A sign assignment on the coordinates outside `P`. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.combineJuntaAssignment {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (y : FABL.JuntaFreeAssignment P) :
      FABL.SignCube n
    def FABL.combineJuntaAssignment {n : }
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (y : FABL.JuntaFreeAssignment P) :
      FABL.SignCube n
    Combine a fixed assignment on `P` with an assignment on its complement. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.juntaAssignmentSplitEquiv {n : } (P : Finset (Fin n)) :
      FABL.SignCube n 
        FABL.JuntaFixedAssignment P × FABL.JuntaFreeAssignment P
    def FABL.juntaAssignmentSplitEquiv {n : }
      (P : Finset (Fin n)) :
      FABL.SignCube n 
        FABL.JuntaFixedAssignment P ×
          FABL.JuntaFreeAssignment P
    The canonical split into the fixed coordinates `P` and their complement. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.juntaAssignmentSplitEquiv_symm_apply {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (y : FABL.JuntaFreeAssignment P) :
      (FABL.juntaAssignmentSplitEquiv P).symm (z, y) =
        FABL.combineJuntaAssignment P z y
    theorem FABL.juntaAssignmentSplitEquiv_symm_apply
      {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (y : FABL.JuntaFreeAssignment P) :
      (FABL.juntaAssignmentSplitEquiv P).symm
          (z, y) =
        FABL.combineJuntaAssignment P z y
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.combineJuntaAssignment_apply_fixed {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (y : FABL.JuntaFreeAssignment P)
      (i : P) : FABL.combineJuntaAssignment P z y i = z i
    theorem FABL.combineJuntaAssignment_apply_fixed
      {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (y : FABL.JuntaFreeAssignment P)
      (i : P) :
      FABL.combineJuntaAssignment P z y i =
        z i
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.combineJuntaAssignment_apply_free {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (y : FABL.JuntaFreeAssignment P)
      (i : FABL.JuntaFreeIndex P) :
      FABL.combineJuntaAssignment P z y i = y i
    theorem FABL.combineJuntaAssignment_apply_free
      {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (y : FABL.JuntaFreeAssignment P)
      (i : FABL.JuntaFreeIndex P) :
      FABL.combineJuntaAssignment P z y i =
        y i
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.juntaRestriction {n : } (target : FABL.BooleanFunction n)
      (P : Finset (Fin n)) (z : FABL.JuntaFixedAssignment P) :
      FABL.JuntaFreeAssignment P  FABL.Sign
    def FABL.juntaRestriction {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) :
      FABL.JuntaFreeAssignment P  FABL.Sign
    Restrict a sign-valued target by fixing the coordinates in `P` to `z`. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.juntaFixedAssignmentSignOfF₂ {n : } (P : Finset (Fin n))
      (z : P  FABL.𝔽₂) : FABL.JuntaFixedAssignment P
    def FABL.juntaFixedAssignmentSignOfF₂ {n : }
      (P : Finset (Fin n))
      (z : P  FABL.𝔽₂) :
      FABL.JuntaFixedAssignment P
    The same fixed assignment in the book's additive `𝔽₂` representation. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.juntaFreeAssignmentF₂OfSign {n : } (P : Finset (Fin n))
      (y : FABL.JuntaFreeAssignment P) : FABL.JuntaFreeIndex P  FABL.𝔽₂
    def FABL.juntaFreeAssignmentF₂OfSign {n : }
      (P : Finset (Fin n))
      (y : FABL.JuntaFreeAssignment P) :
      FABL.JuntaFreeIndex P  FABL.𝔽₂
    The same free assignment in the book's additive `𝔽₂` representation. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.combineJuntaF₂Assignment {n : } (P : Finset (Fin n))
      (z : P  FABL.𝔽₂) (y : FABL.JuntaFreeIndex P  FABL.𝔽₂) :
      FABL.F₂Cube n
    def FABL.combineJuntaF₂Assignment {n : }
      (P : Finset (Fin n)) (z : P  FABL.𝔽₂)
      (y : FABL.JuntaFreeIndex P  FABL.𝔽₂) :
      FABL.F₂Cube n
    Additive-cube combination corresponding to `combineJuntaAssignment`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.binaryCubeSignEquiv_combineJuntaF₂Assignment {n : }
      (P : Finset (Fin n)) (z : P  FABL.𝔽₂)
      (y : FABL.JuntaFreeIndex P  FABL.𝔽₂) :
      (FABL.binaryCubeSignEquiv n) (FABL.combineJuntaF₂Assignment P z y) =
        FABL.combineJuntaAssignment P
          (FABL.juntaFixedAssignmentSignOfF₂ P z) fun i =>
          FABL.binarySignEquiv (y i)
    theorem FABL.binaryCubeSignEquiv_combineJuntaF₂Assignment
      {n : } (P : Finset (Fin n))
      (z : P  FABL.𝔽₂)
      (y : FABL.JuntaFreeIndex P  FABL.𝔽₂) :
      (FABL.binaryCubeSignEquiv n)
          (FABL.combineJuntaF₂Assignment P z
            y) =
        FABL.combineJuntaAssignment P
          (FABL.juntaFixedAssignmentSignOfF₂ P
            z)
          fun i => FABL.binarySignEquiv (y i)
    The explicit `SignCube`/`F₂Cube` bridge commutes with a partial assignment. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.MatchesJuntaAssignment {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (x : FABL.SignCube n) : Prop
    def FABL.MatchesJuntaAssignment {n : }
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (x : FABL.SignCube n) : Prop
    The input of a random example agrees with the requested fixed assignment. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.juntaFreePart {n : } (P : Finset (Fin n)) (x : FABL.SignCube n) :
      FABL.JuntaFreeAssignment P
    def FABL.juntaFreePart {n : }
      (P : Finset (Fin n))
      (x : FABL.SignCube n) :
      FABL.JuntaFreeAssignment P
    The free coordinates of an ambient input. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.juntaFixedPart {n : } (P : Finset (Fin n)) (x : FABL.SignCube n) :
      FABL.JuntaFixedAssignment P
    def FABL.juntaFixedPart {n : }
      (P : Finset (Fin n))
      (x : FABL.SignCube n) :
      FABL.JuntaFixedAssignment P
    The coordinates in `P` of an ambient input. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.juntaFixedPart_combineJuntaAssignment {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (y : FABL.JuntaFreeAssignment P) :
      FABL.juntaFixedPart P (FABL.combineJuntaAssignment P z y) = z
    theorem FABL.juntaFixedPart_combineJuntaAssignment
      {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (y : FABL.JuntaFreeAssignment P) :
      FABL.juntaFixedPart P
          (FABL.combineJuntaAssignment P z
            y) =
        z
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.juntaFreePart_combineJuntaAssignment {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (y : FABL.JuntaFreeAssignment P) :
      FABL.juntaFreePart P (FABL.combineJuntaAssignment P z y) = y
    theorem FABL.juntaFreePart_combineJuntaAssignment
      {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (y : FABL.JuntaFreeAssignment P) :
      FABL.juntaFreePart P
          (FABL.combineJuntaAssignment P z
            y) =
        y
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.combineJuntaAssignment_freePart_of_matches {n : }
      (P : Finset (Fin n)) (z : FABL.JuntaFixedAssignment P)
      (x : FABL.SignCube n) (hx : FABL.MatchesJuntaAssignment P z x) :
      FABL.combineJuntaAssignment P z (FABL.juntaFreePart P x) = x
    theorem FABL.combineJuntaAssignment_freePart_of_matches
      {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (x : FABL.SignCube n)
      (hx :
        FABL.MatchesJuntaAssignment P z x) :
      FABL.combineJuntaAssignment P z
          (FABL.juntaFreePart P x) =
        x
    Combining the free part of a matching input with the prescribed fixed assignment returns the
    original ambient input. 
  • abbrevdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    abbrev FABL.MatchedJuntaExample {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) : Type
    abbrev FABL.MatchedJuntaExample {n : }
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) : Type
    A labeled ambient example certified to lie in the requested restriction. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.matchedJuntaRestrictionExample {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (sample : FABL.MatchedJuntaExample P z) :
      FABL.JuntaFreeAssignment P × FABL.Sign
    def FABL.matchedJuntaRestrictionExample
      {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (sample :
        FABL.MatchedJuntaExample P z) :
      FABL.JuntaFreeAssignment P × FABL.Sign
    Convert a certified accepted example to a labeled example on the free cube. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.matchedJuntaRestrictionExample_label {n : }
      (target : FABL.BooleanFunction n) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (sample : FABL.MatchedJuntaExample P z)
      (hlabel : (↑sample).2 = target (↑sample).1) :
      (FABL.matchedJuntaRestrictionExample P z sample).2 =
        FABL.juntaRestriction target P z
          (FABL.matchedJuntaRestrictionExample P z sample).1
    theorem FABL.matchedJuntaRestrictionExample_label
      {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (sample : FABL.MatchedJuntaExample P z)
      (hlabel :
        (↑sample).2 = target (↑sample).1) :
      (FABL.matchedJuntaRestrictionExample P z
            sample).2 =
        FABL.juntaRestriction target P z
          (FABL.matchedJuntaRestrictionExample
              P z sample).1
    An accepted target-generated example has exactly the label of the restricted target. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.fixedMatchingIndices {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) {R : }
      (fixed : Fin R  FABL.JuntaFixedAssignment P) : Finset (Fin R)
    def FABL.fixedMatchingIndices {n : }
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      {R : }
      (fixed :
        Fin R  FABL.JuntaFixedAssignment P) :
      Finset (Fin R)
    Indices of a fixed-coordinate sequence that equal the requested assignment. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.juntaMatchingIndices {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) {R : }
      (samples : Fin R  FABL.SignCube n × FABL.Sign) : Finset (Fin R)
    def FABL.juntaMatchingIndices {n : }
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      {R : }
      (samples :
        Fin R  FABL.SignCube n × FABL.Sign) :
      Finset (Fin R)
    Indices in a finite labeled batch whose inputs match the requested fixed assignment. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.juntaMatchCount {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) {R : }
      (samples : Fin R  FABL.SignCube n × FABL.Sign) : 
    def FABL.juntaMatchCount {n : }
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      {R : }
      (samples :
        Fin R  FABL.SignCube n × FABL.Sign) :
      
    The number of examples in a batch that match a partial assignment. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.juntaMatchCount_eq_sum {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) {R : }
      (samples : Fin R  FABL.SignCube n × FABL.Sign) :
      FABL.juntaMatchCount P z samples =
         i, if FABL.MatchesJuntaAssignment P z (samples i).1 then 1 else 0
    theorem FABL.juntaMatchCount_eq_sum {n : }
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      {R : }
      (samples :
        Fin R  FABL.SignCube n × FABL.Sign) :
      FABL.juntaMatchCount P z samples =
         i,
          if
              FABL.MatchesJuntaAssignment P z
                (samples i).1 then
            1
          else 0
    Indicator-sum form of the accepted-example count. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.juntaMatchObservation {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (x : FABL.SignCube n) : 
    def FABL.juntaMatchObservation {n : }
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (x : FABL.SignCube n) : 
    Real indicator of a uniform ambient input matching the requested fixed assignment. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.juntaMatchObservation_mem_Icc {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (x : FABL.SignCube n) :
      FABL.juntaMatchObservation P z x  Set.Icc (-1) 1
    theorem FABL.juntaMatchObservation_mem_Icc {n : }
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (x : FABL.SignCube n) :
      FABL.juntaMatchObservation P z x 
        Set.Icc (-1) 1
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.expect_juntaMatchObservation {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) :
      (Finset.univ.expect fun x => FABL.juntaMatchObservation P z x) =
        1 / 2 ^ P.card
    theorem FABL.expect_juntaMatchObservation {n : }
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) :
      (Finset.univ.expect fun x =>
          FABL.juntaMatchObservation P z x) =
        1 / 2 ^ P.card
    A uniform ambient input matches a fixed assignment on `P` with probability `2⁻|P|`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.finiteUniformEmpiricalMean_juntaMatchObservation {n : }
      (target : FABL.BooleanFunction n) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) {R : }
      (sampleInputs : Fin R  FABL.SignCube n) :
      FABL.finiteUniformEmpiricalMean (FABL.juntaMatchObservation P z)
          sampleInputs =
        (FABL.juntaMatchCount P z fun i =>
              (sampleInputs i, target (sampleInputs i))) /
          R
    theorem FABL.finiteUniformEmpiricalMean_juntaMatchObservation
      {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      {R : }
      (sampleInputs :
        Fin R  FABL.SignCube n) :
      FABL.finiteUniformEmpiricalMean
          (FABL.juntaMatchObservation P z)
          sampleInputs =
        (FABL.juntaMatchCount P z fun i =>
              (sampleInputs i,
                target (sampleInputs i))) /
          R
    The executable count divided by the batch size is the empirical mean of the match
    indicator. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.initialFinEmbedding {M L : } (h : M  L) : Fin M  Fin L
    def FABL.initialFinEmbedding {M L : }
      (h : M  L) : Fin M  Fin L
    The canonical inclusion of an initial segment into a larger finite ordinal. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.fixedMatchingIndexEmbedding {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (M : ) {R : }
      (fixed : Fin R  FABL.JuntaFixedAssignment P)
      (h : M  (FABL.fixedMatchingIndices P z fixed).card) : Fin M  Fin R
    def FABL.fixedMatchingIndexEmbedding {n : }
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (M : ) {R : }
      (fixed :
        Fin R  FABL.JuntaFixedAssignment P)
      (h :
        M 
          (FABL.fixedMatchingIndices P z
              fixed).card) :
      Fin M  Fin R
    The first `M` occurrences of `z` in a fixed-coordinate sequence. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.juntaMatchingIndexEmbedding {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (M : ) {R : }
      (samples : Fin R  FABL.SignCube n × FABL.Sign)
      (h : M  FABL.juntaMatchCount P z samples) : Fin M  Fin R
    def FABL.juntaMatchingIndexEmbedding {n : }
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (M : ) {R : }
      (samples :
        Fin R  FABL.SignCube n × FABL.Sign)
      (h :
        M 
          FABL.juntaMatchCount P z samples) :
      Fin M  Fin R
    The first `M` matching batch indices, in increasing order. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.juntaMatchingIndexEmbedding_matches {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (M : ) {R : }
      (samples : Fin R  FABL.SignCube n × FABL.Sign)
      (h : M  FABL.juntaMatchCount P z samples) (i : Fin M) :
      FABL.MatchesJuntaAssignment P z
        (samples ((FABL.juntaMatchingIndexEmbedding P z M samples h) i)).1
    theorem FABL.juntaMatchingIndexEmbedding_matches
      {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (M : ) {R : }
      (samples :
        Fin R  FABL.SignCube n × FABL.Sign)
      (h :
        M  FABL.juntaMatchCount P z samples)
      (i : Fin M) :
      FABL.MatchesJuntaAssignment P z
        (samples
            ((FABL.juntaMatchingIndexEmbedding
                P z M samples h)
              i)).1
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.takeMatchingJuntaExamples {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (M : ) {R : }
      (samples : Fin R  FABL.SignCube n × FABL.Sign) :
      Option (Fin M  FABL.MatchedJuntaExample P z)
    def FABL.takeMatchingJuntaExamples {n : }
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (M : ) {R : }
      (samples :
        Fin R  FABL.SignCube n × FABL.Sign) :
      Option
        (Fin M  FABL.MatchedJuntaExample P z)
    Take the first `M` accepted examples, returning `none` exactly when fewer than `M` inputs
    match. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.takeMatchingJuntaExamples_eq_none_iff {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (M : ) {R : }
      (samples : Fin R  FABL.SignCube n × FABL.Sign) :
      FABL.takeMatchingJuntaExamples P z M samples = none 
        FABL.juntaMatchCount P z samples < M
    theorem FABL.takeMatchingJuntaExamples_eq_none_iff
      {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (M : ) {R : }
      (samples :
        Fin R  FABL.SignCube n × FABL.Sign) :
      FABL.takeMatchingJuntaExamples P z M
            samples =
          none 
        FABL.juntaMatchCount P z samples < M
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.juntaRestrictionMatchAccuracy (k : ) :
      FABL.PositiveLearningParameter
    def FABL.juntaRestrictionMatchAccuracy
      (k : ) :
      FABL.PositiveLearningParameter
    Accuracy `2⁻⁽ᵏ⁺¹⁾`, at most half of the probability of matching at most `k`
    fixed coordinates. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.juntaRestrictionMatchAccuracy_cast (k : ) :
      (FABL.juntaRestrictionMatchAccuracy k) = 1 / 2 ^ (k + 1)
    theorem FABL.juntaRestrictionMatchAccuracy_cast
      (k : ) :
      (FABL.juntaRestrictionMatchAccuracy
              k) =
        1 / 2 ^ (k + 1)
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.juntaRestrictionSampleCount (k M : )
      (failure : FABL.PositiveLearningParameter) : 
    def FABL.juntaRestrictionSampleCount (k M : )
      (failure :
        FABL.PositiveLearningParameter) :
      
    Batch size for finite rejection sampling.  The first summand supplies the expected `M`
    acceptances, and the second is the Chapter 3 concentration schedule. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.juntaRestrictionSampleWork {n : } (P : Finset (Fin n)) (k M : )
      (failure : FABL.PositiveLearningParameter) : 
    def FABL.juntaRestrictionSampleWork {n : }
      (P : Finset (Fin n)) (k M : )
      (failure :
        FABL.PositiveLearningParameter) :
      
    Local work charged for testing all fixed coordinates and selecting the first `M` matches. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.juntaRestrictionSampleProgram {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (k M : )
      (failure : FABL.PositiveLearningParameter) :
      FABL.LearningProgram n FABL.LearningAccess.randomExamples
        (Option (Fin M  FABL.MatchedJuntaExample P z))
    def FABL.juntaRestrictionSampleProgram {n : }
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (k M : )
      (failure :
        FABL.PositiveLearningParameter) :
      FABL.LearningProgram n
        FABL.LearningAccess.randomExamples
        (Option
          (Fin M 
            FABL.MatchedJuntaExample P z))
    Exercise 6.31(b)'s actual finite rejection sampler.  Every oracle call is an ambient random
    example; failure is represented explicitly by `none`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.runWithCost_juntaRestrictionSampleProgram {n : }
      (target : FABL.BooleanFunction n) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (k M : )
      (failure : FABL.PositiveLearningParameter) :
      FABL.LearningProgram.runWithCost target
          (FABL.juntaRestrictionSampleProgram P z k M failure) =
        PMF.map
          (fun sampleInputs =>
            (FABL.takeMatchingJuntaExamples P z M fun i =>
                (sampleInputs i, target (sampleInputs i)),
              {
                randomExamples :=
                  FABL.juntaRestrictionSampleCount k M failure,
                queries := 0,
                work :=
                  FABL.juntaRestrictionSampleCount k M failure +
                    FABL.juntaRestrictionSampleWork P k M failure }))
          (FABL.uniformPMF
            (Fin (FABL.juntaRestrictionSampleCount k M failure) 
              FABL.SignCube n))
    theorem FABL.runWithCost_juntaRestrictionSampleProgram
      {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (k M : )
      (failure :
        FABL.PositiveLearningParameter) :
      FABL.LearningProgram.runWithCost target
          (FABL.juntaRestrictionSampleProgram
            P z k M failure) =
        PMF.map
          (fun sampleInputs =>
            (FABL.takeMatchingJuntaExamples P
                z M fun i =>
                (sampleInputs i,
                  target (sampleInputs i)),
              {
                randomExamples :=
                  FABL.juntaRestrictionSampleCount
                    k M failure,
                queries := 0,
                work :=
                  FABL.juntaRestrictionSampleCount
                      k M failure +
                    FABL.juntaRestrictionSampleWork
                      P k M failure }))
          (FABL.uniformPMF
            (Fin
                (FABL.juntaRestrictionSampleCount
                  k M failure) 
              FABL.SignCube n))
    Exact pushforward law and constructor-derived cost of the rejection sampler. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.juntaRestrictionFailureSet {n : }
      (target : FABL.BooleanFunction n) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (k M : )
      (failure : FABL.PositiveLearningParameter) :
      Set
        (Fin (FABL.juntaRestrictionSampleCount k M failure) 
          FABL.SignCube n)
    def FABL.juntaRestrictionFailureSet {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (k M : )
      (failure :
        FABL.PositiveLearningParameter) :
      Set
        (Fin
            (FABL.juntaRestrictionSampleCount
              k M failure) 
          FABL.SignCube n)
    Raw-input failure event of the actual rejection sampler. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.juntaRestrictionFailureSet_subset_empiricalBad {n : }
      (target : FABL.BooleanFunction n) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (k M : ) (hPk : P.card  k)
      (failure : FABL.PositiveLearningParameter) :
      FABL.juntaRestrictionFailureSet target P z k M failure 
        {sampleInputs |
          (FABL.juntaRestrictionMatchAccuracy k) 
            |FABL.finiteUniformEmpiricalMean
                  (FABL.juntaMatchObservation P z) sampleInputs -
                Finset.univ.expect fun x =>
                  FABL.juntaMatchObservation P z x|}
    theorem FABL.juntaRestrictionFailureSet_subset_empiricalBad
      {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (k M : ) (hPk : P.card  k)
      (failure :
        FABL.PositiveLearningParameter) :
      FABL.juntaRestrictionFailureSet target P
          z k M failure 
        {sampleInputs |
          (FABL.juntaRestrictionMatchAccuracy
                  k) 
            |FABL.finiteUniformEmpiricalMean
                  (FABL.juntaMatchObservation
                    P z)
                  sampleInputs -
                Finset.univ.expect fun x =>
                  FABL.juntaMatchObservation P
                    z x|}
    Failure of finite rejection sampling forces a large empirical deviation of the fixed-prefix
    indicator. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.juntaRestrictionSampleProgram_failureProbability_le {n : }
      (target : FABL.BooleanFunction n) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (k M : ) (hPk : P.card  k)
      (failure : FABL.PositiveLearningParameter) :
      ((FABL.juntaRestrictionSampleProgram P z k M failure).eventProbability
          target fun outcome => outcome.1 = none) 
        failure
    theorem FABL.juntaRestrictionSampleProgram_failureProbability_le
      {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (k M : ) (hPk : P.card  k)
      (failure :
        FABL.PositiveLearningParameter) :
      ((FABL.juntaRestrictionSampleProgram P z
              k M failure).eventProbability
          target fun outcome =>
          outcome.1 = none) 
        failure
    Exercise 6.31(b): the actual finite rejection sampler fails with probability at most the
    requested confidence parameter. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.juntaRestrictionSampleProgram_success_labels {n : }
      (target : FABL.BooleanFunction n) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (k M : )
      (failure : FABL.PositiveLearningParameter)
      (outcome :
        Option (Fin M  FABL.MatchedJuntaExample P z) × FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost target
              (FABL.juntaRestrictionSampleProgram P z k M failure)).support)
      (batch : Fin M  FABL.MatchedJuntaExample P z)
      (hbatch : outcome.1 = some batch) (i : Fin M) :
      (FABL.matchedJuntaRestrictionExample P z (batch i)).2 =
        FABL.juntaRestriction target P z
          (FABL.matchedJuntaRestrictionExample P z (batch i)).1
    theorem FABL.juntaRestrictionSampleProgram_success_labels
      {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (k M : )
      (failure :
        FABL.PositiveLearningParameter)
      (outcome :
        Option
            (Fin M 
              FABL.MatchedJuntaExample P z) ×
          FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost
              target
              (FABL.juntaRestrictionSampleProgram
                P z k M failure)).support)
      (batch :
        Fin M  FABL.MatchedJuntaExample P z)
      (hbatch : outcome.1 = some batch)
      (i : Fin M) :
      (FABL.matchedJuntaRestrictionExample P z
            (batch i)).2 =
        FABL.juntaRestriction target P z
          (FABL.matchedJuntaRestrictionExample
              P z (batch i)).1
    Every successful output consists of exactly `M` correctly labeled examples of the requested
    restriction. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.juntaRestrictionSampleProgram_cost_eq {n : }
      (target : FABL.BooleanFunction n) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (k M : )
      (failure : FABL.PositiveLearningParameter)
      (outcome :
        Option (Fin M  FABL.MatchedJuntaExample P z) × FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost target
              (FABL.juntaRestrictionSampleProgram P z k M
                failure)).support) :
      outcome.2 =
        { randomExamples := FABL.juntaRestrictionSampleCount k M failure,
          queries := 0,
          work :=
            FABL.juntaRestrictionSampleCount k M failure +
              FABL.juntaRestrictionSampleWork P k M failure }
    theorem FABL.juntaRestrictionSampleProgram_cost_eq
      {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (k M : )
      (failure :
        FABL.PositiveLearningParameter)
      (outcome :
        Option
            (Fin M 
              FABL.MatchedJuntaExample P z) ×
          FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost
              target
              (FABL.juntaRestrictionSampleProgram
                P z k M failure)).support) :
      outcome.2 =
        {
          randomExamples :=
            FABL.juntaRestrictionSampleCount k
              M failure,
          queries := 0,
          work :=
            FABL.juntaRestrictionSampleCount k
                M failure +
              FABL.juntaRestrictionSampleWork
                P k M failure }
    Exact pathwise cost of the finite rejection sampler. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.juntaRestrictionSampleCount_cast_le (k M : )
      (failure : FABL.PositiveLearningParameter) :
      (FABL.juntaRestrictionSampleCount k M failure) 
        2 ^ (k + 1) * M +
          16 * 4 ^ k * (FABL.fourierEstimatorFailureBits failure)
    theorem FABL.juntaRestrictionSampleCount_cast_le
      (k M : )
      (failure :
        FABL.PositiveLearningParameter) :
      (FABL.juntaRestrictionSampleCount k M
            failure) 
        2 ^ (k + 1) * M +
          16 * 4 ^ k *
            (FABL.fourierEstimatorFailureBits
                failure)
    Explicit polynomial/logarithmic bound for the number of ambient random examples used by the
    rejection sampler. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.injectionVectorSplitEquiv.{u_1} {A : Type u_1} {M R : }
      (e : Fin M  Fin R) :
      (Fin R  A)  (Fin M  A) × ({ j // j  Set.range e }  A)
    def FABL.injectionVectorSplitEquiv.{u_1}
      {A : Type u_1} {M R : }
      (e : Fin M  Fin R) :
      (Fin R  A) 
        (Fin M  A) ×
          ({ j // j  Set.range e }  A)
    Split a finite vector into the coordinates in the range of an injection and the remaining
    coordinates, reindexing the first factor by the injection's domain. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.injectionVectorSplitEquiv_fst.{u_1} {A : Type u_1} {M R : }
      (e : Fin M  Fin R) (x : Fin R  A) (i : Fin M) :
      ((FABL.injectionVectorSplitEquiv e) x).1 i = x (e i)
    theorem FABL.injectionVectorSplitEquiv_fst.{u_1}
      {A : Type u_1} {M R : }
      (e : Fin M  Fin R) (x : Fin R  A)
      (i : Fin M) :
      ((FABL.injectionVectorSplitEquiv e) x).1
          i =
        x (e i)
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.map_uniformPMF_fst.{u_1, u_2} {A : Type u_1} {B : Type u_2}
      [Fintype A] [Nonempty A] [Fintype B] [Nonempty B] :
      PMF.map Prod.fst (FABL.uniformPMF (A × B)) = FABL.uniformPMF A
    theorem FABL.map_uniformPMF_fst.{u_1, u_2}
      {A : Type u_1} {B : Type u_2}
      [Fintype A] [Nonempty A] [Fintype B]
      [Nonempty B] :
      PMF.map Prod.fst
          (FABL.uniformPMF (A × B)) =
        FABL.uniformPMF A
    The first projection of a finite uniform product is uniform. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.map_uniformPMF_injection_projection.{u_1} {A : Type u_1}
      [Fintype A] [Nonempty A] {M R : } (e : Fin M  Fin R) :
      PMF.map (fun x i => x (e i)) (FABL.uniformPMF (Fin R  A)) =
        FABL.uniformPMF (Fin M  A)
    theorem FABL.map_uniformPMF_injection_projection.{u_1}
      {A : Type u_1} [Fintype A] [Nonempty A]
      {M R : } (e : Fin M  Fin R) :
      PMF.map (fun x i => x (e i))
          (FABL.uniformPMF (Fin R  A)) =
        FABL.uniformPMF (Fin M  A)
    Restricting an independent uniform vector along any injection again gives an independent
    uniform vector.  This is the finite counting fact needed for the rejection sampler's conditional
    law; the injection may depend on the fixed-coordinate sequence, but not on the free-coordinate
    sequence. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.selectedJuntaFreeBatch {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (M : ) {R : }
      (fixed : Fin R  FABL.JuntaFixedAssignment P)
      (h : M  (FABL.fixedMatchingIndices P z fixed).card)
      (free : Fin R  FABL.JuntaFreeAssignment P) :
      Fin M  FABL.JuntaFreeAssignment P
    def FABL.selectedJuntaFreeBatch {n : }
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (M : ) {R : }
      (fixed :
        Fin R  FABL.JuntaFixedAssignment P)
      (h :
        M 
          (FABL.fixedMatchingIndices P z
              fixed).card)
      (free :
        Fin R  FABL.JuntaFreeAssignment P) :
      Fin M  FABL.JuntaFreeAssignment P
    For a fixed successful fixed-coordinate sequence, select the free parts at exactly the same
    accepted indices used by the executable rejection sampler. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.juntaRestrictionLabeledBatch {n : }
      (target : FABL.BooleanFunction n) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) {M : }
      (inputs : Fin M  FABL.JuntaFreeAssignment P) :
      Fin M  FABL.JuntaFreeAssignment P × FABL.Sign
    def FABL.juntaRestrictionLabeledBatch {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      {M : }
      (inputs :
        Fin M  FABL.JuntaFreeAssignment P) :
      Fin M 
        FABL.JuntaFreeAssignment P × FABL.Sign
    Attach the restricted target labels to a selected free-input batch. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.juntaLabeledSamplesFromSplit {n : }
      (target : FABL.BooleanFunction n) (P : Finset (Fin n)) {R : }
      (fixed : Fin R  FABL.JuntaFixedAssignment P)
      (free : Fin R  FABL.JuntaFreeAssignment P) :
      Fin R  FABL.SignCube n × FABL.Sign
    def FABL.juntaLabeledSamplesFromSplit {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n)) {R : }
      (fixed :
        Fin R  FABL.JuntaFixedAssignment P)
      (free :
        Fin R  FABL.JuntaFreeAssignment P) :
      Fin R  FABL.SignCube n × FABL.Sign
    Ambient target-generated examples reconstructed from their fixed and free coordinate
    sequences. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.takeMatchingJuntaExamples_from_split {n : }
      (target : FABL.BooleanFunction n) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (M : ) {R : }
      (fixed : Fin R  FABL.JuntaFixedAssignment P)
      (free : Fin R  FABL.JuntaFreeAssignment P)
      (h : M  (FABL.fixedMatchingIndices P z fixed).card) :
      Option.map
          (fun batch i => FABL.matchedJuntaRestrictionExample P z (batch i))
          (FABL.takeMatchingJuntaExamples P z M
            (FABL.juntaLabeledSamplesFromSplit target P fixed free)) =
        some
          (FABL.juntaRestrictionLabeledBatch target P z
            (FABL.selectedJuntaFreeBatch P z M fixed h free))
    theorem FABL.takeMatchingJuntaExamples_from_split
      {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (M : ) {R : }
      (fixed :
        Fin R  FABL.JuntaFixedAssignment P)
      (free :
        Fin R  FABL.JuntaFreeAssignment P)
      (h :
        M 
          (FABL.fixedMatchingIndices P z
              fixed).card) :
      Option.map
          (fun batch i =>
            FABL.matchedJuntaRestrictionExample
              P z (batch i))
          (FABL.takeMatchingJuntaExamples P z
            M
            (FABL.juntaLabeledSamplesFromSplit
              target P fixed free)) =
        some
          (FABL.juntaRestrictionLabeledBatch
            target P z
            (FABL.selectedJuntaFreeBatch P z M
              fixed h free))
    The conditional-law selector is exactly the projection of the executable sampler's successful
    output; this ties the finite injection lemma to the real `LearningProgram`, rather than to an
    idealized conditional oracle. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.map_uniformPMF_selectedJuntaRestrictionBatch {n : }
      (target : FABL.BooleanFunction n) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (M : ) {R : }
      (fixed : Fin R  FABL.JuntaFixedAssignment P)
      (h : M  (FABL.fixedMatchingIndices P z fixed).card) :
      PMF.map
          (fun free =>
            FABL.juntaRestrictionLabeledBatch target P z
              (FABL.selectedJuntaFreeBatch P z M fixed h free))
          (FABL.uniformPMF (Fin R  FABL.JuntaFreeAssignment P)) =
        PMF.map (FABL.juntaRestrictionLabeledBatch target P z)
          (FABL.uniformPMF (Fin M  FABL.JuntaFreeAssignment P))
    theorem FABL.map_uniformPMF_selectedJuntaRestrictionBatch
      {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (M : ) {R : }
      (fixed :
        Fin R  FABL.JuntaFixedAssignment P)
      (h :
        M 
          (FABL.fixedMatchingIndices P z
              fixed).card) :
      PMF.map
          (fun free =>
            FABL.juntaRestrictionLabeledBatch
              target P z
              (FABL.selectedJuntaFreeBatch P z
                M fixed h free))
          (FABL.uniformPMF
            (Fin R 
              FABL.JuntaFreeAssignment P)) =
        PMF.map
          (FABL.juntaRestrictionLabeledBatch
            target P z)
          (FABL.uniformPMF
            (Fin M 
              FABL.JuntaFreeAssignment P))
    Narrow conditional-law lemma for Exercise 6.31(b).  Once the fixed-coordinate sequence is
    held fixed and contains at least `M` matches, the first `M` accepted free inputs and labels have
    exactly the law of `M` independent uniform random examples from the restriction. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.projectJuntaRestrictionBatch {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) {M : } :
      Option (Fin M  FABL.MatchedJuntaExample P z) 
        Option (Fin M  FABL.JuntaFreeAssignment P × FABL.Sign)
    def FABL.projectJuntaRestrictionBatch {n : }
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      {M : } :
      Option
          (Fin M 
            FABL.MatchedJuntaExample P z) 
        Option
          (Fin M 
            FABL.JuntaFreeAssignment P ×
              FABL.Sign)
    Project every successful certified ambient batch to the corresponding labeled batch on the
    restricted cube. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.juntaInputBatchSplitEquiv {n : } (P : Finset (Fin n)) (R : ) :
      (Fin R  FABL.SignCube n) 
        (Fin R  FABL.JuntaFixedAssignment P) ×
          (Fin R  FABL.JuntaFreeAssignment P)
    def FABL.juntaInputBatchSplitEquiv {n : }
      (P : Finset (Fin n)) (R : ) :
      (Fin R  FABL.SignCube n) 
        (Fin R 
            FABL.JuntaFixedAssignment P) ×
          (Fin R  FABL.JuntaFreeAssignment P)
    Split a vector of ambient inputs into its fixed- and free-coordinate vectors. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.juntaInputBatchSplitEquiv_symm_apply {n : } (P : Finset (Fin n))
      (R : ) (fixed : Fin R  FABL.JuntaFixedAssignment P)
      (free : Fin R  FABL.JuntaFreeAssignment P) :
      (FABL.juntaInputBatchSplitEquiv P R).symm (fixed, free) = fun r =>
        FABL.combineJuntaAssignment P (fixed r) (free r)
    theorem FABL.juntaInputBatchSplitEquiv_symm_apply
      {n : } (P : Finset (Fin n)) (R : )
      (fixed :
        Fin R  FABL.JuntaFixedAssignment P)
      (free :
        Fin R  FABL.JuntaFreeAssignment P) :
      (FABL.juntaInputBatchSplitEquiv P
              R).symm
          (fixed, free) =
        fun r =>
        FABL.combineJuntaAssignment P
          (fixed r) (free r)
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.rawProjectedJuntaRestrictionBatch {n : }
      (target : FABL.BooleanFunction n) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (M : ) {R : }
      (inputs : Fin R  FABL.SignCube n) :
      Option (Fin M  FABL.JuntaFreeAssignment P × FABL.Sign)
    def FABL.rawProjectedJuntaRestrictionBatch
      {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (M : ) {R : }
      (inputs : Fin R  FABL.SignCube n) :
      Option
        (Fin M 
          FABL.JuntaFreeAssignment P ×
            FABL.Sign)
    Pure projection of the executable sampler controller on a raw ambient input vector. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.map_uniformPMF_rawProjectedJuntaRestrictionBatch {n : }
      (target : FABL.BooleanFunction n) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (M R : ) :
      PMF.map (FABL.rawProjectedJuntaRestrictionBatch target P z M)
          (FABL.uniformPMF (Fin R  FABL.SignCube n)) =
        (FABL.uniformPMF (Fin R  FABL.JuntaFixedAssignment P)).bind
          fun fixed =>
          PMF.map
            (fun free =>
              FABL.rawProjectedJuntaRestrictionBatch target P z M fun r =>
                FABL.combineJuntaAssignment P (fixed r) (free r))
            (FABL.uniformPMF (Fin R  FABL.JuntaFreeAssignment P))
    theorem FABL.map_uniformPMF_rawProjectedJuntaRestrictionBatch
      {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (M R : ) :
      PMF.map
          (FABL.rawProjectedJuntaRestrictionBatch
            target P z M)
          (FABL.uniformPMF
            (Fin R  FABL.SignCube n)) =
        (FABL.uniformPMF
              (Fin R 
                FABL.JuntaFixedAssignment
                  P)).bind
          fun fixed =>
          PMF.map
            (fun free =>
              FABL.rawProjectedJuntaRestrictionBatch
                target P z M fun r =>
                FABL.combineJuntaAssignment P
                  (fixed r) (free r))
            (FABL.uniformPMF
              (Fin R 
                FABL.JuntaFreeAssignment P))
    Independent uniform fixed and free vectors give the same law as a uniform ambient vector. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.pmfToOuterMeasure_ne_top.{u_1} {α : Type u_1} (p : PMF α)
      (event : Set α) : p.toOuterMeasure event  
    theorem FABL.pmfToOuterMeasure_ne_top.{u_1}
      {α : Type u_1} (p : PMF α)
      (event : Set α) :
      p.toOuterMeasure event  
    A probability mass function assigns finite outer measure to every event. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.rawProjectedJuntaRestrictionBatch_successBadProbability_le {n : }
      (target : FABL.BooleanFunction n) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (M R : )
      (bad : (Fin M  FABL.JuntaFreeAssignment P × FABL.Sign)  Prop)
      (η : )
      (hideal :
        ((PMF.map (FABL.juntaRestrictionLabeledBatch target P z)
                  (FABL.uniformPMF
                    (Fin M  FABL.JuntaFreeAssignment P))).toOuterMeasure
              {batch | bad batch}).toReal 
          η) :
      ((PMF.map (FABL.rawProjectedJuntaRestrictionBatch target P z M)
                (FABL.uniformPMF (Fin R  FABL.SignCube n))).toOuterMeasure
            {output |
              match output with
              | none => False
              | some batch => bad batch}).toReal 
        η
    theorem FABL.rawProjectedJuntaRestrictionBatch_successBadProbability_le
      {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (M R : )
      (bad :
        (Fin M 
            FABL.JuntaFreeAssignment P ×
              FABL.Sign) 
          Prop)
      (η : )
      (hideal :
        ((PMF.map
                  (FABL.juntaRestrictionLabeledBatch
                    target P z)
                  (FABL.uniformPMF
                    (Fin M 
                      FABL.JuntaFreeAssignment
                        P))).toOuterMeasure
              {batch | bad batch}).toReal 
          η) :
      ((PMF.map
                (FABL.rawProjectedJuntaRestrictionBatch
                  target P z M)
                (FABL.uniformPMF
                  (Fin R 
                    FABL.SignCube
                      n))).toOuterMeasure
            {output |
              match output with
              | none => False
              | some batch =>
                bad batch}).toReal 
        η
    Pure finite disintegration: after discarding sampler failures, every bad event on the
    projected successful batch is no more likely than under ideal independent restricted examples. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.juntaRestrictionSampleProgram_badProbability_le {n : }
      (target : FABL.BooleanFunction n) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (k M : ) (hPk : P.card  k)
      (failure : FABL.PositiveLearningParameter)
      (bad : (Fin M  FABL.JuntaFreeAssignment P × FABL.Sign)  Prop)
      (η : ) ( : 0  η)
      (hideal :
        ((PMF.map (FABL.juntaRestrictionLabeledBatch target P z)
                  (FABL.uniformPMF
                    (Fin M  FABL.JuntaFreeAssignment P))).toOuterMeasure
              {batch | bad batch}).toReal 
          η) :
      ((FABL.juntaRestrictionSampleProgram P z k M failure).eventProbability
          target fun outcome =>
          FABL.JuntaRestrictionSampleBad P z bad outcome.1) 
        failure + η
    theorem FABL.juntaRestrictionSampleProgram_badProbability_le
      {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (k M : ) (hPk : P.card  k)
      (failure :
        FABL.PositiveLearningParameter)
      (bad :
        (Fin M 
            FABL.JuntaFreeAssignment P ×
              FABL.Sign) 
          Prop)
      (η : ) ( : 0  η)
      (hideal :
        ((PMF.map
                  (FABL.juntaRestrictionLabeledBatch
                    target P z)
                  (FABL.uniformPMF
                    (Fin M 
                      FABL.JuntaFreeAssignment
                        P))).toOuterMeasure
              {batch | bad batch}).toReal 
          η) :
      ((FABL.juntaRestrictionSampleProgram P z
              k M failure).eventProbability
          target fun outcome =>
          FABL.JuntaRestrictionSampleBad P z
            bad outcome.1) 
        failure + η
    Exercise 6.31(b)'s public elimination rule.  Any bad-event guarantee proved for an ideal
    independent restricted batch transfers to the executable ambient rejection sampler, with only the
    sampler's explicit failure budget added. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.IsRelevantJuntaRestriction {n : }
      (target : FABL.BooleanFunction n) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (i : FABL.JuntaFreeIndex P) : Prop
    def FABL.IsRelevantJuntaRestriction {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (i : FABL.JuntaFreeIndex P) : Prop
    A free coordinate is relevant to a restriction when changing only that coordinate can
    change the restricted target.  This witness formulation avoids imposing an artificial `Fin m`
    enumeration on the complement of `P`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.mem_of_isRelevantJuntaRestriction_of_dependsOn {n : }
      (target : FABL.BooleanFunction n) (J P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (i : FABL.JuntaFreeIndex P)
      (hdepends : DependsOn target J)
      (hrelevant : FABL.IsRelevantJuntaRestriction target P z i) : i  J
    theorem FABL.mem_of_isRelevantJuntaRestriction_of_dependsOn
      {n : }
      (target : FABL.BooleanFunction n)
      (J P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (i : FABL.JuntaFreeIndex P)
      (hdepends : DependsOn target J)
      (hrelevant :
        FABL.IsRelevantJuntaRestriction target
          P z i) :
      i  J
    A coordinate relevant to a restriction of a function depending on `J` must itself lie in
    `J`.  Thus a sound relevant-coordinate finder can never spend depth outside a junta witness. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.juntaRestriction_eq_const_of_dependsOn_of_subset {n : }
      (target : FABL.BooleanFunction n) (J P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (hdepends : DependsOn target J)
      (hJP : J  P) :
      FABL.juntaRestriction target P z = fun x =>
        target (FABL.combineJuntaAssignment P z fun x => 1)
    theorem FABL.juntaRestriction_eq_const_of_dependsOn_of_subset
      {n : }
      (target : FABL.BooleanFunction n)
      (J P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (hdepends : DependsOn target J)
      (hJP : J  P) :
      FABL.juntaRestriction target P z =
        fun x =>
        target
          (FABL.combineJuntaAssignment P z
            fun x => 1)
    Once the fixed coordinates contain a dependence witness, every resulting restriction is
    constant.  The displayed value uses the canonical all-`+1` free assignment and hence introduces
    no choice operator into the algorithm. 
  • inductive(2 constructors, 2 parameters)defined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    inductive FABL.JuntaNodeDecision {n : } (P : Finset (Fin n)) : Type
    inductive FABL.JuntaNodeDecision {n : }
      (P : Finset (Fin n)) : Type
    A successful node analysis either certifies a constant restriction or returns a genuinely
    relevant coordinate outside the already-fixed set. 
    FABL.JuntaNodeDecision.constant {n : } {P : Finset (Fin n)}
      (value : FABL.Sign) : FABL.JuntaNodeDecision P
    The restriction is the indicated constant. 
    FABL.JuntaNodeDecision.relevant {n : } {P : Finset (Fin n)}
      (coordinate : FABL.JuntaFreeIndex P) :
      FABL.JuntaNodeDecision P
    Split on a relevant coordinate of the restriction. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.JuntaNodeDecision.IsCorrect {n : }
      (target : FABL.BooleanFunction n) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) : FABL.JuntaNodeDecision P  Prop
    def FABL.JuntaNodeDecision.IsCorrect {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) :
      FABL.JuntaNodeDecision P  Prop
    Semantic correctness of one node decision. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.JuntaNodeDecision.IsBad {n : } (target : FABL.BooleanFunction n)
      (P : Finset (Fin n)) (z : FABL.JuntaFixedAssignment P) :
      Option (FABL.JuntaNodeDecision P)  Prop
    def FABL.JuntaNodeDecision.IsBad {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) :
      Option (FABL.JuntaNodeDecision P)  Prop
    Failure event for one node call.  `none` is an explicit algorithmic failure; an incorrect
    returned certificate is also counted as failure. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.JuntaNodeDecision.isCorrect_of_not_isBad {n : }
      (target : FABL.BooleanFunction n) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      {decision : FABL.JuntaNodeDecision P}
      (hgood : ¬FABL.JuntaNodeDecision.IsBad target P z (some decision)) :
      FABL.JuntaNodeDecision.IsCorrect target P z decision
    theorem FABL.JuntaNodeDecision.isCorrect_of_not_isBad
      {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      {decision : FABL.JuntaNodeDecision P}
      (hgood :
        ¬FABL.JuntaNodeDecision.IsBad target P
            z (some decision)) :
      FABL.JuntaNodeDecision.IsCorrect target
        P z decision
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.juntaTreeCallCount :   
    def FABL.juntaTreeCallCount :   
    Exact number of possible node calls in a full binary recursion of depth `k`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.juntaTreeCallCount_zero : FABL.juntaTreeCallCount 0 = 1
    theorem FABL.juntaTreeCallCount_zero :
      FABL.juntaTreeCallCount 0 = 1
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.juntaTreeCallCount_succ (k : ) :
      FABL.juntaTreeCallCount (k + 1) = 1 + 2 * FABL.juntaTreeCallCount k
    theorem FABL.juntaTreeCallCount_succ (k : ) :
      FABL.juntaTreeCallCount (k + 1) =
        1 + 2 * FABL.juntaTreeCallCount k
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.juntaTreeCallCount_pos (k : ) : 0 < FABL.juntaTreeCallCount k
    theorem FABL.juntaTreeCallCount_pos (k : ) :
      0 < FABL.juntaTreeCallCount k
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.juntaTreePerCallFailure (k : )
      (failure : FABL.PositiveLearningParameter) :
      FABL.PositiveLearningParameter
    def FABL.juntaTreePerCallFailure (k : )
      (failure :
        FABL.PositiveLearningParameter) :
      FABL.PositiveLearningParameter
    Divide a total failure budget equally among all possible recursive node calls. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.juntaTreePerCallFailure_value (k : )
      (failure : FABL.PositiveLearningParameter) :
      (FABL.juntaTreePerCallFailure k failure) =
        failure / (FABL.juntaTreeCallCount k)
    theorem FABL.juntaTreePerCallFailure_value (k : )
      (failure :
        FABL.PositiveLearningParameter) :
      (FABL.juntaTreePerCallFailure k
            failure) =
        failure /
          (FABL.juntaTreeCallCount k)
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.juntaTreeCallCount_mul_perCallFailure (k : )
      (failure : FABL.PositiveLearningParameter) :
      (FABL.juntaTreeCallCount k) *
          (FABL.juntaTreePerCallFailure k failure) =
        failure
    theorem FABL.juntaTreeCallCount_mul_perCallFailure
      (k : )
      (failure :
        FABL.PositiveLearningParameter) :
      (FABL.juntaTreeCallCount k) *
          (FABL.juntaTreePerCallFailure k
              failure) =
        failure
    The allocated per-node budgets sum to the requested total budget. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.insertJuntaFixedAssignment {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (i : FABL.JuntaFreeIndex P)
      (value : FABL.Sign) : FABL.JuntaFixedAssignment (insert (↑i) P)
    def FABL.insertJuntaFixedAssignment {n : }
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (i : FABL.JuntaFreeIndex P)
      (value : FABL.Sign) :
      FABL.JuntaFixedAssignment
        (insert (↑i) P)
    Extend a fixed assignment by assigning one currently free coordinate. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.insertJuntaFixedAssignment_apply_new {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (i : FABL.JuntaFreeIndex P)
      (value : FABL.Sign) :
      FABL.insertJuntaFixedAssignment P z i value i,  = value
    theorem FABL.insertJuntaFixedAssignment_apply_new
      {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (i : FABL.JuntaFreeIndex P)
      (value : FABL.Sign) :
      FABL.insertJuntaFixedAssignment P z i
          value i,  =
        value
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.insertJuntaFixedAssignment_apply_old {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (i : FABL.JuntaFreeIndex P)
      (value : FABL.Sign) (j : P) :
      FABL.insertJuntaFixedAssignment P z i value j,  = z j
    theorem FABL.insertJuntaFixedAssignment_apply_old
      {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (i : FABL.JuntaFreeIndex P)
      (value : FABL.Sign) (j : P) :
      FABL.insertJuntaFixedAssignment P z i
          value j,  =
        z j
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.matches_insertJuntaFixedAssignment_iff {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (i : FABL.JuntaFreeIndex P)
      (value : FABL.Sign) (x : FABL.SignCube n) :
      FABL.MatchesJuntaAssignment (insert (↑i) P)
          (FABL.insertJuntaFixedAssignment P z i value) x 
        FABL.MatchesJuntaAssignment P z x  x i = value
    theorem FABL.matches_insertJuntaFixedAssignment_iff
      {n : } (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (i : FABL.JuntaFreeIndex P)
      (value : FABL.Sign)
      (x : FABL.SignCube n) :
      FABL.MatchesJuntaAssignment
          (insert (↑i) P)
          (FABL.insertJuntaFixedAssignment P z
            i value)
          x 
        FABL.MatchesJuntaAssignment P z x 
          x i = value
    Matching an extended assignment means matching the old assignment and the newly fixed
    coordinate. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.F₂DecisionTree.castAvailable.{u_1} {n : } {α : Type u_1}
      {A B : Finset (Fin n)} (h : A = B)
      (tree : FABL.F₂DecisionTree n α A) : FABL.F₂DecisionTree n α B
    def FABL.F₂DecisionTree.castAvailable.{u_1}
      {n : } {α : Type u_1}
      {A B : Finset (Fin n)} (h : A = B)
      (tree : FABL.F₂DecisionTree n α A) :
      FABL.F₂DecisionTree n α B
    Transport only the phantom available-coordinate index of a decision tree. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.F₂DecisionTree.eval_castAvailable.{u_1} {n : } {α : Type u_1}
      {A B : Finset (Fin n)} (h : A = B) (tree : FABL.F₂DecisionTree n α A)
      (x : FABL.F₂Cube n) :
      (FABL.F₂DecisionTree.castAvailable h tree).eval x = tree.eval x
    theorem FABL.F₂DecisionTree.eval_castAvailable.{u_1}
      {n : } {α : Type u_1}
      {A B : Finset (Fin n)} (h : A = B)
      (tree : FABL.F₂DecisionTree n α A)
      (x : FABL.F₂Cube n) :
      (FABL.F₂DecisionTree.castAvailable h
              tree).eval
          x =
        tree.eval x
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.F₂DecisionTree.depth_castAvailable.{u_1} {n : } {α : Type u_1}
      {A B : Finset (Fin n)} (h : A = B)
      (tree : FABL.F₂DecisionTree n α A) :
      (FABL.F₂DecisionTree.castAvailable h tree).depth = tree.depth
    theorem FABL.F₂DecisionTree.depth_castAvailable.{u_1}
      {n : } {α : Type u_1}
      {A B : Finset (Fin n)} (h : A = B)
      (tree : FABL.F₂DecisionTree n α A) :
      (FABL.F₂DecisionTree.castAvailable h
            tree).depth =
        tree.depth
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.assembleJuntaQuery {n : } (P : Finset (Fin n))
      (i : FABL.JuntaFreeIndex P)
      (zeroTree oneTree :
        Option
          (FABL.F₂DecisionTree n FABL.Sign (Finset.univ \ insert (↑i) P))) :
      Option (FABL.F₂DecisionTree n FABL.Sign (Finset.univ \ P))
    def FABL.assembleJuntaQuery {n : }
      (P : Finset (Fin n))
      (i : FABL.JuntaFreeIndex P)
      (zeroTree oneTree :
        Option
          (FABL.F₂DecisionTree n FABL.Sign
            (Finset.univ \ insert (↑i) P))) :
      Option
        (FABL.F₂DecisionTree n FABL.Sign
          (Finset.univ \ P))
    Join two successfully learned child restrictions at their newly fixed coordinate. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.juntaNodeLeafOutput {n : } (P : Finset (Fin n)) :
      Option (FABL.JuntaNodeDecision P) 
        Option (FABL.F₂DecisionTree n FABL.Sign (Finset.univ \ P))
    def FABL.juntaNodeLeafOutput {n : }
      (P : Finset (Fin n)) :
      Option (FABL.JuntaNodeDecision P) 
        Option
          (FABL.F₂DecisionTree n FABL.Sign
            (Finset.univ \ P))
    At zero fuel, retain exactly a returned constant certificate as a leaf. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.recursiveJuntaLearnerAux {n k : }
      (finder : FABL.JuntaRelevantCoordinateFinder n k)
      (failure : FABL.PositiveLearningParameter) (fuel : )
      (P : Finset (Fin n)) :
      FABL.JuntaFixedAssignment P 
        FABL.LearningProgram n FABL.LearningAccess.randomExamples
          (Option (FABL.F₂DecisionTree n FABL.Sign (Finset.univ \ P)))
    def FABL.recursiveJuntaLearnerAux {n k : }
      (finder :
        FABL.JuntaRelevantCoordinateFinder n
          k)
      (failure :
        FABL.PositiveLearningParameter)
      (fuel : ) (P : Finset (Fin n)) :
      FABL.JuntaFixedAssignment P 
        FABL.LearningProgram n
          FABL.LearningAccess.randomExamples
          (Option
            (FABL.F₂DecisionTree n FABL.Sign
              (Finset.univ \ P)))
    Recursive random-example learner for one partial assignment.  A zero branch fixes the sign
    `binarySignEquiv 0 = +1`, while a one branch fixes `binarySignEquiv 1 = -1`; this is the explicit
    bridge from sign restrictions to the additive decision-tree convention. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.emptyJuntaFixedAssignment {n : } : FABL.JuntaFixedAssignment 
    def FABL.emptyJuntaFixedAssignment {n : } :
      FABL.JuntaFixedAssignment 
    The unique assignment on the empty set of fixed coordinates. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.F₂DecisionTree.ComputesJuntaRestriction {n : }
      {P : Finset (Fin n)}
      (tree : FABL.F₂DecisionTree n FABL.Sign (Finset.univ \ P))
      (target : FABL.BooleanFunction n) (z : FABL.JuntaFixedAssignment P) :
      Prop
    def FABL.F₂DecisionTree.ComputesJuntaRestriction
      {n : } {P : Finset (Fin n)}
      (tree :
        FABL.F₂DecisionTree n FABL.Sign
          (Finset.univ \ P))
      (target : FABL.BooleanFunction n)
      (z : FABL.JuntaFixedAssignment P) : Prop
    A partial decision tree computes the target on every input extending its fixed assignment. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.F₂DecisionTree.computesJuntaRestriction_leaf {n : }
      (target : FABL.BooleanFunction n) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (value : FABL.Sign)
      (hconstant : FABL.juntaRestriction target P z = fun x => value) :
      (FABL.F₂DecisionTree.leaf value).ComputesJuntaRestriction target z
    theorem FABL.F₂DecisionTree.computesJuntaRestriction_leaf
      {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (value : FABL.Sign)
      (hconstant :
        FABL.juntaRestriction target P z =
          fun x => value) :
      (FABL.F₂DecisionTree.leaf
            value).ComputesJuntaRestriction
        target z
    A leaf computes a restriction certified to be constant. 
  • defdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    def FABL.JuntaTreeOutputBad {n : } (target : FABL.BooleanFunction n)
      (P : Finset (Fin n)) (z : FABL.JuntaFixedAssignment P) :
      Option (FABL.F₂DecisionTree n FABL.Sign (Finset.univ \ P))  Prop
    def FABL.JuntaTreeOutputBad {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) :
      Option
          (FABL.F₂DecisionTree n FABL.Sign
            (Finset.univ \ P)) 
        Prop
    Failure of the recursive learner is either an explicit `none` or a returned tree that does
    not compute the requested restriction. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.computesJuntaRestriction_of_not_outputBad {n : }
      (target : FABL.BooleanFunction n) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      {tree : FABL.F₂DecisionTree n FABL.Sign (Finset.univ \ P)}
      (hgood : ¬FABL.JuntaTreeOutputBad target P z (some tree)) :
      tree.ComputesJuntaRestriction target z
    theorem FABL.computesJuntaRestriction_of_not_outputBad
      {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      {tree :
        FABL.F₂DecisionTree n FABL.Sign
          (Finset.univ \ P)}
      (hgood :
        ¬FABL.JuntaTreeOutputBad target P z
            (some tree)) :
      tree.ComputesJuntaRestriction target z
    A nonbad successful output carries the advertised semantic guarantee. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.not_outputBad_assembleJuntaQuery {n : }
      (target : FABL.BooleanFunction n) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (i : FABL.JuntaFreeIndex P)
      (zeroTree oneTree :
        Option
          (FABL.F₂DecisionTree n FABL.Sign (Finset.univ \ insert (↑i) P)))
      (hzero :
        ¬FABL.JuntaTreeOutputBad target (insert (↑i) P)
            (FABL.insertJuntaFixedAssignment P z i (FABL.binarySignEquiv 0))
            zeroTree)
      (hone :
        ¬FABL.JuntaTreeOutputBad target (insert (↑i) P)
            (FABL.insertJuntaFixedAssignment P z i (FABL.binarySignEquiv 1))
            oneTree) :
      ¬FABL.JuntaTreeOutputBad target P z
          (FABL.assembleJuntaQuery P i zeroTree oneTree)
    theorem FABL.not_outputBad_assembleJuntaQuery
      {n : }
      (target : FABL.BooleanFunction n)
      (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (i : FABL.JuntaFreeIndex P)
      (zeroTree oneTree :
        Option
          (FABL.F₂DecisionTree n FABL.Sign
            (Finset.univ \ insert (↑i) P)))
      (hzero :
        ¬FABL.JuntaTreeOutputBad target
            (insert (↑i) P)
            (FABL.insertJuntaFixedAssignment P
              z i (FABL.binarySignEquiv 0))
            zeroTree)
      (hone :
        ¬FABL.JuntaTreeOutputBad target
            (insert (↑i) P)
            (FABL.insertJuntaFixedAssignment P
              z i (FABL.binarySignEquiv 1))
            oneTree) :
      ¬FABL.JuntaTreeOutputBad target P z
          (FABL.assembleJuntaQuery P i
            zeroTree oneTree)
    If both recursively learned restrictions are correct, querying their newly fixed coordinate
    produces a correct tree for the parent restriction. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.subset_of_card_sdiff_le_zero {n : } (J P : Finset (Fin n))
      (hcard : (J \ P).card  0) : J  P
    theorem FABL.subset_of_card_sdiff_le_zero {n : }
      (J P : Finset (Fin n))
      (hcard : (J \ P).card  0) : J  P
    If no coordinate of `J` remains outside `P`, then `P` contains all of `J`. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.card_sdiff_insert_le_of_mem_of_notMem {n : }
      (J P : Finset (Fin n)) (i : Fin n) (fuel : ) (hiJ : i  J)
      (hiP : i  P) (hcard : (J \ P).card  fuel + 1) :
      (J \ insert i P).card  fuel
    theorem FABL.card_sdiff_insert_le_of_mem_of_notMem
      {n : } (J P : Finset (Fin n))
      (i : Fin n) (fuel : ) (hiJ : i  J)
      (hiP : i  P)
      (hcard : (J \ P).card  fuel + 1) :
      (J \ insert i P).card  fuel
    Splitting on a relevant coordinate consumes exactly one still-unfixed coordinate from the
    junta witness. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.exists_constant_of_correctNode_of_card_sdiff_le_zero {n : }
      (target : FABL.BooleanFunction n) (J P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (decision : FABL.JuntaNodeDecision P) (hdepends : DependsOn target J)
      (hcard : (J \ P).card  0)
      (hcorrect : FABL.JuntaNodeDecision.IsCorrect target P z decision) :
       value, decision = FABL.JuntaNodeDecision.constant value
    theorem FABL.exists_constant_of_correctNode_of_card_sdiff_le_zero
      {n : }
      (target : FABL.BooleanFunction n)
      (J P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (decision : FABL.JuntaNodeDecision P)
      (hdepends : DependsOn target J)
      (hcard : (J \ P).card  0)
      (hcorrect :
        FABL.JuntaNodeDecision.IsCorrect
          target P z decision) :
       value,
        decision =
          FABL.JuntaNodeDecision.constant
            value
    At zero remaining fuel, a semantically correct node decision cannot request another relevant
    coordinate. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.eventProbability_map_output_eq.{v} {n : }
      {access : FABL.LearningAccess} {α β : Type v}
      (target : FABL.BooleanFunction n)
      (program : FABL.LearningProgram n access α) (output : α  β)
      (bad : β  Prop) :
      ((FABL.LearningProgram.map output program).eventProbability target
          fun outcome => bad outcome.1) =
        program.eventProbability target fun outcome =>
          bad (output outcome.1)
    theorem FABL.eventProbability_map_output_eq.{v}
      {n : } {access : FABL.LearningAccess}
      {α β : Type v}
      (target : FABL.BooleanFunction n)
      (program :
        FABL.LearningProgram n access α)
      (output : α  β) (bad : β  Prop) :
      ((FABL.LearningProgram.map output
              program).eventProbability
          target fun outcome =>
          bad outcome.1) =
        program.eventProbability target
          fun outcome =>
          bad (output outcome.1)
    Mapping a pure output controller pulls an output-only event back along that controller. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.eventProbability_map_output_le.{v} {n : }
      {access : FABL.LearningAccess} {α β : Type v}
      (target : FABL.BooleanFunction n)
      (program : FABL.LearningProgram n access α) (output : α  β)
      (sourceBad : α  Prop) (targetBad : β  Prop)
      (hbad :  (value : α), targetBad (output value)  sourceBad value) :
      ((FABL.LearningProgram.map output program).eventProbability target
          fun outcome => targetBad outcome.1) 
        program.eventProbability target fun outcome => sourceBad outcome.1
    theorem FABL.eventProbability_map_output_le.{v}
      {n : } {access : FABL.LearningAccess}
      {α β : Type v}
      (target : FABL.BooleanFunction n)
      (program :
        FABL.LearningProgram n access α)
      (output : α  β) (sourceBad : α  Prop)
      (targetBad : β  Prop)
      (hbad :
         (value : α),
          targetBad (output value) 
            sourceBad value) :
      ((FABL.LearningProgram.map output
              program).eventProbability
          target fun outcome =>
          targetBad outcome.1) 
        program.eventProbability target
          fun outcome => sourceBad outcome.1
    A pure output map cannot increase failure probability when every mapped failure was already
    a source failure. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.eventProbability_pure_eq_zero_of_not.{u_1} {n : }
      {access : FABL.LearningAccess} {α : Type u_1}
      (target : FABL.BooleanFunction n) (output : α) (bad : α  Prop)
      (hgood : ¬bad output) :
      ((FABL.LearningProgram.pure output).eventProbability target
          fun outcome => bad outcome.1) =
        0
    theorem FABL.eventProbability_pure_eq_zero_of_not.{u_1}
      {n : } {access : FABL.LearningAccess}
      {α : Type u_1}
      (target : FABL.BooleanFunction n)
      (output : α) (bad : α  Prop)
      (hgood : ¬bad output) :
      ((FABL.LearningProgram.pure
              output).eventProbability
          target fun outcome =>
          bad outcome.1) =
        0
    A pure successful continuation has zero probability of an output-only failure event. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.nodeLeafOutput_bad_implies_nodeBad {n : }
      (target : FABL.BooleanFunction n) (J P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) (hdepends : DependsOn target J)
      (hcard : (J \ P).card  0)
      (decision : Option (FABL.JuntaNodeDecision P))
      (hbad :
        FABL.JuntaTreeOutputBad target P z
          (FABL.juntaNodeLeafOutput P decision)) :
      FABL.JuntaNodeDecision.IsBad target P z decision
    theorem FABL.nodeLeafOutput_bad_implies_nodeBad
      {n : }
      (target : FABL.BooleanFunction n)
      (J P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (hdepends : DependsOn target J)
      (hcard : (J \ P).card  0)
      (decision :
        Option (FABL.JuntaNodeDecision P))
      (hbad :
        FABL.JuntaTreeOutputBad target P z
          (FABL.juntaNodeLeafOutput P
            decision)) :
      FABL.JuntaNodeDecision.IsBad target P z
        decision
    At zero fuel, every bad leaf-controller output comes from a bad node decision. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.recursiveJuntaLearnerAux_failureProbability_le {n k : }
      (finder : FABL.JuntaRelevantCoordinateFinder n k)
      (target : FABL.BooleanFunction n) (J : Finset (Fin n))
      (hJcard : J.card  k) (hdepends : DependsOn target J)
      (failure : FABL.PositiveLearningParameter) (fuel : )
      (P : Finset (Fin n)) (z : FABL.JuntaFixedAssignment P) :
      P  J 
        (J \ P).card  fuel 
          ((FABL.recursiveJuntaLearnerAux finder failure fuel P
                  z).eventProbability
              target fun outcome =>
              FABL.JuntaTreeOutputBad target P z outcome.1) 
            (FABL.juntaTreeCallCount fuel) * failure
    theorem FABL.recursiveJuntaLearnerAux_failureProbability_le
      {n k : }
      (finder :
        FABL.JuntaRelevantCoordinateFinder n
          k)
      (target : FABL.BooleanFunction n)
      (J : Finset (Fin n))
      (hJcard : J.card  k)
      (hdepends : DependsOn target J)
      (failure :
        FABL.PositiveLearningParameter)
      (fuel : ) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P) :
      P  J 
        (J \ P).card  fuel 
          ((FABL.recursiveJuntaLearnerAux
                  finder failure fuel P
                  z).eventProbability
              target fun outcome =>
              FABL.JuntaTreeOutputBad target P
                z outcome.1) 
            (FABL.juntaTreeCallCount fuel) *
              failure
    Recursive failure probability before confidence scheduling.  The only probabilistic input is
    the finder guarantee; the factor is exactly the number of possible node calls. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.recursiveJuntaLearnerAux_depth_le {n k : }
      (finder : FABL.JuntaRelevantCoordinateFinder n k)
      (target : FABL.BooleanFunction n)
      (failure : FABL.PositiveLearningParameter) (fuel : )
      (P : Finset (Fin n)) (z : FABL.JuntaFixedAssignment P)
      (outcome :
        Option (FABL.F₂DecisionTree n FABL.Sign (Finset.univ \ P)) ×
          FABL.LearningCost) :
      outcome 
          (FABL.LearningProgram.runWithCost target
              (FABL.recursiveJuntaLearnerAux finder failure fuel P
                z)).support 
         (tree : FABL.F₂DecisionTree n FABL.Sign (Finset.univ \ P)),
          outcome.1 = some tree  tree.depth  fuel
    theorem FABL.recursiveJuntaLearnerAux_depth_le
      {n k : }
      (finder :
        FABL.JuntaRelevantCoordinateFinder n
          k)
      (target : FABL.BooleanFunction n)
      (failure :
        FABL.PositiveLearningParameter)
      (fuel : ) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (outcome :
        Option
            (FABL.F₂DecisionTree n FABL.Sign
              (Finset.univ \ P)) ×
          FABL.LearningCost) :
      outcome 
          (FABL.LearningProgram.runWithCost
              target
              (FABL.recursiveJuntaLearnerAux
                finder failure fuel P
                z)).support 
        
          (tree :
            FABL.F₂DecisionTree n FABL.Sign
              (Finset.univ \ P)),
          outcome.1 = some tree 
            tree.depth  fuel
    Every successful recursive output has depth at most its recursion fuel. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.recursiveJuntaLearnerAux_costProjection_le {n k : }
      (finder : FABL.JuntaRelevantCoordinateFinder n k)
      (target : FABL.BooleanFunction n)
      (failure : FABL.PositiveLearningParameter)
      (projection : FABL.LearningCost  ) (hzero : projection 0 = 0)
      (hadd :
         (first second : FABL.LearningCost),
          projection (first + second) =
            projection first + projection second)
      (bound : )
      (hfinder :
         (P : Finset (Fin n)) (z : FABL.JuntaFixedAssignment P),
          
            outcome 
              (FABL.LearningProgram.runWithCost target
                  (finder.program P z failure)).support,
            projection outcome.2  bound)
      (fuel : ) (P : Finset (Fin n)) (z : FABL.JuntaFixedAssignment P)
      (outcome :
        Option (FABL.F₂DecisionTree n FABL.Sign (Finset.univ \ P)) ×
          FABL.LearningCost) :
      outcome 
          (FABL.LearningProgram.runWithCost target
              (FABL.recursiveJuntaLearnerAux finder failure fuel P
                z)).support 
        projection outcome.2  FABL.juntaTreeCallCount fuel * bound
    theorem FABL.recursiveJuntaLearnerAux_costProjection_le
      {n k : }
      (finder :
        FABL.JuntaRelevantCoordinateFinder n
          k)
      (target : FABL.BooleanFunction n)
      (failure :
        FABL.PositiveLearningParameter)
      (projection : FABL.LearningCost  )
      (hzero : projection 0 = 0)
      (hadd :
         (first second : FABL.LearningCost),
          projection (first + second) =
            projection first +
              projection second)
      (bound : )
      (hfinder :
         (P : Finset (Fin n))
          (z : FABL.JuntaFixedAssignment P),
          
            outcome 
              (FABL.LearningProgram.runWithCost
                  target
                  (finder.program P z
                    failure)).support,
            projection outcome.2  bound)
      (fuel : ) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (outcome :
        Option
            (FABL.F₂DecisionTree n FABL.Sign
              (Finset.univ \ P)) ×
          FABL.LearningCost) :
      outcome 
          (FABL.LearningProgram.runWithCost
              target
              (FABL.recursiveJuntaLearnerAux
                finder failure fuel P
                z)).support 
        projection outcome.2 
          FABL.juntaTreeCallCount fuel * bound
    Any additive natural-valued cost projection accumulates over exactly the possible recursive
    node calls.  This single induction supplies the random-example, query, and local-work bounds. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.recursiveJuntaLearnerAux_randomExamples_le {n k : }
      (finder : FABL.JuntaRelevantCoordinateFinder n k)
      (target : FABL.BooleanFunction n)
      (failure : FABL.PositiveLearningParameter) (fuel : )
      (P : Finset (Fin n)) (z : FABL.JuntaFixedAssignment P)
      (outcome :
        Option (FABL.F₂DecisionTree n FABL.Sign (Finset.univ \ P)) ×
          FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost target
              (FABL.recursiveJuntaLearnerAux finder failure fuel P
                z)).support) :
      outcome.2.randomExamples 
        FABL.juntaTreeCallCount fuel * finder.randomExampleBound failure
    theorem FABL.recursiveJuntaLearnerAux_randomExamples_le
      {n k : }
      (finder :
        FABL.JuntaRelevantCoordinateFinder n
          k)
      (target : FABL.BooleanFunction n)
      (failure :
        FABL.PositiveLearningParameter)
      (fuel : ) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (outcome :
        Option
            (FABL.F₂DecisionTree n FABL.Sign
              (Finset.univ \ P)) ×
          FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost
              target
              (FABL.recursiveJuntaLearnerAux
                finder failure fuel P
                z)).support) :
      outcome.2.randomExamples 
        FABL.juntaTreeCallCount fuel *
          finder.randomExampleBound failure
    Pathwise ambient random-example bound of the recursive learner. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.recursiveJuntaLearnerAux_queries_eq_zero {n k : }
      (finder : FABL.JuntaRelevantCoordinateFinder n k)
      (target : FABL.BooleanFunction n)
      (failure : FABL.PositiveLearningParameter) (fuel : )
      (P : Finset (Fin n)) (z : FABL.JuntaFixedAssignment P)
      (outcome :
        Option (FABL.F₂DecisionTree n FABL.Sign (Finset.univ \ P)) ×
          FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost target
              (FABL.recursiveJuntaLearnerAux finder failure fuel P
                z)).support) :
      outcome.2.queries = 0
    theorem FABL.recursiveJuntaLearnerAux_queries_eq_zero
      {n k : }
      (finder :
        FABL.JuntaRelevantCoordinateFinder n
          k)
      (target : FABL.BooleanFunction n)
      (failure :
        FABL.PositiveLearningParameter)
      (fuel : ) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (outcome :
        Option
            (FABL.F₂DecisionTree n FABL.Sign
              (Finset.univ \ P)) ×
          FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost
              target
              (FABL.recursiveJuntaLearnerAux
                finder failure fuel P
                z)).support) :
      outcome.2.queries = 0
    The recursive learner issues no membership queries. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.recursiveJuntaLearnerAux_work_le {n k : }
      (finder : FABL.JuntaRelevantCoordinateFinder n k)
      (target : FABL.BooleanFunction n)
      (failure : FABL.PositiveLearningParameter) (fuel : )
      (P : Finset (Fin n)) (z : FABL.JuntaFixedAssignment P)
      (outcome :
        Option (FABL.F₂DecisionTree n FABL.Sign (Finset.univ \ P)) ×
          FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost target
              (FABL.recursiveJuntaLearnerAux finder failure fuel P
                z)).support) :
      outcome.2.work 
        FABL.juntaTreeCallCount fuel * finder.workBound failure
    theorem FABL.recursiveJuntaLearnerAux_work_le
      {n k : }
      (finder :
        FABL.JuntaRelevantCoordinateFinder n
          k)
      (target : FABL.BooleanFunction n)
      (failure :
        FABL.PositiveLearningParameter)
      (fuel : ) (P : Finset (Fin n))
      (z : FABL.JuntaFixedAssignment P)
      (outcome :
        Option
            (FABL.F₂DecisionTree n FABL.Sign
              (Finset.univ \ P)) ×
          FABL.LearningCost)
      (houtcome :
        outcome 
          (FABL.LearningProgram.runWithCost
              target
              (FABL.recursiveJuntaLearnerAux
                finder failure fuel P
                z)).support) :
      outcome.2.work 
        FABL.juntaTreeCallCount fuel *
          finder.workBound failure
    Pathwise local-work bound of the recursive learner. 
  • theoremdefined in FABL/Chapter06/LearningAndTesting/JuntaLearningReduction.lean
    complete
    theorem FABL.rootOutput_bad_implies_auxBad {n : }
      (target : FABL.BooleanFunction n)
      (output : Option (FABL.F₂DecisionTree n FABL.Sign (Finset.univ \ )))
      (hbad :
        FABL.JuntaLearnerOutputBad target
          (Option.map (fun tree => FABL.F₂DecisionTree.castAvailable  tree)
            output)) :
      FABL.JuntaTreeOutputBad target  FABL.emptyJuntaFixedAssignment output
    theorem FABL.rootOutput_bad_implies_auxBad {n : }
      (target : FABL.BooleanFunction n)
      (output :
        Option
          (FABL.F₂DecisionTree n FABL.Sign
            (Finset.univ \ )))
      (hbad :
        FABL.JuntaLearnerOutputBad target
          (Option.map
            (fun tree =>
              FABL.F₂DecisionTree.castAvailable
                 tree)
            output)) :
      FABL.JuntaTreeOutputBad target 
        FABL.emptyJuntaFixedAssignment output
    A bad root output after the phantom-index cast was already a bad output of the empty
    restriction recursion.