OAI/Computability/MaxCut/Machines/MachineExpanderTableRows.lean
73 declarations, 0 contain sorry, 0 declared as axioms
Actual execution of all expander-table positions for one vertex
The inner loop calls the complete row machine once per fixed cloud/port position. The returned state and the successful machine execution are constructed together. Neither a row execution nor an inner-loop execution is a caller premise.
- def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.singleStep_inline_MachineExpanderTableRowsline 21 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.sequence_inline_MachineExpanderTableRowsline 27 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.widen_inline_MachineExpanderTableRowsline 34 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.tableRowDataline 40 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.tableRowData_finalValueline 44 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.tableRowData_frame0line 48 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.tableRowData_finalFrameline 55 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.rowAfterStateline 68 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.rowAfterState_positionline 74 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.caller_rowAfterStateline 79 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.preparedRowInTimeline 85Source documentation
Preparation and one actual embedded row call, with the two extra tapes retained. The row value is computed from the actual old and small tables.
def preparedRowInTime (positive : 0 < d) (G : Table v (degree d)) (H : Table (cloudSize d) d) (vertex : Fin v) (state : State ρ d) (remaining : Nat) (output countSuffix result : List Bool) : StateTransition.EvalsToInTime (TM2.step (program positive H)) ⟨some (.inr .prepareRow), state, boundaryTapes vertex.val remaining (encodeWords (rotationWords G)) output countSuffix result⟩ (some ⟨some (.inr .afterRow), rowAfterState positive G H vertex state, boundaryTapes vertex.val remaining (encodeWords (rotationWords G)) ((encodeWord (rowValue G H vertex state.2)).reverse ++ output) countSuffix result⟩) (1 + 80 * ((encodeWords (rotationWords G)).length + 1)) := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.State, OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.program, OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.boundaryTapes, OAI.MaxCutGames.Foundations.Complexity.encodeWords, OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.rowAfterState, OAI.MaxCutGames.Foundations.Complexity.encodeWord
- structure
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.VertexSuffixRunline 116Source documentation
A successful suffix of the finite position loop, returning actual finite state together with the execution certificate and its preserved caller.
structure VertexSuffixRun (positive : 0 < d) (G : Table v (degree d)) (H : Table (cloudSize d) d) (vertex : Fin v) (state : State ρ d) (remaining : Nat) (output countSuffix result : List Bool) where …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.State
- def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.suffixRun_aux_inline_MachineExpanderTableRowsline 130 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.suffixInTimeline 184 - structure
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.VertexRunline 192Source documentation
The complete inner loop for one vertex, starting at position zero.
structure VertexRun (positive : 0 < d) (G : Table v (degree d)) (H : Table (cloudSize d) d) (vertex : Fin v) (state : State ρ d) (remaining : Nat) (output countSuffix result : List Bool) where …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.State
- def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.vertexInTimeline 206 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.oldTableWordline 233 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.accumulatedVerticesline 236 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.accumulatedVertices_zeroline 240 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.accumulatedVertices_succline 244 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.accumulatedVertices_fullline 250 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.vertexBodyBudgetline 255 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.vertexLoopBudgetline 258 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.vertexLoopTapesline 261 - structure
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.VertexLoopRunline 265 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.boundarySingleStep_inline_MachineExpanderTableLoopline 276 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.vertexLoopInTimeline 283Source documentation
Execute every remaining vertex in the common finite table program.
def vertexLoopInTime {v d : Nat} {ρ : Type} [Fintype ρ] (positive : 0 < d) (G : Table v (degree d)) (H : Table (cloudSize d) d) (current remaining : Nat) (state : State ρ d) (suffix : List Bool) (count : current + remaining = v) (position : state.2 = zeroPosition positive) : VertexLoopRun positive G H current remaining state suffix := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.State, OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.zeroPosition, OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.VertexLoopRun
- theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.clearRegister_positionline 341 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.clearRegister_registerline 344 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.clearRegister_idempotentline 347 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.boundaryTapes_reverse_updateline 350 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.reverseOutputTraceline 368Source documentation
Exact execution of the entire final reverse loop, including its empty test. No reversal-execution hypothesis is assumed.
theorem reverseOutputTrace (positive : 0 < d) (H : Table (cloudSize d) d) (vertex remaining : Nat) (oldTable output countSuffix result : List Bool) (state : State ρ d) : (advance (TM2.step (program positive H)))^[output.length + 1] (some ⟨some (.inr .reverseOutput), state, boundaryTapes vertex remaining oldTable output countSuffix result⟩) = some ⟨some (.inr .done), clearRegister state, boundaryTapes vertex remaining oldTable [] countSuffix (output.reverse ++ result)⟩ := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.State, OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.program, OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.boundaryTapes, OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.clearRegister
- theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.reverseOutputHaltTraceline 401Source documentation
The actual
donestatement halts one transition after reversal completes.theorem reverseOutputHaltTrace (positive : 0 < d) (H : Table (cloudSize d) d) (vertex remaining : Nat) (oldTable output countSuffix result : List Bool) (state : State ρ d) : (advance (TM2.step (program positive H)))^[output.length + 2] (some ⟨some (.inr .reverseOutput), state, boundaryTapes vertex remaining oldTable output countSuffix result⟩) = some ⟨none, clearRegister state, boundaryTapes vertex remaining oldTable [] countSuffix (output.reverse ++ result)⟩ := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.State, OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.program, OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.boundaryTapes, OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.clearRegister
- def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.reverseOutputInTimeline 416 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.reverseOutputHaltInTimeline 429 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.completeBudgetline 459 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.timeCoefficientline 462 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.timePolynomialline 465 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.vertices_le_word_lengthline 468 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.completeBudget_leline 478Source documentation
All actual loop, row, and final reversal costs are bounded quadratically.
theorem completeBudget_le {v d : Nat} (positive : 0 < d) (G : Table v (degree d)) (H : Table (cloudSize d) d) : completeBudget G H ≤ (timePolynomial d).eval (oldTableWord G).length := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.completeBudget, OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.timePolynomial, OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.oldTableWord
- structure
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.TableRunline 513 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.initializeInTime_inline_MachineExpanderTableline 525 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.tableInTimeline 544Source documentation
Construct the entire table execution from its actual initialized inputs. No row trace, loop trace, or abstract computational witness is a hypothesis.
def tableInTime {v d : Nat} {ρ : Type} [Fintype ρ] (positive : 0 < d) (G : Table v (degree d)) (H : Table (cloudSize d) d) (state : State ρ d) (suffix : List Bool) : TableRun positive G H state suffix := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.State, OAI.MaxCutGames.Foundations.Complexity.MachineExpanderTable.TableRun
- def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamily.cycleWordsline 579Source documentation
The six nonempty tape roles that may occur between expansion phases.
def cycleWords (remaining : Nat) (word current vertex count result suffix : List Bool) : Tape → List Bool | .inl (.inl .table) => word | .inl (.inl .inputVertex) => vertex | .inl (.inr .vertexCount) => count | .inl (.inr .result) => result | .inr .remainingLevel => encodeWord remaining ++ suffix | .inr .currentSize => current | _ => []Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamily.Tape, OAI.MaxCutGames.Foundations.Complexity.encodeWord
- def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamily.cycleTapesline 589 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamily.toBool_cycleTapesline 593 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamily.boundaryTapes_eq_cycleTapesline 598 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamily.copyFrameline 608 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamily.returnFrameline 613 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamily.installedFrameline 618 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamily.multipliedFrameline 622 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamily.copyFrame_eq_cycleTapesline 627 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamily.returnFrame_eq_cycleTapesline 639 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamily.copyFrame_eq_updateline 653 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamily.multipliedFrame_eq_updateline 664 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamilyBounds.resizeCostline 690 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamilyBounds.resizeCoefficientline 696 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamilyBounds.wordLength_add_one_leline 701Source documentation
The complete unary encoding, including every word delimiter, is counted.
theorem wordLength_add_one_le {v q N : Nat} (G : Table v q) (hv : v ≤ N) : (encodeWords (rotationWords G)).length + 1 ≤ (q + 1)^2 * (N + 1)^2 := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.encodeWords
- theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamilyBounds.resizeCost_leline 712 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamilyBounds.vertexCount_monotoneline 750 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamilyBounds.level_le_vertexCountline 756 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamilyBounds.resizeSumline 768 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamilyBounds.resizeSum_zeroline 771 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamilyBounds.resizeSum_succline 774 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamilyBounds.resizeSum_addline 778 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamilyBounds.familyBudgetline 783 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamilyBounds.familyBudget_zeroline 786 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamilyBounds.familyBudget_succline 789 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamilyBounds.resizeSum_leline 795 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamilyBounds.familyBudget_leline 823Source documentation
All actual resize costs plus the counted-loop overhead.
theorem familyBudget_le {d : Nat} (H : Table (cloudSize d) d) (growth : 1 < cloudSize d) (level : Nat) : familyBudget H level ≤ (resizeCoefficient d + 4) * (vertexCount (degree d) level + 1)^5 := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamilyBounds.familyBudget, OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamilyBounds.resizeCoefficient
- theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamilyBounds.paddedSize_le_succ_inputline 837 - def
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamilyBounds.inputCoefficientline 847 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamilyBounds.familyBudget_at_boundedLevel_leline 852Source documentation
For the fixed base graph, the bounded padding level has a polynomial cost in the requested unary size, including size zero.
theorem familyBudget_at_boundedLevel_le (H : Table (cloudSize PCP.Expanders.baseDegree) PCP.Expanders.baseDegree) (k : Nat) : familyBudget H (PCP.PreprocessingLevels.boundedLevel k) ≤ inputCoefficient * (k + 1)^5 := by …Mentions: OAI.MaxCutGames.Foundations.PCP.Expanders.baseDegree, OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamilyBounds.familyBudget, OAI.MaxCutGames.Foundations.PCP.PreprocessingLevels.boundedLevel, OAI.MaxCutGames.Foundations.Complexity.MachineExpanderFamilyBounds.inputCoefficient