Cslib.LTS.Acyclic.toBoundedUpTo
theoremverifiedformalizationimported Lean
On a finite state space, an acyclic LTS has execution length strictly less than the number of states.
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) (Terminated : State → Prop) in theorem Cslib.LTS.Acyclic.toBoundedUpTo [Finite State] (h : lts.Acyclic) : lts.BoundedUpTo (Nat.card State)
- Formalizes
- CSLib, `Cslib.LTS.Acyclic.toBoundedUpTo`
- Lean proof
- By Fabrizio Montesi, 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.Cslib.LTS.Acyclic.toBoundedUpTo← Cslib.LTS.Acyclic.toBoundedUpTo (Cslib/Foundations/Semantics/LTS/Termination.lean:63): verbatim
- Verified
- 08 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 10
- Cslib.LTS.MTrDefinition of a multistep transition. (Implementation note: compared to [Montesi2023], we choose stepL instead of stepR as fundamental…
- Cslib.LTS.Execution
ExecutionextendsMTrby providing the intermediate states of a multistep transition. - Cslib.LTS.MTr.nil_iffCslib.LTS.MTr.nil_iff
- Cslib.LTS.Execution.isChainThe states visited by an execution form a chain in the underlying unlabelled relation.
- Cslib.LTS.AcyclicAn LTS is acyclic if its underlying unlabelled transition relation contains no nonempty cycle.
- Cslib.LTS.Execution.of_mTrA multistep transition implies the existence of an execution.
- Cslib.LTS.MTr.singleton_iffA 1-sized multistep transition is exactly a single transition with the given label.
- Cslib.LTS.BoundedUpToAn LTS is bounded up to
nif every finite execution has length strictly less thann. - 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.UnlabelledTrThe unlabelled transition relation underlying an LTS.
- Used by 1
- Cslib.LTS.Acyclic.toBoundedOn a finite state space, acyclic LTSs are bounded.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
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) (Terminated : State → Prop) in/-- On a finite state space, an acyclic LTS has execution length strictly less than the number of states. -/theorem Cslib.LTS.Acyclic.toBoundedUpTo [Finite State] (h : lts.Acyclic) : lts.BoundedUpTo (Nat.card State) := by classical let := Fintype.ofFinite State rw [Nat.card_eq_fintype_card] intro s1 μs s2 hmtr obtain ⟨states, hexec⟩ := Execution.of_mTr hmtr have hchain : states.IsChain (Relation.TransGen lts.UnlabelledTr) := hexec.isChain.imp_of_mem_imp fun _ _ _ _ htr => .single htr let : Std.Irrefl (Relation.TransGen lts.UnlabelledTr) := h.acyclic have hcard := hchain.pairwise.nodup.length_le_card grind [Execution]