Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Transitivity of many-one reductions

Proved
PvsNP.pReducible_trans

by alexcarter · Sep 13, 2026 · Mathlib 0df444a (Lean v4.33.1)

complexity-theoryformalizationp-vs-np

If A polynomial-time many-one reduces to B and B to C, then A reduces to C.

Status: Known mathematics / implementation obligation awaiting formal proof.

Formal statement
import Definitions.Def_PvsNPFrontier

namespace PvsNP
theorem pReducible_trans (A B C : DecisionProblem)
    (hAB : PReducible A B) (hBC : PReducible B C) : PReducible A C := by sorry
end PvsNP
Source
Stephen Cook, The P versus NP Problem, Clay official description, definitions of P/NP and Proposition 1; https://www.claymath.org/wp-content/uploads/2022/06/pvsnp.pdf; Proposition 1 / Sipser Theorem 7.36 proof.
Read-back

What the Lean code literally says, in plain math · gpt-6-astra

For every three languages A,B0,C0⊆B∗A,B_0,C_0\subseteq B^*A,B0​,C0​⊆B∗, if A⪯B0A\preceq B_0A⪯B0​ and B0⪯C0B_0\preceq C_0B0​⪯C0​, then A⪯C0A\preceq C_0A⪯C0​. Thus existence of a polynomial-time membership-preserving map for each of the first two ordered pairs implies existence of such a map from AAA to C0C_0C0​; no complexity-class membership is assumed for any of the three languages. Here B={false,true}B=\{\mathrm{false},\mathrm{true}\}B={false,true}, B∗B^*B∗ is the set of all finite Boolean lists, including the empty list, and ∣w∣|w|∣w∣ is list length. For languages A,B0⊆B∗A,B_0\subseteq B^*A,B0​⊆B∗, write A⪯B0A\preceq B_0A⪯B0​ to mean that there exists f:B∗→B∗f:B^*\to B^*f:B∗→B∗ satisfying F(f)F(f)F(f) and ∀w∈B∗, w∈A ⟺ f(w)∈B0\forall w\in B^*,\ w\in A\ \Longleftrightarrow\ f(w)\in B_0∀w∈B∗, w∈A ⟺ f(w)∈B0​. Write F(f)F(f)F(f) for existence of such a machine and a polynomial p∈N[X]p\in\mathbb N[X]p∈N[X] that, for every w∈B∗w\in B^*w∈B∗, compute output list f(w)f(w)f(w) from input list www in at most p(∣w∣)p(|w|)p(∣w∣) steps. Different existential computation witnesses may use different machines and polynomials. A machine in these assertions is a Mathlib TM2 stack machine with finitely many stack indices, instruction labels, and control states, a finite input-stack alphabet, designated input and output stacks, a program, and initial label and control state; its other stack alphabets need not be finite. Input and output alphabet bijections transport the specified encoded lists to the corresponding stack alphabets. Computation starts with only the input stack populated, and reaches a halted configuration with the specified output on the output stack, all other stacks empty, and the control state reset to its initial value. Time counts executions of whole TM2 statements, each of which may contain several stack operations. The supplied body is admitted with sorry; no proof of this assertion is supplied there.

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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me