OAI/Computability/MaxCut/Games/CanonicalAddress.lean

GitHub source file

59 declarations, 0 contain sorry, 0 declared as axioms

Direct canonical-body addresses. The fixed list of canonical words is interpreted in big-endian order, matching forward Horner steps B*acc+digit. Unused addresses represent isolated vertices. These are semantic encoding and polynomial-size results, not an assumed machine implementation.

  1. def OAI.MaxCutGames.Reduction.CanonicalAddress.radix line 18

    Source documentation

    Most-significant-word first, with leading zero words retained in the fixed-length domain. Mathlib's ofDigits uses the opposite list order.

    def radix (B : Nat) (words : List Nat) : Nat := Nat.ofDigits B words.reverse
  2. theorem OAI.MaxCutGames.Reduction.CanonicalAddress.radix_eq_foldl line 20
  3. theorem OAI.MaxCutGames.Reduction.CanonicalAddress.radix_nil line 26
  4. theorem OAI.MaxCutGames.Reduction.CanonicalAddress.radix_append_word line 29

    Source documentation

    This is precisely the arithmetic operation of MachineRadixStep.

    theorem radix_append_word (B : Nat) (words : List Nat) (digit : Nat) :
        radix B (words ++ [digit]) = B * radix B words + digit := by
    …

    Mentions: OAI.MaxCutGames.Reduction.CanonicalAddress.radix

  5. theorem OAI.MaxCutGames.Reduction.CanonicalAddress.radix_lt_pow_length line 33
  6. theorem OAI.MaxCutGames.Reduction.CanonicalAddress.radix_injective_of_length_eq line 41

    Source documentation

    Fixed width makes leading zero words unambiguous.

    theorem radix_injective_of_length_eq {B : Nat} (hB : 1 < B)
        {xs ys : List Nat} (sameLength : xs.length = ys.length)
        (xsBounded : ∀ w ∈ xs, w < B) (ysBounded : ∀ w ∈ ys, w < B)
        (sameAddress : radix B xs = radix B ys) : xs = ys := by
    …

    Mentions: OAI.MaxCutGames.Reduction.CanonicalAddress.radix

  7. def OAI.MaxCutGames.Reduction.CanonicalAddress.base line 53

    Source documentation

    One larger than the proved bound on every canonical word.

    def base (n m s d : Nat) : Nat := wordBound n m s d + 1
  8. theorem OAI.MaxCutGames.Reduction.CanonicalAddress.base_eq line 55
  9. theorem OAI.MaxCutGames.Reduction.CanonicalAddress.one_lt_base line 59
  10. theorem OAI.MaxCutGames.Reduction.CanonicalAddress.bodyWords_lt_base line 66
  11. def OAI.MaxCutGames.Reduction.CanonicalAddress.capacity line 70
  12. theorem OAI.MaxCutGames.Reduction.CanonicalAddress.capacity_pos line 72
  13. def OAI.MaxCutGames.Reduction.CanonicalAddress.bodyAddress line 75
  14. theorem OAI.MaxCutGames.Reduction.CanonicalAddress.bodyAddress_val line 81
  15. theorem OAI.MaxCutGames.Reduction.CanonicalAddress.bodyAddress_injective line 84
  16. theorem OAI.MaxCutGames.Reduction.CanonicalAddress.bodyAddress_eq_iff line 92
  17. def OAI.MaxCutGames.Reduction.CanonicalAddress.capacityPolynomial line 96

    Source documentation

    For fixed k,s,d, the entire direct-address space is a polynomial in n+m.

    noncomputable def capacityPolynomial (k s d : Nat) : Polynomial Nat :=
    …
  18. theorem OAI.MaxCutGames.Reduction.CanonicalAddress.capacityPolynomial_eval line 99
  19. def OAI.MaxCutGames.Integration.NoiseTables.reindex line 115

    Source documentation

    Reindexing changes the names of outcomes, retaining their uniform law.

    def reindex (g : SplitGadget s d) {I : Type} [Fintype I] [Nonempty I]
        (e : I ≃ g.NoiseIndex) : SplitGadget s d where
    …
  20. theorem OAI.MaxCutGames.Integration.NoiseTables.reindex_stabilityError line 124
  21. theorem OAI.MaxCutGames.Integration.NoiseTables.reindex_kernelProbability line 131
  22. structure OAI.MaxCutGames.Integration.NoiseTables.Table line 144

    Source documentation

    Only a nonempty finite list of binary vectors is required as static noise data. The correcting function is a separate witness used in the proof.

    structure Table (s d : Nat) where
    …
  23. def OAI.MaxCutGames.Integration.NoiseTables.Table.gadget line 150
  24. def OAI.MaxCutGames.Integration.NoiseTables.Table.ofEnumeration line 159
  25. theorem OAI.MaxCutGames.Integration.NoiseTables.Table.ofEnumeration_length line 163
  26. def OAI.MaxCutGames.Integration.NoiseTables.Table.positionEquiv line 169

    Source documentation

    The inverse equivalence is used only to prove the probability identity; the forward noise lookup is ordinary finite-list indexing.

    noncomputable def positionEquiv (g : SplitGadget s d) (en : NoiseEnumeration g) :
        Fin (ofEnumeration g en).vectors.length ≃ g.NoiseIndex := by
    …

    Mentions: OAI.MaxCutGames.Integration.NoiseTables.Table.ofEnumeration

  27. theorem OAI.MaxCutGames.Integration.NoiseTables.Table.noise_positionEquiv line 175
  28. theorem OAI.MaxCutGames.Integration.NoiseTables.Table.stabilityError_ofEnumeration line 182
  29. theorem OAI.MaxCutGames.Integration.NoiseTables.Table.kernelProbability_ofEnumeration line 192
  30. theorem OAI.MaxCutGames.Integration.NoiseTables.Table.guarantees_ofEnumeration line 203

    Source documentation

    Exact table conversion retains both mathematical gadget guarantees.

    theorem guarantees_ofEnumeration (g : SplitGadget s d) (en : NoiseEnumeration g)
        {ζ ν : ℚ} {r : Nat}
        (hstable : g.stabilityError ≤ ζ)
        (hdisp : ∀ (P : Type) [AddCommGroup P] [Module F2 P]
          (S : Ambient s d →ₗ[F2] P),
          r ≤ Module.finrank F2 (S.comp (alphabetEmbedding s d)).range →
          SplitGadget.kernelProbability g S ≤ ν) :
        ((ofEnumeration g en).gadget g.f g.equivariant).stabilityError ≤ ζ ∧
          ∀ (P : Type) [AddCommGroup P] [Module F2 P]
            (S : Ambient s d →ₗ[F2] P),
            r ≤ Module.finrank F2 (S.comp (alphabetEmbedding s d)).range →
            SplitGadget.kernelProbability
    …

    Mentions: OAI.MaxCutGames.Integration.SplitGadget.kernelProbability, OAI.MaxCutGames.Integration.NoiseTables.Table.ofEnumeration, OAI.MaxCutGames.Integration.NoiseTables.Table.gadget

  31. def OAI.MaxCutGames.Integration.TableReduction.tableEnumeration line 232
  32. def OAI.MaxCutGames.Integration.TableReduction.tableSkeleton line 240

    Source documentation

    The projection is used only to fill an erased witness field. It is never used when generating constraints or evaluating their permutation tables.

    def tableSkeleton (T : Table s d) : SplitGadget s d :=
    …
  33. def OAI.MaxCutGames.Integration.TableReduction.output line 244

    Source documentation

    A total executable map with finite vector data and no nonlinear-map input.

    def output (S : Source) (k : Nat) (T : Table s d) : Instance (2 ^ s) :=
    …
  34. theorem OAI.MaxCutGames.Integration.TableReduction.output_eq_with_witness line 250

    Source documentation

    Every correcting-map witness generates exactly the same numbered instance, including the ordered constraint list and all permutation entries.

    theorem output_eq_with_witness (S : Source) (k : Nat) (T : Table s d)
        (f : Ambient s d → Alphabet s) (hf : ∀ x c, f (x + (c, 0)) = f x + c) :
        output S k T =
          outputInstanceWithEnumeration S k (T.gadget f hf) (tableEnumeration T f hf) := by
    …

    Mentions: OAI.MaxCutGames.Integration.TableReduction.output, OAI.MaxCutGames.Integration.TableReduction.tableEnumeration

  35. theorem OAI.MaxCutGames.Integration.TableReduction.completeAt_output_iff line 256
  36. theorem OAI.MaxCutGames.Integration.TableReduction.soundAt_output_iff line 264
  37. theorem OAI.MaxCutGames.Integration.TableReduction.edge_ofEnumeration line 272
  38. theorem OAI.MaxCutGames.Integration.TableReduction.acceptance_ofEnumeration line 280
  39. theorem OAI.MaxCutGames.Integration.TableReduction.rate_ofEnumeration line 292
  40. theorem OAI.MaxCutGames.Integration.TableReduction.completeAt_ofEnumeration_iff line 303

    Source documentation

    Normalization to a concrete table preserves the original completeness threshold exactly; there is no additional approximation loss.

    theorem completeAt_ofEnumeration_iff (error : RationalError)
        (S : Source) (k : Nat) (g : SplitGadget s d) (en : NoiseEnumeration g) :
        CompleteAt error (output S k (Table.ofEnumeration g en)) ↔
          CompleteAt error (outputInstance S k g) := by
    …

    Mentions: OAI.MaxCutGames.Integration.TableReduction.output

  41. theorem OAI.MaxCutGames.Integration.TableReduction.soundAt_ofEnumeration_iff line 315
  42. def OAI.MaxCutGames.Integration.VertexEmbedding.embedConstraint line 338
  43. theorem OAI.MaxCutGames.Integration.VertexEmbedding.embedConstraint_satisfied line 344
  44. theorem OAI.MaxCutGames.Integration.VertexEmbedding.embedConstraint_permutation line 348
  45. theorem OAI.MaxCutGames.Integration.VertexEmbedding.count_map line 351
  46. def OAI.MaxCutGames.Integration.VertexEmbedding.embedInstance line 360
  47. theorem OAI.MaxCutGames.Integration.VertexEmbedding.embedInstance_vertices line 366
  48. theorem OAI.MaxCutGames.Integration.VertexEmbedding.embedInstance_constraints line 370
  49. theorem OAI.MaxCutGames.Integration.VertexEmbedding.embedInstance_length line 374
  50. theorem OAI.MaxCutGames.Integration.VertexEmbedding.count_embed line 378
  51. theorem OAI.MaxCutGames.Integration.VertexEmbedding.satisfactionRate_embed line 384
  52. def OAI.MaxCutGames.Integration.VertexEmbedding.extendLabeling line 393

    Source documentation

    The extension is only used as a semantic witness, not by the instance constructor.

    noncomputable def extendLabeling {n m q : Nat} (f : Fin n → Fin m)
        (labeling : Fin n → Fin q) (defaultLabel : Fin q) (v : Fin m) : Fin q := by
    …
  53. theorem OAI.MaxCutGames.Integration.VertexEmbedding.extendLabeling_apply line 398
  54. theorem OAI.MaxCutGames.Integration.VertexEmbedding.extendLabeling_comp line 407
  55. theorem OAI.MaxCutGames.Integration.VertexEmbedding.soundAt_embed line 413
  56. theorem OAI.MaxCutGames.Integration.VertexEmbedding.completeAt_embed line 421
  57. theorem OAI.MaxCutGames.Integration.VertexEmbedding.completeAt_embed_iff line 429
  58. theorem OAI.MaxCutGames.Integration.VertexEmbedding.soundAt_embed_iff line 439
  59. theorem OAI.MaxCutGames.Integration.VertexEmbedding.isTranslationInstance_embed_iff line 448