Labelled Transition System #
A Labelled Transition System (LTS) models the observable behaviour of the possible states of a system. They are particularly popular in the fields of concurrency theory, logic, and programming languages.
Main definitions #
LTS
is a structure for labelled transition systems, consisting of a labelled transition relationtr
between states. We follow the style and conventions in [San].lts.mtr
extends the transition relation of any LTS to a multi-step transition relation, formalising the inference system and admissible rules for such relations in [Mon23].Definitions for all the common classes of LTSs: image-finite, finitely branching, finite-state, finite, and deterministic.
Main statements #
A series of results on
lts.mtr
that allow for obtaining and composing multi-step transitions in different ways.LTS.deterministic_imageFinite
: every deterministic LTS is also image-finite.LTS.finiteState_imageFinite
: every finite-state LTS is also image-finite.LTS.finiteState_finitelyBranching
: every finite-state LTS is also finitely-branching, if the type of labels is finite.
References #
Given an lts
and a transition label μ
, returns the relation that relates all states s1
and s2
such that lts.tr s1 μ s2
.
This can be useful, for example, to see a reduction relation as an LTS.
Instances For
Multi-step transitions #
Definition of a multi-step transition.
(Implementation note: compared to [Mon23], we choose stepL instead of stepR as fundamental
rule. This makes working with lists of labels more convenient, because we follow the same
construction. It is also similar to what is done in the SimpleGraph
library in mathlib.)
- refl {State : Type u} {Label : Type v} {lts : LTS State Label} {s : State} : lts.mtr s [] s
- stepL {State : Type u} {Label : Type v} {lts : LTS State Label} {s1 : State} {μ : Label} {s2 : State} {μs : List Label} {s3 : State} : lts.tr s1 μ s2 → lts.mtr s2 μs s3 → lts.mtr s1 (μ :: μs) s3
Instances For
The LTS generated by a state s
is the LTS given by all the states reachable from s
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Definitions about termination #
A state 'may terminate' if it can reach a terminated state. The definition of Terminated
is a parameter.
Equations
- lts.MayTerminate s = ∃ (s' : State), Terminated s' ∧ lts.CanReach s s'
Instances For
Definitions for the unions of LTSs #
Note: there is a nontrivial balance between ergonomics and generality here. These definitions might change in the future.
The union of two LTSs that have common supertypes for states and labels.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Union of two LTSs with the same Label
type. The result combines the original respective state
types State1
and State2
into (State1 ⊕ State2)
.
Equations
- lts1.unionSum lts2 = lts1.inl.unionSubtype lts2.inr
Instances For
Classes of LTSs #
An lts is deterministic if a state cannot reach different states with the same transition label.
Equations
- lts.Deterministic = ∀ (s1 : State) (μ : Label) (s2 s3 : State), lts.tr s1 μ s2 → lts.tr s1 μ s3 → s2 = s3
Instances For
An lts is image-finite if all images of its states are finite.
Equations
- lts.ImageFinite = ∀ (s : State) (μ : Label), Finite ↑(lts.Image s μ)
Instances For
In a deterministic LTS, if a state has a μ
-derivative, then it can have no other
μ
-derivative.
Every deterministic LTS is also image-finite.
A state has an outgoing label μ
if it has a μ
-derivative.
Equations
- lts.HasOutLabel s μ = ∃ (s' : State), lts.tr s μ s'
Instances For
The set of outgoing labels of a state.
Equations
- lts.OutgoingLabels s = {μ : Label | lts.HasOutLabel s μ}
Instances For
An LTS is finitely branching if it is image-finite and all states have finite sets of outgoing labels.
Equations
- lts.FinitelyBranching = (lts.ImageFinite ∧ ∀ (s : State), Finite ↑(lts.OutgoingLabels s))
Instances For
An LTS is finite-state if it has a finite State
type.
Equations
- x✝.FiniteState = Finite State
Instances For
Every finite-state LTS is also image-finite.
Every LTS with finite types for states and labels is also finitely branching.
Weak transitions (single- and multi-step) #
Saturated transition relation.
- refl {Label : Type u_1} {State : Type u_2} [HasTau Label] {lts : LTS State Label} {s : State} : lts.str s HasTau.τ s
- tr {Label : Type u_1} {State : Type u_2} [HasTau Label] {lts : LTS State Label} {s1 s2 : State} {μ : Label} {s3 s4 : State} : lts.str s1 HasTau.τ s2 → lts.tr s2 μ s3 → lts.str s3 HasTau.τ s4 → lts.str s1 μ s4
Instances For
As LTS.str
, but counts the number of τ
-transitions. This is convenient as induction metric.
- refl {Label : Type u_1} {State : Type u_2} [HasTau Label] {lts : LTS State Label} {s : State} : lts.strN 0 s HasTau.τ s
- tr {Label : Type u_1} {State : Type u_2} [HasTau Label] {lts : LTS State Label} {n : ℕ} {s1 s2 : State} {μ : Label} {s3 : State} {m : ℕ} {s4 : State} : lts.strN n s1 HasTau.τ s2 → lts.tr s2 μ s3 → lts.strN m s3 HasTau.τ s4 → lts.strN (n + m + 1) s1 μ s4
Instances For
Saturated transitions labelled by τ can be composed (weighted version).
Saturated transitions can be appended with τ-transitions (weighted version).
Saturated transitions can be composed (weighted version).
Divergence #
If a stream is a divergent execution, then any 'suffix' is also a divergent execution.