Documentation

CslibFrontier.Computability.Complexity.FineGrained.PPSZ.Basic

PPSZ with w-implication: the success probability #

Let σ satisfy the formula φ. Along a run of PPSZ that agrees with σ, w-implied values are the values of σ (implied_eq). A variable x is forced in the order π when the values of σ on the variables before x w-imply a value on x (Forced). The run in the order π outputs σ with probability exactly 2^{-u}, where u counts the unforced variables (run_apply_restrict). Averaging over the orders and applying the arithmetic–geometric mean inequality, one round outputs σ with probability at least 2^{-n + ∑ₓ Pr_π[x forced]} (round_apply_ge). PPSZ is the oracle round Cslib.Complexity.PPZ.roundWith with implied as the oracle, so these follow from the oracle versions shared with PPZ (PPZ.runWith_apply_restrict, PPZ.roundWith_apply_eq, PPZ.roundWith_apply_ge) once implied values are known to be correct.

A unit clause is a w-implication with w = 1 (wImplied_one_of_forced), so for w ≥ 1 PPSZ outputs every satisfying assignment at least as often as PPZ (ppz_round_apply_le), and the PPZ bound 2^{-(1 - 1/k) n} carries over (round_success_ppz).

Main definitions #

Main results #

References #

w-implication #

theorem Cslib.Complexity.PPSZ.WImplied.eq {n : ℕ} {φ : Logic.PL.CNF (Fin n)} {w : ℕ} {τ : Fin n → Option Bool} {x : Fin n} {b : Bool} (h : WImplied φ w τ x b) {σ : Fin n → Bool} (hσ : Logic.PL.CNF.eval σ φ = true) (hτ : ∀ (y : Fin n) (c : Bool), τ y = some c → σ y = c) :
σ x = b

w-implied values are correct. If σ satisfies φ and agrees with τ where τ is defined, then every value w-implied under τ is the value of σ.

theorem Cslib.Complexity.PPSZ.WImplied.mono {n : ℕ} {φ φ' : Logic.PL.CNF (Fin n)} {w w' : ℕ} {τ τ' : Fin n → Option Bool} {x : Fin n} {b : Bool} (h : WImplied φ w τ x b) (hφ : ∀ c ∈ φ, c ∈ φ') (hw : w ≤ w') (hτ : ∀ (y : Fin n) (c : Bool), τ y = some c → τ' y = some c) :
WImplied φ' w' τ' x b

Monotonicity of w-implication: it survives adding clauses, raising the budget w and extending the partial assignment.

theorem Cslib.Complexity.PPSZ.wImplied_of_implied_eq_some {n : ℕ} {φ : Logic.PL.CNF (Fin n)} {w : ℕ} {τ : Fin n → Option Bool} {x : Fin n} {b : Bool} (h : implied φ w τ x = some b) :
WImplied φ w τ x b

A value returned by implied is w-implied.

theorem Cslib.Complexity.PPSZ.implied_ne_none_iff {n : ℕ} {φ : Logic.PL.CNF (Fin n)} {w : ℕ} {τ : Fin n → Option Bool} {x : Fin n} :
implied φ w τ x ≠ none ↔ ∃ (b : Bool), WImplied φ w τ x b

implied returns a value exactly when some value is w-implied.

theorem Cslib.Complexity.PPSZ.implied_eq {n : ℕ} {φ : Logic.PL.CNF (Fin n)} {w : ℕ} {σ : Fin n → Bool} (hσ : Logic.PL.CNF.eval σ φ = true) {τ : Fin n → Option Bool} (hτ : ∀ (y : Fin n) (b : Bool), τ y = some b → σ y = b) {x : Fin n} {b : Bool} (h : implied φ w τ x = some b) :
σ x = b

Implied values are correct: if σ satisfies φ and agrees with τ where τ is defined, then the value implied on x under τ, if any, is σ x.

theorem Cslib.Complexity.PPSZ.implied_eq_some {n : ℕ} {φ : Logic.PL.CNF (Fin n)} {w : ℕ} {σ : Fin n → Bool} (hσ : Logic.PL.CNF.eval σ φ = true) {τ : Fin n → Option Bool} (hτ : ∀ (y : Fin n) (b : Bool), τ y = some b → σ y = b) {x : Fin n} {b : Bool} (h : WImplied φ w τ x b) :
implied φ w τ x = some b

Under a partial assignment with a satisfying extension, implied returns every w-implied value.

theorem Cslib.Complexity.PPSZ.implied_eq_none_iff {n : ℕ} {φ : Logic.PL.CNF (Fin n)} {w : ℕ} {σ : Fin n → Bool} (hσ : Logic.PL.CNF.eval σ φ = true) {τ : Fin n → Option Bool} (hτ : ∀ (y : Fin n) (b : Bool), τ y = some b → σ y = b) {x : Fin n} :
implied φ w τ x = none ↔ ¬WImplied φ w τ x (σ x)

