[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"kcN4weodIu":3},"# p-neq-np-lean\n\n[![Lean 4 Build](https://github.com/Mintpath/p-neq-np-lean/actions/workflows/lean_action_ci.yml/badge.svg)](https://github.com/Mintpath/p-neq-np-lean/actions/workflows/lean_action_ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nMachine-verified proof that P ≠ NP via exponential circuit lower bounds for Hamiltonian Cycle. Lean 4 formalization with Mathlib. Proves SIZE(HAM_n) ≥ 2^{Ω(n)} using frontier analysis, switch blocks, cross-pattern mixing, recursive funnel magnification, continuation packets, rooted descent, and signature rigidity.\n\n**Zero `sorry`. Two `axiom` (both classical results with published proofs). Every other theorem machine-checked.**\n\n## What This Proves\n\nEvery Boolean circuit computing HAM_n (the Hamiltonian Cycle decision problem on n vertices) requires size at least 2^{Ω(n)}. Since P would imply polynomial-size circuits, this proves P ≠ NP.\n\nThe formula lower bound (`formulaLowerBound_exponential`) is fully unconditional — zero axioms.\n\nThe general circuit lower bound (`general_circuit_lower_bound_unconditional`) uses two axioms corresponding to known results:\n\n1. **AUY 1983** — Protocol partition number bounded by formula size (Aho, Ullman, Yannakakis, STOC 1983)\n2. **Leaf-sum domination + gate charging** — Combined result of the paper's width budget and leaf-sum decomposition propositions\n\n## Architecture\n\n| Module | Description |\n|--------|-------------|\n| `Basic` | Core definitions: Boolean circuits, Hamiltonian cycles, frontiers |\n| `GraphInfra` | Graph theory infrastructure (connectivity, components) |\n| `Interface` | Frontier interface state, degree profiles, stitchability |\n| `Stitch` | Boundary component correspondence, path pairings |\n| `Collision` | Degree collision and pairing mismatch forcing |\n| `Switch` | Switch blocks, 2-opt rerouting, cross-pattern mixing |\n| `TwoOptLemmas` | 2-opt move structural lemmas, Hamiltonian preservation |\n| `Robustness` | Canonical cycles, relabeling, restriction robustness |\n| `HamCycleCount` | Hamiltonian cycle counting scaffold, path components |\n| `Funnel` | Multi-carrier funnel magnification, Gamma recursion |\n| `Packet` | Continuation packets, mixed local clog, circuit locality |\n| `Descent` | Rooted descent, packet separator exclusion, benign escape |\n| `Signature` | Signature rigidity, occurrence signatures, mu-max bounds |\n| `Formula` | Formula lower bounds via Aho-Ullman-Yannakakis |\n| `Main` | **Main theorem: general_circuit_lower_bound_unconditional** |\n\n## Build\n\n```bash\ncurl -sSf https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh | sh\nlake build\n```\n\nRequires Lean 4.28.0 and Mathlib v4.28.0 (pinned in lean-toolchain and lakefile.toml).\n\n## Verification\n\nAfter `lake build` completes with no errors:\n\n```bash\n# Confirm zero sorries\ngrep -rn \"sorry\" PNeNp/*.lean\n# Should return empty\n\n# List axioms (expect exactly 2)\ngrep -rn \"^axiom \\|^private axiom \" PNeNp/*.lean\n# Should show:\n#   Funnel.lean: auyDirectRectangles_gateValue_ax (AUY 1983)\n#   Main.lean: lambda_le_sum_leafWidth_of_circuit (leaf-sum + gate charging)\n```\n\n## Paper\n\nThe mathematical proof is detailed in `hamiltonian_route.tex` (also available on [Zenodo](https://zenodo.org/records/19103649)).\n",1777138849112]