OAI/Computability/MaxCut/PCP/Gap.lean
84 declarations, 0 contain sorry, 0 declared as axioms
An executable finite-noise denominator for a positive rational target error. Using the stored rational denominator avoids rounding, searches, and choice.
- def
OAI.MaxCutGames.Foundations.Hastad.SourceGap.ClauseGapline 15Source documentation
A clause gap includes nonemptiness: a cross-multiplied inequality alone would hold vacuously for a formula with no clauses.
def ClauseGap (F : Formula) (η : ℚ) : Prop := …
- theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGap.third_posline 20 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGap.third_le_oneline 22 - def
OAI.MaxCutGames.Foundations.Hastad.SourceGap.repetitionCountline 26Source documentation
The repetition count is computed once from the gap, target error, and noise denominator, independently of the input formula.
def repetitionCount (η ξ : ℚ) (hη : 0 < η) (hη1 : η ≤ 1) (hξ : 0 < ξ) (D : ℕ) (hD : 0 < D) : ℕ := … - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGap.repetitionCount_posline 30 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGap.repeated_game_boundline 35 - def
OAI.MaxCutGames.Foundations.Hastad.SourceGap.sourceline 52Source documentation
The actual nonempty, numbered occurrence list at the fixed parameters.
def source (η ξ : ℚ) (hη : 0 < η) (hη1 : η ≤ 1) (hξ : 0 < ξ) (D : ℕ) (hD : 0 < D) (F : Formula) : SourceEncoding.Input := … - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGap.source_completeline 56 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGap.source_soundline 69 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGap.source_sizeline 80 - def
OAI.MaxCutGames.Foundations.Hastad.SourceNoiseParameter.noiseDenominatorline 99Source documentation
A positive rational has numerator at least one, so its reciprocal denominator is no larger than the rational itself. Adding two also ensures the noise parameter is at most one half for every input.
def noiseDenominator (ξ : ℚ) : ℕ := ξ.den + 2
- theorem
OAI.MaxCutGames.Foundations.Hastad.SourceNoiseParameter.noiseDenominator_ge_twoline 101 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceNoiseParameter.noiseDenominator_posline 105 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceNoiseParameter.noiseDenominator_inv_posline 108 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceNoiseParameter.noiseDenominator_inv_le_halfline 113 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceNoiseParameter.noiseDenominator_inv_leline 120Source documentation
The actual computed reciprocal noise is below every positive target.
theorem noiseDenominator_inv_le {ξ : ℚ} (hξ : 0 < ξ) : (noiseDenominator ξ : ℚ)⁻¹ ≤ ξ := by …Mentions: OAI.MaxCutGames.Foundations.Hastad.SourceNoiseParameter.noiseDenominator
- def
OAI.MaxCutGames.Foundations.Hastad.SourceGap.forErrorline 143 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGap.forError_completeline 147 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGap.forError_soundline 156 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGap.forError_sizeline 165 - abbrev
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorContract.NonemptyFormulaline 177 - def
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorContract.inputEncodingline 179 - def
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorContract.sourceMapline 181 - def
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorContract.errorMapline 185 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorContract.inputEncoding_mkline 189 - abbrev
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorProgram.Tapeline 200 - abbrev
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorProgram.Ambientline 201 - abbrev
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorProgram.Stateline 202 - inductive
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorProgram.Labelline 206 - def
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorProgram.bodyEntryline 215 - def
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorProgram.nextline 217 - def
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorProgram.sourceStateEquivline 220 - def
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorProgram.programline 226 - def
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorProgram.mainline 243 - def
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorProgram.machineline 245 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorProgram.finite_work_alphabetsline 256 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorProgram.atCheckline 261 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorProgram.atResetline 265 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGenerator.source_initialline 281 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGenerator.initial_configurationline 285 - def
OAI.MaxCutGames.Foundations.Hastad.SourceGenerator.startupInTimeline 298 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.clauseRank_le_powerline 327 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.variableRank_le_powerline 333 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.leftValue_le_numberBoundline 340 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.rightValue_le_numberBoundline 346 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.leftBlock_le_numberBoundline 351 - def
OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.rankPolynomialline 359 - def
OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.numberPolynomialline 360 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.rankPolynomial_evalline 363 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.numberPolynomial_evalline 365 - def
OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.slotPolynomialline 369 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.slotPolynomial_evalline 376 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.slotBudget_leline 385 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.prefixBudget_leline 404 - def
OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.preparePolynomialline 418 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.preparePolynomial_evalline 423 - def
OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.setupPolynomialline 430 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.setupPolynomial_evalline 436 - def
OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.finishPolynomialline 444 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.finishPolynomial_evalline 448 - def
OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.bodyPolynomialline 454 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.setupBudget_leline 457 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.finishBudget_leline 474 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.bodyBudget_leline 482Source documentation
One fixed polynomial bounds the actual tuple-body budget for every tuple.
theorem bodyBudget_le (F : Target.Formula) (c : ClauseContext F u) : bodyBudget (D := D) F c ≤ (bodyPolynomial u D).eval (formulaBits F).length := by …Mentions: OAI.MaxCutGames.Foundations.Target.Formula, OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.bodyPolynomial
- theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.fixed_parameters_body_boundline 491 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.bodyInPolynomialTimeline 497Source documentation
The actual body execution with the same fixed polynomial for every tuple.
theorem bodyInPolynomialTime {Extra : Type} [DecidableEq Extra] (F : Target.Formula) (c : ClauseContext F u) (initialQuery : Query u D) (exit : Option (Label u D Extra)) (base : SourceRuntimeModel.Arena u Extra → List Bool) (h : Ready F c base) : Nonempty (StateTransition.EvalsToInTime (Turing.TM2.step (program initialQuery exit)) ⟨some main, SourceRuntimeModel.canonicalState initialQuery, base⟩ (some ⟨exit, SourceRuntimeModel.canonicalState initialQuery, SourceTestAppend.resultTapes SourceRuntimeModel.queryLayout base (SourceQueryOrder.tupleBits F u D c)⟩) ((bodyPolynomial u D).eval (formulaBits F).length)) := by …Mentions: OAI.MaxCutGames.Foundations.Target.Formula, OAI.MaxCutGames.Foundations.Hastad.SourceRuntimeModel.Arena, OAI.MaxCutGames.Foundations.Hastad.SourceRuntimeModel.canonicalState, OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.resultTapes, OAI.MaxCutGames.Foundations.Hastad.SourceRuntimeModel.queryLayout, OAI.MaxCutGames.Foundations.Hastad.SourceQueryOrder.tupleBits, OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.bodyPolynomial
- def
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorTraversal.accumulatorRoleline 526 - def
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorTraversal.leafTapesline 529 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorTraversal.leaf_accumulatorline 534 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorTraversal.leaf_work_blankline 538 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorTraversal.leaf_readyline 549Source documentation
Every concrete tuple and arbitrary accumulated prefix satisfies the actual body's representation invariant after startup.
theorem leaf_ready (F : Target.Formula) (c : ClauseContext F u) (output : List Bool) : SourceTupleBody.Ready F c (leafTapes (D := D) F c output) := by …Mentions: OAI.MaxCutGames.Foundations.Target.Formula, OAI.MaxCutGames.Foundations.Hastad.SourceTupleBody.Ready, OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorTraversal.leafTapes
- theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorTraversal.body_result_leafline 578Source documentation
The actual body's accumulator update has exactly the endpoint expected by the nested odometer schedule.
theorem body_result_leaf (F : Target.Formula) (c : ClauseContext F u) (output bits : List Bool) : SourceTestAppend.resultTapes queryLayout (leafTapes (D := D) F c output) bits = …Mentions: OAI.MaxCutGames.Foundations.Target.Formula, OAI.MaxCutGames.Foundations.Hastad.SourceTestAppend.resultTapes, OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorTraversal.leafTapes
- theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorTraversal.source_initialline 588 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorTraversal.actual_bodiesline 594Source documentation
The body-run premise of the odometer is discharged by the checked body machine and its fixed polynomial bound, in this same final generator program.
theorem actual_bodies (F : Target.Formula) (hD : 0 < D) : BodyTrace (SourceGeneratorProgram.program u D hD) (bodyEntry u D) (next u D 0) (initialAmbient u D hD) (accumulatorRole u D) (SourceStartup.readyTapes F) (SourceQueryOrder.tupleBits F u D) ((SourceTupleBound.bodyPolynomial u D).eval (formulaBits F).length) := by …Mentions: OAI.MaxCutGames.Foundations.Target.Formula, OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorProgram.program, OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorTraversal.accumulatorRole, OAI.MaxCutGames.Foundations.Hastad.SourceStartup.readyTapes, OAI.MaxCutGames.Foundations.Hastad.SourceQueryOrder.tupleBits, OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.bodyPolynomial
- theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorTraversal.resetDigits_readyline 618Source documentation
Startup already supplies exactly the reset odometer digits.
theorem resetDigits_ready (F : Target.Formula) : setDigits F.clauses.length (fun _ : Fin u => 0) (SourceStartup.readyTapes (u := u) (D := D) F) = SourceStartup.readyTapes F := by …Mentions: OAI.MaxCutGames.Foundations.Target.Formula, OAI.MaxCutGames.Foundations.Hastad.SourceStartup.readyTapes
- theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorTraversal.allBits_eq_recordsline 624 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorTraversal.accumulated_eq_inputline 636Source documentation
Include the exact reversed header already emitted by startup.
theorem accumulated_eq_input (F : Target.Formula) (hD : 0 < D) (hne : F.clauses ≠ []) : (allBits (SourceQueryOrder.tupleBits F u D)).reverse ++ SourceStartup.readyTapes F (accumulatorTape u D) = (MaxCutGames.Reduction.SourceEncoding.inputBits (sourceInput F u D hD)).reverse := by …Mentions: OAI.MaxCutGames.Foundations.Target.Formula, OAI.MaxCutGames.Foundations.Hastad.SourceQueryOrder.tupleBits, OAI.MaxCutGames.Foundations.Hastad.SourceStartup.readyTapes, OAI.MaxCutGames.Reduction.SourceEncoding.inputBits
- def
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorTraversal.traversalOutputline 648 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorTraversal.traversalOutput_accumulatorline 652 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorTraversal.traversalOutput_frameline 657 - def
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorTraversal.resetLabelline 662 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorTraversal.traversalInTimeline 667Source documentation
Actual traversal of every clause tuple, with each digit physically reset. All nonaccumulator tapes have exactly their startup-ready contents.
theorem traversalInTime (F : Target.Formula) (hm : 0 < F.clauses.length) (hD : 0 < D) : Nonempty (StateTransition.EvalsToInTime (TM2.step (SourceGeneratorProgram.program u D hD)) ⟨some (bodyEntry u D), (initialAmbient u D hD, none), SourceStartup.readyTapes F⟩ (some ⟨some .finishEnter, (initialAmbient u D hD, none), traversalOutput F hD⟩) (((SourceTupleBound.bodyPolynomial u D).eval (formulaBits F).length + 2 * u) * F.clauses.length ^ u)) := by …Mentions: OAI.MaxCutGames.Foundations.Target.Formula, OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorProgram.program, OAI.MaxCutGames.Foundations.Hastad.SourceStartup.readyTapes, OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorTraversal.traversalOutput, OAI.MaxCutGames.Foundations.Hastad.SourceTupleBound.bodyPolynomial
- def
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorTraversal.timePolynomialline 711 - theorem
OAI.MaxCutGames.Foundations.Hastad.SourceGeneratorTraversal.traversalInPolynomialTimeline 714