Documentation

CslibFrontier.Computability.Complexity.FineGrained.PPSZ.GeneralK

PPSZ for unique k-SAT: the limit of the depth recursion for general k #

For r ∈ [0, 1] the depth recursion Q k (d + 1) r = (r + (1 - r) * Q k d r) ^ (k - 1) increases with d and is bounded by 1. Its limit R k r is the smallest nonnegative fixed point of x ↦ (r + (1 - r) * x) ^ (k - 1) (tendsto_Q, isLeast_R). On [0, 1) the fixed-point equation can be solved for r: r = S k t with S k t = (t ^ (1 / (k - 1)) - t) / (1 - t) (S_R, R_S). For k ≥ 3, R k = 1 on [(k - 2) / (k - 1), 1] and R k is a strictly increasing continuous bijection from [0, (k - 2) / (k - 1)) onto [0, 1) with inverse S k Paturi, Pudlák, Saks, Zane, Claim 1 (p. 352).

The integral of the limit is ∫₀¹ R k = ∫₀¹ (1 - S k) = μ_k / (k - 1), where μ_k = ∑_{j ≥ 1} 1 / (j (j + 1 / (k - 1))) (integral_R); the first equality is the layer-cake formula, and the second integrates 1 - S k t = ∑_{i ≥ 0} (t ^ i - t ^ (i + 1 / (k - 1))) term by term Paturi, Pudlák, Saks, Zane, p. 354. By dominated convergence qbar k d → μ_k / (k - 1) (tendsto_qbar). Combined with the bound 2^{-(1 - qbar k h) n} for unique k-SAT (round_success_of_unique), this gives, for every ε > 0, a bound w such that one round of PPSZ with w-implication outputs the unique satisfying assignment of every k-CNF formula on n variables with probability at least 2^{-(1 - μ_k / (k - 1) + ε) n} (round_success_unique_limit).

For k = 3 the limit is the function R3 of CslibFrontier.Computability.Complexity.FineGrained.PPSZ.Limit (R_three), and comparing the two integrals gives μ_3 = 4 - 4 log 2 (mu_three), that is ∑_{j ≥ 1} 1 / (j (2 j + 1)) = 2 - 2 log 2 (tsum_three).

Main definitions #

Main results #

References #

The limit of the depth recursion #

noncomputable def Cslib.Complexity.PPSZ.R (k : ℕ) (r : ℝ) :

The limit of the depth recursion Paturi, Pudlák, Saks, Zane, p. 352: R k r = sup_d Q k d r. For r ∈ [0, 1] it is the limit of Q k d r as d → ∞ (tendsto_Q) and the smallest nonnegative fixed point of x ↦ (r + (1 - r) * x) ^ (k - 1) (isLeast_R), which is how the paper defines it. Outside [0, 1] the value is not meaningful.

theorem Cslib.Complexity.PPSZ.Q_le_of_le {k d : ℕ} {r x : ℝ} (hr : r ∈ Set.Icc 0 1) (hx : 0 ≤ x) (hfx : (r + (1 - r) * x) ^ (k - 1) ≤ x) :
Q k d r ≤ x

If x ≥ 0 is mapped below itself by the recursion step, then it bounds every Q k d r.

theorem Cslib.Complexity.PPSZ.bddAbove_range_Q {k : ℕ} {r : ℝ} (hr : r ∈ Set.Icc 0 1) :
BddAbove (Set.range fun (d : ℕ) => Q k d r)

The depth recursion is bounded on [0, 1].

theorem Cslib.Complexity.PPSZ.Q_le_R {k : ℕ} {r : ℝ} (hr : r ∈ Set.Icc 0 1) (d : ℕ) :
Q k d r ≤ R k r

Each Q k d r is at most the limit.

theorem Cslib.Complexity.PPSZ.R_nonneg {k : ℕ} {r : ℝ} (hr : r ∈ Set.Icc 0 1) :
0 ≤ R k r

R is nonnegative on [0, 1].

