Expand description
Polynomial Calculus / Nullstellensatz over GF(2) — the algebraic proof system that subsumes the
linear cuts (parity is its degree-1 fragment) and, at higher degree, refutes strictly more.
A CNF is unsatisfiable iff the constant polynomial 1 lies in the ideal generated by the clause
polynomials over the multilinear GF(2) ring (where x² = x, so every monomial is squarefree).
At a fixed degree d this is a finite linear-algebra question — is 1 in the GF(2)-span of
{ m · p_C : clause C, monomial m, deg(m·p_C) ≤ d }? — answered by Gaussian elimination. So degree-d
Nullstellensatz is polynomial, and the degree is the power dial: d = 1 recovers parity, larger
d reaches counting-style and beyond. The genuinely hard residue (random) needs degree Θ(n), which
is exactly why it stays hard — there is no low-degree algebraic certificate, just as there is no small
symmetry quotient. The two are the same wall seen from two sides.
Symmetry meets this engine at the monomial basis: an automorphism of the formula permutes monomials, so the Nullstellensatz system has the family’s symmetry and its solution can be sought on the orbit quotient of the basis — the algebraic form of “decide on the quotient.”
Structs§
- NsCertificate
- A constructive Nullstellensatz certificate over the multilinear
GF(2)ring: one coefficient polynomialg_Cper input clause such thatΣ_C p_C · g_C = 1, wherep_C = clause_polynomial(C)is the clause’s false-indicator. The identity is a re-checkable proof of UNSAT — evaluate it at any assignmenta: the right side is1, so somep_C(a) = 1, i.e. every assignment falsifies some clause. Wherenullstellensatz_refutesonly decides whether such a certificate exists, this one carries the witness.
Functions§
- build_
ns_ certificate - The uniform Nullstellensatz completeness construction. For any CNF over
num_vars ≤ 20variables, return either a constructiveNsCertificateproving UNSAT, or a satisfying assignment proving SAT — a total, certifying decision. The construction is the partition of unityΣ_a δ_a = 1: every cornerais charged to one clause it falsifies (a corner that falsifies none is a model — SAT), and the coefficient of clauseCisg_C = Σ_{a charged to C} δ_a. ThenΣ_C p_C · g_C = Σ_a p_{sel(a)} · δ_a = Σ_a δ_a = 1, becausep_{sel(a)}(a) = 1collapsesp·δ_atoδ_aon the cube (multilinear representations are unique). Because this succeeds identically at everyn, it does not merely measure but proves that every unsatisfiable formula has a degree-≤ nGF(2)Nullstellensatz refutation — no minimal-UNSAT family is structureless, at anyn. This is the census’smax_ns_degree = nceiling as a construction, settlingn = 5, 6, …where the orbit census is infeasible. - check_
ns_ lower_ bound - Re-check a
ns_lower_bound_witnesscertificate (zero trust in the producer): the functionalL(given as the monomials on which it is1) must satisfyL(1) = 1andL(m · p_C) = 0for every degree-≤ dgenerator.true⟹Fgenuinely has no degree-dGF(2)Nullstellensatz refutation. - check_
ns_ lower_ bound_ polys - Re-check a
ns_lower_bound_witness_polyscertificate (zero trust in the producer):L(1) = 1andL(m·g) = 0for every admitted generator of the system.true⟹ the generator system genuinely has no degree-dGF(2)Nullstellensatz refutation. Degree-bounded enumeration —num_vars ≤ 63. - clause_
polynomial - The clause polynomial:
1exactly on the clause’s falsifying assignment. The false-indicator of a positive literalxis1 + x({∅, {x}}), of a negative literal¬xisx({{x}}); the clause polynomial is their product. Degree = clause width. - exactly_
one_ linear_ generators - The linear encoding of exactly-one constraints: for each group
Gthe degree-1 generator1 + Σ_{v∈G} x_v(theGF(2)form ofΣ x = 1) plus the pairwise productsx_u·x_vover each group, deduplicated. This is the encoding under which the modular-counting and pigeonhole degree lower bounds are stated in the literature — the wide at-least-one clause is recovered from it modulo the pairs (the interreduction test pins the identity, and the clause→linear direction is degree-preserving, so bounds against this encoding are the stronger statements). The linear generators come first (one per group, in group order), then the pairs. - monomial_
orbits - Symmetry-break Polynomial Calculus at the basis. Partition the degree-≤
degreemonomials into orbits under the formula’s automorphisms. The orbit count is the width of the symmetry-reduced Nullstellensatz system — a symmetric certificate is constant on each orbit, so the Gaussian runs over the quotient instead of allC(n,d)monomials. The same collapse that made the field cuts O(1), inherited by the algebraic engine. (Bounded tonum_vars ≤ 20.) - monomials_
up_ to_ degree - All squarefree monomials of degree
≤ degreeovernum_vars ≤ 63variables, ascending asu64s — enumerated directly (Gosper’s next-k-subset walk per degree class), never touching the2ⁿcube. This is the basis walk that lifts fixed-degree Nullstellensatz work past the clause engine’s 20-variable cap: the count isΣ_{k≤d} C(n,k)(nullstellensatz_basis_size), not2ⁿ. - ns_
lower_ bound_ witness - A re-checkable degree-
dNullstellensatz LOWER-bound certificate. Wherenullstellensatz_refutesdecides whether a degree-drefutation exists, this witnesses its NON-existence: aGF(2)linear functionalLon the degree-≤ dmonomials (a *degree-dpseudo-expectation) withL(1) = 1andL(m · p_C) = 0for every generator. Such anLexists iff1is **not** in theGF(2)-span of the generators, i.e. iff there is no degree-drefutation — soSome(L)certifies the lower boundNS-degree(F) > d, independently re-checkable by [check_ns_lower_bound] (no trust in the solver). The certificate is returned as the list of monomials on whichLis1.Nonemeans a degree-drefutation exists (no lower bound atd). Multi-word linear algebra, so the monomial basis is not size-capped — onlynum_vars ≤ 20` for the explicit basis enumeration. - ns_
lower_ bound_ witness_ on_ basis ns_lower_bound_witnessrestricted to a sub-basis of monomials: the functionalLis sought only on monomialsmwithin_basis(m)(andL = 0elsewhere), while the constraints⟨L, m·p_C⟩ = 0still range over all generators.Some(L)is a fully valid,check_ns_lower_bound-verifiable witness (the restriction only limits the search, not the check);Nonehere means “no witness on this sub-basis” — which, unlike the full-basis version, does not imply a refutation exists. This exposes the structure of a lower bound: e.g. for pigeonhole, the partial-matching sub-basis already carries the certificate.- ns_
lower_ bound_ witness_ polys ns_lower_bound_witnessfor an arbitrary polynomial generator system: a degree-dpseudo-expectationLwithL(1) = 1andL(m·g) = 0for every admitted generator, returned as the monomials whereL = 1.Some(L)certifiesNS-degree > dfor the system (re-checkable bycheck_ns_lower_bound_polys, zero trust in the solver);Nonemeans a degree-drefutation exists. Degree-bounded enumeration —num_vars ≤ 63.- ns_
lower_ bound_ witness_ polys_ on_ basis ns_lower_bound_witness_polysrestricted to a sub-basis: the functionalLis sought only on monomials passingin_basis(L = 0elsewhere), while the constraints⟨L, m·g⟩ = 0still range over all admitted generators — so anySomeis a fully valid,check_ns_lower_bound_polys-verifiable witness, andNonemeans only “no witness on this sub-basis”. The structure probe: which candidate supports carry a family’s lower bound (for pigeonhole this is how the hole-injective support was found and the classical partial-matching support was ruled out overGF(2)). Degree-bounded enumeration —num_vars ≤ 63.- ns_
refutes_ polys - Does a degree-
dNullstellensatz refutation exist overGF(2)for an arbitrary polynomial generator system — is1in theGF(2)-span of{ m·g : deg(m·g) ≤ d }? The clause engine’s question asked of any generators, not just clause polynomials: the substrate for the linear encoding (exactly_one_linear_generators) and the symmetric-family machinery. The multiplier rule is exact — a product is admitted by its degree after multilinear collapse. (For clause polynomials this span equals the clause engine’s: a multiplier overlapping a positive literal kills the product, one overlapping a negative literal absorbs into a smaller multiplier — pinned by the differential test.) Degree-bounded enumeration, so it scales tonum_vars ≤ 63. - nullstellensatz_
basis_ size - The width of the degree-
dNullstellensatz system overnvariables: the count of multilinear monomials of degree≤ d,Σ_{k≤d} C(n,k). Atd = nthis is exactly2ⁿ— so the degree-ncertificate thatbuild_ns_certificatealways produces (completeness: no unsatisfiable formula overnvariables is “structureless”) lives in an exponentially large space. The certificate’s existence is an information-theoretic fact about the finite cube; it is not an efficient algorithm, and it says nothing about P vs NP — which is a statement about the asymptotic growth of a family of instances, not any fixed finiten(a fixed finite problem is decidable by table lookup, vacuously). - nullstellensatz_
refutes - Does a degree-
dNullstellensatz refutation exist overGF(2)? Sound: such a certificate exists only when the formula is unsatisfiable. Complete atd = num_vars(full degree decides any instance). Bounded tonum_vars ≤ 20(the explicit monomial basis). - nullstellensatz_
refutes_ symmetric - Symmetry-reduced Nullstellensatz — the algebraic refutation collapsed by the formula’s symmetry.
Full degree-
dNS asks whether1lies in theGF(2)-span of the generatorsm·p_C, a Gaussian over up toC(n,≤d)monomial columns. When the formula has a symmetry groupG, summing each generator’sG-orbit gives an invariant generator, and every invariant polynomial is constant on the monomial orbits (monomial_orbits) — so the same span check runs over just#orbitscolumns and#generator-orbitsrows. For a symmetric family that is the difference between2^Θ(n)andO(1). - partition_
of_ unity - The partition of unity over the
n-cube:Σ_{a ∈ {0,1}ⁿ} δ_a, the sum of every corner’s point-indicator. It is the constant1for alln— the identity the constructive Nullstellensatz certificate (build_ns_certificate) rests on. Computed here by direct summation (for finite checks);pou_as_productgives the closed form that proves it∀n. - php_
is_ hole_ injective - Is a
PHPmonomial hole-injective — no two of its edges share a hole? Standard PHP forbids two pigeons in one hole but allows a pigeon in several holes, so the at-most-one clauses force theGF(2)pseudo-expectation to vanish exactly on hole-collision monomials — i.e. its support lies in the hole-injective monomials (partial functions hole→pigeon). This is looser than a partial matching (which also forbids pigeon repeats) and is the correctGF(2)support. - php_
is_ partial_ matching - Is a
PHPmonomial a partial matching — an injective partial pigeon→hole map? PHP’s variablex_{p,h}sits at indexp·holes + h(crate::families::php), so a monomial (a set of variables) is a partial matching iff no two of its variables share a pigeon or a hole. This is the support of the Razborov degree lower bound’s pseudo-expectation. - poly_
degree - The degree of a multilinear
GF(2)polynomial: its largest monomial’s popcount (0for the zero polynomial and for the constant1). - polynomial_
calculus_ refutes - Does a degree-
dPolynomial Calculus refutation exist overGF(2)? PC is the dynamic strengthening of Nullstellensatz: start from the clause polynomials and close under (i)GF(2)linear combination and (ii) multiplication by a single variable, keeping every derived polynomial multilinear of degree ≤d; the system is refuted iff the constant1is derived. Because an intermediate linear combination can cancel high-degree terms before the next multiply, degree-dPC certifies a superset of what degree-dNullstellensatz can (which must hit each axiom with a single monomial in one shot). Sound —1is derivable only from an unsatisfiable system — andPC ⊇ NS, so it never refutes fewer. Complete atd = num_vars. Bounded tonum_vars ≤ 20. - pou_
as_ product - The closed form of the partition of unity: the product
Π_{v<n} ((1+x_v) + x_v)of the per-coordinate atoms. By distributivityΣ_a Π_i f_{i,a_i} = Π_i (f_{i,0} + f_{i,1}), this equalspartition_of_unity— a sum of2ⁿproducts rewritten as a product ofnsums. Since every atom is1(pou_atom), the product is1for everyn. This is the ratchet ton = ∞: not2ⁿterms checked one cube at a time, butnidentical unit factors. - pou_
atom - The atom of the partition-of-unity recurrence on variable
v:(1 + x_v) + x_v, which reduces to the constant1in the multilinearGF(2)ring (x_v + x_v = 0). This single identity is the engine of the wholen = ∞ratchet: it is independent ofn, so a product ofncopies of it is1at every scale. - symmetric_
group_ generators - The generators of the full symmetric group
Sₙonnvariables: the adjacent transpositions(i, i+1).Sₙis the symmetry of a fully-symmetric formula (every variable interchangeable), and under it the monomial basis collapses to one orbit per degree — the sharpest instance ofmonomial_orbits’ compression.
Type Aliases§
- Mono
- A multilinear monomial: the bitmask of the variables it contains (
x² = x⟹ squarefree). Theu64mask carries up to 63 variables; the clause engine’s explicit cube enumeration stops at 20, the degree-bounded polynomial engine (monomials_up_to_degree) uses the full range. - Poly
- A multilinear polynomial over
GF(2): the set of monomials with coefficient 1 (XOR/symmetric- difference semantics).