Documentation

Complexitylib.Classes.PCP.Internal.Arithmetize

Arithmetizing a constraint #

The Hadamard tester checks a single quadratic equation over 𝔽₂. The constraint it is composed with in Dinur's proof is an arbitrary predicate on a constant number of bits — the relation of an outer edge, spelled out on the encodings of the two labels. Two gaps to close, both classical:

Main definitions #

Main results #

Linearity of the Hadamard table #

Reading a Hadamard table at a sum of vectors.

theorem Complexity.hadamard_smul_arg {n : } (a : BooleanAnalysis.Cube n) (c : ZMod 2) (x : BooleanAnalysis.Cube n) :
(hadamard a fun (i : Fin n) => c * x i) = c * hadamard a x

Reading a Hadamard table at a scalar multiple.

theorem Complexity.hadamard_sum_smul {n J : } (a : BooleanAnalysis.Cube n) (c : BooleanAnalysis.Cube J) (v : Fin JBooleanAnalysis.Cube n) :
(hadamard a fun (i : Fin n) => j : Fin J, c j * v j i) = j : Fin J, c j * hadamard a (v j)

Reading a Hadamard table at a finite sum of scaled vectors.

Random linear combinations #

A linear combination of constraints with coefficients c.

Equations
  • One or more equations did not get rendered due to their size.
Instances For

    The check of a combination is the combination of the checks, when the tables are Hadamard codewords (so linear).

    Rigidity of the combination. If the combined check passes on more than half of the coefficient vectors, every constraint's check passes.

    theorem Complexity.QuadConstraint.sat_combine {n J : } (C : Fin JQuadConstraint n) (a : BooleanAnalysis.Cube n) (h : ∀ (j : Fin J), (C j).Sat a) (c : BooleanAnalysis.Cube J) :
    (combine C c).Sat a

    The combination of constraints satisfied by a is satisfied by a.

    Reading a table at an appended vector #

    Reading at an appended vector reads the two blocks separately.

    The one-hot system #

    noncomputable def Complexity.candIdx (k : ) :

    Candidate assignments, numbered.

    Equations
    Instances For
      def Complexity.auxVar (k : ) (m : Fin (2 ^ k)) :
      Fin (k + 2 ^ k)

      The selector variable of candidate number m.

      Equations
      Instances For

        The trivial constraint 0 = 0.

        Equations
        Instances For
          @[reducible, inline]

          The index set of the one-hot system: the sum constraint, a constraint per pair of candidates, a constraint per candidate, and a constraint per input coordinate.

          Equations
          Instances For
            noncomputable def Complexity.oneHotOf {k : } (S : Finset (BooleanAnalysis.Cube k)) :
            OneHotIdx kQuadConstraint (k + 2 ^ k)

            The constraints of the one-hot system for the satisfying set S.

            Equations
            Instances For
              noncomputable def Complexity.oneHotSystem {k : } (S : Finset (BooleanAnalysis.Cube k)) :

              The one-hot system, as a Fin-indexed family for combine.

              Equations
              Instances For
                theorem Complexity.forall_oneHotSystem_iff {k : } (S : Finset (BooleanAnalysis.Cube k)) (a : BooleanAnalysis.Cube (k + 2 ^ k)) :
                (∀ (j : Fin (Fintype.card (OneHotIdx k))), (oneHotSystem S j).Sat a) ∀ (x : OneHotIdx k), (oneHotOf S x).Sat a

                Evaluating the constraints #

                theorem Complexity.sat_oneHot_sum_iff {k : } (S : Finset (BooleanAnalysis.Cube k)) (a : BooleanAnalysis.Cube (k + 2 ^ k)) :
                (oneHotOf S (Sum.inl ())).Sat a m : Fin (2 ^ k), rightBlock a m = 1
                theorem Complexity.sat_oneHot_pair_iff {k : } (S : Finset (BooleanAnalysis.Cube k)) (a : BooleanAnalysis.Cube (k + 2 ^ k)) (m m' : Fin (2 ^ k)) (hne : m m') :
                theorem Complexity.sat_oneHot_allowed_iff {k : } (S : Finset (BooleanAnalysis.Cube k)) (a : BooleanAnalysis.Cube (k + 2 ^ k)) (m : Fin (2 ^ k)) (hm : (candIdx k).symm mS) :
                theorem Complexity.sat_oneHot_coord_iff {k : } (S : Finset (BooleanAnalysis.Cube k)) (a : BooleanAnalysis.Cube (k + 2 ^ k)) (i : Fin k) :
                (oneHotOf S (Sum.inr (Sum.inr (Sum.inr i)))).Sat a leftBlock a i + m : Fin (2 ^ k), rightBlock a m * (candIdx k).symm m i = 0

                Exactly one selector #

                theorem Complexity.eq_basis_of_sum_one {T : } (y : Fin TZMod 2) (hsum : m : Fin T, y m = 1) (hpair : ∀ (m m' : Fin T), m m'y m * y m' = 0) :
                ∃ (m₀ : Fin T), y m₀ = 1 ∀ (m : Fin T), m m₀y m = 0

                A 0/1 vector with odd sum and pairwise zero products is a basis vector.

                The characterization #

                Satisfying the one-hot system puts the input in the set.

                noncomputable def Complexity.oneHotExtend {k : } (w : BooleanAnalysis.Cube k) :

                The honest extension of an input: select its own candidate.

                Equations
                Instances For

                  An input in the set satisfies the one-hot system, once extended by its own selector.

                  The one-hot system is satisfiable exactly on the set.