AFTD Auto-Formalizing Theoretical Domains

Cslib.Turing.SingleTapeTM.map_toCompCfg_left_step

theoremverifiedformalizationimported Lean

The left converting function commutes with steps of the machines.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open Cslib Cslib.Turing Cslib.Turing.SingleTapeTM in
open Relation in
open Cslib.Turing.BiTape Cslib.Turing.StackTape in
open _root_.Turing in
variable {Symbol : Type} in
variable [Inhabited Symbol] [Fintype Symbol] in
variable (tm1 tm2 : SingleTapeTM Symbol) (cfg1 : tm1.Cfg) (cfg2 : tm2.Cfg) in
theorem Cslib.Turing.SingleTapeTM.map_toCompCfg_left_step (hcfg1 : cfg1.state.isSome) :
    Option.map (toCompCfg_left tm1 tm2) (tm1.step cfg1) =
      (compComputer tm1 tm2).step (toCompCfg_left tm1 tm2 cfg1)
Formalizes
CSLib, `Cslib.Turing.SingleTapeTM.map_toCompCfg_left_step`
Lean proof
By Bolton Bailey, Pim Spelier, Daan van Gent, from github.com/leanprover/cslib at 3951377e5a3f (Copyright (c) 2026 Bolton Bailey. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.33.0.
Verified
08 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 29
Used by 1

Lean source view module on GitHub

set_option autoImplicit true inset_option relaxedAutoImplicit true inopen Cslib Cslib.Turing Cslib.Turing.SingleTapeTM inopen Relation inopen Cslib.Turing.BiTape Cslib.Turing.StackTape inopen _root_.Turing invariable {Symbol : Type} invariable [Inhabited Symbol] [Fintype Symbol] invariable (tm1 tm2 : SingleTapeTM Symbol) (cfg1 : tm1.Cfg) (cfg2 : tm2.Cfg) in/-- The left converting function commutes with steps of the machines. -/theorem Cslib.Turing.SingleTapeTM.map_toCompCfg_left_step (hcfg1 : cfg1.state.isSome) :    Option.map (toCompCfg_left tm1 tm2) (tm1.step cfg1) =      (compComputer tm1 tm2).step (toCompCfg_left tm1 tm2 cfg1) := by  cases cfg1 with | mk state BiTape => cases state with    | none => grind    | some q =>      simp only [step, toCompCfg_left, compComputer]      generalize hM : tm1.tr q BiTape.head = result      obtain ⟨⟨wr, dir⟩, nextState⟩ := result      #adaptation_note      /-- A grind regression found moving to nightly-2026-03-31 (changes from lean#13166) -/      cases nextState <;> (simp_all; rfl)
See it in the graphDiscuss this resultChallenge it