OAI/Computability/UniqueGames/Machines/GraphCounterStartLemmas.lean
78 declarations, 0 contain sorry, 0 declared as axioms
Actual archive-copy and unary-header addition before the embedded logarithm machine. The two header values stay on tapes; they never enter finite control.
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.GraphCounterModel.startExtraline 22 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.GraphCounterModel.startMemoryline 27 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.GraphCounterModel.startMemory_input_updateline 31 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.GraphCounterModel.startMemory_sum_updateline 39 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.GraphCounterModel.headerStep_zeroline 47 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.GraphCounterModel.headerStep_succline 61 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.GraphCounterModel.headerTraceline 78 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.GraphCounterModel.headerInTimeline 95 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.GraphCounterModel.initialMemoryline 107 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.GraphCounterModel.clockInitialMemoryline 117 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.GraphCounterModel.startInTimeline 132Source documentation
Exact handoff from the genuine machine input to the actual logarithm machine, with the original graph word protected in the archive.
def startInTime (n m : Nat) (rest : List Bool) : StateTransition.EvalsToInTime machine.step (initList machine (encodeWords [n, m] ++ rest)) (some (clockConfiguration (startExtra rest (encodeWords [n, m] ++ rest)) none (initList MachineLogCounter.machine (encodeWord (n + m))))) (2 * ((encodeWords [n, m] ++ rest).length + 1) + 1 + (n + 1) + (m + 1)) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.GraphCounterModel.machine, OAI.UniqueGamesTheorem.Foundations.Complexity.encodeWords, OAI.UniqueGamesTheorem.Foundations.Complexity.GraphCounterModel.clockConfiguration, OAI.UniqueGamesTheorem.Foundations.Complexity.GraphCounterModel.startExtra, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.machine, OAI.UniqueGamesTheorem.Foundations.Complexity.encodeWord
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.GraphCounterPrefix.rawOutputline 201 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.GraphCounterPrefix.rawInTimeline 204 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.GraphCounterPrefix.countline 228 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.GraphCounterPrefix.outputline 230 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.GraphCounterPrefix.rowsBitsline 233 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.GraphCounterPrefix.tableBits_decompositionline 236 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.GraphCounterPrefix.outputsInTimeline 240 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.GraphCounterPrefix.computableInPolyTimeline 246 - inductive
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineOdometerInit.Tapeline 271 - inductive
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineOdometerInit.Labelline 275 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineOdometerInit.labelAtline 282 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineOdometerInit.statementline 287Source documentation
Place one of finitely many actual statements into an arbitrary ambient Boolean-tape program, preserving the ambient state component.
def statement (tape : Tape k → K) (labels : Label k → Λ) (exit : Option Λ) : Label k → TM2.Stmt (fun _ : K => Bool) Λ (σ × Option Bool) | .seed j => .push (tape (.current j)) (fun _ => false) (.goto (fun _ => labels (.copyOut j))) | .copyOut j => Reduction.MachineTransfer.loopAt (tape .radix) (tape .scratch) id false (labels (.copyOut j)) (some (labels (.copyBack j))) | .copyBack j => MachineCopy.forkLoop (tape .scratch) (tape .radix) (tape (.remaining j)) false (labels (.copyBack j)) (some (labels (.trim j))) | .trim j => .pop (tape (.remaining j)) (fun state _ => state) (.goto (fun _ => labelAt labels (j.val+1))) | .done => .load (fun state => (state.1,none)) (Reduction.MachineTransfer.exitAt (tape .radix) exit)Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineOdometerInit.Tape, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineOdometerInit.Label, OAI.UniqueGamesTheorem.Reduction.MachineTransfer.loopAt, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineCopy.forkLoop, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineOdometerInit.labelAt, OAI.UniqueGamesTheorem.Reduction.MachineTransfer.exitAt
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineOdometerInit.digitOutputline 300 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineOdometerInit.digitOutput_frameline 305 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineOdometerInit.digitInTimeline 315 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineOdometerInit.stageTapesline 366 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineOdometerInit.stageTapes_frameline 371 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineOdometerInit.stageTapes_currentline 383 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineOdometerInit.stageTapes_remainingline 406 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineOdometerInit.prefixInTimeline 429Source documentation
Place the actual finite initialization prefix inside an ambient program.
def prefixInTime (m : Nat) (hm : 0 < m) (base : K → List Bool) (hradix : base (tape .radix) = encodeWord m) (hcurrent : ∀j, base (tape (.current j)) = []) (hremaining : ∀j, base (tape (.remaining j)) = []) (hscratch : base (tape .scratch) = []) (ambient : σ) (r : Nat) (hr : r ≤ k) : StateTransition.EvalsToInTime (TM2.step program) ⟨some (labelAt labels 0),(ambient,none),base⟩ (some ⟨some (labelAt labels r),(ambient,none),stageTapes tape m base r⟩) (r*(2*m+6)) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.encodeWord, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineOdometerInit.labelAt, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineOdometerInit.stageTapes
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineOdometerInit.initializeInTimeline 463Source documentation
Complete actual initialization, including width zero and the optional continuation. The radix, scratch, ambient state and unrelated tapes survive.
def initializeInTime (m : Nat) (hm : 0 < m) (base : K → List Bool) (hradix : base (tape .radix) = encodeWord m) (hcurrent : ∀j, base (tape (.current j)) = []) (hremaining : ∀j, base (tape (.remaining j)) = []) (hscratch : base (tape .scratch) = []) (ambient : σ) : StateTransition.EvalsToInTime (TM2.step program) ⟨some (labelAt labels 0),(ambient,none),base⟩ (some ⟨exit,(ambient,none),stageTapes tape m base k⟩) (k*(2*m+6)+1) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.encodeWord, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineOdometerInit.labelAt, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineOdometerInit.stageTapes
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineOdometerInit.output_currentline 486 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineOdometerInit.output_remainingline 492 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineOdometerInit.output_radixline 498 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineOdometerInit.output_scratchline 504 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRegisterEmit.Alphabetline 518 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRegisterEmit.finishline 520 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRegisterEmit.emitStatementline 526Source documentation
The fixed literal push chain executes in one TM2 transition.
def emitStatement (destination : K) (offset : Nat) (exit : Option Λ) : TM2.Stmt (Alphabet (K := K)) Λ (σ × Option Bool) := …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRegisterEmit.Alphabet
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRegisterEmit.emitStepline 530 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRegisterEmit.prefix_encodeWordline 541 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRegisterEmit.registerEmitTraceline 546Source documentation
Caller-program form of the full exact trace. No execution premise is used.
theorem registerEmitTrace (source destination scratch : K) (sourceDestination : source ≠ destination) (sourceScratch : source ≠ scratch) (destinationScratch : destination ≠ scratch) (offset : Nat) (firstLabel secondLabel emitLabel : Λ) (exit : Option Λ) (program : Λ → TM2.Stmt (Alphabet (K := K)) Λ (σ × Option Bool)) …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRegisterEmit.program, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRegisterEmit.Alphabet
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRegisterEmit.registerEmitInTimeline 576Source documentation
Timed witness retaining the exact
2*n+5-transition execution.def registerEmitInTime (source destination scratch : K) (sourceDestination : source ≠ destination) (sourceScratch : source ≠ scratch) (destinationScratch : destination ≠ scratch) (offset : Nat) (firstLabel secondLabel emitLabel : Λ) (exit : Option Λ) (program : Λ → TM2.Stmt (Alphabet (K := K)) Λ (σ × Option Bool)) …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRegisterEmit.program, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRegisterEmit.Alphabet
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRegisterEmit.programline 600Source documentation
The three labels are transfer, restore-and-copy, and fixed-offset emission.
def program (source destination scratch : K) (offset : Nat) (exit : Option (Fin 3)) : Fin 3 → TM2.Stmt (Alphabet (K := K)) (Fin 3) (σ × Option Bool) := …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRegisterEmit.Alphabet
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRegisterEmit.programInTimeline 608 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRegisterEmit.machineline 624Source documentation
Three Boolean stacks, three labels, and one optional Boolean register.
def machine (offset : Nat) : FinTM2 where …
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRegisterEmit.machineInTimeline 635 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRegisterEmit.emitStatement_pushesline 647 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRegisterEmit.program_pushes_leline 653 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRegisterEmit.machine_pushes_leline 667Source documentation
The fixed offset is included in the finite program's push bound.
theorem machine_pushes_le (offset : Nat) : Runtime.programPushBound (machine offset) ≤ max 2 offset := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.Runtime.programPushBound, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineRegisterEmit.machine
- abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.Tapeline 693 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.Symbolsline 694 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.Labelline 697 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.Registerline 698 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.Stateline 699 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.firstStatesline 701 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.secondStatesline 708 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.secondLabelsline 715 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.bridgeLabelline 721 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.firstStatementline 724 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.secondStatementline 729 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.programline 737 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.machineline 753 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.firstConfigurationline 780 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.secondConfigurationline 786 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.firstStepline 795 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.secondStepline 825 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.firstConfiguration_initline 850 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.secondConfiguration_haltline 867 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.temporaryTapesline 885 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.temporaryConfigurationline 891 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.firstTransfer_tapesline 896 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.secondTransfer_tapesline 915 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.firstTransferline 938 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.secondTransferline 959 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.executeline 977Source documentation
An execution of each component yields an actual execution of the combined machine. The two transfer loops add exactly twice the intermediate length plus two.
def execute (first second : FinTM2) (relabel : first.Γ first.k₁ → second.Γ second.k₀) (fallback : second.Γ second.k₀) (input : List (first.Γ first.k₀)) (middle : List (first.Γ first.k₁)) (output : List (second.Γ second.k₁)) (firstBudget secondBudget : Nat) (runFirst : TM2OutputsInTime first input (some middle) firstBudget) (runSecond : TM2OutputsInTime second (middle.map relabel) (some output) secondBudget) : TM2OutputsInTime (machine first second relabel fallback) input (some output) (firstBudget + 2 * (middle.length + 1) + secondBudget) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.machine
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.composeline 1010Source documentation
General sequential composition with an explicit symbol of the intermediate alphabet to totalize the bridge's unused empty-register expression. Its time polynomial uses the transition-derived output-length bound of the first machine.
noncomputable def compose {α β γ αΓ βΓ γΓ : Type} {ea : α → List αΓ} {eb : β → List βΓ} {ec : γ → List γΓ} {f : α → β} {g : β → γ} (first : TM2ComputableInPolyTime ea eb f) (second : TM2ComputableInPolyTime eb ec g) (fallback : βΓ) : TM2ComputableInPolyTime ea ec (fun a => g (f a)) := by … - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineSequential.composeBitsline 1057