OAI/Computability/UniqueGames/PCP/HonestTestLemmas.lean
62 declarations, 0 contain sorry, 0 declared as axioms
Honest completeness of the actual three-query test. Compatible coordinate dictators cancel the two uniform query tables, leaving exactly one noise bit. The finite-tape form uses the proved product-noise pushforward law.
- theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.dictator_test_parityline 28Source documentation
For compatible honest coordinates, the test parity is precisely the selected noise coordinate, for every individual choice of query tables.
theorem dictator_test_parity (π : J → I) (i : I) (j : J) (hπ : π j = i) (f : Cube I) (g μ : Cube J) : (f i ^^ g j ^^ (thirdQuery π f g μ) j) = μ j := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.Cube, OAI.UniqueGamesTheorem.Foundations.Hastad.thirdQuery
- theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.noise_coordinate_signline 35Source documentation
The product noise law has the specified sign bias in every coordinate.
theorem noise_coordinate_sign (ε : ℝ) (j : J) : (∑ μ : Cube J, noiseWeight ε μ * bitSign (μ j)) = 1 - 2 * ε := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.Cube, OAI.UniqueGamesTheorem.Foundations.Hastad.noiseWeight, OAI.UniqueGamesTheorem.Foundations.Hastad.bitSign
- theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.noise_coordinate_falseline 46Source documentation
The probability of a false noise bit is exactly
1 - ε. This is an algebraic identity of the explicit product weights, valid for every real ε.theorem noise_coordinate_false (ε : ℝ) (j : J) : (∑ μ : Cube J, noiseWeight ε μ * if μ j then (0 : ℝ) else 1) = 1 - ε := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.Cube, OAI.UniqueGamesTheorem.Foundations.Hastad.noiseWeight
- theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.testAcceptance_dictatorline 60Source documentation
Exact honest acceptance for the actual three-bit test.
theorem testAcceptance_dictator (ε : ℝ) (π : J → I) (i : I) (j : J) (hπ : π j = i) : testAcceptance ε π (fun f => f i) (fun g => g j) = 1 - ε := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.testAcceptance
- theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.testAcceptance_folded_dictatorsline 80Source documentation
Storing an honest dictator in the actual half-table representation gives the same acceptance after applying the explicit folding correction.
theorem testAcceptance_folded_dictators (ε : ℝ) (π : J → I) (i₀ i : I) (j₀ j : J) (hπ : π j = i) : testAcceptance ε π (foldedAnswer i₀ (fun h => h.val i)) (foldedAnswer j₀ (fun h => h.val j)) = 1 - ε := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.testAcceptance, OAI.UniqueGamesTheorem.Foundations.Hastad.foldedAnswer
- theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.testAcceptance_conditioned_dictatorsline 93Source documentation
Honest valid local assignments remain dictators after both conditioning and folding, so the concrete conditioned tables have the same completeness.
theorem testAcceptance_conditioned_dictators (ε : ℝ) (π : J → I) (validI : I → Bool) (validJ : J → Bool) (i₀ i : {i : I // validI i = true}) (j₀ j : {j : J // validJ j = true}) (hπ : π j.val = i.val) : testAcceptance ε π (conditionedFoldedAnswer validI i₀ (fun h => h.val i)) (conditionedFoldedAnswer validJ j₀ (fun h => h.val j)) = 1 - ε := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.testAcceptance, OAI.UniqueGamesTheorem.Foundations.Hastad.conditionedFoldedAnswer
- theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.testAcceptance_folded_conditioned_dictatorsline 109 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.realizedTestAcceptanceline 123Source documentation
The actual test using one uniform
Fin Dtape entry per noise coordinate.def realizedTestAcceptance (D : Nat) (π : J → I) (A : Cube I → Bool) (B : Cube J → Bool) : ℝ := … - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.realizedTestAcceptance_eq_testAcceptanceline 130Source documentation
Exact equality between the finite uniform tape and the weighted product noise test; no distributional acceptance premise is assumed.
theorem realizedTestAcceptance_eq_testAcceptance {D : Nat} (positive : 0 < D) (π : J → I) (A : Cube I → Bool) (B : Cube J → Bool) : realizedTestAcceptance D π A B = testAcceptance ((D : ℝ)⁻¹) π A B := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.Cube, OAI.UniqueGamesTheorem.Foundations.Hastad.realizedTestAcceptance, OAI.UniqueGamesTheorem.Foundations.Hastad.testAcceptance
- theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.realizedTestAcceptance_dictatorline 140Source documentation
Exact honest completeness of the uniformly sampled finite-tape test.
theorem realizedTestAcceptance_dictator {D : Nat} (positive : 0 < D) (π : J → I) (i : I) (j : J) (hπ : π j = i) : realizedTestAcceptance D π (fun f => f i) (fun g => g j) = 1 - (D : ℝ)⁻¹ := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.realizedTestAcceptance
- theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.realizedTestAcceptance_folded_dictatorsline 146 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.realizedTestAcceptance_conditioned_dictatorsline 153 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.realizedTestAcceptance_folded_conditioned_dictatorsline 163 - abbrev
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.TestTapeline 187Source documentation
Two full Boolean query tables and one finite noise entry per right index.
abbrev TestTape (I J : Type*) (D : ℕ) := …
- abbrev
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.FairTestTapeline 190 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.expect_prodline 196 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.card_testTapeline 207 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.card_fairTestTapeline 212 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.expect_testTapeline 218 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.expect_equivTapeline 227Source documentation
Any explicit finite enumeration equivalence preserves the exact tape law.
theorem expect_equivTape {E : Type*} [Fintype E] (e : E ≃ TestTape I J D) (H : TestTape I J D → ℝ) : (𝔼 s : E, H (e s)) = 𝔼 t : TestTape I J D, H t := …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.TestTape
- theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.expect_fairTestTapeline 232 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.expect_fairTestTape_ignoreline 241 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.tapeQueriesline 247Source documentation
The three actual query tables read from a uniform finite tape.
def tapeQueries (π : J → I) (t : TestTape I J D) : Cube I × Cube J × Cube J := …
Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.TestTape, OAI.UniqueGamesTheorem.Foundations.Hastad.Cube
- theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.expect_tapeQueriesline 251Source documentation
Exact joint law of all three queries, for every real-valued observable.
theorem expect_tapeQueries (positive : 0 < D) (π : J → I) (H : Cube I × Cube J × Cube J → ℝ) : (𝔼 t : TestTape I J D, H (tapeQueries π t)) = 𝔼 f : Cube I, ∑ μ : Cube J, noiseWeight ((D : ℝ)⁻¹) μ * (𝔼 g : Cube J, H (f, g, thirdQuery π f g μ)) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.Cube, OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.TestTape, OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.tapeQueries, OAI.UniqueGamesTheorem.Foundations.Hastad.noiseWeight, OAI.UniqueGamesTheorem.Foundations.Hastad.thirdQuery
- def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.tapeAcceptanceline 262 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.tapeAcceptance_eq_realizedTestAcceptanceline 268 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.tapeAcceptance_eq_testAcceptanceline 273 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.tapeAcceptance_eq_sum_div_cardline 279 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.restrictFunctionline 293 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.expect_restrictFunctionline 298Source documentation
Uniform full functions push forward to uniform functions on any subtype. Nonempty values ensure that the unused coordinates can be filled.
theorem expect_restrictFunction [Fintype X] [DecidableEq X] [Fintype Λ] [Nonempty Λ] (P : X → Prop) [DecidablePred P] (H : ({x : X // P x} → Λ) → ℝ) : (𝔼 f : X → Λ, H (restrictFunction P f)) = 𝔼 g : {x : X // P x} → Λ, H g := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.restrictFunction
- def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.restrictTapeline 313 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.expect_restrictTapeline 317 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.restrictedProjectionline 345 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.restrict_realizedNoiseline 349 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.restrict_thirdQueryline 352 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.expect_restricted_queriesline 360Source documentation
The contextual three-query law is the same joint law as sampling directly on the contextual domains, whenever the contextual projection is defined.
theorem expect_restricted_queries [Fintype I] [DecidableEq I] [Fintype J] [DecidableEq J] (P : I → Prop) (Q : J → Prop) [DecidablePred P] [DecidablePred Q] (π : J → I) (hπ : ∀ j, Q j → P (π j)) {D : ℕ} (positive : 0 < D) (H : Cube {i : I // P i} × Cube {j : J // Q j} × Cube {j : J // Q j} → ℝ) : (𝔼 t : TestTape I J D, H (restrictFunction P t.1, restrictFunction Q t.2.2, restrictFunction Q (thirdQuery π t.1 t.2.2 (realizedNoise t.2.1)))) = 𝔼 t : TestTape {i : I // P i} {j : J // Q j} D, H (tapeQueries (restrictedProjection P Q π hπ) t) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.Cube, OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.TestTape, OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.restrictFunction, OAI.UniqueGamesTheorem.Foundations.Hastad.thirdQuery, OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.tapeQueries, OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.restrictedProjection
- def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.restrictRightTapeline 372 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.expect_restrictRightTapeline 376 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.expect_rightRestricted_queriesline 397Source documentation
Joint contextual law with the full left domain unchanged. No compatibility premise is needed: the right projection is simply restricted to valid indices.
theorem expect_rightRestricted_queries [Fintype I] [DecidableEq I] [Fintype J] [DecidableEq J] (Q : J → Prop) [DecidablePred Q] (π : J → I) {D : ℕ} (positive : 0 < D) (H : Cube I × Cube {j : J // Q j} × Cube {j : J // Q j} → ℝ) : (𝔼 t : TestTape I J D, H (t.1, restrictFunction Q t.2.2, restrictFunction Q (thirdQuery π t.1 t.2.2 (realizedNoise t.2.1)))) = 𝔼 t : TestTape I {j : J // Q j} D, H (tapeQueries (fun j => π j.val) t) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.Cube, OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.TestTape, OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.restrictFunction, OAI.UniqueGamesTheorem.Foundations.Hastad.thirdQuery, OAI.UniqueGamesTheorem.Foundations.Hastad.SourceTape.tapeQueries
- theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.event_nonemptyline 425 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.eventLawline 429 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.visibleQuestionline 434 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.baseGameline 438 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.baseGame_acceptsline 443 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.eventLaw_probabilityline 447 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.sum_slotsline 460 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.sum_slot_acceptsline 470 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.failureCount_eq_sum_mapline 484 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.failureCount_allIndicesline 492 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.verifier_probability_plus_failureline 501Source documentation
The local three-slot rejection inequality controls the actual uniform incidence law, including repeated variable names and repeated clauses.
theorem verifier_probability_plus_failure (F : Formula) (hne : F.clauses ≠ []) (alice : AliceStrategy F) (bob : BobStrategy F) : (eventLaw F hne).probability (accepts F alice bob) + (failureCount F bob (allIndices F) : ℝ) / (3 * F.clauses.length : ℕ) ≤ 1 := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.eventLaw
- theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.base_success_le_verifierline 522 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.base_value_le_of_clause_gapline 533Source documentation
A concrete clause-count gap supplies the base-game value bound.
theorem base_value_le_of_clause_gap (F : Formula) (hne : F.clauses ≠ []) (δ : ℝ) (hgap : ∀ bob : BobStrategy F, δ * F.clauses.length ≤ (failureCount F bob (allIndices F) : ℝ)) : (baseGame F hne).value ≤ 1 - δ / 3 := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.baseGame
- theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.pushforward_compline 553 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.expectation_pushforwardline 568 - def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.repeatedVisibleline 579 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.repeated_questionsline 586Source documentation
This identifies the repeated game law with the actual uniformly sampled incidence tuples, retaining all collisions of their visible questions.
theorem repeated_questions (F : Formula) (hne : F.clauses ≠ []) (u : ℕ) : ((baseGame F hne).repetition u).questions = ((eventLaw F hne).iid u).pushforward (repeatedVisible F u) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.baseGame, OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.eventLaw, OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.repeatedVisible
- theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.repeated_expectationline 595 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.repeated_expectation_splitline 608Source documentation
The concrete constructor enumerates clause tuples and slot tuples as separate lexicographic factors; this is exactly the same question law.
theorem repeated_expectation_split (F : Formula) (hne : F.clauses ≠ []) (u : ℕ) (H : VariableContext F u × ClauseContext F u → ℝ) : ((baseGame F hne).repetition u).questions.expectation H = 𝔼 c : ClauseContext F u, 𝔼 s : SlotContext u, H (sampledVariables F c s, c) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.baseGame
- def
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.sourceProjectionGameline 622 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.projection_value_le_repetitionline 629Source documentation
The projection game has exactly the repeated question law, and its legal right answers satisfy every coordinate of the original game.
theorem projection_value_le_repetition (F : Formula) (hne : F.clauses ≠ []) (u : ℕ) : (sourceProjectionGame F hne u).value ≤ ((baseGame F hne).repetition u).value := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.sourceProjectionGame, OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.baseGame
- theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.source_acceptance_leline 648 - theorem
OAI.UniqueGamesTheorem.Foundations.Hastad.SourceGame.source_acceptance_le_splitline 663