OAI/Computability/MaxCut/PCP/PortTableLookup.lean
10 declarations, 0 contain sorry, 0 declared as axioms
Exact word offsets in executable port tables
These are optional list-lookup equalities for the unary-word stream consumed by the lookup machine. They expose the stored tail, reverse index, and predicate bit at their actual positions in the existing graph-table serialization.
- theorem
OAI.MaxCutGames.Foundations.PCP.PortTableLookup.flatMap_word_inline_PortTableLookupline 16 - theorem
OAI.MaxCutGames.Foundations.PCP.PortTableLookup.vertices_wordline 49Source documentation
The first header word is the number of vertices.
theorem vertices_word (table : PortTables.Table n d) : (PortTables.tableWords table)[0]? = some n := rflMentions: OAI.MaxCutGames.Foundations.PCP.PortTables.Table, OAI.MaxCutGames.Foundations.PCP.PortTables.tableWords
- theorem
OAI.MaxCutGames.Foundations.PCP.PortTableLookup.darts_wordline 53Source documentation
The second header word is the number of directed port occurrences.
theorem darts_word (table : PortTables.Table n d) : (PortTables.tableWords table)[1]? = some (n * d) := rflMentions: OAI.MaxCutGames.Foundations.PCP.PortTables.Table, OAI.MaxCutGames.Foundations.PCP.PortTables.tableWords
- theorem
OAI.MaxCutGames.Foundations.PCP.PortTableLookup.row_word_inline_PortTableLookupline 56 - theorem
OAI.MaxCutGames.Foundations.PCP.PortTableLookup.tail_wordline 73Source documentation
The first word of row
irecords the tail vertex.theorem tail_word (table : PortTables.Table n d) (i : Fin (n * d)) : (PortTables.tableWords table)[2 + 4098 * i.val]? = some (((PortTables.rowIndex n d).symm i).1.val) := by …Mentions: OAI.MaxCutGames.Foundations.PCP.PortTables.Table, OAI.MaxCutGames.Foundations.PCP.PortTables.tableWords, OAI.MaxCutGames.Foundations.PCP.PortTables.rowIndex
- theorem
OAI.MaxCutGames.Foundations.PCP.PortTableLookup.reverse_wordline 82Source documentation
The second word of row
iis the actual stored reverse index.theorem reverse_word (table : PortTables.Table n d) (i : Fin (n * d)) : (PortTables.tableWords table)[3 + 4098 * i.val]? = some (table.reverseIndex[i].val) := by …Mentions: OAI.MaxCutGames.Foundations.PCP.PortTables.Table, OAI.MaxCutGames.Foundations.PCP.PortTables.tableWords
- theorem
OAI.MaxCutGames.Foundations.PCP.PortTableLookup.relation_wordline 92Source documentation
Relation position
jis a stored Boolean, encoded as its zero-or-one word.theorem relation_word (table : PortTables.Table n d) (i : Fin (n * d)) (j : Fin 4096) : (PortTables.tableWords table)[4 + 4098 * i.val + j.val]? = some (GraphTables.bitWord table.relations[i][j]) := by …Mentions: OAI.MaxCutGames.Foundations.PCP.PortTables.Table, OAI.MaxCutGames.Foundations.PCP.PortTables.tableWords, OAI.MaxCutGames.Foundations.PCP.GraphTables.bitWord
- theorem
OAI.MaxCutGames.Foundations.PCP.PortTableLookup.accepts_wordline 105Source documentation
A lookup indexed by the two labels returns exactly the semantic predicate.
theorem accepts_word (table : PortTables.Table n d) (e : Fin n × Fin d) (a b : PortTables.Label) : (PortTables.tableWords table)[4 + 4098 * (PortTables.rowIndex n d e).val + (GraphTables.relationIndex (a, b)).val]? = some (GraphTables.bitWord (PortTables.accepts table e a b)) := …Mentions: OAI.MaxCutGames.Foundations.PCP.PortTables.Table, OAI.MaxCutGames.Foundations.PCP.PortTables.Label, OAI.MaxCutGames.Foundations.PCP.PortTables.tableWords, OAI.MaxCutGames.Foundations.PCP.PortTables.rowIndex, OAI.MaxCutGames.Foundations.PCP.GraphTables.relationIndex, OAI.MaxCutGames.Foundations.PCP.GraphTables.bitWord, OAI.MaxCutGames.Foundations.PCP.PortTables.accepts
- theorem
OAI.MaxCutGames.Foundations.PCP.PortTableLookup.rotation_head_wordline 113Source documentation
After the reverse-index lookup, the target row's tail is the rotor endpoint.
theorem rotation_head_word (table : PortTables.Table n d) (e : Fin n × Fin d) : (PortTables.tableWords table)[2 + 4098 * (table.reverseIndex[PortTables.rowIndex n d e]).val]? = some ((PortTables.rotation table e).1.val) := …Mentions: OAI.MaxCutGames.Foundations.PCP.PortTables.Table, OAI.MaxCutGames.Foundations.PCP.PortTables.tableWords, OAI.MaxCutGames.Foundations.PCP.PortTables.rowIndex, OAI.MaxCutGames.Foundations.PCP.PortTables.rotation
- theorem
OAI.MaxCutGames.Foundations.PCP.PortTableLookup.rotor_lookupsline 119Source documentation
Both selections required by a concrete two-lookup rotor implementation.
theorem rotor_lookups (table : PortTables.Table n d) (e : Fin n × Fin d) : (PortTables.tableWords table)[3 + 4098 * (PortTables.rowIndex n d e).val]? = some (table.reverseIndex[PortTables.rowIndex n d e].val) ∧ (PortTables.tableWords table)[2 + 4098 * (table.reverseIndex[PortTables.rowIndex n d e]).val]? = some ((PortTables.rotation table e).1.val) := …Mentions: OAI.MaxCutGames.Foundations.PCP.PortTables.Table, OAI.MaxCutGames.Foundations.PCP.PortTables.tableWords, OAI.MaxCutGames.Foundations.PCP.PortTables.rowIndex, OAI.MaxCutGames.Foundations.PCP.PortTables.rotation