pneqnp.comResearch note / 001Complexity theory · Formal methods
The P versus NP problem
For more than fifty years, we have known how to check solutions to a broad class of problems without knowing how to find them efficiently. We present a formal proof that this distinction is fundamental: P and NP are not equal.
- Result
- P ≠ NP
- Formalization
- ~100,000 lines of Lean
- Verification
- In-browser · Local
The proof establishes a super-polynomial lower bound for Boolean satisfiability. Since SAT is NP-complete, this is sufficient to separate P from NP. The full argument, including its supporting definitions and lemmas, has been formalized in Lean 4.
View source code ↗Checking the result
For a claim of this kind, a written account is not enough. We are making the verification available here, alongside the result. The checker runs locally in your browser; no installation is required.
Lean 4 / separation.lean
⋮
simpa only [κ_comp_ι, σ_restrict] using hψ.trans hξ.symm
/-- §7.4. Transfer along the bounded encoding. -/
private lemma χ_diag₃ {κ ε : ℕ} {𝒯 : DTM Γ₂}
(hκ : ∀ᶠ n in atTop, τ 𝒯 n ≤ n ^ κ)
(hε : ε ∈ 𝒜ᶜ ∩ ↑(Λ κ)) :
∃ ξ ∈ Σ⋆, ⟪𝒯⟫ ξ ≠ χₛ (ιₖ ξ) := by
obtain ⟨ζ, hζ₁, hζ₂⟩ := ψ_cofinal κ ε hε
refine ⟨σₖ ζ, σ_mem hζ₁, ?_⟩
intro hξ
have hΔ : Δᵢ ζ ≺ Δᵢ ζ := by
calc Δᵢ ζ ≼ Φ κ (σₖ ζ) := φ_bound hκ hζ₂
_ ≺ Δᵢ ζ := main_result hξ hζ₁
exact (lt_irrefl _) hΔ
theorem separation : P ≠ NP := by
rintro h𝒞
obtain ⟨𝒯, κ, hτ, hχ⟩ := sat_complete (h𝒞 ▸ hₛ)
exact χ_diag₃ hτ (ε_admissible κ) |>
fun ⟨ξ, hξ, h⊥⟩ ↦ h⊥ (hχ ξ hξ)
private lemma ω_stable {α : Type u} [Encodable α]
(hΩ : Ω ∘ ι = ι ∘ Ω′) :
⋮Proof of main_resultTrust me bro.
P ≠ NP
The purpose of formal verification is to remove the need to take the authors’ word for it.