Analysis of Boolean Functions in Lean

7.5. Exercises and notes🔗

Lemma7.5.1
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 1used by 0L∃∀N

Exercise 7.1. From an r-query local tester with rejection rate \lambda, construct, for 0<\epsilon,\delta\le1/2, a nonadaptive tester making O\!\left(\frac{r\log(1/\delta)}{\lambda\epsilon}\right) queries which accepts every member of the property and accepts every \epsilon-far input with probability at most \delta.

Lean code for Lemma7.5.16 declarations
  • defdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    def FABL.repeatAllTranscriptAccept.{u, v} {Domain : Type u}
      {Codomain : Type v} {r k : }
      (T : FABL.NonadaptiveFunctionTester Domain Codomain r)
      (seed : Fin k  T.Seed) (values : Fin (k * r)  Option Codomain) :
      Bool
    def FABL.repeatAllTranscriptAccept.{u, v}
      {Domain : Type u} {Codomain : Type v}
      {r k : }
      (T :
        FABL.NonadaptiveFunctionTester Domain
          Codomain r)
      (seed : Fin k  T.Seed)
      (values :
        Fin (k * r)  Option Codomain) :
      Bool
  • defdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    def FABL.repeatAndFunctionTester.{u, v} {Domain : Type u}
      {Codomain : Type v} {r : }
      (T : FABL.NonadaptiveFunctionTester Domain Codomain r) (k : ) :
      FABL.NonadaptiveFunctionTester Domain Codomain (k * r)
    def FABL.repeatAndFunctionTester.{u, v}
      {Domain : Type u} {Codomain : Type v}
      {r : }
      (T :
        FABL.NonadaptiveFunctionTester Domain
          Codomain r)
      (k : ) :
      FABL.NonadaptiveFunctionTester Domain
        Codomain (k * r)
    Run `k` independent copies of a nonadaptive tester and accept only if every copy accepts.
    The query slots are the explicit product `Fin k × Fin r ≃ Fin (k*r)`. 
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.repeatAndFunctionTester_acceptanceProbability.{u, v}
      {Domain : Type u} {Codomain : Type v} {r k : }
      (T : FABL.NonadaptiveFunctionTester Domain Codomain r)
      (f : Domain  Codomain) :
      (FABL.repeatAndFunctionTester T k).acceptanceProbability f =
        T.acceptanceProbability f ^ k
    theorem FABL.repeatAndFunctionTester_acceptanceProbability.{u,
        v}
      {Domain : Type u} {Codomain : Type v}
      {r k : }
      (T :
        FABL.NonadaptiveFunctionTester Domain
          Codomain r)
      (f : Domain  Codomain) :
      (FABL.repeatAndFunctionTester T
              k).acceptanceProbability
          f =
        T.acceptanceProbability f ^ k
    Independent repetition raises the original acceptance probability to the `k`th power. 
  • defdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    def FABL.amplificationRepetitions (rate ε δ : ) : 
    def FABL.amplificationRepetitions
      (rate ε δ : ) : 
    The explicit number of repetitions used in Exercise 7.1. 
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.amplificationRepetitions_queryBound {rate ε δ : }
      (hrate : 0 < rate) ( : 0 < ε) ( : δ  Set.Ioc 0 (1 / 2)) (r : ) :
      (FABL.amplificationRepetitions rate ε δ * r) 
        (Real.log (1 / δ) / (rate * ε) + 1) * r
    theorem FABL.amplificationRepetitions_queryBound
      {rate ε δ : } (hrate : 0 < rate)
      ( : 0 < ε)
      ( : δ  Set.Ioc 0 (1 / 2)) (r : ) :
      (FABL.amplificationRepetitions rate ε
              δ *
            r) 
        (Real.log (1 / δ) / (rate * ε) + 1) *
          r
    The ceiling choice has the advertised logarithmic query bound. 
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.repeatAndFunctionTester_amplifies.{u, v} {Domain : Type u}
      {Codomain : Type v} [Fintype Domain] [Nonempty Domain]
      [DecidableEq Codomain] {r : }
      (T : FABL.NonadaptiveFunctionTester Domain Codomain r)
      (P : (Domain  Codomain)  Prop) {rate ε δ : }
      (hT : FABL.IsLocalTester T P rate) ( : ε  Set.Ioc 0 (1 / 2))
      ( : δ  Set.Ioc 0 (1 / 2)) :
      (∀ (f : Domain  Codomain),
          P f 
            (FABL.repeatAndFunctionTester T
                    (FABL.amplificationRepetitions rate ε
                      δ)).acceptanceProbability
                f =
              1) 
         (f : Domain  Codomain),
          (∀ (g : Domain  Codomain), P g  FABL.IsFar ε f g) 
            (FABL.repeatAndFunctionTester T
                    (FABL.amplificationRepetitions rate ε
                      δ)).acceptanceProbability
                f 
              δ
    theorem FABL.repeatAndFunctionTester_amplifies.{u,
        v}
      {Domain : Type u} {Codomain : Type v}
      [Fintype Domain] [Nonempty Domain]
      [DecidableEq Codomain] {r : }
      (T :
        FABL.NonadaptiveFunctionTester Domain
          Codomain r)
      (P : (Domain  Codomain)  Prop)
      {rate ε δ : }
      (hT : FABL.IsLocalTester T P rate)
      ( : ε  Set.Ioc 0 (1 / 2))
      ( : δ  Set.Ioc 0 (1 / 2)) :
      (∀ (f : Domain  Codomain),
          P f 
            (FABL.repeatAndFunctionTester T
                    (FABL.amplificationRepetitions
                      rate ε
                      δ)).acceptanceProbability
                f =
              1) 
         (f : Domain  Codomain),
          (∀ (g : Domain  Codomain),
              P g  FABL.IsFar ε f g) 
            (FABL.repeatAndFunctionTester T
                    (FABL.amplificationRepetitions
                      rate ε
                      δ)).acceptanceProbability
                f 
              δ
    Exercise 7.1: the explicit ceiling-log repetition accepts property members perfectly and
    accepts every `ε`-far function with probability at most `δ`, using exactly `k*r` queries. 
Lemma7.5.2
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 1used by 0L∃∀N

Exercise 7.2. The equality property \mathcal M=\{(x,y)\in\{0,1\}^{2n}:x=y\} has a 2-query local tester with rejection rate 1.

Lean code for Lemma7.5.27 declarations
  • defdefined in FABL/Chapter07/TestingExercises.lean
    complete
    def FABL.equalityPairIndex {n : } (i : Fin n) (side : Fin 2) : Fin (n * 2)
    def FABL.equalityPairIndex {n : } (i : Fin n)
      (side : Fin 2) : Fin (n * 2)
    The two coordinates in the `i`th pair of a length-`2n` word. 
  • defdefined in FABL/Chapter07/TestingExercises.lean
    complete
    def FABL.IsEqualPairString {n : } (w : Fin (n * 2)  Bool) : Prop
    def FABL.IsEqualPairString {n : }
      (w : Fin (n * 2)  Bool) : Prop
    Exercise 7.2's equality property on the two length-`n` halves of a word. 
  • defdefined in FABL/Chapter07/TestingExercises.lean
    complete
    def FABL.equalityPairStringTester (n : ) [NeZero n] :
      FABL.NonadaptiveStringTester Bool (n * 2) 2
    def FABL.equalityPairStringTester (n : )
      [NeZero n] :
      FABL.NonadaptiveStringTester Bool
        (n * 2) 2
    The two-query equality tester samples one pair and compares its two entries. 
  • theoremdefined in FABL/Chapter07/TestingExercises.lean
    complete
    theorem FABL.equalityPairStringTester_rejectionProbability {n : } [NeZero n]
      (w : Fin (n * 2)  Bool) :
      FABL.NonadaptiveFunctionTester.rejectionProbability
          (FABL.equalityPairStringTester n) w =
        FABL.uniformProbability fun i =>
          w (FABL.equalityPairIndex i 0)  w (FABL.equalityPairIndex i 1)
    theorem FABL.equalityPairStringTester_rejectionProbability
      {n : } [NeZero n]
      (w : Fin (n * 2)  Bool) :
      FABL.NonadaptiveFunctionTester.rejectionProbability
          (FABL.equalityPairStringTester n)
          w =
        FABL.uniformProbability fun i =>
          w (FABL.equalityPairIndex i 0) 
            w (FABL.equalityPairIndex i 1)
    Rejection is exactly the density of unequal pairs. 
  • defdefined in FABL/Chapter07/TestingExercises.lean
    complete
    def FABL.equalityPairRepair {n : } (w : Fin (n * 2)  Bool) :
      Fin (n * 2)  Bool
    def FABL.equalityPairRepair {n : }
      (w : Fin (n * 2)  Bool) :
      Fin (n * 2)  Bool
    Repair a word by copying the first entry of each pair to its second entry. 
  • theoremdefined in FABL/Chapter07/TestingExercises.lean
    complete
    theorem FABL.two_mul_relativeHammingDist_equalityPairRepair {n : } [NeZero n]
      (w : Fin (n * 2)  Bool) :
      2 * FABL.relativeHammingDist w (FABL.equalityPairRepair w) =
        FABL.uniformProbability fun i =>
          w (FABL.equalityPairIndex i 0)  w (FABL.equalityPairIndex i 1)
    theorem FABL.two_mul_relativeHammingDist_equalityPairRepair
      {n : } [NeZero n]
      (w : Fin (n * 2)  Bool) :
      2 *
          FABL.relativeHammingDist w
            (FABL.equalityPairRepair w) =
        FABL.uniformProbability fun i =>
          w (FABL.equalityPairIndex i 0) 
            w (FABL.equalityPairIndex i 1)
    Repairing changes exactly one coordinate in every unequal pair. 
  • theoremdefined in FABL/Chapter07/TestingExercises.lean
    complete
    theorem FABL.equalityPairStringTester_isLocalTester {n : } [NeZero n] :
      FABL.IsLocalStringTester (FABL.equalityPairStringTester n)
        FABL.IsEqualPairString 1
    theorem FABL.equalityPairStringTester_isLocalTester
      {n : } [NeZero n] :
      FABL.IsLocalStringTester
        (FABL.equalityPairStringTester n)
        FABL.IsEqualPairString 1
    Exercise 7.2: equality of two length-`n` Boolean strings has a two-query local tester
    with rejection rate one. 
Lemma7.5.3
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 1used by 0L∃∀N

Exercise 7.3. For n\ge2, reduce the proof length in Example 7.15 from n-1 to n-2, retaining three queries and a positive universal rejection rate. The dimensions n<2 are treated separately.

Lean code for Lemma7.5.37 declarations
  • defdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    def FABL.extendProofWithFinalTrue {m : } (proof : Fin m  Bool) :
      Fin (m + 1)  Bool
    def FABL.extendProofWithFinalTrue {m : }
      (proof : Fin m  Bool) :
      Fin (m + 1)  Bool
    Extend a length-`m` proof by the final parity bit `true`. 
  • defdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    def FABL.omitFinalTrueProofQuery {m : }
      (query : Option (Fin (m + 2)  Fin (m + 1))) :
      Option (Fin (m + 2)  Fin m)
    def FABL.omitFinalTrueProofQuery {m : }
      (query :
        Option (Fin (m + 2)  Fin (m + 1))) :
      Option (Fin (m + 2)  Fin m)
    Omit a query to the final proof coordinate, which Exercise 7.3 hardwires to `true`. 
  • defdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    def FABL.restoreFinalTrueProofValue {m : }
      (query : Option (Fin (m + 2)  Fin (m + 1))) (value : Option Bool) :
      Option Bool
    def FABL.restoreFinalTrueProofValue {m : }
      (query :
        Option (Fin (m + 2)  Fin (m + 1)))
      (value : Option Bool) : Option Bool
    Restore the hardwired `true` answer when simulating the original verifier. 
  • defdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    def FABL.oddWeightShortProofPCPPSystem (m : ) :
      FABL.PCPPSystem Bool (m + 2) m 3
    def FABL.oddWeightShortProofPCPPSystem
      (m : ) :
      FABL.PCPPSystem Bool (m + 2) m 3
    Exercise 7.3's verifier removes the redundant final proof bit from Example 7.15. 
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.oddWeightShortProofPCPPSystem_acceptanceProbability {m : }
      (w : Fin (m + 2)  Bool) (proof : Fin m  Bool) :
      (FABL.oddWeightShortProofPCPPSystem m).acceptanceProbability w proof =
        (FABL.oddWeightPartialSumPCPPSystem m).acceptanceProbability w
          (FABL.extendProofWithFinalTrue proof)
    theorem FABL.oddWeightShortProofPCPPSystem_acceptanceProbability
      {m : } (w : Fin (m + 2)  Bool)
      (proof : Fin m  Bool) :
      (FABL.oddWeightShortProofPCPPSystem
              m).acceptanceProbability
          w proof =
        (FABL.oddWeightPartialSumPCPPSystem
              m).acceptanceProbability
          w
          (FABL.extendProofWithFinalTrue
            proof)
    Removing the final proof bit preserves the verifier's acceptance probability. 
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.oddWeightShortProofPCPPSystem_rejectionProbability {m : }
      (w : Fin (m + 2)  Bool) (proof : Fin m  Bool) :
      (FABL.oddWeightShortProofPCPPSystem m).rejectionProbability w proof =
        (FABL.oddWeightPartialSumPCPPSystem m).rejectionProbability w
          (FABL.extendProofWithFinalTrue proof)
    theorem FABL.oddWeightShortProofPCPPSystem_rejectionProbability
      {m : } (w : Fin (m + 2)  Bool)
      (proof : Fin m  Bool) :
      (FABL.oddWeightShortProofPCPPSystem
              m).rejectionProbability
          w proof =
        (FABL.oddWeightPartialSumPCPPSystem
              m).rejectionProbability
          w
          (FABL.extendProofWithFinalTrue
            proof)
    Removing the final proof bit also preserves rejection probability. 
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.oddWeightShortProofPCPPSystem_isPCPP (m : ) :
      FABL.IsPCPP (FABL.oddWeightShortProofPCPPSystem m)
        FABL.IsOddWeightString 1
    theorem FABL.oddWeightShortProofPCPPSystem_isPCPP
      (m : ) :
      FABL.IsPCPP
        (FABL.oddWeightShortProofPCPPSystem m)
        FABL.IsOddWeightString 1
    Exercise 7.3: for every `n = m+2 ≥ 2`, odd weight has a three-query PCPP whose
    proof length is exactly `m = n-2`. 
Lemma7.5.4
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 1used by 0L∃∀N

Exercise 7.4. If a Boolean string has relative distance \epsilon from \{0^n,1^n\}, prove that the tester which compares two independent uniform coordinates rejects with probability \frac12-\frac12(1-2\epsilon)^2\ge\epsilon.

Lean code for Lemma7.5.43 declarations
  • defdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    def FABL.allEqualStringDistance {n : } [NeZero n] (w : Fin n  Bool) : 
    def FABL.allEqualStringDistance {n : }
      [NeZero n] (w : Fin n  Bool) : 
    Relative distance of a Boolean string from the two constant strings. 
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.allEqualStringTester_rejectionProbability_eq_distanceFormula
      {n : } [NeZero n] (w : Fin n  Bool) :
      FABL.NonadaptiveFunctionTester.rejectionProbability
          (FABL.allEqualStringTester n) w =
        1 / 2 - 1 / 2 * (1 - 2 * FABL.allEqualStringDistance w) ^ 2
    theorem FABL.allEqualStringTester_rejectionProbability_eq_distanceFormula
      {n : } [NeZero n] (w : Fin n  Bool) :
      FABL.NonadaptiveFunctionTester.rejectionProbability
          (FABL.allEqualStringTester n) w =
        1 / 2 -
          1 / 2 *
            (1 -
                2 *
                  FABL.allEqualStringDistance
                    w) ^
              2
    The all-equal tester rejects a string at distance `ε` with the exact probability
    `1/2 - (1/2)(1 - 2ε)^2`. 
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.allEqualStringDistance_le_rejectionProbability {n : } [NeZero n]
      (w : Fin n  Bool) :
      FABL.allEqualStringDistance w 
        FABL.NonadaptiveFunctionTester.rejectionProbability
          (FABL.allEqualStringTester n) w
    theorem FABL.allEqualStringDistance_le_rejectionProbability
      {n : } [NeZero n] (w : Fin n  Bool) :
      FABL.allEqualStringDistance w 
        FABL.NonadaptiveFunctionTester.rejectionProbability
          (FABL.allEqualStringTester n) w
    Exercise 7.4: the exact rejection probability of the all-equal tester is at least the
    relative distance from the all-equal property. 
Lemma7.5.5
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Definition 7.2.1
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 7.5. If an (n-1)-query tester accepts every odd-weight Boolean string with probability 1, then it accepts every Boolean string with probability 1. Consequently any local tester for the odd-weight property with perfect completeness must query all n bits.

Lean code for Lemma7.5.51 theorem
  • theoremdefined in FABL/Chapter07/PCPPConstructions.lean
    complete
    theorem FABL.oddWeightString_no_localTester_of_queries_lt {n r : } [NeZero n]
      (T : FABL.NonadaptiveStringTester Bool n r) (hr : r < n) (rate : ) :
      ¬FABL.IsLocalStringTester T FABL.IsOddWeightString rate
    theorem FABL.oddWeightString_no_localTester_of_queries_lt
      {n r : } [NeZero n]
      (T :
        FABL.NonadaptiveStringTester Bool n r)
      (hr : r < n) (rate : ) :
      ¬FABL.IsLocalStringTester T
          FABL.IsOddWeightString rate
    Exercise 7.5: in the finite nonadaptive model, every local tester for odd Hamming weight must
    have at least `n` query slots. 
Lemma7.5.6
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Definition 7.1.1
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 7.6. Any 2-query tester which accepts every dictator with probability 1 also accepts, with probability 1, every odd-arity majority \operatorname{Maj}_{n'} with odd n'\le n, embedded by ignoring the remaining coordinates. Thus no 2-query dictatorship local tester exists when n>2.

Lean code for Lemma7.5.62 declarations
  • defdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    def FABL.embeddedMajority (n' n : ) (h : n'  n) : FABL.BooleanFunction n
    def FABL.embeddedMajority (n' n : )
      (h : n'  n) : FABL.BooleanFunction n
    Embed a smaller majority into the first `n'` coordinates of the `n`-cube. 
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.twoQueryTester_accepts_embeddedOddMajority {n : }
      (T : FABL.NonadaptiveFunctionTester (FABL.SignCube n) FABL.Sign 2)
      (hcomplete :
         (i : Fin n), T.acceptanceProbability (FABL.dictator i) = 1)
      {d : } (hd : Odd d) (h : d  n) :
      T.acceptanceProbability (FABL.embeddedMajority d n h) = 1
    theorem FABL.twoQueryTester_accepts_embeddedOddMajority
      {n : }
      (T :
        FABL.NonadaptiveFunctionTester
          (FABL.SignCube n) FABL.Sign 2)
      (hcomplete :
         (i : Fin n),
          T.acceptanceProbability
              (FABL.dictator i) =
            1)
      {d : } (hd : Odd d) (h : d  n) :
      T.acceptanceProbability
          (FABL.embeddedMajority d n h) =
        1
    Exercise 7.6: every two-query tester with perfect dictator completeness also accepts every
    odd majority embedded in the tested cube. 
Lemma7.5.7
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 1used by 1L∃∀N

Exercise 7.7. For every \alpha<1, there is no (\alpha,1) Dictator-vs.-No-Notables test using only Max-E3-Lin predicates.

Lean code for Lemma7.5.72 declarations
  • defdefined in FABL/Chapter07/HastadLimitations.lean
    complete
    def FABL.e3LinCheckSignedValue {n : } (C : FABL.SignQueryCheck n)
      (f : FABL.BooleanFunction n) : 
    def FABL.e3LinCheckSignedValue {n : }
      (C : FABL.SignQueryCheck n)
      (f : FABL.BooleanFunction n) : 
    Twice the Boolean acceptance value of a check, shifted to the sign interval. 
  • theoremdefined in FABL/Chapter07/HastadLimitations.lean
    complete
    theorem FABL.no_maxE3Lin_dictatorVsNoNotables_of_perfectCompleteness (alpha : )
      (halpha : alpha < 1) :
      ¬ error T,
          FABL.IsDictatorVsNoNotablesTest FABL.maxE3LinPredicates alpha 1
            error T
    theorem FABL.no_maxE3Lin_dictatorVsNoNotables_of_perfectCompleteness
      (alpha : ) (halpha : alpha < 1) :
      ¬ error T,
          FABL.IsDictatorVsNoNotablesTest
            FABL.maxE3LinPredicates alpha 1
            error T
    Exercise 7.7: no Max-E3-Lin Dictator-vs.-No-Notables test can have perfect dictator
    completeness with a soundness threshold strictly below one. 
Lemma7.5.8
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Definition 7.1.6
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 7.8.

(a) If \chi_S is a parity on k=|S| coordinates, its AND-Test acceptance probability is p_k=\frac12+ \left(\frac34-\frac14(-1)^k\right)2^{-k}. Hence p_0=p_1=1 and p_k\le1/2+2^{-k} for k\ge2.

(b) A suitable mixture of the Odd BLR Test and the AND Test is a 3-query local tester for dictatorship with a positive universal rejection rate.

Lean code for Lemma7.5.833 declarations
  • defdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    def FABL.signAnd (a b : FABL.Sign) : FABL.Sign
    def FABL.signAnd (a b : FABL.Sign) : FABL.Sign
    Boolean AND on signs, in the book's convention `-1 = True`. 
  • defdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    def FABL.signCubeAnd {n : } (x y : FABL.SignCube n) : FABL.SignCube n
    def FABL.signCubeAnd {n : }
      (x y : FABL.SignCube n) :
      FABL.SignCube n
    Coordinatewise AND of two sign-cube inputs. 
  • defdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    def FABL.signAndTranscriptAccept (values : Fin 3  Option FABL.Sign) : Bool
    def FABL.signAndTranscriptAccept
      (values : Fin 3  Option FABL.Sign) :
      Bool
  • defdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    def FABL.signAndFunctionTester (n : ) :
      FABL.NonadaptiveFunctionTester (FABL.SignCube n) FABL.Sign 3
    def FABL.signAndFunctionTester (n : ) :
      FABL.NonadaptiveFunctionTester
        (FABL.SignCube n) FABL.Sign 3
    Exercise 7.8's three-query AND test. 
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.signAndFunctionTester_acceptanceProbability {n : }
      (f : FABL.BooleanFunction n) :
      (FABL.signAndFunctionTester n).acceptanceProbability f =
        Finset.univ.expect fun x =>
          Finset.univ.expect fun y =>
            if FABL.signAnd (f x) (f y) = f (FABL.signCubeAnd x y) then 1
            else 0
    theorem FABL.signAndFunctionTester_acceptanceProbability
      {n : } (f : FABL.BooleanFunction n) :
      (FABL.signAndFunctionTester
              n).acceptanceProbability
          f =
        Finset.univ.expect fun x =>
          Finset.univ.expect fun y =>
            if
                FABL.signAnd (f x) (f y) =
                  f
                    (FABL.signCubeAnd x
                      y) then
              1
            else 0
    Operational semantics of the AND test as a double uniform expectation. 
  • defdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    def FABL.parityAndAcceptanceProbability (k : ) : 
    def FABL.parityAndAcceptanceProbability
      (k : ) : 
    The exact acceptance probability `p_k` from Exercise 7.8(a). 
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.signAndFunctionTester_parity_acceptanceProbability {n : }
      (S : Finset (Fin n)) :
      (FABL.signAndFunctionTester n).acceptanceProbability
          (FABL.parityFunction S) =
        FABL.parityAndAcceptanceProbability S.card
    theorem FABL.signAndFunctionTester_parity_acceptanceProbability
      {n : } (S : Finset (Fin n)) :
      (FABL.signAndFunctionTester
              n).acceptanceProbability
          (FABL.parityFunction S) =
        FABL.parityAndAcceptanceProbability
          S.card
    Exercise 7.8(a): the AND test accepts a parity on `S` with probability
    `p_|S| = 1/2 + (3/4 - (1/4)(-1)^|S|) 2^{-|S|}`. 
  • defdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    def FABL.pcppBoolCubeSignEquiv (n : ) : (Fin n  Bool)  FABL.SignCube n
    def FABL.pcppBoolCubeSignEquiv (n : ) :
      (Fin n  Bool)  FABL.SignCube n
    The coordinatewise Bool-to-sign equivalence used to state Exercise 7.8(a) on its book domain. 
  • defdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    def FABL.boolCubeAnd {n : } (x y : Fin n  Bool) : Fin n  Bool
    def FABL.boolCubeAnd {n : }
      (x y : Fin n  Bool) : Fin n  Bool
    Coordinatewise Boolean AND on the book's `{0,1}^n` domain. 
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.pcppBoolSignEquiv_boolAnd (a b : Bool) :
      FABL.pcppBoolSignEquiv (a && b) =
        FABL.signAnd (FABL.pcppBoolSignEquiv a) (FABL.pcppBoolSignEquiv b)
    theorem FABL.pcppBoolSignEquiv_boolAnd
      (a b : Bool) :
      FABL.pcppBoolSignEquiv (a && b) =
        FABL.signAnd
          (FABL.pcppBoolSignEquiv a)
          (FABL.pcppBoolSignEquiv b)
    The explicit Bool/sign bridge carries Boolean AND to sign AND. 
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.pcppBoolCubeSignEquiv_boolCubeAnd {n : } (x y : Fin n  Bool) :
      (FABL.pcppBoolCubeSignEquiv n) (FABL.boolCubeAnd x y) =
        FABL.signCubeAnd ((FABL.pcppBoolCubeSignEquiv n) x)
          ((FABL.pcppBoolCubeSignEquiv n) y)
    theorem FABL.pcppBoolCubeSignEquiv_boolCubeAnd
      {n : } (x y : Fin n  Bool) :
      (FABL.pcppBoolCubeSignEquiv n)
          (FABL.boolCubeAnd x y) =
        FABL.signCubeAnd
          ((FABL.pcppBoolCubeSignEquiv n) x)
          ((FABL.pcppBoolCubeSignEquiv n) y)
    The coordinatewise Bool/sign bridge commutes with cube AND. 
  • defdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    def FABL.boolParityFunction {n : } (S : Finset (Fin n)) :
      (Fin n  Bool)  Bool
    def FABL.boolParityFunction {n : }
      (S : Finset (Fin n)) :
      (Fin n  Bool)  Bool
    Boolean parity transported explicitly from the established sign-cube parity. 
  • defdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    def FABL.boolAndTranscriptAccept (values : Fin 3  Option Bool) : Bool
    def FABL.boolAndTranscriptAccept
      (values : Fin 3  Option Bool) : Bool
  • defdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    def FABL.boolAndFunctionTester (n : ) :
      FABL.NonadaptiveFunctionTester (Fin n  Bool) Bool 3
    def FABL.boolAndFunctionTester (n : ) :
      FABL.NonadaptiveFunctionTester
        (Fin n  Bool) Bool 3
    The AND test on the exact Boolean domain of Exercise 7.8(a). 
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.boolAndFunctionTester_acceptanceProbability {n : }
      (f : (Fin n  Bool)  Bool) :
      (FABL.boolAndFunctionTester n).acceptanceProbability f =
        Finset.univ.expect fun x =>
          Finset.univ.expect fun y =>
            if (f x && f y) = f (FABL.boolCubeAnd x y) then 1 else 0
    theorem FABL.boolAndFunctionTester_acceptanceProbability
      {n : } (f : (Fin n  Bool)  Bool) :
      (FABL.boolAndFunctionTester
              n).acceptanceProbability
          f =
        Finset.univ.expect fun x =>
          Finset.univ.expect fun y =>
            if
                (f x && f y) =
                  f
                    (FABL.boolCubeAnd x
                      y) then
              1
            else 0
    Operational semantics of the Boolean-domain AND test. 
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.boolAndFunctionTester_parity_acceptanceProbability {n : }
      (S : Finset (Fin n)) :
      (FABL.boolAndFunctionTester n).acceptanceProbability
          (FABL.boolParityFunction S) =
        FABL.parityAndAcceptanceProbability S.card
    theorem FABL.boolAndFunctionTester_parity_acceptanceProbability
      {n : } (S : Finset (Fin n)) :
      (FABL.boolAndFunctionTester
              n).acceptanceProbability
          (FABL.boolParityFunction S) =
        FABL.parityAndAcceptanceProbability
          S.card
    Exercise 7.8(a) on the book's Boolean domain, obtained through the explicit sign bridge. 
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.parityAndAcceptanceProbability_zero :
      FABL.parityAndAcceptanceProbability 0 = 1
    theorem FABL.parityAndAcceptanceProbability_zero :
      FABL.parityAndAcceptanceProbability 0 =
        1
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.parityAndAcceptanceProbability_one :
      FABL.parityAndAcceptanceProbability 1 = 1
    theorem FABL.parityAndAcceptanceProbability_one :
      FABL.parityAndAcceptanceProbability 1 =
        1
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.parityAndAcceptanceProbability_le_twoPowInv {k : } (_hk : 2  k) :
      FABL.parityAndAcceptanceProbability k  1 / 2 + (2 ^ k)⁻¹
    theorem FABL.parityAndAcceptanceProbability_le_twoPowInv
      {k : } (_hk : 2  k) :
      FABL.parityAndAcceptanceProbability k 
        1 / 2 + (2 ^ k)⁻¹
    For every `k ≥ 2`, the parity acceptance probability is at most `1/2 + 2^{-k}`. 
  • defdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    def FABL.oddBLREquationTranscriptAccept (rhs : FABL.Sign)
      (values : Fin 3  Option FABL.Sign) : Bool
    def FABL.oddBLREquationTranscriptAccept
      (rhs : FABL.Sign)
      (values : Fin 3  Option FABL.Sign) :
      Bool
    Odd BLR's three queried values must multiply to its random right-hand side. 
  • defdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    def FABL.oddBLREquationFunctionTester (n : ) :
      FABL.NonadaptiveFunctionTester (FABL.SignCube n) FABL.Sign 3
    def FABL.oddBLREquationFunctionTester
      (n : ) :
      FABL.NonadaptiveFunctionTester
        (FABL.SignCube n) FABL.Sign 3
    The Odd BLR test in the common nonadaptive-tester model used by Chapter 7.1. 
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.oddBLREquationFunctionTester_acceptanceProbability {n : }
      (f : FABL.BooleanFunction n) :
      (FABL.oddBLREquationFunctionTester n).acceptanceProbability f =
        Finset.univ.expect fun x =>
          Finset.univ.expect fun y =>
            Finset.univ.expect fun b =>
              if f x * f y * f (FABL.scaledPointwiseProduct b x y) = b then
                1
              else 0
    theorem FABL.oddBLREquationFunctionTester_acceptanceProbability
      {n : } (f : FABL.BooleanFunction n) :
      (FABL.oddBLREquationFunctionTester
              n).acceptanceProbability
          f =
        Finset.univ.expect fun x =>
          Finset.univ.expect fun y =>
            Finset.univ.expect fun b =>
              if
                  f x * f y *
                      f
                        (FABL.scaledPointwiseProduct
                          b x y) =
                    b then
                1
              else 0
    Operational semantics of Odd BLR as three nested uniform expectations. 
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.oddBLREquationFunctionTester_eq_oddBLRAcceptanceProbability {n : }
      (f : FABL.BooleanFunction n) :
      (FABL.oddBLREquationFunctionTester n).acceptanceProbability f =
        FABL.oddBLRAcceptanceProbability
          (FABL.BoundedCubeFunction.ofBoolean f)
    theorem FABL.oddBLREquationFunctionTester_eq_oddBLRAcceptanceProbability
      {n : } (f : FABL.BooleanFunction n) :
      (FABL.oddBLREquationFunctionTester
              n).acceptanceProbability
          f =
        FABL.oddBLRAcceptanceProbability
          (FABL.BoundedCubeFunction.ofBoolean
            f)
    The nonadaptive Odd BLR tester has exactly the acceptance semantics analyzed in
    `HastadTests`. 
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.oddBLRAcceptanceProbability_eq_one_iff_oddParity {n : }
      (f : FABL.BooleanFunction n) :
      FABL.oddBLRAcceptanceProbability
            (FABL.BoundedCubeFunction.ofBoolean f) =
          1 
         S, Odd S.card  f = FABL.parityFunction S
    theorem FABL.oddBLRAcceptanceProbability_eq_one_iff_oddParity
      {n : } (f : FABL.BooleanFunction n) :
      FABL.oddBLRAcceptanceProbability
            (FABL.BoundedCubeFunction.ofBoolean
              f) =
          1 
         S,
          Odd S.card 
            f = FABL.parityFunction S
    Odd BLR has perfect acceptance exactly on odd parities. 
  • defdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    def FABL.oddBLRAndAndFunctionTester (n : ) :
      FABL.NonadaptiveFunctionTester (FABL.SignCube n) FABL.Sign 3
    def FABL.oddBLRAndAndFunctionTester (n : ) :
      FABL.NonadaptiveFunctionTester
        (FABL.SignCube n) FABL.Sign 3
    The three-query tester obtained by choosing Odd BLR or AND with equal probability. 
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.oddBLRAndAndFunctionTester_acceptanceProbability_eq_one_iff {n : }
      (f : FABL.BooleanFunction n) :
      (FABL.oddBLRAndAndFunctionTester n).acceptanceProbability f = 1 
        FABL.IsDictator f
    theorem FABL.oddBLRAndAndFunctionTester_acceptanceProbability_eq_one_iff
      {n : } (f : FABL.BooleanFunction n) :
      (FABL.oddBLRAndAndFunctionTester
                n).acceptanceProbability
            f =
          1 
        FABL.IsDictator f
    The Odd-BLR/AND mixture has perfect acceptance exactly on positive dictators. 
  • defdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    def FABL.nonDictatorBooleanFunctions (n : ) :
      Finset (FABL.BooleanFunction n)
    def FABL.nonDictatorBooleanFunctions (n : ) :
      Finset (FABL.BooleanFunction n)
    The finite family of Boolean functions that are not positive dictators. 
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.nonDictatorBooleanFunctions_nonempty (n : ) :
      (FABL.nonDictatorBooleanFunctions n).Nonempty
    theorem FABL.nonDictatorBooleanFunctions_nonempty
      (n : ) :
      (FABL.nonDictatorBooleanFunctions
          n).Nonempty
    The family of non-dictator Boolean functions is nonempty in every dimension. 
  • defdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    def FABL.oddBLRAndAndRejectionValues (n : ) : Finset 
    def FABL.oddBLRAndAndRejectionValues (n : ) :
      Finset 
    Rejection probabilities of all non-dictators under the Odd-BLR/AND mixture. 
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.oddBLRAndAndRejectionValues_nonempty (n : ) :
      (FABL.oddBLRAndAndRejectionValues n).Nonempty
    theorem FABL.oddBLRAndAndRejectionValues_nonempty
      (n : ) :
      (FABL.oddBLRAndAndRejectionValues
          n).Nonempty
    The finite family of non-dictator rejection probabilities is nonempty. 
  • defdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    def FABL.oddBLRAndAndRejectionGap (n : ) : 
    def FABL.oddBLRAndAndRejectionGap (n : ) : 
    The smallest rejection probability of the mixture on a non-dictator. 
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.oddBLRAndAndRejectionGap_pos (n : ) :
      0 < FABL.oddBLRAndAndRejectionGap n
    theorem FABL.oddBLRAndAndRejectionGap_pos
      (n : ) :
      0 < FABL.oddBLRAndAndRejectionGap n
    The finite rejection gap is strictly positive. 
  • theoremdefined in FABL/Chapter07/TestingAmplification.lean
    complete
    theorem FABL.oddBLRAndAnd_isLocalTester {n : } :
      FABL.IsLocalTester (FABL.oddBLRAndAndFunctionTester n) FABL.IsDictator
        (FABL.oddBLRAndAndRejectionGap n / 2)
    theorem FABL.oddBLRAndAnd_isLocalTester {n : } :
      FABL.IsLocalTester
        (FABL.oddBLRAndAndFunctionTester n)
        FABL.IsDictator
        (FABL.oddBLRAndAndRejectionGap n / 2)
    Exercise 7.8(b): the equal mixture of Odd BLR and the AND test is a three-query local
    tester for positive dictatorship, with an explicit positive finite rejection rate. 
Lemma7.5.9
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 1used by 0XL∃∀N

Exercise 7.9. Optimize the explicit rejection rate in Theorem 7.7, allowing the BLR and NAE branches to be mixed with unequal probabilities. The book poses an open-ended optimization rather than a unique numerical target, so this node records the task without manufacturing a canonical answer.

Lemma7.5.10
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Definition 7.3.8
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 7.10.

(a) An (\alpha,\beta)-distinguisher for Max-CSP outputs YES on every instance of value at least \beta and NO on every instance of value strictly below \alpha. Convert any efficient (\alpha,\beta)-approximation algorithm into an efficient (\alpha,\beta)-distinguisher.

(b) Suppose \Psi is closed under restricting predicates to nonconstant predicates. Convert an efficient (1,1)-distinguisher for Max-CSP(\Psi) into an efficient (1,1)-approximation algorithm.

The finite restriction search and its value guarantee are proved. Its encoded efficiency endpoint remains conditional on a supplied polynomial-time threshold-test implementation.

Lean code for Lemma7.5.104 declarations
  • theoremdefined in FABL/Chapter07/Complexity.lean
    complete
    theorem FABL.PolytimeMap.IsThresholdApproximation.distinguishesGap
      {algorithm : FABL.PolytimeMap}
      {problem : FABL.EncodedMaximizationProblem}
      {outputThreshold optimumThreshold soundness completeness : }
      (happrox :
        algorithm.IsThresholdApproximation problem outputThreshold
          optimumThreshold)
      (thresholdTest : algorithm.ValueThresholdTest problem outputThreshold)
      (hgap : soundness < completeness)
      (hsoundness : soundness < outputThreshold)
      (hcompleteness : optimumThreshold  completeness) :
      thresholdTest.decision.DistinguishesPromise
        (problem.gapPromise soundness completeness hgap)
    theorem FABL.PolytimeMap.IsThresholdApproximation.distinguishesGap
      {algorithm : FABL.PolytimeMap}
      {problem :
        FABL.EncodedMaximizationProblem}
      {outputThreshold optimumThreshold
        soundness completeness : }
      (happrox :
        algorithm.IsThresholdApproximation
          problem outputThreshold
          optimumThreshold)
      (thresholdTest :
        algorithm.ValueThresholdTest problem
          outputThreshold)
      (hgap : soundness < completeness)
      (hsoundness :
        soundness < outputThreshold)
      (hcompleteness :
        optimumThreshold  completeness) :
      thresholdTest.decision.DistinguishesPromise
        (problem.gapPromise soundness
          completeness hgap)
    Exercise 7.10, generic form: a threshold approximation, followed by a polynomial-time value
    test, distinguishes every compatible optimum gap. 
  • defdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    def FABL.EncodedMaximizationProblem.exactOnePromise
      (problem : FABL.EncodedMaximizationProblem) :
      FABL.BinaryPromiseProblem
    def FABL.EncodedMaximizationProblem.exactOnePromise
      (problem :
        FABL.EncodedMaximizationProblem) :
      FABL.BinaryPromiseProblem
    The exact `(1,1)` promise: valid instances of optimum one versus valid instances of optimum
    strictly below one. 
  • structure(4 fields)defined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    structure FABL.OneOneRestrictionSearch
      (problem : FABL.EncodedMaximizationProblem) : Type 1
    structure FABL.OneOneRestrictionSearch
      (problem :
        FABL.EncodedMaximizationProblem) :
      Type 1
    The narrow encoded witness for the variable-fixing self-reduction in Exercise 7.10(b).
    
    For a concrete Max-CSP template, closure under restriction to nonconstant predicates supplies
    the semantic restricted instances.  This structure records only the remaining encoding-specific
    content: one polynomial-time reconstruction map and its exact interaction with a correct
    `(1,1)` distinguisher. 
    reconstruct : FABL.PolytimeMap  FABL.PolytimeMap
    Reconstruct a solution by making the polynomially many restriction queries. 
    feasible :  (decision : FABL.PolytimeMap),
       input  problem.instances, problem.Feasible input ((self.reconstruct decision).toFun input)
    Reconstruction always produces a feasible solution on a valid instance. 
    optimum_le_one :  input  problem.instances, problem.optimum input  1
    Max-CSP objective values, including the optimum, are normalized by one. 
    value_eq_one :  (decision : FABL.PolytimeMap),
      decision.DistinguishesPromise problem.exactOnePromise 
         input  problem.instances,
          problem.optimum input = 1  problem.value input ((self.reconstruct decision).toFun input) = 1
    Correct exact-one answers preserve value one throughout the restriction sequence. 
  • theoremdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    theorem FABL.OneOneRestrictionSearch.approximationOfDistinguisher
      {problem : FABL.EncodedMaximizationProblem}
      (search : FABL.OneOneRestrictionSearch problem)
      (decision : FABL.PolytimeMap)
      (hdecision : decision.DistinguishesPromise problem.exactOnePromise) :
      (search.reconstruct decision).IsThresholdApproximation problem 1 1
    theorem FABL.OneOneRestrictionSearch.approximationOfDistinguisher
      {problem :
        FABL.EncodedMaximizationProblem}
      (search :
        FABL.OneOneRestrictionSearch problem)
      (decision : FABL.PolytimeMap)
      (hdecision :
        decision.DistinguishesPromise
          problem.exactOnePromise) :
      (search.reconstruct
            decision).IsThresholdApproximation
        problem 1 1
    O'Donnell, Exercise 7.10(b): an encoded polynomial-time variable-fixing self-reduction
    converts an efficient exact `(1,1)` distinguisher into an efficient `(1,1)` approximation. 
Lemma7.5.11
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 0
Used by 2
Reverse dependency previews
Preview
Lemma 7.5.12
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Exercise 7.11.

(a) A width-w\ge3, size-s CNF formula \phi can be transformed to a width-at-most-three CNF \phi' using at most (w-3)s auxiliary variables and at most (w-2)s clauses, so that \phi(x)=\mathrm{True} \Longrightarrow \exists\Pi,\ \phi'(x,\Pi)=\mathrm{True}, \phi(x)=\mathrm{False} \Longrightarrow \forall\Pi,\ \phi'(x,\Pi)=\mathrm{False}.

(b) The clauses can all be made to have width exactly three with only O(s) further clauses.

Lean code for Lemma7.5.1118 declarations
  • defdefined in FABL/Chapter07/CNFReductions.lean
    complete
    def FABL.tseitinClauseChain {n : } :
      List (FABL.Literal n) 
        List (FABL.Literal n)  List (List (FABL.Literal n))
    def FABL.tseitinClauseChain {n : } :
      List (FABL.Literal n) 
        List (FABL.Literal n) 
          List (List (FABL.Literal n))
    The standard Tseitin chain for one clause.  The auxiliary literals are consumed from left
    to right; any unused suffix is ignored. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.tseitinClauseChain_nodupIndices {n : }
      (literals auxiliaries : List (FABL.Literal n))
      (hliterals : (List.map FABL.Literal.index literals).Nodup)
      (hauxiliaries : (List.map FABL.Literal.index auxiliaries).Nodup)
      (hdisjoint :
        (List.map FABL.Literal.index literals).Disjoint
          (List.map FABL.Literal.index auxiliaries))
      (clause : List (FABL.Literal n)) :
      clause  FABL.tseitinClauseChain literals auxiliaries 
        (List.map FABL.Literal.index clause).Nodup
    theorem FABL.tseitinClauseChain_nodupIndices
      {n : }
      (literals auxiliaries :
        List (FABL.Literal n))
      (hliterals :
        (List.map FABL.Literal.index
            literals).Nodup)
      (hauxiliaries :
        (List.map FABL.Literal.index
            auxiliaries).Nodup)
      (hdisjoint :
        (List.map FABL.Literal.index
              literals).Disjoint
          (List.map FABL.Literal.index
            auxiliaries))
      (clause : List (FABL.Literal n)) :
      clause 
          FABL.tseitinClauseChain literals
            auxiliaries 
        (List.map FABL.Literal.index
            clause).Nodup
    Every clause of a canonical Tseitin chain retains pairwise-distinct variable indices. 
  • abbrevdefined in FABL/Chapter07/CNFReductions.lean
    complete
    abbrev FABL.widthThreeTseitinAuxiliaryCount {n : }
      (formula : FABL.CNFFormula n) (width : ) : 
    abbrev FABL.widthThreeTseitinAuxiliaryCount
      {n : } (formula : FABL.CNFFormula n)
      (width : ) : 
    Number of auxiliary coordinates in the canonical clause-chain construction. 
  • defdefined in FABL/Chapter07/CNFReductions.lean
    complete
    def FABL.widthThreeTseitin {n : } (formula : FABL.CNFFormula n)
      (width : ) : FABL.CNFFormula (n + (width - 3) * formula.size)
    def FABL.widthThreeTseitin {n : }
      (formula : FABL.CNFFormula n)
      (width : ) :
      FABL.CNFFormula
        (n + (width - 3) * formula.size)
    O'Donnell, Exercise 7.11(a): the canonical width-three Tseitin extension.  Clause `i`
    receives its own block of `width - 3` auxiliary variables. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.widthThreeTseitin_size_le {n : } (formula : FABL.CNFFormula n)
      {width : } (hwidth : 3  width) (hformula : formula.width  width) :
      (FABL.widthThreeTseitin formula width).size 
        (width - 2) * formula.size
    theorem FABL.widthThreeTseitin_size_le {n : }
      (formula : FABL.CNFFormula n)
      {width : } (hwidth : 3  width)
      (hformula : formula.width  width) :
      (FABL.widthThreeTseitin formula
            width).size 
        (width - 2) * formula.size
    Exercise 7.11(a), exact size bound: at most `(width - 2) * size` clauses. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.widthThreeTseitin_auxiliaryCount_eq {n : }
      (formula : FABL.CNFFormula n) {width : } :
      FABL.widthThreeTseitinAuxiliaryCount formula width =
        (width - 3) * formula.size
    theorem FABL.widthThreeTseitin_auxiliaryCount_eq
      {n : } (formula : FABL.CNFFormula n)
      {width : } :
      FABL.widthThreeTseitinAuxiliaryCount
          formula width =
        (width - 3) * formula.size
    Exercise 7.11(a), exact auxiliary-variable count, strengthening the book's upper bound. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.widthThreeTseitin_width_le {n : } (formula : FABL.CNFFormula n)
      {width : } (hwidth : 3  width) (hformula : formula.width  width) :
      (FABL.widthThreeTseitin formula width).width  3
    theorem FABL.widthThreeTseitin_width_le {n : }
      (formula : FABL.CNFFormula n)
      {width : } (hwidth : 3  width)
      (hformula : formula.width  width) :
      (FABL.widthThreeTseitin formula
            width).width 
        3
    Exercise 7.11(a), width bound: every generated clause has width at most three. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.widthThreeTseitin_sound {n : } (formula : FABL.CNFFormula n)
      (width : )
      (assignment : FABL.SignCube (n + (width - 3) * formula.size))
      (houtput :
        (FABL.widthThreeTseitin formula width).eval assignment = -1) :
      formula.eval (FABL.restrictCNFAssignment assignment) = -1
    theorem FABL.widthThreeTseitin_sound {n : }
      (formula : FABL.CNFFormula n)
      (width : )
      (assignment :
        FABL.SignCube
          (n + (width - 3) * formula.size))
      (houtput :
        (FABL.widthThreeTseitin formula
                width).eval
            assignment =
          -1) :
      formula.eval
          (FABL.restrictCNFAssignment
            assignment) =
        -1
    Exercise 7.11(a), soundness direction: no auxiliary assignment can satisfy the extension
    when the original assignment falsifies the input CNF. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.widthThreeTseitin_complete {n : } (formula : FABL.CNFFormula n)
      (width : ) (assignment : FABL.SignCube n)
      (hinput : formula.eval assignment = -1) :
       proof,
        (FABL.widthThreeTseitin formula width).eval
            (FABL.extendCNFAssignment assignment proof) =
          -1
    theorem FABL.widthThreeTseitin_complete {n : }
      (formula : FABL.CNFFormula n)
      (width : )
      (assignment : FABL.SignCube n)
      (hinput :
        formula.eval assignment = -1) :
       proof,
        (FABL.widthThreeTseitin formula
                width).eval
            (FABL.extendCNFAssignment
              assignment proof) =
          -1
    Exercise 7.11(a), completeness direction: every satisfying original assignment extends to
    a satisfying assignment of the width-three Tseitin formula. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.widthThreeTseitin_eval_iff_exists {n : }
      (formula : FABL.CNFFormula n) (width : )
      (assignment : FABL.SignCube n) :
      formula.eval assignment = -1 
         proof,
          (FABL.widthThreeTseitin formula width).eval
              (FABL.extendCNFAssignment assignment proof) =
            -1
    theorem FABL.widthThreeTseitin_eval_iff_exists
      {n : } (formula : FABL.CNFFormula n)
      (width : )
      (assignment : FABL.SignCube n) :
      formula.eval assignment = -1 
         proof,
          (FABL.widthThreeTseitin formula
                  width).eval
              (FABL.extendCNFAssignment
                assignment proof) =
            -1
    O'Donnell, Exercise 7.11(a), exact equisatisfiability over each original assignment. 
  • defdefined in FABL/Chapter07/CNFReductions.lean
    complete
    def FABL.exactlyThreeCNF {n : } (formula : FABL.CNFFormula n) :
      FABL.CNFFormula (n + 3)
    def FABL.exactlyThreeCNF {n : }
      (formula : FABL.CNFFormula n) :
      FABL.CNFFormula (n + 3)
    Exercise 7.11(b): pad every width-at-most-three clause to clauses with exactly three
    distinct literals. Three padding coordinates cover unit, binary, and empty clauses uniformly. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.exactlyThreeCNF_clause_width_eq_three {n : }
      (formula : FABL.CNFFormula n) (hwidth : formula.width  3)
      {clause : FABL.DNFTerm (n + 3)}
      (hclause : clause  (FABL.exactlyThreeCNF formula).clauses) :
      clause.width = 3
    theorem FABL.exactlyThreeCNF_clause_width_eq_three
      {n : } (formula : FABL.CNFFormula n)
      (hwidth : formula.width  3)
      {clause : FABL.DNFTerm (n + 3)}
      (hclause :
        clause 
          (FABL.exactlyThreeCNF
              formula).clauses) :
      clause.width = 3
    Exercise 7.11(b), exact-width guarantee for every output clause. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.exactlyThreeCNF_size_le {n : } (formula : FABL.CNFFormula n) :
      (FABL.exactlyThreeCNF formula).size  8 * formula.size
    theorem FABL.exactlyThreeCNF_size_le {n : }
      (formula : FABL.CNFFormula n) :
      (FABL.exactlyThreeCNF formula).size 
        8 * formula.size
    Exercise 7.11(b), linear size bound: exact-three padding creates at most eight clauses per
    input clause. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.exactlyThreeCNF_eval_iff {n : } (formula : FABL.CNFFormula n)
      (hwidth : formula.width  3) (assignment : FABL.SignCube (n + 3)) :
      (FABL.exactlyThreeCNF formula).eval assignment = -1 
        formula.eval (FABL.restrictCNFAssignment assignment) = -1
    theorem FABL.exactlyThreeCNF_eval_iff {n : }
      (formula : FABL.CNFFormula n)
      (hwidth : formula.width  3)
      (assignment : FABL.SignCube (n + 3)) :
      (FABL.exactlyThreeCNF formula).eval
            assignment =
          -1 
        formula.eval
            (FABL.restrictCNFAssignment
              assignment) =
          -1
    Exercise 7.11(b), soundness and completeness over each fixed original assignment. 
  • defdefined in FABL/Chapter07/CNFReductions.lean
    complete
    def FABL.exactlyThreeTseitin {n : } (formula : FABL.CNFFormula n)
      (width : ) : FABL.CNFFormula (n + (width - 3) * formula.size + 3)
    def FABL.exactlyThreeTseitin {n : }
      (formula : FABL.CNFFormula n)
      (width : ) :
      FABL.CNFFormula
        (n + (width - 3) * formula.size + 3)
    The complete Exercise 7.11 reduction: clause chaining followed by exact-three padding. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.exactlyThreeTseitin_clause_width_eq_three {n : }
      (formula : FABL.CNFFormula n) {width : } (hwidth : 3  width)
      (hformula : formula.width  width)
      {clause : FABL.DNFTerm (n + (width - 3) * formula.size + 3)}
      (hclause :
        clause  (FABL.exactlyThreeTseitin formula width).clauses) :
      clause.width = 3
    theorem FABL.exactlyThreeTseitin_clause_width_eq_three
      {n : } (formula : FABL.CNFFormula n)
      {width : } (hwidth : 3  width)
      (hformula : formula.width  width)
      {clause :
        FABL.DNFTerm
          (n + (width - 3) * formula.size +
            3)}
      (hclause :
        clause 
          (FABL.exactlyThreeTseitin formula
              width).clauses) :
      clause.width = 3
    Exercise 7.11(a)--(b), every clause of the final formula has exactly three literals. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.exactlyThreeTseitin_size_le {n : } (formula : FABL.CNFFormula n)
      {width : } (hwidth : 3  width) (hformula : formula.width  width) :
      (FABL.exactlyThreeTseitin formula width).size 
        8 * ((width - 2) * formula.size)
    theorem FABL.exactlyThreeTseitin_size_le {n : }
      (formula : FABL.CNFFormula n)
      {width : } (hwidth : 3  width)
      (hformula : formula.width  width) :
      (FABL.exactlyThreeTseitin formula
            width).size 
        8 * ((width - 2) * formula.size)
    Exercise 7.11(a)--(b), the composed exact clause bound. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.exactlyThreeTseitin_eval_iff_exists {n : }
      (formula : FABL.CNFFormula n) {width : } (hwidth : 3  width)
      (hformula : formula.width  width) (assignment : FABL.SignCube n) :
      formula.eval assignment = -1 
         chainProof paddingProof,
          (FABL.exactlyThreeTseitin formula width).eval
              (FABL.extendCNFAssignment
                (FABL.extendCNFAssignment assignment chainProof)
                paddingProof) =
            -1
    theorem FABL.exactlyThreeTseitin_eval_iff_exists
      {n : } (formula : FABL.CNFFormula n)
      {width : } (hwidth : 3  width)
      (hformula : formula.width  width)
      (assignment : FABL.SignCube n) :
      formula.eval assignment = -1 
         chainProof paddingProof,
          (FABL.exactlyThreeTseitin formula
                  width).eval
              (FABL.extendCNFAssignment
                (FABL.extendCNFAssignment
                  assignment chainProof)
                paddingProof) =
            -1
    Exercise 7.11(a)--(b), per-assignment equisatisfiability with the exact chain and padding
    auxiliary spaces exposed separately. 
Lemma7.5.12
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Definition 7.2.10
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 3
Reverse dependency previews
Preview
Theorem 7.3.18
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Exercise 7.12. From an r-query PCPP reduction \mathcal R_1 with rejection rate \lambda, construct a 3-query reduction \mathcal R_2 whose rejection rate is at least \frac{\lambda}{r2^r} and whose proof length is at most r2^r m+\ell_1, where m is the description length output by \mathcal R_1. Every acceptance predicate of the new verifier is an OR of exactly three literals.

The denominator presupposes the book's positive-query convention. The formal transformation therefore assumes r>0. At widths one and two it retains a duplicate-free canonical CNF internally but queries three literal occurrences, repeating an occurrence when necessary; this is exactly the book's logical-OR semantics without weakening the stated r2^r bound.

The finite semantic representation is the explicit verifier table with one local predicate record per seed, so its formal description size is the seed cardinality. The separate machine adapter requires a concrete codec and a CSLib-certified output implementation; no bit-level running-time conclusion is inferred from finite noncomputable enumeration alone.

Lean code for Lemma7.5.1226 declarations
  • defdefined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    def FABL.excludingClause {r : } (assignment : FABL.SignCube r) :
      FABL.DNFTerm r
    def FABL.excludingClause {r : }
      (assignment : FABL.SignCube r) :
      FABL.DNFTerm r
    The full clause which is false exactly at one sign assignment. 
  • theoremdefined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    theorem FABL.excludingClause_eval_eq_neg_one_iff {r : }
      (excluded assignment : FABL.SignCube r) :
      FABL.CNFFormula.clauseEval (FABL.excludingClause excluded)
            assignment =
          -1 
        assignment  excluded
    theorem FABL.excludingClause_eval_eq_neg_one_iff
      {r : }
      (excluded assignment :
        FABL.SignCube r) :
      FABL.CNFFormula.clauseEval
            (FABL.excludingClause excluded)
            assignment =
          -1 
        assignment  excluded
    The excluding clause is true precisely away from its excluded assignment. 
  • defdefined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    def FABL.truthTableCNF {r : } (predicate : FABL.BooleanFunction r) :
      FABL.CNFFormula r
    def FABL.truthTableCNF {r : }
      (predicate : FABL.BooleanFunction r) :
      FABL.CNFFormula r
    Canonical CNF obtained by excluding every falsifying truth-table row of a sign-valued
    Boolean predicate. 
  • theoremdefined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    theorem FABL.truthTableCNF_size_le {r : }
      (predicate : FABL.BooleanFunction r) :
      (FABL.truthTableCNF predicate).size  2 ^ r
    theorem FABL.truthTableCNF_size_le {r : }
      (predicate : FABL.BooleanFunction r) :
      (FABL.truthTableCNF predicate).size 
        2 ^ r
    The truth-table CNF has at most one clause per Boolean input. 
  • theoremdefined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    theorem FABL.truthTableCNF_eval_eq_neg_one_iff {r : }
      (predicate : FABL.BooleanFunction r) (assignment : FABL.SignCube r) :
      (FABL.truthTableCNF predicate).eval assignment = -1 
        predicate assignment = -1
    theorem FABL.truthTableCNF_eval_eq_neg_one_iff
      {r : }
      (predicate : FABL.BooleanFunction r)
      (assignment : FABL.SignCube r) :
      (FABL.truthTableCNF predicate).eval
            assignment =
          -1 
        predicate assignment = -1
    The truth-table construction represents its predicate exactly. 
  • defdefined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    def FABL.localAcceptancePredicate {n proofLength r : }
      (V : FABL.PCPPSystem Bool n proofLength r) (seed : V.verifier.Seed) :
      FABL.BooleanFunction r
    def FABL.localAcceptancePredicate
      {n proofLength r : }
      (V :
        FABL.PCPPSystem Bool n proofLength r)
      (seed : V.verifier.Seed) :
      FABL.BooleanFunction r
    Sign-valued acceptance predicate seen at one verifier seed. 
  • structure(7 fields)defined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    structure FABL.SeedwiseThreeCNFReduction {n proofLength r : }
      (V : FABL.PCPPSystem Bool n proofLength r) (K : ) : Type
    structure FABL.SeedwiseThreeCNFReduction
      {n proofLength r : }
      (V :
        FABL.PCPPSystem Bool n proofLength r)
      (K : ) : Type
    A seedwise reduction of every local acceptance predicate to a canonical nonempty CNF of width
    at most three.  The final occurrence view makes exactly three queries, repeating literals only when
    a canonical clause has width one or two.  The `K` auxiliary coordinates and `K` clauses are uniform
    across seeds, so they can be packed into one finite PCPP proof. 
    positive : 0 < K
    The local clause family is nonempty. 
    formula : V.verifier.Seed  FABL.CNFFormula (r + K)
    Exactly `K` canonical clauses over the queried bits followed by `K` proof bits.  Canonical
    clauses retain distinct indices; the final three-query view may repeat a literal occurrence. 
    size_eq :  (seed : V.verifier.Seed), (self.formula seed).size = K
    The clause list has the uniform advertised length. 
    clause_nonempty :  (seed : V.verifier.Seed),  clause  (self.formula seed).clauses, 0 < clause.width
    Every canonical clause has at least one literal. 
    clause_width_le_three :  (seed : V.verifier.Seed),  clause  (self.formula seed).clauses, clause.width  3
    Every canonical clause has at most three literals. 
    complete :  (seed : V.verifier.Seed) (bits : Fin r  Bool),
      V.verifier.accept seed (FABL.localTranscript V seed bits) = true 
         auxiliaries,
          (self.formula seed).eval (FABL.extendCNFAssignment (fun j => FABL.pcppBoolSignEquiv (bits j)) auxiliaries) = -1
    A locally accepting transcript extends to a satisfying auxiliary assignment. 
    sound :  (seed : V.verifier.Seed) (bits : Fin r  Bool) (auxiliaries : FABL.SignCube K),
      (self.formula seed).eval (FABL.extendCNFAssignment (fun j => FABL.pcppBoolSignEquiv (bits j)) auxiliaries) = -1 
        V.verifier.accept seed (FABL.localTranscript V seed bits) = true
    A satisfying auxiliary assignment certifies that the original local predicate accepts. 
  • defdefined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    def FABL.threeQueryBudget (r : ) : 
    def FABL.threeQueryBudget (r : ) : 
    The exact per-seed clause and proof budget in Exercise 7.12. 
  • defdefined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    def FABL.positiveSeedwiseThreeCNFReduction {n proofLength r : }
      (V : FABL.PCPPSystem Bool n proofLength r) (hr : 0 < r) :
      FABL.SeedwiseThreeCNFReduction V (FABL.threeQueryBudget r)
    def FABL.positiveSeedwiseThreeCNFReduction
      {n proofLength r : }
      (V :
        FABL.PCPPSystem Bool n proofLength r)
      (hr : 0 < r) :
      FABL.SeedwiseThreeCNFReduction V
        (FABL.threeQueryBudget r)
    The canonical positive-query-count local reduction, dispatching to the literal-occurrence
    endpoint construction at widths one and two and to Tseitin chains from width three onward. 
  • defdefined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    def FABL.PCPPSystem.descriptionSize {n proofLength r : }
      (V : FABL.PCPPSystem Bool n proofLength r) : 
    def FABL.PCPPSystem.descriptionSize
      {n proofLength r : }
      (V :
        FABL.PCPPSystem Bool n proofLength
          r) :
      
    The finite description size used in Exercise 7.12: one local predicate for every outer
    verifier seed. 
  • defdefined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    def FABL.threeQueryProofLength {n proofLength r : }
      (V : FABL.PCPPSystem Bool n proofLength r) (K : ) : 
    def FABL.threeQueryProofLength
      {n proofLength r : }
      (V :
        FABL.PCPPSystem Bool n proofLength r)
      (K : ) : 
    The exact proof length after allocating `K` local proof bits for every seed. 
  • defdefined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    def FABL.composeThreeQueryVerifier {n proofLength r : } [NeZero n]
      {V : FABL.PCPPSystem Bool n proofLength r} {K : }
      (reduction : FABL.SeedwiseThreeCNFReduction V K) :
      FABL.NonadaptiveFunctionTester
        (Fin n  Fin (FABL.threeQueryProofLength V K)) Bool 3
    def FABL.composeThreeQueryVerifier
      {n proofLength r : } [NeZero n]
      {V :
        FABL.PCPPSystem Bool n proofLength r}
      {K : }
      (reduction :
        FABL.SeedwiseThreeCNFReduction V K) :
      FABL.NonadaptiveFunctionTester
        (Fin n 
          Fin
            (FABL.threeQueryProofLength V K))
        Bool 3
    The composed three-query verifier.  Its random seed first follows the outer verifier's law
    and then selects one of the `K` canonical clauses uniformly. 
  • defdefined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    def FABL.composeThreeQuerySystem {n proofLength r : } [NeZero n]
      {V : FABL.PCPPSystem Bool n proofLength r} {K : }
      (reduction : FABL.SeedwiseThreeCNFReduction V K) :
      FABL.PCPPSystem Bool n (FABL.threeQueryProofLength V K) 3
    def FABL.composeThreeQuerySystem
      {n proofLength r : } [NeZero n]
      {V :
        FABL.PCPPSystem Bool n proofLength r}
      {K : }
      (reduction :
        FABL.SeedwiseThreeCNFReduction V K) :
      FABL.PCPPSystem Bool n
        (FABL.threeQueryProofLength V K) 3
    The PCPP system carried by the composed verifier. 
  • defdefined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    def FABL.composeThreeQueryProof {n proofLength r : } [NeZero n]
      {V : FABL.PCPPSystem Bool n proofLength r} {K : }
      (reduction : FABL.SeedwiseThreeCNFReduction V K) (w : Fin n  Bool)
      (proof : Fin proofLength  Bool) :
      Fin (FABL.threeQueryProofLength V K)  Bool
    def FABL.composeThreeQueryProof
      {n proofLength r : } [NeZero n]
      {V :
        FABL.PCPPSystem Bool n proofLength r}
      {K : }
      (reduction :
        FABL.SeedwiseThreeCNFReduction V K)
      (w : Fin n  Bool)
      (proof : Fin proofLength  Bool) :
      Fin (FABL.threeQueryProofLength V K) 
        Bool
    Pack the old proof and one `K`-bit local CNF proof for every finite outer seed. 
  • theoremdefined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    theorem FABL.composeThreeQuerySystem_acceptanceProbability_eq_one
      {n proofLength r : } [NeZero n]
      {V : FABL.PCPPSystem Bool n proofLength r} {K : }
      (reduction : FABL.SeedwiseThreeCNFReduction V K) (w : Fin n  Bool)
      (proof : Fin proofLength  Bool)
      (houter : V.acceptanceProbability w proof = 1) :
      (FABL.composeThreeQuerySystem reduction).acceptanceProbability w
          (FABL.composeThreeQueryProof reduction w proof) =
        1
    theorem FABL.composeThreeQuerySystem_acceptanceProbability_eq_one
      {n proofLength r : } [NeZero n]
      {V :
        FABL.PCPPSystem Bool n proofLength r}
      {K : }
      (reduction :
        FABL.SeedwiseThreeCNFReduction V K)
      (w : Fin n  Bool)
      (proof : Fin proofLength  Bool)
      (houter :
        V.acceptanceProbability w proof = 1) :
      (FABL.composeThreeQuerySystem
              reduction).acceptanceProbability
          w
          (FABL.composeThreeQueryProof
            reduction w proof) =
        1
    Perfect completeness of the outer verifier is preserved by the three-query composition. 
  • theoremdefined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    theorem FABL.outer_rejection_div_le_composed_rejection {n proofLength r : }
      [NeZero n] {V : FABL.PCPPSystem Bool n proofLength r} {K : }
      (reduction : FABL.SeedwiseThreeCNFReduction V K) (w : Fin n  Bool)
      (proof : Fin (FABL.threeQueryProofLength V K)  Bool) :
      V.rejectionProbability w (FABL.restrictOuterProof proof) / K 
        (FABL.composeThreeQuerySystem reduction).rejectionProbability w
          proof
    theorem FABL.outer_rejection_div_le_composed_rejection
      {n proofLength r : } [NeZero n]
      {V :
        FABL.PCPPSystem Bool n proofLength r}
      {K : }
      (reduction :
        FABL.SeedwiseThreeCNFReduction V K)
      (w : Fin n  Bool)
      (proof :
        Fin (FABL.threeQueryProofLength V K) 
          Bool) :
      V.rejectionProbability w
            (FABL.restrictOuterProof proof) /
          K 
        (FABL.composeThreeQuerySystem
              reduction).rejectionProbability
          w proof
    The composed rejection probability is at least the outer rejection probability divided by
    the number `K` of local clauses. 
  • theoremdefined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    theorem FABL.SeedwiseThreeCNFReduction.isPCPP {n proofLength r : } [NeZero n]
      {V : FABL.PCPPSystem Bool n proofLength r} {K : }
      (reduction : FABL.SeedwiseThreeCNFReduction V K)
      {P : (Fin n  Bool)  Prop} {rate : } (hV : FABL.IsPCPP V P rate) :
      FABL.IsPCPP (FABL.composeThreeQuerySystem reduction) P (rate / K)
    theorem FABL.SeedwiseThreeCNFReduction.isPCPP
      {n proofLength r : } [NeZero n]
      {V :
        FABL.PCPPSystem Bool n proofLength r}
      {K : }
      (reduction :
        FABL.SeedwiseThreeCNFReduction V K)
      {P : (Fin n  Bool)  Prop} {rate : }
      (hV : FABL.IsPCPP V P rate) :
      FABL.IsPCPP
        (FABL.composeThreeQuerySystem
          reduction)
        P (rate / K)
    Generic three-query composition theorem.  Perfect completeness is preserved and soundness
    loses only the factor `K` coming from uniform selection of one local clause. 
  • defdefined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    def FABL.threeQueryPCPPDescription {n : } [NeZero n]
      {P : (Fin n  Bool)  Prop} (description : FABL.PCPPDescription n P)
      (hqueries : 0 < description.queryCount) : FABL.PCPPDescription n P
    def FABL.threeQueryPCPPDescription {n : }
      [NeZero n] {P : (Fin n  Bool)  Prop}
      (description : FABL.PCPPDescription n P)
      (hqueries :
        0 < description.queryCount) :
      FABL.PCPPDescription n P
    O'Donnell, Exercise 7.12: convert a positive-`r`-query PCPP description to a three-query
    description whose predicates are ORs of exactly three literal occurrences.  Positivity is the
    explicit endpoint convention required by the book's denominator `r * 2 ^ r`; at widths one and
    two, repeated query occurrences leave the canonical distinct-index CNF semantics unchanged. 
  • theoremdefined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    theorem FABL.threeQueryPCPPDescription_proofLength {n : } [NeZero n]
      {P : (Fin n  Bool)  Prop} (description : FABL.PCPPDescription n P)
      (hqueries : 0 < description.queryCount) :
      (FABL.threeQueryPCPPDescription description hqueries).proofLength =
        description.proofLength +
          description.queryCount * 2 ^ description.queryCount *
            description.system.descriptionSize
    theorem FABL.threeQueryPCPPDescription_proofLength
      {n : } [NeZero n]
      {P : (Fin n  Bool)  Prop}
      (description : FABL.PCPPDescription n P)
      (hqueries :
        0 < description.queryCount) :
      (FABL.threeQueryPCPPDescription
            description
            hqueries).proofLength =
        description.proofLength +
          description.queryCount *
              2 ^ description.queryCount *
            description.system.descriptionSize
    Exercise 7.12's exact finite proof-length accounting:
    `p₁ + r * 2 ^ r * m`, where `m` is the number of local predicates in the finite outer
    description. 
  • theoremdefined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    theorem FABL.threeQueryPCPPDescription_queryCount {n : } [NeZero n]
      {P : (Fin n  Bool)  Prop} (description : FABL.PCPPDescription n P)
      (hqueries : 0 < description.queryCount) :
      (FABL.threeQueryPCPPDescription description hqueries).queryCount = 3
    theorem FABL.threeQueryPCPPDescription_queryCount
      {n : } [NeZero n]
      {P : (Fin n  Bool)  Prop}
      (description : FABL.PCPPDescription n P)
      (hqueries :
        0 < description.queryCount) :
      (FABL.threeQueryPCPPDescription
            description hqueries).queryCount =
        3
    The reduced description makes exactly three queries. 
  • theoremdefined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    theorem FABL.threeQueryPCPPDescription_rejectionRate {n : } [NeZero n]
      {P : (Fin n  Bool)  Prop} (description : FABL.PCPPDescription n P)
      (hqueries : 0 < description.queryCount) :
      (FABL.threeQueryPCPPDescription description hqueries).rejectionRate =
        description.rejectionRate /
          (description.queryCount * 2 ^ description.queryCount)
    theorem FABL.threeQueryPCPPDescription_rejectionRate
      {n : } [NeZero n]
      {P : (Fin n  Bool)  Prop}
      (description : FABL.PCPPDescription n P)
      (hqueries :
        0 < description.queryCount) :
      (FABL.threeQueryPCPPDescription
            description
            hqueries).rejectionRate =
        description.rejectionRate /
          (description.queryCount *
            2 ^ description.queryCount)
    Exercise 7.12's rejection-rate transfer. 
  • theoremdefined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    theorem FABL.canonicalThreeQueryPredicate_occurrenceCount {n proofLength r : }
      [NeZero n] {V : FABL.PCPPSystem Bool n proofLength r} (hr : 0 < r)
      (seed : V.verifier.Seed) (q : Fin (FABL.threeQueryBudget r)) :
      (List.ofFn fun j =>
            (FABL.positiveSeedwiseThreeCNFReduction V hr).literal seed q
              j).length =
        3
    theorem FABL.canonicalThreeQueryPredicate_occurrenceCount
      {n proofLength r : } [NeZero n]
      {V :
        FABL.PCPPSystem Bool n proofLength r}
      (hr : 0 < r) (seed : V.verifier.Seed)
      (q : Fin (FABL.threeQueryBudget r)) :
      (List.ofFn fun j =>
            (FABL.positiveSeedwiseThreeCNFReduction
                  V hr).literal
              seed q j).length =
        3
    Every local predicate output by the canonical Exercise 7.12 reduction is queried as a logical
    OR of exactly three literal occurrences.  Repeated occurrences are retained at widths one and two,
    matching the book while leaving canonical CNF clauses duplicate-free. 
  • defdefined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    def FABL.semanticPCPPReductionToThreeQueries
      (reduction : FABL.SemanticPCPPReduction)
      (hqueries :
         {n : } [inst : NeZero n] (C : FABL.BooleanCircuit n),
          0 < (reduction C).queryCount) :
      FABL.SemanticPCPPReduction
    def FABL.semanticPCPPReductionToThreeQueries
      (reduction : FABL.SemanticPCPPReduction)
      (hqueries :
         {n : } [inst : NeZero n]
          (C : FABL.BooleanCircuit n),
          0 < (reduction C).queryCount) :
      FABL.SemanticPCPPReduction
    The pure semantic transformation of an entire PCPP reduction.  This declaration does not
    claim a machine runtime: an encoded implementation belongs to `OutputSensitivePCPPReduction`,
    and ordinary polynomial time additionally requires `ProofLengthPolynomiallyBounded`. 
  • theoremdefined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    theorem FABL.semanticPCPPReductionToThreeQueries_proofLength
      (reduction : FABL.SemanticPCPPReduction)
      (hqueries :
         {n : } [inst : NeZero n] (C : FABL.BooleanCircuit n),
          0 < (reduction C).queryCount)
      {n : } [NeZero n] (C : FABL.BooleanCircuit n) :
      (FABL.semanticPCPPReductionToThreeQueries
            (fun {n} [NeZero n] => reduction)  C).proofLength =
        (reduction C).proofLength +
          (reduction C).queryCount * 2 ^ (reduction C).queryCount *
            (reduction C).system.descriptionSize
    theorem FABL.semanticPCPPReductionToThreeQueries_proofLength
      (reduction : FABL.SemanticPCPPReduction)
      (hqueries :
         {n : } [inst : NeZero n]
          (C : FABL.BooleanCircuit n),
          0 < (reduction C).queryCount)
      {n : } [NeZero n]
      (C : FABL.BooleanCircuit n) :
      (FABL.semanticPCPPReductionToThreeQueries
            (fun {n} [NeZero n] => reduction)
             C).proofLength =
        (reduction C).proofLength +
          (reduction C).queryCount *
              2 ^ (reduction C).queryCount *
            (reduction
                  C).system.descriptionSize
    The semantic reduction transformation retains the exact Exercise 7.12 proof-length formula. 
  • structure(2 fields)defined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    structure FABL.ThreeQueryOutputSensitiveAdapter
      (circuitEncoding : FABL.BooleanCircuitEncoding)
      (reduction : FABL.SemanticPCPPReduction)
      (hqueries :
         {n : } [inst : NeZero n] (C : FABL.BooleanCircuit n),
          0 < (reduction C).queryCount) :
      Type 1
    structure FABL.ThreeQueryOutputSensitiveAdapter
      (circuitEncoding :
        FABL.BooleanCircuitEncoding)
      (reduction : FABL.SemanticPCPPReduction)
      (hqueries :
         {n : } [inst : NeZero n]
          (C : FABL.BooleanCircuit n),
          0 < (reduction C).queryCount) :
      Type 1
    The narrow injected encoding boundary for Exercise 7.12.  A value of this structure must
    provide a real `OutputSensitivePCPPReduction` whose semantic output is the finite transformation
    proved above; no encoder or Turing machine is synthesized from noncomputable finite data. 
    outputSensitive : FABL.OutputSensitivePCPPReduction circuitEncoding
    Actual CSLib-certified output-sensitive implementation. 
    semantic_eq :  {n : } [inst : NeZero n] (C : FABL.BooleanCircuit n),
      self.outputSensitive.semantic C = FABL.threeQueryPCPPDescription (reduction C) 
    Its pure result is the canonical three-query transformation. 
  • defdefined in FABL/Chapter07/PCPPThreeQuery.lean
    complete
    def FABL.ThreeQueryOutputSensitiveAdapter.toPolytimeMap
      {circuitEncoding : FABL.BooleanCircuitEncoding}
      {reduction : FABL.SemanticPCPPReduction}
      {hqueries :
         {n : } [inst : NeZero n] (C : FABL.BooleanCircuit n),
          0 < (reduction C).queryCount}
      (adapter :
        FABL.ThreeQueryOutputSensitiveAdapter circuitEncoding
          (fun {n} [NeZero n] => reduction) )
      (hproof :
        FABL.ProofLengthPolynomiallyBounded adapter.outputSensitive) :
      FABL.PolytimeMap
    def FABL.ThreeQueryOutputSensitiveAdapter.toPolytimeMap
      {circuitEncoding :
        FABL.BooleanCircuitEncoding}
      {reduction : FABL.SemanticPCPPReduction}
      {hqueries :
         {n : } [inst : NeZero n]
          (C : FABL.BooleanCircuit n),
          0 < (reduction C).queryCount}
      (adapter :
        FABL.ThreeQueryOutputSensitiveAdapter
          circuitEncoding
          (fun {n} [NeZero n] => reduction) )
      (hproof :
        FABL.ProofLengthPolynomiallyBounded
          adapter.outputSensitive) :
      FABL.PolytimeMap
    An encoded Exercise 7.12 transformer is an ordinary CSLib polynomial-time map only when its
    transformed proof length is polynomially bounded.  This is exactly the existing
    `OutputSensitivePCPPReduction` adapter; computability alone is not substituted for polynomial
    time. 
Lemma7.5.13
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Definition 7.3.11
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Exercise 7.13.

(a) Construct a polynomial-time, satisfiability-preserving reduction from Boolean circuits to width-three CNF formulas.

(b) Deduce that a polynomial-time (1,1)-distinguisher, and hence a (1,1)-approximation algorithm, for Max-3-Sat would decide Circuit-Sat in polynomial time.

(c) Deduce the Max-E3-Sat clause of Theorem 7.33. The book gives no corresponding Max-3-Coloring reduction, so that separate clause remains an external statement.

Lean code for Lemma7.5.1331 declarations
  • defdefined in FABL/Chapter07/CNFReductions.lean
    complete
    def FABL.BooleanCircuit.inputCoordinate {n : } (C : FABL.BooleanCircuit n)
      (i : Fin n) : Fin (n + C.gateCount)
    def FABL.BooleanCircuit.inputCoordinate
      {n : } (C : FABL.BooleanCircuit n)
      (i : Fin n) : Fin (n + C.gateCount)
    Coordinate occupied by an input bit in the circuit CNF. 
  • defdefined in FABL/Chapter07/CNFReductions.lean
    complete
    def FABL.BooleanCircuit.gateCoordinate {n : } (C : FABL.BooleanCircuit n)
      (i : Fin C.gateCount) : Fin (n + C.gateCount)
    def FABL.BooleanCircuit.gateCoordinate {n : }
      (C : FABL.BooleanCircuit n)
      (i : Fin C.gateCount) :
      Fin (n + C.gateCount)
    Coordinate occupied by a gate value in the circuit CNF. 
  • defdefined in FABL/Chapter07/CNFReductions.lean
    complete
    def FABL.BooleanCircuit.previousGateIndex {n : }
      (C : FABL.BooleanCircuit n) (i : Fin C.gateCount) (j : Fin i) :
      Fin C.gateCount
    def FABL.BooleanCircuit.previousGateIndex
      {n : } (C : FABL.BooleanCircuit n)
      (i : Fin C.gateCount) (j : Fin i) :
      Fin C.gateCount
    Promote a reference local to gate `i` to the circuit's global gate index. 
  • defdefined in FABL/Chapter07/CNFReductions.lean
    complete
    def FABL.BooleanCircuit.gateClauses {n : } (C : FABL.BooleanCircuit n)
      (i : Fin C.gateCount) : List (FABL.DNFTerm (n + C.gateCount))
    def FABL.BooleanCircuit.gateClauses {n : }
      (C : FABL.BooleanCircuit n)
      (i : Fin C.gateCount) :
      List (FABL.DNFTerm (n + C.gateCount))
    Width-at-most-three CNF clauses enforcing the local semantics of one ordered-DAG gate. 
  • defdefined in FABL/Chapter07/CNFReductions.lean
    complete
    def FABL.BooleanCircuit.gateRelation {n : } (C : FABL.BooleanCircuit n)
      (i : Fin C.gateCount) (assignment : FABL.SignCube (n + C.gateCount)) :
      Prop
    def FABL.BooleanCircuit.gateRelation {n : }
      (C : FABL.BooleanCircuit n)
      (i : Fin C.gateCount)
      (assignment :
        FABL.SignCube (n + C.gateCount)) :
      Prop
    Local Boolean semantics read directly from a signed circuit-CNF assignment. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.BooleanCircuit.gateClauses_eval_iff {n : }
      (C : FABL.BooleanCircuit n) (i : Fin C.gateCount)
      (assignment : FABL.SignCube (n + C.gateCount)) :
      (∀ clause  C.gateClauses i,
          FABL.CNFFormula.clauseEval clause assignment = -1) 
        C.gateRelation i assignment
    theorem FABL.BooleanCircuit.gateClauses_eval_iff
      {n : } (C : FABL.BooleanCircuit n)
      (i : Fin C.gateCount)
      (assignment :
        FABL.SignCube (n + C.gateCount)) :
      (∀ clause  C.gateClauses i,
          FABL.CNFFormula.clauseEval clause
              assignment =
            -1) 
        C.gateRelation i assignment
    The local gate clauses are equivalent to the corresponding Boolean gate equation. 
  • defdefined in FABL/Chapter07/CNFReductions.lean
    complete
    def FABL.BooleanCircuit.outputClause {n : } (C : FABL.BooleanCircuit n) :
      FABL.DNFTerm (n + C.gateCount)
    def FABL.BooleanCircuit.outputClause {n : }
      (C : FABL.BooleanCircuit n) :
      FABL.DNFTerm (n + C.gateCount)
    The output unit clause of the circuit CNF. 
  • defdefined in FABL/Chapter07/CNFReductions.lean
    complete
    def FABL.BooleanCircuit.toWidthThreeCNF {n : }
      (C : FABL.BooleanCircuit n) : FABL.CNFFormula (n + C.gateCount)
    def FABL.BooleanCircuit.toWidthThreeCNF
      {n : } (C : FABL.BooleanCircuit n) :
      FABL.CNFFormula (n + C.gateCount)
    Exercise 7.13(a): the canonical width-three CNF of an ordered Boolean DAG. The first `n`
    coordinates are inputs and the following `gateCount` coordinates record gate values. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.BooleanCircuit.toWidthThreeCNF_size_le {n : }
      (C : FABL.BooleanCircuit n) :
      C.toWidthThreeCNF.size  3 * C.gateCount + 1
    theorem FABL.BooleanCircuit.toWidthThreeCNF_size_le
      {n : } (C : FABL.BooleanCircuit n) :
      C.toWidthThreeCNF.size 
        3 * C.gateCount + 1
    Exercise 7.13(a), linear clause bound for the canonical circuit CNF. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.BooleanCircuit.toWidthThreeCNF_width_le {n : }
      (C : FABL.BooleanCircuit n) : C.toWidthThreeCNF.width  3
    theorem FABL.BooleanCircuit.toWidthThreeCNF_width_le
      {n : } (C : FABL.BooleanCircuit n) :
      C.toWidthThreeCNF.width  3
    Exercise 7.13(a), every clause in the circuit encoding has width at most three. 
  • defdefined in FABL/Chapter07/CNFReductions.lean
    complete
    def FABL.BooleanCircuit.cnfAssignment {n : } (C : FABL.BooleanCircuit n)
      (input : Fin n  Bool) : FABL.SignCube (n + C.gateCount)
    def FABL.BooleanCircuit.cnfAssignment {n : }
      (C : FABL.BooleanCircuit n)
      (input : Fin n  Bool) :
      FABL.SignCube (n + C.gateCount)
    Signed assignment recording both an input and all recursively evaluated gate values. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.BooleanCircuit.toWidthThreeCNF_complete {n : }
      (C : FABL.BooleanCircuit n) (input : Fin n  Bool)
      (hinput : C.acceptedProperty input) :
      C.toWidthThreeCNF.eval (C.cnfAssignment input) = -1
    theorem FABL.BooleanCircuit.toWidthThreeCNF_complete
      {n : } (C : FABL.BooleanCircuit n)
      (input : Fin n  Bool)
      (hinput : C.acceptedProperty input) :
      C.toWidthThreeCNF.eval
          (C.cnfAssignment input) =
        -1
    A satisfying circuit input extends canonically to a satisfying assignment of its CNF. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.BooleanCircuit.acceptedProperty_of_toWidthThreeCNF_eval {n : }
      (C : FABL.BooleanCircuit n)
      (assignment : FABL.SignCube (n + C.gateCount))
      (hformula : C.toWidthThreeCNF.eval assignment = -1) :
      C.acceptedProperty fun input =>
        FABL.boolOfSign (assignment (C.inputCoordinate input))
    theorem FABL.BooleanCircuit.acceptedProperty_of_toWidthThreeCNF_eval
      {n : } (C : FABL.BooleanCircuit n)
      (assignment :
        FABL.SignCube (n + C.gateCount))
      (hformula :
        C.toWidthThreeCNF.eval assignment =
          -1) :
      C.acceptedProperty fun input =>
        FABL.boolOfSign
          (assignment
            (C.inputCoordinate input))
    Any satisfying assignment of the circuit CNF restricts to an accepted circuit input. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.BooleanCircuit.toWidthThreeCNF_eval_iff_exists {n : }
      (C : FABL.BooleanCircuit n) (input : Fin n  Bool) :
      C.acceptedProperty input 
         gateValues,
          C.toWidthThreeCNF.eval
              (FABL.extendCNFAssignment (fun i => FABL.signOfBool (input i))
                gateValues) =
            -1
    theorem FABL.BooleanCircuit.toWidthThreeCNF_eval_iff_exists
      {n : } (C : FABL.BooleanCircuit n)
      (input : Fin n  Bool) :
      C.acceptedProperty input 
         gateValues,
          C.toWidthThreeCNF.eval
              (FABL.extendCNFAssignment
                (fun i =>
                  FABL.signOfBool (input i))
                gateValues) =
            -1
    Exercise 7.13(a), per-input equisatisfiability of the canonical circuit CNF. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.BooleanCircuit.satisfiable_iff_toWidthThreeCNF_satisfiable {n : }
      (C : FABL.BooleanCircuit n) :
      C.Satisfiable   assignment, C.toWidthThreeCNF.eval assignment = -1
    theorem FABL.BooleanCircuit.satisfiable_iff_toWidthThreeCNF_satisfiable
      {n : } (C : FABL.BooleanCircuit n) :
      C.Satisfiable 
         assignment,
          C.toWidthThreeCNF.eval assignment =
            -1
    Exercise 7.13(a), a circuit is satisfiable exactly when its canonical width-three CNF is. 
  • defdefined in FABL/Chapter07/CNFReductions.lean
    complete
    def FABL.BooleanCircuit.toExactlyThreeCNF {n : }
      (C : FABL.BooleanCircuit n) : FABL.CNFFormula (n + C.gateCount + 3)
    def FABL.BooleanCircuit.toExactlyThreeCNF
      {n : } (C : FABL.BooleanCircuit n) :
      FABL.CNFFormula (n + C.gateCount + 3)
    The exact-three form of the canonical circuit CNF. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.BooleanCircuit.toExactlyThreeCNF_clause_width_eq_three {n : }
      (C : FABL.BooleanCircuit n)
      {clause : FABL.DNFTerm (n + C.gateCount + 3)}
      (hclause : clause  C.toExactlyThreeCNF.clauses) : clause.width = 3
    theorem FABL.BooleanCircuit.toExactlyThreeCNF_clause_width_eq_three
      {n : } (C : FABL.BooleanCircuit n)
      {clause :
        FABL.DNFTerm (n + C.gateCount + 3)}
      (hclause :
        clause 
          C.toExactlyThreeCNF.clauses) :
      clause.width = 3
    Every clause of the exact-three circuit CNF contains exactly three distinct literals. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.BooleanCircuit.toExactlyThreeCNF_size_le {n : }
      (C : FABL.BooleanCircuit n) :
      C.toExactlyThreeCNF.size  8 * (3 * C.gateCount + 1)
    theorem FABL.BooleanCircuit.toExactlyThreeCNF_size_le
      {n : } (C : FABL.BooleanCircuit n) :
      C.toExactlyThreeCNF.size 
        8 * (3 * C.gateCount + 1)
    The exact-three circuit CNF retains a linear clause bound. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.BooleanCircuit.satisfiable_iff_toExactlyThreeCNF_satisfiable
      {n : } (C : FABL.BooleanCircuit n) :
      C.Satisfiable   assignment, C.toExactlyThreeCNF.eval assignment = -1
    theorem FABL.BooleanCircuit.satisfiable_iff_toExactlyThreeCNF_satisfiable
      {n : } (C : FABL.BooleanCircuit n) :
      C.Satisfiable 
         assignment,
          C.toExactlyThreeCNF.eval
              assignment =
            -1
    A circuit is satisfiable exactly when its exact-three CNF is satisfiable. 
  • abbrevdefined in FABL/Chapter07/CNFReductions.lean
    complete
    abbrev FABL.EncodedBooleanCircuit : Type
    abbrev FABL.EncodedBooleanCircuit : Type
    Size-indexed canonical Boolean circuits at the encoding boundary. 
  • abbrevdefined in FABL/Chapter07/CNFReductions.lean
    complete
    abbrev FABL.EncodedThreeCNF : Type
    abbrev FABL.EncodedThreeCNF : Type
    Arity-indexed exact-three CNF formulas at the encoding boundary. 
  • defdefined in FABL/Chapter07/CNFReductions.lean
    complete
    def FABL.circuitToThreeCNF :
      FABL.EncodedBooleanCircuit  FABL.EncodedThreeCNF
    def FABL.circuitToThreeCNF :
      FABL.EncodedBooleanCircuit 
        FABL.EncodedThreeCNF
    The pure canonical reduction underlying Exercise 7.13(a). 
  • defdefined in FABL/Chapter07/CNFReductions.lean
    complete
    def FABL.encodedCircuitSatLanguage
      (encoding : FABL.BinaryEncoding FABL.EncodedBooleanCircuit) :
      Language Bool
    def FABL.encodedCircuitSatLanguage
      (encoding :
        FABL.BinaryEncoding
          FABL.EncodedBooleanCircuit) :
      Language Bool
    Satisfiable encoded circuits, with malformed strings excluded explicitly. 
  • defdefined in FABL/Chapter07/CNFReductions.lean
    complete
    def FABL.encodedThreeCNFSatLanguage
      (encoding : FABL.BinaryEncoding FABL.EncodedThreeCNF) : Language Bool
    def FABL.encodedThreeCNFSatLanguage
      (encoding :
        FABL.BinaryEncoding
          FABL.EncodedThreeCNF) :
      Language Bool
    Satisfiable encoded exact-three CNFs, with malformed strings excluded explicitly. 
  • structure(3 fields)defined in FABL/Chapter07/CNFReductions.lean
    complete
    structure FABL.CircuitThreeCNFPolytimeAdapter
      (circuitEncoding : FABL.BinaryEncoding FABL.EncodedBooleanCircuit)
      (cnfEncoding : FABL.BinaryEncoding FABL.EncodedThreeCNF) : Type 1
    structure FABL.CircuitThreeCNFPolytimeAdapter
      (circuitEncoding :
        FABL.BinaryEncoding
          FABL.EncodedBooleanCircuit)
      (cnfEncoding :
        FABL.BinaryEncoding
          FABL.EncodedThreeCNF) :
      Type 1
    The narrow CSLib boundary for the canonical Circuit-Sat to exact-three-CNF reduction.
    Malformed source strings must remain malformed; no finite computability claim is promoted to a
    polynomial-time claim. 
    reduction : FABL.PolytimeMap
    Certified polynomial-time binary-string implementation. 
    reduction_encode :  (circuit : FABL.EncodedBooleanCircuit),
      self.reduction.toFun (circuitEncoding.encode circuit) = cnfEncoding.encode (FABL.circuitToThreeCNF circuit)
    Exact behavior on canonical circuit encodings. 
    reduction_malformed :  (bits : List Bool), circuitEncoding.decode bits = none  cnfEncoding.decode (self.reduction.toFun bits) = none
    Malformed encodings cannot become target instances. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.CircuitThreeCNFPolytimeAdapter.karpReducible
      {circuitEncoding : FABL.BinaryEncoding FABL.EncodedBooleanCircuit}
      {cnfEncoding : FABL.BinaryEncoding FABL.EncodedThreeCNF}
      (adapter :
        FABL.CircuitThreeCNFPolytimeAdapter circuitEncoding cnfEncoding) :
      FABL.encodedCircuitSatLanguage circuitEncoding ≤ₖ
        FABL.encodedThreeCNFSatLanguage cnfEncoding
    theorem FABL.CircuitThreeCNFPolytimeAdapter.karpReducible
      {circuitEncoding :
        FABL.BinaryEncoding
          FABL.EncodedBooleanCircuit}
      {cnfEncoding :
        FABL.BinaryEncoding
          FABL.EncodedThreeCNF}
      (adapter :
        FABL.CircuitThreeCNFPolytimeAdapter
          circuitEncoding cnfEncoding) :
      FABL.encodedCircuitSatLanguage
          circuitEncoding ≤ₖ
        FABL.encodedThreeCNFSatLanguage
          cnfEncoding
    Exercise 7.13(a), encoded form: the supplied CSLib machine is a Karp reduction from
    Circuit-Sat to exact-three-CNF-Sat. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.CircuitThreeCNFPolytimeAdapter.circuitSatKarpReducibleToMaxE3Sat
      {circuitEncoding : FABL.BinaryEncoding FABL.EncodedBooleanCircuit}
      {cnfEncoding : FABL.BinaryEncoding FABL.EncodedThreeCNF}
      (adapter :
        FABL.CircuitThreeCNFPolytimeAdapter circuitEncoding cnfEncoding) :
      FABL.encodedCircuitSatLanguage circuitEncoding ≤ₖ
        FABL.encodedThreeCNFSatLanguage cnfEncoding
    theorem FABL.CircuitThreeCNFPolytimeAdapter.circuitSatKarpReducibleToMaxE3Sat
      {circuitEncoding :
        FABL.BinaryEncoding
          FABL.EncodedBooleanCircuit}
      {cnfEncoding :
        FABL.BinaryEncoding
          FABL.EncodedThreeCNF}
      (adapter :
        FABL.CircuitThreeCNFPolytimeAdapter
          circuitEncoding cnfEncoding) :
      FABL.encodedCircuitSatLanguage
          circuitEncoding ≤ₖ
        FABL.encodedThreeCNFSatLanguage
          cnfEncoding
    Exercise 7.13(c), formalizable reduction component: Circuit-Sat Karp-reduces to the
    satisfiability language of exact-three CNFs. The external NP-hardness premise for Circuit-Sat is
    deliberately not asserted by this theorem. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.CircuitThreeCNFPolytimeAdapter.promiseKarpReducible
      {circuitEncoding : FABL.BinaryEncoding FABL.EncodedBooleanCircuit}
      {cnfEncoding : FABL.BinaryEncoding FABL.EncodedThreeCNF}
      (adapter :
        FABL.CircuitThreeCNFPolytimeAdapter circuitEncoding cnfEncoding) :
      FABL.PromiseKarpReducible
        (FABL.CircuitThreeCNFPolytimeAdapter.circuitSatPromise
          circuitEncoding)
        (FABL.CircuitThreeCNFPolytimeAdapter.threeCNFSatPromise cnfEncoding)
    theorem FABL.CircuitThreeCNFPolytimeAdapter.promiseKarpReducible
      {circuitEncoding :
        FABL.BinaryEncoding
          FABL.EncodedBooleanCircuit}
      {cnfEncoding :
        FABL.BinaryEncoding
          FABL.EncodedThreeCNF}
      (adapter :
        FABL.CircuitThreeCNFPolytimeAdapter
          circuitEncoding cnfEncoding) :
      FABL.PromiseKarpReducible
        (FABL.CircuitThreeCNFPolytimeAdapter.circuitSatPromise
          circuitEncoding)
        (FABL.CircuitThreeCNFPolytimeAdapter.threeCNFSatPromise
          cnfEncoding)
    The canonical encoded reduction preserves both sides of the satisfiability promise. 
  • structure(4 fields)defined in FABL/Chapter07/CNFReductions.lean
    complete
    structure FABL.EncodedMaxThreeSatModel
      (encoding : FABL.BinaryEncoding FABL.EncodedThreeCNF) : Type
    structure FABL.EncodedMaxThreeSatModel
      (encoding :
        FABL.BinaryEncoding
          FABL.EncodedThreeCNF) :
      Type
    Semantic presentation of encoded Max-3-Sat on the exact-three instances produced by the
    reduction. The concrete encoder and objective implementation are injected; normalization and the
    exact optimum-one criterion are not inferred from finite computability. The same interface
    specializes directly to Max-E3-Sat for Exercise 7.13(c). 
    problem : FABL.EncodedMaximizationProblem
    Encoded maximization problem used by the approximation algorithm. 
    encode_mem_instances :  (formula : FABL.EncodedThreeCNF), encoding.encode formula  self.problem.instances
    Every canonical exact-three formula is a valid maximization instance. 
    optimum_le_one :  (formula : FABL.EncodedThreeCNF), self.problem.optimum (encoding.encode formula)  1
    Max-E3-Sat values are normalized by one. 
    optimum_eq_one_iff :  (formula : FABL.EncodedThreeCNF), self.problem.optimum (encoding.encode formula) = 1  formula.snd.Satisfiable
    Optimum one is exactly satisfiability of the encoded formula. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.EncodedMaxThreeSatModel.distinguishesThreeCNFSat
      {encoding : FABL.BinaryEncoding FABL.EncodedThreeCNF}
      (model : FABL.EncodedMaxThreeSatModel encoding)
      (algorithm : FABL.PolytimeMap)
      (happrox : algorithm.IsThresholdApproximation model.problem 1 1)
      (thresholdTest : algorithm.ValueThresholdTest model.problem 1) :
      thresholdTest.decision.DistinguishesPromise
        (FABL.CircuitThreeCNFPolytimeAdapter.threeCNFSatPromise encoding)
    theorem FABL.EncodedMaxThreeSatModel.distinguishesThreeCNFSat
      {encoding :
        FABL.BinaryEncoding
          FABL.EncodedThreeCNF}
      (model :
        FABL.EncodedMaxThreeSatModel encoding)
      (algorithm : FABL.PolytimeMap)
      (happrox :
        algorithm.IsThresholdApproximation
          model.problem 1 1)
      (thresholdTest :
        algorithm.ValueThresholdTest
          model.problem 1) :
      thresholdTest.decision.DistinguishesPromise
        (FABL.CircuitThreeCNFPolytimeAdapter.threeCNFSatPromise
          encoding)
    A certified `(1,1)` Max-E3-Sat approximation, together with a certified value-one test,
    distinguishes satisfiable from unsatisfiable canonical exact-three formulas. 
  • theoremdefined in FABL/Chapter07/CNFReductions.lean
    complete
    theorem FABL.EncodedMaxThreeSatModel.circuitSatDistinguisherOfOneOneApproximation
      {circuitEncoding : FABL.BinaryEncoding FABL.EncodedBooleanCircuit}
      {cnfEncoding : FABL.BinaryEncoding FABL.EncodedThreeCNF}
      (adapter :
        FABL.CircuitThreeCNFPolytimeAdapter circuitEncoding cnfEncoding)
      (model : FABL.EncodedMaxThreeSatModel cnfEncoding)
      (algorithm : FABL.PolytimeMap)
      (happrox : algorithm.IsThresholdApproximation model.problem 1 1)
      (thresholdTest : algorithm.ValueThresholdTest model.problem 1) :
      FABL.HasPolytimeDistinguisher
        (FABL.CircuitThreeCNFPolytimeAdapter.circuitSatPromise
          circuitEncoding)
    theorem FABL.EncodedMaxThreeSatModel.circuitSatDistinguisherOfOneOneApproximation
      {circuitEncoding :
        FABL.BinaryEncoding
          FABL.EncodedBooleanCircuit}
      {cnfEncoding :
        FABL.BinaryEncoding
          FABL.EncodedThreeCNF}
      (adapter :
        FABL.CircuitThreeCNFPolytimeAdapter
          circuitEncoding cnfEncoding)
      (model :
        FABL.EncodedMaxThreeSatModel
          cnfEncoding)
      (algorithm : FABL.PolytimeMap)
      (happrox :
        algorithm.IsThresholdApproximation
          model.problem 1 1)
      (thresholdTest :
        algorithm.ValueThresholdTest
          model.problem 1) :
      FABL.HasPolytimeDistinguisher
        (FABL.CircuitThreeCNFPolytimeAdapter.circuitSatPromise
          circuitEncoding)
    Exercise 7.13(b), fully encoded conditional form: an efficient `(1,1)` Max-3-Sat
    approximation on the exact-three instances produced by the reduction yields an efficient
    Circuit-Sat promise distinguisher through the canonical CSLib-certified reduction. 
Lemma7.5.14
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Lemma 7.3.5
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 7.14. Give an efficient (1,1)-approximation for Max-Cut: when the instance is satisfiable, find a bipartition which cuts every edge.

The finite all-cut assignment and its correctness are proved. The generic encoded endpoint requires a supplied polynomial-time search implementation agreeing with that assignment.

Lean code for Lemma7.5.145 declarations
  • defdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    def FABL.maxCutSatisfyingAssignment.{u_1} {V : Type u_1} [Finite V]
      (P : FABL.CSPInstance FABL.maxCutTemplate V) : V  FABL.Sign
    def FABL.maxCutSatisfyingAssignment.{u_1}
      {V : Type u_1} [Finite V]
      (P :
        FABL.CSPInstance FABL.maxCutTemplate
          V) :
      V  FABL.Sign
    The canonical finite Max-Cut search result.  Its efficient implementation is kept separate
    in `MaxCutPolytimeSearch`. 
  • theoremdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    theorem FABL.maxCutSatisfyingAssignment_fullySatisfied.{u_1} {V : Type u_1}
      [Finite V] (P : FABL.CSPInstance FABL.maxCutTemplate V)
      (hP : P.Satisfiable) :
      P.FullySatisfied (FABL.maxCutSatisfyingAssignment P)
    theorem FABL.maxCutSatisfyingAssignment_fullySatisfied.{u_1}
      {V : Type u_1} [Finite V]
      (P :
        FABL.CSPInstance FABL.maxCutTemplate
          V)
      (hP : P.Satisfiable) :
      P.FullySatisfied
        (FABL.maxCutSatisfyingAssignment P)
    O'Donnell, Exercise 7.14, finite correctness: on a satisfiable Max-Cut instance the selected
    bipartition cuts every edge. 
  • defdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    def FABL.encodedMaxCutProblem.{u_1} {V : Type u_1} [Finite V]
      (instanceEncoding :
        FABL.BinaryEncoding (FABL.CSPInstance FABL.maxCutTemplate V))
      (assignmentEncoding : FABL.BinaryEncoding (V  FABL.Sign)) :
      FABL.EncodedMaximizationProblem
    def FABL.encodedMaxCutProblem.{u_1}
      {V : Type u_1} [Finite V]
      (instanceEncoding :
        FABL.BinaryEncoding
          (FABL.CSPInstance
            FABL.maxCutTemplate V))
      (assignmentEncoding :
        FABL.BinaryEncoding (V  FABL.Sign)) :
      FABL.EncodedMaximizationProblem
    Binary presentation of a fixed finite-variable Max-Cut problem. 
  • structure(2 fields)defined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    structure FABL.MaxCutPolytimeSearch.{u_1} {V : Type u_1} [Finite V]
      (instanceEncoding :
        FABL.BinaryEncoding (FABL.CSPInstance FABL.maxCutTemplate V))
      (assignmentEncoding : FABL.BinaryEncoding (V  FABL.Sign)) : Type 1
    structure FABL.MaxCutPolytimeSearch.{u_1}
      {V : Type u_1} [Finite V]
      (instanceEncoding :
        FABL.BinaryEncoding
          (FABL.CSPInstance
            FABL.maxCutTemplate V))
      (assignmentEncoding :
        FABL.BinaryEncoding (V  FABL.Sign)) :
      Type 1
    The explicit CSLib boundary for Exercise 7.14: a polynomial-time machine computes the
    canonical all-cut assignment on canonical encodings. 
    algorithm : FABL.PolytimeMap
    Certified polynomial-time binary-string implementation. 
    algorithm_encode :  (P : FABL.CSPInstance FABL.maxCutTemplate V),
      self.algorithm.toFun (instanceEncoding.encode P) = assignmentEncoding.encode (FABL.maxCutSatisfyingAssignment P)
    Exact behavior on canonical instances. 
  • theoremdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    theorem FABL.MaxCutPolytimeSearch.isThresholdApproximation.{u_1} {V : Type u_1}
      [Finite V]
      {instanceEncoding :
        FABL.BinaryEncoding (FABL.CSPInstance FABL.maxCutTemplate V)}
      {assignmentEncoding : FABL.BinaryEncoding (V  FABL.Sign)}
      (search :
        FABL.MaxCutPolytimeSearch instanceEncoding assignmentEncoding) :
      search.algorithm.IsThresholdApproximation
        (FABL.encodedMaxCutProblem instanceEncoding assignmentEncoding) 1 1
    theorem FABL.MaxCutPolytimeSearch.isThresholdApproximation.{u_1}
      {V : Type u_1} [Finite V]
      {instanceEncoding :
        FABL.BinaryEncoding
          (FABL.CSPInstance
            FABL.maxCutTemplate V)}
      {assignmentEncoding :
        FABL.BinaryEncoding (V  FABL.Sign)}
      (search :
        FABL.MaxCutPolytimeSearch
          instanceEncoding
          assignmentEncoding) :
      search.algorithm.IsThresholdApproximation
        (FABL.encodedMaxCutProblem
          instanceEncoding assignmentEncoding)
        1 1
    The certified Max-Cut search machine is an efficient `(1,1)` approximation: whenever the
    encoded instance is satisfiable, its output decodes to a bipartition cutting every edge. 
Lemma7.5.15
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Theorem 1.6.5
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 2
Reverse dependency previews
Preview
Lemma 7.5.16
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Exercise 7.15. Let H\le\mathbb F_2^n and \mathcal H= \{\chi_\gamma:\mathbb F_2^n\to\{-1,1\}:\gamma\in H^\perp\}.

(a) Construct a 3-query local tester for \mathcal H with rejection rate 1.

(b) Extend the construction from linear subspaces H to affine subspaces.

Lean code for Lemma7.5.156 declarations
  • defdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    def FABL.IsPerpendicularCharacter {n : }
      (H : Submodule FABL.𝔽₂ (FABL.F₂Cube n))
      (f : FABL.F₂Cube n  FABL.Sign) : Prop
    def FABL.IsPerpendicularCharacter {n : }
      (H : Submodule FABL.𝔽₂ (FABL.F₂Cube n))
      (f : FABL.F₂Cube n  FABL.Sign) : Prop
    The book-facing family of positive Walsh characters indexed by `Hᵖ`. 
  • theoremdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    theorem FABL.isSplitCharacter_iff_isPerpendicularCharacter {n : }
      {H : Submodule FABL.𝔽₂ (FABL.F₂Cube n)}
      (split : FABL.BinarySubspaceSplit H) (f : FABL.F₂Cube n  FABL.Sign) :
      FABL.IsSplitCharacter split f  FABL.IsPerpendicularCharacter H f
    theorem FABL.isSplitCharacter_iff_isPerpendicularCharacter
      {n : }
      {H : Submodule FABL.𝔽₂ (FABL.F₂Cube n)}
      (split : FABL.BinarySubspaceSplit H)
      (f : FABL.F₂Cube n  FABL.Sign) :
      FABL.IsSplitCharacter split f 
        FABL.IsPerpendicularCharacter H f
    Complementary-coordinate characters are exactly the characters indexed by `Hᵖ`. 
  • theoremdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    theorem FABL.perpendicularCharacterFunctionTester_isLocalTester {n : }
      (H : Submodule FABL.𝔽₂ (FABL.F₂Cube n)) :
      FABL.IsLocalTester
        (FABL.splitCharacterFunctionTester (FABL.binarySubspaceSplit H))
        (FABL.IsPerpendicularCharacter H) 1
    theorem FABL.perpendicularCharacterFunctionTester_isLocalTester
      {n : }
      (H :
        Submodule FABL.𝔽₂ (FABL.F₂Cube n)) :
      FABL.IsLocalTester
        (FABL.splitCharacterFunctionTester
          (FABL.binarySubspaceSplit H))
        (FABL.IsPerpendicularCharacter H) 1
    Exercise 7.15(a): the canonical complementary split gives a three-query, rate-one
    local tester for `{χ_γ | γ ∈ Hᵖ}`. 
  • defdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    def FABL.IsAffineFrequencyCharacter {n : }
      (V : Submodule FABL.𝔽₂ (FABL.F₂Cube n)) (a : FABL.F₂Cube n)
      (f : FABL.F₂Cube n  FABL.Sign) : Prop
    def FABL.IsAffineFrequencyCharacter {n : }
      (V : Submodule FABL.𝔽₂ (FABL.F₂Cube n))
      (a : FABL.F₂Cube n)
      (f : FABL.F₂Cube n  FABL.Sign) : Prop
    The positive Walsh characters whose frequencies lie in the affine space `V + a`. 
  • defdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    def FABL.affineCharacterFunctionTester {n : }
      (V : Submodule FABL.𝔽₂ (FABL.F₂Cube n)) (a : FABL.F₂Cube n) :
      FABL.NonadaptiveFunctionTester (FABL.F₂Cube n) FABL.Sign 3
    def FABL.affineCharacterFunctionTester {n : }
      (V : Submodule FABL.𝔽₂ (FABL.F₂Cube n))
      (a : FABL.F₂Cube n) :
      FABL.NonadaptiveFunctionTester
        (FABL.F₂Cube n) FABL.Sign 3
    Exercise 7.15(b)'s three-query tester for an affine frequency space. 
  • theoremdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    theorem FABL.affineCharacterFunctionTester_isLocalTester {n : }
      (V : Submodule FABL.𝔽₂ (FABL.F₂Cube n)) (a : FABL.F₂Cube n) :
      FABL.IsLocalTester (FABL.affineCharacterFunctionTester V a)
        (FABL.IsAffineFrequencyCharacter V a) 1
    theorem FABL.affineCharacterFunctionTester_isLocalTester
      {n : }
      (V : Submodule FABL.𝔽₂ (FABL.F₂Cube n))
      (a : FABL.F₂Cube n) :
      FABL.IsLocalTester
        (FABL.affineCharacterFunctionTester V
          a)
        (FABL.IsAffineFrequencyCharacter V a)
        1
    Exercise 7.15(b): every affine family of positive Walsh characters has a three-query
    local tester with rejection rate one. 
Lemma7.5.16
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Proposition 1.6.6
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Exercise 7.16. Every affine subspace A\subseteq\mathbb F_2^n has a 3-query PCPP of proof length 2^n and positive universal rejection rate. Regard the proof as the truth table of a character \chi_w, test membership in the character family from Exercise 7.15, and compare local corrections at random coordinate vectors with the alleged input.

For n>0 the formal description has proof length exactly 2^n and rejection rate 1/8. When n=0, relative distance has a zero-cardinality denominator and the affine property is universal; the formalization records this endpoint separately and provides an umbrella theorem covering both cases.

Lean code for Lemma7.5.165 declarations
  • defdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    def FABL.IsBoolAffineSubspace {n : }
      (V : Submodule FABL.𝔽₂ (FABL.F₂Cube n)) (a : FABL.F₂Cube n)
      (w : Fin n  Bool) : Prop
    def FABL.IsBoolAffineSubspace {n : }
      (V : Submodule FABL.𝔽₂ (FABL.F₂Cube n))
      (a : FABL.F₂Cube n) (w : Fin n  Bool) :
      Prop
    The Boolean strings whose binary encodings lie in the affine subspace `V + a`. 
  • defdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    def FABL.affineSubspacePCPPDescription {n : }
      (V : Submodule FABL.𝔽₂ (FABL.F₂Cube n)) (a : FABL.F₂Cube n)
      [NeZero n] : FABL.PCPPDescription n (FABL.IsBoolAffineSubspace V a)
    def FABL.affineSubspacePCPPDescription {n : }
      (V : Submodule FABL.𝔽₂ (FABL.F₂Cube n))
      (a : FABL.F₂Cube n) [NeZero n] :
      FABL.PCPPDescription n
        (FABL.IsBoolAffineSubspace V a)
    The exact finite resource description supplied by Exercise 7.16. 
  • theoremdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    theorem FABL.affineSubspacePCPPSystem_isPCPP {n : }
      (V : Submodule FABL.𝔽₂ (FABL.F₂Cube n)) (a : FABL.F₂Cube n)
      [NeZero n] :
      FABL.IsPCPP (FABL.affineSubspacePCPPSystem V a)
        (FABL.IsBoolAffineSubspace V a) (1 / 8)
    theorem FABL.affineSubspacePCPPSystem_isPCPP
      {n : }
      (V : Submodule FABL.𝔽₂ (FABL.F₂Cube n))
      (a : FABL.F₂Cube n) [NeZero n] :
      FABL.IsPCPP
        (FABL.affineSubspacePCPPSystem V a)
        (FABL.IsBoolAffineSubspace V a)
        (1 / 8)
    Exercise 7.16: every affine subspace has a three-query, length-`2^n` PCPP with
    universal rejection rate `1/8`. 
  • theoremdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    theorem FABL.isBoolAffineSubspace_zero (V : Submodule FABL.𝔽₂ (FABL.F₂Cube 0))
      (a : FABL.F₂Cube 0) (w : Fin 0  Bool) :
      FABL.IsBoolAffineSubspace V a w
    theorem FABL.isBoolAffineSubspace_zero
      (V : Submodule FABL.𝔽₂ (FABL.F₂Cube 0))
      (a : FABL.F₂Cube 0) (w : Fin 0  Bool) :
      FABL.IsBoolAffineSubspace V a w
    In dimension zero the unique Boolean word belongs to every affine subspace. 
  • theoremdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    theorem FABL.affineSubspacePCPPDescription_or_zero {n : }
      (V : Submodule FABL.𝔽₂ (FABL.F₂Cube n)) (a : FABL.F₂Cube n) :
      (n = 0   (w : Fin n  Bool), FABL.IsBoolAffineSubspace V a w) 
         (h : NeZero n),
          Nonempty (FABL.PCPPDescription n (FABL.IsBoolAffineSubspace V a))
    theorem FABL.affineSubspacePCPPDescription_or_zero
      {n : }
      (V : Submodule FABL.𝔽₂ (FABL.F₂Cube n))
      (a : FABL.F₂Cube n) :
      (n = 0 
           (w : Fin n  Bool),
            FABL.IsBoolAffineSubspace V a w) 
         (h : NeZero n),
          Nonempty
            (FABL.PCPPDescription n
              (FABL.IsBoolAffineSubspace V a))
    Exercise 7.16 for every dimension: dimension zero is the universal endpoint, while every
    positive dimension has the stated length-`2^n`, three-query PCPP description. 
Lemma7.5.17
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Lemma 5.1.3
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 7.17.

(a) For even n, construct a 3-query, length-O(n) PCPP for \{w\in\mathbb F_2^n:\operatorname{IP}_n(w)=1\}.

(b) Construct a PCPP with the same asymptotic parameters for the complete-quadratic predicate \operatorname{CQ}_n.

For positive m, the inner-product construction has proof length 2m+1 for input length 2m and rejection rate 1/4; at m=0 the target property is empty and is recorded by the zero-dimensional umbrella theorem. The complete-quadratic construction has proof length 3n+2\le5n for positive n and rejection rate 1/12; the dimensions n=0 and n=1 are handled explicitly rather than hidden behind a nonempty-domain convention.

Lean code for Lemma7.5.1712 declarations
  • defdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    def FABL.IsInnerProductModTwoOne (m : ) (w : Fin (m + m)  Bool) : Prop
    def FABL.IsInnerProductModTwoOne (m : )
      (w : Fin (m + m)  Bool) : Prop
    The Boolean string property `IP_{2m}(w) = 1`, through the explicit binary bridge. 
  • defdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    def FABL.innerProductLinearPCPPDescription (m : ) [NeZero m] :
      FABL.PCPPDescription (m + m) (FABL.IsInnerProductModTwoOne m)
    def FABL.innerProductLinearPCPPDescription
      (m : ) [NeZero m] :
      FABL.PCPPDescription (m + m)
        (FABL.IsInnerProductModTwoOne m)
    The exact finite resource description for the inner-product PCPP in Exercise 7.17(a). 
  • theoremdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    theorem FABL.innerProductLinearPCPPSystem_isPCPP (m : ) [NeZero m] :
      FABL.IsPCPP (FABL.innerProductLinearPCPPSystem m)
        (FABL.IsInnerProductModTwoOne m) (1 / 4)
    theorem FABL.innerProductLinearPCPPSystem_isPCPP
      (m : ) [NeZero m] :
      FABL.IsPCPP
        (FABL.innerProductLinearPCPPSystem m)
        (FABL.IsInnerProductModTwoOne m)
        (1 / 4)
    Exercise 7.17(a): the inner-product-one property has a three-query PCPP with
    linear proof length and universal rejection rate `1/4`. 
  • theoremdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    theorem FABL.innerProductLinearPCPPDescription_proofLength_le_twice_inputLength
      (m : ) [NeZero m] :
      (FABL.innerProductLinearPCPPDescription m).proofLength  2 * (m + m)
    theorem FABL.innerProductLinearPCPPDescription_proofLength_le_twice_inputLength
      (m : ) [NeZero m] :
      (FABL.innerProductLinearPCPPDescription
            m).proofLength 
        2 * (m + m)
    The exact proof length `2m+1` is at most twice the input length `2m`. 
  • theoremdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    theorem FABL.not_isInnerProductModTwoOne_zero (w : Fin 0  Bool) :
      ¬FABL.IsInnerProductModTwoOne 0 w
    theorem FABL.not_isInnerProductModTwoOne_zero
      (w : Fin 0  Bool) :
      ¬FABL.IsInnerProductModTwoOne 0 w
    In dimension zero the inner-product-one property is empty. 
  • theoremdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    theorem FABL.innerProductLinearPCPPDescription_or_zero (m : ) :
      (m = 0 
           (w : Fin (m + m)  Bool), ¬FABL.IsInnerProductModTwoOne m w) 
         (h : NeZero (m + m)),
          Nonempty
            (FABL.PCPPDescription (m + m) (FABL.IsInnerProductModTwoOne m))
    theorem FABL.innerProductLinearPCPPDescription_or_zero
      (m : ) :
      (m = 0 
           (w : Fin (m + m)  Bool),
            ¬FABL.IsInnerProductModTwoOne m
                w) 
         (h : NeZero (m + m)),
          Nonempty
            (FABL.PCPPDescription (m + m)
              (FABL.IsInnerProductModTwoOne
                m))
    Exercise 7.17(a) for every dimension: dimension zero is the empty endpoint, while every
    positive half-dimension has the explicit linear-length, three-query PCPP description. 
  • defdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    def FABL.IsCompleteQuadraticOne (n : ) (w : Fin n  Bool) : Prop
    def FABL.IsCompleteQuadraticOne (n : )
      (w : Fin n  Bool) : Prop
    The Boolean string property `CQ_n(w) = 1`, through the explicit binary bridge. 
  • defdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    def FABL.completeQuadraticLinearPCPPDescription (n : ) [NeZero n] :
      FABL.PCPPDescription n (FABL.IsCompleteQuadraticOne n)
    def FABL.completeQuadraticLinearPCPPDescription
      (n : ) [NeZero n] :
      FABL.PCPPDescription n
        (FABL.IsCompleteQuadraticOne n)
    The exact finite resource description for the complete-quadratic PCPP in Exercise 7.17(b). 
  • theoremdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    theorem FABL.completeQuadraticLinearPCPPSystem_isPCPP (n : ) [NeZero n] :
      FABL.IsPCPP (FABL.completeQuadraticLinearPCPPSystem n)
        (FABL.IsCompleteQuadraticOne n) (1 / 12)
    theorem FABL.completeQuadraticLinearPCPPSystem_isPCPP
      (n : ) [NeZero n] :
      FABL.IsPCPP
        (FABL.completeQuadraticLinearPCPPSystem
          n)
        (FABL.IsCompleteQuadraticOne n)
        (1 / 12)
    Exercise 7.17(b): the complete-quadratic-one property has a three-query PCPP with exact
    proof length `3n+2` and universal rejection rate `1/12`. 
  • theoremdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    theorem FABL.completeQuadraticLinearPCPPDescription_proofLength_le_five_mul
      (n : ) [NeZero n] :
      (FABL.completeQuadraticLinearPCPPDescription n).proofLength  5 * n
    theorem FABL.completeQuadraticLinearPCPPDescription_proofLength_le_five_mul
      (n : ) [NeZero n] :
      (FABL.completeQuadraticLinearPCPPDescription
            n).proofLength 
        5 * n
    The exact proof length `3n+2` is at most five times the positive input length. 
  • theoremdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    theorem FABL.not_isCompleteQuadraticOne_zero (w : Fin 0  Bool) :
      ¬FABL.IsCompleteQuadraticOne 0 w
    theorem FABL.not_isCompleteQuadraticOne_zero
      (w : Fin 0  Bool) :
      ¬FABL.IsCompleteQuadraticOne 0 w
    In dimension zero the complete-quadratic-one property is empty. 
  • theoremdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    theorem FABL.completeQuadraticLinearPCPPDescription_or_zero (n : ) :
      (n = 0   (w : Fin n  Bool), ¬FABL.IsCompleteQuadraticOne n w) 
         (h : NeZero n),
          Nonempty (FABL.PCPPDescription n (FABL.IsCompleteQuadraticOne n))
    theorem FABL.completeQuadraticLinearPCPPDescription_or_zero
      (n : ) :
      (n = 0 
           (w : Fin n  Bool),
            ¬FABL.IsCompleteQuadraticOne n
                w) 
         (h : NeZero n),
          Nonempty
            (FABL.PCPPDescription n
              (FABL.IsCompleteQuadraticOne n))
    Exercise 7.17(b) for every dimension: dimension zero is the empty endpoint, while every
    positive dimension has the explicit linear-length, three-query PCPP description. 
Lemma7.5.18
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 5
Statement dependency previews
Preview
Theorem 1.6.5
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Exercise 7.18.

(a) If D\in\mathbb F_2^{n\times n} is nonzero and x,y are independent and uniform, prove \Pr[y^\mathsf T D x\ne0]\ge\frac14.

(b) For \gamma\in\mathbb F_2^n and \Gamma\in\mathbb F_2^{n\times n}, prove that \Pr[(\gamma^\mathsf Tx)(\gamma^\mathsf Ty) =\Gamma\mathbin\bullet(xy^\mathsf T)] equals 1 when \Gamma=\gamma\gamma^\mathsf T and is at most 3/4 otherwise.

(c) Given query access to \ell:\mathbb F_2^n\to\mathbb F_2 and q:\mathbb F_2^{n\times n}\to\mathbb F_2, construct a 4-query test with perfect completeness for pairs (\chi_\gamma,\chi_{\gamma\gamma^\mathsf T}) and positive linear soundness. The soundness threshold is 1-\lambda\epsilon; the book's 1-\gamma\epsilon is a typographical collision with the vector \gamma.

(d) For any system L of homogeneous quadratic equations \sum_{i,j}c_{ij}w_iw_j=b, construct a 4-query PCPP of proof length 2^n+2^{n^2}.

(e) Encode a circuit's gate values by homogeneous quadratic equations, add the two truth tables and consistency tests above, and apply Exercise 7.12 to obtain Theorem 7.19 with proof length exponential in a polynomial of the circuit size.

The finite reduction, all PCPP parameters, and the exponential proof-length bound are proved. The output-sensitive machine implementing the generic binary codec remains an explicit witness at Definition 7.17's boundary.

Lean code for Lemma7.5.1832 declarations
  • defdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    def FABL.matrixBilinearNonzeroProbability {n : }
      (D : Matrix (Fin n) (Fin n) FABL.𝔽₂) : 
    def FABL.matrixBilinearNonzeroProbability
      {n : }
      (D : Matrix (Fin n) (Fin n) FABL.𝔽₂) : 
    Uniform nonzero probability of the bilinear form on two independent binary vectors. 
  • theoremdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    theorem FABL.one_fourth_le_matrixBilinearNonzeroProbability {n : }
      (D : Matrix (Fin n) (Fin n) FABL.𝔽₂) (hD : D  0) :
      1 / 4  FABL.matrixBilinearNonzeroProbability D
    theorem FABL.one_fourth_le_matrixBilinearNonzeroProbability
      {n : }
      (D : Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (hD : D  0) :
      1 / 4 
        FABL.matrixBilinearNonzeroProbability
          D
    Exercise 7.18(a): if `D` is nonzero then independent uniform `x,y` satisfy
    `xᵀ D y ≠ 0` with probability at least `1/4`. 
  • defdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    def FABL.rankOneSelfMatrix {n : } (γ : FABL.F₂Cube n) :
      Matrix (Fin n) (Fin n) FABL.𝔽₂
    def FABL.rankOneSelfMatrix {n : }
      (γ : FABL.F₂Cube n) :
      Matrix (Fin n) (Fin n) FABL.𝔽₂
    The rank-one matrix `γγᵀ`. 
  • defdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    def FABL.matrixRankOnePairing {n : } (Γ : Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (x y : FABL.F₂Cube n) : FABL.𝔽₂
    def FABL.matrixRankOnePairing {n : }
      (Γ : Matrix (Fin n) (Fin n) FABL.𝔽₂)
      (x y : FABL.F₂Cube n) : FABL.𝔽₂
    Frobenius pairing with a rank-one query `xyᵀ`, written without changing the matrix
    orientation used in the book. 
  • defdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    def FABL.rankOneConsistencyProbability {n : } (γ : FABL.F₂Cube n)
      (Γ : Matrix (Fin n) (Fin n) FABL.𝔽₂) : 
    def FABL.rankOneConsistencyProbability {n : }
      (γ : FABL.F₂Cube n)
      (Γ : Matrix (Fin n) (Fin n) FABL.𝔽₂) : 
    Uniform acceptance probability of the rank-one consistency equation in Exercise 7.18(b). 
  • theoremdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    theorem FABL.rankOneConsistencyProbability_eq_one {n : } (γ : FABL.F₂Cube n) :
      FABL.rankOneConsistencyProbability γ (FABL.rankOneSelfMatrix γ) = 1
    theorem FABL.rankOneConsistencyProbability_eq_one
      {n : } (γ : FABL.F₂Cube n) :
      FABL.rankOneConsistencyProbability γ
          (FABL.rankOneSelfMatrix γ) =
        1
    Exercise 7.18(b), completeness: the rank-one consistency equation is an identity for
    `Γ = γγᵀ`. 
  • theoremdefined in FABL/Chapter07/AlgebraicPCPP.lean
    complete
    theorem FABL.rankOneConsistencyProbability_le_three_fourths {n : }
      (γ : FABL.F₂Cube n) (Γ : Matrix (Fin n) (Fin n) FABL.𝔽₂)
      ( : Γ  FABL.rankOneSelfMatrix γ) :
      FABL.rankOneConsistencyProbability γ Γ  3 / 4
    theorem FABL.rankOneConsistencyProbability_le_three_fourths
      {n : } (γ : FABL.F₂Cube n)
      (Γ : Matrix (Fin n) (Fin n) FABL.𝔽₂)
      ( : Γ  FABL.rankOneSelfMatrix γ) :
      FABL.rankOneConsistencyProbability γ Γ 
        3 / 4
    Exercise 7.18(b), soundness: every matrix other than `γγᵀ` passes the rank-one
    consistency equation with probability at most `3/4`. 
  • abbrevdefined in FABL/Chapter07/QuadraticPCPP.lean
    complete
    abbrev FABL.QuadraticCharacterAddress (n : ) : Type
    abbrev FABL.QuadraticCharacterAddress (n : ) :
      Type
    Addresses distinguish the linear and matrix truth tables without conflating their distances. 
  • defdefined in FABL/Chapter07/QuadraticPCPP.lean
    complete
    def FABL.quadraticCharacterOracle {n : } ( : FABL.F₂Cube n  FABL.𝔽₂)
      (q : Matrix (Fin n) (Fin n) FABL.𝔽₂  FABL.𝔽₂) :
      FABL.QuadraticCharacterAddress n  FABL.𝔽₂
    def FABL.quadraticCharacterOracle {n : }
      ( : FABL.F₂Cube n  FABL.𝔽₂)
      (q :
        Matrix (Fin n) (Fin n) FABL.𝔽₂ 
          FABL.𝔽₂) :
      FABL.QuadraticCharacterAddress n 
        FABL.𝔽₂
    Combine the two alleged functions into the oracle queried by the actual tester. 
  • defdefined in FABL/Chapter07/QuadraticPCPP.lean
    complete
    def FABL.quadraticCharacterPairTester (n : ) :
      FABL.NonadaptiveFunctionTester (FABL.QuadraticCharacterAddress n)
        FABL.𝔽₂ 4
    def FABL.quadraticCharacterPairTester
      (n : ) :
      FABL.NonadaptiveFunctionTester
        (FABL.QuadraticCharacterAddress n)
        FABL.𝔽₂ 4
    The test in Exercise 7.18(c) chooses uniformly among the two BLR branches and the
    rank-one local-correction branch. 
  • defdefined in FABL/Chapter07/QuadraticPCPP.lean
    complete
    def FABL.IsQuadraticCharacterPair {n : } ( : FABL.F₂Cube n  FABL.𝔽₂)
      (q : Matrix (Fin n) (Fin n) FABL.𝔽₂  FABL.𝔽₂) : Prop
    def FABL.IsQuadraticCharacterPair {n : }
      ( : FABL.F₂Cube n  FABL.𝔽₂)
      (q :
        Matrix (Fin n) (Fin n) FABL.𝔽₂ 
          FABL.𝔽₂) :
      Prop
    The exact family recognized by the pair test. 
  • theoremdefined in FABL/Chapter07/QuadraticPCPP.lean
    complete
    theorem FABL.quadraticCharacterPairTester_complete {n : }
      ( : FABL.F₂Cube n  FABL.𝔽₂)
      (q : Matrix (Fin n) (Fin n) FABL.𝔽₂  FABL.𝔽₂)
      (hpair : FABL.IsQuadraticCharacterPair  q) :
      (FABL.quadraticCharacterPairTester n).acceptanceProbability
          (FABL.quadraticCharacterOracle  q) =
        1
    theorem FABL.quadraticCharacterPairTester_complete
      {n : } ( : FABL.F₂Cube n  FABL.𝔽₂)
      (q :
        Matrix (Fin n) (Fin n) FABL.𝔽₂ 
          FABL.𝔽₂)
      (hpair :
        FABL.IsQuadraticCharacterPair  q) :
      (FABL.quadraticCharacterPairTester
              n).acceptanceProbability
          (FABL.quadraticCharacterOracle 
            q) =
        1
    Exercise 7.18(c), perfect completeness of the actual four-query mixture. 
  • defdefined in FABL/Chapter07/QuadraticPCPP.lean
    complete
    def FABL.quadraticCharacterPairRejectionRate : 
    def FABL.quadraticCharacterPairRejectionRate :
      
    A fixed positive universal rate for the four-query pair test. 
  • theoremdefined in FABL/Chapter07/QuadraticPCPP.lean
    complete
    theorem FABL.quadraticCharacterPairTester_close_of_acceptanceProbability_ge
      {n : } (ε : ) ( : ε  Set.Icc 0 1) ( : FABL.F₂Cube n  FABL.𝔽₂)
      (q : Matrix (Fin n) (Fin n) FABL.𝔽₂  FABL.𝔽₂)
      (haccept :
        1 - FABL.quadraticCharacterPairRejectionRate * ε 
          (FABL.quadraticCharacterPairTester n).acceptanceProbability
            (FABL.quadraticCharacterOracle  q)) :
       γ,
        (FABL.IsClose ε  fun x => FABL.f₂DotProduct γ x) 
          FABL.IsClose ε q
            (FABL.binaryMatrixCharacter (FABL.rankOneSelfMatrix γ))
    theorem FABL.quadraticCharacterPairTester_close_of_acceptanceProbability_ge
      {n : } (ε : ) ( : ε  Set.Icc 0 1)
      ( : FABL.F₂Cube n  FABL.𝔽₂)
      (q :
        Matrix (Fin n) (Fin n) FABL.𝔽₂ 
          FABL.𝔽₂)
      (haccept :
        1 -
            FABL.quadraticCharacterPairRejectionRate *
              ε 
          (FABL.quadraticCharacterPairTester
                n).acceptanceProbability
            (FABL.quadraticCharacterOracle 
              q)) :
       γ,
        (FABL.IsClose ε  fun x =>
            FABL.f₂DotProduct γ x) 
          FABL.IsClose ε q
            (FABL.binaryMatrixCharacter
              (FABL.rankOneSelfMatrix γ))
    Exercise 7.18(c), positive linear soundness with the book's two componentwise distance
    conclusions. 
  • structure(2 fields)defined in FABL/Chapter07/QuadraticPCPP.lean
    complete
    structure FABL.HomogeneousQuadraticEquation (n : ) : Type
    structure FABL.HomogeneousQuadraticEquation
      (n : ) : Type
    One homogeneous degree-two equation `∑ᵢⱼ cᵢⱼ wᵢwⱼ = b`.  Diagonal coefficients
    represent the permitted terms `wᵢ² = wᵢ`. 
    coefficients : Matrix (Fin n) (Fin n) FABL.𝔽₂
    Coefficient matrix of the quadratic form. 
    rhs : FABL.𝔽₂
    Right-hand side of the equation. 
  • defdefined in FABL/Chapter07/QuadraticPCPP.lean
    complete
    def FABL.HomogeneousQuadraticEquation.SatisfiedBy {n : }
      (equation : FABL.HomogeneousQuadraticEquation n) (w : FABL.F₂Cube n) :
      Prop
    def FABL.HomogeneousQuadraticEquation.SatisfiedBy
      {n : }
      (equation :
        FABL.HomogeneousQuadraticEquation n)
      (w : FABL.F₂Cube n) : Prop
    Satisfaction of one homogeneous quadratic equation. 
  • abbrevdefined in FABL/Chapter07/QuadraticPCPP.lean
    complete
    abbrev FABL.HomogeneousQuadraticSystem (n : ) : Type
    abbrev FABL.HomogeneousQuadraticSystem (n : ) :
      Type
    A finite system is represented by its actual list of equations. 
  • defdefined in FABL/Chapter07/QuadraticPCPP.lean
    complete
    def FABL.SatisfiesHomogeneousQuadraticSystem {n : }
      (L : FABL.HomogeneousQuadraticSystem n) (w : FABL.F₂Cube n) : Prop
    def FABL.SatisfiesHomogeneousQuadraticSystem
      {n : }
      (L : FABL.HomogeneousQuadraticSystem n)
      (w : FABL.F₂Cube n) : Prop
    The string property cut out by all equations in the system. 
  • defdefined in FABL/Chapter07/QuadraticPCPP.lean
    complete
    def FABL.IsBoolHomogeneousQuadraticSystem {n : }
      (L : FABL.HomogeneousQuadraticSystem n) (w : Fin n  Bool) : Prop
    def FABL.IsBoolHomogeneousQuadraticSystem
      {n : }
      (L : FABL.HomogeneousQuadraticSystem n)
      (w : Fin n  Bool) : Prop
    Boolean inputs satisfying the homogeneous quadratic system after the canonical `Bool`/`𝔽₂`
    bridge. 
  • defdefined in FABL/Chapter07/QuadraticPCPP.lean
    complete
    def FABL.homogeneousQuadraticPCPPSystem {n : }
      (L : FABL.HomogeneousQuadraticSystem n) [NeZero n] :
      FABL.PCPPSystem Bool n (2 ^ n + 2 ^ (n * n)) 4
    def FABL.homogeneousQuadraticPCPPSystem
      {n : }
      (L : FABL.HomogeneousQuadraticSystem n)
      [NeZero n] :
      FABL.PCPPSystem Bool n
        (2 ^ n + 2 ^ (n * n)) 4
    The exact length-`2^n + 2^(n²)`, four-query system for a homogeneous quadratic
    equation system. 
  • defdefined in FABL/Chapter07/QuadraticPCPP.lean
    complete
    def FABL.homogeneousQuadraticPCPPRejectionRate : 
    def FABL.homogeneousQuadraticPCPPRejectionRate :
      
    A fixed positive universal rejection rate for the three-branch PCPP. 
  • theoremdefined in FABL/Chapter07/QuadraticPCPP.lean
    complete
    theorem FABL.homogeneousQuadraticPCPPSystem_isPCPP {n : }
      (L : FABL.HomogeneousQuadraticSystem n) [NeZero n] :
      FABL.IsPCPP (FABL.homogeneousQuadraticPCPPSystem L)
        (FABL.IsBoolHomogeneousQuadraticSystem L)
        FABL.homogeneousQuadraticPCPPRejectionRate
    theorem FABL.homogeneousQuadraticPCPPSystem_isPCPP
      {n : }
      (L : FABL.HomogeneousQuadraticSystem n)
      [NeZero n] :
      FABL.IsPCPP
        (FABL.homogeneousQuadraticPCPPSystem
          L)
        (FABL.IsBoolHomogeneousQuadraticSystem
          L)
        FABL.homogeneousQuadraticPCPPRejectionRate
    Exercise 7.18(d): every finite homogeneous quadratic system has a four-query PCPP with
    the displayed exact proof length and a positive universal rejection rate. 
  • defdefined in FABL/Chapter07/QuadraticPCPP.lean
    complete
    def FABL.homogeneousQuadraticPCPPDescription {n : }
      (L : FABL.HomogeneousQuadraticSystem n) [NeZero n] :
      FABL.PCPPDescription n (FABL.IsBoolHomogeneousQuadraticSystem L)
    def FABL.homogeneousQuadraticPCPPDescription
      {n : }
      (L : FABL.HomogeneousQuadraticSystem n)
      [NeZero n] :
      FABL.PCPPDescription n
        (FABL.IsBoolHomogeneousQuadraticSystem
          L)
    The exact semantic PCPP description of Exercise 7.18(d). 
  • theoremdefined in FABL/Chapter07/QuadraticPCPP.lean
    complete
    theorem FABL.homogeneousQuadraticPCPPDescription_or_zero {n : }
      (L : FABL.HomogeneousQuadraticSystem n) :
      n = 0 
          ((∀ (w : Fin n  Bool),
              FABL.IsBoolHomogeneousQuadraticSystem L w) 
             (w : Fin n  Bool),
              ¬FABL.IsBoolHomogeneousQuadraticSystem L w) 
         (h : NeZero n),
          Nonempty
            (FABL.PCPPDescription n
              (FABL.IsBoolHomogeneousQuadraticSystem L))
    theorem FABL.homogeneousQuadraticPCPPDescription_or_zero
      {n : }
      (L :
        FABL.HomogeneousQuadraticSystem n) :
      n = 0 
          ((∀ (w : Fin n  Bool),
              FABL.IsBoolHomogeneousQuadraticSystem
                L w) 
             (w : Fin n  Bool),
              ¬FABL.IsBoolHomogeneousQuadraticSystem
                  L w) 
         (h : NeZero n),
          Nonempty
            (FABL.PCPPDescription n
              (FABL.IsBoolHomogeneousQuadraticSystem
                L))
    Exercise 7.18(d) in every dimension: dimension zero is classified explicitly, while every
    positive dimension has the exact four-query PCPP description above. 
  • defdefined in FABL/Chapter07/QuadraticCircuitReduction.lean
    complete
    def FABL.BooleanCircuit.circuitQuadraticSystem {n : }
      (C : FABL.BooleanCircuit n) :
      FABL.HomogeneousQuadraticSystem C.circuitQuadraticVariableCount
    def FABL.BooleanCircuit.circuitQuadraticSystem
      {n : } (C : FABL.BooleanCircuit n) :
      FABL.HomogeneousQuadraticSystem
        C.circuitQuadraticVariableCount
    The homogeneous quadratic system consisting of the constant, gate, and output equations. 
  • theoremdefined in FABL/Chapter07/QuadraticCircuitReduction.lean
    complete
    theorem FABL.BooleanCircuit.acceptedProperty_iff_exists_satisfyingQuadraticExtension
      {n : } (C : FABL.BooleanCircuit n) (w : Fin n  Bool) :
      C.acceptedProperty w 
         z,
          FABL.SatisfiesHomogeneousQuadraticSystem C.circuitQuadraticSystem
              z 
             (i : Fin n),
              z (C.circuitQuadraticInputIndex i) =
                FABL.pcppBoolF₂Equiv (w i)
    theorem FABL.BooleanCircuit.acceptedProperty_iff_exists_satisfyingQuadraticExtension
      {n : } (C : FABL.BooleanCircuit n)
      (w : Fin n  Bool) :
      C.acceptedProperty w 
         z,
          FABL.SatisfiesHomogeneousQuadraticSystem
              C.circuitQuadraticSystem z 
             (i : Fin n),
              z
                  (C.circuitQuadraticInputIndex
                    i) =
                FABL.pcppBoolF₂Equiv (w i)
    Exercise 7.18(e), pointwise form: an input is accepted exactly when it has a satisfying
    quadratic extension agreeing on every original input coordinate. 
  • theoremdefined in FABL/Chapter07/QuadraticCircuitReduction.lean
    complete
    theorem FABL.BooleanCircuit.satisfiable_iff_exists_satisfiesCircuitQuadraticSystem
      {n : } (C : FABL.BooleanCircuit n) :
      C.Satisfiable 
         z,
          FABL.SatisfiesHomogeneousQuadraticSystem C.circuitQuadraticSystem
            z
    theorem FABL.BooleanCircuit.satisfiable_iff_exists_satisfiesCircuitQuadraticSystem
      {n : } (C : FABL.BooleanCircuit n) :
      C.Satisfiable 
         z,
          FABL.SatisfiesHomogeneousQuadraticSystem
            C.circuitQuadraticSystem z
    Exercise 7.18(e): circuit satisfiability is equivalent to satisfiability of the canonical
    homogeneous quadratic system. 
  • theoremdefined in FABL/Chapter07/QuadraticCircuitReduction.lean
    complete
    theorem FABL.BooleanCircuit.circuitQuadraticSystemDenseSize_le_cube {n : }
      (C : FABL.BooleanCircuit n) :
      C.circuitQuadraticSystemDenseSize  (n + C.gateCount + 2) ^ 3
    theorem FABL.BooleanCircuit.circuitQuadraticSystemDenseSize_le_cube
      {n : } (C : FABL.BooleanCircuit n) :
      C.circuitQuadraticSystemDenseSize 
        (n + C.gateCount + 2) ^ 3
    The canonical circuit-to-quadratic reduction has cubic dense output size. 
  • theoremdefined in FABL/Chapter07/QuadraticCircuitReduction.lean
    complete
    theorem FABL.BooleanCircuit.circuitQuadraticFourQueryPCPPSystem_isPCPP {n : }
      (C : FABL.BooleanCircuit n) [NeZero n] :
      FABL.IsPCPP C.circuitQuadraticFourQueryPCPPSystem C.acceptedProperty
        FABL.BooleanCircuit.circuitQuadraticPCPPRejectionRate
    theorem FABL.BooleanCircuit.circuitQuadraticFourQueryPCPPSystem_isPCPP
      {n : } (C : FABL.BooleanCircuit n)
      [NeZero n] :
      FABL.IsPCPP
        C.circuitQuadraticFourQueryPCPPSystem
        C.acceptedProperty
        FABL.BooleanCircuit.circuitQuadraticPCPPRejectionRate
    Exercise 7.18(e): the canonical circuit reduction yields a four-query PCPP with universal
    positive rate and exact exponential proof layout. 
  • theoremdefined in FABL/Chapter07/QuadraticCircuitReduction.lean
    complete
    theorem FABL.BooleanCircuit.circuitQuadraticPCPPProofLength_le_three_mul_two_pow_square
      {n : } (C : FABL.BooleanCircuit n) :
      C.circuitQuadraticPCPPProofLength  3 * 2 ^ (n + C.gateCount + 1) ^ 2
    theorem FABL.BooleanCircuit.circuitQuadraticPCPPProofLength_le_three_mul_two_pow_square
      {n : } (C : FABL.BooleanCircuit n) :
      C.circuitQuadraticPCPPProofLength 
        3 * 2 ^ (n + C.gateCount + 1) ^ 2
    The exact four-query proof length is at most three copies of a single exponential whose
    exponent is the square of the linear reduction size. 
  • theoremdefined in FABL/Chapter07/QuadraticCircuitReduction.lean
    complete
    theorem FABL.BooleanCircuit.zeroInput_satisfiable_iff
      (C : FABL.BooleanCircuit 0) :
      C.Satisfiable  C.acceptedProperty fun input => input.elim0
    theorem FABL.BooleanCircuit.zeroInput_satisfiable_iff
      (C : FABL.BooleanCircuit 0) :
      C.Satisfiable 
        C.acceptedProperty fun input =>
          input.elim0
    The zero-input endpoint is the single empty assignment and requires no positivity assumption. 
  • theoremdefined in FABL/Chapter07/QuadraticCircuitReduction.lean
    complete
    theorem FABL.BooleanCircuit.circuitQuadraticFourQueryPCPPDescription_or_zero
      {n : } (C : FABL.BooleanCircuit n) :
      n = 0 
          ((∀ (w : Fin n  Bool), C.acceptedProperty w) 
             (w : Fin n  Bool), ¬C.acceptedProperty w) 
         (h : NeZero n),
          Nonempty (FABL.PCPPDescription n C.acceptedProperty)
    theorem FABL.BooleanCircuit.circuitQuadraticFourQueryPCPPDescription_or_zero
      {n : } (C : FABL.BooleanCircuit n) :
      n = 0 
          ((∀ (w : Fin n  Bool),
              C.acceptedProperty w) 
             (w : Fin n  Bool),
              ¬C.acceptedProperty w) 
         (h : NeZero n),
          Nonempty
            (FABL.PCPPDescription n
              C.acceptedProperty)
    Every circuit dimension is covered: zero inputs are classified explicitly, and positive
    inputs receive the circuit-facing four-query description. 
Lemma7.5.19
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Definition 7.2.4
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Exercise 7.19. In the PCPP-to-Max-E3-Sat reduction used for Theorem 7.35, prove C\text{ satisfiable}\Longrightarrow\operatorname{Opt}(P)=1, C\text{ unsatisfiable}\Longrightarrow \operatorname{Opt}(P)<1-\delta_0. For an unsatisfiable circuit the accepted string property is empty, so every alleged input has distance 1 from it.

The associated declarations prove the exact conditional gap for the finite verifier optimum, defined as the maximum acceptance probability over all input/proof pairs. The additional identification with the Max-E3-Sat instance uses the uniform tester--CSP and three-query OR transformations recorded in the cited dependencies; no external PCPP or hardness assumption is introduced into Lean. The finite gap is unconditional; the encoded PCPP-to-Max-E3-Sat implementation remains subject to Exercise 7.12's explicit output-sensitive machine witness.

Lean code for Lemma7.5.1910 declarations
  • defdefined in FABL/Chapter07/PCPPGaps.lean
    complete
    def FABL.PCPPSystem.optimalInputProof {n proofLength queryCount : }
      (V : FABL.PCPPSystem Bool n proofLength queryCount) :
      (Fin n  Bool) × (Fin proofLength  Bool)
    def FABL.PCPPSystem.optimalInputProof
      {n proofLength queryCount : }
      (V :
        FABL.PCPPSystem Bool n proofLength
          queryCount) :
      (Fin n  Bool) ×
        (Fin proofLength  Bool)
    A maximizing input/proof pair for a finite Boolean PCPP verifier. 
  • defdefined in FABL/Chapter07/PCPPGaps.lean
    complete
    def FABL.PCPPSystem.optimumAcceptance {n proofLength queryCount : }
      (V : FABL.PCPPSystem Bool n proofLength queryCount) : 
    def FABL.PCPPSystem.optimumAcceptance
      {n proofLength queryCount : }
      (V :
        FABL.PCPPSystem Bool n proofLength
          queryCount) :
      
    Maximum verifier acceptance over all alleged inputs and proofs. 
  • theoremdefined in FABL/Chapter07/PCPPGaps.lean
    complete
    theorem FABL.PCPPSystem.acceptanceProbability_le_optimumAcceptance
      {n proofLength queryCount : }
      (V : FABL.PCPPSystem Bool n proofLength queryCount) (w : Fin n  Bool)
      (proof : Fin proofLength  Bool) :
      V.acceptanceProbability w proof  V.optimumAcceptance
    theorem FABL.PCPPSystem.acceptanceProbability_le_optimumAcceptance
      {n proofLength queryCount : }
      (V :
        FABL.PCPPSystem Bool n proofLength
          queryCount)
      (w : Fin n  Bool)
      (proof : Fin proofLength  Bool) :
      V.acceptanceProbability w proof 
        V.optimumAcceptance
  • theoremdefined in FABL/Chapter07/PCPPGaps.lean
    complete
    theorem FABL.PCPPSystem.optimumAcceptance_le_one {n proofLength queryCount : }
      (V : FABL.PCPPSystem Bool n proofLength queryCount) :
      V.optimumAcceptance  1
    theorem FABL.PCPPSystem.optimumAcceptance_le_one
      {n proofLength queryCount : }
      (V :
        FABL.PCPPSystem Bool n proofLength
          queryCount) :
      V.optimumAcceptance  1
  • theoremdefined in FABL/Chapter07/PCPPGaps.lean
    complete
    theorem FABL.PCPPSystem.rejectionProbability_gt_rate_of_property_empty
      {n proofLength queryCount : } [NeZero n]
      (V : FABL.PCPPSystem Bool n proofLength queryCount)
      (P : (Fin n  Bool)  Prop) (rate : ) (hV : FABL.IsPCPP V P rate)
      (hempty :  (w : Fin n  Bool), ¬P w) (w : Fin n  Bool)
      (proof : Fin proofLength  Bool) :
      rate < V.rejectionProbability w proof
    theorem FABL.PCPPSystem.rejectionProbability_gt_rate_of_property_empty
      {n proofLength queryCount : }
      [NeZero n]
      (V :
        FABL.PCPPSystem Bool n proofLength
          queryCount)
      (P : (Fin n  Bool)  Prop) (rate : )
      (hV : FABL.IsPCPP V P rate)
      (hempty :  (w : Fin n  Bool), ¬P w)
      (w : Fin n  Bool)
      (proof : Fin proofLength  Bool) :
      rate < V.rejectionProbability w proof
    An empty tested property forces rejection strictly above the PCPP rate at distance one. 
  • defdefined in FABL/Chapter07/PCPPGaps.lean
    complete
    def FABL.BooleanCircuit.Satisfiable {n : } (C : FABL.BooleanCircuit n) :
      Prop
    def FABL.BooleanCircuit.Satisfiable {n : }
      (C : FABL.BooleanCircuit n) : Prop
    A Boolean circuit has a satisfying input. 
  • defdefined in FABL/Chapter07/PCPPGaps.lean
    complete
    def FABL.BooleanCircuit.Unsatisfiable {n : } (C : FABL.BooleanCircuit n) :
      Prop
    def FABL.BooleanCircuit.Unsatisfiable {n : }
      (C : FABL.BooleanCircuit n) : Prop
    A Boolean circuit has no satisfying input. 
  • theoremdefined in FABL/Chapter07/PCPPGaps.lean
    complete
    theorem FABL.BooleanCircuit.not_satisfiable_iff_unsatisfiable {n : }
      (C : FABL.BooleanCircuit n) : ¬C.Satisfiable  C.Unsatisfiable
    theorem FABL.BooleanCircuit.not_satisfiable_iff_unsatisfiable
      {n : } (C : FABL.BooleanCircuit n) :
      ¬C.Satisfiable  C.Unsatisfiable
  • theoremdefined in FABL/Chapter07/PCPPGaps.lean
    complete
    theorem FABL.PCPPDescription.optimumAcceptance_eq_one_of_satisfiable {n : }
      [NeZero n] {C : FABL.BooleanCircuit n}
      (D : FABL.PCPPDescription n C.acceptedProperty) (hC : C.Satisfiable) :
      D.system.optimumAcceptance = 1
    theorem FABL.PCPPDescription.optimumAcceptance_eq_one_of_satisfiable
      {n : } [NeZero n]
      {C : FABL.BooleanCircuit n}
      (D :
        FABL.PCPPDescription n
          C.acceptedProperty)
      (hC : C.Satisfiable) :
      D.system.optimumAcceptance = 1
    Exercise 7.19, completeness: a satisfying circuit gives verifier optimum one. 
  • theoremdefined in FABL/Chapter07/PCPPGaps.lean
    complete
    theorem FABL.PCPPDescription.optimumAcceptance_lt_one_sub_rate_of_unsatisfiable
      {n : } [NeZero n] {C : FABL.BooleanCircuit n}
      (D : FABL.PCPPDescription n C.acceptedProperty)
      (hC : C.Unsatisfiable) :
      D.system.optimumAcceptance < 1 - D.rejectionRate
    theorem FABL.PCPPDescription.optimumAcceptance_lt_one_sub_rate_of_unsatisfiable
      {n : } [NeZero n]
      {C : FABL.BooleanCircuit n}
      (D :
        FABL.PCPPDescription n
          C.acceptedProperty)
      (hC : C.Unsatisfiable) :
      D.system.optimumAcceptance <
        1 - D.rejectionRate
    Exercise 7.19, soundness: an unsatisfiable circuit gives a strict optimum gap equal to the
    PCPP rejection rate. 
Lemma7.5.20
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Definition 7.3.6
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 3
Reverse dependency previews
Preview
Lemma 7.5.21
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Exercise 7.20. A randomized assignment sends each variable to a probability distribution on \Omega; a constraint is evaluated after sampling its variable labels independently.

(a) Convert a deterministic algorithm which outputs such a randomized assignment into a randomized algorithm which outputs an ordinary assignment of the same expected value.

(b) The uniform Boolean randomized assignment is a (7/8,\beta)-approximation for Max-E3-Sat and a (1/2,\beta)-approximation for Max-3-Lin. Here Max-3-Lin permits every positive arity at most three; the formal proof treats arbitrary positive arity rather than only the exactly-three-variable subfamily.

(c) For the sign domain, identify a distribution with its mean f(v)\in[-1,1]. The expected value of a constraint is the multilinear extension \psi(f(v_1),\ldots,f(v_r)).

(d) If \nu=\min_{\psi\in\Psi}\widehat\psi(\emptyset), then the randomized assignment f\equiv0 is a (\nu,\beta)-approximation.

The finite sampling laws, expected values, and deterministic optimum bounds are proved exactly. For arbitrary PMF data, an efficient bit-level sampler and encoding are not inferred from those finite semantics.

Lean code for Lemma7.5.2023 declarations
  • structure(1 field)defined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    structure FABL.FiniteRandomizedAssignment.{u_1, u_2} (V : Type u_1) (D : Type u_2)
      [Fintype V] [Fintype D] : Type (max u_1 u_2)
    structure FABL.FiniteRandomizedAssignment.{u_1, u_2}
      (V : Type u_1) (D : Type u_2)
      [Fintype V] [Fintype D] :
      Type (max u_1 u_2)
    A finite randomized assignment gives one finite distribution per variable. 
    law : V  PMF D
    Marginal law of each variable. 
  • defdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    def FABL.FiniteRandomizedAssignment.sampleLaw.{u_1, u_2} {V : Type u_1}
      {D : Type u_2} [Fintype V] [Fintype D]
      (assignment : FABL.FiniteRandomizedAssignment V D) : PMF (V  D)
    def FABL.FiniteRandomizedAssignment.sampleLaw.{u_1,
        u_2}
      {V : Type u_1} {D : Type u_2}
      [Fintype V] [Fintype D]
      (assignment :
        FABL.FiniteRandomizedAssignment V D) :
      PMF (V  D)
    Independent sampling produces an ordinary assignment. 
  • defdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    def FABL.FiniteRandomizedAssignment.expectedPayoff.{u_1, u_2} {V : Type u_1}
      {D : Type u_2} [Fintype V] [DecidableEq V] [Fintype D]
      (assignment : FABL.FiniteRandomizedAssignment V D)
      (payoff : (V  D)  ) : 
    def FABL.FiniteRandomizedAssignment.expectedPayoff.{u_1,
        u_2}
      {V : Type u_1} {D : Type u_2}
      [Fintype V] [DecidableEq V] [Fintype D]
      (assignment :
        FABL.FiniteRandomizedAssignment V D)
      (payoff : (V  D)  ) : 
    Expected payoff of a randomized assignment. 
  • theoremdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    theorem FABL.FiniteRandomizedAssignment.expectedPayoff_sample.{u_1, u_2}
      {V : Type u_1} {D : Type u_2} [Fintype V] [DecidableEq V] [Fintype D]
      (assignment : FABL.FiniteRandomizedAssignment V D)
      (payoff : (V  D)  ) :
      FABL.pmfExpectation assignment.sampleLaw payoff =
        assignment.expectedPayoff payoff
    theorem FABL.FiniteRandomizedAssignment.expectedPayoff_sample.{u_1,
        u_2}
      {V : Type u_1} {D : Type u_2}
      [Fintype V] [DecidableEq V] [Fintype D]
      (assignment :
        FABL.FiniteRandomizedAssignment V D)
      (payoff : (V  D)  ) :
      FABL.pmfExpectation assignment.sampleLaw
          payoff =
        assignment.expectedPayoff payoff
    O'Donnell, Exercise 7.20(a): sampling the independently distributed labels is a randomized
    algorithm outputting ordinary assignments with exactly the randomized assignment's expected
    value. 
  • defdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    def FABL.uniformRandomizedAssignment.{u_1, u_2} (V : Type u_1)
      (D : Type u_2) [Fintype V] [Fintype D] [Nonempty D] :
      FABL.FiniteRandomizedAssignment V D
    def FABL.uniformRandomizedAssignment.{u_1,
        u_2}
      (V : Type u_1) (D : Type u_2)
      [Fintype V] [Fintype D] [Nonempty D] :
      FABL.FiniteRandomizedAssignment V D
    The uniform randomized assignment. 
  • theoremdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    theorem FABL.expect_e3LinPredicate (rhs : FABL.𝔽₂) :
      (Finset.univ.expect fun values =>
          if FABL.maxE3LinTemplate.eval rhs values = true then 1 else 0) =
        1 / 2
    theorem FABL.expect_e3LinPredicate
      (rhs : FABL.𝔽₂) :
      (Finset.univ.expect fun values =>
          if
              FABL.maxE3LinTemplate.eval rhs
                  values =
                true then
            1
          else 0) =
        1 / 2
    A uniformly random assignment satisfies a fixed exact three-variable equation over `𝔽₂`
    with probability `1/2`. 
  • theoremdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    theorem FABL.expect_satisfiedIndicator_maxE3Lin.{u_1} {V : Type u_1} [Fintype V]
      [DecidableEq V] (c : FABL.CSPConstraint FABL.maxE3LinTemplate V) :
      (Finset.univ.expect fun assignment =>
          (c.satisfiedIndicator assignment)) =
        1 / 2
    theorem FABL.expect_satisfiedIndicator_maxE3Lin.{u_1}
      {V : Type u_1} [Fintype V]
      [DecidableEq V]
      (c :
        FABL.CSPConstraint
          FABL.maxE3LinTemplate V) :
      (Finset.univ.expect fun assignment =>
          (c.satisfiedIndicator
              assignment)) =
        1 / 2
    Distinctness of a constraint scope makes its three labels independent under a uniform global
    assignment, so each Max-E3-Lin constraint has expected indicator `1/2`. 
  • theoremdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    theorem FABL.expect_value_maxE3Lin.{u_1} {V : Type u_1} [Fintype V]
      [DecidableEq V] (P : FABL.CSPInstance FABL.maxE3LinTemplate V) :
      (Finset.univ.expect fun assignment => P.value assignment) = 1 / 2
    theorem FABL.expect_value_maxE3Lin.{u_1}
      {V : Type u_1} [Fintype V]
      [DecidableEq V]
      (P :
        FABL.CSPInstance FABL.maxE3LinTemplate
          V) :
      (Finset.univ.expect fun assignment =>
          P.value assignment) =
        1 / 2
    The expected value of a Max-E3-Lin instance under a uniform assignment is `1/2`. 
  • theoremdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    theorem FABL.uniformRandomizedAssignment_expectedValue_maxE3Sat.{u_1}
      {V : Type u_1} [Fintype V] [DecidableEq V]
      (P : FABL.CSPInstance FABL.maxE3SatTemplate V) :
      (FABL.pmfExpectation
          (FABL.uniformRandomizedAssignment V Bool).sampleLaw
          fun assignment => (P.value assignment)) =
        7 / 8
    theorem FABL.uniformRandomizedAssignment_expectedValue_maxE3Sat.{u_1}
      {V : Type u_1} [Fintype V]
      [DecidableEq V]
      (P :
        FABL.CSPInstance FABL.maxE3SatTemplate
          V) :
      (FABL.pmfExpectation
          (FABL.uniformRandomizedAssignment V
              Bool).sampleLaw
          fun assignment =>
          (P.value assignment)) =
        7 / 8
    O'Donnell, Exercise 7.20(b), E3-Sat clause: independent unbiased Boolean labels have expected
    Max-E3-Sat value exactly `7/8`, hence meet the output threshold for every optimum trigger `β`. 
  • theoremdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    theorem FABL.uniformRandomizedAssignment_expectedValue_maxE3Lin.{u_1}
      {V : Type u_1} [Fintype V] [DecidableEq V]
      (P : FABL.CSPInstance FABL.maxE3LinTemplate V) :
      (FABL.pmfExpectation
          (FABL.uniformRandomizedAssignment V FABL.𝔽₂).sampleLaw
          fun assignment => (P.value assignment)) =
        1 / 2
    theorem FABL.uniformRandomizedAssignment_expectedValue_maxE3Lin.{u_1}
      {V : Type u_1} [Fintype V]
      [DecidableEq V]
      (P :
        FABL.CSPInstance FABL.maxE3LinTemplate
          V) :
      (FABL.pmfExpectation
          (FABL.uniformRandomizedAssignment V
              FABL.𝔽₂).sampleLaw
          fun assignment =>
          (P.value assignment)) =
        1 / 2
    O'Donnell, Exercise 7.20(b), Max-3-Lin clause: independent unbiased `𝔽₂` labels have expected
    value exactly `1/2`, hence meet the output threshold for every optimum trigger `β`. 
  • theoremdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    theorem FABL.expect_maxLinearPredicate {r : }
      (predicate : FABL.MaxLinearPredicate r) :
      (Finset.univ.expect fun values =>
          if (FABL.maxLinearTemplate r).eval predicate values = true then 1
          else 0) =
        1 / 2
    theorem FABL.expect_maxLinearPredicate {r : }
      (predicate :
        FABL.MaxLinearPredicate r) :
      (Finset.univ.expect fun values =>
          if
              (FABL.maxLinearTemplate r).eval
                  predicate values =
                true then
            1
          else 0) =
        1 / 2
    Every positive-arity binary linear equation is satisfied by exactly one half of its input
    tuples under the uniform distribution. 
  • theoremdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    theorem FABL.expect_satisfiedIndicator_maxLinear.{u} {r : } {V : Type u}
      [Fintype V] [DecidableEq V]
      (constraint : FABL.CSPConstraint (FABL.maxLinearTemplate r) V) :
      (Finset.univ.expect fun assignment =>
          (constraint.satisfiedIndicator assignment)) =
        1 / 2
    theorem FABL.expect_satisfiedIndicator_maxLinear.{u}
      {r : } {V : Type u} [Fintype V]
      [DecidableEq V]
      (constraint :
        FABL.CSPConstraint
          (FABL.maxLinearTemplate r) V) :
      (Finset.univ.expect fun assignment =>
          (constraint.satisfiedIndicator
              assignment)) =
        1 / 2
    A uniformly random global assignment satisfies every fixed positive-arity Max-`r`-Lin
    constraint with probability one half. 
  • theoremdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    theorem FABL.expect_value_maxLinear.{u} {r : } {V : Type u} [Fintype V]
      [DecidableEq V]
      (problem : FABL.CSPInstance (FABL.maxLinearTemplate r) V) :
      (Finset.univ.expect fun assignment => problem.value assignment) =
        1 / 2
    theorem FABL.expect_value_maxLinear.{u} {r : }
      {V : Type u} [Fintype V] [DecidableEq V]
      (problem :
        FABL.CSPInstance
          (FABL.maxLinearTemplate r) V) :
      (Finset.univ.expect fun assignment =>
          problem.value assignment) =
        1 / 2
    Exercise 7.20(b), general form: every positive-arity Max-`r`-Lin instance has uniform
    expected value exactly one half.  Taking `r = 3` is the book's Max-3-Lin assertion. 
  • theoremdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    theorem FABL.uniformRandomizedAssignment_expectedValue_maxLinear.{u} {r : }
      {V : Type u} [Fintype V] [DecidableEq V]
      (problem : FABL.CSPInstance (FABL.maxLinearTemplate r) V) :
      (FABL.pmfExpectation
          (FABL.uniformRandomizedAssignment V FABL.𝔽₂).sampleLaw
          fun assignment => (problem.value assignment)) =
        1 / 2
    theorem FABL.uniformRandomizedAssignment_expectedValue_maxLinear.{u}
      {r : } {V : Type u} [Fintype V]
      [DecidableEq V]
      (problem :
        FABL.CSPInstance
          (FABL.maxLinearTemplate r) V) :
      (FABL.pmfExpectation
          (FABL.uniformRandomizedAssignment V
              FABL.𝔽₂).sampleLaw
          fun assignment =>
          (problem.value assignment)) =
        1 / 2
    The PMF semantics of the coordinatewise uniform randomized assignment has Max-`r`-Lin value
    exactly one half. 
  • theoremdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    theorem FABL.half_le_optimum_maxLinear.{u} {r : } {V : Type u} [Finite V]
      (problem : FABL.CSPInstance (FABL.maxLinearTemplate r) V) :
      1 / 2  problem.optimum
    theorem FABL.half_le_optimum_maxLinear.{u} {r : }
      {V : Type u} [Finite V]
      (problem :
        FABL.CSPInstance
          (FABL.maxLinearTemplate r) V) :
      1 / 2  problem.optimum
    Exercise 7.20(b): every Max-`r`-Lin instance, hence every Max-3-Lin instance, has optimum at
    least one half. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.SignPredicate.indicator (P : FABL.SignPredicate) :
      FABL.SignCube P.arity  
    def FABL.SignPredicate.indicator
      (P : FABL.SignPredicate) :
      FABL.SignCube P.arity  
    The real-valued indicator of a finite sign predicate. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.SignPredicate.multilinearExtension (P : FABL.SignPredicate)
      (μ : Fin P.arity  ) : 
    def FABL.SignPredicate.multilinearExtension
      (P : FABL.SignPredicate)
      (μ : Fin P.arity  ) : 
    O'Donnell, Exercise 7.20(c): the multilinear extension of a sign predicate. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.SignPredicate.randomizedValue_eq_multilinearExtension
      (P : FABL.SignPredicate) (μ : Fin P.arity  )
      ( :  (i : Fin P.arity), μ i  Set.Icc (-1) 1) :
      P.randomizedValue μ  = P.multilinearExtension μ
    theorem FABL.SignPredicate.randomizedValue_eq_multilinearExtension
      (P : FABL.SignPredicate)
      (μ : Fin P.arity  )
      ( :
         (i : Fin P.arity),
          μ i  Set.Icc (-1) 1) :
      P.randomizedValue μ  =
        P.multilinearExtension μ
    O'Donnell, Exercise 7.20(c): evaluating the multilinear extension at the means of
    independent randomized signs gives the expected predicate value. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.BoundedCubeFunction.zero (n : ) : FABL.BoundedCubeFunction n
    def FABL.BoundedCubeFunction.zero (n : ) :
      FABL.BoundedCubeFunction n
    The zero randomized assignment, whose sign at every queried variable is unbiased. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.SignPredicate.multilinearExtension_zero (P : FABL.SignPredicate) :
      (P.multilinearExtension fun x => 0) = FABL.fourierCoeff P.indicator 
    theorem FABL.SignPredicate.multilinearExtension_zero
      (P : FABL.SignPredicate) :
      (P.multilinearExtension fun x => 0) =
        FABL.fourierCoeff P.indicator 
    The multilinear extension at the origin is the constant Fourier coefficient. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.predicateFamilyBaseline.{u_1} {ι : Type u_1} [Fintype ι]
      [Nonempty ι] (P : ι  FABL.SignPredicate) : 
    def FABL.predicateFamilyBaseline.{u_1}
      {ι : Type u_1} [Fintype ι] [Nonempty ι]
      (P : ι  FABL.SignPredicate) : 
    The baseline value of a nonempty finite predicate family is its least constant Fourier
    coefficient. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.predicateFamilyBaseline_le_multilinearExtension_zero.{u_1}
      {ι : Type u_1} [Fintype ι] [Nonempty ι] (P : ι  FABL.SignPredicate)
      (j : ι) :
      FABL.predicateFamilyBaseline P  (P j).multilinearExtension fun x => 0
    theorem FABL.predicateFamilyBaseline_le_multilinearExtension_zero.{u_1}
      {ι : Type u_1} [Fintype ι] [Nonempty ι]
      (P : ι  FABL.SignPredicate) (j : ι) :
      FABL.predicateFamilyBaseline P 
        (P j).multilinearExtension fun x => 0
    Every predicate in a finite family has origin value at least the family baseline. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.predicateFamilyBaseline_le_zeroAssignmentExpectation.{u_1, u_2}
      {ι : Type u_1} {Ω : Type u_2} [Fintype ι] [Nonempty ι] [Fintype Ω]
      (P : ι  FABL.SignPredicate) (law : PMF Ω) (predicateAt : Ω  ι) :
      FABL.predicateFamilyBaseline P 
        FABL.pmfExpectation law fun ω =>
          (P (predicateAt ω)).randomizedValue (fun x => 0) 
    theorem FABL.predicateFamilyBaseline_le_zeroAssignmentExpectation.{u_1,
        u_2}
      {ι : Type u_1} {Ω : Type u_2}
      [Fintype ι] [Nonempty ι] [Fintype Ω]
      (P : ι  FABL.SignPredicate)
      (law : PMF Ω) (predicateAt : Ω  ι) :
      FABL.predicateFamilyBaseline P 
        FABL.pmfExpectation law fun ω =>
          (P (predicateAt ω)).randomizedValue
            (fun x => 0) 
    O'Donnell, Exercise 7.20(d): for a nonempty finite predicate family, the all-zero
    randomized assignment attains at least the minimum constant Fourier coefficient on every
    distribution of constraints from that family. 
Lemma7.5.21
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 1used by 0L∃∀N

Exercise 7.21 (method of conditional expectations). From a finite randomized assignment of value \alpha, efficiently construct an ordinary assignment of value at least \alpha by fixing its variables one at a time without decreasing the conditional expected value.

The pure controller visits each variable once. At a variable v, it enumerates every label and only the constraints whose scopes contain v, charging |D|\sum_{c\ni v}\bigl(|D|^{\operatorname{arity}(c)}+1\bigr). The recursive trace stores exactly the sum of these charges, and for every fixed finite domain and predicate template this work is bounded by an explicit quadratic polynomial in the number of variables and constraints. The canonical global PMF payoff is proved equal to the sum of these local constraint tables before the monotonicity argument is applied. The CSLib boundary accepts only genuinely encoded input families and certifies exact agreement with that controller; it does not invent a binary serialization or bit-runtime model for arbitrary real-valued PMF data.

Lean code for Lemma7.5.2136 declarations
  • defdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    def FABL.orderedProductPMF.{u_1} {D : Type u_1} [Fintype D] (n : ) :
      (Fin n  PMF D)  PMF (Fin n  D)
    def FABL.orderedProductPMF.{u_1}
      {D : Type u_1} [Fintype D] (n : ) :
      (Fin n  PMF D)  PMF (Fin n  D)
    Independent sampling in a fixed variable order.  This recursive presentation exposes the
    successive conditional distributions used by Exercise 7.21. 
  • defdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    def FABL.finiteMaximizer.{u_1} {Ω : Type u_1} [Finite Ω] [Nonempty Ω]
      (f : Ω  ) : Ω
    def FABL.finiteMaximizer.{u_1} {Ω : Type u_1}
      [Finite Ω] [Nonempty Ω] (f : Ω  ) : Ω
    A maximizing point of a real-valued function on a nonempty finite type. 
  • theoremdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    theorem FABL.le_finiteMaximizer.{u_1} {Ω : Type u_1} [Finite Ω] [Nonempty Ω]
      (f : Ω  ) (x : Ω) : f x  f (FABL.finiteMaximizer f)
    theorem FABL.le_finiteMaximizer.{u_1}
      {Ω : Type u_1} [Finite Ω] [Nonempty Ω]
      (f : Ω  ) (x : Ω) :
      f x  f (FABL.finiteMaximizer f)
  • defdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    def FABL.conditionalExpectationAssignment.{u_1} {D : Type u_1} [Fintype D]
      [Nonempty D] (n : ) : (Fin n  PMF D)  ((Fin n  D)  )  Fin n  D
    def FABL.conditionalExpectationAssignment.{u_1}
      {D : Type u_1} [Fintype D] [Nonempty D]
      (n : ) :
      (Fin n  PMF D) 
        ((Fin n  D)  )  Fin n  D
    Fix variables from left to right, each time choosing a label maximizing the conditional
    expected final payoff. 
  • theoremdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    theorem FABL.pmfExpectation_le_conditionalExpectationAssignment.{u_1}
      {D : Type u_1} [Fintype D] [Nonempty D] (n : ) (law : Fin n  PMF D)
      (payoff : (Fin n  D)  ) :
      FABL.pmfExpectation (FABL.orderedProductPMF n law) payoff 
        payoff (FABL.conditionalExpectationAssignment n law payoff)
    theorem FABL.pmfExpectation_le_conditionalExpectationAssignment.{u_1}
      {D : Type u_1} [Fintype D] [Nonempty D]
      (n : ) (law : Fin n  PMF D)
      (payoff : (Fin n  D)  ) :
      FABL.pmfExpectation
          (FABL.orderedProductPMF n law)
          payoff 
        payoff
          (FABL.conditionalExpectationAssignment
            n law payoff)
    O'Donnell, Exercise 7.21: the finite method of conditional expectations fixes the variables
    one at a time and returns an ordinary assignment whose payoff is at least the original independent
    randomized assignment's expected payoff. 
  • structure(3 fields)defined in FABL/Chapter07/CSPDerandomization.lean
    complete
    structure FABL.FiniteRandomizedCSPInput.{u, u_1} {D : Type u} [Fintype D]
      (template : FABL.CSPTemplate D) : Type (max u u_1)
    structure FABL.FiniteRandomizedCSPInput.{u, u_1}
      {D : Type u} [Fintype D]
      (template : FABL.CSPTemplate D) :
      Type (max u u_1)
    A finite randomized CSP input with its variable count exposed.  The probability laws remain
    semantic data; a machine-level application below supplies a separately encoded input type. 
    variableCount : 
    Number of variables. 
    problem : FABL.CSPInstance template (Fin self.variableCount)
    CSP instance on the canonical finite variable type. 
    randomizedAssignment : FABL.FiniteRandomizedAssignment (Fin self.variableCount) D
    Canonical finite randomized assignment supplying every marginal label law. 
  • defdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    def FABL.CSPConstraint.localExpectedIndicator.{u, v, u_1} {D : Type u}
      [Fintype D] {template : FABL.CSPTemplate D} {V : Type v}
      (constraint : FABL.CSPConstraint template V) (law : V  PMF D) : 
    def FABL.CSPConstraint.localExpectedIndicator.{u,
        v, u_1}
      {D : Type u} [Fintype D]
      {template : FABL.CSPTemplate D}
      {V : Type v}
      (constraint :
        FABL.CSPConstraint template V)
      (law : V  PMF D) : 
    Expected indicator of one constraint, computed solely from the marginal tables on its
    scope. 
  • defdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    def FABL.CSPConstraint.localTableWork.{u, v, u_1} {D : Type u} [Fintype D]
      {template : FABL.CSPTemplate D} {V : Type v}
      (constraint : FABL.CSPConstraint template V) : 
    def FABL.CSPConstraint.localTableWork.{u, v,
        u_1}
      {D : Type u} [Fintype D]
      {template : FABL.CSPTemplate D}
      {V : Type v}
      (constraint :
        FABL.CSPConstraint template V) :
      
    Local table entries plus their aggregation, charged when evaluating one constraint. 
  • defdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    def FABL.CSPInstance.localExpectedValue.{u, v, u_1} {D : Type u}
      {template : FABL.CSPTemplate D} {V : Type v} [Fintype D]
      (problem : FABL.CSPInstance template V) (law : V  PMF D) : 
    def FABL.CSPInstance.localExpectedValue.{u, v,
        u_1}
      {D : Type u}
      {template : FABL.CSPTemplate D}
      {V : Type v} [Fintype D]
      (problem : FABL.CSPInstance template V)
      (law : V  PMF D) : 
    Randomized CSP value in the book's constraint-local semantics. 
  • theoremdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    theorem FABL.CSPInstance.expectedPayoff_eq_localExpectedValue.{u, v, u_1}
      {D : Type u} {template : FABL.CSPTemplate D} {V : Type v} [Fintype D]
      [Fintype V] [DecidableEq V] (problem : FABL.CSPInstance template V)
      (assignment : FABL.FiniteRandomizedAssignment V D) :
      (assignment.expectedPayoff fun values => (problem.value values)) =
        problem.localExpectedValue assignment.law
    theorem FABL.CSPInstance.expectedPayoff_eq_localExpectedValue.{u,
        v, u_1}
      {D : Type u}
      {template : FABL.CSPTemplate D}
      {V : Type v} [Fintype D] [Fintype V]
      [DecidableEq V]
      (problem : FABL.CSPInstance template V)
      (assignment :
        FABL.FiniteRandomizedAssignment V D) :
      (assignment.expectedPayoff fun values =>
          (problem.value values)) =
        problem.localExpectedValue
          assignment.law
    The constraint-local expectation is exactly the canonical independent-assignment expected
    payoff. 
  • defdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    def FABL.CSPInstance.affectedConditionalCount.{u, v, u_1} {D : Type u}
      {template : FABL.CSPTemplate D} {V : Type v} [Fintype D]
      [DecidableEq V] (problem : FABL.CSPInstance template V)
      (law : V  PMF D) (variableName : V) (label : D) : 
    def FABL.CSPInstance.affectedConditionalCount.{u,
        v, u_1}
      {D : Type u}
      {template : FABL.CSPTemplate D}
      {V : Type v} [Fintype D] [DecidableEq V]
      (problem : FABL.CSPInstance template V)
      (law : V  PMF D) (variableName : V)
      (label : D) : 
    Candidate conditional count computed only from constraints containing the variable being
    fixed. 
  • defdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    def FABL.CSPInstance.bestLocalLabel.{u, v, u_1} {D : Type u}
      {template : FABL.CSPTemplate D} {V : Type v} [Nonempty D] [Fintype D]
      [DecidableEq V] (problem : FABL.CSPInstance template V)
      (law : V  PMF D) (variableName : V) : D
    def FABL.CSPInstance.bestLocalLabel.{u, v,
        u_1}
      {D : Type u}
      {template : FABL.CSPTemplate D}
      {V : Type v} [Nonempty D] [Fintype D]
      [DecidableEq V]
      (problem : FABL.CSPInstance template V)
      (law : V  PMF D) (variableName : V) : D
    The best affected-only label. 
  • theoremdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    theorem FABL.CSPInstance.localExpectedValue_le_replace_bestLocalLabel.{u, v,
        u_1}
      {D : Type u} {template : FABL.CSPTemplate D} {V : Type v} [Nonempty D]
      [Fintype D] [DecidableEq V] (problem : FABL.CSPInstance template V)
      (law : V  PMF D) (variableName : V) :
      problem.localExpectedValue law 
        problem.localExpectedValue
          (FABL.replaceMarginal law variableName
            (problem.bestLocalLabel law variableName))
    theorem FABL.CSPInstance.localExpectedValue_le_replace_bestLocalLabel.{u,
        v, u_1}
      {D : Type u}
      {template : FABL.CSPTemplate D}
      {V : Type v} [Nonempty D] [Fintype D]
      [DecidableEq V]
      (problem : FABL.CSPInstance template V)
      (law : V  PMF D) (variableName : V) :
      problem.localExpectedValue law 
        problem.localExpectedValue
          (FABL.replaceMarginal law
            variableName
            (problem.bestLocalLabel law
              variableName))
    Fixing the best affected-only label never decreases the complete local expected value. 
  • structure(3 fields)defined in FABL/Chapter07/CSPDerandomization.lean
    complete
    structure FABL.LocalConditionalExpectationState.{u, v} (V : Type v) (D : Type u) :
      Type (max u v)
    structure FABL.LocalConditionalExpectationState.{u,
        v}
      (V : Type v) (D : Type u) :
      Type (max u v)
    Pure state threaded through the scope-local variable-fixing recursion. 
    law : V  PMF D
    Current marginal table. 
    assignment : V  D
    Labels selected so far; unvisited coordinates retain the injected default. 
    work : 
    Work charged by the constructors already executed. 
  • defdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    def FABL.CSPInstance.localConditionalStepWork.{u, v, u_1} {D : Type u}
      [Fintype D] {template : FABL.CSPTemplate D} {V : Type v}
      [DecidableEq V] (problem : FABL.CSPInstance template V)
      (variableName : V) : 
    def FABL.CSPInstance.localConditionalStepWork.{u,
        v, u_1}
      {D : Type u} [Fintype D]
      {template : FABL.CSPTemplate D}
      {V : Type v} [DecidableEq V]
      (problem : FABL.CSPInstance template V)
      (variableName : V) : 
    Work charged by one real controller step: scan every label and only the constraints affected
    by the selected variable, evaluating each bounded-arity local table. 
  • defdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    def FABL.CSPInstance.localConditionalStep.{u, v, u_1} {D : Type u}
      [Fintype D] {template : FABL.CSPTemplate D} {V : Type v}
      [DecidableEq V] [Nonempty D] (problem : FABL.CSPInstance template V)
      (state : FABL.LocalConditionalExpectationState V D)
      (variableName : V) : FABL.LocalConditionalExpectationState V D
    def FABL.CSPInstance.localConditionalStep.{u,
        v, u_1}
      {D : Type u} [Fintype D]
      {template : FABL.CSPTemplate D}
      {V : Type v} [DecidableEq V]
      [Nonempty D]
      (problem : FABL.CSPInstance template V)
      (state :
        FABL.LocalConditionalExpectationState
          V D)
      (variableName : V) :
      FABL.LocalConditionalExpectationState V
        D
    One constructor of the scope-local conditional-expectation controller. 
  • defdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    def FABL.CSPInstance.runLocalConditionalSteps.{u, v, u_1} {D : Type u}
      [Fintype D] {template : FABL.CSPTemplate D} {V : Type v}
      [DecidableEq V] [Nonempty D] (problem : FABL.CSPInstance template V) :
      List V 
        FABL.LocalConditionalExpectationState V D 
          FABL.LocalConditionalExpectationState V D
    def FABL.CSPInstance.runLocalConditionalSteps.{u,
        v, u_1}
      {D : Type u} [Fintype D]
      {template : FABL.CSPTemplate D}
      {V : Type v} [DecidableEq V]
      [Nonempty D]
      (problem :
        FABL.CSPInstance template V) :
      List V 
        FABL.LocalConditionalExpectationState
            V D 
          FABL.LocalConditionalExpectationState
            V D
    Execute the actual charged controller over a list of variables. 
  • theoremdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    theorem FABL.CSPInstance.runLocalConditionalSteps_work.{u, v, u_1} {D : Type u}
      [Fintype D] {template : FABL.CSPTemplate D} {V : Type v}
      [DecidableEq V] [Nonempty D] (problem : FABL.CSPInstance template V)
      (variableNames : List V)
      (state : FABL.LocalConditionalExpectationState V D) :
      (problem.runLocalConditionalSteps variableNames state).work =
        state.work +
          (List.map problem.localConditionalStepWork variableNames).sum
    theorem FABL.CSPInstance.runLocalConditionalSteps_work.{u,
        v, u_1}
      {D : Type u} [Fintype D]
      {template : FABL.CSPTemplate D}
      {V : Type v} [DecidableEq V]
      [Nonempty D]
      (problem : FABL.CSPInstance template V)
      (variableNames : List V)
      (state :
        FABL.LocalConditionalExpectationState
          V D) :
      (problem.runLocalConditionalSteps
            variableNames state).work =
        state.work +
          (List.map
              problem.localConditionalStepWork
              variableNames).sum
    Recursive execution adds exactly the constructor charges that it executes. 
  • theoremdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    theorem FABL.CSPInstance.localExpectedValue_le_runLocalConditionalSteps.{u, v,
        u_1}
      {D : Type u} [Fintype D] {template : FABL.CSPTemplate D} {V : Type v}
      [DecidableEq V] [Nonempty D] (problem : FABL.CSPInstance template V)
      (variableNames : List V)
      (state : FABL.LocalConditionalExpectationState V D) :
      problem.localExpectedValue state.law 
        problem.localExpectedValue
          (problem.runLocalConditionalSteps variableNames state).law
    theorem FABL.CSPInstance.localExpectedValue_le_runLocalConditionalSteps.{u,
        v, u_1}
      {D : Type u} [Fintype D]
      {template : FABL.CSPTemplate D}
      {V : Type v} [DecidableEq V]
      [Nonempty D]
      (problem : FABL.CSPInstance template V)
      (variableNames : List V)
      (state :
        FABL.LocalConditionalExpectationState
          V D) :
      problem.localExpectedValue state.law 
        problem.localExpectedValue
          (problem.runLocalConditionalSteps
              variableNames state).law
    Every recursive controller step preserves or increases the complete randomized value. 
  • theoremdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    theorem FABL.CSPInstance.runLocalConditionalSteps_law_eq_pure_assignment.{u, v,
        u_1}
      {D : Type u} [Fintype D] {template : FABL.CSPTemplate D} {V : Type v}
      [DecidableEq V] [Nonempty D] (problem : FABL.CSPInstance template V)
      (variableNames : List V)
      (state : FABL.LocalConditionalExpectationState V D) (variableName : V)
      (hvariable : variableName  variableNames) :
      (problem.runLocalConditionalSteps variableNames state).law
          variableName =
        PMF.pure
          ((problem.runLocalConditionalSteps variableNames state).assignment
            variableName)
    theorem FABL.CSPInstance.runLocalConditionalSteps_law_eq_pure_assignment.{u,
        v, u_1}
      {D : Type u} [Fintype D]
      {template : FABL.CSPTemplate D}
      {V : Type v} [DecidableEq V]
      [Nonempty D]
      (problem : FABL.CSPInstance template V)
      (variableNames : List V)
      (state :
        FABL.LocalConditionalExpectationState
          V D)
      (variableName : V)
      (hvariable :
        variableName  variableNames) :
      (problem.runLocalConditionalSteps
              variableNames state).law
          variableName =
        PMF.pure
          ((problem.runLocalConditionalSteps
                variableNames
                state).assignment
            variableName)
    Every visited coordinate exits the recursive trace with a pure marginal equal to its recorded
    ordinary label. 
  • defdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    def FABL.FiniteRandomizedCSPInput.expectedValue.{u, u_1} {D : Type u}
      [Fintype D] {template : FABL.CSPTemplate D}
      (input : FABL.FiniteRandomizedCSPInput template) : 
    def FABL.FiniteRandomizedCSPInput.expectedValue.{u,
        u_1}
      {D : Type u} [Fintype D]
      {template : FABL.CSPTemplate D}
      (input :
        FABL.FiniteRandomizedCSPInput
          template) :
      
    Expected value of the canonical independent finite randomized assignment. 
  • theoremdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    theorem FABL.FiniteRandomizedCSPInput.expectedValue_eq_localExpectedValue.{u,
        u_1}
      {D : Type u} [Fintype D] {template : FABL.CSPTemplate D}
      (input : FABL.FiniteRandomizedCSPInput template) :
      input.expectedValue =
        input.problem.localExpectedValue input.randomizedAssignment.law
    theorem FABL.FiniteRandomizedCSPInput.expectedValue_eq_localExpectedValue.{u,
        u_1}
      {D : Type u} [Fintype D]
      {template : FABL.CSPTemplate D}
      (input :
        FABL.FiniteRandomizedCSPInput
          template) :
      input.expectedValue =
        input.problem.localExpectedValue
          input.randomizedAssignment.law
    The canonical independent-assignment payoff is the controller's sum of local tables. 
  • defdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    def FABL.FiniteRandomizedCSPInput.localController.{u, u_1} {D : Type u}
      [Fintype D] {template : FABL.CSPTemplate D} [Nonempty D]
      (input : FABL.FiniteRandomizedCSPInput template) :
      FABL.LocalConditionalExpectationState (Fin input.variableCount) D
    def FABL.FiniteRandomizedCSPInput.localController.{u,
        u_1}
      {D : Type u} [Fintype D]
      {template : FABL.CSPTemplate D}
      [Nonempty D]
      (input :
        FABL.FiniteRandomizedCSPInput
          template) :
      FABL.LocalConditionalExpectationState
        (Fin input.variableCount) D
    Complete charged scope-local controller, visiting every variable exactly once. 
  • defdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    def FABL.FiniteRandomizedCSPInput.conditionalExpectationWork.{u, u_1}
      {D : Type u} [Fintype D] {template : FABL.CSPTemplate D}
      (input : FABL.FiniteRandomizedCSPInput template) : 
    def FABL.FiniteRandomizedCSPInput.conditionalExpectationWork.{u,
        u_1}
      {D : Type u} [Fintype D]
      {template : FABL.CSPTemplate D}
      (input :
        FABL.FiniteRandomizedCSPInput
          template) :
      
    Exact work computed by the recursive controller trace. 
  • theoremdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    theorem FABL.FiniteRandomizedCSPInput.localController_work_eq_conditionalExpectationWork.{u,
        u_1}
      {D : Type u} [Fintype D] {template : FABL.CSPTemplate D} [Nonempty D]
      (input : FABL.FiniteRandomizedCSPInput template) :
      input.localController.work = input.conditionalExpectationWork
    theorem FABL.FiniteRandomizedCSPInput.localController_work_eq_conditionalExpectationWork.{u,
        u_1}
      {D : Type u} [Fintype D]
      {template : FABL.CSPTemplate D}
      [Nonempty D]
      (input :
        FABL.FiniteRandomizedCSPInput
          template) :
      input.localController.work =
        input.conditionalExpectationWork
    The controller's work field is definitionally the sum of its executed step charges. 
  • defdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    def FABL.FiniteRandomizedCSPInput.conditionalExpectationWorkPolynomial.{u,
        u_1}
      {D : Type u} [Fintype D] {template : FABL.CSPTemplate D} :
      Polynomial 
    def FABL.FiniteRandomizedCSPInput.conditionalExpectationWorkPolynomial.{u,
        u_1}
      {D : Type u} [Fintype D]
      {template : FABL.CSPTemplate D} :
      Polynomial 
    The fixed-template quadratic polynomial which majorizes the actual charged trace. 
  • theoremdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    theorem FABL.FiniteRandomizedCSPInput.conditionalExpectationWork_le_polynomial.{u,
        u_1}
      {D : Type u} [Fintype D] {template : FABL.CSPTemplate D} [Nonempty D]
      (input : FABL.FiniteRandomizedCSPInput template) :
      input.conditionalExpectationWork 
        Polynomial.eval
          (input.variableCount + input.problem.constraints.card)
          FABL.FiniteRandomizedCSPInput.conditionalExpectationWorkPolynomial
    theorem FABL.FiniteRandomizedCSPInput.conditionalExpectationWork_le_polynomial.{u,
        u_1}
      {D : Type u} [Fintype D]
      {template : FABL.CSPTemplate D}
      [Nonempty D]
      (input :
        FABL.FiniteRandomizedCSPInput
          template) :
      input.conditionalExpectationWork 
        Polynomial.eval
          (input.variableCount +
            input.problem.constraints.card)
          FABL.FiniteRandomizedCSPInput.conditionalExpectationWorkPolynomial
    The actual recursive trace has a fixed-template polynomial work bound. 
  • structure(2 fields)defined in FABL/Chapter07/CSPDerandomization.lean
    complete
    structure FABL.FiniteRandomizedCSPInput.ConditionalExpectationPlan.{u, u_1}
      {D : Type u} [Fintype D] {template : FABL.CSPTemplate D}
      (input : FABL.FiniteRandomizedCSPInput template) : Type u
    structure FABL.FiniteRandomizedCSPInput.ConditionalExpectationPlan.{u,
        u_1}
      {D : Type u} [Fintype D]
      {template : FABL.CSPTemplate D}
      (input :
        FABL.FiniteRandomizedCSPInput
          template) :
      Type u
    The pure controller output together with the work generated by its recursive trace. 
    assignment : Fin input.variableCount  D
    Ordinary assignment returned by the controller. 
    work : 
    Work computed by the same controller execution. 
  • defdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    def FABL.FiniteRandomizedCSPInput.conditionalExpectationPlan.{u, u_1}
      {D : Type u} [Fintype D] {template : FABL.CSPTemplate D} [Nonempty D]
      (input : FABL.FiniteRandomizedCSPInput template) :
      input.ConditionalExpectationPlan
    def FABL.FiniteRandomizedCSPInput.conditionalExpectationPlan.{u,
        u_1}
      {D : Type u} [Fintype D]
      {template : FABL.CSPTemplate D}
      [Nonempty D]
      (input :
        FABL.FiniteRandomizedCSPInput
          template) :
      input.ConditionalExpectationPlan
    Project the real controller trace to its book-facing output and resources. 
  • theoremdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    theorem FABL.FiniteRandomizedCSPInput.expectedValue_le_conditionalExpectationPlan.{u,
        u_1}
      {D : Type u} [Fintype D] {template : FABL.CSPTemplate D} [Nonempty D]
      (input : FABL.FiniteRandomizedCSPInput template) :
      input.expectedValue 
        (input.problem.value input.conditionalExpectationPlan.assignment)
    theorem FABL.FiniteRandomizedCSPInput.expectedValue_le_conditionalExpectationPlan.{u,
        u_1}
      {D : Type u} [Fintype D]
      {template : FABL.CSPTemplate D}
      [Nonempty D]
      (input :
        FABL.FiniteRandomizedCSPInput
          template) :
      input.expectedValue 
        (input.problem.value
            input.conditionalExpectationPlan.assignment)
    Exercise 7.21: the scope-local controller's final ordinary assignment has value at least the
    initial randomized assignment. 
  • theoremdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    theorem FABL.FiniteRandomizedCSPInput.conditionalExpectationPlan_work_le_polynomial.{u,
        u_1}
      {D : Type u} [Fintype D] {template : FABL.CSPTemplate D} [Nonempty D]
      (input : FABL.FiniteRandomizedCSPInput template) :
      input.conditionalExpectationPlan.work 
        Polynomial.eval
          (input.variableCount + input.problem.constraints.card)
          FABL.FiniteRandomizedCSPInput.conditionalExpectationWorkPolynomial
    theorem FABL.FiniteRandomizedCSPInput.conditionalExpectationPlan_work_le_polynomial.{u,
        u_1}
      {D : Type u} [Fintype D]
      {template : FABL.CSPTemplate D}
      [Nonempty D]
      (input :
        FABL.FiniteRandomizedCSPInput
          template) :
      input.conditionalExpectationPlan.work 
        Polynomial.eval
          (input.variableCount +
            input.problem.constraints.card)
          FABL.FiniteRandomizedCSPInput.conditionalExpectationWorkPolynomial
    The plan work is the exact recursive trace work and obeys its polynomial majorant. 
  • structure(2 fields)defined in FABL/Chapter07/CSPDerandomization.lean
    complete
    structure FABL.PackedFiniteAssignment.{u} (D : Type u) : Type u
    structure FABL.PackedFiniteAssignment.{u}
      (D : Type u) : Type u
    A finite assignment packaged with its variable count for one uniform output codec. 
    variableCount : 
    Number of variables. 
    assignment : Fin self.variableCount  D
    Assigned label of every variable. 
  • structure(2 fields)defined in FABL/Chapter07/CSPDerandomization.lean
    complete
    structure FABL.ConditionalExpectationPolytimeAdapter.{u, v, u_1} {D : Type u}
      [Fintype D] [Nonempty D] (template : FABL.CSPTemplate D)
      (EncodedInput : Type v)
      (inputEncoding : FABL.BinaryEncoding EncodedInput)
      (outputEncoding : FABL.BinaryEncoding (FABL.PackedFiniteAssignment D))
      (semantic : EncodedInput  FABL.FiniteRandomizedCSPInput template) :
      Type 1
    structure FABL.ConditionalExpectationPolytimeAdapter.{u,
        v, u_1}
      {D : Type u} [Fintype D] [Nonempty D]
      (template : FABL.CSPTemplate D)
      (EncodedInput : Type v)
      (inputEncoding :
        FABL.BinaryEncoding EncodedInput)
      (outputEncoding :
        FABL.BinaryEncoding
          (FABL.PackedFiniteAssignment D))
      (semantic :
        EncodedInput 
          FABL.FiniteRandomizedCSPInput
            template) :
      Type 1
    The narrow CSLib implementation boundary for Exercise 7.21.
    
    `EncodedInput` contains only the caller's genuinely serializable instances.  Its semantic map may
    land in arbitrary finite randomized CSP data without assigning a binary codec to all real-valued
    PMFs.  The sole implementation obligation is exact output agreement on canonical inputs;
    the approximation guarantee is proved separately from the pure controller theorem. 
    algorithm : FABL.PolytimeMap
    Certified CSLib polynomial-time implementation on binary strings. 
    algorithm_encode :  (input : EncodedInput),
      self.algorithm.toFun (inputEncoding.encode input) =
        outputEncoding.encode (semantic input).conditionalExpectationPlan.toPackedAssignment
    Exact output on every canonical encoded input. 
  • theoremdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    theorem FABL.ConditionalExpectationPolytimeAdapter.decode_algorithm.{u, v, u_1}
      {D : Type u} [Fintype D] [Nonempty D] {template : FABL.CSPTemplate D}
      {EncodedInput : Type v}
      {inputEncoding : FABL.BinaryEncoding EncodedInput}
      {outputEncoding : FABL.BinaryEncoding (FABL.PackedFiniteAssignment D)}
      {semantic : EncodedInput  FABL.FiniteRandomizedCSPInput template}
      (adapter :
        FABL.ConditionalExpectationPolytimeAdapter template EncodedInput
          inputEncoding outputEncoding semantic)
      (input : EncodedInput) :
      outputEncoding.decode
          (adapter.algorithm.toFun (inputEncoding.encode input)) =
        some (semantic input).conditionalExpectationPlan.toPackedAssignment
    theorem FABL.ConditionalExpectationPolytimeAdapter.decode_algorithm.{u,
        v, u_1}
      {D : Type u} [Fintype D] [Nonempty D]
      {template : FABL.CSPTemplate D}
      {EncodedInput : Type v}
      {inputEncoding :
        FABL.BinaryEncoding EncodedInput}
      {outputEncoding :
        FABL.BinaryEncoding
          (FABL.PackedFiniteAssignment D)}
      {semantic :
        EncodedInput 
          FABL.FiniteRandomizedCSPInput
            template}
      (adapter :
        FABL.ConditionalExpectationPolytimeAdapter
          template EncodedInput inputEncoding
          outputEncoding semantic)
      (input : EncodedInput) :
      outputEncoding.decode
          (adapter.algorithm.toFun
            (inputEncoding.encode input)) =
        some
          (semantic
                input).conditionalExpectationPlan.toPackedAssignment
    The polynomial-time machine's output decodes to the pure controller output. 
  • theoremdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    theorem FABL.ConditionalExpectationPolytimeAdapter.decoded_output_value_ge_expected.{u,
        v, u_1}
      {D : Type u} [Fintype D] [Nonempty D] {template : FABL.CSPTemplate D}
      {EncodedInput : Type v}
      {inputEncoding : FABL.BinaryEncoding EncodedInput}
      {outputEncoding : FABL.BinaryEncoding (FABL.PackedFiniteAssignment D)}
      {semantic : EncodedInput  FABL.FiniteRandomizedCSPInput template}
      (adapter :
        FABL.ConditionalExpectationPolytimeAdapter template EncodedInput
          inputEncoding outputEncoding semantic)
      (input : EncodedInput) :
      outputEncoding.decode
            (adapter.algorithm.toFun (inputEncoding.encode input)) =
          some
            (semantic input).conditionalExpectationPlan.toPackedAssignment 
        (semantic input).expectedValue 
          ((semantic input).problem.value
              (semantic input).conditionalExpectationPlan.assignment)
    theorem FABL.ConditionalExpectationPolytimeAdapter.decoded_output_value_ge_expected.{u,
        v, u_1}
      {D : Type u} [Fintype D] [Nonempty D]
      {template : FABL.CSPTemplate D}
      {EncodedInput : Type v}
      {inputEncoding :
        FABL.BinaryEncoding EncodedInput}
      {outputEncoding :
        FABL.BinaryEncoding
          (FABL.PackedFiniteAssignment D)}
      {semantic :
        EncodedInput 
          FABL.FiniteRandomizedCSPInput
            template}
      (adapter :
        FABL.ConditionalExpectationPolytimeAdapter
          template EncodedInput inputEncoding
          outputEncoding semantic)
      (input : EncodedInput) :
      outputEncoding.decode
            (adapter.algorithm.toFun
              (inputEncoding.encode input)) =
          some
            (semantic
                  input).conditionalExpectationPlan.toPackedAssignment 
        (semantic input).expectedValue 
          ((semantic input).problem.value
              (semantic
                    input).conditionalExpectationPlan.assignment)
    Exercise 7.21 at the encoded boundary: the decoded polynomial-time output is exactly the
    ordinary assignment whose value is at least the randomized expected value.  No correctness fact
    is supplied as an adapter field. 
  • theoremdefined in FABL/Chapter07/CSPDerandomization.lean
    complete
    theorem FABL.ConditionalExpectationPolytimeAdapter.decoded_output_correct_and_work_le_polynomial.{u,
        v, u_1}
      {D : Type u} [Fintype D] [Nonempty D] {template : FABL.CSPTemplate D}
      {EncodedInput : Type v}
      {inputEncoding : FABL.BinaryEncoding EncodedInput}
      {outputEncoding : FABL.BinaryEncoding (FABL.PackedFiniteAssignment D)}
      {semantic : EncodedInput  FABL.FiniteRandomizedCSPInput template}
      (adapter :
        FABL.ConditionalExpectationPolytimeAdapter template EncodedInput
          inputEncoding outputEncoding semantic)
      (input : EncodedInput) :
      (outputEncoding.decode
              (adapter.algorithm.toFun (inputEncoding.encode input)) =
            some
              (semantic
                    input).conditionalExpectationPlan.toPackedAssignment 
          (semantic input).expectedValue 
            ((semantic input).problem.value
                (semantic input).conditionalExpectationPlan.assignment)) 
        (semantic input).conditionalExpectationPlan.work 
          Polynomial.eval
            ((semantic input).variableCount +
              (semantic input).problem.constraints.card)
            FABL.FiniteRandomizedCSPInput.conditionalExpectationWorkPolynomial
    theorem FABL.ConditionalExpectationPolytimeAdapter.decoded_output_correct_and_work_le_polynomial.{u,
        v, u_1}
      {D : Type u} [Fintype D] [Nonempty D]
      {template : FABL.CSPTemplate D}
      {EncodedInput : Type v}
      {inputEncoding :
        FABL.BinaryEncoding EncodedInput}
      {outputEncoding :
        FABL.BinaryEncoding
          (FABL.PackedFiniteAssignment D)}
      {semantic :
        EncodedInput 
          FABL.FiniteRandomizedCSPInput
            template}
      (adapter :
        FABL.ConditionalExpectationPolytimeAdapter
          template EncodedInput inputEncoding
          outputEncoding semantic)
      (input : EncodedInput) :
      (outputEncoding.decode
              (adapter.algorithm.toFun
                (inputEncoding.encode
                  input)) =
            some
              (semantic
                    input).conditionalExpectationPlan.toPackedAssignment 
          (semantic input).expectedValue 
            ((semantic input).problem.value
                (semantic
                      input).conditionalExpectationPlan.assignment)) 
        (semantic
                input).conditionalExpectationPlan.work 
          Polynomial.eval
            ((semantic input).variableCount +
              (semantic
                      input).problem.constraints.card)
            FABL.FiniteRandomizedCSPInput.conditionalExpectationWorkPolynomial
    The end-to-end certificate combines the decoded CSLib output, its pure value guarantee, and
    the explicit fixed-template quadratic semantic work bound. 
Lemma7.5.22
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Definition 7.4.5
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 2
Reverse dependency previews
Preview
Lemma 7.4.6
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Exercise 7.22. Extend a Boolean tester to f:\{-1,1\}^n\to[-1,1] by returning, independently at each query, a random sign of mean f(x). Prove that Equation (7.4) remains valid and deduce that the Håstad_\delta Test is a (1/2,1-\delta) Dictator-vs.-No-Notables test in the full sense of Definition 7.37.

Lean code for Lemma7.5.222 theorems
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.hastadAcceptanceProbability_eq_fourierSum_randomizedSigns {n : }
      (δ : ) ( : δ  Set.Icc 0 1) (f : FABL.BoundedCubeFunction n) :
      FABL.hastadAcceptanceProbability δ  f =
        1 / 2 +
          1 / 2 *
             S with Odd S.card,
              (1 - δ) ^ S.card * FABL.fourierCoeff f.toFun S ^ 3
    theorem FABL.hastadAcceptanceProbability_eq_fourierSum_randomizedSigns
      {n : } (δ : ) ( : δ  Set.Icc 0 1)
      (f : FABL.BoundedCubeFunction n) :
      FABL.hastadAcceptanceProbability δ 
          f =
        1 / 2 +
          1 / 2 *
             S with Odd S.card,
              (1 - δ) ^ S.card *
                FABL.fourierCoeff f.toFun S ^
                  3
    O'Donnell, Exercise 7.22: Equation (7.4) already holds for the full `[-1,1]`-valued
    randomized-assignment semantics of Definition 7.37. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.hastad_fullRandomizedAssignment_dictatorVsNoNotables (δ : )
      ( : δ  Set.Ioo 0 (1 / 2)) :
      FABL.IsDictatorVsNoNotablesTest FABL.maxE3LinPredicates (1 / 2)
        (1 - δ) (FABL.hastadSoundnessError (2 * δ))
        (FABL.hastadDictatorTestFamily δ )
    theorem FABL.hastad_fullRandomizedAssignment_dictatorVsNoNotables
      (δ : ) ( : δ  Set.Ioo 0 (1 / 2)) :
      FABL.IsDictatorVsNoNotablesTest
        FABL.maxE3LinPredicates (1 / 2)
        (1 - δ)
        (FABL.hastadSoundnessError (2 * δ))
        (FABL.hastadDictatorTestFamily δ )
    O'Donnell, Exercise 7.22: the Håstad family satisfies the full
    Dictator-vs.-No-Notables definition, not merely its Boolean special case. 
Lemma7.5.23
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 1
Used by 3
Reverse dependency previews
Preview
Theorem 7.4.9
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Exercise 7.23. Suppose \Psi is closed under negating an input variable.

(a) Independently replace each query f(x) by either f(x) or -f(-x). The resulting test has the same acceptance probability as the original test applied to f^{\mathrm{odd}}(x)=\frac{f(x)-f(-x)}2.

(b) This symmetrization preserves the (\alpha,\beta) Dictator-vs.-No-Notables parameters. Thus one may assume without loss that the tested function is odd.

Lean code for Lemma7.5.2314 declarations
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.SignPredicate.negateInputs (P : FABL.SignPredicate)
      (σ : Fin P.arity  Bool) : FABL.SignPredicate
    def FABL.SignPredicate.negateInputs
      (P : FABL.SignPredicate)
      (σ : Fin P.arity  Bool) :
      FABL.SignPredicate
    Negate precisely the inputs selected by a Boolean mask. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.IsClosedUnderInputNegations (Ψ : Set FABL.SignPredicate) : Prop
    def FABL.IsClosedUnderInputNegations
      (Ψ : Set FABL.SignPredicate) : Prop
    A predicate family is closed under independently negating predicate inputs. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.SignQueryCheck.negateQueries {n : } (C : FABL.SignQueryCheck n)
      (σ : Fin C.predicate.arity  Bool) : FABL.SignQueryCheck n
    def FABL.SignQueryCheck.negateQueries {n : }
      (C : FABL.SignQueryCheck n)
      (σ : Fin C.predicate.arity  Bool) :
      FABL.SignQueryCheck n
    Independently negate the selected query points and compensate by negating the corresponding
    predicate inputs. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.SignQueryCheck.negateQueries_mem {n : }
      {C : FABL.SignQueryCheck n} {Ψ : Set FABL.SignPredicate}
      ( : FABL.IsClosedUnderInputNegations Ψ) (hC : C.predicate  Ψ)
      (σ : Fin C.predicate.arity  Bool) : (C.negateQueries σ).predicate  Ψ
    theorem FABL.SignQueryCheck.negateQueries_mem
      {n : } {C : FABL.SignQueryCheck n}
      {Ψ : Set FABL.SignPredicate}
      ( :
        FABL.IsClosedUnderInputNegations Ψ)
      (hC : C.predicate  Ψ)
      (σ : Fin C.predicate.arity  Bool) :
      (C.negateQueries σ).predicate  Ψ
    Closure under input negations keeps every symmetrized check inside the predicate family. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.oddPart {n : } (f : FABL.SignCube n  ) : FABL.SignCube n  
    def FABL.oddPart {n : }
      (f : FABL.SignCube n  ) :
      FABL.SignCube n  
    O'Donnell, Exercise 7.23: the odd part of a real-valued cube function. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.BoundedCubeFunction.oddPart {n : }
      (f : FABL.BoundedCubeFunction n) : FABL.BoundedCubeFunction n
    def FABL.BoundedCubeFunction.oddPart {n : }
      (f : FABL.BoundedCubeFunction n) :
      FABL.BoundedCubeFunction n
    The odd part of a bounded cube function is still bounded by one. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.odd_oddPart {n : } (f : FABL.SignCube n  ) :
      Function.Odd (FABL.oddPart f)
    theorem FABL.odd_oddPart {n : }
      (f : FABL.SignCube n  ) :
      Function.Odd (FABL.oddPart f)
    Odd symmetrization is genuinely odd. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.BoundedCubeFunction.oddPart_ofBoolean_dictator {n : }
      (i : Fin n) :
      (FABL.BoundedCubeFunction.ofBoolean (FABL.dictator i)).oddPart =
        FABL.BoundedCubeFunction.ofBoolean (FABL.dictator i)
    theorem FABL.BoundedCubeFunction.oddPart_ofBoolean_dictator
      {n : } (i : Fin n) :
      (FABL.BoundedCubeFunction.ofBoolean
            (FABL.dictator i)).oddPart =
        FABL.BoundedCubeFunction.ofBoolean
          (FABL.dictator i)
    Odd symmetrization fixes every dictator. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.SignQueryCheck.oddSymmetrizedValue {n : }
      (C : FABL.SignQueryCheck n) (f : FABL.BoundedCubeFunction n) : 
    def FABL.SignQueryCheck.oddSymmetrizedValue
      {n : } (C : FABL.SignQueryCheck n)
      (f : FABL.BoundedCubeFunction n) : 
    The actual independently-negated query checks used in odd symmetrization. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.SignQueryCheck.oddSymmetrizedValue_eq_oddPart {n : }
      (C : FABL.SignQueryCheck n) (f : FABL.BoundedCubeFunction n) :
      C.oddSymmetrizedValue f = C.randomizedValue f.oddPart
    theorem FABL.SignQueryCheck.oddSymmetrizedValue_eq_oddPart
      {n : } (C : FABL.SignQueryCheck n)
      (f : FABL.BoundedCubeFunction n) :
      C.oddSymmetrizedValue f =
        C.randomizedValue f.oddPart
    O'Donnell, Exercise 7.23(a): independently using `f(x)` or `-f(-x)` at every query has
    exactly the original check's acceptance value on the odd part of `f`. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.SignTester.oddSymmetrizedAcceptanceProbability {n : }
      (T : FABL.SignTester n) (f : FABL.BoundedCubeFunction n) : 
    def FABL.SignTester.oddSymmetrizedAcceptanceProbability
      {n : } (T : FABL.SignTester n)
      (f : FABL.BoundedCubeFunction n) : 
    Acceptance probability of the tester obtained by independently odd-symmetrizing every query. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.SignTester.oddSymmetrizedAcceptanceProbability_eq_oddPart {n : }
      (T : FABL.SignTester n) (f : FABL.BoundedCubeFunction n) :
      T.oddSymmetrizedAcceptanceProbability f =
        T.acceptanceProbability f.oddPart
    theorem FABL.SignTester.oddSymmetrizedAcceptanceProbability_eq_oddPart
      {n : } (T : FABL.SignTester n)
      (f : FABL.BoundedCubeFunction n) :
      T.oddSymmetrizedAcceptanceProbability
          f =
        T.acceptanceProbability f.oddPart
    O'Donnell, Exercise 7.23(a), tester form: odd symmetrization accepts `f` with exactly the
    base tester's acceptance probability on `f^odd`. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.stableInfluence_oddPart_le {n : } (ρ : ) ( : ρ  Set.Icc 0 1)
      (f : FABL.SignCube n  ) (i : Fin n) :
      FABL.stableInfluence ρ (FABL.oddPart f) i  FABL.stableInfluence ρ f i
    theorem FABL.stableInfluence_oddPart_le {n : }
      (ρ : ) ( : ρ  Set.Icc 0 1)
      (f : FABL.SignCube n  ) (i : Fin n) :
      FABL.stableInfluence ρ (FABL.oddPart f)
          i 
        FABL.stableInfluence ρ f i
    Odd symmetrization cannot increase any stable influence. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.SignTester.oddSymmetrization_preserves_parameters {n : }
      (T : FABL.SignTester n) (β ε δ bound : ) ( : δ  Set.Icc 0 1)
      (hcomplete :
         (i : Fin n),
          β 
            T.acceptanceProbability
              (FABL.BoundedCubeFunction.ofBoolean (FABL.dictator i)))
      (hsoundOdd :
         (f : FABL.BoundedCubeFunction n),
          Function.Odd f.toFun 
            FABL.HasSmallStableInfluences ε δ f.toFun 
              T.acceptanceProbability f  bound) :
      (∀ (i : Fin n),
          β 
            T.oddSymmetrizedAcceptanceProbability
              (FABL.BoundedCubeFunction.ofBoolean (FABL.dictator i))) 
         (f : FABL.BoundedCubeFunction n),
          FABL.HasSmallStableInfluences ε δ f.toFun 
            T.oddSymmetrizedAcceptanceProbability f  bound
    theorem FABL.SignTester.oddSymmetrization_preserves_parameters
      {n : } (T : FABL.SignTester n)
      (β ε δ bound : ) ( : δ  Set.Icc 0 1)
      (hcomplete :
         (i : Fin n),
          β 
            T.acceptanceProbability
              (FABL.BoundedCubeFunction.ofBoolean
                (FABL.dictator i)))
      (hsoundOdd :
         (f : FABL.BoundedCubeFunction n),
          Function.Odd f.toFun 
            FABL.HasSmallStableInfluences ε δ
                f.toFun 
              T.acceptanceProbability f 
                bound) :
      (∀ (i : Fin n),
          β 
            T.oddSymmetrizedAcceptanceProbability
              (FABL.BoundedCubeFunction.ofBoolean
                (FABL.dictator i))) 
         (f : FABL.BoundedCubeFunction n),
          FABL.HasSmallStableInfluences ε δ
              f.toFun 
            T.oddSymmetrizedAcceptanceProbability
                f 
              bound
    O'Donnell, Exercise 7.23(b): odd symmetrization preserves dictator completeness and extends
    soundness from odd functions to arbitrary bounded functions without changing the parameters. 
Lemma7.5.24
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Proposition 2.4.8
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Exercise 7.24. Suppose a test's soundness analysis applies only to functions of the form T_{1-\delta}h. Add independent \delta-noise before each query.

(a) The new test on h has the old test's acceptance probability on T_{1-\delta}h.

(b) If the arity is r, the new test has parameters (\alpha,\beta-r\delta/2).

Lean code for Lemma7.5.2410 declarations
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.BoundedCubeFunction.noise {n : } (ρ : ) ( : ρ  Set.Icc (-1) 1)
      (f : FABL.BoundedCubeFunction n) : FABL.BoundedCubeFunction n
    def FABL.BoundedCubeFunction.noise {n : }
      (ρ : ) ( : ρ  Set.Icc (-1) 1)
      (f : FABL.BoundedCubeFunction n) :
      FABL.BoundedCubeFunction n
    Applying the noise operator to a bounded cube function preserves the interval `[-1,1]`. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.SignQueryCheck.noisePreprocessedValue {n : }
      (C : FABL.SignQueryCheck n) (δ : ) ( : δ  Set.Icc 0 1)
      (f : FABL.BoundedCubeFunction n) : 
    def FABL.SignQueryCheck.noisePreprocessedValue
      {n : } (C : FABL.SignQueryCheck n)
      (δ : ) ( : δ  Set.Icc 0 1)
      (f : FABL.BoundedCubeFunction n) : 
    O'Donnell, Exercise 7.24: before each predicate input, independently replace the query by a
    `(1-δ)`-correlated query and then evaluate the bounded function there. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.SignQueryCheck.noisePreprocessedValue_eq_noiseOperator {n : }
      (C : FABL.SignQueryCheck n) (δ : ) ( : δ  Set.Icc 0 1)
      (f : FABL.BoundedCubeFunction n) :
      C.noisePreprocessedValue δ  f =
        C.randomizedValue (FABL.BoundedCubeFunction.noise (1 - δ)  f)
    theorem FABL.SignQueryCheck.noisePreprocessedValue_eq_noiseOperator
      {n : } (C : FABL.SignQueryCheck n)
      (δ : ) ( : δ  Set.Icc 0 1)
      (f : FABL.BoundedCubeFunction n) :
      C.noisePreprocessedValue δ  f =
        C.randomizedValue
          (FABL.BoundedCubeFunction.noise
            (1 - δ)  f)
    O'Donnell, Exercise 7.24(a): independently adding `(1-δ)`-correlated query noise is exactly
    the same as running the original check on `T_{1-δ} f`. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.SignTester.noisePreprocessedAcceptanceProbability {n : }
      (T : FABL.SignTester n) (δ : ) ( : δ  Set.Icc 0 1)
      (f : FABL.BoundedCubeFunction n) : 
    def FABL.SignTester.noisePreprocessedAcceptanceProbability
      {n : } (T : FABL.SignTester n) (δ : )
      ( : δ  Set.Icc 0 1)
      (f : FABL.BoundedCubeFunction n) : 
    Acceptance probability after independently adding noise before every tester query. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.SignTester.noisePreprocessedAcceptanceProbability_eq_noiseOperator
      {n : } (T : FABL.SignTester n) (δ : ) ( : δ  Set.Icc 0 1)
      (f : FABL.BoundedCubeFunction n) :
      T.noisePreprocessedAcceptanceProbability δ  f =
        T.acceptanceProbability (FABL.BoundedCubeFunction.noise (1 - δ)  f)
    theorem FABL.SignTester.noisePreprocessedAcceptanceProbability_eq_noiseOperator
      {n : } (T : FABL.SignTester n) (δ : )
      ( : δ  Set.Icc 0 1)
      (f : FABL.BoundedCubeFunction n) :
      T.noisePreprocessedAcceptanceProbability
          δ  f =
        T.acceptanceProbability
          (FABL.BoundedCubeFunction.noise
            (1 - δ)  f)
    O'Donnell, Exercise 7.24(a), tester form: query-noise preprocessing runs the old tester on
    the noise operator. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.SignTester.noisePreprocessed {n : } (T : FABL.SignTester n)
      (δ : ) ( : δ  Set.Icc 0 1) : FABL.SignTester n
    def FABL.SignTester.noisePreprocessed {n : }
      (T : FABL.SignTester n) (δ : )
      ( : δ  Set.Icc 0 1) :
      FABL.SignTester n
    The finite tester obtained by materializing the independent noisy queries in its seed. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.SignTester.noisePreprocessed_acceptanceProbability {n : }
      (T : FABL.SignTester n) (δ : ) ( : δ  Set.Icc 0 1)
      (f : FABL.BoundedCubeFunction n) :
      (T.noisePreprocessed δ ).acceptanceProbability f =
        T.noisePreprocessedAcceptanceProbability δ  f
    theorem FABL.SignTester.noisePreprocessed_acceptanceProbability
      {n : } (T : FABL.SignTester n) (δ : )
      ( : δ  Set.Icc 0 1)
      (f : FABL.BoundedCubeFunction n) :
      (T.noisePreprocessed δ
              ).acceptanceProbability
          f =
        T.noisePreprocessedAcceptanceProbability
          δ  f
    Materializing query noise in the tester seed preserves the numerical preprocessing
    semantics. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.SignTester.noisePreprocessed_usesPredicates {n : }
      (T : FABL.SignTester n) (Ψ : Set FABL.SignPredicate) (δ : )
      ( : δ  Set.Icc 0 1) (huses : T.UsesPredicates Ψ) :
      (T.noisePreprocessed δ ).UsesPredicates Ψ
    theorem FABL.SignTester.noisePreprocessed_usesPredicates
      {n : } (T : FABL.SignTester n)
      (Ψ : Set FABL.SignPredicate) (δ : )
      ( : δ  Set.Icc 0 1)
      (huses : T.UsesPredicates Ψ) :
      (T.noisePreprocessed δ
            ).UsesPredicates
        Ψ
    Materializing query noise preserves the predicate family used by a tester. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.SignTester.noisePreprocessedAcceptanceProbability_dictator_ge
      {n : } (T : FABL.SignTester n) (r : )
      (harity :  (seed : T.Seed), (T.check seed).predicate.arity = r)
      (δ : ) ( : δ  Set.Icc 0 1) (i : Fin n) :
      T.acceptanceProbability
            (FABL.BoundedCubeFunction.ofBoolean (FABL.dictator i)) -
          r * δ / 2 
        T.noisePreprocessedAcceptanceProbability δ 
          (FABL.BoundedCubeFunction.ofBoolean (FABL.dictator i))
    theorem FABL.SignTester.noisePreprocessedAcceptanceProbability_dictator_ge
      {n : } (T : FABL.SignTester n) (r : )
      (harity :
         (seed : T.Seed),
          (T.check seed).predicate.arity = r)
      (δ : ) ( : δ  Set.Icc 0 1)
      (i : Fin n) :
      T.acceptanceProbability
            (FABL.BoundedCubeFunction.ofBoolean
              (FABL.dictator i)) -
          r * δ / 2 
        T.noisePreprocessedAcceptanceProbability
          δ 
          (FABL.BoundedCubeFunction.ofBoolean
            (FABL.dictator i))
    Averaging the per-check loss gives the `rδ/2` dictator-completeness loss for an
    `r`-ary tester. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.SignTester.noisePreprocessing_preserves_parameters {n : }
      (T : FABL.SignTester n) (r : )
      (harity :  (seed : T.Seed), (T.check seed).predicate.arity = r)
      (δ : ) ( : δ  Set.Icc 0 1) (α β ε error : )
      (hcomplete :
         (i : Fin n),
          β 
            T.acceptanceProbability
              (FABL.BoundedCubeFunction.ofBoolean (FABL.dictator i)))
      (hsoundOnNoise :
         (f : FABL.BoundedCubeFunction n),
          FABL.HasSmallStableInfluences ε ε f.toFun 
            T.acceptanceProbability
                (FABL.BoundedCubeFunction.noise (1 - δ)  f) 
              α + error) :
      (∀ (i : Fin n),
          β - r * δ / 2 
            T.noisePreprocessedAcceptanceProbability δ 
              (FABL.BoundedCubeFunction.ofBoolean (FABL.dictator i))) 
         (f : FABL.BoundedCubeFunction n),
          FABL.HasSmallStableInfluences ε ε f.toFun 
            T.noisePreprocessedAcceptanceProbability δ  f  α + error
    theorem FABL.SignTester.noisePreprocessing_preserves_parameters
      {n : } (T : FABL.SignTester n) (r : )
      (harity :
         (seed : T.Seed),
          (T.check seed).predicate.arity = r)
      (δ : ) ( : δ  Set.Icc 0 1)
      (α β ε error : )
      (hcomplete :
         (i : Fin n),
          β 
            T.acceptanceProbability
              (FABL.BoundedCubeFunction.ofBoolean
                (FABL.dictator i)))
      (hsoundOnNoise :
         (f : FABL.BoundedCubeFunction n),
          FABL.HasSmallStableInfluences ε ε
              f.toFun 
            T.acceptanceProbability
                (FABL.BoundedCubeFunction.noise
                  (1 - δ)  f) 
              α + error) :
      (∀ (i : Fin n),
          β - r * δ / 2 
            T.noisePreprocessedAcceptanceProbability
              δ 
              (FABL.BoundedCubeFunction.ofBoolean
                (FABL.dictator i))) 
         (f : FABL.BoundedCubeFunction n),
          FABL.HasSmallStableInfluences ε ε
              f.toFun 
            T.noisePreprocessedAcceptanceProbability
                δ  f 
              α + error
    O'Donnell, Exercise 7.24(b): for an `r`-ary test, independent `δ`-noise before every
    query preserves the analyzed soundness bound and changes dictator completeness from `β` to
    `β-rδ/2`. 
Lemma7.5.25
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 5
Statement dependency previews
Preview
Theorem 1.4.2
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 7.25. Give a second proof of Theorem 7.42 using the original BLR analysis together with the odd symmetrization of Exercise 7.23 and the query-noising transformation of Exercise 7.24.

The independent construction noises each of the three Odd-BLR queries at rate 2\delta/3, giving completeness 1-\delta. Its soundness uses the positive cutoff 1-(1-2\delta/3)^2 and is proved from the original BLR cube formula and Parseval, without invoking Theorem 7.42 or Equation (7.6).

Lean code for Lemma7.5.259 declarations
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.originalBLRTester (n : ) : FABL.SignTester n
    def FABL.originalBLRTester (n : ) :
      FABL.SignTester n
    The original three-query BLR test in sign notation. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.originalBLRTester_acceptanceProbability_eq_fourierSum {n : }
      (f : FABL.BoundedCubeFunction n) :
      (FABL.originalBLRTester n).acceptanceProbability f =
        1 / 2 + 1 / 2 *  S, FABL.fourierCoeff f.toFun S ^ 3
    theorem FABL.originalBLRTester_acceptanceProbability_eq_fourierSum
      {n : }
      (f : FABL.BoundedCubeFunction n) :
      (FABL.originalBLRTester
              n).acceptanceProbability
          f =
        1 / 2 +
          1 / 2 *
             S,
              FABL.fourierCoeff f.toFun S ^ 3
    The original BLR acceptance formula for bounded real-valued cube functions. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.originalBLRTester_oddSymmetrizedAcceptanceProbability_eq_oddBLR
      {n : } (f : FABL.BoundedCubeFunction n) :
      (FABL.originalBLRTester n).oddSymmetrizedAcceptanceProbability f =
        FABL.oddBLRAcceptanceProbability f
    theorem FABL.originalBLRTester_oddSymmetrizedAcceptanceProbability_eq_oddBLR
      {n : }
      (f : FABL.BoundedCubeFunction n) :
      (FABL.originalBLRTester
              n).oddSymmetrizedAcceptanceProbability
          f =
        FABL.oddBLRAcceptanceProbability f
    Odd BLR is numerically the independent odd symmetrization of the original BLR test. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.oddBLRQueryNoiseRate (δ : ) : 
    def FABL.oddBLRQueryNoiseRate (δ : ) : 
    Per-query noise rate used by the alternate BLR construction. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.oddBLRQueryNoiseCutoff (δ : ) : 
    def FABL.oddBLRQueryNoiseCutoff (δ : ) : 
    The notable-coordinate cutoff justified by smoothing all three BLR queries. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.oddBLRQueryNoiseSoundnessError (δ : ) :   
    def FABL.oddBLRQueryNoiseSoundnessError
      (δ : ) :   
    Soundness error for the alternate BLR construction. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.oddBLRQueryNoiseTestFamily (δ : ) ( : δ  Set.Ioo 0 (1 / 2))
      (n : ) (_hn : 0 < n) : FABL.SignTester n
    def FABL.oddBLRQueryNoiseTestFamily (δ : )
      ( : δ  Set.Ioo 0 (1 / 2)) (n : )
      (_hn : 0 < n) : FABL.SignTester n
    The operational family obtained by odd-symmetrizing BLR and independently noising all three
    queries. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.oddBLRQueryNoise_parameter_bounds {n : } (δ : )
      ( : δ  Set.Ioo 0 (1 / 2)) (hn : 0 < n) (ε : )
      ( : ε  Set.Icc 0 1)
      (hεcutoff : ε  FABL.oddBLRQueryNoiseCutoff δ) :
      (∀ (i : Fin n),
          1 - δ 
            (FABL.oddBLRQueryNoiseTestFamily δ  n
                  hn).acceptanceProbability
              (FABL.BoundedCubeFunction.ofBoolean (FABL.dictator i))) 
         (f : FABL.BoundedCubeFunction n),
          FABL.HasSmallStableInfluences ε ε f.toFun 
            (FABL.oddBLRQueryNoiseTestFamily δ  n
                    hn).acceptanceProbability
                f 
              1 / 2 + ε / 2
    theorem FABL.oddBLRQueryNoise_parameter_bounds
      {n : } (δ : )
      ( : δ  Set.Ioo 0 (1 / 2))
      (hn : 0 < n) (ε : )
      ( : ε  Set.Icc 0 1)
      (hεcutoff :
        ε  FABL.oddBLRQueryNoiseCutoff δ) :
      (∀ (i : Fin n),
          1 - δ 
            (FABL.oddBLRQueryNoiseTestFamily δ
                   n
                  hn).acceptanceProbability
              (FABL.BoundedCubeFunction.ofBoolean
                (FABL.dictator i))) 
         (f : FABL.BoundedCubeFunction n),
          FABL.HasSmallStableInfluences ε ε
              f.toFun 
            (FABL.oddBLRQueryNoiseTestFamily δ
                     n
                    hn).acceptanceProbability
                f 
              1 / 2 + ε / 2
    The alternate construction has the exact completeness and small-influence soundness bounds
    before packaging them as a Dictator-vs.-No-Notables family. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.hastad_dictatorVsNoNotables_via_oddBLR_and_queryNoise (δ : )
      ( : δ  Set.Ioo 0 (1 / 2)) :
      FABL.IsDictatorVsNoNotablesTest FABL.maxE3LinPredicates (1 / 2)
        (1 - δ) (FABL.oddBLRQueryNoiseSoundnessError δ)
        (FABL.oddBLRQueryNoiseTestFamily δ )
    theorem FABL.hastad_dictatorVsNoNotables_via_oddBLR_and_queryNoise
      (δ : ) ( : δ  Set.Ioo 0 (1 / 2)) :
      FABL.IsDictatorVsNoNotablesTest
        FABL.maxE3LinPredicates (1 / 2)
        (1 - δ)
        (FABL.oddBLRQueryNoiseSoundnessError
          δ)
        (FABL.oddBLRQueryNoiseTestFamily δ )
    O'Donnell, Exercise 7.25: original BLR analysis, odd symmetrization, and independent query
    noise give a second `(1/2, 1-δ)` Dictator-vs.-No-Notables construction for Max-E3-Lin. 
Lemma7.5.26
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Proposition 2.4.8
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 7.26. Theorem 7.40 remains true if the no-notables hypothesis uses ordinary influences \operatorname{Inf}_i[f] instead of stable influences \operatorname{Inf}^{(1-\epsilon)}_i[f]; a Dictators-vs.-No-Influentials test is sufficient.

The direction from no-notables to no-influentials testers uses \operatorname{Inf}^{(1-\epsilon)}_i[f]\le \operatorname{Inf}_i[f]. The converse is not asserted. A separate ordinary-influence long-code decoding proves the quantitative bound \tau\epsilon/(8q^2) and feeds the same globally filtered finite CSP pipeline as Theorem 7.40. Its final complexity endpoint has the same explicit machine, codec, uniform-refinement, and external gap witnesses as that theorem.

Lean code for Lemma7.5.268 declarations
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.stableInfluence_le_influence {n : } (ρ : ) ( : ρ  Set.Icc 0 1)
      (f : FABL.SignCube n  ) (i : Fin n) :
      FABL.stableInfluence ρ f i  FABL.influence f i
    theorem FABL.stableInfluence_le_influence {n : }
      (ρ : ) ( : ρ  Set.Icc 0 1)
      (f : FABL.SignCube n  ) (i : Fin n) :
      FABL.stableInfluence ρ f i 
        FABL.influence f i
    O'Donnell, Exercise 7.26: a stable influence at correlation in `[0,1]` is at most the
    ordinary influence of the same coordinate. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.HasSmallInfluences.hasSmallStableInfluences {n : } {ε : }
      ( : ε  Set.Icc 0 1) {f : FABL.SignCube n  }
      (hsmall : FABL.HasSmallInfluences ε f) :
      FABL.HasSmallStableInfluences ε ε f
    theorem FABL.HasSmallInfluences.hasSmallStableInfluences
      {n : } {ε : } ( : ε  Set.Icc 0 1)
      {f : FABL.SignCube n  }
      (hsmall : FABL.HasSmallInfluences ε f) :
      FABL.HasSmallStableInfluences ε ε f
    O'Donnell, Exercise 7.26, pure tester bridge: small ordinary influences imply the
    small stable influences required by Definition 7.37. 
  • structure(9 fields)defined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    structure FABL.IsDictatorVsNoInfluentialsTest (Ψ : Set FABL.SignPredicate)
      (α β : ) (error :   ) (T : (n : )  0 < n  FABL.SignTester n) :
      Prop
    structure FABL.IsDictatorVsNoInfluentialsTest
      (Ψ : Set FABL.SignPredicate) (α β : )
      (error :   )
      (T :
        (n : )  0 < n  FABL.SignTester n) :
      Prop
    The ordinary-influence form of Definition 7.37 used in Exercise 7.26.  Its soundness
    hypothesis is restricted to functions whose ordinary influences are all at most `ε`; the
    randomized `[-1,1]` semantics and repeated-query convention are inherited unchanged. 
    predicateSet_finite : Ψ.Finite
    The allowed predicate set is finite. 
    alpha_pos : 0 < α
    The lower distinguishing parameter is positive. 
    alpha_lt_beta : α < β
    The distinguishing gap is nontrivial. 
    beta_le_one : β  1
    Acceptance targets are probabilities. 
    error_mem_Icc :  ε  Set.Icc 0 1, error ε  Set.Icc 0 1
    The error function maps `[0,1]` to `[0,1]`. 
    error_tendsto_zero : Filter.Tendsto error (nhdsWithin 0 (Set.Ioi 0)) (nhds 0)
    The soundness error tends to zero with the influence threshold. 
    usesPredicates :  (n : ) (hn : 0 < n), (T n hn).UsesPredicates Ψ
    Every check uses an allowed predicate. 
    dictator_complete :  (n : ) (hn : 0 < n) (i : Fin n),
      β  (T n hn).acceptanceProbability (FABL.BoundedCubeFunction.ofBoolean (FABL.dictator i))
    Every dictator is accepted with probability at least `β`. 
    noInfluentials_sound :  (n : ) (hn : 0 < n),
       ε  Set.Icc 0 1,
         (f : FABL.BoundedCubeFunction n),
          FABL.HasSmallInfluences ε f.toFun  (T n hn).acceptanceProbability f  α + error ε
    Functions with no `ε`-influential coordinate have acceptance at most `α + error ε`. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.IsDictatorVsNoNotablesTest.toNoInfluentials
      {Ψ : Set FABL.SignPredicate} {α β : } {error :   }
      {T : (n : )  0 < n  FABL.SignTester n}
      (hTest : FABL.IsDictatorVsNoNotablesTest Ψ α β error T) :
      FABL.IsDictatorVsNoInfluentialsTest Ψ α β error T
    theorem FABL.IsDictatorVsNoNotablesTest.toNoInfluentials
      {Ψ : Set FABL.SignPredicate} {α β : }
      {error :   }
      {T :
        (n : )  0 < n  FABL.SignTester n}
      (hTest :
        FABL.IsDictatorVsNoNotablesTest Ψ α β
          error T) :
      FABL.IsDictatorVsNoInfluentialsTest Ψ α
        β error T
    Exercise 7.26's direct tester transfer: a no-notables tester is also sound under the
    stronger premise that all ordinary influences are small. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.RegularUniqueGame.excess_mul_epsilon_div_eight_mul_q_sq_le_optimum_of_noInfluentials.{u_1,
        u_2}
      {q : } (G : FABL.RegularUniqueGame q) {Ψ : Set FABL.SignPredicate}
      {α β : } {error :   }
      {testerFamily : (n : )  0 < n  FABL.SignTester n}
      [Nonempty (Fin q)]
      (htester :
        FABL.IsDictatorVsNoInfluentialsTest Ψ α β error testerFamily)
      (hq : 0 < q) (table : G.BoundedLongCodeTable) (ε τ : )
      ( : ε  Set.Ioc 0 1)
      (hvalue :
        α + error ε + τ 
          G.boundedLongCodeValue (testerFamily q hq) table) :
      τ * ε / (8 * q ^ 2)  G.toFiniteUniqueGame.toCSPInstance.optimum
    theorem FABL.RegularUniqueGame.excess_mul_epsilon_div_eight_mul_q_sq_le_optimum_of_noInfluentials.{u_1,
        u_2}
      {q : } (G : FABL.RegularUniqueGame q)
      {Ψ : Set FABL.SignPredicate} {α β : }
      {error :   }
      {testerFamily :
        (n : )  0 < n  FABL.SignTester n}
      [Nonempty (Fin q)]
      (htester :
        FABL.IsDictatorVsNoInfluentialsTest Ψ
          α β error testerFamily)
      (hq : 0 < q)
      (table : G.BoundedLongCodeTable)
      (ε τ : ) ( : ε  Set.Ioc 0 1)
      (hvalue :
        α + error ε + τ 
          G.boundedLongCodeValue
            (testerFamily q hq) table) :
      τ * ε / (8 * q ^ 2) 
        G.toFiniteUniqueGame.toCSPInstance.optimum
    Exercise 7.26, deterministic endpoint: finite maximization extracts one global labeling,
    so ordinary-influence tester excess `τ` implies Unique Games optimum at least `τε/(8q²)`. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.RegularUniqueGame.globallyFilteredLongCodeCSP_optimum_le_of_noInfluentials.{u_1,
        u_2, u_3}
      {q : } (G : FABL.RegularUniqueGame q) [DecidableEq G.Vertex]
      [Nonempty (Fin q)] {Ψ : Set FABL.SignPredicate} {α β : }
      {error :   } {testerFamily : (n : )  0 < n  FABL.SignTester n}
      (htester :
        FABL.IsDictatorVsNoInfluentialsTest Ψ α β error testerFamily)
      (hq : 0 < q)
      (R :
        (G.longCodeAllowedWeightedExperiment (testerFamily q hq) Ψ 
            ).UniformRefinement)
      (r M : ) (hM : 0 < M) (hrM : r  M)
      (harity :
         (seed : (testerFamily q hq).Seed),
          ((testerFamily q hq).check seed).predicate.arity  r)
      (ε τ : ) ( : ε  Set.Ioc 0 1)
      (hoptimum :
        G.toFiniteUniqueGame.toCSPInstance.optimum <
          τ * ε / (8 * q ^ 2)) :
      (G.globallyFilteredLongCodeCSP (testerFamily q hq) Ψ   R r M hrM
              harity).optimum 
        α + error ε + τ + r ^ 2 / M
    theorem FABL.RegularUniqueGame.globallyFilteredLongCodeCSP_optimum_le_of_noInfluentials.{u_1,
        u_2, u_3}
      {q : } (G : FABL.RegularUniqueGame q)
      [DecidableEq G.Vertex]
      [Nonempty (Fin q)]
      {Ψ : Set FABL.SignPredicate} {α β : }
      {error :   }
      {testerFamily :
        (n : )  0 < n  FABL.SignTester n}
      (htester :
        FABL.IsDictatorVsNoInfluentialsTest Ψ
          α β error testerFamily)
      (hq : 0 < q)
      (R :
        (G.longCodeAllowedWeightedExperiment
            (testerFamily q hq) Ψ 
            ).UniformRefinement)
      (r M : ) (hM : 0 < M) (hrM : r  M)
      (harity :
         (seed : (testerFamily q hq).Seed),
          ((testerFamily q hq).check
                  seed).predicate.arity 
            r)
      (ε τ : ) ( : ε  Set.Ioc 0 1)
      (hoptimum :
        G.toFiniteUniqueGame.toCSPInstance.optimum <
          τ * ε / (8 * q ^ 2)) :
      (G.globallyFilteredLongCodeCSP
              (testerFamily q hq) Ψ   R r M
              hrM harity).optimum 
        α + error ε + τ + r ^ 2 / M
    Exercise 7.26 for the literal finite output: ordinary-influence soundness and fixed alphabet
    size give the corrected decoding threshold `τε/(8q²)`. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.EncodedRegularUniqueGamesFamily.longCodeFiniteTransform_reducesGap_of_noInfluentials.{u_1,
        u_2}
      {q : } (family : FABL.EncodedRegularUniqueGamesFamily q)
      [Nonempty (Fin q)] {Ψ : Set FABL.SignPredicate} {α β : }
      {error :   } {T : (n : )  0 < n  FABL.SignTester n}
      (hTest : FABL.IsDictatorVsNoInfluentialsTest Ψ α β error T)
      (hq : 0 < q) (encoding : family.OptimizationEncoding)
      (transform : family.LongCodeFiniteTransform )
      (codec : family.LongCodeOutputCodec transform)
      (machine : family.LongCodeTransformMachine codec)
      (ugSoundness ugCompleteness targetSoundness targetCompleteness : )
      (hugGap : ugSoundness < ugCompleteness)
      (htargetGap : targetSoundness < targetCompleteness) (δUG ε τ : )
      ( : ε  Set.Ioc 0 1) (hugCompleteness : 1 - δUG  ugCompleteness)
      (hugSoundness : ugSoundness < τ * ε / (8 * q ^ 2))
      (htargetCompleteness :
        targetCompleteness 
          β - transform.r * δUG - transform.r ^ 2 / transform.M)
      (htargetSoundness :
        α + error ε + τ + transform.r ^ 2 / transform.M 
          targetSoundness) :
      FABL.PromiseKarpReducible
        (encoding.problem.gapPromiseReal ugSoundness ugCompleteness hugGap)
        (codec.target.gapPromiseReal targetSoundness targetCompleteness
          htargetGap)
    theorem FABL.EncodedRegularUniqueGamesFamily.longCodeFiniteTransform_reducesGap_of_noInfluentials.{u_1,
        u_2}
      {q : }
      (family :
        FABL.EncodedRegularUniqueGamesFamily
          q)
      [Nonempty (Fin q)]
      {Ψ : Set FABL.SignPredicate} {α β : }
      {error :   }
      {T :
        (n : )  0 < n  FABL.SignTester n}
      (hTest :
        FABL.IsDictatorVsNoInfluentialsTest Ψ
          α β error T)
      (hq : 0 < q)
      (encoding : family.OptimizationEncoding)
      (transform :
        family.LongCodeFiniteTransform )
      (codec :
        family.LongCodeOutputCodec transform)
      (machine :
        family.LongCodeTransformMachine codec)
      (ugSoundness ugCompleteness
        targetSoundness targetCompleteness :
        )
      (hugGap : ugSoundness < ugCompleteness)
      (htargetGap :
        targetSoundness < targetCompleteness)
      (δUG ε τ : ) ( : ε  Set.Ioc 0 1)
      (hugCompleteness :
        1 - δUG  ugCompleteness)
      (hugSoundness :
        ugSoundness < τ * ε / (8 * q ^ 2))
      (htargetCompleteness :
        targetCompleteness 
          β - transform.r * δUG -
            transform.r ^ 2 / transform.M)
      (htargetSoundness :
        α + error ε + τ +
            transform.r ^ 2 / transform.M 
          targetSoundness) :
      FABL.PromiseKarpReducible
        (encoding.problem.gapPromiseReal
          ugSoundness ugCompleteness hugGap)
        (codec.target.gapPromiseReal
          targetSoundness targetCompleteness
          htargetGap)
    Exercise 7.26's independent ordinary-influence specialization of Theorem 7.40. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.EncodedRegularUniqueGamesFamily.conditional_uniqueGames_hardness_of_noInfluentials.{u_1,
        u_2}
      {q : } (family : FABL.EncodedRegularUniqueGamesFamily q)
      [Nonempty (Fin q)] {source : FABL.BinaryPromiseProblem}
      {Ψ : Set FABL.SignPredicate} {α β : } {error :   }
      {T : (n : )  0 < n  FABL.SignTester n}
      (hTest : FABL.IsDictatorVsNoInfluentialsTest Ψ α β error T)
      (hq : 0 < q) (encoding : family.OptimizationEncoding)
      (UG : family.GapHypothesis source encoding)
      (transform : family.LongCodeFiniteTransform )
      (codec : family.LongCodeOutputCodec transform)
      (machine : family.LongCodeTransformMachine codec)
      (targetSoundness targetCompleteness : )
      (htargetGap : targetSoundness < targetCompleteness) (δUG ε τ : )
      ( : ε  Set.Ioc 0 1) (hugCompleteness : 1 - δUG  UG.completeness)
      (hugSoundness : UG.soundness < τ * ε / (8 * q ^ 2))
      (htargetCompleteness :
        targetCompleteness 
          β - transform.r * δUG - transform.r ^ 2 / transform.M)
      (htargetSoundness :
        α + error ε + τ + transform.r ^ 2 / transform.M 
          targetSoundness) :
      FABL.PromiseKarpReducible source
        (codec.target.gapPromiseReal targetSoundness targetCompleteness
          htargetGap)
    theorem FABL.EncodedRegularUniqueGamesFamily.conditional_uniqueGames_hardness_of_noInfluentials.{u_1,
        u_2}
      {q : }
      (family :
        FABL.EncodedRegularUniqueGamesFamily
          q)
      [Nonempty (Fin q)]
      {source : FABL.BinaryPromiseProblem}
      {Ψ : Set FABL.SignPredicate} {α β : }
      {error :   }
      {T :
        (n : )  0 < n  FABL.SignTester n}
      (hTest :
        FABL.IsDictatorVsNoInfluentialsTest Ψ
          α β error T)
      (hq : 0 < q)
      (encoding : family.OptimizationEncoding)
      (UG :
        family.GapHypothesis source encoding)
      (transform :
        family.LongCodeFiniteTransform )
      (codec :
        family.LongCodeOutputCodec transform)
      (machine :
        family.LongCodeTransformMachine codec)
      (targetSoundness targetCompleteness : )
      (htargetGap :
        targetSoundness < targetCompleteness)
      (δUG ε τ : ) ( : ε  Set.Ioc 0 1)
      (hugCompleteness :
        1 - δUG  UG.completeness)
      (hugSoundness :
        UG.soundness < τ * ε / (8 * q ^ 2))
      (htargetCompleteness :
        targetCompleteness 
          β - transform.r * δUG -
            transform.r ^ 2 / transform.M)
      (htargetSoundness :
        α + error ε + τ +
            transform.r ^ 2 / transform.M 
          targetSoundness) :
      FABL.PromiseKarpReducible source
        (codec.target.gapPromiseReal
          targetSoundness targetCompleteness
          htargetGap)
    Exercise 7.26's honest conditional hardness composition for a tester whose soundness premise
    uses ordinary influences. 
Definition7.5.27
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Definition 7.3.2
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 4
Reverse dependency previews
Preview
Theorem 7.4.8
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Exercise 7.27. Unique-Games(q) is the arity-two CSP over [q] whose allowed predicates are all bijective constraints \psi(i,j)=1\quad\Longleftrightarrow\quad\pi(j)=i for permutations \pi of [q]. Construct a polynomial-time (1,1)-approximation: whenever every constraint can be satisfied, try the q possible root labels in each connected component, propagate each choice through that component, and retain a satisfying choice. A single arbitrary root label is not sufficient when cycle permutations have only a proper subset of fixed labels.

The finite propagation construction and its (1,1) correctness are proved. At the encoded boundary, the compiled theorem is conditional on a caller-supplied CSLib polynomial-time output map satisfying the canonical encoding equation; no executable graph codec is fabricated for the generic finite types.

Lean code for Definition7.5.276 declarations
  • structure(11 fields)defined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    structure FABL.FiniteUniqueGame.{u, v} (q : ) : Type (max (u + 1) (v + 1))
    structure FABL.FiniteUniqueGame.{u, v} (q : ) :
      Type (max (u + 1) (v + 1))
    A finite Unique Games instance with nonempty constraint multiset and no isolated declared
    vertices.  The constraint equation is `π(label target) = label source`. 
    Vertex : Type u
    Variables of the instance. 
    vertexFintype : Fintype self.Vertex
    The variable set is finite. 
    vertexNonempty : Nonempty self.Vertex
    There is at least one variable. 
    Edge : Type v
    Constraint occurrences; distinct occurrences may carry identical data. 
    edgeFintype : Fintype self.Edge
    The constraint-occurrence set is finite. 
    edgeNonempty : Nonempty self.Edge
    The instance has at least one constraint. 
    source : self.Edge  self.Vertex
    First endpoint of a constraint. 
    target : self.Edge  self.Vertex
    Second endpoint of a constraint. 
    endpoints_ne :  (edge : self.Edge), self.source edge  self.target edge
    Unique Games constraints contain two distinct variables. 
    permutation : self.Edge  Equiv.Perm (Fin q)
    Bijection decorating a constraint. 
    participates :  (vertex : self.Vertex),  edge, self.source edge = vertex  self.target edge = vertex
    Every declared variable participates in a constraint. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.FiniteUniqueGame.satisfiable_iff_exists_component_labels.{u_1, u_2}
      {q : } (G : FABL.FiniteUniqueGame q) :
      G.Satisfiable 
         rootLabel, G.FullySatisfied (G.propagatedLabel rootLabel)
    theorem FABL.FiniteUniqueGame.satisfiable_iff_exists_component_labels.{u_1,
        u_2}
      {q : } (G : FABL.FiniteUniqueGame q) :
      G.Satisfiable 
         rootLabel,
          G.FullySatisfied
            (G.propagatedLabel rootLabel)
    Exercise 7.27, finite semantic core: satisfiability is decided by trying the `q` possible
    root labels independently on each connected component and propagating them along its constraints. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.FiniteUniqueGame.card_validComponentRootLabels_le.{u_1, u_2}
      {q : } (G : FABL.FiniteUniqueGame q)
      (component : G.ConnectedComponent) :
      (G.validComponentRootLabels component).card  q
    theorem FABL.FiniteUniqueGame.card_validComponentRootLabels_le.{u_1,
        u_2}
      {q : } (G : FABL.FiniteUniqueGame q)
      (component : G.ConnectedComponent) :
      (G.validComponentRootLabels
            component).card 
        q
    Each component search inspects at most `q` possible root labels. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.FiniteUniqueGame.propagationAssignment_fullySatisfied.{u_1, u_2}
      {q : } (G : FABL.FiniteUniqueGame q) [Nonempty (Fin q)]
      (hsatisfiable : G.Satisfiable) :
      G.FullySatisfied G.propagationAssignment
    theorem FABL.FiniteUniqueGame.propagationAssignment_fullySatisfied.{u_1,
        u_2}
      {q : } (G : FABL.FiniteUniqueGame q)
      [Nonempty (Fin q)]
      (hsatisfiable : G.Satisfiable) :
      G.FullySatisfied G.propagationAssignment
    Exercise 7.27, output guarantee: whenever the Unique Games instance is satisfiable, finite
    component search returns a fully satisfying labeling. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.FiniteUniqueGame.propagationAssignment_one_one.{u_1, u_2} {q : }
      (G : FABL.FiniteUniqueGame q) [Nonempty (Fin q)]
      (hoptimum : G.toCSPInstance.optimum = 1) :
      G.toCSPInstance.value G.propagationAssignment = 1
    theorem FABL.FiniteUniqueGame.propagationAssignment_one_one.{u_1,
        u_2}
      {q : } (G : FABL.FiniteUniqueGame q)
      [Nonempty (Fin q)]
      (hoptimum :
        G.toCSPInstance.optimum = 1) :
      G.toCSPInstance.value
          G.propagationAssignment =
        1
    Exercise 7.27 in `(1,1)` approximation form: an optimum-one instance receives an
    output labeling of value one. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.EncodedUniqueGamesFamily.propagationSearchMachine_isThresholdApproximation
      {q : } (family : FABL.EncodedUniqueGamesFamily q) [Nonempty (Fin q)]
      (encoding : family.PropagationOptimizationEncoding)
      (machine : family.PropagationSearchMachine encoding) :
      machine.output.IsThresholdApproximation encoding.problem 1 1
    theorem FABL.EncodedUniqueGamesFamily.propagationSearchMachine_isThresholdApproximation
      {q : }
      (family :
        FABL.EncodedUniqueGamesFamily q)
      [Nonempty (Fin q)]
      (encoding :
        family.PropagationOptimizationEncoding)
      (machine :
        family.PropagationSearchMachine
          encoding) :
      machine.output.IsThresholdApproximation
        encoding.problem 1 1
    Exercise 7.27 at the output-producing machine boundary: once a concrete encoding and CSLib
    implementation are injected, component propagation is a `(1,1)` threshold approximation. 
Theorem7.5.28
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 1used by 0XL∃∀N

Unique Games Conjecture. For every \delta>0, there is q>0 such that (\delta,1-\delta)-approximating Unique-Games(q) is NP-hard.

This is an open conjecture and supplies no assumption to the production library.

Lemma7.5.29
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Definition 7.3.2
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Exercise 7.28.

(a) Replace a three-variable \mathbb F_2-linear equation by four three-literal clauses so that a satisfying assignment satisfies all four and a falsifying assignment satisfies exactly three.

(b) An (7/8+\delta,1-\delta)-approximation for Max-E3-Sat yields an (1/2+\delta,1-\delta)-approximation for Max-E3-Lin.

(c) An (\alpha,\beta) E3-Lin Dictator-vs.-No-Notables test yields an E3-Sat test with the exact affine parameters (3/4+\alpha/4,3/4+\beta/4). Consequently it may be stated with the book's completeness parameter \beta whenever 3/4+\alpha/4<\beta; this is the nontrivial-gap condition implicit in the notation, and it holds in the application to Theorem 7.41 where \beta=1.

The four-clause value and optimum identities, threshold transfer, and tester-parameter transfer are proved. The generic encoded polynomial-time map used by part (b) remains a supplied CSLib witness.

Lean code for Lemma7.5.2930 declarations
  • defdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    def FABL.evenBooleanTriple (clause : Fin 4) : Fin 3  Bool
    def FABL.evenBooleanTriple (clause : Fin 4) :
      Fin 3  Bool
    The four Boolean triples of even parity. 
  • defdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    def FABL.e3LinClauseNegation (rhs : FABL.𝔽₂) (clause : Fin 4) (i : Fin 3) :
      Bool
    def FABL.e3LinClauseNegation (rhs : FABL.𝔽₂)
      (clause : Fin 4) (i : Fin 3) : Bool
    The four assignments which falsify a fixed E3-Lin equation, written as E3-Sat negation
    vectors.  An E3-Sat clause is false exactly when its input equals its negation vector. 
  • theoremdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    theorem FABL.sum_e3LinReplacementClauses (rhs : FABL.𝔽₂)
      (values : Fin 3  Bool) :
      (∑ clause,
          if
              FABL.e3SatPredicate (FABL.e3LinClauseNegation rhs clause)
                  values =
                true then
            1
          else 0) =
        3 +
          if
              (FABL.maxE3LinTemplate.eval rhs fun i =>
                  FABL.boolF₂Equiv (values i)) =
                true then
            1
          else 0
    theorem FABL.sum_e3LinReplacementClauses
      (rhs : FABL.𝔽₂)
      (values : Fin 3  Bool) :
      (∑ clause,
          if
              FABL.e3SatPredicate
                  (FABL.e3LinClauseNegation
                    rhs clause)
                  values =
                true then
            1
          else 0) =
        3 +
          if
              (FABL.maxE3LinTemplate.eval rhs
                  fun i =>
                  FABL.boolF₂Equiv
                    (values i)) =
                true then
            1
          else 0
    O'Donnell, Exercise 7.28(a), exact local count: an assignment satisfying the equation
    satisfies all four replacement clauses, while a falsifying assignment satisfies exactly three. 
  • defdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    def FABL.e3LinConstraintToE3Sat.{u_1} {V : Type u_1}
      (constraint : FABL.CSPConstraint FABL.maxE3LinTemplate V)
      (clause : Fin 4) : FABL.CSPConstraint FABL.maxE3SatTemplate V
    def FABL.e3LinConstraintToE3Sat.{u_1}
      {V : Type u_1}
      (constraint :
        FABL.CSPConstraint
          FABL.maxE3LinTemplate V)
      (clause : Fin 4) :
      FABL.CSPConstraint FABL.maxE3SatTemplate
        V
    One of the four E3-Sat constraints replacing an E3-Lin constraint. 
  • defdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    def FABL.e3LinConstraintClauses.{u_1} {V : Type u_1}
      (constraint : FABL.CSPConstraint FABL.maxE3LinTemplate V) :
      Multiset (FABL.CSPConstraint FABL.maxE3SatTemplate V)
    def FABL.e3LinConstraintClauses.{u_1}
      {V : Type u_1}
      (constraint :
        FABL.CSPConstraint
          FABL.maxE3LinTemplate V) :
      Multiset
        (FABL.CSPConstraint
          FABL.maxE3SatTemplate V)
    The four-clause multiset replacing one E3-Lin constraint. 
  • defdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    def FABL.e3LinConstraintsToE3Sat.{u_1} {V : Type u_1}
      (constraints :
        Multiset (FABL.CSPConstraint FABL.maxE3LinTemplate V)) :
      Multiset (FABL.CSPConstraint FABL.maxE3SatTemplate V)
    def FABL.e3LinConstraintsToE3Sat.{u_1}
      {V : Type u_1}
      (constraints :
        Multiset
          (FABL.CSPConstraint
            FABL.maxE3LinTemplate V)) :
      Multiset
        (FABL.CSPConstraint
          FABL.maxE3SatTemplate V)
    Replace every E3-Lin constraint by its four E3-Sat clauses. 
  • defdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    def FABL.e3LinToE3Sat.{u_1} {V : Type u_1}
      (P : FABL.CSPInstance FABL.maxE3LinTemplate V) :
      FABL.CSPInstance FABL.maxE3SatTemplate V
    def FABL.e3LinToE3Sat.{u_1} {V : Type u_1}
      (P :
        FABL.CSPInstance FABL.maxE3LinTemplate
          V) :
      FABL.CSPInstance FABL.maxE3SatTemplate V
    O'Donnell, Exercise 7.28(a): the four-clause replacement of an E3-Lin instance. 
  • defdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    def FABL.boolAssignmentToF₂.{u_1} {V : Type u_1} (assignment : V  Bool) :
      V  FABL.𝔽₂
    def FABL.boolAssignmentToF₂.{u_1}
      {V : Type u_1} (assignment : V  Bool) :
      V  FABL.𝔽₂
    Transport a Boolean assignment coordinatewise to `𝔽₂`. 
  • defdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    def FABL.f₂AssignmentToBool.{u_1} {V : Type u_1}
      (assignment : V  FABL.𝔽₂) : V  Bool
    def FABL.f₂AssignmentToBool.{u_1}
      {V : Type u_1}
      (assignment : V  FABL.𝔽₂) : V  Bool
    Transport an `𝔽₂` assignment coordinatewise to Booleans. 
  • theoremdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    theorem FABL.value_e3LinToE3Sat.{u_1} {V : Type u_1}
      (P : FABL.CSPInstance FABL.maxE3LinTemplate V)
      (assignment : V  Bool) :
      (FABL.e3LinToE3Sat P).value assignment =
        3 / 4 + P.value (FABL.boolAssignmentToF₂ assignment) / 4
    theorem FABL.value_e3LinToE3Sat.{u_1}
      {V : Type u_1}
      (P :
        FABL.CSPInstance FABL.maxE3LinTemplate
          V)
      (assignment : V  Bool) :
      (FABL.e3LinToE3Sat P).value assignment =
        3 / 4 +
          P.value
              (FABL.boolAssignmentToF₂
                assignment) /
            4
    Exercise 7.28(a), normalized form: the four-clause replacement has value
    `3/4 + value/4` on every corresponding assignment. 
  • theoremdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    theorem FABL.optimum_e3LinToE3Sat.{u_1} {V : Type u_1} [Finite V]
      (P : FABL.CSPInstance FABL.maxE3LinTemplate V) :
      (FABL.e3LinToE3Sat P).optimum = 3 / 4 + P.optimum / 4
    theorem FABL.optimum_e3LinToE3Sat.{u_1}
      {V : Type u_1} [Finite V]
      (P :
        FABL.CSPInstance FABL.maxE3LinTemplate
          V) :
      (FABL.e3LinToE3Sat P).optimum =
        3 / 4 + P.optimum / 4
    Exercise 7.28(a), optimum form: the replacement preserves the exact affine relation between
    the two optimum values. 
  • theoremdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    theorem FABL.half_add_delta_le_e3LinValue_of_sevenEighths_add_delta_le.{u_1}
      {V : Type u_1} (P : FABL.CSPInstance FABL.maxE3LinTemplate V)
      (assignment : V  Bool) {δ : } ( : 0  δ)
      (hvalue : 7 / 8 + δ  (FABL.e3LinToE3Sat P).value assignment) :
      1 / 2 + δ  P.value (FABL.boolAssignmentToF₂ assignment)
    theorem FABL.half_add_delta_le_e3LinValue_of_sevenEighths_add_delta_le.{u_1}
      {V : Type u_1}
      (P :
        FABL.CSPInstance FABL.maxE3LinTemplate
          V)
      (assignment : V  Bool) {δ : }
      ( : 0  δ)
      (hvalue :
        7 / 8 + δ 
          (FABL.e3LinToE3Sat P).value
            assignment) :
      1 / 2 + δ 
        P.value
          (FABL.boolAssignmentToF₂ assignment)
    Exercise 7.28(b), output transfer: an E3-Sat solution of value at least `7/8 + δ`
    induces an E3-Lin solution of value at least `1/2 + δ`. 
  • theoremdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    theorem FABL.one_sub_delta_le_e3SatOptimum_of_e3Lin.{u_1} {V : Type u_1}
      [Finite V] (P : FABL.CSPInstance FABL.maxE3LinTemplate V) {δ : }
      ( : 0  δ) (hoptimum : 1 - δ  P.optimum) :
      1 - δ  (FABL.e3LinToE3Sat P).optimum
    theorem FABL.one_sub_delta_le_e3SatOptimum_of_e3Lin.{u_1}
      {V : Type u_1} [Finite V]
      (P :
        FABL.CSPInstance FABL.maxE3LinTemplate
          V)
      {δ : } ( : 0  δ)
      (hoptimum : 1 - δ  P.optimum) :
      1 - δ  (FABL.e3LinToE3Sat P).optimum
    Exercise 7.28(b), trigger transfer: optimum at least `1-δ` for E3-Lin implies optimum at
    least `1-δ` for its four-clause E3-Sat replacement. 
  • defdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    def FABL.e3LinAlgorithmOfE3Sat.{u_1} {V : Type u_1}
      (algorithm : FABL.CSPInstance FABL.maxE3SatTemplate V  V  Bool) :
      FABL.CSPInstance FABL.maxE3LinTemplate V  V  FABL.𝔽₂
    def FABL.e3LinAlgorithmOfE3Sat.{u_1}
      {V : Type u_1}
      (algorithm :
        FABL.CSPInstance FABL.maxE3SatTemplate
            V 
          V  Bool) :
      FABL.CSPInstance FABL.maxE3LinTemplate
          V 
        V  FABL.𝔽₂
    Apply an E3-Sat assignment algorithm to the four-clause replacement and reinterpret its
    Boolean output as an `𝔽₂` assignment. 
  • theoremdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    theorem FABL.e3LinAlgorithmOfE3Sat_isApproximation.{u_1} {V : Type u_1}
      [Finite V]
      (algorithm : FABL.CSPInstance FABL.maxE3SatTemplate V  V  Bool)
      {δ : } ( : 0  δ)
      (halgorithm :
         (Q : FABL.CSPInstance FABL.maxE3SatTemplate V),
          1 - δ  Q.optimum  7 / 8 + δ  Q.value (algorithm Q))
      (P : FABL.CSPInstance FABL.maxE3LinTemplate V) :
      1 - δ  P.optimum 
        1 / 2 + δ  P.value (FABL.e3LinAlgorithmOfE3Sat algorithm P)
    theorem FABL.e3LinAlgorithmOfE3Sat_isApproximation.{u_1}
      {V : Type u_1} [Finite V]
      (algorithm :
        FABL.CSPInstance FABL.maxE3SatTemplate
            V 
          V  Bool)
      {δ : } ( : 0  δ)
      (halgorithm :
        
          (Q :
            FABL.CSPInstance
              FABL.maxE3SatTemplate V),
          1 - δ  Q.optimum 
            7 / 8 + δ  Q.value (algorithm Q))
      (P :
        FABL.CSPInstance FABL.maxE3LinTemplate
          V) :
      1 - δ  P.optimum 
        1 / 2 + δ 
          P.value
            (FABL.e3LinAlgorithmOfE3Sat
              algorithm P)
    O'Donnell, Exercise 7.28(b), finite algorithmic form: an E3-Sat threshold algorithm with
    parameters `(7/8+δ, 1-δ)` yields an E3-Lin threshold algorithm with parameters
    `(1/2+δ, 1-δ)`. 
  • structure(6 fields)defined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    structure FABL.E3LinE3SatPolytimeAdapter
      (linProblem satProblem : FABL.EncodedMaximizationProblem) (δ : ) :
      Type 1
    structure FABL.E3LinE3SatPolytimeAdapter
      (linProblem satProblem :
        FABL.EncodedMaximizationProblem)
      (δ : ) : Type 1
    Encoding-specific polynomial-time witness for Exercise 7.28(b).  The finite value and optimum
    fields are discharged by `value_e3LinToE3Sat` and `optimum_e3LinToE3Sat` once concrete codecs are
    chosen; the two maps retain the actual CSLib polynomial-time certificates. 
    reduceInstance : FABL.PolytimeMap
    Encode the four-clause replacement. 
    recoverAssignment : FABL.PolytimeMap
    Reinterpret a Boolean assignment as an `𝔽₂` assignment. 
    mapsInstance :  input  linProblem.instances, self.reduceInstance.toFun input  satProblem.instances
    Well-formed E3-Lin instances map to well-formed E3-Sat instances. 
    recoversFeasible :  input  linProblem.instances,
       (solution : List Bool),
        satProblem.Feasible (self.reduceInstance.toFun input) solution 
          linProblem.Feasible input (self.recoverAssignment.toFun solution)
    Recovered feasible assignments remain feasible. 
    transfersOptimum :  input  linProblem.instances,
      1 - δ  linProblem.optimum input  1 - δ  satProblem.optimum (self.reduceInstance.toFun input)
    The completeness trigger is preserved by the four-clause replacement. 
    transfersValue :  input  linProblem.instances,
       (solution : List Bool),
        7 / 8 + δ  satProblem.value (self.reduceInstance.toFun input) solution 
          1 / 2 + δ  linProblem.value input (self.recoverAssignment.toFun solution)
    The E3-Sat output threshold transfers to the stated E3-Lin threshold. 
  • theoremdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    theorem FABL.E3LinE3SatPolytimeAdapter.transferApproximation
      {linProblem satProblem : FABL.EncodedMaximizationProblem} {δ : }
      (adapter : FABL.E3LinE3SatPolytimeAdapter linProblem satProblem δ)
      (algorithm : FABL.PolytimeMap)
      (halgorithm :
        algorithm.IsThresholdApproximation satProblem (7 / 8 + δ) (1 - δ)) :
      ((adapter.recoverAssignment.comp algorithm).comp
            adapter.reduceInstance).IsThresholdApproximation
        linProblem (1 / 2 + δ) (1 - δ)
    theorem FABL.E3LinE3SatPolytimeAdapter.transferApproximation
      {linProblem satProblem :
        FABL.EncodedMaximizationProblem}
      {δ : }
      (adapter :
        FABL.E3LinE3SatPolytimeAdapter
          linProblem satProblem δ)
      (algorithm : FABL.PolytimeMap)
      (halgorithm :
        algorithm.IsThresholdApproximation
          satProblem (7 / 8 + δ) (1 - δ)) :
      ((adapter.recoverAssignment.comp
                algorithm).comp
            adapter.reduceInstance).IsThresholdApproximation
        linProblem (1 / 2 + δ) (1 - δ)
    Exercise 7.28(b) at the CSLib boundary: composing the two certified maps with an encoded
    E3-Sat approximation gives the encoded E3-Lin approximation. 
  • defdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    def FABL.evenSignTriple (clause : Fin 4) : Fin 3  FABL.Sign
    def FABL.evenSignTriple (clause : Fin 4) :
      Fin 3  FABL.Sign
    The four sign triples whose coordinate product is one. 
  • defdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    def FABL.e3LinFalsifyingSign (b : FABL.Sign) (clause : Fin 4) (i : Fin 3) :
      FABL.Sign
    def FABL.e3LinFalsifyingSign (b : FABL.Sign)
      (clause : Fin 4) (i : Fin 3) : FABL.Sign
    The four sign assignments falsifying the equation `y₀y₁y₂=b`. 
  • abbrevdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    abbrev FABL.e3SatSignClause (falsifying : Fin 3  FABL.Sign) :
      FABL.SignPredicate
    abbrev FABL.e3SatSignClause
      (falsifying : Fin 3  FABL.Sign) :
      FABL.SignPredicate
    A three-literal E3-Sat clause over the sign alphabet; its unique falsifying assignment is
    the supplied sign vector. 
  • defdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    def FABL.maxE3SatSignPredicates : Set FABL.SignPredicate
    def FABL.maxE3SatSignPredicates :
      Set FABL.SignPredicate
    The finite sign-domain E3-Sat predicate family. 
  • theoremdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    theorem FABL.sum_e3SatSignReplacementClauses (b : FABL.Sign)
      (values : Fin 3  FABL.Sign) :
      (∑ clause,
          if
              (FABL.e3SatSignClause
                      (FABL.e3LinFalsifyingSign b clause)).accepts
                  values =
                true then
            1
          else 0) =
        3 + if (FABL.e3LinPredicate b).accepts values = true then 1 else 0
    theorem FABL.sum_e3SatSignReplacementClauses
      (b : FABL.Sign)
      (values : Fin 3  FABL.Sign) :
      (∑ clause,
          if
              (FABL.e3SatSignClause
                      (FABL.e3LinFalsifyingSign
                        b clause)).accepts
                  values =
                true then
            1
          else 0) =
        3 +
          if
              (FABL.e3LinPredicate b).accepts
                  values =
                true then
            1
          else 0
    The pointwise four-clause identity underlying Exercise 7.28(c). 
  • theoremdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    theorem FABL.expect_e3SatSignClause_randomizedValue (b : FABL.Sign)
      (μ : Fin 3  ) ( :  (i : Fin 3), μ i  Set.Icc (-1) 1) :
      (Finset.univ.expect fun clause =>
          (FABL.e3SatSignClause
                (FABL.e3LinFalsifyingSign b clause)).randomizedValue
            μ ) =
        3 / 4 + (FABL.e3LinPredicate b).randomizedValue μ  / 4
    theorem FABL.expect_e3SatSignClause_randomizedValue
      (b : FABL.Sign) (μ : Fin 3  )
      ( :
         (i : Fin 3), μ i  Set.Icc (-1) 1) :
      (Finset.univ.expect fun clause =>
          (FABL.e3SatSignClause
                (FABL.e3LinFalsifyingSign b
                  clause)).randomizedValue
            μ ) =
        3 / 4 +
          (FABL.e3LinPredicate
                  b).randomizedValue
              μ  /
            4
    Averaging the four replacement clauses transforms randomized predicate value by the affine
    map `v ↦ 3/4 + v/4`. 
  • structure(5 fields)defined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    structure FABL.E3LinSignTester (n : ) : Type 1
    structure FABL.E3LinSignTester (n : ) : Type 1
    An E3-Lin tester with its right-hand side and three queries exposed in the data. 
    Seed : Type
    Finite seed type. 
    seedFintype : Fintype self.Seed
    Finiteness of the seed type. 
    seedLaw : PMF self.Seed
    Seed distribution. 
    rhs : self.Seed  FABL.Sign
    Equation right-hand side selected by a seed. 
    queries : self.Seed  Fin 3  FABL.SignCube n
    Three queries selected by a seed. 
  • defdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    def FABL.E3LinSignTester.toSignTester {n : } (T : FABL.E3LinSignTester n) :
      FABL.SignTester n
    def FABL.E3LinSignTester.toSignTester {n : }
      (T : FABL.E3LinSignTester n) :
      FABL.SignTester n
    Forget the exposed E3-Lin presentation and obtain the general tester interface. 
  • defdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    def FABL.E3LinSignTester.toE3SatTester {n : }
      (T : FABL.E3LinSignTester n) : FABL.SignTester n
    def FABL.E3LinSignTester.toE3SatTester {n : }
      (T : FABL.E3LinSignTester n) :
      FABL.SignTester n
    Replace each E3-Lin check by a uniformly selected one of its four E3-Sat clauses. 
  • theoremdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    theorem FABL.E3LinSignTester.acceptanceProbability_toE3SatTester {n : }
      (T : FABL.E3LinSignTester n) (f : FABL.BoundedCubeFunction n) :
      T.toE3SatTester.acceptanceProbability f =
        3 / 4 + T.toSignTester.acceptanceProbability f / 4
    theorem FABL.E3LinSignTester.acceptanceProbability_toE3SatTester
      {n : } (T : FABL.E3LinSignTester n)
      (f : FABL.BoundedCubeFunction n) :
      T.toE3SatTester.acceptanceProbability
          f =
        3 / 4 +
          T.toSignTester.acceptanceProbability
              f /
            4
    Tester acceptance obeys the same affine transformation as each predicate. 
  • defdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    def FABL.e3SatReplacementError (error :   ) (ε : ) : 
    def FABL.e3SatReplacementError (error :   )
      (ε : ) : 
    Affine rescaling of the soundness error in the four-clause test. 
  • theoremdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    theorem FABL.e3LinDictatorTest_to_e3Sat_affine {α β : } {error :   }
      (T : (n : )  0 < n  FABL.E3LinSignTester n)
      (h :
        FABL.IsDictatorVsNoNotablesTest FABL.maxE3LinPredicates α β error
          fun n hn => (T n hn).toSignTester) :
      FABL.IsDictatorVsNoNotablesTest FABL.maxE3SatSignPredicates
        (3 / 4 + α / 4) (3 / 4 + β / 4) (FABL.e3SatReplacementError error)
        fun n hn => (T n hn).toE3SatTester
    theorem FABL.e3LinDictatorTest_to_e3Sat_affine
      {α β : } {error :   }
      (T :
        (n : ) 
          0 < n  FABL.E3LinSignTester n)
      (h :
        FABL.IsDictatorVsNoNotablesTest
          FABL.maxE3LinPredicates α β error
          fun n hn => (T n hn).toSignTester) :
      FABL.IsDictatorVsNoNotablesTest
        FABL.maxE3SatSignPredicates
        (3 / 4 + α / 4) (3 / 4 + β / 4)
        (FABL.e3SatReplacementError error)
        fun n hn => (T n hn).toE3SatTester
    O'Donnell, Exercise 7.28(c), exact affine form: an `(α,β)` E3-Lin test gives an
    `(3/4+α/4, 3/4+β/4)` E3-Sat test. 
  • theoremdefined in FABL/Chapter07/CSPAlgorithms.lean
    complete
    theorem FABL.e3LinDictatorTest_to_e3Sat {α β : } {error :   }
      (T : (n : )  0 < n  FABL.E3LinSignTester n)
      (h :
        FABL.IsDictatorVsNoNotablesTest FABL.maxE3LinPredicates α β error
          fun n hn => (T n hn).toSignTester)
      (hgap : 3 / 4 + α / 4 < β) :
      FABL.IsDictatorVsNoNotablesTest FABL.maxE3SatSignPredicates
        (3 / 4 + α / 4) β (FABL.e3SatReplacementError error) fun n hn =>
        (T n hn).toE3SatTester
    theorem FABL.e3LinDictatorTest_to_e3Sat {α β : }
      {error :   }
      (T :
        (n : ) 
          0 < n  FABL.E3LinSignTester n)
      (h :
        FABL.IsDictatorVsNoNotablesTest
          FABL.maxE3LinPredicates α β error
          fun n hn => (T n hn).toSignTester)
      (hgap : 3 / 4 + α / 4 < β) :
      FABL.IsDictatorVsNoNotablesTest
        FABL.maxE3SatSignPredicates
        (3 / 4 + α / 4) β
        (FABL.e3SatReplacementError error)
        fun n hn => (T n hn).toE3SatTester
    O'Donnell, Exercise 7.28(c), book parameters: when the retained completeness parameter is
    strictly above `3/4+α/4`, the affine E3-Sat test may be stated as a
    `(3/4+α/4,β)` test. 
Lemma7.5.30
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Definition 6.1.11
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Exercise 7.29.

(a) Convert a (3/4+\delta/4,1) Dictator-vs.-No-Notables test using the OXR predicate into a (7/8+\delta/8,1) test using E3-Sat predicates.

(b) For odd f, independently generate each coordinate triple by using, with probability 1-\delta, a uniform triple conditioned on x_iy_iz_i=-1 and, with probability \delta, a uniform triple conditioned on y_iz_i=-1. Prove that the OXR acceptance probability is \frac34-\frac14\operatorname{Stab}_{-\delta}[f] -\frac14\sum_{S\subseteq[n]}\widehat f(S)^2 \mathbb E_{J\subseteq_{1-\delta}S} [(-1)^{|J|}\widehat f(J)]. \tag{7.7} Dictators are accepted with probability 1.

(c) Bound this expression by \frac34+\frac\delta4+\frac14\sqrt{(1-\delta)^t} +\frac14\sum_{|S|\le t}\widehat f(S)^2 \mathbb E_{J\subseteq_{1-\delta}S}[|\widehat f(J)|].

(d) Choose the parameters to prove Theorem 7.41.

Lean code for Lemma7.5.3029 declarations
  • structure(5 fields)defined in FABL/Chapter07/HastadThreeSat.lean
    complete
    structure FABL.OXRSignTester (n : ) : Type 1
    structure FABL.OXRSignTester (n : ) : Type 1
    An OXR tester with its input-negation mask and three queries exposed. 
    Seed : Type
    Finite seed type. 
    seedFintype : Fintype self.Seed
    Finiteness of the seed type. 
    seedLaw : PMF self.Seed
    Seed distribution. 
    negations : self.Seed  Fin 3  Bool
    Predicate-input negations selected by a seed. 
    queries : self.Seed  Fin 3  FABL.SignCube n
    Three queries selected by a seed. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.OXRSignTester.toSignTester {n : } (T : FABL.OXRSignTester n) :
      FABL.SignTester n
    def FABL.OXRSignTester.toSignTester {n : }
      (T : FABL.OXRSignTester n) :
      FABL.SignTester n
    Forget the exposed OXR presentation and obtain the general tester interface. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.OXRSignTester.toE3SatTester {n : } (T : FABL.OXRSignTester n) :
      FABL.SignTester n
    def FABL.OXRSignTester.toE3SatTester {n : }
      (T : FABL.OXRSignTester n) :
      FABL.SignTester n
    Replace an OXR check by a uniformly selected one of the two E3-Sat clauses excluding its
    falsifying assignments. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.OXRSignTester.acceptanceProbability_toE3SatTester {n : }
      (T : FABL.OXRSignTester n) (f : FABL.BoundedCubeFunction n) :
      T.toE3SatTester.acceptanceProbability f =
        1 / 2 + T.toSignTester.acceptanceProbability f / 2
    theorem FABL.OXRSignTester.acceptanceProbability_toE3SatTester
      {n : } (T : FABL.OXRSignTester n)
      (f : FABL.BoundedCubeFunction n) :
      T.toE3SatTester.acceptanceProbability
          f =
        1 / 2 +
          T.toSignTester.acceptanceProbability
              f /
            2
    Tester acceptance obeys the OXR-to-E3-Sat affine transformation. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.oxrDictatorTest_to_e3Sat_affine {α β : } {error :   }
      (T : (n : )  0 < n  FABL.OXRSignTester n)
      (h :
        FABL.IsDictatorVsNoNotablesTest FABL.maxOXRPredicates α β error
          fun n hn => (T n hn).toSignTester) :
      FABL.IsDictatorVsNoNotablesTest FABL.maxE3SatSignPredicates
        (1 / 2 + α / 2) (1 / 2 + β / 2)
        (FABL.oxrE3SatReplacementError error) fun n hn =>
        (T n hn).toE3SatTester
    theorem FABL.oxrDictatorTest_to_e3Sat_affine
      {α β : } {error :   }
      (T :
        (n : ) 
          0 < n  FABL.OXRSignTester n)
      (h :
        FABL.IsDictatorVsNoNotablesTest
          FABL.maxOXRPredicates α β error
          fun n hn => (T n hn).toSignTester) :
      FABL.IsDictatorVsNoNotablesTest
        FABL.maxE3SatSignPredicates
        (1 / 2 + α / 2) (1 / 2 + β / 2)
        (FABL.oxrE3SatReplacementError error)
        fun n hn => (T n hn).toE3SatTester
    O'Donnell, Exercise 7.29(a): an `(α,β)` input-negated OXR test gives an exact
    `(1/2+α/2,1/2+β/2)` E3-Sat test. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.oxrPredicate : FABL.SignPredicate
    def FABL.oxrPredicate : FABL.SignPredicate
    The sign version of `OXR(x₀,x₁,x₂) = x₀ ∨ (x₁ ⊕ x₂)`, with `-1`
    representing Boolean true. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.maxOXRPredicates : Set FABL.SignPredicate
    def FABL.maxOXRPredicates :
      Set FABL.SignPredicate
    The finite family consisting of all input-negated OXR predicates. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.oxrParityTriple (p : FABL.Sign × FABL.Sign) : Fin 3  FABL.Sign
    def FABL.oxrParityTriple
      (p : FABL.Sign × FABL.Sign) :
      Fin 3  FABL.Sign
    A uniform triple satisfying `xyz = -1`, generated from two independent uniform signs. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.oxrPairTriple (p : FABL.Sign × FABL.Sign) : Fin 3  FABL.Sign
    def FABL.oxrPairTriple
      (p : FABL.Sign × FABL.Sign) :
      Fin 3  FABL.Sign
    A uniform triple satisfying `yz = -1`, generated from two independent uniform signs. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.oxrCoordinateTriplePMF (δ : ) ( : δ  Set.Icc 0 1) :
      PMF (Fin 3  FABL.Sign)
    def FABL.oxrCoordinateTriplePMF (δ : )
      ( : δ  Set.Icc 0 1) :
      PMF (Fin 3  FABL.Sign)
    The one-coordinate mixture in Exercise 7.29(b): use the `xyz=-1` law with probability
    `1-δ` and the `yz=-1` law with probability `δ`. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.oxrTripleCubePMF (n : ) (δ : ) ( : δ  Set.Icc 0 1) :
      PMF (Fin n  Fin 3  FABL.Sign)
    def FABL.oxrTripleCubePMF (n : ) (δ : )
      ( : δ  Set.Icc 0 1) :
      PMF (Fin n  Fin 3  FABL.Sign)
    Independent product of the one-coordinate OXR laws across the Boolean cube. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.oxrQueryPoint {n : } (sample : Fin n  Fin 3  FABL.Sign)
      (query : Fin 3) : FABL.SignCube n
    def FABL.oxrQueryPoint {n : }
      (sample : Fin n  Fin 3  FABL.Sign)
      (query : Fin 3) : FABL.SignCube n
    Extract one of the three queried cube points from a coordinatewise OXR sample. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.oxrOddSignTester (n : ) (δ : ) ( : δ  Set.Icc 0 1) :
      FABL.OXRSignTester n
    def FABL.oxrOddSignTester (n : ) (δ : )
      ( : δ  Set.Icc 0 1) :
      FABL.OXRSignTester n
    The actual OXR tester after independent odd symmetrization of its three queries. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.oxrOddSignTester_acceptanceProbability {n : } (δ : )
      ( : δ  Set.Icc 0 1) (f : FABL.BoundedCubeFunction n) :
      (FABL.oxrOddSignTester n δ ).toSignTester.acceptanceProbability f =
        FABL.oxrAcceptanceProbability δ  f.oddPart
    theorem FABL.oxrOddSignTester_acceptanceProbability
      {n : } (δ : ) ( : δ  Set.Icc 0 1)
      (f : FABL.BoundedCubeFunction n) :
      (FABL.oxrOddSignTester n δ
                ).toSignTester.acceptanceProbability
          f =
        FABL.oxrAcceptanceProbability δ 
          f.oddPart
    The concrete odd-symmetrized OXR tester accepts exactly as the raw OXR test applied to the
    odd part of the bounded function. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.oxrAcceptanceProbability {n : } (δ : ) ( : δ  Set.Icc 0 1)
      (f : FABL.BoundedCubeFunction n) : 
    def FABL.oxrAcceptanceProbability {n : }
      (δ : ) ( : δ  Set.Icc 0 1)
      (f : FABL.BoundedCubeFunction n) : 
    Acceptance probability of the OXR test from Exercise 7.29(b), with independent
    randomized-sign semantics for a bounded real-valued function. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.oxrAcceptanceProbability_eq_equationSevenSeven {n : } (δ : )
      ( : δ  Set.Icc 0 1) (f : FABL.BoundedCubeFunction n)
      (hf : Function.Odd f.toFun) :
      FABL.oxrAcceptanceProbability δ  f =
        3 / 4 - 1 / 4 * FABL.noiseStability (-δ)  f.toFun -
          1 / 4 *
             S,
              FABL.fourierCoeff f.toFun S ^ 2 *
                FABL.oxrRandomSubsetFourierAverage δ f.toFun S
    theorem FABL.oxrAcceptanceProbability_eq_equationSevenSeven
      {n : } (δ : ) ( : δ  Set.Icc 0 1)
      (f : FABL.BoundedCubeFunction n)
      (hf : Function.Odd f.toFun) :
      FABL.oxrAcceptanceProbability δ  f =
        3 / 4 -
            1 / 4 *
              FABL.noiseStability (-δ) 
                f.toFun -
          1 / 4 *
             S,
              FABL.fourierCoeff f.toFun S ^
                  2 *
                FABL.oxrRandomSubsetFourierAverage
                  δ f.toFun S
    O'Donnell, Equation (7.7): the exact OXR acceptance formula for odd bounded
    cube functions. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.oxrAcceptanceProbability_dictator {n : } (δ : )
      ( : δ  Set.Icc 0 1) (i : Fin n) :
      FABL.oxrAcceptanceProbability δ 
          (FABL.BoundedCubeFunction.ofBoolean (FABL.dictator i)) =
        1
    theorem FABL.oxrAcceptanceProbability_dictator
      {n : } (δ : ) ( : δ  Set.Icc 0 1)
      (i : Fin n) :
      FABL.oxrAcceptanceProbability δ 
          (FABL.BoundedCubeFunction.ofBoolean
            (FABL.dictator i)) =
        1
    O'Donnell, Exercise 7.29(b): every dictator is accepted by the OXR test with
    probability one. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.oxrRandomSubsetFourierAverage {n : } (δ : )
      (f : FABL.SignCube n  ) (S : Finset (Fin n)) : 
    def FABL.oxrRandomSubsetFourierAverage {n : }
      (δ : ) (f : FABL.SignCube n  )
      (S : Finset (Fin n)) : 
    The inner random-subset Fourier average in Equation (7.7).  Sampling an ambient
    `(1-δ)`-random set and intersecting with `S` realizes the book's notation
    `J ⊆_{1-δ} S`. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.oxrRandomSubsetAbsFourierAverage {n : } (δ : )
      (f : FABL.SignCube n  ) (S : Finset (Fin n)) : 
    def FABL.oxrRandomSubsetAbsFourierAverage
      {n : } (δ : )
      (f : FABL.SignCube n  )
      (S : Finset (Fin n)) : 
    The absolute-value random-subset average appearing in Exercise 7.29(c). 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.pmfExpectation_oxrTripleCubePMF_tripleProduct_eq_randomSubsetAverage
      {n : } (δ : ) ( : δ  Set.Icc 0 1) (f : FABL.SignCube n  )
      (hf : Function.Odd f) :
      (FABL.pmfExpectation (FABL.oxrTripleCubePMF n δ ) fun sample =>
          f (FABL.oxrQueryPoint sample 0) *
              f (FABL.oxrQueryPoint sample 1) *
            f (FABL.oxrQueryPoint sample 2)) =
         S,
          FABL.fourierCoeff f S ^ 2 *
            FABL.oxrRandomSubsetFourierAverage δ f S
    theorem FABL.pmfExpectation_oxrTripleCubePMF_tripleProduct_eq_randomSubsetAverage
      {n : } (δ : ) ( : δ  Set.Icc 0 1)
      (f : FABL.SignCube n  )
      (hf : Function.Odd f) :
      (FABL.pmfExpectation
          (FABL.oxrTripleCubePMF n δ )
          fun sample =>
          f (FABL.oxrQueryPoint sample 0) *
              f
                (FABL.oxrQueryPoint sample
                  1) *
            f (FABL.oxrQueryPoint sample 2)) =
         S,
          FABL.fourierCoeff f S ^ 2 *
            FABL.oxrRandomSubsetFourierAverage
              δ f S
    The trilinear OXR moment in the exact Equation (7.7) form for odd functions. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.fourierCoeff_even_eq_zero_of_odd {n : } {f : FABL.SignCube n  }
      (hf : Function.Odd f) (S : Finset (Fin n)) (hS : Even S.card) :
      FABL.fourierCoeff f S = 0
    theorem FABL.fourierCoeff_even_eq_zero_of_odd
      {n : } {f : FABL.SignCube n  }
      (hf : Function.Odd f)
      (S : Finset (Fin n))
      (hS : Even S.card) :
      FABL.fourierCoeff f S = 0
    An odd cube function has no Fourier coefficient on an even-cardinality set. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.oxrAcceptanceProbability_le_exerciseSevenTwentyNine {n : } (δ : )
      ( : δ  Set.Icc 0 1) (hδhalf : δ  1 / 2)
      (f : FABL.BoundedCubeFunction n) (hf : Function.Odd f.toFun) (t : ) :
      FABL.oxrAcceptanceProbability δ  f 
        3 / 4 + δ / 4 + 1 / 4 * ((1 - δ) ^ t) +
          1 / 4 *
             S with S.card  t,
              FABL.fourierCoeff f.toFun S ^ 2 *
                FABL.oxrRandomSubsetAbsFourierAverage δ f.toFun S
    theorem FABL.oxrAcceptanceProbability_le_exerciseSevenTwentyNine
      {n : } (δ : ) ( : δ  Set.Icc 0 1)
      (hδhalf : δ  1 / 2)
      (f : FABL.BoundedCubeFunction n)
      (hf : Function.Odd f.toFun) (t : ) :
      FABL.oxrAcceptanceProbability δ  f 
        3 / 4 + δ / 4 +
            1 / 4 * ((1 - δ) ^ t) +
          1 / 4 *
             S with S.card  t,
              FABL.fourierCoeff f.toFun S ^
                  2 *
                FABL.oxrRandomSubsetAbsFourierAverage
                  δ f.toFun S
    O'Donnell, Exercise 7.29(c): the OXR acceptance formula is bounded by
    the negative-stability contribution, the square-root high-degree tail, and
    the low-degree random-subset absolute Fourier averages. 
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.hastadThreeSatDegree (δ : ) ( : δ  Set.Ioo 0 (1 / 8)) : 
    def FABL.hastadThreeSatDegree (δ : )
      ( : δ  Set.Ioo 0 (1 / 8)) : 
    A degree at which the high-degree OXR tail is smaller than the slack reserved by
    Theorem 7.41. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.hastadThreeSatDegree_tail_lt (δ : ) ( : δ  Set.Ioo 0 (1 / 8)) :
      ((1 - 4 * δ) ^ FABL.hastadThreeSatDegree δ ) < 4 * δ
    theorem FABL.hastadThreeSatDegree_tail_lt (δ : )
      ( : δ  Set.Ioo 0 (1 / 8)) :
      ((1 - 4 * δ) ^
            FABL.hastadThreeSatDegree δ ) <
        4 * δ
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.hastadThreeSatOXRError (t : ) (ε : ) : 
    def FABL.hastadThreeSatOXRError (t : )
      (ε : ) : 
    The uniform OXR soundness error after fixing the truncation degree. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.hastadThreeSatOXRError_mem_Icc (t : ) (ε : )
      ( : ε  Set.Icc 0 1) : FABL.hastadThreeSatOXRError t ε  Set.Icc 0 1
    theorem FABL.hastadThreeSatOXRError_mem_Icc
      (t : ) (ε : ) ( : ε  Set.Icc 0 1) :
      FABL.hastadThreeSatOXRError t ε 
        Set.Icc 0 1
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.hastadThreeSatOXRError_tendsto_zero (t : ) :
      Filter.Tendsto (FABL.hastadThreeSatOXRError t)
        (nhdsWithin 0 (Set.Ioi 0)) (nhds 0)
    theorem FABL.hastadThreeSatOXRError_tendsto_zero
      (t : ) :
      Filter.Tendsto
        (FABL.hastadThreeSatOXRError t)
        (nhdsWithin 0 (Set.Ioi 0)) (nhds 0)
  • defdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    def FABL.hastadOXRTestFamily (δ : ) ( : δ  Set.Ioo 0 (1 / 8)) (n : )
      (_hn : 0 < n) : FABL.OXRSignTester n
    def FABL.hastadOXRTestFamily (δ : )
      ( : δ  Set.Ioo 0 (1 / 8)) (n : )
      (_hn : 0 < n) : FABL.OXRSignTester n
    The input-negated OXR tester family used before the two-clause E3-Sat replacement. 
  • theoremdefined in FABL/Chapter07/HastadThreeSat.lean
    complete
    theorem FABL.hastadOXR_dictatorVsNoNotables (δ : )
      ( : δ  Set.Ioo 0 (1 / 8)) :
      FABL.IsDictatorVsNoNotablesTest FABL.maxOXRPredicates (3 / 4 + 2 * δ)
        1 (FABL.hastadThreeSatOXRError (FABL.hastadThreeSatDegree δ ))
        fun n hn => (FABL.hastadOXRTestFamily δ  n hn).toSignTester
    theorem FABL.hastadOXR_dictatorVsNoNotables
      (δ : ) ( : δ  Set.Ioo 0 (1 / 8)) :
      FABL.IsDictatorVsNoNotablesTest
        FABL.maxOXRPredicates (3 / 4 + 2 * δ)
        1
        (FABL.hastadThreeSatOXRError
          (FABL.hastadThreeSatDegree δ ))
        fun n hn =>
        (FABL.hastadOXRTestFamily δ  n
            hn).toSignTester
    Exercise 7.29(d), OXR stage: the fixed-noise odd-symmetrized family is a
    `(3/4+2δ,1)` Dictator-vs.-No-Notables test. 
Lemma7.5.31
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 4
Statement dependency previews
Preview
Lemma 2.4.19
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 2
Reverse dependency previews
Preview
Theorem 7.4.8
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Exercise 7.30. Let G be a regular Unique-Games(q) instance and T an (\alpha,\beta) Dictator-vs.-No-Notables test. Construct the CSP on variables V\times\{-1,1\}^q by sampling a vertex u, a random constraint \psi(f(x^{(1)}),\ldots,f(x^{(r)})) of T, independent random neighbors v_1,\ldots,v_r of u, and the edge permutations \pi_1,\ldots,\pi_r, and emitting \psi\bigl(f_{v_1}^{\pi_1}(x^{(1)}),\ldots, f_{v_r}^{\pi_r}(x^{(r)})\bigr).

(a) If \operatorname{Opt}(G)\ge1-\delta, a dictator assignment gives value at least \beta-O(\delta).

(b) With g_u(x)=\mathbb E_v[f_v^\pi(x)], prove \operatorname{Val}_P(F)=\mathbb E_u[\operatorname{Val}_T(g_u)].

(c) If \operatorname{Val}_P(F)\ge\alpha+2\lambda(\epsilon), then a positive fraction of vertices u have a nonempty neighbor-notable set. This corrects the book's undefined symbol s.

(d) By convexity of nonnegative Fourier-square functionals, \mathbb E_v[ \operatorname{Inf}^{(1-\epsilon)}_{\pi^{-1}(i)}[f_v]] \ge \operatorname{Inf}^{(1-\epsilon)}_i[g_u].

(e) A notable coordinate matches across a random incident edge with probability at least \epsilon/2.

(f) Each union of the notable and neighbor-notable sets has cardinality O(1/\epsilon^2).

(g) Uniformly labelling from this union yields a randomized assignment to G of value \Omega(\lambda(\epsilon)\epsilon^5).

(h) Under the Unique Games Conjecture, conclude Theorem 7.40.

Parts (a)--(g) are formalized for the operational weighted experiment, including independent neighbor samples at every query position and one global randomized decoding to a Unique-Games labeling. The globally filtered unweighted CSP output and the conditional encoded complexity boundary are recorded in Exercise 7.31 and Theorem 7.40 respectively.

Lean code for Lemma7.5.3113 declarations
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.WeightedConstraintExperiment.value_mem_Icc.{u, v, w, u_1}
      {D : Type u} {Ψ : FABL.CSPTemplate D} {V : Type v}
      (E : FABL.WeightedConstraintExperiment D Ψ V) (assignment : V  D) :
      E.value assignment  Set.Icc 0 1
    theorem FABL.WeightedConstraintExperiment.value_mem_Icc.{u,
        v, w, u_1}
      {D : Type u} {Ψ : FABL.CSPTemplate D}
      {V : Type v}
      (E :
        FABL.WeightedConstraintExperiment D Ψ
          V)
      (assignment : V  D) :
      E.value assignment  Set.Icc 0 1
    Every weighted constraint-experiment value lies in `[0,1]`. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.RegularUniqueGame.longCodeExperimentValue_optimalDictator_ge.{u_1,
        u_2}
      {q : } (G : FABL.RegularUniqueGame q) [Nonempty (Fin q)]
      (tester : FABL.SignTester q) (r : )
      (harity :
         (seed : tester.Seed), (tester.check seed).predicate.arity  r)
      (β δ : )
      (hcomplete :
         (coordinate : Fin q),
          β 
            tester.acceptanceProbability
              (FABL.BoundedCubeFunction.ofBoolean
                (FABL.dictator coordinate)))
      (hoptimum : 1 - δ  G.toFiniteUniqueGame.toCSPInstance.optimum) :
      β - r * δ 
        G.longCodeExperimentValue tester (G.dictatorLongCode G.optimalLabel)
    theorem FABL.RegularUniqueGame.longCodeExperimentValue_optimalDictator_ge.{u_1,
        u_2}
      {q : } (G : FABL.RegularUniqueGame q)
      [Nonempty (Fin q)]
      (tester : FABL.SignTester q) (r : )
      (harity :
         (seed : tester.Seed),
          (tester.check
                  seed).predicate.arity 
            r)
      (β δ : )
      (hcomplete :
         (coordinate : Fin q),
          β 
            tester.acceptanceProbability
              (FABL.BoundedCubeFunction.ofBoolean
                (FABL.dictator coordinate)))
      (hoptimum :
        1 - δ 
          G.toFiniteUniqueGame.toCSPInstance.optimum) :
      β - r * δ 
        G.longCodeExperimentValue tester
          (G.dictatorLongCode G.optimalLabel)
    Exercise 7.30(a), with the optimizing labeling chosen from the finite Unique-Games
    instance: optimum at least `1-δ` gives operational long-code value at least `β-rδ`. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.RegularUniqueGame.beta_sub_edgeError_sub_collision_le_globallyFilteredLongCodeCSP_optimum.{u_1,
        u_2, u_3}
      {q : } (G : FABL.RegularUniqueGame q) [DecidableEq G.Vertex]
      [Nonempty (Fin q)] (tester : FABL.SignTester q)
      (Ψ : Set FABL.SignPredicate) ( : Ψ.Finite)
      (huses : tester.UsesPredicates Ψ)
      (R :
        (G.longCodeAllowedWeightedExperiment tester Ψ 
            huses).UniformRefinement)
      (r M : ) (hM : 0 < M) (hrM : r  M)
      (harity :
         (seed : tester.Seed), (tester.check seed).predicate.arity  r)
      (β δ : )
      (hcomplete :
         (coordinate : Fin q),
          β 
            tester.acceptanceProbability
              (FABL.BoundedCubeFunction.ofBoolean
                (FABL.dictator coordinate)))
      (hoptimum : 1 - δ  G.toFiniteUniqueGame.toCSPInstance.optimum) :
      β - r * δ - r ^ 2 / M 
        (G.globallyFilteredLongCodeCSP tester Ψ  huses R r M hrM
              harity).optimum
    theorem FABL.RegularUniqueGame.beta_sub_edgeError_sub_collision_le_globallyFilteredLongCodeCSP_optimum.{u_1,
        u_2, u_3}
      {q : } (G : FABL.RegularUniqueGame q)
      [DecidableEq G.Vertex]
      [Nonempty (Fin q)]
      (tester : FABL.SignTester q)
      (Ψ : Set FABL.SignPredicate)
      ( : Ψ.Finite)
      (huses : tester.UsesPredicates Ψ)
      (R :
        (G.longCodeAllowedWeightedExperiment
            tester Ψ 
            huses).UniformRefinement)
      (r M : ) (hM : 0 < M) (hrM : r  M)
      (harity :
         (seed : tester.Seed),
          (tester.check
                  seed).predicate.arity 
            r)
      (β δ : )
      (hcomplete :
         (coordinate : Fin q),
          β 
            tester.acceptanceProbability
              (FABL.BoundedCubeFunction.ofBoolean
                (FABL.dictator coordinate)))
      (hoptimum :
        1 - δ 
          G.toFiniteUniqueGame.toCSPInstance.optimum) :
      β - r * δ - r ^ 2 / M 
        (G.globallyFilteredLongCodeCSP tester
              Ψ  huses R r M hrM
              harity).optimum
    Finite completeness of the literal long-code CSP: a Unique Games optimum at least `1-δ`
    gives target optimum at least `β-rδ-r²/M`. 
  • defdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    def FABL.RegularUniqueGame.longCodeExperimentValue.{u_1, u_2} {q : }
      (G : FABL.RegularUniqueGame q) (tester : FABL.SignTester q)
      (table : G.LongCodeTable) : 
    def FABL.RegularUniqueGame.longCodeExperimentValue.{u_1,
        u_2}
      {q : } (G : FABL.RegularUniqueGame q)
      (tester : FABL.SignTester q)
      (table : G.LongCodeTable) : 
    Acceptance value of the actual finite long-code experiment. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.RegularUniqueGame.longCode_value_identity.{u_1, u_2} {q : }
      (G : FABL.RegularUniqueGame q) (tester : FABL.SignTester q)
      (table : G.LongCodeTable) :
      G.longCodeExperimentValue tester table =
        Finset.univ.expect fun vertex =>
          tester.acceptanceProbability
            (G.averagedNeighborFunction table vertex)
    theorem FABL.RegularUniqueGame.longCode_value_identity.{u_1,
        u_2}
      {q : } (G : FABL.RegularUniqueGame q)
      (tester : FABL.SignTester q)
      (table : G.LongCodeTable) :
      G.longCodeExperimentValue tester table =
        Finset.univ.expect fun vertex =>
          tester.acceptanceProbability
            (G.averagedNeighborFunction table
              vertex)
    Exercise 7.30(b), value identity for the actual finite experiment:
    `Val(ℱ) = E_u[Val_T(g_u)]`. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.RegularUniqueGame.longCodeWeightedExperiment_value.{u_1, u_2}
      {q : } (G : FABL.RegularUniqueGame q) (tester : FABL.SignTester q)
      (table : G.LongCodeTable) :
      (G.longCodeWeightedExperiment tester).value
          (G.longCodeAssignment table) =
        G.longCodeExperimentValue tester table
    theorem FABL.RegularUniqueGame.longCodeWeightedExperiment_value.{u_1,
        u_2}
      {q : } (G : FABL.RegularUniqueGame q)
      (tester : FABL.SignTester q)
      (table : G.LongCodeTable) :
      (G.longCodeWeightedExperiment
              tester).value
          (G.longCodeAssignment table) =
        G.longCodeExperimentValue tester table
    The operational long-code value is exactly the value of the weighted constraint experiment.
    No denominator-clearing or injective-scope claim is hidden in this identity. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.RegularUniqueGame.error_le_neighborNotableVertexFraction.{u_1, u_2}
      {q : } (G : FABL.RegularUniqueGame q) {Ψ : Set FABL.SignPredicate}
      {α β : } {error :   }
      {testerFamily : (n : )  0 < n  FABL.SignTester n}
      (htester : FABL.IsDictatorVsNoNotablesTest Ψ α β error testerFamily)
      (hq : 0 < q) (table : G.LongCodeTable) (ε : ) ( : ε  Set.Icc 0 1)
      (hvalue :
        α + 2 * error ε  G.longCodeValue (testerFamily q hq) table) :
      error ε  G.neighborNotableVertexFraction table ε
    theorem FABL.RegularUniqueGame.error_le_neighborNotableVertexFraction.{u_1,
        u_2}
      {q : } (G : FABL.RegularUniqueGame q)
      {Ψ : Set FABL.SignPredicate} {α β : }
      {error :   }
      {testerFamily :
        (n : )  0 < n  FABL.SignTester n}
      (htester :
        FABL.IsDictatorVsNoNotablesTest Ψ α β
          error testerFamily)
      (hq : 0 < q) (table : G.LongCodeTable)
      (ε : ) ( : ε  Set.Icc 0 1)
      (hvalue :
        α + 2 * error ε 
          G.longCodeValue (testerFamily q hq)
            table) :
      error ε 
        G.neighborNotableVertexFraction table
          ε
    Exercise 7.30(c), with the printed `s` corrected to the tester's soundness threshold `α`:
    value at least `α + 2λ(ε)` forces at least a `λ(ε)` fraction of vertices to have a notable
    coordinate in `g_u`. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.RegularUniqueGame.stableInfluence_averagedNeighborFunction_le.{u_1,
        u_2}
      {q : } (G : FABL.RegularUniqueGame q) (table : G.LongCodeTable)
      (ε : ) ( : ε  Set.Icc 0 1) (vertex : G.Vertex)
      (coordinate : Fin q) :
      FABL.stableInfluence (1 - ε)
          (G.averagedNeighborFunction table vertex).toFun coordinate 
        Finset.univ.expect fun neighbor =>
          FABL.stableInfluence (1 - ε)
            (table (G.neighborVertex vertex neighbor)).toReal
            ((Equiv.symm (G.permutation vertex neighbor)) coordinate)
    theorem FABL.RegularUniqueGame.stableInfluence_averagedNeighborFunction_le.{u_1,
        u_2}
      {q : } (G : FABL.RegularUniqueGame q)
      (table : G.LongCodeTable) (ε : )
      ( : ε  Set.Icc 0 1)
      (vertex : G.Vertex)
      (coordinate : Fin q) :
      FABL.stableInfluence (1 - ε)
          (G.averagedNeighborFunction table
              vertex).toFun
          coordinate 
        Finset.univ.expect fun neighbor =>
          FABL.stableInfluence (1 - ε)
            (table
                (G.neighborVertex vertex
                  neighbor)).toReal
            ((Equiv.symm
                (G.permutation vertex
                  neighbor))
              coordinate)
    Exercise 7.30(d): stable influence is convex, and permutation of the queried neighbor long
    code sends coordinate `i` to `π⁻¹(i)`. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.RegularUniqueGame.half_epsilon_le_notableNeighborProbability.{u_1,
        u_2}
      {q : } (G : FABL.RegularUniqueGame q) (table : G.LongCodeTable)
      (ε : ) ( : ε  Set.Icc 0 1) (vertex : G.Vertex)
      (coordinate : Fin q)
      (hcoordinate :
        coordinate  G.neighborNotableCoordinates table ε vertex) :
      ε / 2  G.notableNeighborProbability table ε vertex coordinate
    theorem FABL.RegularUniqueGame.half_epsilon_le_notableNeighborProbability.{u_1,
        u_2}
      {q : } (G : FABL.RegularUniqueGame q)
      (table : G.LongCodeTable) (ε : )
      ( : ε  Set.Icc 0 1)
      (vertex : G.Vertex) (coordinate : Fin q)
      (hcoordinate :
        coordinate 
          G.neighborNotableCoordinates table ε
            vertex) :
      ε / 2 
        G.notableNeighborProbability table ε
          vertex coordinate
    Exercise 7.30(e), with the printed `Notable_u` corrected to `Notable_v`: a coordinate notable
    for `g_u` is transported into the neighbor's notable set with probability at least `ε/2`. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.RegularUniqueGame.card_decodingCandidates_le.{u_1, u_2} {q : }
      (G : FABL.RegularUniqueGame q) (table : G.LongCodeTable) (ε : )
      ( : ε  Set.Ioc 0 1) (vertex : G.Vertex) :
      (G.decodingCandidates table ε vertex).card  3 / ε ^ 2
    theorem FABL.RegularUniqueGame.card_decodingCandidates_le.{u_1,
        u_2}
      {q : } (G : FABL.RegularUniqueGame q)
      (table : G.LongCodeTable) (ε : )
      ( : ε  Set.Ioc 0 1)
      (vertex : G.Vertex) :
      (G.decodingCandidates table ε
              vertex).card 
        3 / ε ^ 2
    Exercise 7.30(f), exact `O(1/ε²)` estimate: every decoding candidate set has cardinality at
    most `3/ε²`. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.RegularUniqueGame.error_mul_epsilon_pow_five_div_eighteen_le_optimum.{u_1,
        u_2}
      {q : } (G : FABL.RegularUniqueGame q) {Ψ : Set FABL.SignPredicate}
      {α β : } {error :   }
      {testerFamily : (n : )  0 < n  FABL.SignTester n}
      [Nonempty (Fin q)]
      (htester : FABL.IsDictatorVsNoNotablesTest Ψ α β error testerFamily)
      (hq : 0 < q) (table : G.LongCodeTable) (ε : ) ( : ε  Set.Ioc 0 1)
      (hvalue :
        α + 2 * error ε  G.longCodeValue (testerFamily q hq) table) :
      error ε * ε ^ 5 / 18  G.toFiniteUniqueGame.toCSPInstance.optimum
    theorem FABL.RegularUniqueGame.error_mul_epsilon_pow_five_div_eighteen_le_optimum.{u_1,
        u_2}
      {q : } (G : FABL.RegularUniqueGame q)
      {Ψ : Set FABL.SignPredicate} {α β : }
      {error :   }
      {testerFamily :
        (n : )  0 < n  FABL.SignTester n}
      [Nonempty (Fin q)]
      (htester :
        FABL.IsDictatorVsNoNotablesTest Ψ α β
          error testerFamily)
      (hq : 0 < q) (table : G.LongCodeTable)
      (ε : ) ( : ε  Set.Ioc 0 1)
      (hvalue :
        α + 2 * error ε 
          G.longCodeValue (testerFamily q hq)
            table) :
      error ε * ε ^ 5 / 18 
        G.toFiniteUniqueGame.toCSPInstance.optimum
    Exercise 7.30(g), deterministic decoding conclusion: the global product law and finite
    maximization extract one ordinary labeling, so the quantitative decoded value lower-bounds the
    actual Unique-Games optimum. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.RegularUniqueGame.excess_mul_epsilon_pow_five_div_eighteen_le_optimum.{u_1,
        u_2}
      {q : } (G : FABL.RegularUniqueGame q) {Ψ : Set FABL.SignPredicate}
      {α β : } {error :   }
      {testerFamily : (n : )  0 < n  FABL.SignTester n}
      [Nonempty (Fin q)]
      (htester : FABL.IsDictatorVsNoNotablesTest Ψ α β error testerFamily)
      (hq : 0 < q) (table : G.BoundedLongCodeTable) (ε τ : )
      ( : ε  Set.Ioc 0 1)
      (hvalue :
        α + error ε + τ 
          G.boundedLongCodeValue (testerFamily q hq) table) :
      τ * ε ^ 5 / 18  G.toFiniteUniqueGame.toCSPInstance.optimum
    theorem FABL.RegularUniqueGame.excess_mul_epsilon_pow_five_div_eighteen_le_optimum.{u_1,
        u_2}
      {q : } (G : FABL.RegularUniqueGame q)
      {Ψ : Set FABL.SignPredicate} {α β : }
      {error :   }
      {testerFamily :
        (n : )  0 < n  FABL.SignTester n}
      [Nonempty (Fin q)]
      (htester :
        FABL.IsDictatorVsNoNotablesTest Ψ α β
          error testerFamily)
      (hq : 0 < q)
      (table : G.BoundedLongCodeTable)
      (ε τ : ) ( : ε  Set.Ioc 0 1)
      (hvalue :
        α + error ε + τ 
          G.boundedLongCodeValue
            (testerFamily q hq) table) :
      τ * ε ^ 5 / 18 
        G.toFiniteUniqueGame.toCSPInstance.optimum
    Deterministic bounded-table soundness: finite maximization extracts one global Unique Games
    labeling whose value is at least the decoded `τ ε⁵/18`. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.RegularUniqueGame.globallyFilteredLongCodeCSP_optimum_le_alpha_add_error_add_excess_add_collision.{u_1,
        u_2, u_3}
      {q : } (G : FABL.RegularUniqueGame q) [DecidableEq G.Vertex]
      [Nonempty (Fin q)] {Ψ : Set FABL.SignPredicate} {α β : }
      {error :   } {testerFamily : (n : )  0 < n  FABL.SignTester n}
      (htester : FABL.IsDictatorVsNoNotablesTest Ψ α β error testerFamily)
      (hq : 0 < q)
      (R :
        (G.longCodeAllowedWeightedExperiment (testerFamily q hq) Ψ 
            ).UniformRefinement)
      (r M : ) (hM : 0 < M) (hrM : r  M)
      (harity :
         (seed : (testerFamily q hq).Seed),
          ((testerFamily q hq).check seed).predicate.arity  r)
      (ε τ : ) ( : ε  Set.Ioc 0 1)
      (hoptimum :
        G.toFiniteUniqueGame.toCSPInstance.optimum < τ * ε ^ 5 / 18) :
      (G.globallyFilteredLongCodeCSP (testerFamily q hq) Ψ   R r M hrM
              harity).optimum 
        α + error ε + τ + r ^ 2 / M
    theorem FABL.RegularUniqueGame.globallyFilteredLongCodeCSP_optimum_le_alpha_add_error_add_excess_add_collision.{u_1,
        u_2, u_3}
      {q : } (G : FABL.RegularUniqueGame q)
      [DecidableEq G.Vertex]
      [Nonempty (Fin q)]
      {Ψ : Set FABL.SignPredicate} {α β : }
      {error :   }
      {testerFamily :
        (n : )  0 < n  FABL.SignTester n}
      (htester :
        FABL.IsDictatorVsNoNotablesTest Ψ α β
          error testerFamily)
      (hq : 0 < q)
      (R :
        (G.longCodeAllowedWeightedExperiment
            (testerFamily q hq) Ψ 
            ).UniformRefinement)
      (r M : ) (hM : 0 < M) (hrM : r  M)
      (harity :
         (seed : (testerFamily q hq).Seed),
          ((testerFamily q hq).check
                  seed).predicate.arity 
            r)
      (ε τ : ) ( : ε  Set.Ioc 0 1)
      (hoptimum :
        G.toFiniteUniqueGame.toCSPInstance.optimum <
          τ * ε ^ 5 / 18) :
      (G.globallyFilteredLongCodeCSP
              (testerFamily q hq) Ψ   R r M
              hrM harity).optimum 
        α + error ε + τ + r ^ 2 / M
    Finite soundness of the literal long-code CSP.  If the Unique Games optimum is below
    `τ ε⁵/18`, then no filtered cloned assignment can exceed
    `α + error ε + τ + r²/M`. 
Lemma7.5.32
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Definition 7.3.4
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Exercise 7.31. Repair repeated query scopes in Exercise 7.30 by replacing the variable set by V\times[M]\times\{-1,1\}^q and choosing an independent uniform clone for each query.

(a) The book claims that the cloned instance has the same Boolean optimum as the original construction. This is false when a check repeats a query: take one Boolean variable and the binary not-equal predicate with both query positions pointing to that variable. The original optimum is 0, whereas two oppositely labelled clones give cloned value 1/2.

The corrected identity averages an arbitrary clone assignment over its clone coordinate, producing a function with values in [-1,1]. The cloned value is exactly the original weighted experiment evaluated using the independent randomized-answer semantics of Remark 7.38. This is the representation needed by the no-notables soundness theorem and does not assert the false Boolean-optimum equality.

(b) Removing all constraints with a repeated variable changes the optimum by at most r^2/M.

(c) After also deleting variables which occur in no remaining constraint, the result is a valid Max-CSP(\Psi) instance. Taking M sufficiently large makes the loss arbitrarily small.

The literal unweighted-multiset statements in (b)--(c) are formalized from an explicit uniform refinement of the weighted experiment. Such a witness is automatic for a tester implemented with finitely many uniform random bits, but not for the deliberately more general PMF interface, whose weights may be irrational. The hardness adapter must therefore supply the refinement together with its encoding; arbitrary PMF weights are never silently denominator-cleared.

Lean code for Lemma7.5.327 theorems
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.WeightedConstraintExperiment.exercise7_31a_repeatedScope_counterexample :
      FABL.WeightedConstraintExperiment.repeatedNotEqualExperiment.optimum =
          0 
        1 / 2 
          (FABL.WeightedConstraintExperiment.repeatedNotEqualExperiment.clone
              2
              FABL.WeightedConstraintExperiment.repeatedNotEqual_clone_value._proof_2).optimum
    theorem FABL.WeightedConstraintExperiment.exercise7_31a_repeatedScope_counterexample :
      FABL.WeightedConstraintExperiment.repeatedNotEqualExperiment.optimum =
          0 
        1 / 2 
          (FABL.WeightedConstraintExperiment.repeatedNotEqualExperiment.clone
              2
              FABL.WeightedConstraintExperiment.repeatedNotEqual_clone_value._proof_2).optimum
    Formal erratum for the printed optimum-preservation claim in Exercise 7.31(a): the base
    Boolean optimum is zero, whereas its two-clone optimum is at least one half. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.WeightedConstraintExperiment.clone_value_eq_randomizedCloneMean.{v,
        u_1}
      {V : Type v} {q : } (tester : FABL.SignTester q)
      (signExperiment :
        FABL.WeightedConstraintExperiment FABL.Sign tester.cspTemplate V)
      (M : ) (hM : 0 < M) (assignment : V × Fin M  FABL.Sign) :
      (signExperiment.clone M hM).value assignment =
        FABL.pmfExpectation signExperiment.law fun outcome =>
          let predicate :=
            (tester.check (signExperiment.predicate outcome)).predicate;
          predicate.randomizedValue
            (fun position =>
              FABL.WeightedConstraintExperiment.cloneMean M assignment
                (signExperiment.scope outcome position))
            
    theorem FABL.WeightedConstraintExperiment.clone_value_eq_randomizedCloneMean.{v,
        u_1}
      {V : Type v} {q : }
      (tester : FABL.SignTester q)
      (signExperiment :
        FABL.WeightedConstraintExperiment
          FABL.Sign tester.cspTemplate V)
      (M : ) (hM : 0 < M)
      (assignment : V × Fin M  FABL.Sign) :
      (signExperiment.clone M hM).value
          assignment =
        FABL.pmfExpectation signExperiment.law
          fun outcome =>
          let predicate :=
            (tester.check
                (signExperiment.predicate
                  outcome)).predicate;
          predicate.randomizedValue
            (fun position =>
              FABL.WeightedConstraintExperiment.cloneMean
                M assignment
                (signExperiment.scope outcome
                  position))
            
    Remark 7.38's corrected clone semantics: even when a base scope repeats a variable, its
    independently cloned Boolean value is exactly randomized predicate evaluation at the clone means.
    Each repeated position remains an independent input to the multilinear extension. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.WeightedConstraintExperiment.clone_value_constantCloneAssignment.{u,
        v, w, u_1}
      {D : Type u} {Ψ : FABL.CSPTemplate D} {V : Type v}
      (E : FABL.WeightedConstraintExperiment D Ψ V) (assignment : V  D)
      (M : ) (hM : 0 < M) :
      (E.clone M hM).value
          (FABL.WeightedConstraintExperiment.constantCloneAssignment
            assignment M) =
        E.value assignment
    theorem FABL.WeightedConstraintExperiment.clone_value_constantCloneAssignment.{u,
        v, w, u_1}
      {D : Type u} {Ψ : FABL.CSPTemplate D}
      {V : Type v}
      (E :
        FABL.WeightedConstraintExperiment D Ψ
          V)
      (assignment : V  D) (M : )
      (hM : 0 < M) :
      (E.clone M hM).value
          (FABL.WeightedConstraintExperiment.constantCloneAssignment
            assignment M) =
        E.value assignment
    Exercise 7.31(a), completeness direction: independent cloning preserves the value of every
    constant lift exactly. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.WeightedConstraintExperiment.cloneCollisionProbability_le.{u, v, w,
        u_1}
      {D : Type u} {Ψ : FABL.CSPTemplate D} {V : Type v}
      (E : FABL.WeightedConstraintExperiment D Ψ V) (r M : ) (hM : 0 < M)
      (harity :
         (outcome : E.Outcome), Ψ.arity (E.predicate outcome)  r) :
      E.cloneCollisionProbability M hM  r ^ 2 / M
    theorem FABL.WeightedConstraintExperiment.cloneCollisionProbability_le.{u,
        v, w, u_1}
      {D : Type u} {Ψ : FABL.CSPTemplate D}
      {V : Type v}
      (E :
        FABL.WeightedConstraintExperiment D Ψ
          V)
      (r M : ) (hM : 0 < M)
      (harity :
         (outcome : E.Outcome),
          Ψ.arity (E.predicate outcome)  r) :
      E.cloneCollisionProbability M hM 
        r ^ 2 / M
    Exercise 7.31(b), weighted form: if all predicates have arity at most `r`, a cloned scope
    collides with probability at most `r²/M`. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.RegularUniqueGame.clonedLongCode_value_eq_boundedLongCodeValue.{u_1,
        u_2}
      {q : } (G : FABL.RegularUniqueGame q) (tester : FABL.SignTester q)
      (M : ) (hM : 0 < M)
      (assignment : (G.Vertex × FABL.SignCube q) × Fin M  FABL.Sign) :
      ((G.longCodeWeightedExperiment tester).clone M hM).value assignment =
        G.boundedLongCodeValue tester
          (G.cloneMeanLongCodeTable M hM assignment)
    theorem FABL.RegularUniqueGame.clonedLongCode_value_eq_boundedLongCodeValue.{u_1,
        u_2}
      {q : } (G : FABL.RegularUniqueGame q)
      (tester : FABL.SignTester q) (M : )
      (hM : 0 < M)
      (assignment :
        (G.Vertex × FABL.SignCube q) × Fin M 
          FABL.Sign) :
      ((G.longCodeWeightedExperiment
                  tester).clone
              M hM).value
          assignment =
        G.boundedLongCodeValue tester
          (G.cloneMeanLongCodeTable M hM
            assignment)
    The operational cloned assignment has exactly the analytic bounded-table value; no Boolean
    rounding assumption is inserted, and repeated base queries retain independent clone samples. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.WeightedConstraintExperiment.UniformRefinement.abs_paddedCloneOptimum_sub_globallyFilteredCloneRawCSP_optimum_le.{u,
        v, w, u_1, u_2}
      {D : Type u} {Ψ : FABL.CSPTemplate D} {V : Type v}
      (E : FABL.WeightedConstraintExperiment D Ψ V)
      (R : E.UniformRefinement) [Finite D] [Nonempty D] [Finite V]
      [DecidableEq V] (r M : ) (hM : 0 < M) (hrM : r  M)
      (harity :
         (outcome : E.Outcome), Ψ.arity (E.predicate outcome)  r) :
      |FABL.WeightedConstraintExperiment.UniformRefinement.paddedCloneOptimum
              E R r M harity -
            (FABL.WeightedConstraintExperiment.UniformRefinement.globallyFilteredCloneRawCSP
                  E R r M hrM harity).optimum| 
        r ^ 2 / M
    theorem FABL.WeightedConstraintExperiment.UniformRefinement.abs_paddedCloneOptimum_sub_globallyFilteredCloneRawCSP_optimum_le.{u,
        v, w, u_1, u_2}
      {D : Type u} {Ψ : FABL.CSPTemplate D}
      {V : Type v}
      (E :
        FABL.WeightedConstraintExperiment D Ψ
          V)
      (R : E.UniformRefinement) [Finite D]
      [Nonempty D] [Finite V] [DecidableEq V]
      (r M : ) (hM : 0 < M) (hrM : r  M)
      (harity :
         (outcome : E.Outcome),
          Ψ.arity (E.predicate outcome)  r) :
      |FABL.WeightedConstraintExperiment.UniformRefinement.paddedCloneOptimum
              E R r M harity -
            (FABL.WeightedConstraintExperiment.UniformRefinement.globallyFilteredCloneRawCSP
                  E R r M hrM
                  harity).optimum| 
        r ^ 2 / M
    Exercise 7.31(b), optimum form for literal deletion from the complete uniformly refined
    multiset. 
  • theoremdefined in FABL/Chapter07/UniqueGamesReduction.lean
    complete
    theorem FABL.WeightedConstraintExperiment.UniformRefinement.globallyFilteredCloneCSP_optimum.{u,
        v, w, u_1, u_2}
      {D : Type u} {Ψ : FABL.CSPTemplate D} {V : Type v}
      (E : FABL.WeightedConstraintExperiment D Ψ V)
      (R : E.UniformRefinement) [Finite D] [Nonempty D] [Finite V]
      [DecidableEq V] (r M : ) (hrM : r  M)
      (harity :
         (outcome : E.Outcome), Ψ.arity (E.predicate outcome)  r) :
      (FABL.WeightedConstraintExperiment.UniformRefinement.globallyFilteredCloneCSP
            E R r M hrM harity).optimum =
        (FABL.WeightedConstraintExperiment.UniformRefinement.globallyFilteredCloneRawCSP
            E R r M hrM harity).optimum
    theorem FABL.WeightedConstraintExperiment.UniformRefinement.globallyFilteredCloneCSP_optimum.{u,
        v, w, u_1, u_2}
      {D : Type u} {Ψ : FABL.CSPTemplate D}
      {V : Type v}
      (E :
        FABL.WeightedConstraintExperiment D Ψ
          V)
      (R : E.UniformRefinement) [Finite D]
      [Nonempty D] [Finite V] [DecidableEq V]
      (r M : ) (hrM : r  M)
      (harity :
         (outcome : E.Outcome),
          Ψ.arity (E.predicate outcome)  r) :
      (FABL.WeightedConstraintExperiment.UniformRefinement.globallyFilteredCloneCSP
            E R r M hrM harity).optimum =
        (FABL.WeightedConstraintExperiment.UniformRefinement.globallyFilteredCloneRawCSP
            E R r M hrM harity).optimum
    Exercise 7.31(c): the final isolated-variable deletion preserves the globally filtered
    optimum exactly. 
Theorem7.5.33
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 1used by 0XL∃∀N

The notes cite an efficient deterministic (7/8,1)-approximation for Max-3-Sat, matching the value of the uniform random assignment. The algorithmic theorem is external and supplies no assumption to the production library.

Theorem7.5.34
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 1used by 0XL∃∀N

For every prime p and every constant \delta>0, the notes cite NP-hardness of (1/p+\delta,1-\delta) \text{-approximating Max-E3-Lin modulo }p. This extension is external to the book's proofs.

Theorem7.5.35
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 1used by 0XL∃∀N

The notes cite NP-hardness of a (7/8,1)-approximation for Max-CSP(\{\operatorname{NAE}_4\}). The result is external and supplies no assumption to the production library.

Theorem7.5.36
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Theorem 7.3.12
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0XL∃∀N

For every \delta>0, the notes cite NP-hardness of (11/16+\delta,3/4)-approximating Max-Cut. This gap theorem is external to the book's proofs.

Theorem7.5.37
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 1used by 0XL∃∀N

For alphabet size q, the notes cite the known NP-hardness gap (3/8+q^{-\Theta(1)},1/2) for Unique Games. This result is external and does not supply the Unique Games Conjecture.

Lemma7.5.38
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 1used by 0XL∃∀N

The notes describe Raghavendra's result as an essentially complete characterization, assuming the Unique Games Conjecture, of the best polynomial-time approximation ratios for finite CSPs. The book does not give a standalone quantified theorem here, so this bibliographic remark is not used as a formal dependency.

Theorem7.5.39
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 1used by 0XL∃∀N

The chapter records the open conjecture \mathsf P\ne\mathsf{NP}. It supplies no assumption to the production library.

Theorem7.5.40
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 1used by 0XL∃∀N

The chapter records the stronger belief that Circuit-Sat on n-bit encodings has no algorithm of running time 2^{o(n)}. This unproved complexity hypothesis supplies no assumption to the production library.

Lemma7.5.41
Group: Chapter 7: Property testing, PCPPs, and CSPs (103)
Group member previews
Preview
Definition 7.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 0used by 0XL∃∀N

The remaining notes record historical attributions for property testing, PCPPs, PCPs, approximation resistance, and the use of locally checkable proofs for spot-checking formal computations. These bibliographic remarks state no additional mathematical assumption and have no production declaration association.