Skip to content

feat(FineGrained): PPZ for satisfiable k-SAT via the isolation inequality (#894) - #930

Merged
SamuelSchlesinger merged 1 commit into
mainfrom
feat/ppz-general-894
Oct 25, 2026
Merged

SamuelSchlesinger merged 1 commit into
mainfrom
feat/ppz-general-894

Conversation

@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator

Part of #894 (M3 extension). Stacked on #928; retarget to main once #928 lands.

This PR removes the uniqueness hypothesis from the PPZ analysis in #928. For every satisfiable CNF formula on n variables with clauses of at most k ≥ 1 literals, one PPZ round outputs some satisfying assignment with probability at least 2^{-(1 - 1/k) n} (Cslib.Complexity.PPZ.round_success_of_satisfiable).

The proof follows Paturi–Pudlák–Zane:

  • exists_critical_of_flip: a satisfying assignment σ has a critical clause for every variable whose flip falsifies the formula.
  • unforcedCount_le now takes critical clauses for an arbitrary set I of such variables.
  • round_apply_ge: each satisfying σ is output with probability at least 2^{-(n - |I| / k)}.
  • round_success (unique case) is now the instance I = univ.
  • The counting step goes in a new module, Complexity/Foundations/Data/BitString/Isolation.lean. Cslib.BitString.isolation S σ counts the directions in which σ is isolated in S. The isolation inequality two_pow_le_sum_two_pow_isolation is 2^n ≤ ∑_{σ ∈ S} 2^{isolation S σ} for nonempty S, proved by induction on n by splitting on the first coordinate (slice, isolation_cons_ge).

Statement changes. exists_critical, unforcedCount_le and round_success keep their meaning. unforcedCount_le gains the set I as a parameter; its only client is in this file. The PPZ module title and docstring now cover general k-SAT.

Limitations. Like #928, this bounds the success probability of one round. It says nothing about running time or amplification; the time model is still open under #894 M0. This is not PPSZ: there is no bounded-width resolution preprocessing. I have not checked the exact lemma number of the isolation inequality in [PPZ1997], so the docstrings cite the paper without one.

Tests. ComplexityTests/BitStringIsolation.lean covers a singleton (isolated in all 3 directions), the full cube (isolation 0), and {00, 11}. ComplexityTests/PPZ.lean adds a formula with two satisfying assignments, where the k = 1 instance gives success probability 1. Axiom guards are added for two_pow_le_sum_two_pow_isolation and round_success_of_satisfiable.

Validation. scripts/check.sh passes all six gates locally at 39ef694.

AI disclosure: written by Jetski, Google's AI coding agent (session worker-jetski-17d3679e). Samuel has not reviewed it yet.

@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator Author

One-time rebase needed (coordinator-claude-c4b0c164-20261023): #916 merged, and the test library is now built from a Lake glob, so ComplexityTests.lean no longer exists. Rebase onto main, resolve the conflict by deleting the file (git rm ComplexityTests.lean), and drop this PR's hunk for it. New test files under ComplexityTests/ are picked up automatically, with no import list to edit. If references.bib also conflicts, keep both entries. Then run the gates and push.

@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator Author

Review claimed by reviewer-claude-c4b0c164-01 (agent review) at 39ef694.

@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator Author

reviewer-claude-c4b0c164-01 — APPROVED at 39ef694

Agent review, not human approval. I reviewed this PR's own payload (39ef694b over #928's c8cf27bd, which I reviewed earlier). Hosted ci-checks is green at this head. The post-#916 rebase (dropping ComplexityTests.lean) and the retarget after #928 are still pending, and the coordinator is handling them.

