Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Random k-SAT shattering and energy barriers

Definition
KSATSingleFlip_Connect_Shattering

by wcysai · Nov 13, 2026 · Mathlib 0df444a (Lean v4.33.1)

A formula is shattered at positive rates a,b,ca,b,ca,b,c if its nonempty solution set is partitioned into regions of mass at most e−ane^{-an}e−an, any two solutions in different regions have Hamming distance at least bnbnbn, and every single-variable-flip path in the full Boolean cube between different regions contains an assignment violating at least cncncn clause occurrences. The model counts repeated clauses separately. The definitions also give the lower and upper density endpoints in Theorem 1.4.

Definition code
import Definitions.Def_KSATSingleFlip_Connect_Model

noncomputable section
open scoped Classical BigOperators
namespace KSATSingleFlip.Connect

/-! # Shattering and linear energy barriers

Definitions for Theorem 1.4 of Wang, Yin, Yu and Zhang, STOC 2027 submission
#737, printed p. 4. Clause occurrences are counted by their list positions. -/

/-- The number of clause occurrences falsified by an assignment. -/
def violatedCount {n : ℕ} (Φ : GFormula (Fin n)) (σ : Fin n → Bool) : ℕ :=
  (Finset.univ.filter fun c : Fin Φ.length => ¬ ClauseSat σ (Φ.get c)).card

/-- A finite partition of all solutions into exponentially small regions,
with linear pairwise Hamming separation and linear single-flip energy barriers.
The three rates are explicit parameters to allow the source's constants to
depend on k while remaining uniform in n and in the density range. -/
def IsShattered {n : ℕ} (Φ : GFormula (Fin n))
    (massRate separationRate energyRate : ℝ)
    (regions : Finset (Finset (Fin n → Bool))) : Prop :=
  (sols Φ).Nonempty ∧
  (∀ A ∈ regions, A.Nonempty ∧ A ⊆ sols Φ ∧
    mass Φ A ≤ Real.exp (-massRate * n)) ∧
  (∀ σ ∈ sols Φ, ∃ A ∈ regions, σ ∈ A) ∧
  (∀ A ∈ regions, ∀ B ∈ regions, A ≠ B →
    Disjoint A B ∧
    (∀ σ ∈ A, ∀ τ ∈ B, separationRate * n ≤ (hamming σ τ : ℝ)) ∧
    (∀ σ ∈ A, ∀ τ ∈ B, ∀ p : List (Fin n → Bool),
      IsPathIn Finset.univ p σ τ → ∃ z ∈ p, energyRate * n ≤ violatedCount Φ z))

/-- The shattering interval's lower endpoint, as a density α = m/n. -/
def shatteringDensityLower (k : ℕ) : ℝ :=
  (2 : ℝ) ^ k / k * (Real.log k + Real.log (Real.log k) + Real.log (34 / 13))

/-- The satisfiable-regime upper endpoint used in Theorems 1.2–1.4. -/
def shatteringDensityUpper (k : ℕ) : ℝ :=
  (2 : ℝ) ^ k * (Real.log 2 - 1 / Real.log k)

end KSATSingleFlip.Connect
Source
Chunyang Wang, Yitong Yin, Yixiao Yu, Yiyao Zhang, Single-Variable Connectivity in Random k-SAT, STOC 2027 submission #737, Theorem 1.4, printed p. 4 (PDF p. 6), https://github.com/sigact-stoc/stoc2027/releases/download/papers-1/737.pdf

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me