OAI/Computability/UniqueGames/PCP/GraphTables.lean
67 declarations, 0 contain sorry, 0 declared as axioms
Executable directed-dart tables for the fixed 64-label alphabet
The header gives vertex and dart counts. Every dart has one ordered row:
tail index, reverse-dart index, and 4096 Boolean predicate entries. Entry
b + 64 * a is the predicate at labels (a,b). All fields, including bits
as 0/1 words, use the existing zero-delimited unary natural-word codec.
The decoder checks all index bounds, row counts, predicate lengths, reverse involution, predicate transpose, and absence of trailing fields. Directed rows preserve loops, self-reversing darts, and repeated constraint occurrences. The size theorems concern the full encoded table, not a machine runtime.
- abbrev
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.Labelline 28 - abbrev
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.RelationTableline 29 - def
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.relationIndexline 32Source documentation
The fixed row-major ordering of the complete predicate table.
def relationIndex : Label × Label ≃ Fin 4096 := finProdFinEquiv
Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.Label
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.relationIndex_valline 34 - def
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.relationAtline 37 - def
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.relationOfline 40 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.relationAt_relationOfline 43 - structure
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.DartRowline 48Source documentation
The row itself is finite data; index bounds are checked while parsing.
structure DartRow (vertices darts : Nat) where …
- abbrev
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.Rowsline 53 - def
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.reverseAtline 55 - def
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.acceptsAtline 58 - def
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.Validline 62Source documentation
The two graph laws are decidable finite checks on the stored rows.
def Valid {n m : Nat} (rows : Rows n m) : Prop := …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.Rows
- instance
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.(instance at line 66)line 66 - structure
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.Tableline 70 - def
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.rowListline 77Source documentation
The ordered list serialized by the codec. Equal rows remain separate.
def rowList (table : Table) : List (DartRow table.vertices table.darts) := table.rows.toList
Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.Table, OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.DartRow
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.rowList_lengthline 79 - def
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.semanticsline 83Source documentation
Decode validated finite data into the actual constraint-graph semantics.
def semantics (table : Table) : ConstraintGraph (Fin table.vertices) (Fin table.darts) Label where …
Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.Table, OAI.UniqueGamesTheorem.Foundations.PCP.ConstraintGraph, OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.Label
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.semantics_reverseline 94 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.semantics_tailline 97 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.semantics_acceptsline 100 - def
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.graphRowsline 103 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.reverseAt_graphRowsline 106 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.acceptsAt_graphRowsline 111 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.graphRows_validline 116 - def
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.ofGraphline 124 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.semantics_ofGraph_reverseline 127 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.semantics_ofGraph_tailline 132 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.semantics_ofGraph_acceptsline 138 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.semantics_ofGraph_edgeSatisfiedline 143 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.constraintGraph_extline 148 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.semantics_ofGraphline 163Source documentation
Complete semantic graph roundtrip, including its actual reversal map.
@[simp] theorem semantics_ofGraph {n m : Nat} (G : ConstraintGraph (Fin n) (Fin m) Label) : semantics (ofGraph G) = G := by …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.ConstraintGraph, OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.Label, OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.semantics, OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.ofGraph
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.semantics_ofGraph_rejectionCountline 172 - def
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.enumeratedGraphline 180Source documentation
Explicit enumerations determine every vertex name, dart position, and predicate label. No hidden choice of a graph representation is made.
def enumeratedGraph {V E A : Type*} {n m : Nat} (G : ConstraintGraph V E A) (vertexOrder : V ≃ Fin n) (dartOrder : E ≃ Fin m) (labelOrder : A ≃ Label) : ConstraintGraph (Fin n) (Fin m) Label where …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.ConstraintGraph, OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.Label
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.enumeratedGraph_edgeSatisfiedline 196 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.enumeratedGraph_rejectionCountline 205Source documentation
Every directed occurrence contributes once before and after enumeration.
theorem enumeratedGraph_rejectionCount {V E A : Type*} [Fintype E] {n m : Nat} (G : ConstraintGraph V E A) (vertexOrder : V ≃ Fin n) (dartOrder : E ≃ Fin m) (labelOrder : A ≃ Label) (labeling : V → A) : (enumeratedGraph G vertexOrder dartOrder labelOrder).rejectionCount (fun v => labelOrder (labeling (vertexOrder.symm v))) = G.rejectionCount labeling := by …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.ConstraintGraph, OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.Label, OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.enumeratedGraph
- def
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.ofEnumeratedGraphline 217 - def
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.bitWordline 221 - def
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.parseBitline 223 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.parseBit_bitWordline 228 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.parseBits_bitWordsline 231 - def
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.relationWordsline 237 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.relationWords_lengthline 239 - def
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.parseRelationline 242 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.parseRelation_encodedline 248 - def
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.rowWordsline 255 - def
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.parseRowline 258 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.parseRow_encodedline 266 - def
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.parseRowsline 274 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.parseRows_encodedline 282 - def
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.tableWordsline 288 - def
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.tableBitsline 291 - def
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.decodeTableWordsline 293 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.decodeTableWords_encodedline 304 - def
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.decodeTableBitsline 312 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.decodeTableBits_encodedline 315 - def
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.encodingline 320Source documentation
A concrete encoding suitable for the existing TM2 computation interface.
def encoding : Computability.Encoding Table Bool where …
Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.Table
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.tableBits_injectiveline 325 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.rowWords_lengthline 327 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.rowsWords_lengthline 330 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.tableWords_lengthline 336 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.tableWords_length_le_bitsline 343Source documentation
At least one unary delimiter is stored for every field, including all 4096 entries of every predicate table.
theorem tableWords_length_le_bits (table : Table) : 2 + 4098 * table.darts ≤ (tableBits table).length := by …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.Table, OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.tableBits
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.relationBits_length_leline 348 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.rowBits_length_leline 356 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.rowsBits_length_leline 365 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.tableBits_length_leline 377Source documentation
Full unary size bound: headers, both bounded indices in every row, and every Boolean predicate entry are counted. This is not a runtime assertion.
theorem tableBits_length_le (table : Table) : (tableBits table).length ≤ table.vertices + table.darts + 2 + table.darts * (table.vertices + table.darts + 8192) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.Table, OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.tableBits
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.vertices_le_tableBits_lengthline 386 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.GraphTables.darts_le_tableBits_lengthline 392