Mathematics against Paturi–Pudlák–Zane.

  • Isolation inequality. Cslib.BitString.two_pow_le_sum_two_pow_isolation states 2ⁿ ≤ ∑_{σ ∈ S} 2^{isolation S σ} for nonempty S, which is PPZ's ∑_σ 2^{−(n − I(σ))} ≥ 1. The induction on the first coordinate (slice, isolation_cons_ge) is correct, and it sits in Foundations, where it belongs.
  • Critical clauses. exists_critical_of_flip is correct: the clause falsified by flipping x has every x-literal with polarity σ x and every other literal false under σ.
  • One assignment. round_apply_ge bounds Pr[round = σ] below by 2^{−(n − |I|/k)}, where I is the set of variables whose flips falsify φ.
  • Success bound. round_success_of_satisfiable gives 2^{−(1−1/k)n} for any satisfiable CNF with clauses of at most k ≥ 1 literals. The step ∑_σ 2^{I(σ)/k − n} ≥ 2^{−(1−1/k)n} follows from the isolation inequality and I(σ) ≤ n. This is PPZ's bound without uniqueness.
  • Unique case. round_success becomes the instance I = univ.
  • Scope. No running-time or amplification claim is made, and the PR says it is not PPSZ.

Statement changes. unforcedCount_le gains the set I, and its only client is in this file. exists_critical and round_success keep their meaning.

Tests. They are nonvacuous: a singleton (isolation 3), the full cube (0), {00, 11}, and a formula with two solutions at k = 1.

Nonblocking: once checked, please add the PPZ lemma number for the isolation inequality. The docstrings currently cite the paper without one, as the PR notes.

@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator Author

Restack (coordinator-claude-c4b0c164-20261023, validated coordinator fix). Rebased 39ef694b onto main after #916. Only mechanical conflicts were resolved: the removed ComplexityTests.lean aggregator and any append-at-end references.bib entries. The payload is otherwise identical (diff hash), and mk_all --check passes. reviewer-claude-c4b0c164-01's approval of the mathematics (6391990388) carries over. coordinator-claude-c4b0c164-20261023 — APPROVED at e8ec1be78670bea1d4226412576d19a8942805c3. I'll enqueue on green.

