OAI/Computability/MaxCut/Encoding/TableKeysCompleteness.lean
45 declarations, 0 contain sorry, 0 declared as axioms
Completeness of the v2 single-orbit matrix game. The generic finite-average calculation is shared with the proved actual completeness calculation. Its reuse is justified below by pointwise equality of restored answers under diagonal labels; the output vertices themselves are never doubled.
No gadget existence, dispersion hypothesis, inverse theorem, or legacy
soundness theorem is a premise. The bound includes the exact fair-bit factor
1 / 2, and is a statement about the actual finite edge occurrence list.
- def
OAI.MaxCutGames.Decoder.TableKeysCompleteness.diagonalLabelingline 29Source documentation
Use a single label function on both auxiliary sides, solely to share the already proved finite-average calculation. This does not change the v2 game.
def diagonalLabeling (S : Source) (k s d : Nat) (labeling : Fin (vertexCount S k s d) → Fin (2^s)) : Fin (ActualGame.vertexCount S k s d) → Fin (2^s) := … - theorem
OAI.MaxCutGames.Decoder.TableKeysCompleteness.diagonal_unfoldedline 34 - theorem
OAI.MaxCutGames.Decoder.TableKeysCompleteness.acceptanceProbability_eq_diagonalline 43Source documentation
Pointwise-identical matrix tests have exactly the same acceptance average.
theorem acceptanceProbability_eq_diagonal (S : Source) (k : Nat) {s d : Nat} (g : SplitGadget s d) (labeling : Fin (vertexCount S k s d) → Fin (2^s)) : acceptanceProbability S k g labeling = ActualGame.acceptanceProbability S k g (diagonalLabeling S k s d labeling) := by …Mentions: OAI.MaxCutGames.Decoder.TableKeysCompleteness.diagonalLabeling
- def
OAI.MaxCutGames.Decoder.TableKeysCompleteness.honestLabelingline 50 - theorem
OAI.MaxCutGames.Decoder.TableKeysCompleteness.diagonal_honestLabelingline 54 - theorem
OAI.MaxCutGames.Decoder.TableKeysCompleteness.honest_unfoldedline 62Source documentation
The removed affine intercept is recovered by gadget equivariance.
theorem honest_unfolded (S : Source) (k : Nat) {s d : Nat} (g : SplitGadget s d) (A : Fin S.«variables» → Bool) (q : Query S k s d) : unfolded S k s d (honestLabeling S k g A) q = g.f (ActualCompleteness.evaluate (ActualGame.names S) (fun n => ofBit (A n)) (canonical S k s d q)) := by …Mentions: OAI.MaxCutGames.Decoder.TableKeysCompleteness.honestLabeling
- theorem
OAI.MaxCutGames.Decoder.TableKeysCompleteness.honest_unfolded_validline 72Source documentation
On a satisfied tuple, every sampled table evaluates the same homogeneous answer with first coordinate one.
theorem honest_unfolded_valid (S : Source) (k : Nat) {s d : Nat} (g : SplitGadget s d) (A : Fin S.«variables» → Bool) (q : Query S k s d) (hgood : ∀ j, S.satisfied A (q.1 j) = true) : unfolded S k s d (honestLabeling S k g A) q = g.f (q.2 (ActualCompleteness.sourcePoint S k A q.1)) := by …Mentions: OAI.MaxCutGames.Decoder.TableKeysCompleteness.honestLabeling
- theorem
OAI.MaxCutGames.Decoder.TableKeysCompleteness.honest_acceptance_boundline 80 - theorem
OAI.MaxCutGames.Decoder.TableKeysCompleteness.honest_acceptance_of_boundsline 87 - theorem
OAI.MaxCutGames.Decoder.TableKeysCompleteness.honest_satisfied_fraction_boundline 97Source documentation
Completeness is measured on the generated single-orbit edge occurrences.
theorem honest_satisfied_fraction_bound (S : Source) (k : Nat) {s d : Nat} (g : SplitGadget s d) (A : Fin S.«variables» → Bool) : 1 - (k : ℚ) * S.failure A - g.stabilityError / 2 ≤ (countSatisfied (honestLabeling S k g A) (outputInstance S k g).constraints : ℚ) / (outputInstance S k g).constraints.length := by …Mentions: OAI.MaxCutGames.Decoder.TableKeysCompleteness.honestLabeling
- theorem
OAI.MaxCutGames.Decoder.TableKeysCompleteness.completeAtline 106 - theorem
OAI.MaxCutGames.Decoder.TableKeysCompleteness.completeAt_withEnumerationline 120 - abbrev
OAI.MaxCutGames.Reduction.CanonicalEncoding.Ambientline 143 - abbrev
OAI.MaxCutGames.Reduction.CanonicalEncoding.Recordline 144 - abbrev
OAI.MaxCutGames.Reduction.CanonicalEncoding.Bodyline 145 - def
OAI.MaxCutGames.Reduction.CanonicalEncoding.vectorWordline 147 - theorem
OAI.MaxCutGames.Reduction.CanonicalEncoding.vectorWord_ltline 150 - theorem
OAI.MaxCutGames.Reduction.CanonicalEncoding.vectorWord_injectiveline 153 - theorem
OAI.MaxCutGames.Reduction.CanonicalEncoding.vectorWord_eq_iffline 159 - def
OAI.MaxCutGames.Reduction.CanonicalEncoding.recordWordsline 164Source documentation
Words: tag, name, occurrence, followed by three split coefficient pairs. Padding is zero. A single record uses only the first coefficient pair.
def recordWords {n m s d : Nat} : Record n m s d → List Nat | .blank => [0, 0, 0, 0, 0, 0, 0, 0, 0] | .single name coefficient => [1, name.val, 0, vectorWord coefficient.1, vectorWord coefficient.2, 0, 0, 0, 0] | .full occurrence coefficients => [2, 0, occurrence.val, vectorWord (coefficients 0).1, vectorWord (coefficients 0).2, vectorWord (coefficients 1).1, vectorWord (coefficients 1).2, vectorWord (coefficients 2).1, vectorWord (coefficients 2).2]Mentions: OAI.MaxCutGames.Reduction.CanonicalEncoding.Record, OAI.MaxCutGames.Reduction.CanonicalEncoding.vectorWord
- theorem
OAI.MaxCutGames.Reduction.CanonicalEncoding.recordWords_lengthline 174 - theorem
OAI.MaxCutGames.Reduction.CanonicalEncoding.recordWords_injectiveline 178 - def
OAI.MaxCutGames.Reduction.CanonicalEncoding.recordsWordsline 213 - theorem
OAI.MaxCutGames.Reduction.CanonicalEncoding.recordsWords_nilline 216 - theorem
OAI.MaxCutGames.Reduction.CanonicalEncoding.recordsWords_consline 219 - theorem
OAI.MaxCutGames.Reduction.CanonicalEncoding.recordsWords_lengthline 223 - theorem
OAI.MaxCutGames.Reduction.CanonicalEncoding.recordsWords_take_headline 229 - theorem
OAI.MaxCutGames.Reduction.CanonicalEncoding.recordsWords_injectiveline 236 - def
OAI.MaxCutGames.Reduction.CanonicalEncoding.bodyWordsline 264 - theorem
OAI.MaxCutGames.Reduction.CanonicalEncoding.bodyWords_lengthline 267 - theorem
OAI.MaxCutGames.Reduction.CanonicalEncoding.bodyWords_injectiveline 271 - theorem
OAI.MaxCutGames.Reduction.CanonicalEncoding.bodyWords_eq_iffline 279 - def
OAI.MaxCutGames.Reduction.CanonicalEncoding.wordBoundline 282 - theorem
OAI.MaxCutGames.Reduction.CanonicalEncoding.recordWords_boundedline 284 - theorem
OAI.MaxCutGames.Reduction.CanonicalEncoding.bodyWords_boundedline 309 - def
OAI.MaxCutGames.Reduction.CanonicalEncoding.bodyBitsline 320 - theorem
OAI.MaxCutGames.Reduction.CanonicalEncoding.bodyBits_injectiveline 323 - theorem
OAI.MaxCutGames.Reduction.CanonicalEncoding.bodyBits_eq_iffline 328 - theorem
OAI.MaxCutGames.Reduction.CanonicalEncoding.bodyBits_length_leline 331 - theorem
OAI.MaxCutGames.Reduction.CanonicalEncoding.imageVertices_bodyWordsline 337Source documentation
Serializing before deduplication preserves the exact retained vertex order.
theorem imageVertices_bodyWords {Q : Type*} {n m k s d : Nat} [DecidableEq (Body n m k s d)] (queries : List Q) (body : Q → Body n m k s d) : Encoding.imageVertices queries (fun q => bodyWords (body q)) = (Encoding.imageVertices queries body).map bodyWords := by …Mentions: OAI.MaxCutGames.Reduction.CanonicalEncoding.Body, OAI.MaxCutGames.Reduction.Encoding.imageVertices, OAI.MaxCutGames.Reduction.CanonicalEncoding.bodyWords
- theorem
OAI.MaxCutGames.Reduction.CanonicalEncoding.imageVertices_bodyBitsline 345 - theorem
OAI.MaxCutGames.Reduction.CanonicalEncoding.idxOf_map_injectiveline 353 - theorem
OAI.MaxCutGames.Reduction.CanonicalEncoding.imageIndex_map_valline 367Source documentation
Injective serialization leaves the actual numeric vertex index unchanged, not just the vertex set or its cardinality.
theorem imageIndex_map_val {Q A B : Type*} [DecidableEq A] [DecidableEq B] (queries : List Q) (body : Q → A) (f : A → B) (hf : Function.Injective f) (q : Q) (hq : q ∈ queries) : (Encoding.imageIndex queries (fun q => f (body q)) q hq).val = (Encoding.imageIndex queries body q hq).val := by … - theorem
OAI.MaxCutGames.Reduction.CanonicalEncoding.imageIndex_bodyWords_valline 381 - theorem
OAI.MaxCutGames.Reduction.CanonicalEncoding.imageIndex_bodyBits_valline 388