OAI/Computability/UniqueGames/Machines/MachineUnaryLessAtLemmas.lean
52 declarations, 0 contain sorry, 0 declared as axioms
Physical comparison of two unary fields. Matched true bits are saved on two empty scratch stacks. The first delimiter determines the comparison, then both saved prefixes are restored. All input suffixes and other tapes survive.
- abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.Alphabetline 17 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.Stateline 18 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.zeroTestline 21Source documentation
A boundary test which inspects the first unary bit without consuming it.
def zeroTest (operand : K) (exit : Option Λ) : TM2.Stmt (Alphabet (K := K)) Λ (State σ) := …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.Alphabet, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.State
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.zeroTestTraceline 27 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.tapesline 43Source documentation
Slots 0 and 1 are the operands; slots 2 and 3 are their saved prefixes.
def tapes (slots : Fin 4 ↪ K) (base : K → List Bool) (left right savedLeft savedRight : List Bool) : K → List Bool := … - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.tapes_leftline 48 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.tapes_rightline 53 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.tapes_savedLeftline 58 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.tapes_savedRightline 63 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.update_tapesline 68 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.tapes_selfline 86 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.stopline 90 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.scanline 94 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.scan_step_zero_leftline 109 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.scan_step_zero_rightline 122 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.scan_step_succline 135 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.scanTraceline 150 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.transferLeft_tapesline 181 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.transferRight_tapesline 188 - inductive
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.Labelline 195 - instance
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.(instance at line 201)line 201 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.statementline 205 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.stepsline 213 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.comparisonTraceline 215 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.lessThanTraceline 271Source documentation
Actual comparison on a caller frame: both complete operand tapes and all other tapes are preserved, both scratch tapes remain empty, and the finite result flag is precisely the strict comparison of the two unary values.
theorem lessThanTrace (slots : Fin 4 ↪ K) (labels : Label → Λ) (exit : Option Λ) (program : Λ → TM2.Stmt (Alphabet (K := K)) Λ (State σ)) …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.Label, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.Alphabet, OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.State
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.timePolynomialline 289 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.steps_le_timeline 291 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.lessThanInPolynomialTimeline 297 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.machineline 313 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineUnaryLessAt.machineInPolynomialTimeline 324 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.roundsline 349 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.rounds_leline 351 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.two_pow_rounds_leline 354 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.growth_pow_rounds_leline 362Source documentation
The exponent is a fixed growth constant, independent of the input.
theorem growth_pow_rounds_le (growth n : Nat) : growth ^ rounds n ≤ (2 * (n + 1)) ^ growth := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.rounds
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.sizeEnvelopeline 370 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.semanticSize_geometricline 373Source documentation
This recurrence concerns semantic cardinality, not unary encoding length.
theorem semanticSize_geometric (sizes : Nat → Nat) (growth n : Nat) (initialBound : sizes 0 ≤ n + 1) (growthBound : ∀ i, i < rounds n → sizes (i + 1) ≤ growth * sizes i) (i : Nat) (hi : i ≤ rounds n) : sizes i ≤ (n + 1) * growth ^ i := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.rounds
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.semanticSize_boundline 387 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.sizePolynomialline 400 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.sizePolynomial_evalline 403 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.timePolynomialline 409Source documentation
A polynomial in initial semantic size; two extra steps include the final zero guard and actual halt. The encoding polynomial is applied once.
noncomputable def timePolynomial (growth : Nat) (encodingSize bodyTime : Polynomial Nat) : Polynomial Nat := … - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.timePolynomial_evalline 414 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.Alphabetline 422 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.Stateline 423 - abbrev
OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.Labelsline 424 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.programline 428Source documentation
A concrete guard and halt are added to the supplied body statements. The body may return to
Sum.inl false; it starts atSum.inr entry.def program (counter : K) (entry : Λ) (body : Λ → TM2.Stmt (Alphabet (K := K)) (Labels Λ) (State σ)) : …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.Alphabet, OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.Labels, OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.State
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.program_guardline 436 - def
OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.machineline 443Source documentation
Finite packaging of the concrete control program. Callers supply a fixed finite body; no input-dependent collection of labels or states is introduced.
def machine [Fintype K] [Fintype Λ] [Fintype σ] (counter output : K) (entry : Λ) (initial : σ) (body : Λ → TM2.Stmt (Alphabet (K := K)) (Labels Λ) (State σ)) : FinTM2 where …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.Alphabet, OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.Labels, OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.State
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.haltedConfigurationline 456 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.haltStepline 461 - theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.iterationTraceline 474Source documentation
Full loop execution including the final transition that consumes the counter delimiter and halts, retaining the unread suffix. The only supplied execution hypotheses concern individual body calls in this same program.
theorem iterationTrace (counter : K) (entry : Λ) (body : Λ → TM2.Stmt (Alphabet (K := K)) (Labels Λ) (State σ)) …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.Alphabet, OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.Labels, OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.State
- theorem
OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.bodyCosts_boundline 493Source documentation
Actual body costs are bounded through a semantic-size sequence and a separate encoding polynomial. Index
rounds n - (r+1)is the forward round corresponding to the unary guard's remaining-count indexr.theorem bodyCosts_bound (growth n : Nat) (growthPositive : 0 < growth) (sizes encodedSizes cost : Nat → Nat) (encodingSize bodyTime : Polynomial Nat) (initialBound : sizes 0 ≤ n + 1) (growthBound : ∀ i, i < rounds n → sizes (i + 1) ≤ growth * sizes i) (encodingBound : ∀ r, r < rounds n → encodedSizes r ≤ encodingSize.eval (sizes (rounds n - (r + 1)))) (bodyCost : ∀ r, r < rounds n → cost r ≤ bodyTime.eval (encodedSizes r)) : ∀ r, r < rounds n → cost r ≤ bodyTime.eval (encodingSize.eval (sizeEnvelope growth n)) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.rounds, OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.sizeEnvelope
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.iterationInTimeline 512Source documentation
Timed execution of the concrete guard/body/halt program. This compositional interface is not a certificate for an unprovided graph-transformation body.
def iterationInTime (counter : K) (entry : Λ) (body : Λ → TM2.Stmt (Alphabet (K := K)) (Labels Λ) (State σ)) …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.Alphabet, OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.Labels, OAI.UniqueGamesTheorem.Foundations.Complexity.PCPIterationMachine.State