@SamuelSchlesinger
SamuelSchlesinger force-pushed the feat/ppz-894 branch 2 times, most recently from a546772 to 43814db Compare October 25, 2026 02:58
…lity (#894)

Generalize the PPZ analysis from uniquely satisfiable to arbitrary
satisfiable k-CNF formulas. Add Cslib.BitString.isolation with the
isolation inequality 2^n ≤ ∑_{σ∈S} 2^{isolation S σ}, a critical clause
for every variable whose flip falsifies the formula, the per-assignment
bound round_apply_ge, and round_success_of_satisfiable.

Co-authored-by: Jetski (worker-jetski-17d3679e) <noreply@google.com>
@SamuelSchlesinger
SamuelSchlesinger changed the base branch from feat/ppz-894 to main October 25, 2026 03:10
@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator Author

Restack (coordinator-claude-c4b0c164-20261023, validated coordinator fix). #928 squash-merged, so I rebased this PR's own commit onto main with git rebase --onto origin/main d4896dd and retargeted the base to main. The payload is identical to the approved head (diff hash), mk_all --check passes, and references.bib is sorted and unique (rebuilt as main's entries plus this PR's additions). The approval of the mathematics by reviewer-claude-c4b0c164-01 (6391990388) carries over. coordinator-claude-c4b0c164-20261023 — APPROVED at 73e9b4a. Enqueuing on green.

@SamuelSchlesinger
SamuelSchlesinger added this pull request to the merge queue Oct 25, 2026
Merged via the queue into main with commit c887723 Oct 25, 2026
4 of 5 checks passed
orbitingflea pushed a commit to orbitingflea/complexitylib2 that referenced this pull request Oct 25, 2026
…cslib-community#886) (cslib-community#942)

* feat(FineGrained): the satisfiability coding lemma and PPZ for unique k-SAT (cslib-community#894) (cslib-community#928)

* feat(FineGrained): the satisfiability coding lemma and PPZ for unique k-SAT (cslib-community#894)

Define the PPZ algorithm (random variable order, unit-clause forcing,
random bits otherwise), prove that a run in a fixed order produces the
unique solution with probability 2^{-u}, construct critical clauses,
show a variable is last among m variables in a 1/m fraction of orders,
and conclude by AM-GM that one round succeeds with probability at least
2^{-(1-1/k)n}.

AI-assisted: Jetski (worker-jetski-17d3679e).

* chore(bib): keep references.bib sorted by key (cslib-community#953)

* doc(MCSP,PH,FineGrained): clean up process references and missing docstrings (cslib-community#884) (cslib-community#941)

* doc(MCSP,PH,FineGrained): clean up process references and missing docstrings (cslib-community#884)

Address finding F16 on issue cslib-community#884:
- In Partial.lean and PartialNP.lean: remove temporary development process
  references ('Decision D5', 'Risk R3', 'Issue cslib-community#798 comment 3'), retaining
  canonical literature citations to Ilango and Hirahara.
- In Kannan.lean: cite Arora-Barak Theorem 6.22 explicitly in the module
  header and theorem docstring.
- In FineGrained/PermutationIndependentSet.lean: add docstring to
  BipartitePermutationIndependentSet.mem_iff_exists_satisfiesUndirected.
- In Promise/Reduction.lean: add docstrings to ofSet_mem_PromiseBPP,
  ofSet_mem_PromiseRP, and ofSet_mem_PromiseCoRP.

AI-assisted: Jetski (worker-jetski-b5844be2).

* doc(MCSP,PH,FineGrained): address reviewer feedback on citations and process references

* refactor(Circuit): generalize FanIn input support bounds to weighted gate costs (cslib-community#884) (cslib-community#929)

* refactor(Circuit): generalize FanIn input support bounds to weighted gate costs (cslib-community#884)

Generalize Program.card_reachableInputs_le in
Complexity.Computability.Circuit.FanIn to arbitrary per-operation weights w
satisfying ∀ op, σ.Arity op ≤ 1 + w op, exposing
Program.card_reachableInputs_le_cost and
Program.card_biUnion_wireSupport_le_cost.

Deduce Program.card_biUnion_wireSupport_le_cost_binaryCost in
Complexity.Computability.Circuit.Boolean.BinaryCost as a one-line
specialization, eliminating 90 lines of duplicate induction and helper
theorems.

Refs cslib-community#884 (Item 7, F4)

* refactor(Circuit): privatize reachableInputs helpers, dedup wire_castSucc_injective''

* refactor(Communication): privatize module-local proof helpers in Disjointness and Functions (cslib-community#899) (cslib-community#922)

Privatize 8 module-local proof helpers in Communication per the cslib-community#926
privatize-by-intent rule:
- Disjointness.lean: 7 proof-construction helpers for parts and hardDist
  (mem_parts, compl_insert_eq_of_mem_parts, sum_parts, sum_parts_swap,
  card_parts_pos, hardWeight_nonneg, hardDist_apply_toReal).
- Functions.lean: card_lt_two_pow_of_run_eq_greaterThan.

Keeping public, per cslib-community#922 coordinator review, characterization, bound,
monotonicity and closure theorems across Discrepancy, Distributional,
Protocol, Randomized, Rank, and RoundProtocol.

Refs cslib-community#899 (Item 9)

* refactor(Foundations,Circuit,MCSP): consolidate pow_self_le_three_pow_mul_factorial (cslib-community#939) (cslib-community#945)

Move the elementary factorial-power comparison bound
`Nat.pow_self_le_three_pow_mul_factorial` (n ^ n ≤ 3 ^ n * n!) to
`Complexity.Foundations.Data.Nat.Factorial`.

Eliminate the duplicate private copies in:
- `Complexity/Computability/Circuit/Boolean/ShallowSymmetric/Covering.lean`
- `Complexity/Computability/MCSP/Shannon.lean`

and drop their now-unused ExponentialBounds imports.

Refs cslib-community#939 (Item A.1)

AI-assisted: Jetski (worker-jetski-b5844be2).

* refactor(Foundations,Circuit,AffineDisperser): consolidate sum_map_range (cslib-community#939) (cslib-community#947)

Move `List.sum_map_range` (`((List.range n).map f).sum = ∑ i : Fin n, f i`)
to `Complexity.Foundations.Data.List.OfFn`.

Eliminate the duplicate private copies:
- `sum_range_eq_sum_fin` in `Complexity/Computability/Circuit/Rational/Runtime/Lift/Defs.lean`
- `sum_map_range` in `Complexity/Computability/Complexity/AffineDisperser/Coordinates.lean`

Refs cslib-community#939 (Item A.2)

AI-assisted: Jetski (worker-jetski-b5844be2).

* feat(Probability): Holenstein's correlated sampling and local embedding lemma (cslib-community#886) (cslib-community#940)

* feat(Probability): Holenstein's correlated sampling (cslib-community#886)

Shared randomness is a weighted order of finitely many cells under the
graphs of a finite family of distributions. Each party outputs the first
cell under its own graph: its marginal is exact (map_sample) and two
parties agree with probability at least (1 - δ)/(1 + δ) (agree_ge),
disagreeing with probability at most 2δ (disagree_le).

Co-authored-by: Jetski (worker-jetski-17d3679e) <noreply@google.com>

* feat(Probability): Holenstein's local embedding lemma and the coupling inequality (cslib-community#886)

Alice and Bob sample from their own kernels with correlated sampling;
the result is within 2ε₁ + 2ε₂ of a common sample from the target
kernel (dist_embed_le, Holenstein's Lemma 8). Add the coupling
inequality dist (p.map f) (p.map g) ≤ Pr[f ≠ g] (dist_map_map_le).

Co-authored-by: Jetski (worker-jetski-17d3679e) <noreply@google.com>

* fix(Probability): use simp only for non-terminal simp calls (cslib-community#886)

* style(Probability): wrap a long line (cslib-community#886)

* chore(bib): keep references.bib sorted by key (cslib-community#953)

* fix(bib): remove entries duplicated by a faulty restack; keep only this PR's additions, sorted

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dvi6MU29zU9t8zYfeU51sB

---------

Co-authored-by: Jetski (worker-jetski-17d3679e) <noreply@google.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* feat(FineGrained): PPZ for satisfiable k-SAT via the isolation inequality (cslib-community#894) (cslib-community#930)

Generalize the PPZ analysis from uniquely satisfiable to arbitrary
satisfiable k-CNF formulas. Add Cslib.BitString.isolation with the
isolation inequality 2^n ≤ ∑_{σ∈S} 2^{isolation S σ}, a critical clause
for every variable whose flip falsifies the formula, the per-assignment
bound round_apply_ge, and round_success_of_satisfiable.

Co-authored-by: Jetski (worker-jetski-17d3679e) <noreply@google.com>

* feat(Interactive): layered arithmetic circuits and the GKR identity (cslib-community#892) (cslib-community#944)

* feat(Interactive): layered arithmetic circuits and the GKR identity (cslib-community#892)

Add Cslib.Interactive.GKR.LayeredCircuit with layer-by-layer evaluation,
the wiring predicates add_i and mult_i, closed forms of their multilinear
extensions, and the GKR identity (Thaler, Lemma 4.7) expressing the
multilinear extension of a layer through the layer below.

Co-authored-by: Jetski (worker-jetski-17d3679e) <noreply@google.com>

* refactor(Interactive): reuse indicatorPoly; move bitPoint and eval_multilinearExtension_eq_sum to MultilinearExtension (cslib-community#892)

* chore(bib): keep references.bib sorted by key (cslib-community#953)

* fix(bib): remove entries duplicated by a faulty restack; keep only this PR's additions, sorted

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dvi6MU29zU9t8zYfeU51sB

* docs(GKR): name the existing wiring-predicate lemma in the module doc

The Main results list named eval_multilinearExtension_addPred and
eval_multilinearExtension_multPred, which do not exist; the closed form is
eval_multilinearExtension_wiringPred, of which addPred and multPred are instances.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dvi6MU29zU9t8zYfeU51sB

---------

Co-authored-by: Jetski (worker-jetski-17d3679e) <noreply@google.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Probability): Raz's conditioning lemma for product distributions (cslib-community#886)

Conditioning independent coordinates on an event W moves their
marginals by ∑ⱼ ‖P_{Uⱼ|W} − P_{Uⱼ}‖² ≤ ln(1/Pr[W])/2, with Holenstein's
forms Pr[W] ≤ 2^(−∑ⱼ‖·‖²) and ∑ⱼ‖·‖ ≤ √(k ln(1/Pr[W])). The proof uses
the divergence of conditioning, superadditivity of divergence from a
product, and Pinsker.

Co-authored-by: Jetski (worker-jetski-17d3679e) <noreply@google.com>

* chore(bib): keep references.bib sorted by key (cslib-community#953)

---------

Co-authored-by: Jetski (worker-jetski-17d3679e) <noreply@google.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant