OAI/Computability/UniqueGames/Machines/MachinePaddingRowsLemmas.lean
39 declarations, 0 contain sorry, 0 declared as axioms
Polynomial bounds for the actual outer padding-loop recurrence. No
execution or cost premise is introduced: the recurrence is the one matched
to the concrete machine by MachinePaddingRows.loopTrace.
- inductive
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.Controlline 10 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.Control.enumListline 14 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.Control.enumList_getElem?_ctorIdx_eqline 16 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.Control.enumList_nodupline 20 - instance
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.(instance at line 22)line 22 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.Tapeline 26 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.Labelline 27 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.Alphabetline 28 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.Stateline 30 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.bodyEntryline 32 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.extraline 35 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.programline 46 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.tapesline 49 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.cfgline 53 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.bodyTraceline 57 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.guard_succline 75 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.guard_zeroline 86 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.bump_stepline 97 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.paddingBitsline 109 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.stepsline 113 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.loopTraceline 120Source documentation
The entire varying-length padding loop is proved from its actual guards, actual row bodies and actual vertex increments.
theorem loopTrace (d : Nat) (hd : 0 < d) (count v e : Nat) (output : List Bool) : (advance (TM2.step (program d hd)))^[steps d v e output count] (some (cfg d (some (.inr .guard)) v e count output)) = some (cfg d none (v + count) (e + count * d) 0 (output ++ paddingBits d v e count)) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.program, OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.steps, OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.cfg, OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.paddingBits
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.initialTapesline 142 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.initialize_stepline 145 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.paddingTraceline 160 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.machineline 167 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.executionline 180Source documentation
The exact time count is the sum of the physically executed row loops. Its polynomial bound is derived separately from this recurrence.
def execution (d : Nat) (hd : 0 < d) (count v e : Nat) (output : List Bool) : StateTransition.EvalsToInTime (machine d hd).step ⟨some (.inr .initialize), (((), none), ()), initialTapes v e count output⟩ (some (cfg d none (v + count) (e + count * d) 0 (output ++ paddingBits d v e count))) (steps d v e output count + 1) where …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.machine, OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.initialTapes, OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.cfg, OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.paddingBits, OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.steps
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingBounds.rowsBits_length_leline 201Source documentation
All rows in a fixed block are bounded by its last possible index.
theorem rowsBits_length_le (v e count : Nat) : (MachineDummyRows.rowsBits v e count).length ≤ count * (v + e + count + 8194) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineDummyRows.rowsBits
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingBounds.rowBoundline 217Source documentation
A common row-size bound for all remaining vertices and ports.
def rowBound (d v e count : Nat) : Nat := v + count + e + (count + 1) * d + 8194
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingBounds.rowBound_nextline 221Source documentation
This bound is invariant when one vertex and its
dreverse indices have been consumed from the remaining outer-loop count.theorem rowBound_next (d v e count : Nat) : rowBound d (v + 1) (e + d) count = rowBound d v e (count + 1) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingBounds.rowBound
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingBounds.blockRow_le_rowBoundline 226 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingBounds.steps_le_boundline 233Source documentation
The actual outer-loop cost is bounded by the number of vertices times a uniform bound on its actual row bodies and two control transitions.
theorem steps_le_bound (d v e : Nat) (output : List Bool) (count : Nat) : MachinePaddingRows.steps d v e output count ≤ count * (d * (4 * rowBound d v e count + 2 * (output.length + count * d * rowBound d v e count) + 10) + 2) + 1 := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingRows.steps, OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingBounds.rowBound
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingBounds.inputSizeline 284Source documentation
Exact variable-size input: two unary fields, unary fuel, and old output.
def inputSize (v e count : Nat) (output : List Bool) : Nat := …
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingBounds.rowCapline 287 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingBounds.rowBound_le_capline 289 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingBounds.rowPolynomialline 302 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingBounds.timePolynomialline 307Source documentation
A cubic polynomial for fixed degree, including the final zero-fuel guard. The one-time relation initializer can be accounted for separately.
noncomputable def timePolynomial (d : Nat) : Polynomial Nat := …
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingBounds.timePolynomial_boundsline 313 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingCertificate.timePolynomialline 344 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachinePaddingCertificate.executionline 347