OAI/Computability/UniqueGames/PCP/InputLemmas.lean
83 declarations, 0 contain sorry, 0 declared as axioms
Serialization boundaries and direct row lookup for the shared executable fixed-alphabet graph codec. The alphabet is a fixed parameter. Rows remain in their stored order, including repeated darts and loops. Word offsets are fixed; bit offsets are represented by actual encoded prefixes because unary fields have data-dependent lengths. These are data identities, not runtime certificates.
- abbrev
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Input.rowWidthline 46 - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Input.rowOffsetline 49Source documentation
Offset measured in natural-word fields, including the two header fields.
def rowOffset (q e : Nat) : Nat := 2 + rowWidth q * e
Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Input.rowWidth
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Input.rowsWords_splitline 52Source documentation
Exact decomposition before, at, and after a selected stored row.
theorem rowsWords_split (rows : List (DartRow q n m)) (e : Nat) (he : e < rows.length) : rows.flatMap rowWords = (rows.take e).flatMap rowWords ++ (rowWords rows[e] ++ (rows.drop (e + 1)).flatMap rowWords) := by … - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Input.rowsBits_splitline 63Source documentation
The unary serialization keeps exactly the same row boundaries, with separate encoded prefixes rather than an assumed constant bit offset.
theorem rowsBits_split (rows : List (DartRow q n m)) (e : Nat) (he : e < rows.length) : encodeWords (rows.flatMap rowWords) = encodeWords ((rows.take e).flatMap rowWords) ++ (encodeWords (rowWords rows[e]) ++ encodeWords ((rows.drop (e + 1)).flatMap rowWords)) := by … - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Input.rowsBits_append_splitline 73Source documentation
A selected row can be followed by an arbitrary caller-owned suffix.
theorem rowsBits_append_split (rows : List (DartRow q n m)) (e : Nat) (he : e < rows.length) (suffix : List Bool) : encodeWords (rows.flatMap rowWords) ++ suffix = encodeWords ((rows.take e).flatMap rowWords) ++ (encodeWords (rowWords rows[e]) ++ (encodeWords ((rows.drop (e + 1)).flatMap rowWords) ++ suffix)) := by … - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Input.prefixWordsline 82 - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Input.suffixWordsline 85 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Input.prefixWords_lengthline 88 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Input.tableWords_at_rowline 93 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Input.tableBits_at_rowline 102 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Input.tableBits_headerline 109Source documentation
Removing precisely the two encoded header words exposes the stored rows.
theorem tableBits_header (table : Table q) : tableBits table = encodeWord table.vertices ++ (encodeWord table.darts ++ encodeWords ((rowList table).flatMap rowWords)) := by … - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Input.tableWords_drop_rowline 114 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Input.tableWords_take_rowline 121 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Input.tableWords_get_tailline 127 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Input.tableWords_get_reverseline 132 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Input.tableWords_drop_relationline 137 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Input.relationWords_getline 143 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Input.tableWords_get_relationline 148 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Input.tableWords_get_predicateline 158 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Input.rowOffset_lt_lengthline 165 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.Input.relationOffset_lt_lengthline 173 - abbrev
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.Alphabetline 204 - abbrev
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.Stateline 205 - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.relationEquivline 208Source documentation
The relation register is a finite tuple of bits, with no unbounded storage.
def relationEquiv (q : Nat) : RelationTable q ≃ (Fin (q * q) → Bool) where …
- def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.relationFintypeline 215Source documentation
Executable enumeration used when assembling the finite machine state.
@[instance_reducible] def relationFintype (q : Nat) : Fintype (RelationTable q) := …
- def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.stateFintypeline 218 - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.readSlotline 224Source documentation
Read one encoded Boolean into a fixed slot of the finite relation register.
def readSlot (source : K) (i : Fin (q * q)) (next : TM2.Stmt (Alphabet (K := K)) Λ (State σ q)) : …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.Alphabet, OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.State
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.stepAux_readSlotline 234 - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.readSlotsline 244 - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.indexedWordsline 250 - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.fillSlotsline 253 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.fillSlots_preserves_correctline 259 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.fillSlots_memline 271 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.fillSlots_finRangeline 284 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.indexedWords_finRangeline 291 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.stepAux_readSlotsline 304Source documentation
Each stored register bit is obtained from its actual serialized field.
theorem stepAux_readSlots (source : K) (indices : List (Fin (q * q))) (relation : RelationTable q) (next : TM2.Stmt (Alphabet (K := K)) Λ (State σ q)) …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.Alphabet, OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.State
- def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.readRelationline 321Source documentation
Fixed finite program fragment; it can be inserted before any continuation.
def readRelation (source : K) (next : TM2.Stmt (Alphabet (K := K)) Λ (State σ q)) : …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.Alphabet, OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.State
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.stepAux_readRelationline 326 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.stepAux_readRelation_fromTapesline 337 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.readSlots_pushBoundline 351 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.readRelation_pushBoundline 361 - def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.parserline 367 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.parser_pushBoundline 372 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.parserStepline 377 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.parserTraceline 392Source documentation
One transition executes the fixed chain of
q*qslot readers.theorem parserTrace (source : K) (readLabel exitLabel : Λ) (program : Λ → TM2.Stmt (Alphabet (K := K)) Λ (State σ q)) …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.Alphabet, OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.State
- def
OAI.UniqueGamesTheorem.Foundations.PCP.AlphabetTable.ReadRelation.parserInTimeline 404 - def
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTableComplexity.encodingPolynomialline 437 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTableComplexity.encodingPolynomial_evalline 440 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTableComplexity.encodingPolynomial_monoline 444 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTableComplexity.rowBound_le_polynomialline 450 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTableComplexity.generic_size_add_two_le_bitsline 460 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTableComplexity.generic_bits_le_polynomialline 466 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTableComplexity.generic_bits_le_of_size_leline 472 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTableComplexity.size_add_two_le_bitsline 477 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTableComplexity.bits_le_polynomialline 483 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTableComplexity.bits_le_of_size_leline 489 - def
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.bitCountline 507 - def
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.binomialMeanline 510 - def
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.splitTapeline 513 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.bitCount_succline 521 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.mean_congrline 525 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.mean_constline 530 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.mean_addline 533 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.mean_subline 537 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.mean_mulline 541 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.mean_zeroline 545 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.expect_boolline 548 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.mean_succline 552 - def
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.scoreline 563 - def
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.scoreMeanline 565 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.scoreMean_zeroline 568 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.scoreMean_succline 571 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.score_identityline 591Source documentation
Exact finite integration by parts for the fair Boolean-tape law.
theorem score_identity (n : ℕ) (g : ℕ → ℝ) : scoreMean (n + 1) g = ((n : ℝ) + 1) / 2 * (binomialMean n g - binomialMean n (fun k => g (k + 1))) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.scoreMean, OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.binomialMean
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.score_mean_zeroline 601 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.score_second_momentline 609Source documentation
The score variance is proved from the actual tape distribution.
theorem score_second_moment (n : ℕ) : binomialMean n (fun k => score n k ^ 2) = (n : ℝ) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.binomialMean, OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.score
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.score_differenceline 628 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.adjacent_difference_sqline 636Source documentation
Cauchy--Schwarz yields an adjacent-length bound without any support or small-parameter caveat. The square form avoids introducing square roots.
theorem adjacent_difference_sq (n : ℕ) (g : ℕ → ℝ) (hg : ∀ k, 0 ≤ g k ∧ g k ≤ 1) : 4 * ((n : ℝ) + 1) * (binomialMean n g - binomialMean (n + 1) g) ^ 2 ≤ 1 := by …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.binomialMean
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.adjacent_difference_leline 670 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.mean_shift_leline 683 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.mean_ordered_difference_leline 702 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.mean_window_leline 708 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.square_window_leline 731Source documentation
A convenient square center for a fixed alphabet.
theorem square_window_le (q M m : ℕ) (hq : 1 ≤ q) (hM : 1 ≤ M) (hlo : (4 * q * M) ^ 2 - M ≤ m) (hhi : m ≤ (4 * q * M) ^ 2 + M) (g : ℕ → ℝ) (hg : ∀ k, 0 ≤ g k ∧ g k ≤ 1) : |binomialMean m g - binomialMean ((4 * q * M) ^ 2) g| ≤ 1 / (4 * (q : ℝ)) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.binomialMean
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.modal_transferline 759Source documentation
A modal event of probability at least
1/qretains probability1/(2q)throughout the middle window used in lazy-walk powering.theorem modal_transfer (q M m : ℕ) (hq : 1 ≤ q) (hM : 1 ≤ M) (hlo : (4 * q * M) ^ 2 - M ≤ m) (hhi : m ≤ (4 * q * M) ^ 2 + M) (g : ℕ → ℝ) (hg : ∀ k, 0 ≤ g k ∧ g k ≤ 1) (hmodal : 1 / (q : ℝ) ≤ binomialMean ((4 * q * M) ^ 2) g) : 1 / (2 * (q : ℝ)) ≤ binomialMean m g := by …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.LazySmoothing.binomialMean