Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Cook–Levin machines: conditional execution with one control step

Proved
CookLevin.machine_conditional_preserves_turing_and_time

by Robertboy18 · Sep 22, 2026 · Mathlib 0df444a (Lean v4.33.1)

complexitycook-levinloopsturing-machines

Run a well-formed machine body once when a read-only guard is true, otherwise preserve all tapes. The conditional uses no additional tapes and takes at most one step beyond the body time bound.

Preamble
import Definitions.Def_CookLevin_Tableau
import Definitions.Def_CookLevin_Complexity
open CookLevin
set_option autoImplicit false
Formal statement
theorem CookLevin.machine_conditional_preserves_turing_and_time {k G : Nat}
    (guard : List Symbol → Bool) (body : Machine) (hbody : TuringMachine k G body) :
    ∃ R : Machine, TuringMachine k G R ∧
      ∀ (tps finalTps : List Tape) (T : Nat),
        (guard (CookLevin.read tps) = true → Transforms body tps T finalTps) →
        Transforms R tps (T + 1) (if guard (CookLevin.read tps) then finalTps else tps) := by sorry
Source
Runtime-sized distinct-position filtering for the Cook–Levin head constraints.

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