Documentation

CslibFrontier.Logics.Propositional.Algebraic.Nullstellensatz.Proof

Nullstellensatz proofs #

A Nullstellensatz proof of a polynomial q from a list F of input polynomials is an identity ∑ i, F.get i * P i = q (Cslib.Logic.PL.NS.IsProof), where the certificate P is a family of polynomial multipliers. A refutation proves 1, expressing a contradiction from the input equations f = 0. Proofs are sound: every common zero of the inputs is a zero of the proved polynomial, so over nontrivial coefficients a refutable system has no common zero.

Coefficients lie in a commutative semiring. The certificate identity uses addition and multiplication, and input equations supply the axioms for the chosen encoding and basis. The standard field setting is described in de Rezende et al., §8.1, p. 217.

The size follows the source's definition ∑ i, ‖p i‖ * ‖f i‖, where ‖g‖ counts the nonzero monomials of g. It counts pairs of input and multiplier monomials before the products are collected. The degree bounds input degree plus multiplier degree for each nonzero multiplier, and is 0 when every multiplier is zero. A nonzero multiplier of a zero input still contributes its degree. These measures concern formal polynomials before any Boolean reduction.

If every input has total degree at most d₀, a refutation can be replaced without increasing its size by one of degree at most d₀ times the original size (NS.IsProof.exists_degree_le_mul_size). The auxiliary gap-truncation argument proved here replaces the multipliers by their low-degree parts.

Main definitions #

Main results #

References #

Complexity measures #

def Cslib.Logic.PL.NS.size {V : Type u_1} {R : Type u_2} [CommSemiring R] (F : List (MvPolynomial V R)) (P : Fin F.length → MvPolynomial V R) :

The monomial size of an NS certificate, the sum of products of input and multiplier support sizes, as in [DeRezendeEtAl2021, §8.1].

def Cslib.Logic.PL.NS.degree {V : Type u_1} {R : Type u_2} [CommSemiring R] (F : List (MvPolynomial V R)) (P : Fin F.length → MvPolynomial V R) :

The degree of an NS certificate, ignoring zero multipliers and returning 0 when every multiplier is zero. A nonzero multiplier of a zero input polynomial still contributes its degree.

theorem Cslib.Logic.PL.NS.degree_le_iff {V : Type u_1} {R : Type u_2} [CommSemiring R] {F : List (MvPolynomial V R)} {P : Fin F.length → MvPolynomial V R} {d : ℕ} :
degree F P ≤ d ↔ ∀ (i : Fin F.length), P i ≠ 0 → (F.get i).totalDegree + (P i).totalDegree ≤ d

An NS certificate has degree at most d exactly when every term with a nonzero multiplier has input degree plus multiplier degree at most d.

Proofs #

def Cslib.Logic.PL.NS.IsProof {V : Type u_1} {R : Type u_2} [CommSemiring R] (F : List (MvPolynomial V R)) (P : Fin F.length → MvPolynomial V R) (q : MvPolynomial V R) :

The certificate P forms a Nullstellensatz proof of q from F: ∑ i, F.get i * P i = q.

theorem Cslib.Logic.PL.NS.IsProof.single {V : Type u_1} {R : Type u_2} [CommSemiring R] (F : List (MvPolynomial V R)) (i : Fin F.length) :
IsProof F (Pi.single i 1) (F.get i)

An input polynomial has a proof with multiplier 1 at its index and 0 elsewhere.

theorem Cslib.Logic.PL.NS.IsProof.add {V : Type u_1} {R : Type u_2} [CommSemiring R] {F : List (MvPolynomial V R)} {P Q : Fin F.length → MvPolynomial V R} {p q : MvPolynomial V R} (hP : IsProof F P p) (hQ : IsProof F Q q) :
IsProof F (fun (i : Fin F.length) => P i + Q i) (p + q)

Adding NS proofs gives a proof of the sum of their target polynomials.

theorem Cslib.Logic.PL.NS.IsProof.mul_left {V : Type u_1} {R : Type u_2} [CommSemiring R] {F : List (MvPolynomial V R)} {P : Fin F.length → MvPolynomial V R} {q : MvPolynomial V R} (h : IsProof F P q) (p : MvPolynomial V R) :
IsProof F (fun (i : Fin F.length) => p * P i) (p * q)

Multiplying every multiplier by p proves p times the original target.

theorem Cslib.Logic.PL.NS.IsProof.eval_eq_zero {V : Type u_1} {R : Type u_2} [CommSemiring R] {F : List (MvPolynomial V R)} {P : Fin F.length → MvPolynomial V R} {q : MvPolynomial V R} (h : IsProof F P q) {x : V → R} (hx : ∀ f ∈ F, (MvPolynomial.eval x) f = 0) :

Soundness. Every common zero of the inputs is a zero of the proved polynomial.

theorem Cslib.Logic.PL.NS.IsProof.exists_eval_ne_zero {V : Type u_1} {R : Type u_2} [CommSemiring R] [Nontrivial R] {F : List (MvPolynomial V R)} {P : Fin F.length → MvPolynomial V R} (h : IsProof F P 1) (x : V → R) :
∃ f ∈ F, (MvPolynomial.eval x) f ≠ 0

Over nontrivial coefficients, a refutation leaves no common zero of the inputs: at every point some input does not vanish.

theorem Cslib.Logic.PL.NS.IsProof.exists_degree_le_mul_size {V : Type u_1} {R : Type u_2} [CommSemiring R] {F : List (MvPolynomial V R)} {P : Fin F.length → MvPolynomial V R} (hP : IsProof F P 1) {d₀ : ℕ} (hd₀ : ∀ f ∈ F, f.totalDegree ≤ d₀) :
∃ (Q : Fin F.length → MvPolynomial V R), IsProof F Q 1 ∧ size F Q ≤ size F P ∧ degree F Q ≤ d₀ * size F P

If every input has degree at most d₀, an NS refutation has a replacement certificate of no larger size and degree at most d₀ * size F P. This auxiliary bound is proved by truncating the multipliers at a gap in their monomial degrees.

def Cslib.Logic.PL.NS.RefutableInSize {V : Type u_1} {R : Type u_2} [CommSemiring R] (F : List (MvPolynomial V R)) (s : ℕ) :

F has a Nullstellensatz refutation of size at most s.

def Cslib.Logic.PL.NS.RefutableInDegree {V : Type u_1} {R : Type u_2} [CommSemiring R] (F : List (MvPolynomial V R)) (d : ℕ) :

F has a Nullstellensatz refutation of degree at most d.