OAI/Computability/MaxCut/PCP/Folding.lean
110 declarations, 0 contain sorry, 0 declared as axioms
Explicit half-table storage, odd folding, and conditioning on the finite set of satisfying local assignments for Håstad's test.
- def
OAI.MaxCutGames.Foundations.Hastad.cubeFlipline 18 - theorem
OAI.MaxCutGames.Foundations.Hastad.cubeFlip_cubeFlipline 21 - theorem
OAI.MaxCutGames.Foundations.Hastad.bitSign_notline 25 - theorem
OAI.MaxCutGames.Foundations.Hastad.sum_cubeFlipline 28 - theorem
OAI.MaxCutGames.Foundations.Hastad.coefficient_zero_of_oddline 40 - theorem
OAI.MaxCutGames.Foundations.Hastad.coefficient_sign_zero_of_foldedline 49 - def
OAI.MaxCutGames.Foundations.Hastad.representativeline 56 - theorem
OAI.MaxCutGames.Foundations.Hastad.representative_atline 60 - theorem
OAI.MaxCutGames.Foundations.Hastad.representative_flipline 65 - abbrev
OAI.MaxCutGames.Foundations.Hastad.HalfCubeline 69 - def
OAI.MaxCutGames.Foundations.Hastad.canonicalInputline 71 - theorem
OAI.MaxCutGames.Foundations.Hastad.canonicalInput_flipline 75 - def
OAI.MaxCutGames.Foundations.Hastad.foldedAnswerline 81Source documentation
One stored bit and one explicit sign correction for every queried table.
def foldedAnswer (i₀ : I) (table : HalfCube i₀ → Bool) (f : Cube I) : Bool := …
Mentions: OAI.MaxCutGames.Foundations.Hastad.HalfCube, OAI.MaxCutGames.Foundations.Hastad.Cube
- theorem
OAI.MaxCutGames.Foundations.Hastad.foldedAnswer_flipline 85 - theorem
OAI.MaxCutGames.Foundations.Hastad.foldedAnswer_zero_coefficientline 93 - theorem
OAI.MaxCutGames.Foundations.Hastad.foldedAnswer_dictatorline 98 - def
OAI.MaxCutGames.Foundations.Hastad.coordinateMaskline 103 - def
OAI.MaxCutGames.Foundations.Hastad.cubeToggleline 105 - theorem
OAI.MaxCutGames.Foundations.Hastad.cubeToggle_twiceline 109 - theorem
OAI.MaxCutGames.Foundations.Hastad.walsh_coordinateMaskline 115 - theorem
OAI.MaxCutGames.Foundations.Hastad.walsh_cubeToggleline 125 - theorem
OAI.MaxCutGames.Foundations.Hastad.sum_cubeToggleline 130 - def
OAI.MaxCutGames.Foundations.Hastad.restrictQueryline 143 - theorem
OAI.MaxCutGames.Foundations.Hastad.restrictQuery_cubeToggleline 147 - theorem
OAI.MaxCutGames.Foundations.Hastad.conditioned_coefficient_zero_invalidline 158 - theorem
OAI.MaxCutGames.Foundations.Hastad.conditioned_coefficient_supportline 170Source documentation
Every coordinate returned from a nonzero conditioned Fourier mask is an actual valid local assignment, proved from the concrete restriction map.
theorem conditioned_coefficient_support (valid : I → Bool) (B : Cube {i : I // valid i = true} → ℝ) (s : Cube I) (hne : coefficient (fun f => B (restrictQuery valid f)) s ≠ 0) : ∀ i ∈ support s, valid i = true := by …Mentions: OAI.MaxCutGames.Foundations.Hastad.Cube, OAI.MaxCutGames.Foundations.Hastad.coefficient, OAI.MaxCutGames.Foundations.Hastad.restrictQuery, OAI.MaxCutGames.Foundations.Hastad.support
- def
OAI.MaxCutGames.Foundations.Hastad.conditionedFoldedAnswerline 180 - theorem
OAI.MaxCutGames.Foundations.Hastad.conditionedFoldedAnswer_flipline 185 - theorem
OAI.MaxCutGames.Foundations.Hastad.conditionedFoldedAnswer_zero_coefficientline 192 - theorem
OAI.MaxCutGames.Foundations.Hastad.conditionedFoldedAnswer_dictatorline 199 - def
OAI.MaxCutGames.Reduction.CloneGap.cartline 211 - theorem
OAI.MaxCutGames.Reduction.CloneGap.count_constline 214 - theorem
OAI.MaxCutGames.Reduction.CloneGap.count_cartline 218 - theorem
OAI.MaxCutGames.Reduction.CloneGap.length_cartline 229 - theorem
OAI.MaxCutGames.Reduction.CloneGap.count_cart_leftline 234 - theorem
OAI.MaxCutGames.Reduction.CloneGap.count_cart_rightline 238 - theorem
OAI.MaxCutGames.Reduction.CloneGap.count_cart_leline 242 - theorem
OAI.MaxCutGames.Reduction.CloneGap.count_union_leline 255 - theorem
OAI.MaxCutGames.Reduction.CloneGap.count_removeline 263 - abbrev
OAI.MaxCutGames.Reduction.CloneGap.Indexline 271 - def
OAI.MaxCutGames.Reduction.CloneGap.indicesline 272 - def
OAI.MaxCutGames.Reduction.CloneGap.triplesline 273 - def
OAI.MaxCutGames.Reduction.CloneGap.collisionline 274 - def
OAI.MaxCutGames.Reduction.CloneGap.distinctTriplesline 276 - theorem
OAI.MaxCutGames.Reduction.CloneGap.length_indicesline 278 - theorem
OAI.MaxCutGames.Reduction.CloneGap.length_triplesline 279 - theorem
OAI.MaxCutGames.Reduction.CloneGap.count_index_eq_leline 282 - theorem
OAI.MaxCutGames.Reduction.CloneGap.count_collision_leline 292 - theorem
OAI.MaxCutGames.Reduction.CloneGap.majority_existsline 321 - def
OAI.MaxCutGames.Reduction.CloneGap.allAgreeline 335 - theorem
OAI.MaxCutGames.Reduction.CloneGap.count_agree_distinctline 338 - structure
OAI.MaxCutGames.Reduction.CloneGap.Equationline 355 - def
OAI.MaxCutGames.Reduction.CloneGap.satisfiedline 363 - def
OAI.MaxCutGames.Reduction.CloneGap.cloneline 366 - theorem
OAI.MaxCutGames.Reduction.CloneGap.lift_preservesline 369 - theorem
OAI.MaxCutGames.Reduction.CloneGap.clone_names_distinctline 372 - theorem
OAI.MaxCutGames.Reduction.CloneGap.agree_failureline 383 - theorem
OAI.MaxCutGames.Reduction.CloneGap.failed_occurrence_clonesline 393 - def
OAI.MaxCutGames.Reduction.CloneGap.majorityBitline 409 - theorem
OAI.MaxCutGames.Reduction.CloneGap.majorityBit_countline 411 - def
OAI.MaxCutGames.Reduction.CloneGap.cloneListline 423 - theorem
OAI.MaxCutGames.Reduction.CloneGap.length_cloneListline 426 - theorem
OAI.MaxCutGames.Reduction.CloneGap.cloneList_failure_lowerline 435 - theorem
OAI.MaxCutGames.Reduction.CloneGap.clone_gapline 454 - theorem
OAI.MaxCutGames.Reduction.CloneGap.clone_completeness_countline 473 - abbrev
OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.Addressline 499Source documentation
Left and right stored tables have disjoint variable names.
abbrev Address (i₀ : I) (j₀ : J) := HalfCube i₀ ⊕ HalfCube j₀
- def
OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.storedAssignmentline 501 - def
OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.rhsCorrectionline 506Source documentation
Cancellation of the two copies of
g j₀leaves this explicit RHS.def rhsCorrection (π : J → I) (i₀ : I) (j₀ : J) (f : Cube I) (μ : Cube J) : Bool := f i₀ ^^ f (π j₀) ^^ μ j₀ …Mentions: OAI.MaxCutGames.Foundations.Hastad.Cube
- theorem
OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.correction_eqline 510 - def
OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.equationline 518Source documentation
One sampled test becomes exactly one three-occurrence equation.
def equation (π : J → I) (i₀ : I) (j₀ : J) (f : Cube I) (g μ : Cube J) : Equation (Address i₀ j₀) where …Mentions: OAI.MaxCutGames.Foundations.Hastad.Cube, OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.Address
- theorem
OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.xor_correctionsline 525 - theorem
OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.equation_satisfiedline 533Source documentation
Exact Boolean semantics, with the three stored bits read from one assignment. There is no distinct-address assumption.
theorem equation_satisfied (π : J → I) (i₀ : I) (j₀ : J) (tableA : HalfCube i₀ → Bool) (tableB : HalfCube j₀ → Bool) (f : Cube I) (g μ : Cube J) : satisfied (equation π i₀ j₀ f g μ) (storedAssignment tableA tableB) = !(foldedAnswer i₀ tableA f ^^ foldedAnswer j₀ tableB g ^^ foldedAnswer j₀ tableB (thirdQuery π f g μ)) := by …Mentions: OAI.MaxCutGames.Foundations.Hastad.HalfCube, OAI.MaxCutGames.Foundations.Hastad.Cube, OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.equation, OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.storedAssignment, OAI.MaxCutGames.Foundations.Hastad.foldedAnswer, OAI.MaxCutGames.Foundations.Hastad.thirdQuery
- theorem
OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.equation_satisfied_iffline 545 - theorem
OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.equation_indicatorline 555 - theorem
OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.satisfied_repeated_rightline 567Source documentation
Repeated variable occurrences retain XOR multiplicity and cancel in pairs.
theorem satisfied_repeated_right {Name : Type} (e : Equation Name) (assignment : Name → Bool) (h : e.second = e.third) : satisfied e assignment = (assignment e.first == e.rhs) := by … - theorem
OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.equation_repeated_rightline 575 - theorem
OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.restrict_thirdQueryline 585 - def
OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.conditionedEquationline 593Source documentation
Conditioned storage uses only satisfying-assignment coordinates, so identical restricted canonical inputs are the same variable, even for distinct raw queries.
def conditionedEquation (valid : J → Bool) (π : J → I) (i₀ : I) (j₀ : {j : J // valid j = true}) (f : Cube I) (g μ : Cube J) : Equation (Address i₀ j₀) := …Mentions: OAI.MaxCutGames.Foundations.Hastad.Cube, OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.Address
- theorem
OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.conditionedEquation_rhsline 599 - theorem
OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.conditionedEquation_satisfiedline 605 - theorem
OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.conditionedEquation_satisfied_iffline 617 - theorem
OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.conditionedEquation_indicatorline 628 - theorem
OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.conditionedEquation_repeated_rightline 641 - def
OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.equationAcceptanceline 655Source documentation
Actual weighted acceptance of the emitted equation family.
def equationAcceptance (ε : ℝ) (π : J → I) (i₀ : I) (j₀ : J) (tableA : HalfCube i₀ → Bool) (tableB : HalfCube j₀ → Bool) : ℝ := … - theorem
OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.equationAcceptance_eqline 661 - def
OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.conditionedEquationAcceptanceline 668 - theorem
OAI.MaxCutGames.Foundations.Hastad.FoldedEquation.conditionedEquationAcceptance_eqline 675 - def
OAI.MaxCutGames.Foundations.Hastad.mapEquationline 701Source documentation
Rename the three occurrences without merging or dropping any occurrence.
def mapEquation {Name Name' : Type} (rename : Name → Name') (e : Equation Name) : Equation Name' where … - theorem
OAI.MaxCutGames.Foundations.Hastad.satisfied_mapEquationline 708 - abbrev
OAI.MaxCutGames.Foundations.Hastad.EmptyContext.Addressline 717Source documentation
A left half-table address or the one dummy address.
abbrev Address (i₀ : I) := HalfCube i₀ ⊕ Unit
- def
OAI.MaxCutGames.Foundations.Hastad.EmptyContext.storedAssignmentline 719 - def
OAI.MaxCutGames.Foundations.Hastad.EmptyContext.equationline 723Source documentation
The dummy appears twice. Its assigned bit cancels in the equation.
def equation (i₀ : I) (f : Cube I) : Equation (Address i₀) where …
Mentions: OAI.MaxCutGames.Foundations.Hastad.Cube, OAI.MaxCutGames.Foundations.Hastad.EmptyContext.Address
- theorem
OAI.MaxCutGames.Foundations.Hastad.EmptyContext.equation_second_eq_thirdline 730 - theorem
OAI.MaxCutGames.Foundations.Hastad.EmptyContext.equation_satisfiedline 735Source documentation
Exact semantics for every assignment, including an arbitrary dummy bit.
theorem equation_satisfied (i₀ : I) (assignment : Address i₀ → Bool) (f : Cube I) : satisfied (equation i₀ f) assignment = !(foldedAnswer i₀ (fun h => assignment (.inl h)) f) := by …Mentions: OAI.MaxCutGames.Foundations.Hastad.EmptyContext.Address, OAI.MaxCutGames.Foundations.Hastad.Cube, OAI.MaxCutGames.Foundations.Hastad.EmptyContext.equation, OAI.MaxCutGames.Foundations.Hastad.foldedAnswer
- theorem
OAI.MaxCutGames.Foundations.Hastad.EmptyContext.equation_storedAssignment_satisfiedline 744 - theorem
OAI.MaxCutGames.Foundations.Hastad.EmptyContext.equation_flip_firstline 751Source documentation
Flipping the query preserves all three addresses and reverses the RHS.
theorem equation_flip_first (i₀ : I) (f : Cube I) : (equation i₀ (cubeFlip f)).first = (equation i₀ f).first := by …Mentions: OAI.MaxCutGames.Foundations.Hastad.Cube, OAI.MaxCutGames.Foundations.Hastad.EmptyContext.equation, OAI.MaxCutGames.Foundations.Hastad.cubeFlip
- theorem
OAI.MaxCutGames.Foundations.Hastad.EmptyContext.equation_flip_rhsline 757 - theorem
OAI.MaxCutGames.Foundations.Hastad.EmptyContext.equation_satisfied_flipline 761 - def
OAI.MaxCutGames.Foundations.Hastad.EmptyContext.pairedEquationsline 768Source documentation
The two opposite queries give an explicit balanced list of equations.
def pairedEquations (i₀ : I) (f : Cube I) : List (Equation (Address i₀)) := …
Mentions: OAI.MaxCutGames.Foundations.Hastad.Cube, OAI.MaxCutGames.Foundations.Hastad.EmptyContext.Address
- theorem
OAI.MaxCutGames.Foundations.Hastad.EmptyContext.pairedEquations_lengthline 772 - theorem
OAI.MaxCutGames.Foundations.Hastad.EmptyContext.pairedEquations_ne_nilline 776 - theorem
OAI.MaxCutGames.Foundations.Hastad.EmptyContext.pairedEquations_acceptedCountline 781Source documentation
Exactly one actual equation in the pair accepts every fixed proof.
theorem pairedEquations_acceptedCount (i₀ : I) (assignment : Address i₀ → Bool) (f : Cube I) : (pairedEquations i₀ f).countP (fun e => satisfied e assignment) = 1 := by …Mentions: OAI.MaxCutGames.Foundations.Hastad.EmptyContext.Address, OAI.MaxCutGames.Foundations.Hastad.Cube, OAI.MaxCutGames.Foundations.Hastad.EmptyContext.pairedEquations
- theorem
OAI.MaxCutGames.Foundations.Hastad.EmptyContext.pairedEquations_failureCountline 788 - def
OAI.MaxCutGames.Foundations.Hastad.EmptyContext.equationAcceptanceline 796 - def
OAI.MaxCutGames.Foundations.Hastad.EmptyContext.equationBiasline 799 - theorem
OAI.MaxCutGames.Foundations.Hastad.EmptyContext.foldedMean_eq_zeroline 802 - theorem
OAI.MaxCutGames.Foundations.Hastad.EmptyContext.equation_indicatorline 807 - theorem
OAI.MaxCutGames.Foundations.Hastad.EmptyContext.equationAcceptance_eq_halfline 815Source documentation
Uniform queries accept with probability exactly one half. No right folding anchor, valid right assignment, or placeholder response is assumed.
theorem equationAcceptance_eq_half (i₀ : I) (assignment : Address i₀ → Bool) : equationAcceptance i₀ assignment = 1 / 2 := by …Mentions: OAI.MaxCutGames.Foundations.Hastad.EmptyContext.Address, OAI.MaxCutGames.Foundations.Hastad.EmptyContext.equationAcceptance
- theorem
OAI.MaxCutGames.Foundations.Hastad.EmptyContext.equationBias_eq_zeroline 823Source documentation
The signed acceptance of the actual emitted equations has zero bias.
theorem equationBias_eq_zero (i₀ : I) (assignment : Address i₀ → Bool) : equationBias i₀ assignment = 0 := by …Mentions: OAI.MaxCutGames.Foundations.Hastad.EmptyContext.Address, OAI.MaxCutGames.Foundations.Hastad.EmptyContext.equationBias
- theorem
OAI.MaxCutGames.Foundations.Hastad.EmptyContext.mapped_equationAcceptance_eq_halfline 834