theorem Cslib.Complexity.PPSZ.R_le_one {k : ℕ} {r : ℝ} (hr : r ∈ Set.Icc 0 1) :
R k r ≤ 1

R is at most 1 on [0, 1].

theorem Cslib.Complexity.PPSZ.R_mem_Icc {k : ℕ} {r : ℝ} (hr : r ∈ Set.Icc 0 1) :
R k r ∈ Set.Icc 0 1

R takes values in [0, 1] on [0, 1].

theorem Cslib.Complexity.PPSZ.tendsto_Q {k : ℕ} {r : ℝ} (hr : r ∈ Set.Icc 0 1) :
Filter.Tendsto (fun (d : ℕ) => Q k d r) Filter.atTop (nhds (R k r))

Q k d r tends to R k r Paturi, Pudlák, Saks, Zane, p. 352: for r ∈ [0, 1] the sequence increases and is bounded by 1.

theorem Cslib.Complexity.PPSZ.R_eq {k : ℕ} {r : ℝ} (hr : r ∈ Set.Icc 0 1) :
(r + (1 - r) * R k r) ^ (k - 1) = R k r

R k r is a fixed point of the recursion step.

theorem Cslib.Complexity.PPSZ.R_le_of_le {k : ℕ} {r x : ℝ} (hr : r ∈ Set.Icc 0 1) (hx : 0 ≤ x) (hfx : (r + (1 - r) * x) ^ (k - 1) ≤ x) :
R k r ≤ x

If x ≥ 0 is mapped below itself by the recursion step, then R k r ≤ x.

theorem Cslib.Complexity.PPSZ.isLeast_R {k : ℕ} {r : ℝ} (hr : r ∈ Set.Icc 0 1) :
IsLeast {x : ℝ | 0 ≤ x ∧ (r + (1 - r) * x) ^ (k - 1) = x} (R k r)

R k r is the smallest nonnegative fixed point of the recursion step, the definition of Paturi, Pudlák, Saks, Zane, p. 352.

R k is monotone on [0, 1].

theorem Cslib.Complexity.PPSZ.R_le_iff {k : ℕ} {r x : ℝ} (hr : r ∈ Set.Icc 0 1) :
R k r ≤ x ↔ ∃ y ∈ Set.Icc 0 x, (r + (1 - r) * y) ^ (k - 1) ≤ y

R k r ≤ x if and only if some y ∈ [0, x] is mapped below itself by the recursion step.

The inverse of the limit #

noncomputable def Cslib.Complexity.PPSZ.S (k : ℕ) (t : ℝ) :

The inverse of the limit Paturi, Pudlák, Saks, Zane, p. 352: S k t = (t ^ (1 / (k - 1)) - t) / (1 - t). Solving the fixed-point equation t = (r + (1 - r) * t) ^ (k - 1) with t ∈ [0, 1) for r gives r = S k t (pow_add_one_sub_mul_eq_self_iff). The paper sets S k 1 = (k - 2) / (k - 1), the limit at 1; here S k 1 = 0, which changes no statement below.

noncomputable def Cslib.Complexity.PPSZ.mu (k : ℕ) :

The constant μ_k = ∑_{j ≥ 1} 1 / (j (j + 1 / (k - 1))) of Paturi, Pudlák, Saks, Zane, p. 342, indexed from j = 0 here. The savings of PPSZ on unique k-SAT are μ_k / (k - 1) (round_success_unique_limit). The paper defines μ_k only for k ≥ 2; for k ≤ 1 the value mu k is a junk value.

theorem Cslib.Complexity.PPSZ.S_nonneg {k : ℕ} {t : ℝ} (hk : 2 ≤ k) (ht : t ∈ Set.Ico 0 1) :
0 ≤ S k t

S k is nonnegative on [0, 1).

theorem Cslib.Complexity.PPSZ.pow_add_one_sub_mul_le_self_iff {k : ℕ} {r t : ℝ} (hk : 2 ≤ k) (hr : r ∈ Set.Icc 0 1) (ht : t ∈ Set.Ico 0 1) :
(r + (1 - r) * t) ^ (k - 1) ≤ t ↔ r ≤ S k t

