OAI/Computability/UniqueGames/Machines/MachineLogCounter.lean
45 declarations, 0 contain sorry, 0 declared as axioms
An actual logarithmic-round counter. Unary input is stripped to a raw tally; each positive round emits one tally and halves the remaining input by pairing symbols. The zero input emits one round explicitly. All tapes except the canonical output are empty at termination.
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.bitLengthline 19 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.bitLength_zeroline 21 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.bitLength_positiveline 23 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.bitLength_halfline 26 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.incrementsline 33 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.increments_trueline 36 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.increments_halfline 39 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.increments_falseline 43 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.coreTimeline 48 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.coreTime_zeroline 53 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.coreTime_positiveline 55 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.coreTime_boundline 59 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.Alphabetline 69 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.Stateline 70 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.initialStateline 72 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.rawTapesline 74 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.update_inputline 79 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.update_scratchline 84 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.update_outputline 89 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.stripLoopline 94 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.guardLoopline 100 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.halfLoopline 109 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.programline 118 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.machineline 125 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.configurationline 136 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.nextline 140 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.stripStep_trueline 142 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.stripStep_falseline 150 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.stripTraceline 158 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.halfStep_nilline 174 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.halfStep_falseline 182 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.halfStep_trueline 191 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.halfTraceline 201Source documentation
A parity bit implements division by two using actual pop/push transitions.
theorem halfTrace (n m : Nat) (output : List Bool) (parity started : Bool) (register : Option Bool) : next^[n + 1] (some (configuration (some 3) ((parity, started), register) (List.replicate n true) (List.replicate m true) output)) = some (configuration (some 4) ((false, started), none) [] (List.replicate (m + (n + if parity then 1 else 0) / 2) true) output) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.next, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.configuration
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.restoreTraceline 233 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.guardStep_zeroline 250 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.guardStep_positiveline 263 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.coreTraceline 276Source documentation
The halving rounds are actual guard, scan, and restoration executions.
theorem coreTrace (n : Nat) (output : List Bool) (started : Bool) : next^[coreTime n] (some (configuration (some 2) ((false, started), none) (List.replicate n true) [] output)) = some (configuration none initialState [] [] (List.replicate (increments n started) true ++ output)) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.next, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.coreTime, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.configuration, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.initialState, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.increments
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.initList_eqline 309 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.haltList_eqline 317 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.initialStepline 325 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.totalTimeline 334 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.totalTime_boundline 336 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.machineTraceline 341 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.outputsInTimeline 356 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineLogCounter.computableInPolyTimeline 364Source documentation
A genuine finite-machine certificate for unary
log2(n)+1; its linear polynomial is measured in the actual encoded input length.noncomputable def computableInPolyTime : TM2ComputableInPolyTime encodeWord encodeWord (fun n => n.log2 + 1) where …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.encodeWord