Papers
Topics
Authors
Recent
Search
2000 character limit reached

Lean 4 Machine-Verified Proof of P = NP via the Pedigree Polytope Membership Problem

Published 2 Jun 2026 in cs.CC, math.CO, and math.OC | (2606.03194v1)

Abstract: The Membership Problem for Pedigree Polytope (M3P) asks, given $X\in\mathbb{Q}{\binom{n}{3}}$, whether $X\in\mathrm{conv}(P_n)$, where $P_n$ is the set of all pedigrees. A pedigree is a structured encoding of a Hamiltonian cycle construction in $K_n$. We establish that M3P is solvable in strongly polynomial time via a recursively constructed layered network $(N_k, R_k, μ)$ and a multicommodity flow problem MCF$(k)$. The necessary and sufficient condition for membership established is that the optimal total flow in MCF$(n-1)$ equals the maximum possible flow $z_{\max}$. The complexity analysis, grounded in Tardos's strongly polynomial algorithm for combinatorial linear programs (1986), shows that this condition can be checked in strongly polynomial time in the dimension of the matrix involved. By sufficiency, this implies M3P~$\in$~P. Since the Symmetric Travelling Salesman Problem (STSP) reduces to M3P via the Multistage Insertion (MI) formulation (Arthanari 1983), STSP is solvable in polynomial time, and the P vs.NP question is resolved. The proofs leading to this result are fully machine-verified in Lean~4/Mathlib4, with zero unresolved \texttt{sorry}s in the main proof chain. The main contribution is the Lean~4 machine verification of all proofs in the main chain, resulting in \texttt{theorem p_equals_np}: P = NP. The Lean~4 formal verification covers the sufficiency of MCF(n-1) for membership in $\mathrm{conv}(P_n)$, and the P = NP chain via Maurras (2002), Grötschel--Lovász--Schrijver (1988), Cook (1971), and Karp (1972). The complete lean project (36 Lean~4 files, 2968/2968 build targets clean) is available at https://github.com/TiruArt/Pedigree-Polytopes-Lean4.

Authors (1)

Summary

  • The paper establishes that P = NP by proving the Pedigree Polytope Membership Problem is solvable in strongly polynomial time.
  • It utilizes a layered network and multicommodity flow framework, validated through an extensive Lean 4 formalisation.
  • The results challenge decades of NP-completeness assumptions and open new directions in combinatorial optimization and complexity theory.

Machine-Verified Resolution of P=NP via the Pedigree Polytope Membership Problem in Lean 4

Problem Context and Pedigree Polytope Formulation

The paper introduces a formal, fully machine-verified proof resolving the P versus NP question by establishing that the Membership Problem for Pedigree Polytope (M3P) is solvable in strongly polynomial time. The pedigree polytope conv(Pn)\mathrm{conv}(P_n) encodes the space of Hamiltonian cycle constructions as sequences of triangles (pedigrees), reflecting multistage insertions of cities in KnK_n. Each pedigree corresponds to a combinatorial object, whose edge sequence uniquely identifies a Hamiltonian tour.

The central computational question is: Given XQ(n3)X \in \mathbb{Q}^{\binom{n}{3}}, does XX belong to conv(Pn)\mathrm{conv}(P_n)? This polyhedral membership problem abstracts the fundamental computational challenge underlying NP-complete problems such as the Symmetric Travelling Salesman Problem (STSP). The MI-formulation reduces STSP to M3P, demonstrating their equivalence under polynomial-time reductions.

Algorithmic Framework: Layered Network and Multicommodity Flow

The solution architecture utilises a recursively constructed layered network (Nk,Rk,μ)(N_k, R_k, \mu), where NkN_k models the insertion choices as nodes and arcs, and RkR_k captures rigid pedigrees identified via a Frozen Flow Finding algorithm. For each layer, membership is certified through solutions to Forbidden Arc Transportation (FAT) problems. The network for a given stage kk is constructed by systematically deleting nodes and arcs according to generative constraints (see Figure 1). Figure 1

Figure 1: Restricted networks N4(L)N_4(L) for Example illustrating the FAT construction in the layered network.

If all FAT problems are feasible, final membership determination reduces to solving a multicommodity flow problem MCFKnK_n0 over KnK_n1. The decisive criterion is optimality: KnK_n2 if and only if MCFKnK_n3 achieves the maximum possible flow KnK_n4, where KnK_n5 is determined by the sum of weights on rigid pedigrees. Figure 2

Figure 2: Flowchart for membership checking in KnK_n6, highlighting the recursive FAT and MCF steps.

