AFTD Auto-Formalizing Theoretical Domains

Cslib.LTS.MTr.comp

theoremverifiedformalizationimported Lean

Multistep transitions can be composed.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open Cslib Cslib.LTS in
universe u v in
variable {State : Type u} {Label : Type v} (lts : LTS State Label) in
@[grind <=]
theorem Cslib.LTS.MTr.comp {s1 : State} {μs1 : List Label} {s2 : State} {μs2 : List Label} {s3 : State} :
  lts.MTr s1 μs1 s2 → lts.MTr s2 μs2 s3 →
  lts.MTr s1 (μs1 ++ μs2) s3
Formalizes
CSLib, `Cslib.LTS.MTr.comp`
Lean proof
By Fabrizio Montesi, from github.com/leanprover/cslib at 3951377e5a3f (Copyright (c) 2025 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.MTr.comp
--- Cslib/Foundations/Semantics/LTS/Basic.lean:138 (Cslib.LTS.MTr.comp)
+++ as compiled here
@@ -1,4 +1,8 @@
-/-- Multistep transitions can be composed. -/
-@[scoped grind <=]
-theorem MTr.comp {s1 : State} {μs1 : List Label} {s2 : State} {μs2 : List Label} {s3 : State} :
+set_option autoImplicit true in
+set_option relaxedAutoImplicit true in
+open Cslib Cslib.LTS in
+universe u v in
+variable {State : Type u} {Label : Type v} (lts : LTS State Label) in
+@[grind <=]
+theorem Cslib.LTS.MTr.comp {s1 : State} {μs1 : List Label} {s2 : State} {μs2 : List Label} {s3 : State} :
   lts.MTr s1 μs1 s2 → lts.MTr s2 μs2 s3 →
Verified
08 Oct 2026
Axioms
none — Lean reports it depends on no axioms
Built on 3
  • Cslib.LTS.MTrDefinition of a multistep transition. (Implementation note: compared to [Montesi2023], we choose stepL instead of stepR as fundamental…
  • Cslib.LTS.MTr.nil_iffCslib.LTS.MTr.nil_iff
  • Cslib.LTSA Labelled Transition System (LTS) for a type of states (State) and a type of transition labels (Label) consists of a labelled…
Used by 1
  • Cslib.LTS.MTr.append_iffMultistep-transitions over μs ++ μs' are exactly multistep transitions over μs and μs' with a common end & start state (respectively).

Lean source view module on GitHub

set_option autoImplicit true inset_option relaxedAutoImplicit true inopen Cslib Cslib.LTS inuniverse u v invariable {State : Type u} {Label : Type v} (lts : LTS State Label) in/-- Multistep transitions can be composed. -/@[grind <=]theorem Cslib.LTS.MTr.comp {s1 : State} {μs1 : List Label} {s2 : State} {μs2 : List Label} {s3 : State} :  lts.MTr s1 μs1 s2 → lts.MTr s2 μs2 s3 →  lts.MTr s1 (μs1 ++ μs2) s3 := by  intro h1 h2  induction h1  case refl => assumption  case stepL s1 μ s' μs1' s'' h1' h3 ih  =>    apply MTr.stepL    · exact h1'    · apply ih h2
See it in the graphDiscuss this resultChallenge it