Cslib.LTS.Morphism.comp
defimported Lean
Composition of LTS morphisms. We use Kleisli composition to define this.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in variable {State Label : Type*} in def Cslib.LTS.Morphism.comp {lts₁ lts₂ lts₃} (f : LTS.Morphism lts₁ lts₂) (g : LTS.Morphism lts₂ lts₃) : LTS.Morphism lts₁ lts₃
- Defined in
- CSLib, `Cslib.LTS.Morphism.comp`
- Lean proof
- By Ayberk Tosun, from github.com/leanprover/cslib at
3951377e5a3f(Copyright (c) 2026 Ayberk Tosun (Zeroth Research). 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.Cslib.LTS.Morphism.comp← Cslib.LTS.Morphism.comp (Cslib/Foundations/Semantics/LTS/LTSCat/Basic.lean:75): verbatim
- Verified
- 08 Oct 2026
- Axioms
- none listed
- Built on 4
- Cslib.LTSCatThe definition of labelled transition system (with the type of states and the type of labels as part of the structure).
- Cslib.LTSA Labelled Transition System (LTS) for a type of states (
State) and a type of transition labels (Label) consists of a labelled… - Cslib.LTS.withIdleWe first define what is denoted Tran* in [WinskelNielsen1995]: the extension of a transition relation with idle transitions.
- Cslib.LTS.MorphismA morphism between two labelled transition systems consists of (1) a function on states, (2) a partial function on labels, and a proof…
- Used by 1
- Cslib.instCategoryLTSCatFinally, we prove that these form a category.
Lean source view module on GitHub
set_option autoImplicit true in set_option relaxedAutoImplicit true in variable {State Label : Type*} in /-- Composition of LTS morphisms. We use Kleisli composition to define this. -/ def Cslib.LTS.Morphism.comp {lts₁ lts₂ lts₃} (f : LTS.Morphism lts₁ lts₂) (g : LTS.Morphism lts₂ lts₃) : LTS.Morphism lts₁ lts₃ where stateMap := g.stateMap ∘ f.stateMap labelMap := f.labelMap >=> g.labelMap labelMap_tr s s' l h := by obtain ⟨f, μ, p⟩ := f obtain ⟨g, ν, q⟩ := g simp only [LTS.withIdle] at p q change ((μ l).bind ν).elim (g (f s) = g (f s')) _ cases hμ : μ l with grind