Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The rows of a satisfying assignment encode the run on the inputs read off it, with the emission bookkeeping: emitted t iff something was output before time t, at most one…

Proved
MIPRE.TM.CookLevin.rows_of_sat

by thomasvidick · Oct 17, 2026 · Mathlib 0df444a (Lean v4.33.1)

computabilitycook-levinmip-remipre-formalizationturing-machines

A statement of the module MIPRE.TM.CookLevin.Sound of the MIP* = RE formalization (commit 70cbf1c of vidick/MIPRE-formalization). Soundness of the Cook–Levin tableau. A satisfying assignment of the tableau formula comes from an accepting run (acceptsIn_of_tableau_sat), and the equivalence tableau_sat_iff (planning/succinct-cook-levin.md, S1). * The successor part of a locally consistent window is a function of its time-t part (post_of_pre): two locally consistent local configurations with the same cells, heads and state at time t, one of them with at most one head per tape, agree on the cell and head at time t + 1 of every tape whose head is far, and on everything when every head is in the window. * The…

The rows of a satisfying assignment encode the run on the inputs read off it, with the emission bookkeeping: emitted t iff something was output before time t, at most one symbol, and only acc.

Formal statement. In Lean, with the scope shown:

open MIPRE
open MIPRE.TM
open MIPRE.TM.CookLevin
open Turing MIPRE.SAT MultiInputTM
variable {i w : ℕ} {Symbol State : Type*} [Fintype Symbol] [DecidableEq Symbol] [Fintype State]
variable (hSat : (tableau M s₀ s₁ S fixed chk).Sat a)

theorem MIPRE.TM.CookLevin.rows_of_sat (hchk : IsCheckCircuit M acc chk) (hC : chk.RefsLt) (hin : chk.InputsLt)
    (hne : chk.gates ≠ []) (t : ℕ) (ht : t ≤ S) :
    RowOk (input := inputOf s₀ s₁ fixed chk a) a ⟨t, Nat.lt_succ_of_le ht⟩ (cfgAt M t) ∧
      a (.emitted ⟨t, Nat.lt_succ_of_le ht⟩) =
        decide (M.outputString (M.initCfg (inputOf s₀ s₁ fixed chk a)) t ≠ []) ∧
      (M.outputString (M.initCfg (inputOf s₀ s₁ fixed chk a)) t).length ≤ 1 ∧
      ∀ s ∈ M.outputString (M.initCfg (inputOf s₀ s₁ fixed chk a)) t, s = acc

Formalization Note MIPRE.TM.CookLevin.rows_of_sat is declared in MIPRE/TM/CookLevin/Sound.lean, lines 634–708. The binders, hypotheses and conclusion are exactly those of the Lean statement above; the uploaded statement elaborates to the same type as the declaration in the repository. The definitions it mentions are those of the published definition bundles of the module's import closure.

Preamble
import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Algebra.Order.Group.Abs
import Mathlib.Algebra.Order.Group.Int
import Mathlib.Computability.Language
import Mathlib.Data.Finset.Max
import Mathlib.Data.Fintype.Option
import Mathlib.Data.Fintype.Pi
import Mathlib.Data.Fintype.Prod
import Mathlib.Data.Fintype.Sigma
import Mathlib.Data.Fintype.Sum
import Mathlib.Data.Int.Interval
import Mathlib.Data.List.Basic
import Mathlib.Data.Nat.Bits
import Mathlib.Data.Nat.Notation
import Mathlib.Data.Nat.Size
import Mathlib.Data.Set.Basic
import Mathlib.Data.Sign.Defs
import Mathlib.Logic.Relation
import Mathlib.Tactic.DeriveFintype
import Definitions.Def_MIPRE_Foundations_Cost_Basic_B
import Definitions.Def_MIPRE_Foundations_Cost_Encoding_B
import Definitions.Def_MIPRE_Foundations_SAT_Circuit
import Definitions.Def_MIPRE_Foundations_SAT_Cnf
import Definitions.Def_MIPRE_Cslib_Foundations_Data_RelatesInSteps
import Definitions.Def_MIPRE_Cslib_Computability_Machines_Turing_MultiTape_Deterministic
import Definitions.Def_MIPRE_TM_MultiInput_Deterministic
import Definitions.Def_MIPRE_TM_CookLevin_Local
import Definitions.Def_MIPRE_Foundations_SAT_Tseitin
import Definitions.Def_MIPRE_TM_CookLevin_Tableau
import Definitions.Def_MIPRE_TM_CookLevin_Semantics
import Definitions.Def_MIPRE_TM_CookLevin_Correct
import Definitions.Def_MIPRE_TM_CookLevin_Sound

open MIPRE
open MIPRE.TM
open MIPRE.TM.CookLevin
open Turing MIPRE.SAT MultiInputTM
variable {i w : ℕ} {Symbol State : Type*} [Fintype Symbol] [DecidableEq Symbol] [Fintype State]
  [DecidableEq State] {S : ℕ}
  (M : MultiInputTM i w Symbol State) (acc s₀ s₁ : Symbol) (fixed : Fin i → Option (List Symbol))
  (chk : Circuit) (a : TabVar i w Symbol State S chk.gates.length → Bool)
variable (hSat : (tableau M s₀ s₁ S fixed chk).Sat a)
include hSat
Formal statement
theorem MIPRE.TM.CookLevin.rows_of_sat (hchk : IsCheckCircuit M acc chk) (hC : chk.RefsLt) (hin : chk.InputsLt)
    (hne : chk.gates ≠ []) (t : ℕ) (ht : t ≤ S) :
    RowOk (input := inputOf s₀ s₁ fixed chk a) a ⟨t, Nat.lt_succ_of_le ht⟩ (cfgAt M t) ∧
      a (.emitted ⟨t, Nat.lt_succ_of_le ht⟩) =
        decide (M.outputString (M.initCfg (inputOf s₀ s₁ fixed chk a)) t ≠ []) ∧
      (M.outputString (M.initCfg (inputOf s₀ s₁ fixed chk a)) t).length ≤ 1 ∧
      ∀ s ∈ M.outputString (M.initCfg (inputOf s₀ s₁ fixed chk a)) t, s = acc := by sorry
Source
https://github.com/vidick/MIPRE-formalization/blob/70cbf1c52e3d5e1dff1162fdf952c9a9f4bd99ed/MIPRE/TM/CookLevin/Sound.lean#L634-L708

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