Complexity Analysis and Strongly Polynomial Algorithm

The matrix structure of MCFKnK_n7 contains entries in KnK_n8, rendering it a combinatorial linear program amenable to Tardos's algorithm with strongly polynomial complexity KnK_n9, independent of input bit-length. The algorithm's steps are naturally parallelisable, with restricted networks mutually independent at each layer, suggesting practical efficiency improvements beyond the conservative sequential bound.

This complexity result establishes that M3P XQ(n3)X \in \mathbb{Q}^{\binom{n}{3}}0 P, and the equivalence via MI-formulation implies STSP XQ(n3)X \in \mathbb{Q}^{\binom{n}{3}}1 P. In combination with Karp/Cook reductions from NP-complete problems to STSP, the paper confirms XQ(n3)X \in \mathbb{Q}^{\binom{n}{3}}2.

Membership Characterisation: Necessary and Sufficient Flow Condition

The main theorem asserts that XQ(n3)X \in \mathbb{Q}^{\binom{n}{3}}3 if and only if MCFXQ(n3)X \in \mathbb{Q}^{\binom{n}{3}}4 is feasible with XQ(n3)X \in \mathbb{Q}^{\binom{n}{3}}5. This characterisation is formalised via Lean~4 as a fully verified biconditional; the sufficiency direction is machine-verified in Lean~4, while necessity follows from book proofs.

Pedigree paths are decomposed via commodity flows, with each flow uniquely identifying extension choices. Rigid pedigrees form mutually adjacent vertices in XQ(n3)X \in \mathbb{Q}^{\binom{n}{3}}6, and their cardinality is bounded by the polytope dimension (see Figure 3), supporting simplex structure arguments instrumental in membership proofs. Figure 3

Figure 3: Pedigrees XQ(n3)X \in \mathbb{Q}^{\binom{n}{3}}7, illustrating arc designations and commodity flows in the layered network.

Lean 4 Machine Verification: Formalisation and Proof Chain

A central contribution is the Lean~4 formalisation: 36 files, 2968 build targets clean, zero sorrys in the main proof chain. The structure Pedigree (n : N) enforces both generator and distinct-edge conditions, guaranteeing that only valid pedigree sequences are represented.

The main chain encompasses:

  • MCF feasibility XQ(n3)X \in \mathbb{Q}^{\binom{n}{3}}8 XQ(n3)X \in \mathbb{Q}^{\binom{n}{3}}9;
  • MCF combinatorial LP XX0 M3P XX1 P;
  • Full dimensionality, rationality, and interior point for XX2;
  • Polynomial separation and optimisation over XX3 (via Maurras and GLS);
  • STSP reduction to M3P and polynomial solvability;
  • P = NP concluded from STSP NP-completeness.

Each mathematical statement is encoded as Lean~4 theorem or axiom, with strong separation between externally accepted results (Tardos, Maurras, GLS, Cook, Karp) and fully formalised internal results.

Implications for Combinatorial Optimisation and Complexity Theory

The establishment of XX4 as a machine-verifiable certificate has profound implications. Over fifty years of literature based on the working hypothesis XX5—including inapproximability results, cryptographic hardness, and lower bounds in combinatorial optimisation—are now subject to reassessment. The existence of polynomial-time algorithms for all NP-complete problems is incontrovertible, though practical efficiency varies.

The algorithmic framework provides not only a theoretical resolution but also an explicit polynomial-time procedure for membership certification in XX6, with practical implementations available in Python and Lean~4.

The topological structure of pedigrees as pure XX7-dimensional simplicial complexes invites further exploration at the interface of algebraic topology and combinatorial optimisation. The boundary operator XX8 recovers Hamiltonian cycles from pedigree sequences, connecting polytope faces with homology.

Future Directions

Key avenues for further research include:

  • Tightening the XX9 complexity bound through finer analysis of MCFconv(Pn)\mathrm{conv}(P_n)0;
  • Identifying reductions from various NP-complete problems to M3P for practical algorithm design;
  • Extending the pedigree polytope framework to higher-dimensional simplicial constructions;
  • Formalising necessity in Lean~4, completing the machine-verified membership characterisation.

Conclusion

The paper presents a formal, machine-verifiable proof establishing P = NP by constructing a strongly polynomial algorithm for the pedigree polytope membership problem and reducing STSP to M3P. This result is validated by an extensive Lean~4 formalisation, resolving a central open question in theoretical computer science. The approach delivers an explicit algorithmic framework, analytic complexity bounds, and structural insights, with wide-ranging implications for both practice and foundational theory.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 2 tweets with 0 likes about this paper.