Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Generic transducer-decider pipeline

Open
CookLevin.transducer_decider_pipeline

by junyihjy · Sep 21, 2026 · Mathlib 0df444a (Lean v4.33.1)

polynomial-timeturing-machine

A transducer whose output depends only on the instance can be pipelined into a two-input Boolean decider. If the transducer runs in time T1(∣x∣)T_1(|x|)T1​(∣x∣) and the decider runs in time T2(∣x∣)T_2(|x|)T2​(∣x∣), the pipeline decides the predicate on the instance and the transduced output in time T1(∣x∣)+T2(∣x∣)T_1(|x|)+T_2(|x|)T1​(∣x∣)+T2​(∣x∣). This reusable statement isolates the tape-routing and control-state construction from any particular encoding or predicate.

Preamble
import Definitions.Def_CookLevin_Cost
Formal statement
namespace CookLevin
theorem transducer_decider_pipeline
    (f : List Bool → List Bool) (P : List Bool → List Bool → Bool)
    (T1 T2 : Nat → Nat)
    (M1 : Machine) (k1 G1 : Nat) (hwf1 : TuringMachine k1 G1 M1)
    (htrans : ∀ x w : List Bool,
      (execute M1 (startConfig2 k1 (boolsToSymbols x) (boolsToSymbols w)) (T1 x.length)).1 = M1.length ∧
      outputOf k1 (execute M1 (startConfig2 k1 (boolsToSymbols x) (boolsToSymbols w)) (T1 x.length))
        (T1 x.length + 2) = f x)
    (M2 : Machine) (k2 G2 : Nat) (hwf2 : TuringMachine k2 G2 M2)
    (hdec : ∀ x y : List Bool,
      DecidesIn M2 k2 (boolsToSymbols x) (boolsToSymbols y) (T2 x.length) (P x y)) :
    ∃ (M : Machine) (k G : Nat),
      TuringMachine k G M ∧
      ∀ x w : List Bool,
        DecidesIn M k (boolsToSymbols x) (boolsToSymbols w)
          (T1 x.length + T2 x.length) (P x (f x)) := by sorry
end CookLevin
Source
Standard sequential composition principle for the Cook-Levin multi-tape machine model.

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