The value of an assignment and of a randomized assignment #
The value of an assignment σ : V → D for a CSP instance F, read as a list (multiset) of
constraints, is the fraction of the constraints of F that σ satisfies
(Logic.PL.CSP.satFraction) O'Donnell, Definition 7.26; it is also the
probability that the tester which checks a uniformly random constraint of F accepts σ.
Over the Boolean domain, a randomized assignment labels each variable v with a random sign of
mean g v ∈ [-1, 1], so true, the sign -1, with probability (1 - g v) / 2. A constraint is
satisfied with the probability that its relation holds at independent random bits with the means
g of the variables of its scope (Logic.PL.Constraint.satProb), position by position, so a
variable that is repeated in a scope is drawn afresh at each position
O'Donnell, Exercise 7.22. This is the multilinear (Fourier) expansion of the
relation evaluated at those means (Logic.PL.Constraint.satProb_eq_sum_fourierCoeff)
O'Donnell, Exercise 7.20(c), or equivalently its multilinearExtension at the
probabilities of true (Logic.PL.Constraint.satProb_eq_eval_multilinearExtension). The value
of the randomized assignment is the average of these probabilities over the constraints
(Logic.PL.CSP.expectedSatFraction). Labelling every variable with the sign of an ordinary
assignment σ recovers its value (Logic.PL.CSP.expectedSatFraction_signVal). Signs read the
Boolean true as -1, so σ is labelled with means signVal (σ v). For means in [-1, 1]
both values lie in [0, 1] (Logic.PL.CSP.expectedSatFraction_mem_Icc,
Logic.PL.CSP.satFraction_mem_Icc).
Both values are one minus the fraction of the constraints that fail, so an empty instance has
value 1, as for Complexity.GapTwoCSP, whose value is 1 - unsatVal. On a nonempty instance
they are the satisfied fractions (Logic.PL.CSP.satFraction_of_ne_nil,
Logic.PL.CSP.expectedSatFraction_of_ne_nil).
Usage #
Open Cslib.Logic.PL. F.satFraction sem σ and F.expectedSatFraction sem g take the truth
tables sem : Rel → List Bool → Bool of the constraint language; for a constraint with a concrete
relation, compute satProb from the multilinear expansion of its predicate
(Logic.PL.Constraint.satProb_eq_sum_fourierCoeff), as Logic.PL.CSP.satProb_paritySem does for
linear equations. An instance listing one constraint for each outcome of a uniform choice over a
nonempty Finset (s.toList.map c) has value the expectation over that choice
(Logic.PL.CSP.satFraction_map_toList, Logic.PL.CSP.expectedSatFraction_map_toList). The checked
clients in CslibFrontierTests/BooleanAnalysisHastadTest.lean
evaluate a constraint whose scope repeats a variable, which is read position by position, so
x₀ + x₀ + x₂ = false at means 1/2, 1/2, 1 holds with probability 5/8, not 1.
Main definitions #
Cslib.Logic.PL.CSP.satFraction: the value of an assignment.Cslib.Logic.PL.Constraint.satProb,Cslib.Logic.PL.CSP.expectedSatFraction: the probability that a constraint is satisfied by a randomized Boolean assignment, and the value of the randomized assignment.
Main results #
Cslib.Logic.PL.Constraint.satProb_eq_sum_fourierCoeff,Cslib.Logic.PL.Constraint.satProb_eq_eval_multilinearExtension: the multilinear expansion.Cslib.Logic.PL.Constraint.satProb_signVal,Cslib.Logic.PL.CSP.expectedSatFraction_signVal: at the signs of an assignment, the value of the assignment.Cslib.Logic.PL.Constraint.satProb_nonneg,Cslib.Logic.PL.Constraint.satProb_le_one,Cslib.Logic.PL.CSP.expectedSatFraction_mem_Icc,Cslib.Logic.PL.CSP.satFraction_mem_Icc: the values are probabilities.Cslib.Logic.PL.CSP.satFraction_of_ne_nil,Cslib.Logic.PL.CSP.expectedSatFraction_of_ne_nil: the satisfied fractions of a nonempty instance.Cslib.Logic.PL.CSP.satFraction_map_toList,Cslib.Logic.PL.CSP.expectedSatFraction_map_toList: the value of an instance listing one constraint for each outcome of a uniformly random choice, as an expectation over the choice.
References #
The probability that the constraint c is satisfied by the randomized assignment g: each
position i of the scope gets an independent random bit whose sign has mean g of the variable
at that position, so true with probability (1 - g v) / 2, and the relation is evaluated at the
list of these bits O'Donnell, Exercises 7.20 and 7.22. It is a probability when
g takes values in [-1, 1] (satProb_nonneg, satProb_le_one).
The defining formula of satProb.
The multilinear expansion O'Donnell, Exercise 7.20(c): the probability that a constraint is satisfied by a randomized assignment is the Fourier expansion of its relation, read on bit strings of the length of its scope, evaluated at the means of the scope.
The probability that a constraint is satisfied by a randomized assignment is the
multilinearExtension of its relation at the probabilities (1 - g v) / 2 that the positions of
its scope are true.
At the signs of an assignment σ, the probability that a constraint is satisfied is 1 if
σ satisfies it and 0 otherwise.
The value of the assignment σ for the instance F: the fraction of the constraints of F,
counted with multiplicity, that σ satisfies O'Donnell, Definition 7.26, written
as one minus the fraction that σ fails, so that it is 1 for the empty instance.
The defining formula of satFraction.
The value of the randomized assignment g for the instance F: the average, over the
constraints of F counted with multiplicity, of the probability that g satisfies them
O'Donnell, Exercise 7.20, written as one minus the average probability that they
fail, so that it is 1 for the empty instance.
The defining formula of expectedSatFraction.
An instance listing one constraint per outcome of a random choice: the value of a
randomized assignment is the expectation, over a uniformly random element s of a nonempty
finite set, of the probability that it satisfies the constraint c s.
An instance listing one constraint per outcome of a random choice: the value of an
assignment is the probability, over a uniformly random element s of a nonempty finite set, that
it satisfies the constraint c s.