OAI/Computability/MaxCut/PCP/HonestTest.lean
81 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.MaxCutGames.Foundations.Hastad.dictator_test_parityline 24Source 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.MaxCutGames.Foundations.Hastad.Cube, OAI.MaxCutGames.Foundations.Hastad.thirdQuery
- theorem
OAI.MaxCutGames.Foundations.Hastad.noise_coordinate_signline 31Source 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.MaxCutGames.Foundations.Hastad.Cube, OAI.MaxCutGames.Foundations.Hastad.noiseWeight, OAI.MaxCutGames.Foundations.Hastad.bitSign
- theorem
OAI.MaxCutGames.Foundations.Hastad.noise_coordinate_falseline 42Source 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.MaxCutGames.Foundations.Hastad.Cube, OAI.MaxCutGames.Foundations.Hastad.noiseWeight
- theorem
OAI.MaxCutGames.Foundations.Hastad.testAcceptance_dictatorline 56Source 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 … - theorem
OAI.MaxCutGames.Foundations.Hastad.testAcceptance_folded_dictatorsline 76Source 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.MaxCutGames.Foundations.Hastad.testAcceptance, OAI.MaxCutGames.Foundations.Hastad.foldedAnswer
- theorem
OAI.MaxCutGames.Foundations.Hastad.testAcceptance_conditioned_dictatorsline 89Source 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.MaxCutGames.Foundations.Hastad.testAcceptance, OAI.MaxCutGames.Foundations.Hastad.conditionedFoldedAnswer
- theorem
OAI.MaxCutGames.Foundations.Hastad.testAcceptance_folded_conditioned_dictatorsline 105 - def
OAI.MaxCutGames.Foundations.Hastad.realizedTestAcceptanceline 119Source 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) : ℝ := …Mentions: OAI.MaxCutGames.Foundations.Hastad.Cube
- theorem
OAI.MaxCutGames.Foundations.Hastad.realizedTestAcceptance_eq_testAcceptanceline 126Source 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.MaxCutGames.Foundations.Hastad.Cube, OAI.MaxCutGames.Foundations.Hastad.realizedTestAcceptance, OAI.MaxCutGames.Foundations.Hastad.testAcceptance
- theorem
OAI.MaxCutGames.Foundations.Hastad.realizedTestAcceptance_dictatorline 136Source 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.MaxCutGames.Foundations.Hastad.realizedTestAcceptance
- theorem
OAI.MaxCutGames.Foundations.Hastad.realizedTestAcceptance_folded_dictatorsline 142 - theorem
OAI.MaxCutGames.Foundations.Hastad.realizedTestAcceptance_conditioned_dictatorsline 149 - theorem
OAI.MaxCutGames.Foundations.Hastad.realizedTestAcceptance_folded_conditioned_dictatorsline 159 - abbrev
OAI.MaxCutGames.Foundations.Hastad.SourceTape.TestTapeline 175Source documentation
Two full Boolean query tables and one finite noise entry per right index.
abbrev TestTape (I J : Type*) (D : ℕ) := …
- abbrev
OAI.MaxCutGames.Foundations.Hastad.SourceTape.FairTestTapeline 178 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTape.expect_prodline 184 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTape.card_testTapeline 195 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTape.card_fairTestTapeline 200 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTape.expect_testTapeline 206 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTape.expect_equivTapeline 215Source 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.MaxCutGames.Foundations.Hastad.SourceTape.TestTape
- theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTape.expect_fairTestTapeline 220 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTape.expect_fairTestTape_ignoreline 229 - def
OAI.MaxCutGames.Foundations.Hastad.SourceTape.tapeQueriesline 235Source 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.MaxCutGames.Foundations.Hastad.SourceTape.TestTape, OAI.MaxCutGames.Foundations.Hastad.Cube
- theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTape.expect_tapeQueriesline 239Source 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.MaxCutGames.Foundations.Hastad.Cube, OAI.MaxCutGames.Foundations.Hastad.SourceTape.TestTape, OAI.MaxCutGames.Foundations.Hastad.SourceTape.tapeQueries, OAI.MaxCutGames.Foundations.Hastad.noiseWeight, OAI.MaxCutGames.Foundations.Hastad.thirdQuery
- def
OAI.MaxCutGames.Foundations.Hastad.SourceTape.tapeAcceptanceline 250 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTape.tapeAcceptance_eq_realizedTestAcceptanceline 256 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTape.tapeAcceptance_eq_testAcceptanceline 261 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTape.tapeAcceptance_eq_sum_div_cardline 267 - def
OAI.MaxCutGames.Foundations.Hastad.SourceTape.restrictFunctionline 279 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTape.expect_restrictFunctionline 284Source 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.MaxCutGames.Foundations.Hastad.SourceTape.restrictFunction
- def
OAI.MaxCutGames.Foundations.Hastad.SourceTape.restrictTapeline 299 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTape.expect_restrictTapeline 303 - def
OAI.MaxCutGames.Foundations.Hastad.SourceTape.restrictedProjectionline 331 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTape.restrict_realizedNoiseline 335 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTape.restrict_thirdQueryline 338 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTape.expect_restricted_queriesline 346Source 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.MaxCutGames.Foundations.Hastad.Cube, OAI.MaxCutGames.Foundations.Hastad.SourceTape.TestTape, OAI.MaxCutGames.Foundations.Hastad.SourceTape.restrictFunction, OAI.MaxCutGames.Foundations.Hastad.thirdQuery, OAI.MaxCutGames.Foundations.Hastad.SourceTape.tapeQueries, OAI.MaxCutGames.Foundations.Hastad.SourceTape.restrictedProjection
- def
OAI.MaxCutGames.Foundations.Hastad.SourceTape.restrictRightTapeline 358 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTape.expect_restrictRightTapeline 362 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTape.expect_rightRestricted_queriesline 383Source 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.MaxCutGames.Foundations.Hastad.Cube, OAI.MaxCutGames.Foundations.Hastad.SourceTape.TestTape, OAI.MaxCutGames.Foundations.Hastad.SourceTape.restrictFunction, OAI.MaxCutGames.Foundations.Hastad.thirdQuery, OAI.MaxCutGames.Foundations.Hastad.SourceTape.tapeQueries
- def
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.clauseAnswerEquivline 404Source documentation
Executable tuple encoding of the eight clause answers.
def clauseAnswerEquiv : ClauseAnswer ≃ Bool × Bool × Bool where …
- def
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.clauseAnswerFinEquivline 410 - instance
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.clauseAnswerFintypeline 416 - instance
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.clauseAnswerInhabitedline 419 - instance
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.slotFintypeline 421 - instance
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.slotInhabitedline 425 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.card_clauseAnswerline 427 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.card_slotline 431 - abbrev
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.Iline 433 - abbrev
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.Jline 434 - abbrev
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.ClauseContextline 435 - abbrev
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.VariableContextline 436 - abbrev
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.SlotContextline 437 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.card_Iline 439 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.card_Jline 440 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.card_ClauseContextline 441 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.card_VariableContextline 443 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.card_SlotContextline 445 - def
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.localConsistentline 448 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.localConsistent_eq_true_iffline 452 - def
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.validJline 460Source documentation
Satisfaction and consistency over all
3*uoccurrence slots.def validJ (F : Formula) {u : ℕ} (c : ClauseContext F u) (j : J u) : Bool := …Mentions: OAI.MaxCutGames.Foundations.Hastad.SourceContexts.ClauseContext, OAI.MaxCutGames.Foundations.Hastad.SourceContexts.J
- theorem
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.validJ_eq_true_iffline 465 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.validJ_satisfiesline 473 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.validJ_consistentline 478 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.validJ_localConsistentline 485 - def
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.canonicalSlotline 494Source documentation
First matching visible occurrence, with the third slot as an off-support default. Its inputs contain no hidden incidence choice.
def canonicalSlot {n : ℕ} (clause : Clause n) (v : Fin n) : Slot := … - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.canonicalSlot_nameline 498 - def
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.piline 510 - def
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.sampledVariablesline 514 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.sampledVariables_supportedline 518 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.sampled_eq_piline 523 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.sampled_answers_eq_of_visible_eqline 533Source documentation
Two hidden choices with the same visible variable tuple give the same selected answers for every valid label.
theorem sampled_answers_eq_of_visible_eq (F : Formula) {u : ℕ} (c : ClauseContext F u) (s s' : SlotContext u) (j : J u) (hj : validJ F c j = true) (hvisible : sampledVariables F c s = sampledVariables F c s') : (fun t => answerAt (j t) (s t)) = fun t => answerAt (j t) (s' t) := by …Mentions: OAI.MaxCutGames.Foundations.Hastad.SourceContexts.ClauseContext, OAI.MaxCutGames.Foundations.Hastad.SourceContexts.SlotContext, OAI.MaxCutGames.Foundations.Hastad.SourceContexts.J, OAI.MaxCutGames.Foundations.Hastad.SourceContexts.validJ, OAI.MaxCutGames.Foundations.Hastad.SourceContexts.sampledVariables
- def
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.honestJline 541 - def
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.honestIline 545 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.honestJ_validline 549 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.pi_honestline 561 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.pi_honest_sampledline 569 - def
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.baseAcceptsline 575 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.baseAccepts_eq_true_iffline 581 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.projection_implies_coordinate_acceptsline 589 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.baseAccepts_implies_sampledline 596 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceContexts.projection_implies_sampled_acceptsline 608Source documentation
Every coordinate of the original repeated clause-slot verifier accepts the decoded answers. Each answer tuple may depend on its whole private context.
theorem projection_implies_sampled_accepts (F : Formula) {u : ℕ} (c : ClauseContext F u) (s : SlotContext u) (i : I u) (j : J u) (hj : validJ F c j = true) (hpi : pi F c (sampledVariables F c s) j = i) : ∀ t, (localSatisfies (clauseAt F (c t)) (j t) && decide (answerAt (j t) (s t) = i t)) = true := by …Mentions: OAI.MaxCutGames.Foundations.Hastad.SourceContexts.ClauseContext, OAI.MaxCutGames.Foundations.Hastad.SourceContexts.SlotContext, OAI.MaxCutGames.Foundations.Hastad.SourceContexts.I, OAI.MaxCutGames.Foundations.Hastad.SourceContexts.J, OAI.MaxCutGames.Foundations.Hastad.SourceContexts.validJ, OAI.MaxCutGames.Foundations.Hastad.SourceContexts.pi, OAI.MaxCutGames.Foundations.Hastad.SourceContexts.sampledVariables