Documentation

Atlas.TheoryOfComputation.code.PolyEquivProb

noncomputable def PolyEquivProb.agreementProb {F : Type u_1} [CommRing F] [IsDomain F] [Fintype F] [DecidableEq F] {m : } (p₁ p₂ : MvPolynomial (Fin m) F) :

The probability that two multivariate polynomials p₁, p₂ ∈ F[X_1, …, X_m] agree on a uniformly random point in F^m, defined as the number of points where eval r p₁ = eval r p₂ divided by |F|^m.

Instances For
    theorem PolyEquivProb.equiv_agreement_prob_eq_one {F : Type u_1} [CommRing F] [IsDomain F] [Fintype F] [DecidableEq F] {m : } (p₁ p₂ : MvPolynomial (Fin m) F) (heq : p₁ = p₂) :
    agreementProb p₁ p₂ = 1

    If p₁ = p₂ as polynomials then their agreement probability is 1: they agree on every point of F^m.

    theorem PolyEquivProb.nonequiv_agreement_prob_le_third {F : Type u_1} [CommRing F] [IsDomain F] [Fintype F] [DecidableEq F] {m : } (p₁ p₂ : MvPolynomial (Fin m) F) (hne : p₁ p₂) (hdeg : ∀ (i : Fin m), MvPolynomial.degreeOf i (p₁ - p₂) 1) (hF : 3 * m Fintype.card F) :
    agreementProb p₁ p₂ 1 / 3

    Schwartz–Zippel-style bound: if p₁ ≠ p₂ are multilinear (degree ≤ 1 in each variable) and |F| ≥ 3m, then the probability that p₁ and p₂ agree on a uniformly random point of F^m is at most 1/3.

    noncomputable def PolyEquivProb.boolToField {m : } {F : Type u_1} [CommRing F] (v : Fin mBool) :
    Fin mF

    Embeds a Boolean assignment v : Fin m → Bool into a field point Fin m → F by sending true ↦ 1 and false ↦ 0.

    Instances For
      def PolyEquivProb.boolSupport {m : } (v : Fin mBool) :

      The support of a Boolean vector v : Fin m → Bool, i.e. the set of indices where v i = true.

      Instances For
        noncomputable def PolyEquivProb.multilinearExtension {m : } {F : Type u_1} [CommRing F] (f : (Fin mBool)F) :

        The (unique) multilinear extension of a Boolean function f : {0,1}^m → F to a multivariate polynomial over F. For each subset S ⊆ Fin m we form the indicator polynomial (∏_{i ∈ S} X_i) · (∏_{i ∉ S} (1 - X_i)), weight it by f(1_S), and sum over all subsets.

        Instances For
          theorem PolyEquivProb.indicator_eval_eq_ite {m : } {F : Type u_1} [CommRing F] (S : Finset (Fin m)) (v : Fin mBool) :
          (∏ iS, if v i = true then 1 else 0) * iFinset.univ \ S, (1 - if v i = true then 1 else 0) = if S = boolSupport v then 1 else 0

          Evaluating the indicator polynomial for the subset S at the Boolean point v yields 1 if S equals the support of v and 0 otherwise.

          theorem PolyEquivProb.boolVec_boolSupport {m : } (v : Fin mBool) :
          (fun (i : Fin m) => decide (i boolSupport v)) = v

          The indicator function of boolSupport v agrees with v itself.

          theorem PolyEquivProb.eval_multilinearExtension {m : } {F : Type u_1} [CommRing F] (f : (Fin mBool)F) (v : Fin mBool) :

          Interpolation property: the multilinear extension of f evaluates to f v at every Boolean point v.

          theorem PolyEquivProb.degreeOf_indicator_term_le {m : } {F : Type u_1} [CommRing F] [IsDomain F] (S : Finset (Fin m)) (n : Fin m) (c : F) :

          Each term c · (∏_{i ∈ S} X_i) · (∏_{i ∉ S} (1 - X_i)) in the multilinear extension has degree at most 1 in every variable n.

          The multilinear extension is, indeed, multilinear: it has degree at most 1 in every variable.

          noncomputable def PolyEquivProb.arithmetize {m : } {F : Type u_1} [CommRing F] (bp : BranchingPrograms.BranchingProgram m) :

          Arithmetization of a (read-once) branching program: produce the multilinear extension of its Boolean evaluation function, viewed as a polynomial over F.

          Instances For

            Equivalent branching programs (those computing the same Boolean function) arithmetize to the same multilinear polynomial.

            Conversely, if two branching programs arithmetize to the same polynomial (over an integral domain), they are equivalent as Boolean functions.

            Contrapositive of equiv_of_arithmetize_eq: inequivalent branching programs have distinct arithmetizations.

            The arithmetization of a branching program is multilinear: degree at most 1 in every variable.

            The difference of two arithmetizations is still multilinear (degree ≤ 1 in each variable), as needed to apply the Schwartz–Zippel bound.

            Completeness of the randomized equivalence test for branching programs: equivalent programs always yield agreement probability 1 between their arithmetizations.

            Soundness of the randomized equivalence test: when two branching programs are inequivalent and |F| ≥ 3m, their arithmetizations agree on a random point with probability at most 1/3.

            The combined completeness/soundness statement underlying the BPP algorithm for EQ_ROBP: with |F| ≥ 3m, equivalent branching programs yield agreement probability 1, while inequivalent ones yield agreement probability ≤ 1/3.