Clause sums #
A clause is a list of literals together with a weight; it contributes its weight when all its
literals hold and 1 otherwise. A clause sum sums the product of the contributions of a family
of clauses over all assignments of the bits (clauseSum). This file adds two variants:
clauseSumWith x: some bits are fixed tox, and the sum runs over the others. Adding one clause for every fixed bit, with the variable of that bit as weight, turns the clause sum into the monomial extension ofclauseSumWith(clauseSum_withInputs).domainClauseSum x: the hidden part is a functiong : ∀ d, E don a finite domain, and a literal aboutgsaysg d = eorg d ≠ e. Through the one-hot encoding ofgand clauses that force one value at every point (oneHotLits,oneHotWeights), it is a clause sum over bits (domainClauseSum_eq_clauseSumWith).
Main definitions #
Cslib.Circuits.Arithmetic.clauseSum,clauseSumWith,domainClauseSum.Cslib.Circuits.Arithmetic.withInputs,inputWeights,oneHotLits,oneHotWeights.
Main results #
Cslib.Circuits.Arithmetic.clauseSum_withInputs.Cslib.Circuits.Arithmetic.domainClauseSum_eq_clauseSumWith,Cslib.Circuits.Arithmetic.domainClauseSum_sumElim.
References #
- Anthropic, VP ≠ VNP over every field, paper and Lean formalization,
modules
Nc.WidePerm,Nc.FinDomandPaper.CircuitPhi(clauseSum_inputs)
A clause sum: the sum, over the bits x, of the product over the clauses κ of the weight
of κ if all its literals hold, and 1 otherwise. A literal (b, e) holds when x b = e.
A clause sum with the bits on ι fixed to x: the sum runs over the bits on α only.
The weights: the constants wt, and the variable of every fixed bit.
Fixed bits as variables. With one clause per fixed bit whose weight is its variable, the clause sum over all bits is the monomial extension of the clause sum with fixed bits.
A clause sum over the functions g : ∀ d, E d, with the bits on ι fixed to x. A literal
(⟨d, e⟩, b) about g says g d = e (for b = true) or g d ≠ e.
The clauses of lits, then one clause per point that no value is taken, then one per pair of
bits that both are set.
Their weights: those of wt, 0 for a point without a value, and 0 for two values at one
point.
Clause sums over finite domains are clause sums over bits: the bits are the one-hot
encoding of the function, and the clauses oneHotLits with weights oneHotWeights kill every
assignment of the bits that is not one.
Clauses whose product does not depend on the function factor out of the sum.