OAI/Computability/UniqueGames/PCP/ExpanderRowControlLemmas.lean
48 declarations, 0 contain sorry, 0 declared as axioms
Raw natural-word serialization of actual expander rotation tables
The list keeps the stored row order port + degree * vertex; no header is
inserted. Lookup equalities and complete unary output lengths are data facts,
not machine execution certificates. Kernel-checked with Lean 4.33.1.
- abbrev
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.degreeline 15 - abbrev
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.cloudSizeline 16 - abbrev
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.rowFactorline 17 - structure
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.Controlline 22Source documentation
The encoded vertex of
firstHalready stores both square ports. The two graph-return registers and final-H register are overwritten by the corresponding callbacks. Every field is bounded independently of table size.structure Control (d : Nat) where …
- def
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.squarePortsline 30 - def
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.startline 35Source documentation
Consume the finite cloud coordinate and input port, and perform the first lookup in the fixed table. Initial register values need no inhabitance choice.
def start {d : Nat} (H : Table (cloudSize d) d) (cloud : Fin (cloudSize d)) (port : Fin (degree d)) : Control d := …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.cloudSize, OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.degree, OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.Control
- def
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.receiveFirstline 46 - def
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.receiveSecondline 51Source documentation
The second graph remainder completes the final lookup in the fixed table. The square return ports are ordered second, first, as in
stepLookup.def receiveSecond {d : Nat} (H : Table (cloudSize d) d) (s : Control d) (returnedPort : Fin (degree d)) : Control d := …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.cloudSize, OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.Control, OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.degree
- def
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.firstOffsetline 58 - def
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.secondOffsetline 59 - def
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.outputPortline 61 - def
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.outputOffsetline 66Source documentation
The entire bounded contribution to the emitted row: output port plus
qtimes output cloud, withq = d*d.def outputOffset {d : Nat} (s : Control d) : Fin (rowFactor d) := …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.Control, OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.rowFactor
- def
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.firstAddressline 69 - def
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.secondAddressline 72 - def
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.outputAddressline 75 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.firstOffset_receiveFirstline 78 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.secondOffset_receiveFirstline 81 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.receiveFirst_portline 84 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.receiveSecond_portline 87 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.firstAddress_eq_rowIndexline 90 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.secondAddress_eq_rowIndexline 96 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.firstAddress_ltline 102 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.secondAddress_ltline 107 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.lookup_vertex_divline 114Source documentation
Actual table returns split into the unary vertex quotient and finite port remainder. Both formulas are the definitions of the table's mixed-radix inverse.
theorem lookup_vertex_div {v q : Nat} (G : Table v q) (x : Fin v × Fin q) : (lookup G x).1.val = (reverseIndex G (rowIndex v q x)).val / q := rfl - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.lookup_port_modline 117 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.lookup_port_eq_remainderline 120 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.rowIndex_lookupline 124 - def
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.outputPairline 128 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.outputAddress_eq_rowIndexline 132 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.outputAddress_ltline 138 - def
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.evaluateRowline 145Source documentation
Pure row semantics: exactly two lookups in the input table. The two fixed H lookups occur inside
startandreceiveSecond. This is not a machine trace.def evaluateRow {v d : Nat} (G : Table v (degree d)) (H : Table (cloudSize d) d) (vertex : Fin v) (cloud : Fin (cloudSize d)) (port : Fin (degree d)) : Fin v × Control d := …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.degree, OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.cloudSize, OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.Control
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.evaluateRow_eq_lookup_stepline 156Source documentation
The finite callback sequence computes exactly the previously checked square/zigzag lookup, including both reversed square ports.
theorem evaluateRow_eq_lookup_step {v d : Nat} (G : Table v (degree d)) (H : Table (cloudSize d) d) (vertex : Fin v) (cloud : Fin (cloudSize d)) (port : Fin (degree d)) : outputPair (evaluateRow G H vertex cloud port).1 (evaluateRow G H vertex cloud port).2 = lookup (step G H) (rowIndex v (cloudSize d) (vertex,cloud),port) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.degree, OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.cloudSize, OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.outputPair, OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.evaluateRow
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.outputAddress_eq_step_rowline 165 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.outputAddress_eq_step_reverseIndexline 175Source documentation
The emitted natural number is the actual stored row, not just an extensionally equivalent endpoint pair.
theorem outputAddress_eq_step_reverseIndex {v d : Nat} (G : Table v (degree d)) (H : Table (cloudSize d) d) (vertex : Fin v) (cloud : Fin (cloudSize d)) (port : Fin (degree d)) : outputAddress (evaluateRow G H vertex cloud port).1.val (evaluateRow G H vertex cloud port).2 = (reverseIndex (step G H) (rowIndex (v * cloudSize d) (degree d) (rowIndex v (cloudSize d) (vertex,cloud),port))).val := by …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.degree, OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.cloudSize, OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.outputAddress, OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderRowControl.evaluateRow
- def
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderTableWords.rotationWordsline 204 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderTableWords.rotationWords_lengthline 206 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderTableWords.rotationWords_getElemline 210 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderTableWords.rotationWords_getline 216 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderTableWords.rotationWords_getElem?line 223Source documentation
The exact zero-based lookup hypothesis consumed by the machine lookup API.
theorem rotationWords_getElem? (table : Table v d) (i : Fin (v * d)) : (rotationWords table)[i.val]? = some (reverseIndex table i).val := by …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderTableWords.rotationWords
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderTableWords.rotationWords_getElem?_noneline 229 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderTableWords.rotationWords_entry_ltline 233 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderTableWords.rotationWords_lookupline 239Source documentation
The serialized reverse index decodes to the actual table lookup.
theorem rotationWords_lookup (table : Table v d) (x : Fin v × Fin d) : (rotationWords table)[(rowIndex v d x).val]? = some (rowIndex v d (lookup table x)).val := by …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderTableWords.rotationWords
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderTableWords.rotationWords_row_orderline 246Source documentation
Both the input and output use port-first mixed-radix row coordinates.
theorem rotationWords_row_order (table : Table v d) (x : Fin v × Fin d) : (rotationWords table)[x.2.val + d * x.1.val]? = some ((lookup table x).2.val + d * (lookup table x).1.val) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderTableWords.rotationWords
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderTableWords.decode_rotationWordsline 251 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderTableWords.decoded_lookupline 256Source documentation
Fully decode the serialized list, then select the actual reverse-dart row.
theorem decoded_lookup (table : Table v d) (i : Fin (v * d)) : (decodeWords (encodeWords (rotationWords table))).bind (fun words => words[i.val]?) = some (reverseIndex table i).val := by …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderTableWords.rotationWords
- theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderTableWords.decoded_coordinate_lookupline 262 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderTableWords.encode_rotationWords_length_eqline 269 - theorem
OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderTableWords.encode_rotationWords_length_leline 274Source documentation
Complete raw-row serialization bound, with no discarded delimiter or prefix.
theorem encode_rotationWords_length_le (table : Table v d) : (encodeWords (rotationWords table)).length ≤ (v * d) * (v * d + 1) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.PCP.ExpanderTableWords.rotationWords