Under a partial assignment with a satisfying extension σ, no value is implied on x exactly when x = σ x is not w-implied.

Runs #

noncomputable def Cslib.Complexity.PPSZ.unforcedCount {n : ℕ} (φ : Logic.PL.CNF (Fin n)) (w : ℕ) (σ : Fin n → Bool) (π : Equiv.Perm (Fin n)) (i : ℕ) :

The number of unforced variables among the first i steps of the run in the order π that agrees with σ: at these steps PPSZ chooses a uniform bit.

theorem Cslib.Complexity.PPSZ.run_apply_restrict {n : ℕ} {φ : Logic.PL.CNF (Fin n)} {w : ℕ} {σ : Fin n → Bool} (hσ : Logic.PL.CNF.eval σ φ = true) (π : Equiv.Perm (Fin n)) {i : ℕ} :
(run φ w π i) (PPZ.restrict σ (PPZ.prefixSet π i)) = 2⁻¹ ^ unforcedCount φ w σ π i

A run in a fixed order outputs the solution with probability 2^{-u}, after Paturi, Pudlák, Saks, Zane, Lemma 1 and as in Scheder, Observation 1.2, where u counts the unforced variables along the run that agrees with σ. Paturi, Pudlák, Saks, Zane draw the random bits up front and characterise the bit strings for which the run outputs σ; here the bits are drawn during the run, and the probability is computed directly (PPZ.runWith_apply_restrict).

Forced variables and the success probability #

def Cslib.Complexity.PPSZ.Forced {n : ℕ} (φ : Logic.PL.CNF (Fin n)) (w : ℕ) (σ : Fin n → Bool) (π : Equiv.Perm (Fin n)) (x : Fin n) :

x is forced in the order π Scheder, Definition 1.1: along the run that agrees with σ, the values of σ on the variables before x w-imply a value on x.