The fixed-point inequality (original): for t ∈ [0, 1), the recursion step maps t below itself if and only if r ≤ S k t.

theorem Cslib.Complexity.PPSZ.pow_add_one_sub_mul_eq_self_iff {k : ℕ} {r t : ℝ} (hk : 2 ≤ k) (hr : r ∈ Set.Icc 0 1) (ht : t ∈ Set.Ico 0 1) :
(r + (1 - r) * t) ^ (k - 1) = t ↔ r = S k t

The fixed-point equation solved for r Paturi, Pudlák, Saks, Zane, proof of Claim 1 (p. 352): for t ∈ [0, 1), t is a fixed point of the recursion step if and only if r = S k t.

theorem Cslib.Complexity.PPSZ.monotoneOn_S {k : ℕ} (hk : 2 ≤ k) :
MonotoneOn (S k) (Set.Ico 0 1)

S k is monotone on [0, 1).

theorem Cslib.Complexity.PPSZ.S_lt_one {k : ℕ} {t : ℝ} (hk : 2 ≤ k) (ht : t ∈ Set.Ico 0 1) :
S k t < 1

S k t < 1 on [0, 1).

S k is strictly monotone on [0, 1) for k ≥ 3.

theorem Cslib.Complexity.PPSZ.S_lt {k : ℕ} {t : ℝ} (hk : 3 ≤ k) (ht : t ∈ Set.Ico 0 1) :
S k t < (↑k - 2) / (↑k - 1)

For k ≥ 3, S k t < (k - 2) / (k - 1) on [0, 1).

theorem Cslib.Complexity.PPSZ.S_mem_Ico {k : ℕ} {t : ℝ} (hk : 3 ≤ k) (ht : t ∈ Set.Ico 0 1) :
S k t ∈ Set.Ico 0 ((↑k - 2) / (↑k - 1))

S k maps [0, 1) into [0, (k - 2) / (k - 1)) for k ≥ 3.

theorem Cslib.Complexity.PPSZ.R_le_iff_le_S {k : ℕ} {r t : ℝ} (hk : 2 ≤ k) (hr : r ∈ Set.Icc 0 1) (ht : t ∈ Set.Ico 0 1) :
R k r ≤ t ↔ r ≤ S k t

R k r ≤ t if and only if r ≤ S k t (original), for r ∈ [0, 1] and t ∈ [0, 1).

theorem Cslib.Complexity.PPSZ.lt_R_iff {k : ℕ} {r t : ℝ} (hk : 2 ≤ k) (hr : r ∈ Set.Icc 0 1) (ht : t ∈ Set.Ico 0 1) :
t < R k r ↔ S k t < r

t < R k r if and only if S k t < r, for r ∈ [0, 1] and t ∈ [0, 1).

theorem Cslib.Complexity.PPSZ.S_R {k : ℕ} {r : ℝ} (hk : 2 ≤ k) (hr : r ∈ Set.Icc 0 1) (hR : R k r < 1) :
S k (R k r) = r

S k inverts R k where R k < 1 [Paturi, Pudlák, Saks, Zane, Claim 1 (p. 352)] [PPSZ05]: if R k r < 1, then r = (R k r ^ (1 / (k - 1)) - R k r) / (1 - R k r).

theorem Cslib.Complexity.PPSZ.R_S {k : ℕ} {t : ℝ} (hk : 3 ≤ k) (ht : t ∈ Set.Ico 0 1) :
R k (S k t) = t

R k inverts S k [Paturi, Pudlák, Saks, Zane, Claim 1 (p. 352)] [PPSZ05]: R k (S k t) = t for t ∈ [0, 1) and k ≥ 3.

theorem Cslib.Complexity.PPSZ.R_eq_one {k : ℕ} {r : ℝ} (hk : 3 ≤ k) (hr : (↑k - 2) / (↑k - 1) ≤ r) (hr1 : r ≤ 1) :
R k r = 1

