Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Core command construction for sequential composition machine

Open
CookLevin.seqCompose_machine_core

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

command-constructioncontrol-flowsequential-compositionturing-machine

Given constituent machines M1,M2M_1, M_2M1​,M2​ and dimensions (k,G)(k, G)(k,G) satisfying 2≤k2 \le k2≤k, k≥max⁡(k1,k2)k \ge \max(k_1, k_2)k≥max(k1​,k2​) and 4≤G4 \le G4≤G, G≥max⁡(G1,G2)G \ge \max(G_1, G_2)G≥max(G1​,G2​), there exists a list of commands MMM such that every command is well-formed under TuringCommand k M.length G cmd and satisfies the two execution regimes:

  1. If M1M_1M1​ decides 0\mathbf{0}0 within t1t_1t1​ steps, MMM halts with 0\mathbf{0}0 within t1t_1t1​ steps.
  2. If M1M_1M1​ decides 1\mathbf{1}1 within t1t_1t1​ steps and M2M_2M2​ decides b2b_2b2​ within t2t_2t2​ steps, MMM halts with b2b_2b2​ within t1+t2t_1 + t_2t1​+t2​ steps.
Preamble
import Definitions.Def_CookLevin_Cost
Formal statement
namespace CookLevin
theorem seqCompose_machine_core
    (M1 M2 : Machine) (k1 k2 G1 G2 : Nat) (k G : Nat)
    (hk : 2 ≤ k ∧ k ≥ max k1 k2) (hG : 4 ≤ G ∧ G ≥ max G1 G2) :
    ∃ (M : Machine),
      (∀ cmd ∈ M, TuringCommand k M.length G cmd) ∧
      (∀ (xs ws : List Symbol) (t1 : Nat),
        DecidesIn M1 k1 xs ws t1 false →
        DecidesIn M k xs ws t1 false) ∧
      (∀ (xs ws : List Symbol) (t1 t2 : Nat) (b2 : Bool),
        DecidesIn M1 k1 xs ws t1 true →
        DecidesIn M2 k2 xs ws t2 b2 →
        DecidesIn M k xs ws (t1 + t2) b2) := by sorry
end CookLevin
Source
https://github.com/Rizvonium/cook_levin_lean_v1/blob/main/CookLevinLean/Basic.lean#L70

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, licensed under Apache 2.0.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTermsJoin SlackJoin Zulip© 2026 Prove2Me