ComparatorChallenges/UniqueGamesTheorem.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: OpenAI's pinned repository says an unreleased internal model produced the manuscripts and supporting proof artifacts. The collection builds on the mathematics community's accumulated problems, results, language, and formal libraries; each manuscript's BibTeX and bibliography are the authority for individual scholarly credit.
Project sources: Pinned openai/math documentation, Pinned formalization catalogue
32 declarations, 1 contain sorry, 0 declared as axioms
- structure
OAI.UniqueGamesTheorem.Foundations.Target.PermutationTableA finite permutation table with a certified inverse line 9Source documentation
Finite forward and inverse tables make totality and invertibility explicit. An eventual external encoding only needs to serialize the forward table.
L4DEL explanation
including the table of each permutation.
fixing a label to v uniquely fixes the label to w and vice versa
A
PermutationTable alphabetstores both directions of a permutation ofFin alphabet:imagesis the forward table andinverseImagesis its proposed inverse.- Both vectors have exactly
alphabetentries, so every label has a forward image and an inverse image without a partial lookup. leftInverseandrightInverseprove the two tables undo each other in both orders. Those fields are what make this data a permutation rather than merely two arrays.- The later output encoding serializes only
images; the inverse table and proofs certify the Lean object but do not add duplicate words togameBits. The manuscript supports explicit permutation tables, while this two-table certification is the Lean implementation.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games, OpenAI, The Unique Games Theorem (2026), p. 2, Subhash Khot, On the Unique Games Conjecture (2010), p. 5
Also declared: OAI/Computability/UniqueGames/Model.lean:9 (same declaration text).
structure PermutationTable (alphabet : Nat) where …
- Both vectors have exactly
- structure
OAI.UniqueGamesTheorem.Foundations.Target.ConstraintOne oriented permutation constraint line 15L4DEL explanation
where πe is a permutation of K.
A
Constraint vertices alphabetselects a source vertex, a target vertex, and the permutation table that tells which target label matches each source label.- Both endpoints inhabit
Fin vertices, so they are valid indices into the same finite vertex set. - Orientation matters: satisfaction applies the stored permutation to the source label and compares the result with the target label.
- This structure is one occurrence's mathematical data. Multiplicity and nonemptiness belong to
Instance, not to an individual constraint.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games, OpenAI, The Unique Games Theorem (2026), p. 2
Also declared: OAI/Computability/UniqueGames/Model.lean:15 (same declaration text).
structure Constraint (vertices alphabet : Nat) where …
- Both endpoints inhabit
- def
OAI.UniqueGamesTheorem.Foundations.Target.Constraint.satisfiedTest whether one labeling satisfies one constraint line 20L4DEL explanation
A labeling a satisfies e when a(ve ) = πe (a(ue )).
constraint.satisfied labelingis the Boolean decision that the target vertex's label equals the forward image of the source vertex's label.- Read
labeling constraint.source, applyconstraint.permutation.images, and compare withlabeling constraint.target. decideconverts that decidable equality intotrueorfalse; it does not search for a labeling.- Because the table has a certified inverse, fixing either endpoint label uniquely determines the satisfying label at the other endpoint.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games, OpenAI, The Unique Games Theorem (2026), p. 2
Also declared: OAI/Computability/UniqueGames/Model.lean:20 (same declaration text).
def Constraint.satisfied {n q : Nat} (constraint : Constraint n q) (labeling : Fin n → Fin q) : Bool := …Mentions: OAI.UniqueGamesTheorem.Foundations.Target.Constraint
- Read
- structure
OAI.UniqueGamesTheorem.Foundations.Target.InstanceAn explicit, unweighted list of Unique Games constraints line 26Source documentation
Constraint occurrences are list entries, so repeated parallel edges retain their multiplicity. No weights are hidden in this representation.
L4DEL explanation
a finite vertex set, a finite alphabet K, and a nonempty list of oriented constraints
An
Instance alphabetrecords a finite number of vertices and a nonempty list of permutation constraints over that fixed alphabet.- Each constraint carries endpoints in
Fin vertices, so malformed vertex indices cannot inhabit the structure. - Constraints are list occurrences rather than a set: identical or parallel entries remain separate and are counted with multiplicity by
countSatisfied. - There is no weight field. Thus the ratio used later is the ordinary number of satisfied list entries divided by the nonzero list length.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games, OpenAI, The Unique Games Theorem (2026), p. 2
Also declared: OAI/Computability/UniqueGames/Model.lean:26 (same declaration text).
structure Instance (alphabet : Nat) where …
- Each constraint carries endpoints in
- def
OAI.UniqueGamesTheorem.Foundations.Target.countSatisfiedCount satisfied constraint occurrences line 31L4DEL explanation
Its value is the fraction of satisfied constraints
countSatisfied labeling constraintsrecursively counts how many entries in the constraint list evaluate totrueunder one labeling.- The empty list contributes zero.
- For a head constraint, add one when
constraint.satisfied labelingis true and zero otherwise, then recurse on the tail. - This is an occurrence count: repeated equal constraints are counted repeatedly. The later game value divides this natural number by the nonempty list length.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games, OpenAI, The Unique Games Theorem (2026), p. 2
Also declared: OAI/Computability/UniqueGames/Model.lean:31 (same declaration text).
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 end UniqueGamesTheorem.Foundations.Target namespace UniqueGamesTheorem.BinaryFormula open UniqueGamesTheorem.FoundationsMentions: OAI.UniqueGamesTheorem.Foundations.Target.Constraint
- structure
OAI.UniqueGamesTheorem.BinaryFormula.LiteralA signed Boolean variable occurrence line 43L4DEL explanation
A
Literalpairs an arbitrary natural-number variable name with a Boolean sign.positive = truerepresents the variable itself;positive = falserepresents its Boolean negation.- Names are natural numbers rather than a dense finite type, so an encoded formula may use sparse indices.
DecidableEqlets the surrounding syntax compare literals mechanically; it adds no well-formedness restriction.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games
Also declared: OAI/Computability/UniqueGames/Model.lean:43 (same declaration text).
structure Literal where …
- def
OAI.UniqueGamesTheorem.BinaryFormula.Literal.evalEvaluate a signed literal under a Boolean assignment line 48L4DEL explanation
Given
assignment : Nat → Bool, a positive literal returns the assigned bit and a negative literal returns its Boolean complement.- Look up the variable by
literal.name. - If
literal.positiveis true, keep the value; otherwise apply Boolean!. - The assignment is total on all natural names, so sparse or previously unseen indices still have a defined value.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games
Also declared: OAI/Computability/UniqueGames/Model.lean:48 (same declaration text).
def Literal.eval (literal : Literal) (assignment : Nat → Bool) : Bool := …
- Look up the variable by
- abbrev
OAI.UniqueGamesTheorem.BinaryFormula.ClauseExactly three literal slots line 51L4DEL explanation
ClauseabbreviatesVector Literal 3, so its arity is fixed by the type rather than checked at runtime.- Positions
0,1, and2are all available by finite indexing. - The vector may repeat a literal or variable name; this alias imposes no distinctness condition.
- Being an abbreviation,
Clauseunfolds directly to the vector type in later definitions.
Sources and attribution: Pinned OpenAI Lean source for Unique Games
Also declared: OAI/Computability/UniqueGames/Model.lean:51 (same declaration text).
abbrev Clause := Vector Literal 3
- Positions
- def
OAI.UniqueGamesTheorem.BinaryFormula.Clause.evalEvaluate a 3SAT clause by disjunction line 53L4DEL explanation
A clause is true when at least one of its three signed literals evaluates to true under the assignment.
- Evaluate positions zero and one and combine them with Boolean
||. - Disjoin that result with the evaluation at position two.
- This is ordinary three-literal OR; no exactly-one or parity interpretation is introduced.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games
Also declared: OAI/Computability/UniqueGames/Model.lean:53 (same declaration text).
def Clause.eval (clause : Clause) (assignment : Nat → Bool) : Bool := …
- Evaluate positions zero and one and combine them with Boolean
- structure
OAI.UniqueGamesTheorem.BinaryFormula.FormulaBinary 3SAT as a finite list of three-literal clauses line 58Source documentation
An ordinary conjunction of three-slot clauses with sparse variable names. Repeated names and repeated literals are permitted in every clause.
L4DEL explanation
Given a 3SAT formula, apply Theorem 4.1 and Lemma 4.2
A
Formulais exactly a list ofClauses, and each clause is a length-three vector of signed literals whose variable names are natural numbers.- Variable names may be sparse, and neither repeated names nor repeated literals are forbidden. This is a syntax container, not a promise that the input has been simplified.
- Satisfaction is defined separately: one Boolean assignment must make every listed clause evaluate to
true. - The manuscript starts its final construction from a 3SAT formula. The particular framed bit serialization below is a Lean comparator interface and is not attributed to the paper.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games, OpenAI, The Unique Games Theorem (2026), p. 38
Also declared: OAI/Computability/UniqueGames/Model.lean:58 (same declaration text).
structure Formula where …
- def
OAI.UniqueGamesTheorem.BinaryFormula.Formula.SatisfiableOne assignment satisfies every listed clause line 61L4DEL explanation
F.Satisfiablemeans there exists a total Boolean assignment making each clause occurring inF.clausesevaluate totrue.- The existential assignment maps every natural-number variable name to a Boolean value.
- The universal condition ranges over list membership, so repeated clauses create repeated obligations with the same truth value.
- An empty formula is satisfiable because the all-clauses condition is vacuous.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games
Also declared: OAI/Computability/UniqueGames/Model.lean:61 (same declaration text).
def Formula.Satisfiable (F : Formula) : Prop := …
- def
OAI.UniqueGamesTheorem.BinaryEncoding.bitsValueInterpret a least-significant-bit-first Boolean list line 70L4DEL explanation
bitsValueconverts Lean's canonical Boolean digit list back to a natural number.- The empty list denotes zero.
- A head bit
band recursive tail valuenbecomeNat.bit b n, placingbat the low-order end. parseNamelater checks the decoded number'sNat.bitsagainst the original digits, which supplies canonicality rather than this fold alone.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games
Also declared: OAI/Computability/UniqueGames/Model.lean:70 (same declaration text).
def bitsValue : List Bool → Nat | [] => 0 | b :: bits => Nat.bit b (bitsValue bits)
- def
OAI.UniqueGamesTheorem.BinaryEncoding.parseFrameParse one self-delimiting frame of bits line 74L4DEL explanation
parseFramereads zero or more data bits, each introduced bytrue, until afalseterminator, then returns the digits and untouched suffix.- A leading
falsemeans the framed digit list is empty. - A leading
truerequires one following data bit and then recursively parses the rest of the frame. - End of input before a terminator, or
truewithout a following bit, returnsnone.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games
Also declared: OAI/Computability/UniqueGames/Model.lean:74 (same declaration text).
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 /-- Equality with the canonical digits rejects alternate padded encodings. -/ - A leading
- def
OAI.UniqueGamesTheorem.BinaryEncoding.parseNameDecode one canonically framed natural-number name line 82Source documentation
Equality with the canonical digits rejects alternate padded encodings.
L4DEL explanation
parseNamereads one framed list of bits, converts it to a natural number, and returns that number together with the unconsumed suffix only when the digits are canonical.parseFrameusesfalseas the end marker andtruefollowed by a bit as one framed digit.bitsValuereconstructs the natural number; comparing the parsed digits withname.bitsrejects padded or otherwise alternate encodings of the same number.- This parser is a comparator-level serialization choice. The manuscript asserts a deterministic polynomial-time reduction but does not specify this framing, so no manuscript quotation is attached to the encoding detail.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games, Pinned OpenAI formalization note 102
Also declared: OAI/Computability/UniqueGames/Model.lean:82 (same declaration text).
def parseName (input : List Bool) : Option (Nat × List Bool) := do …
- def
OAI.UniqueGamesTheorem.BinaryEncoding.parseLiteralParse a sign bit followed by one canonical name line 87L4DEL explanation
parseLiteralconsumes the first bit as polarity, delegates the remaining input toparseName, and returns oneLiteralplus the suffix.- With a leading bit
sign, successful name parsing yields⟨name, sign⟩. - Failure of the nested canonical-name parser propagates through the
Optioncomputation. - Empty input fails because a literal must contain a sign even before its framed name.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games
Also declared: OAI/Computability/UniqueGames/Model.lean:87 (same declaration text).
def parseLiteral : List Bool → Option (Literal × List Bool) | sign :: input => do let (name, rest) ← parseName input return (⟨name, sign⟩, rest) | [] => none - With a leading bit
- def
OAI.UniqueGamesTheorem.BinaryEncoding.parseClauseParse three literals in sequence line 93L4DEL explanation
parseClauserunsparseLiteralthree times and packages the results as the length-three vector#v[a,b,c].- Each successful parser passes its unconsumed suffix to the next literal parser.
- Failure at any of the three positions makes the whole
Optioncomputation fail. - No delimiter is needed between literals because each variable name carries its own frame terminator.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games
Also declared: OAI/Computability/UniqueGames/Model.lean:93 (same declaration text).
def parseClause (input : List Bool) : Option (Clause × List Bool) := do …
- def
OAI.UniqueGamesTheorem.BinaryEncoding.parseClausesDecode a terminated clause list with structural fuel line 100Source documentation
Fuel bounds the number of clause iterations, not the size of any name.
L4DEL explanation
parseClauses fuel inputparses a list in whichfalseends the list andtrueannounces one three-literal clause followed by the rest.- Zero fuel always fails; positive fuel plus
falsesucceeds with the empty clause list; positive fuel plustrueparses one clause and recurses with one less unit. - An empty input without a terminator fails.
decodeFormulasuppliesinput.length + 1fuel, enough to bound clause iterations while each framed variable name may consume several bits. - This is termination and canonical-input machinery for the Lean interface, not a proof step quoted from the mathematical manuscript.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games, Pinned OpenAI formalization note 102
Also declared: OAI/Computability/UniqueGames/Model.lean:100 (same declaration text).
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 - Zero fuel always fails; positive fuel plus
- def
OAI.UniqueGamesTheorem.BinaryEncoding.decodeFormulaAccept exactly one complete canonical formula encoding line 109L4DEL explanation
decodeFormula inputparses the clause list with enough fuel and succeeds only when no trailing bits remain.- The fuel is
input.length + 1, so recursive clause parsing cannot exhaust it before consuming a finite input. parseClausesreturns both clauses and a suffix;decodeFormularejects every nonempty suffix.- On exact consumption it wraps the clause list in
Formula; malformed, unterminated, noncanonical, or trailing encodings returnnone.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games
Also declared: OAI/Computability/UniqueGames/Model.lean:109 (same declaration text).
def decodeFormula (input : List Bool) : Option Formula := do …
- The fuel is
- def
OAI.UniqueGamesTheorem.BinaryLanguage.languageThe encoded language of satisfiable binary 3SAT formulas line 119L4DEL explanation
language inputholds exactly when the entire bit list decodes to some formula and that formula has a satisfying Boolean assignment.- The existential formula is tied to the input by
decodeFormula input = some formula. - The second conjunct applies
Formula.Satisfiableto that same decoded syntax tree. - Parser failure, trailing bits, or a well-formed unsatisfiable formula all place the input outside the language, for different reasons.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games, Pinned OpenAI formalization note 102
Also declared: OAI/Computability/UniqueGames/Model.lean:119 (same declaration text).
def language (input : List Bool) : Prop := …
- The existential formula is tied to the input by
- abbrev
OAI.UniqueGamesTheorem.Integration.BinaryLinear.F2The two-element coefficient field line 126L4DEL explanation
F2abbreviatesZMod 2, the field whose two elements encode binary addition and translation.- Arithmetic is modulo two, so every element is its own additive inverse.
- The abbreviation introduces no new structure or proof; it shortens the types used by the translation contract.
- This is the scalar field for the label coordinate space, not the Boolean type used by formula encodings and graph sides.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games
Also declared: OAI/Computability/UniqueGames/Model.lean:126 (same declaration text).
abbrev F2 := ZMod 2
- abbrev
OAI.UniqueGamesTheorem.Integration.BinaryLinear.VectorA finite binary coordinate vector line 128L4DEL explanation
Vector nabbreviates the function typeFin n → F2, so a vector is one modulo-two coordinate for each ofnpositions.- Pointwise addition supplies the translation operation used in every constraint.
Fin nmakes the dimension part of the type and rules out out-of-range coordinates.- When
nis positive this type has2^nelements; the reduction record separately identifies it with the finite label type.
Sources and attribution: Pinned OpenAI Lean source for Unique Games
Also declared: OAI/Computability/UniqueGames/Model.lean:128 (same declaration text).
abbrev Vector (n : Nat) := Fin n → F2 …
Mentions: OAI.UniqueGamesTheorem.Integration.BinaryLinear.F2
- def
OAI.UniqueGamesTheorem.Integration.TranslationTarget.IsTranslationInstanceEvery permutation constraint is addition by one binary shift line 137L4DEL explanation
every constraint is a translation
After identifying labels with a binary vector space,
IsTranslationInstance coordinates grequires each listed permutation to act asx ↦ x+shiftfor some shift depending on that constraint.- The property quantifies over every constraint occurrence in
g.constraints. - For one occurrence it chooses one vector
shift, then requires the coordinate equation for every possible label. - The same coordinate equivalence is fixed for the whole game; only the additive shift may vary between constraints.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games, OpenAI, The Unique Games Theorem (2026), p. 2
Also declared: OAI/Computability/UniqueGames/Model.lean:137 (same declaration text).
def IsTranslationInstance {q s : Nat} (coordinates : Fin q ≃ BinaryLinear.Vector s) (g : Instance q) : Prop := …Mentions: OAI.UniqueGamesTheorem.Integration.BinaryLinear.Vector
- The property quantifies over every constraint occurrence in
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.encodeWordEncode one natural number in unary with a zero terminator line 147L4DEL explanation
encodeWord nisncopies oftruefollowed by onefalse.- The count of leading true bits recovers the natural number.
- The false terminator makes concatenations of several words uniquely separable.
- This output representation is unary, unlike the canonical binary variable-name framing used for the input formula and the logarithmic endpoint encoding discussed in the manuscript.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games
Also declared: ComparatorChallenges/PerfectCompleteness.lean:7 (same declaration text), OAI/Computability/UniqueGames/Model.lean:147 (same declaration text).
def encodeWord (n : Nat) : List Bool := List.replicate n true ++ [false]
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.encodeWordsConcatenate a list of unary natural-number words line 149L4DEL explanation
encodeWordsmaps each natural toencodeWordand joins the framed words in list order.- An empty word list becomes an empty bit list.
- For
n :: ns, output the frame fornfollowed by the recursive encoding ofns. - Because each word ends in
false, adjacent frames remain decodable without a separate length field.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games
Also declared: ComparatorChallenges/PerfectCompleteness.lean:9 (same declaration text), OAI/Computability/UniqueGames/Model.lean:149 (same declaration text).
def encodeWords : List Nat → List Bool | [] => [] | n :: ns => encodeWord n ++ encodeWords ns end UniqueGamesTheorem.Foundations.Complexity namespace UniqueGamesTheorem.Foundations.Complexity open Target
Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.encodeWord
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.tableWordsSerialize the forward half of a permutation table line 159L4DEL explanation
tableWords tablelists the natural values oftable.imagesin label order.toListpreserves the vector'salphabetentries.- Mapping
Fin.valremoves the bounded-index wrapper and produces natural-number words. - The inverse table and inverse-law proofs are omitted because the certified forward permutation determines them mathematically.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games
Also declared: OAI/Computability/UniqueGames/Model.lean:159 (same declaration text).
def tableWords {q : Nat} (table : PermutationTable q) : List Nat := … - def
OAI.UniqueGamesTheorem.Foundations.Complexity.constraintWordsSerialize one constraint as endpoints plus a permutation table line 162L4DEL explanation
constraintWordsemits the source index, target index, and every forward permutation image as natural numbers.- The first two words fix the oriented endpoints.
tableWordsappends exactly one image for each alphabet label.- The alphabet size is fixed outside the input, so each constraint contributes a fixed number of natural-number fields once the error parameters are fixed.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games
Also declared: OAI/Computability/UniqueGames/Model.lean:162 (same declaration text).
def constraintWords {n q : Nat} (constraint : Constraint n q) : List Nat := … - def
OAI.UniqueGamesTheorem.Foundations.Complexity.gameWordsFlatten an explicit game into natural-number fields line 165L4DEL explanation
gameWords gameplaces a three-word header before the serialization of every constraint occurrence.- The header records the vertex count, fixed alphabet size, and number of list occurrences.
flatMap constraintWordspreserves occurrence order and multiplicity while concatenating endpoints and forward tables.- The explicit occurrence count and fixed table width delimit the remaining fields without serializing proofs or inverse tables.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games
Also declared: OAI/Computability/UniqueGames/Model.lean:165 (same declaration text).
def gameWords {q : Nat} (game : Instance q) : List Nat := … - def
OAI.UniqueGamesTheorem.Foundations.Complexity.gameBitsThe comparator's concrete output bit string line 168L4DEL explanation
gameBits gameapplies the unaryencodeWordsrepresentation to the complete natural-number field list fromgameWords.- This is the exact output function named in
BinaryGapReduction.computation, so the polynomial-time machine contract concerns these bytes, not an unspecified abstract graph. - The representation is explicit and prefix-decodable, but it uses unary natural-number words. It is not the logarithmic endpoint encoding described in the paper's polynomial-encoding paragraph.
- The theorem's formal contract therefore stands on the Lean proof that this concrete output function is computed in polynomial time; the manuscript is not cited as specifying this encoding.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games, Pinned OpenAI formalization note 102
Also declared: OAI/Computability/UniqueGames/Model.lean:168 (same declaration text).
def gameBits {q : Nat} (game : Instance q) : List Bool := encodeWords (gameWords game) …Mentions: OAI.UniqueGamesTheorem.Foundations.Complexity.encodeWords, OAI.UniqueGamesTheorem.Foundations.Complexity.gameWords
- This is the exact output function named in
- def
OAI.UniqueGamesTheorem.Foundations.Complexity.MachineFiniteAlphabet.FiniteAlphabetEvery physical tape of the reduction machine has a finite alphabet line 178Source documentation
Every physical tape has a finite alphabet. Together with
M.kFin, this also makes the disjoint union of all physical tape alphabets finite.L4DEL explanation
FiniteAlphabet MmeansFinite (M.Γ k)for every physical tape indexkof the two-tape-style finite Turing-machine model.- The quantifier ranges over tape indices, not game labels. Together with the machine's finite number of tapes, it rules out hiding an infinite symbol type inside the polynomial-time computation.
- This condition does not give one numeric bound on every alphabet and does not itself prove polynomial time;
BinaryGapReduction.computationcarries the separate runtime contract. - The paper's fixed finite game alphabet and this machine-alphabet condition are related explicitness requirements but are not the same proposition.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games, Pinned OpenAI formalization note 102
Also declared: ComparatorChallenges/PerfectCompleteness.lean:19 (same declaration text), OAI/Computability/UniqueGames/Model.lean:178 (same declaration text).
def FiniteAlphabet (M : FinTM2) : Prop := ∀ k, Finite (M.Γ k) …
- structure
OAI.UniqueGamesTheorem.Explicit.MachineOutputContract.SimpleBipartiteA certificate that the output graph is simple and bipartite line 191Source documentation
A canonical orientation from the false side to the true side. Injectivity is on occurrence indices, so two distinct list entries cannot be parallel even when their constraint tables are different.
L4DEL explanation
A simple bipartite instance has two disjoint vertex sets and at most one constraint on each pair of opposite vertices.
SimpleBipartite gameassigns every vertex a Boolean side, orients every constraint from thefalseside to thetrueside, and forbids two occurrence indices from sharing the same ordered endpoints.sourceSideandtargetSidecertify the bipartition for every list occurrence rather than merely asserting that some partition exists.endpoints_injectiveis injectivity on occurrence indices. Because all constraints use the same left-to-right orientation, it gives at most one constraint for each opposite-side vertex pair.- The certificate permits isolated vertices; simplicity and bipartiteness do not require connectivity or positive degree.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games, OpenAI, The Unique Games Theorem (2026), p. 2
Also declared: OAI/Computability/UniqueGames/Model.lean:191 (same declaration text).
structure SimpleBipartite {q : Nat} (game : Instance q) where … - structure
OAI.UniqueGamesTheorem.Explicit.MachineOutputContract.BinaryGapReductionThe complete machine-checkable contract for the gap reduction line 203Source documentation
Every parameter, coordinate identification, program, and polynomial is fixed before the input quantifier. The identity input encoding measures runtime in the original raw bit length, including sparse binary variable names.
L4DEL explanation
The alphabet, the degree of the running-time polynomial, and its constants depend only on ε, δ.
A
BinaryGapReduction ε δpackages one alphabet, binary-vector-space coordinate system, constructor, machine computation, and the two gap guarantees before any encoded formula is supplied.alphabetAtLeastTwo,dimensionPositive, andcoordinatesidentify the fixed labels withFin dimension → ZMod 2;translationsthen requires every output constraint to add one fixed binary shift.constructreturns a nonempty unweighted instance, whilesimpleBipartitecertifies its graph shape.computationandfiniteAlphabetexpose the exact output-bit function as a finite-alphabet polynomial-time Turing computation.- Completeness says a satisfiable decoded input has some labeling satisfying at least
1-εof the occurrences. Soundness says an unsatisfiable decoded input makes every labeling satisfy at mostδof them. - The record contains the theorem's output contract; it is not itself the existence proof.
theorem11is the declaration that states such a record is nonempty for every allowed pair of errors.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games, OpenAI, The Unique Games Theorem (2026), p. 2
Also declared: OAI/Computability/UniqueGames/Model.lean:203 (same declaration text).
structure BinaryGapReduction (ε δ : ℝ) where …
- theorem
OAI.UniqueGamesTheorem.theorem11Challenge statement: A polynomial-time binary-3SAT reduction proving the Unique Games gap sorry line 231Source documentation
For every fixed pair of errors in
(0, 1/2), binary 3SAT reduces in polynomial time to translation Unique Games with completeness at least1 - εand soundness at mostδ. The alphabet and machine depend only on the errors.L4DEL explanation
We prove the Unique Games Conjecture.
The author conjectured that the problem is computationally hard.
For any fixed completeness error ε and soundness bound δ between 0 and 1/2, there exists a concrete polynomial-time reduction from encoded binary 3SAT to a nonempty simple bipartite Unique Games instance. Satisfiable inputs admit a labeling of value at least 1-ε; unsatisfiable inputs give every labeling value at most δ.
BinaryGapReduction ε δfixes an alphabet of size at least two, a positive dimension, and an identification of its labels with a finite vector space over F₂ before quantifying over inputs.- Its output instances are nonempty, unweighted, simple and bipartite; every constraint permutation is translation by a fixed vector in those coordinates, and the encoded output is computed by a finite-alphabet Turing machine in polynomial time.
- The Lean conclusion is
Nonempty (BinaryGapReduction ε δ). This declaration concerns only the Unique Games theorem, not the four separate Max-Cut, Vertex Cover, Min-UnCut, and directed-feedback results documented in the same note; its challenge proof issorryand the paired solution isOAI.Computability.UniqueGames.Main.
Sources and attribution: Pinned Lean source (fd4aeeb2ee4f), Pinned OpenAI Lean source for Unique Games, OpenAI Unique Games manuscript (abstract), Pinned OpenAI formalization note 102, Subhash Khot, On the Unique Games Conjecture (2010), p. 5
Distinct definitions of this name: OAI/Computability/UniqueGames/Theorem.lean:26 (same statement text; different proof or body). Qualify references as OAI.UniqueGamesTheorem.theorem11@path.
Unique Game: a constraint-satisfaction instance in which each edge constraint is a permutation, so either endpoint's label uniquely determines the satisfying label at the other endpoint
theorem theorem11 (ε δ : ℝ) (hε : 0 < ε) (hεhalf : ε < 1 / 2) (hδ : 0 < δ) (hδhalf : δ < 1 / 2) : Nonempty (Explicit.MachineOutputContract.BinaryGapReduction ε δ) := by …Mentions: OAI.UniqueGamesTheorem.Explicit.MachineOutputContract.BinaryGapReduction