The lines of the Lean statement that state the theorem, then the definitions in the file that it uses.
Local definitions the statement names, followed through the definitions they name in turn. The match is by name in the source text, so a name reached only through notation can be missed; the full file is below.
structure OAI.UniqueGamesTheorem.Foundations.Target.PermutationTable line 9
structure PermutationTable (alphabet : Nat) where images : Vector (Fin alphabet) alphabet inverseImages : Vector (Fin alphabet) alphabet leftInverse : ∀ label : Fin alphabet, inverseImages[images[label]] = label rightInverse : ∀ label : Fin alphabet, images[inverseImages[label]] = label
structure OAI.UniqueGamesTheorem.Foundations.Target.Constraint line 15
structure Constraint (vertices alphabet : Nat) where source : Fin vertices target : Fin vertices permutation : PermutationTable alphabet
definition OAI.UniqueGamesTheorem.Foundations.Target.Constraint.satisfied line 20
def Constraint.satisfied {n q : Nat} (constraint : Constraint n q) (labeling : Fin n → Fin q) : Bool := decide (constraint.permutation.images[labeling constraint.source] = labeling constraint.target)
structure OAI.UniqueGamesTheorem.Foundations.Target.Instance line 26
structure Instance (alphabet : Nat) where vertices : Nat constraints : List (Constraint vertices alphabet) nonempty : constraints ≠ []
definition OAI.UniqueGamesTheorem.Foundations.Target.countSatisfied line 31
def countSatisfied {n q : Nat} (labeling : Fin n → Fin q) : List (Constraint n q) → Nat | [] => 0 | constraint :: rest => (if constraint.satisfied labeling then 1 else 0) + countSatisfied labeling rest
structure OAI.UniqueGamesTheorem.BinaryFormula.Literal line 43
structure Literal where name : Nat positive : Bool deriving DecidableEq
definition OAI.UniqueGamesTheorem.BinaryFormula.Literal.eval line 48
def Literal.eval (literal : Literal) (assignment : Nat → Bool) : Bool := if literal.positive then assignment literal.name else !(assignment literal.name)
abbreviation OAI.UniqueGamesTheorem.BinaryFormula.Clause line 51
abbrev Clause := Vector Literal 3
structure OAI.UniqueGamesTheorem.BinaryFormula.Formula line 58
structure Formula where clauses : List Clause
definition OAI.UniqueGamesTheorem.BinaryFormula.Formula.Satisfiable line 61
def Formula.Satisfiable (F : Formula) : Prop := ∃ assignment : Nat → Bool, ∀ clause ∈ F.clauses, clause.eval assignment = true
definition OAI.UniqueGamesTheorem.BinaryEncoding.bitsValue line 70
def bitsValue : List Bool → Nat | [] => 0 | b :: bits => Nat.bit b (bitsValue bits)
definition OAI.UniqueGamesTheorem.BinaryEncoding.parseFrame line 74
def parseFrame : List Bool → Option (List Bool × List Bool) | false :: rest => some ([], rest) | true :: b :: rest => do let (bits, trailing) ← parseFrame rest return (b :: bits, trailing) | _ => none
definition OAI.UniqueGamesTheorem.BinaryEncoding.parseName line 82
def parseName (input : List Bool) : Option (Nat × List Bool) := do let (digits, rest) ← parseFrame input let name := bitsValue digits if digits = name.bits then some (name, rest) else none
definition OAI.UniqueGamesTheorem.BinaryEncoding.parseLiteral line 87
def parseLiteral : List Bool → Option (Literal × List Bool) | sign :: input => do let (name, rest) ← parseName input return (⟨name, sign⟩, rest) | [] => none
definition OAI.UniqueGamesTheorem.BinaryEncoding.parseClause line 93
def parseClause (input : List Bool) : Option (Clause × List Bool) := do let (a, input) ← parseLiteral input let (b, input) ← parseLiteral input let (c, rest) ← parseLiteral input return (#v[a, b, c], rest)
definition OAI.UniqueGamesTheorem.BinaryEncoding.parseClauses line 100
def parseClauses : Nat → List Bool → Option (List Clause × List Bool) | 0, _ => none | _ + 1, false :: rest => some ([], rest) | fuel + 1, true :: input => do let (clause, input) ← parseClause input let (clauses, rest) ← parseClauses fuel input return (clause :: clauses, rest) | _ + 1, [] => none
definition OAI.UniqueGamesTheorem.BinaryEncoding.decodeFormula line 109
def decodeFormula (input : List Bool) : Option Formula := do let (clauses, rest) ← parseClauses (input.length + 1) input if rest = [] then some ⟨clauses⟩ else none
definition OAI.UniqueGamesTheorem.BinaryLanguage.language line 119
def language (input : List Bool) : Prop := ∃ formula, BinaryEncoding.decodeFormula input = some formula ∧ formula.Satisfiable
abbreviation OAI.UniqueGamesTheorem.Integration.BinaryLinear.F2 line 126
abbrev F2 := ZMod 2
abbreviation OAI.UniqueGamesTheorem.Integration.BinaryLinear.Vector line 128
abbrev Vector (n : Nat) := Fin n → F2
definition OAI.UniqueGamesTheorem.Integration.TranslationTarget.IsTranslationInstance line 137
def IsTranslationInstance {q s : Nat} (coordinates : Fin q ≃ BinaryLinear.Vector s) (g : Instance q) : Prop := ∀ constraint ∈ g.constraints, ∃ shift : BinaryLinear.Vector s, ∀ label : Fin q, coordinates (constraint.permutation.images[label]) = coordinates label + shift
definition OAI.UniqueGamesTheorem.Foundations.Complexity.encodeWord line 147
def encodeWord (n : Nat) : List Bool := List.replicate n true ++ [false]
definition OAI.UniqueGamesTheorem.Foundations.Complexity.encodeWords line 149
def encodeWords : List Nat → List Bool | [] => [] | n :: ns => encodeWord n ++ encodeWords ns
definition OAI.UniqueGamesTheorem.Foundations.Complexity.tableWords line 159
def tableWords {q : Nat} (table : PermutationTable q) : List Nat := table.images.toList.map Fin.val
6 more definitions are reached the same way; the full file lists them.