AFTD Auto-Formalizing Theoretical Domains

Cslib.Turing.SingleTapeTM.map_toCompCfg_right_step

theoremverifiedformalizationimported Lean

The right 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_right_step :
    Option.map (toCompCfg_right tm1 tm2) (tm2.step cfg2) =
      (compComputer tm1 tm2).step (toCompCfg_right tm1 tm2 cfg2)
Formalizes
CSLib, `Cslib.Turing.SingleTapeTM.map_toCompCfg_right_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 right converting function commutes with steps of the machines. -/theorem Cslib.Turing.SingleTapeTM.map_toCompCfg_right_step :    Option.map (toCompCfg_right tm1 tm2) (tm2.step cfg2) =      (compComputer tm1 tm2).step (toCompCfg_right tm1 tm2 cfg2) := by  cases cfg2 with  | mk state BiTape =>    cases state with    | none => rfl    | some q =>      generalize hM : tm2.tr q BiTape.head = result      obtain ⟨⟨wr, dir⟩, nextState⟩ := result      simp only [compComputer]      grind [toCompCfg_right, step, compComputer]
See it in the graphDiscuss this resultChallenge it