R k = 1 on [(k - 2) / (k - 1), 1] [Paturi, Pudlák, Saks, Zane, Claim 1 (p. 352)] [PPSZ05], for k ≥ 3.

theorem Cslib.Complexity.PPSZ.R_lt_one {k : ℕ} {r : ℝ} (hk : 3 ≤ k) (hr0 : 0 ≤ r) (hr : r < (↑k - 2) / (↑k - 1)) :
R k r < 1

R k < 1 on [0, (k - 2) / (k - 1)) [Paturi, Pudlák, Saks, Zane, Claim 1 (p. 352)] [PPSZ05], for k ≥ 3: S k t tends to (k - 2) / (k - 1) as t → 1, so some t < 1 has r ≤ S k t, hence R k r ≤ t.

theorem Cslib.Complexity.PPSZ.strictMonoOn_R {k : ℕ} (hk : 3 ≤ k) :
StrictMonoOn (R k) (Set.Icc 0 ((↑k - 2) / (↑k - 1)))

R k is strictly increasing on [0, (k - 2) / (k - 1)] Paturi, Pudlák, Saks, Zane, Claim 1 (p. 352), for k ≥ 3.

theorem Cslib.Complexity.PPSZ.bijOn_R {k : ℕ} (hk : 3 ≤ k) :
Set.BijOn (R k) (Set.Ico 0 ((↑k - 2) / (↑k - 1))) (Set.Ico 0 1)

R k is a bijection from [0, (k - 2) / (k - 1)) onto [0, 1) Paturi, Pudlák, Saks, Zane, Claim 1 (p. 352), for k ≥ 3; its inverse is S k (S_R, R_S).

R k is continuous on [0, 1] [Paturi, Pudlák, Saks, Zane, Claim 1 (p. 352)] [PPSZ05], for k ≥ 3: it is monotone and maps [0, 1] onto [0, 1].

The integral of the limit #

theorem Cslib.Complexity.PPSZ.integral_R_eq_integral_one_sub_S {k : ℕ} (hk : 2 ≤ k) :
∫ (r : ℝ) in 0..1, R k r = ∫ (t : ℝ) in 0..1, 1 - S k t

The layer-cake step Paturi, Pudlák, Saks, Zane, p. 354: ∫₀¹ R k r dr = ∫₀¹ (1 - S k t) dt, since {r ∈ (0, 1] | t < R k r} = (S k t, 1] for t ∈ (0, 1) (lt_R_iff).

theorem Cslib.Complexity.PPSZ.summable_mu {k : ℕ} (hk : 2 ≤ k) :
Summable fun (j : ℕ) => 1 / ((↑j + 1) * (↑j + 1 + 1 / (↑k - 1)))

The series defining μ_k converges for k ≥ 2.

theorem Cslib.Complexity.PPSZ.integral_one_sub_S {k : ℕ} (hk : 2 ≤ k) :
∫ (t : ℝ) in 0..1, 1 - S k t = mu k / (↑k - 1)

The integral of 1 - S k Paturi, Pudlák, Saks, Zane, p. 354: ∫₀¹ (1 - S k t) dt = μ_k / (k - 1) for k ≥ 2. On [0, 1), 1 - S k t = (1 - t ^ (1 / (k - 1))) / (1 - t), whose integral is computed term by term.

theorem Cslib.Complexity.PPSZ.integral_R {k : ℕ} (hk : 2 ≤ k) :
∫ (r : ℝ) in 0..1, R k r = mu k / (↑k - 1)

The integral of the limit [Paturi, Pudlák, Saks, Zane, Lemma 8 and p. 354] [PPSZ05]: ∫₀¹ R k r dr = μ_k / (k - 1) for k ≥ 2. The paper states it for k ≥ 3.

theorem Cslib.Complexity.PPSZ.mu_div_eq_tsum {k : ℕ} (hk : 2 ≤ k) :
mu k / (↑k - 1) = ∑' (j : ℕ), 1 / ((↑j + 1) * ((↑k - 1) * (↑j + 1) + 1))

The equivalent form μ_k / (k - 1) = ∑_{j ≥ 1} 1 / (j ((k - 1) j + 1)), indexed from j = 0 here.

