OAI/Computability/MaxCut/Machines/MachineCloudSelect.lean
64 declarations, 0 contain sorry, 0 declared as axioms
Actual inverse cloud numbering. The input table and query are copied preservingly. A unary working rank decreases only on equal stored tail fields; a separate unary row position increases on every skipped row. Only finite phase flags and symbol registers occur in the control state.
- abbrev
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.BaseTapeline 16 - abbrev
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.BaseAlphabetline 17 - abbrev
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.BaseStateline 18 - inductive
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.BaseLabelline 20 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.skipLabelline 26 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.baseProgramline 31 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.baseProgram_skipline 51 - inductive
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.Phaseline 56 - abbrev
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.Phase.enumListline 59 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.Phase.enumList_getElem?_ctorIdx_eqline 61 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.Phase.enumList_nodupline 65 - instance
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.(instance at line 67)line 67 - inductive
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.Controlline 71 - abbrev
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.Control.enumListline 74 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.Control.enumList_getElem?_ctorIdx_eqline 76 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.Control.enumList_nodupline 80 - instance
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.(instance at line 82)line 82 - abbrev
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.Tapeline 86 - abbrev
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.Alphabetline 87 - abbrev
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.Labelline 88 - abbrev
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.Stateline 89 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.goline 91 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.dispatcherline 96Source documentation
Pop the one-bit match result. Only a match pops the remaining local rank. Every completed skipped row separately pushes the global position.
def dispatcher : TM2.Stmt Alphabet Label (State σ) := …
Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.Alphabet, OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.Label, OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.State
- def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.extraline 109 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.programline 113 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.memoryline 116 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.memory_inlline 121 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.memory_positionline 123 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.update_memory_hitline 126 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.update_memory_rankline 132 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.update_memory_positionline 138 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.cfgline 145 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.liftTraceline 150 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.compareTraceline 163 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.dispatch_missline 186 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.dispatch_hit_succline 193 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.dispatch_hit_zeroline 202 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.advanceStepline 210 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.finishStepline 219 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.initializeStepline 225 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.skipTraceline 233Source documentation
The rest of a row is skipped field by field by the actual fixed program.
theorem skipTrace (fields : List Nat) (hwidth : fields.length = 4097) (original suffix target rank position : List Bool) (ambient : σ) : (advance (TM2.step program))^[(encodeWords fields).length + 1] (some (cfg (some (.inl (skipLabel 0))) .advancing original (encodeWords fields ++ suffix) target [] rank position ambient none)) = some (cfg (some (.inr .dispatch)) .advancing original suffix target [] rank position ambient none) := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.program, OAI.MaxCutGames.Foundations.Complexity.encodeWords, OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.cfg, OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.skipLabel
- theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.rowSkipTraceline 259Source documentation
One nonselected row, with enough remaining rank to pass this row when it matches. Its global position is incremented on the output tape.
theorem rowSkipTrace (r : Row) (hwidth : r.2.length = 4097) (v rank position : Nat) (original suffix targetSuffix rankSuffix outputSuffix : List Bool) (ambient : σ) (register : Option Bool) : (advance (TM2.step program))^[rowTime v r + 3] (some (cfg (some (.inl .field)) .checking original (encodeWords (rowWords r) ++ suffix) (encodeWord v ++ targetSuffix) [] (encodeWord (rank + if r.1 = v then 1 else 0) ++ rankSuffix) (encodeWord position ++ outputSuffix) ambient register)) = some (cfg (some (.inl .field)) .checking original suffix (encodeWord v ++ targetSuffix) [] (encodeWord rank ++ rankSuffix) (encodeWord (position + 1) ++ outputSuffix) ambient none) := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.program, OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.cfg, OAI.MaxCutGames.Foundations.Complexity.encodeWords, OAI.MaxCutGames.Foundations.Complexity.encodeWord
- def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.prefixTimeline 303 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.prefixTraceline 309Source documentation
A preceding consumes precisely its number of matching tails from unary rank, while physically counting every original row on the position tape.
theorem prefixTrace (rs : List Row) (hwidth : ∀ r ∈ rs, r.2.length = 4097) (v rank position : Nat) (original suffix targetSuffix rankSuffix outputSuffix : List Bool) (ambient : σ) (register : Option Bool) : (advance (TM2.step program))^[prefixTime v rs] (some (cfg (some (.inl .field)) .checking original (encodeWords (rs.flatMap rowWords) ++ suffix) (encodeWord v ++ targetSuffix) [] (encodeWord (rowsHits v rs + rank) ++ rankSuffix) (encodeWord position ++ outputSuffix) ambient register)) = some (cfg (some (.inl .field)) .checking original suffix (encodeWord v ++ targetSuffix) [] (encodeWord rank ++ rankSuffix) (encodeWord (position + rs.length) ++ outputSuffix) ambient (if rs = [] then register else none)) := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.program, OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.prefixTime, OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.cfg, OAI.MaxCutGames.Foundations.Complexity.encodeWords, OAI.MaxCutGames.Foundations.Complexity.encodeWord
- theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.cleanupTraceline 339Source documentation
Both copied workspaces are physically drained after finding the row; the original table, complete query, and position output are retained.
theorem cleanupTrace (original work target rank position : List Bool) (ambient : σ) : (advance (TM2.step program))^[work.length + rank.length + 4] (some (cfg (some (.inl .clearWork)) .finishing original work target [] rank position ambient none)) = some (cfg none .checking original [] target [] [] position ambient none) := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.program, OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.cfg
- theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.selectedTraceline 373 - abbrev
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.queryWordline 390 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.prepareStepsline 392 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.prepareTraceline 398Source documentation
Preserve the complete query and table while making the two working copies; extract the rank and skip the two actual table header fields.
theorem prepareTrace (n m v rank : Nat) (rs : List Row) (querySuffix position : List Bool) (ambient : σ) (register : Option Bool) : (advance (TM2.step program))^[prepareSteps n m v rank rs querySuffix] (some (cfg (some (.inl .queryFirst)) .checking (MachineCloudCount.inputWord n m rs) [] (queryWord v rank querySuffix) [] [] position ambient register)) = some (cfg (some (.inl .field)) .checking (MachineCloudCount.inputWord n m rs) (encodeWords (rs.flatMap rowWords)) (queryWord v rank querySuffix) [] (encodeWord rank ++ querySuffix) position ambient none) := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.program, OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.prepareSteps, OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.cfg, OAI.MaxCutGames.Foundations.Complexity.MachineCloudCount.inputWord, OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.queryWord, OAI.MaxCutGames.Foundations.Complexity.encodeWords, OAI.MaxCutGames.Foundations.Complexity.encodeWord
- theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.prefixSelectedTraceline 459Source documentation
A selected matching field is reached after precisely the matching count of its actual preceding rows has been consumed from the copied query.
theorem prefixSelectedTrace (preceding : List Row) (hwidth : ∀ r ∈ preceding, r.2.length = 4097) (v position : Nat) (original work targetSuffix rankSuffix outputSuffix : List Bool) (ambient : σ) (register : Option Bool) : (advance (TM2.step program))^[prefixTime v preceding + 2 * v + work.length + rankSuffix.length + 8] (some (cfg (some (.inl .field)) .checking original (encodeWords (preceding.flatMap rowWords) ++ (encodeWord v ++ work)) (encodeWord v ++ targetSuffix) [] (encodeWord (rowsHits v preceding) ++ rankSuffix) (encodeWord position ++ outputSuffix) ambient register)) = some (cfg none .checking original [] (encodeWord v ++ targetSuffix) [] [] (encodeWord (position + preceding.length) ++ outputSuffix) ambient none) := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.program, OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.prefixTime, OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.cfg, OAI.MaxCutGames.Foundations.Complexity.encodeWords, OAI.MaxCutGames.Foundations.Complexity.encodeWord
- def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.totalStepsline 481 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.fullTraceline 488Source documentation
Complete execution for the actual encoded preceding decomposition. The decomposition is semantic data; every machine phase is proved above.
theorem fullTrace (n m v rank : Nat) (rs preceding : List Row) (work : List Bool) (hwidth : ∀ r ∈ preceding, r.2.length = 4097) (hword : encodeWords (rs.flatMap rowWords) = encodeWords (preceding.flatMap rowWords) ++ (encodeWord v ++ work)) (hrank : rank = rowsHits v preceding) (querySuffix outputSuffix : List Bool) (ambient : σ) (register : Option Bool) : (advance (TM2.step program))^[totalSteps n m v rank rs preceding work querySuffix] (some (cfg (some (.inr .initialize)) .checking (MachineCloudCount.inputWord n m rs) [] (queryWord v rank querySuffix) [] [] outputSuffix ambient register)) = some (cfg none .checking (MachineCloudCount.inputWord n m rs) [] (queryWord v rank querySuffix) [] [] (encodeWord preceding.length ++ outputSuffix) ambient none) := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.encodeWords, OAI.MaxCutGames.Foundations.Complexity.encodeWord, OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.program, OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.totalSteps, OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.cfg, OAI.MaxCutGames.Foundations.Complexity.MachineCloudCount.inputWord, OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.queryWord
- theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.prefixTime_leline 512 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.totalSteps_leline 524 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.remainderline 543Source documentation
Bytes remaining after the selected row's actual tail field.
def remainder (t : GraphTables.Table) (e : Fin t.darts) : List Bool := …
- theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.tableRows_getElemline 547 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.tableWord_splitline 559Source documentation
Canonical dart indexing yields the literal byte decomposition consumed by the actual preceding scan and final matching-field test.
theorem tableWord_split (t : GraphTables.Table) (v : Fin t.vertices) (e : Fin t.darts) (owner : t.rows[e].tail = v) : encodeWords ((tableRows t).flatMap rowWords) = encodeWords (((tableRows t).take e.val).flatMap rowWords) ++ (encodeWord v.val ++ remainder t e) := by …Mentions: OAI.MaxCutGames.Foundations.Complexity.encodeWords, OAI.MaxCutGames.Foundations.Complexity.encodeWord, OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.remainder
- def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.cloudSelectStepsline 572 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.cloudSelectTraceline 578 - theorem
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.cloudSelectSteps_leline 602 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.timePolynomialline 612 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.cloudSelectInTimeline 615 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.machineline 631 - def
OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.machineInTimeline 644Source documentation
A concrete finite-machine certificate, with neither a runtime nor a selection oracle among its hypotheses.
def machineInTime (t : GraphTables.Table) (v : Fin t.vertices) (i : Fin (PreprocessingCloudIndex.cloudSize t v)) (querySuffix outputSuffix : List Bool) (register : Option Bool) : StateTransition.EvalsToInTime machine.step (cfg (some (.inr .initialize)) .checking (GraphTables.tableBits t) [] (queryWord v.val i.val querySuffix) [] [] outputSuffix () register) (some (cfg none .checking (GraphTables.tableBits t) [] (queryWord v.val i.val querySuffix) [] [] (encodeWord (PreprocessingCloudIndex.cloudSelect t v i).val.val ++ outputSuffix) () none)) (timePolynomial.eval ((GraphTables.tableBits t).length + (queryWord v.val i.val querySuffix).length)) where …Mentions: OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.cfg, OAI.MaxCutGames.Foundations.Complexity.MachineCloudSelect.queryWord, OAI.MaxCutGames.Foundations.Complexity.encodeWord