OAI/Computability/MaxCut/Machines/MachineCloudPrefix.lean
77 declarations, 0 contain sorry, 0 declared as axioms
- inductive
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.Tapeline 13 - inductive
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.Labelline 18 - abbrev
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.Alphabetline 24 - abbrev
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.Stateline 25 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.memoryline 27 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.frameline 34 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.frame_queryline 37 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.frame_countline 39 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.frame_powerline 41 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.frame_levelline 43 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.frame_boundline 45 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.frame_remainingline 47 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.frame_totalline 49 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.update_frame_queryline 52 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.update_frame_countline 60 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.update_frame_powerline 68 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.update_frame_levelline 76 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.update_frame_remainingline 84 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.update_frame_totalline 88 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.paddingViewline 93 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.paddingView_leftline 97 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.paddingView_rightline 99 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.placedTapesline 103 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.programline 110 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.appendTrace_inline_MachineCloudPrefixline 126 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.paddingTraceline 132Source documentation
The inner program is embedded with its actual table scan and geometric search; all three additional tapes are preserved by every inner transition.
theorem paddingTrace (t : GraphTables.Table) (v : Fin t.vertices) (bound remaining total : List Bool) (ambient : σ) (register : Option Bool) : (advance (TM2.step program))^[MachineCloudPadding.totalTime t v] (some ⟨some (.padding .init), ((ambient, false), register), frame (GraphTables.tableBits t) (encodeWord v.val) [] [] [] bound remaining total⟩) = some ⟨some .add, ((ambient, false), none), frame (GraphTables.tableBits t) (encodeWord v.val) (encodeWord (PreprocessingCloudIndex.cloudSize t v)) (encodeWord (MachineCloudPadding.padding (PreprocessingCloudIndex.cloudSize t v))) (encodeWord (PreprocessingLevels.boundedLevel (PreprocessingCloudIndex.cloudSize t v))) bound remaining total⟩ := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.program, OAI.MaxCutGames.Foundations.Complexity.MachineCloudPadding.totalTime, OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.frame, OAI.MaxCutGames.Foundations.Complexity.encodeWord, OAI.MaxCutGames.Foundations.Complexity.MachineCloudPadding.padding
- theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.incrementStepline 150 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.bodyTimeline 159 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.bodyTraceline 167Source documentation
Padding tallies are consumed by unary addition; count and level fields are scanned away, and the remaining zero padding delimiter is removed while the physical vertex counter increases.
theorem bodyTrace (t : GraphTables.Table) (v : Fin t.vertices) (bound remaining : List Bool) (acc : Nat) (ambient : σ) (register : Option Bool) : (advance (TM2.step program))^[bodyTime t v] (some ⟨some (.padding .init), ((ambient, false), register), frame (GraphTables.tableBits t) (encodeWord v.val) [] [] [] bound remaining (encodeWord acc)⟩) = some ⟨some .guard, ((ambient, false), none), frame (GraphTables.tableBits t) (encodeWord (v.val + 1)) [] [] [] bound remaining (encodeWord (MachineCloudPadding.padding (PreprocessingCloudIndex.cloudSize t v) + acc))⟩ := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.program, OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.bodyTime, OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.frame, OAI.MaxCutGames.Foundations.Complexity.encodeWord, OAI.MaxCutGames.Foundations.Complexity.MachineCloudPadding.padding
- theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.guardStep_succline 209 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.guardStep_zeroline 219 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.zeroTraceline 227 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.amountline 241 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.cycleTimeline 244 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.sumFromline 247 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.loopTimeline 251 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.loopTraceline 255 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.sumFrom_listline 286 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.sumFrom_eq_offsetline 308 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.initStepline 317 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.totalTimeline 324 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.prefixTraceline 327 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.cycleBudgetline 357Source documentation
Uniform budget for one vertex iteration, including unary addition and cleanup. Its input argument bounds the complete table length.
def cycleBudget (L : Nat) : Nat := …
- theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.bodyTime_leline 361 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.loopTime_leline 389 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.inputLengthline 402 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.timePolynomialline 405 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.totalTime_leline 414Source documentation
The full execution has a cubic polynomial bound in the two actual preserved input words. The accumulator is never scanned to perform addition.
theorem totalTime_le (t : GraphTables.Table) (b : Nat) (hb : b ≤ t.vertices) (suffix : List Bool) : totalTime t b suffix ≤ timePolynomial.eval (inputLength t b suffix) := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.totalTime, OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.inputLength
- def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.prefixInTimeline 434 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.all_padding_sumline 451Source documentation
At the complete vertex bound the output is the sum of all padding counts used by the actual regularized-table header.
theorem all_padding_sum (t : GraphTables.Table) : sumFrom t 0 t.vertices = ∑ v, PreprocessingRegularTables.padding t v := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.sumFrom
- theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.paddingOrder_eq_prefixline 457Source documentation
At a vertex bound, adding its local dummy index to this machine's result gives precisely the existing executable padding-order index.
theorem paddingOrder_eq_prefix (t : GraphTables.Table) (v : Fin t.vertices) (j : Fin (PreprocessingRegularTables.padding t v)) : (PreprocessingRegularTables.paddingOrder (PreprocessingRegularTables.padding t) ⟨v, j⟩).val = sumFrom t 0 v.val + j.val := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineCloudPrefix.sumFrom
- abbrev
OAI.MaxCutGames.Foundations.Complexity.MachinePreservingLookupClean.Alphabetline 473 - inductive
OAI.MaxCutGames.Foundations.Complexity.MachinePreservingLookupClean.Labelline 475 - def
OAI.MaxCutGames.Foundations.Complexity.MachinePreservingLookupClean.statementline 482Source documentation
Tape roles: 0 original table, 1 unary index, 2 working copy, 3 output, 4 copy/restore scratch. The embedded halt enters the explicit cleanup loop.
def statement (tape : Fin 5 → K) (labels : Label → Λ) (exit : Option Λ) : Label → TM2.Stmt (Alphabet (K := K)) Λ (σ × Option Bool) …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachinePreservingLookupClean.Label, OAI.MaxCutGames.Foundations.Complexity.MachinePreservingLookupClean.Alphabet
- def
OAI.MaxCutGames.Foundations.Complexity.MachinePreservingLookupClean.programline 488 - def
OAI.MaxCutGames.Foundations.Complexity.MachinePreservingLookupClean.stepsline 493Source documentation
Exact copy, lookup, return, and residual-cleanup transition count.
def steps (values : List Nat) (index : Nat) : Nat := …
- theorem
OAI.MaxCutGames.Foundations.Complexity.MachinePreservingLookupClean.remaining_length_leline 497 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachinePreservingLookupClean.steps_leline 504 - def
OAI.MaxCutGames.Foundations.Complexity.MachinePreservingLookupClean.timePolynomialline 512 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachinePreservingLookupClean.steps_le_timePolynomialline 514 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachinePreservingLookupClean.traceAtline 523Source documentation
Actual ambient-program execution.
codefixes the concrete instructions at each placed label; it does not assume any execution or semantic behavior. The frame records an empty working copy at both endpoints.theorem traceAt (tape : Fin 5 → K) (distinct : Function.Injective tape) (labels : Label → Λ) (exit : Option Λ) (target : Λ → TM2.Stmt (Alphabet (K := K)) Λ (σ × Option Bool)) …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachinePreservingLookupClean.Label, OAI.MaxCutGames.Foundations.Complexity.MachinePreservingLookupClean.Alphabet
- def
OAI.MaxCutGames.Foundations.Complexity.MachinePreservingLookupClean.inTimeAtline 581Source documentation
A timed certificate for the same actual trace, bounded by a single linear polynomial in the original table encoding length.
def inTimeAt (tape : Fin 5 → K) (distinct : Function.Injective tape) (labels : Label → Λ) (exit : Option Λ) (target : Λ → TM2.Stmt (Alphabet (K := K)) Λ (σ × Option Bool)) …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachinePreservingLookupClean.Label, OAI.MaxCutGames.Foundations.Complexity.MachinePreservingLookupClean.Alphabet
- theorem
OAI.MaxCutGames.Foundations.Complexity.MachinePreservingLookupClean.initialTapes_eqline 604Source documentation
The framing representation is the caller's exact tape state whenever its index and work tape contain the specified index and an empty list.
theorem initialTapes_eq (tape : Fin 5 → K) (base : K → List Bool) (index : Nat) (indexSuffix : List Bool) (counterWord : base (tape 1) = encodeWord index ++ indexSuffix) (workEmpty : base (tape 2) = []) : MachinePreservingLookup.initialTapes tape base index indexSuffix [] (base (tape 3)) = base := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.encodeWord, OAI.MaxCutGames.Foundations.Complexity.MachinePreservingLookup.initialTapes
- theorem
OAI.MaxCutGames.Foundations.Complexity.MachinePreservingLookupClean.traceAt_fromTapesline 614Source documentation
A convenience interface starting from the caller's exact configuration.
theorem traceAt_fromTapes (tape : Fin 5 → K) (distinct : Function.Injective tape) (labels : Label → Λ) (exit : Option Λ) (target : Λ → TM2.Stmt (Alphabet (K := K)) Λ (σ × Option Bool)) …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachinePreservingLookupClean.Label, OAI.MaxCutGames.Foundations.Complexity.MachinePreservingLookupClean.Alphabet
- def
OAI.MaxCutGames.Foundations.Complexity.MachinePreservingLookupClean.machineline 637Source documentation
The complete construction has five Boolean tapes, nine control labels, and one optional-bit register. No table data appears in its finite state.
def machine : FinTM2 where …
- def
OAI.MaxCutGames.Foundations.Complexity.MachinePreservingLookupClean.machineInTimeline 650Source documentation
The generic trace instantiates the concrete finite machine, with the same linear bound and completely cleaned working copy.
def machineInTime (base : Fin 5 → List Bool) (values : List Nat) (tableWord : base 0 = encodeWords values) (scratchEmpty : base 4 = []) (index value : Nat) (selected : values[index]? = some value) (indexSuffix output : List Bool) (register : Option Bool) : StateTransition.EvalsToInTime machine.step ⟨some (.run .copyFirst), ((), register), MachinePreservingLookup.initialTapes id base index indexSuffix [] output⟩ (some ⟨none, ((), none), MachinePreservingLookup.initialTapes id base 0 indexSuffix [] (encodeWord value ++ output)⟩) (timePolynomial.eval (encodeWords values).length) := …Mentions: OAI.MaxCutGames.Foundations.Complexity.encodeWords, OAI.MaxCutGames.Foundations.Complexity.MachinePreservingLookup.initialTapes, OAI.MaxCutGames.Foundations.Complexity.encodeWord
- abbrev
OAI.MaxCutGames.Foundations.Complexity.MachineAppendAt.Alphabetline 672 - def
OAI.MaxCutGames.Foundations.Complexity.MachineAppendAt.appendTapesline 674 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineAppendAt.appendTapes_sourceline 678 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineAppendAt.appendTapes_destinationline 683 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineAppendAt.appendTapes_otherline 687 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineAppendAt.appendTapes_scratchline 692 - def
OAI.MaxCutGames.Foundations.Complexity.MachineAppendAt.firstTapes_inline_MachineAppendAtline 699 - def
OAI.MaxCutGames.Foundations.Complexity.MachineAppendAt.secondTapes_inline_MachineAppendAtline 702 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineAppendAt.finalTapes_eq_inline_MachineAppendAtline 706 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineAppendAt.appendTraceline 728 - def
OAI.MaxCutGames.Foundations.Complexity.MachineAppendAt.appendInTimeline 799Source documentation
The timed witness stores the exact three-loop transition count.
def appendInTime (source destination scratch : K) (sourceDestination : source ≠ destination) (sourceScratch : source ≠ scratch) (destinationScratch : destination ≠ scratch) (fallback : β) (firstLabel secondLabel thirdLabel : Λ) (exit : Option Λ) (program : Λ → TM2.Stmt (Alphabet (K := K) β) Λ (σ × Option β)) …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineAppendAt.Alphabet