The limit of qbar k and unique k-SAT #

theorem Cslib.Complexity.PPSZ.tendsto_qbar {k : ℕ} (hk : 2 ≤ k) :

qbar k d tends to μ_k / (k - 1) for k ≥ 2, by dominated convergence from tendsto_Q and integral_R [Paturi, Pudlák, Saks, Zane, Lemma 8 and p. 354] [PPSZ05].

theorem Cslib.Complexity.PPSZ.qbar_le_mu_div {k : ℕ} (hk : 2 ≤ k) (d : ℕ) :
qbar k d ≤ mu k / (↑k - 1)

qbar k d ≤ μ_k / (k - 1) for every depth d.

theorem Cslib.Complexity.PPSZ.exists_le_qbar {k : ℕ} (hk : 2 ≤ k) {ε : ℝ} (hε : 0 < ε) :
∃ (h : ℕ), mu k / (↑k - 1) - ε ≤ qbar k h

For every ε > 0, some depth h has qbar k h ≥ μ_k / (k - 1) - ε.

theorem Cslib.Complexity.PPSZ.round_success_unique_limit {k : ℕ} (hk : 2 ≤ k) (ε : ℝ) :
ε > 0 → ∃ (w : ℕ), ∀ (n : ℕ) (φ : Logic.PL.CNF (Fin n)) (σ : Fin n → Bool), Logic.PL.CNF.eval σ φ = true → (∀ (τ : Fin n → Bool), Logic.PL.CNF.eval τ φ = true → τ = σ) → (∀ c ∈ φ, List.length c ≤ k) → 2 ^ (-((1 - mu k / (↑k - 1) + ε) * ↑n)) ≤ ((round φ w) fun (x : Fin n) => some (σ x)).toReal

PPSZ for unique k-SAT Paturi, Pudlák, Saks, Zane, Theorem 1(ii), for PPSZ with w-implication. Let k ≥ 2. For every ε > 0 there is a bound w such that, for every n, one round of PPSZ with w-implication outputs the unique satisfying assignment σ of any CNF formula φ on n variables whose clauses have at most k literals with probability at least 2^{-(1 - μ_k / (k - 1) + ε) n}, where μ_k = ∑_{j ≥ 1} 1 / (j (j + 1 / (k - 1))) (mu).

Paturi, Pudlák, Saks, Zane, Theorem 1(ii) states, for k ≥ 3 and uniquely satisfiable k-CNF formulas, the lower bound 2^{-(1 - μ_k / (k - 1)) n - o(n)}; the o(n) term comes from its resolution bound s(n) growing with n. The form here, 2^{-(1 - μ_k / (k - 1) + ε) n} for every ε > 0 with w depending only on k and ε, is the ε-form of that bound. Letting w grow slowly with n would turn it into a lower bound 2^{-(1 - μ_k / (k - 1)) n - o(n)}, uniformly over all such formulas; that form is not formalized here. The paper uses s-bounded resolution in place of w-implication; the per-variable analysis is the same Scheder, p. 3. Scheder, Theorem 1.3 states the bound with the constant s_k := Pr[T finite] of its infinite-tree analysis, where s_k = μ_k / (k - 1). The case k = 2, where μ_2 = 1, is included because the proof covers it.

The case k = 3 #

theorem Cslib.Complexity.PPSZ.R_three {r : ℝ} (hr : r ∈ Set.Icc 0 1) :
R 3 r = R3 r

For k = 3 the limit is the explicit function R3.

μ_3 = 4 - 4 log 2 Paturi, Pudlák, Saks, Zane, p. 342, by comparing tendsto_qbar with tendsto_qbar_three.

theorem Cslib.Complexity.PPSZ.tsum_three :
∑' (j : ℕ), 1 / ((↑j + 1) * (2 * (↑j + 1) + 1)) = 2 - 2 * Real.log 2

∑_{j ≥ 1} 1 / (j (2 j + 1)) = 2 - 2 log 2, indexed from j = 0 here.