OAI/Computability/UniqueGames/Machines/MachineExpanderTableProgramLemmas.lean
102 declarations, 0 contain sorry, 0 declared as axioms
- inductive
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.ExtraTapeline 15 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.ExtraTape.enumListline 19 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.ExtraTape.enumList_getElem?_ctorIdx_eqline 21 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.ExtraTape.enumList_nodupline 25 - instance
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.(instance at line 27)line 27 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.Tapeline 31 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.Alphabetline 33 - instance
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.alphabetFintypeline 37 - inductive
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.OuterLabelline 40 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.OuterLabel.enumListline 44 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.OuterLabel.enumList_getElem?_ctorIdx_eqline 47 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.OuterLabel.enumList_nodupline 51 - instance
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.(instance at line 53)line 53 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.Labelline 57 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.Positionline 58 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.Stateline 59 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.RowStatePrefixline 60 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.guardStatesline 64Source documentation
Static movement of the bit register to the last product coordinate.
def guardStates (ρ : Type) (d : Nat) : ((RowStatePrefix ρ d × Position d) × Option Bool) ≃ State ρ d where …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.RowStatePrefix, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.Position, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.State
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.guardStates_applyline 71 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.guardStates_symm_applyline 75 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.rowFactor_posline 78 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.zeroPositionline 82 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.nextPositionline 85 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.positionPairline 88 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.callerline 91 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.boundaryStateline 94Source documentation
A fresh row call, with its residue and bit register reset.
def boundaryState {ρ : Type} {d : Nat} (positive : 0 < d) (H : Table (cloudSize d) d) (ambient : ρ) (p : Position d) : State ρ d := …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.Position, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.State
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.initialStateline 99 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.prepareStateline 103 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.resetStateline 107 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.clearRegisterline 111 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.advancePositionStateline 114 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.resetPositionStateline 117 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.vertexGuardCoreline 123Source documentation
The unary guard specialized to the concrete extra tape. The zero delimiter is retained; both branches clear the bit register. Its dependent alphabet is the same alphabet used by the embedded row program.
def vertexGuardCore {ρ : Type} {d : Nat} : TM2.Stmt Alphabet (Label d) ((RowStatePrefix ρ d × Position d) × Option Bool) := …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.Alphabet, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.Label, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.RowStatePrefix, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.Position
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.outerStatementline 135Source documentation
Actual statements for the table loop. No unbounded natural number is stored in the state or evaluated by a state-update function.
def outerStatement {d : Nat} (positive : 0 < d) (H : Table (cloudSize d) d) : OuterLabel → TM2.Stmt Alphabet (Label d) (State ρ d) | .initialize => .push (.inl .inputVertex) (fun _ => false) (.load (resetState positive H) (.goto fun _ => .inr .vertexGuard)) | .vertexGuard => MachineControl.statement id (guardStates ρ d) vertexGuardCore | .prepareRow => .load (prepareState positive H) (.goto fun _ => .inl .initialize) | .afterRow => .branch (fun s => decide (s.2.val + 1 < rowFactor d)) (.load (advancePositionState positive) (.goto fun _ => .inr .prepareRow)) (.push (.inl .inputVertex) (fun _ => true) …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.OuterLabel, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.Alphabet, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.Label, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.State, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.resetState, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineControl.statement, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.guardStates, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.vertexGuardCore, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.prepareState, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.advancePositionState
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.rowReturnline 155 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.programline 159Source documentation
The complete finite program. The vertex count is supplied on a tape, while the small table and all finite control types depend only on fixed
d.def program {d : Nat} (positive : 0 < d) (H : Table (cloudSize d) d) : Label d → TM2.Stmt Alphabet (Label d) (State ρ d) := …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.Label, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.Alphabet, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.State
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.program_rowline 164 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.program_outerline 170 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.rowExecutionline 176Source documentation
Every transition of an actual row run embeds with its original cost, preserving the position and both extra tapes, including its return jump.
def rowExecution {d : Nat} (positive : 0 < d) (H : Table (cloudSize d) d) (position : Position d) (extra : ExtraTape → List Bool) {a b : TM2.Cfg (fun _ : MachineExpanderRow.Tape => Bool) (MachineExpanderRow.Label d) (MachineExpanderRow.State ρ d)} {budget : Nat} (execution : StateTransition.EvalsToInTime (TM2.step (MachineExpanderRow.program positive H)) a (some b) budget) : StateTransition.EvalsToInTime (TM2.step (program positive H)) (MachineEmbedding.configuration (rowReturn d) position extra a) (some (MachineEmbedding.configuration (rowReturn d) position extra b)) budget := …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.Position, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.ExtraTape, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderRow.Tape, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderRow.Label, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderRow.State, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderRow.program, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.program, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineEmbedding.configuration, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.rowReturn
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.rowExecution_stepsline 188 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.rowTapesline 196 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.extraTapesline 202 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.boundaryTapesline 206 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.initialTapesline 212Source documentation
Before initialization, only the old table and remaining-count word are populated. The program itself creates the initial vertex delimiter.
def initialTapes (vertices : Nat) (oldTable countSuffix : List Bool) : (tape : Tape) → List (Alphabet tape) := …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.Tape, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.Alphabet
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderTable.finalTapesline 218 - inductive
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.ExtraTapeline 229 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.ExtraTape.enumListline 233 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.ExtraTape.enumList_getElem?_ctorIdx_eqline 236 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.ExtraTape.enumList_nodupline 240 - instance
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.(instance at line 242)line 242 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.Tapeline 246 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.Alphabetline 247 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.BoolAlphabetline 249 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.alphabet_eqline 253Source documentation
All physical tapes contain Booleans. This equality changes the static type presentation only; no runtime symbol conversion is performed.
theorem alphabet_eq : Alphabet = BoolAlphabet := by …
Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.Alphabet, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.BoolAlphabet
- instance
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.alphabetFintypeline 259 - inductive
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.AffinePhaseline 263 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.AffinePhase.enumListline 267 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.AffinePhase.enumList_getElem?_ctorIdx_eqline 269 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.AffinePhase.enumList_nodupline 273 - instance
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.(instance at line 275)line 275 - inductive
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.AffineLabelline 279 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.AffineLabel.enumListline 283 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.AffineLabel.enumList_getElem?_ctorIdx_eqline 285 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.AffineLabel.enumList_nodupline 289 - instance
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.(instance at line 291)line 291 - inductive
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.OuterLabelline 295 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.Labelline 303 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.Stateline 304 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.RegisterAmbientline 305 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.registerStatesline 308 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.registerStates_applyline 315 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.registerStates_symm_applyline 319 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.callerline 322 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.initialStateline 325 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.normalizeStateline 329 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.initialEncodingline 333 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.initialEncoding_eq_familyline 336Source documentation
The literal used by initialization is exactly the actual family's base.
theorem initialEncoding_eq_family {d : Nat} (H : Table (cloudSize d) d) : initialEncoding d = encodeWords (rotationWords (family H 0)) := rflMentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.initialEncoding, OAI.UniqueGamesTheorem.Foundations.Complexity.encodeWords
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.tableTapeline 339 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.inputVertexTapeline 340 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.vertexCountTapeline 341 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.resultTapeline 342 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.affineSourceline 344 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.affineDestinationline 348 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.affineCoefficientline 352 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.affineExitline 356 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.affineStatementline 360 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.drainStatementline 378 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.boolOuterStatementline 388Source documentation
Uniform-alphabet presentation of the actual outer code. All arithmetic parameters here are fixed program constants; runtime sizes are scanned.
def boolOuterStatement {d : Nat} (positive : 0 < d) (H : Table (cloudSize d) d) : OuterLabel → TM2.Stmt BoolAlphabet (Label d) (State ρ d) | .initialize => Reduction.MachineSubstitution.pushWord tableTape (initialEncoding d).reverse (Reduction.MachineSubstitution.pushWord (.inr .currentSize) (encodeWord 1).reverse (.load (normalizeState positive H) (.goto fun _ => .inr .levelGuard))) | .levelGuard => MachineControl.statement id (registerStates ρ d) (MachineUnaryCounter.guard (K := Tape) (Λ := Label d) (σ := RegisterAmbient ρ d) …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.OuterLabel, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.BoolAlphabet, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.Label, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.State, OAI.UniqueGamesTheorem.Reduction.MachineSubstitution.pushWord, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.tableTape, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.initialEncoding, OAI.UniqueGamesTheorem.Foundations.Complexity.encodeWord, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.normalizeState, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineControl.statement, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.registerStates, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryCounter.guard, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.Tape, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.RegisterAmbient
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.outerStatementline 417 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.tableReturnline 421 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.programline 423 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.program_tableline 428 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.program_outerline 435 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.boolViewline 439 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.boolView_outerline 443 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.tableExecutionline 452 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.tableExecution_stepsline 464 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.tableFrameline 473 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.extraFrameline 479 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.boundaryTapesline 484 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.initialTapesline 488 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineExpanderFamily.familyTapesline 495