Instances For
    @[instance_reducible]
    noncomputable instance Cslib.Complexity.PPSZ.instDecidableForced {n : ℕ} (φ : Logic.PL.CNF (Fin n)) (w : ℕ) (σ : Fin n → Bool) (π : Equiv.Perm (Fin n)) (x : Fin n) :
    Decidable (Forced φ w σ π x)

    Forced is decidable, classically through implied.

    theorem Cslib.Complexity.PPSZ.forced_iff_wImplied {n : ℕ} {φ : Logic.PL.CNF (Fin n)} {w : ℕ} {σ : Fin n → Bool} (hσ : Logic.PL.CNF.eval σ φ = true) {π : Equiv.Perm (Fin n)} {x : Fin n} :
    Forced φ w σ π x ↔ WImplied φ w (PPZ.restrict σ (PPZ.prefixSet π ↑((Equiv.symm π) x))) x (σ x)

    For a satisfying assignment σ, x is forced exactly when the values of σ before x w-imply x = σ x, as in Scheder, Definition 1.1.

    theorem Cslib.Complexity.PPSZ.unforcedCount_eq_card {n : ℕ} (φ : Logic.PL.CNF (Fin n)) (w : ℕ) (σ : Fin n → Bool) (π : Equiv.Perm (Fin n)) :
    unforcedCount φ w σ π n = {x : Fin n | ¬Forced φ w σ π x}.card

    The unforced variables of a whole run are the variables that are not forced.

    theorem Cslib.Complexity.PPSZ.round_apply_eq {n : ℕ} {φ : Logic.PL.CNF (Fin n)} {w : ℕ} {σ : Fin n → Bool} (hσ : Logic.PL.CNF.eval σ φ = true) :
    ((round φ w) fun (x : Fin n) => some (σ x)).toReal = ∑ π : Equiv.Perm (Fin n), (↑n.factorial)⁻¹ * (1 / 2) ^ unforcedCount φ w σ π n

    The success probability is an average over the orders Paturi, Pudlák, Saks, Zane, Lemma 2: one round outputs a satisfying assignment σ with probability (1/n!) ∑_π 2^{-u(π)}, where u(π) counts the unforced variables in the order π.

    theorem Cslib.Complexity.PPSZ.round_apply_ge {n : ℕ} {φ : Logic.PL.CNF (Fin n)} {w : ℕ} {σ : Fin n → Bool} (hσ : Logic.PL.CNF.eval σ φ = true) :
    2 ^ (-↑n + ∑ x : Fin n, ↑{π : Equiv.Perm (Fin n) | Forced φ w σ π x}.card / ↑n.factorial) ≤ ((round φ w) fun (x : Fin n) => some (σ x)).toReal

    The success probability in terms of forcing probabilities, after Paturi, Pudlák, Saks, Zane, Lemma 3, in the w-implication form of Scheder, eq. (1): one round outputs a satisfying assignment σ with probability at least 2^{-n + ∑ₓ Pr_π[x forced]}, where Pr_π[x forced] is the fraction of the n! orders in which x is forced.

    theorem Cslib.Complexity.PPSZ.round_apply_ge_of_le {n : ℕ} {φ : Logic.PL.CNF (Fin n)} {w : ℕ} {σ : Fin n → Bool} (hσ : Logic.PL.CNF.eval σ φ = true) {p : ℝ} (hp : ∀ (x : Fin n), p * ↑n.factorial ≤ ↑{π : Equiv.Perm (Fin n) | Forced φ w σ π x}.card) :
    2 ^ (-((1 - p) * ↑n)) ≤ ((round φ w) fun (x : Fin n) => some (σ x)).toReal

    A uniform forcing bound Paturi, Pudlák, Saks, Zane, Lemma 3: if every variable is forced in at least a p fraction of the orders, one round outputs a satisfying assignment σ with probability at least 2^{-(1 - p) n}.

    PPZ as a special case #

    theorem Cslib.Complexity.PPSZ.wImplied_one_of_forced {n : ℕ} {φ : Logic.PL.CNF (Fin n)} {τ : Fin n → Option Bool} {x : Fin n} {b : Bool} (h : PPZ.forced φ τ x = some b) :
    WImplied φ 1 τ x b

    A unit clause is a 1-implication (original): a value forced by a unit clause of φ is w-implied with w = 1.

    theorem Cslib.Complexity.PPSZ.implied_ne_none_of_forced {n : ℕ} {φ : Logic.PL.CNF (Fin n)} {w : ℕ} (hw : 1 ≤ w) {τ : Fin n → Option Bool} {x : Fin n} (h : PPZ.forced φ τ x ≠ none) :
    implied φ w τ x ≠ none

    For w ≥ 1, every variable forced by a unit clause has an implied value (original).

    theorem Cslib.Complexity.PPSZ.unforcedCount_le_ppz {n : ℕ} {φ : Logic.PL.CNF (Fin n)} {w : ℕ} (hw : 1 ≤ w) (σ : Fin n → Bool) (π : Equiv.Perm (Fin n)) (i : ℕ) :
    unforcedCount φ w σ π i ≤ PPZ.unforcedCount φ σ π i

    For w ≥ 1, a run of PPSZ that agrees with σ has at most as many unforced variables as the corresponding run of PPZ (original).

    theorem Cslib.Complexity.PPSZ.ppz_round_apply_le {n : ℕ} {φ : Logic.PL.CNF (Fin n)} {w : ℕ} (hw : 1 ≤ w) {σ : Fin n → Bool} (hσ : Logic.PL.CNF.eval σ φ = true) :
    ((PPZ.round φ) fun (x : Fin n) => some (σ x)) ≤ (round φ w) fun (x : Fin n) => some (σ x)

    PPSZ dominates PPZ (original): for w ≥ 1, one round of PPSZ outputs each satisfying assignment with at least the probability that one round of PPZ does.

    theorem Cslib.Complexity.PPSZ.round_success_ppz {n k w : ℕ} (hk : 1 ≤ k) (hw : 1 ≤ w) {φ : Logic.PL.CNF (Fin n)} {σ : Fin n → Bool} (hσ : Logic.PL.CNF.eval σ φ = true) (huniq : ∀ (τ : Fin n → Bool), Logic.PL.CNF.eval τ φ = true → τ = σ) (hlen : ∀ c ∈ φ, List.length c ≤ k) :
    2 ^ (-((1 - 1 / ↑k) * ↑n)) ≤ ((round φ w) fun (x : Fin n) => some (σ x)).toReal

    The PPZ bound for PPSZ Paturi, Pudlák, Zane: for w ≥ 1, if σ is the only satisfying assignment of a CNF formula on n variables whose clauses have at most k ≥ 1 literals, one round of PPSZ outputs σ with probability at least 2^{-(1 - 1/k) n}.

    theorem Cslib.Complexity.PPSZ.round_success_of_satisfiable_ppz {n k w : ℕ} (hk : 1 ≤ k) (hw : 1 ≤ w) {φ : Logic.PL.CNF (Fin n)} (hsat : φ.Satisfiable) (hlen : ∀ c ∈ φ, List.length c ≤ k) :
    2 ^ (-((1 - 1 / ↑k) * ↑n)) ≤ ((round φ w).toOuterMeasure {τ : Fin n → Option Bool | ∃ (σ : Fin n → Bool), Logic.PL.CNF.eval σ φ = true ∧ τ = fun (x : Fin n) => some (σ x)}).toReal

    The PPZ bound for PPSZ on satisfiable formulas Paturi, Pudlák, Zane: for w ≥ 1 and every satisfiable CNF formula on n variables whose clauses have at most k ≥ 1 literals, one round of PPSZ outputs a satisfying assignment with probability at least 2^{-(1 - 1/k) n}.