AFTD Auto-Formalizing Theoretical Domains

Cslib.LTS.Execution.to_mTr

theoremverifiedformalizationimported Lean

Converts an execution into a multistep transition.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open Cslib Cslib.LTS in
variable {State Label : Type*} {lts : LTS State Label} in
@[grind →]
theorem Cslib.LTS.Execution.to_mTr (hexec : lts.Execution s1 μs s2 ss) :
    lts.MTr s1 μs s2
Formalizes
CSLib, `Cslib.LTS.Execution.to_mTr`
Lean proof
By Fabrizio Montesi, Ching-Tsun Chou, from github.com/leanprover/cslib at 3951377e5a3f (Copyright (c) 2026 Fabrizio Montesi. 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.
What was changed in Cslib.LTS.Execution.to_mTr
--- Cslib/Foundations/Semantics/LTS/Execution.lean:69 (Cslib.LTS.Execution.to_mTr)
+++ as compiled here
@@ -1,4 +1,7 @@
-/-- Converts an execution into a multistep transition. -/
-@[scoped grind →]
-theorem Execution.to_mTr (hexec : lts.Execution s1 μs s2 ss) :
+set_option autoImplicit true in
+set_option relaxedAutoImplicit true in
+open Cslib Cslib.LTS in
+variable {State Label : Type*} {lts : LTS State Label} in
+@[grind →]
+theorem Cslib.LTS.Execution.to_mTr (hexec : lts.Execution s1 μs s2 ss) :
     lts.MTr s1 μs s2 := by
Verified
08 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 6
  • Cslib.LTS.MTrDefinition of a multistep transition. (Implementation note: compared to [Montesi2023], we choose stepL instead of stepR as fundamental…
  • Cslib.LTS.ExecutionExecution extends MTr by providing the intermediate states of a multistep transition.
  • Cslib.LTS.Execution.cons_invertDeconstruction of executions with List.cons.
  • Cslib.LTS.MTr.nil_iffCslib.LTS.MTr.nil_iff
  • Cslib.LTS.MTr.singleton_iffA 1-sized multistep transition is exactly a single transition with the given label.
  • Cslib.LTSA Labelled Transition System (LTS) for a type of states (State) and a type of transition labels (Label) consists of a labelled…

Lean source view module on GitHub

set_option autoImplicit true inset_option relaxedAutoImplicit true inopen Cslib Cslib.LTS invariable {State Label : Type*} {lts : LTS State Label} in/-- Converts an execution into a multistep transition. -/@[grind →]theorem Cslib.LTS.Execution.to_mTr (hexec : lts.Execution s1 μs s2 ss) :    lts.MTr s1 μs s2 := by  induction ss generalizing s1 μs  case nil => grind  case cons s1' ss ih =>    let ⟨hlen, hstart, hfinal, hexec'⟩ := hexec    have : s1' = s1 := by grind    rw [this] at hexec' hexec    cases μs    · grind    case cons μ μs =>      specialize ih (s1 := ss[0]'(by grind)) (μs := μs)      apply Execution.cons_invert at hexec      apply MTr.stepL      · have : lts.Tr s1 μ (ss[0]'(by grind)) := by grind        apply this      · grind
See it in the graphDiscuss this resultChallenge it