CTL*: state and path formulas
State and path formulas
InductiveState formulas of CTL\(^{\ast}\)#✓fully proved
State formulas of CTL*: atoms, truth, negation, conjunction, and
the path quantifiers E π and A π.
inductive StateFormula (Atom : Type u) where
| atom (a : Atom) : StateFormula Atom
| top : StateFormula Atom
| not (φ : StateFormula Atom) : StateFormula Atom
| and (φ ψ : StateFormula Atom) : StateFormula Atom
| exists (π : PathFormula Atom) : StateFormula Atom
| forall (π : PathFormula Atom) : StateFormula Atom
inductive PathFormula (Atom : Type u) where
| state (φ : StateFormula Atom) : PathFormula Atom
| not (π : PathFormula Atom) : PathFormula Atom
| and (π ρ : PathFormula Atom) : PathFormula Atom
| next (π : PathFormula Atom) : PathFormula Atom
| until (π ρ : PathFormula Atom) : PathFormula Atom
CSLibExt/Logics/CTLStar/Basic.lean:76
Used by 18
InductivePath formulas of CTL\(^{\ast}\)#✓fully proved
Path formulas of CTL*: a state formula at the first position,
negation, conjunction, next, and until.
inductive PathFormula (Atom : Type u) where
| state (φ : StateFormula Atom) : PathFormula Atom
| not (π : PathFormula Atom) : PathFormula Atom
| and (π ρ : PathFormula Atom) : PathFormula Atom
| next (π : PathFormula Atom) : PathFormula Atom
| until (π ρ : PathFormula Atom) : PathFormula Atom
inductive StateFormula (Atom : Type u) where
| atom (a : Atom) : StateFormula Atom
| top : StateFormula Atom
| not (φ : StateFormula Atom) : StateFormula Atom
| and (φ ψ : StateFormula Atom) : StateFormula Atom
| exists (π : PathFormula Atom) : StateFormula Atom
| forall (π : PathFormula Atom) : StateFormula Atom
CSLibExt/Logics/CTLStar/Basic.lean:66
Used by 19
Path Formula
DefinitionAlways operator on CTL\(^{\ast}\) path formulas#✓fully proved
G π: π holds at every position, as ¬(⊤ U ¬π).
def alwaysPath (π : PathFormula Atom) : PathFormula Atom :=
.not (.until (.state .top) (.not π))
inductive PathFormula (Atom : Type u) where
| state (φ : StateFormula Atom) : PathFormula Atom
| not (π : PathFormula Atom) : PathFormula Atom
| and (π ρ : PathFormula Atom) : PathFormula Atom
| next (π : PathFormula Atom) : PathFormula Atom
| until (π ρ : PathFormula Atom) : PathFormula Atom
CSLibExt/Logics/CTLStar/Basic.lean:76
Uses 2 · Used by 4
DefinitionEventually operator on CTL\(^{\ast}\) path formulas#✓fully proved
F π: π holds at some position, as ⊤ U π.
def eventuallyPath (π : PathFormula Atom) : PathFormula Atom :=
.until (.state .top) π
inductive PathFormula (Atom : Type u) where
| state (φ : StateFormula Atom) : PathFormula Atom
| not (π : PathFormula Atom) : PathFormula Atom
| and (π ρ : PathFormula Atom) : PathFormula Atom
| next (π : PathFormula Atom) : PathFormula Atom
| until (π ρ : PathFormula Atom) : PathFormula Atom
CSLibExt/Logics/CTLStar/Basic.lean:76
Uses 2 · Used by 1
Satisfaction
DefinitionSatisfaction of CTL\(^{\ast}\) state formulas#✓fully proved
Satisfaction of a CTL* state formula at a state: E π holds when
some infinite run from the state satisfies π; A π when every
infinite run does.
def StateSat (lts : _root_.Cslib.LTS State Label) (valuation : State → Atom → Prop) :
StateFormula Atom → State → Prop
| .atom a, s => valuation s a
| .top, _ => True
| .not φ, s => ¬ StateSat lts valuation φ s
| .and φ ψ, s => StateSat lts valuation φ s ∧ StateSat lts valuation ψ s
| .exists π, s => ∃ run, run 0 = s ∧ LTS.OmegaRun (lts := lts) run ∧ PathSat lts valuation π run
| .forall π, s => ∀ run, run 0 = s → LTS.OmegaRun (lts := lts) run → PathSat lts valuation π run
inductive StateFormula (Atom : Type u) where
| atom (a : Atom) : StateFormula Atom
| top : StateFormula Atom
| not (φ : StateFormula Atom) : StateFormula Atom
| and (φ ψ : StateFormula Atom) : StateFormula Atom
| exists (π : PathFormula Atom) : StateFormula Atom
| forall (π : PathFormula Atom) : StateFormula Atom
CSLibExt/Logics/CTLStar/Basic.lean:66
def OmegaRun (ss : ℕ → State) : Prop :=
∀ i, ∃ label, lts.Tr (ss i) label (ss (i + 1))
CSLibExt/Foundations/Semantics/LTS/OmegaRun.lean:66
def PathSat (lts : _root_.Cslib.LTS State Label) (valuation : State → Atom → Prop) :
PathFormula Atom → (ℕ → State) → Prop
| .state φ, run => StateSat lts valuation φ (run 0)
| .not π, run => ¬ PathSat lts valuation π run
| .and π ρ, run => PathSat lts valuation π run ∧ PathSat lts valuation ρ run
| .next π, run => PathSat lts valuation π (Semantics.shiftSeq run 1)
| .until π ρ, run =>
∃ k, PathSat lts valuation ρ (Semantics.shiftSeq run k) ∧
∀ j, j < k → PathSat lts valuation π (Semantics.shiftSeq run j)
CSLibExt/Logics/CTLStar/Basic.lean:117
Uses 4 · Used by 8
DefinitionSatisfaction of CTL\(^{\ast}\) path formulas on infinite runs#✓fully proved
Satisfaction of a CTL* path formula on an infinite run: next
shifts the run, until asks for a target position with the guard
before it.
def PathSat (lts : _root_.Cslib.LTS State Label) (valuation : State → Atom → Prop) :
PathFormula Atom → (ℕ → State) → Prop
| .state φ, run => StateSat lts valuation φ (run 0)
| .not π, run => ¬ PathSat lts valuation π run
| .and π ρ, run => PathSat lts valuation π run ∧ PathSat lts valuation ρ run
| .next π, run => PathSat lts valuation π (Semantics.shiftSeq run 1)
| .until π ρ, run =>
∃ k, PathSat lts valuation ρ (Semantics.shiftSeq run k) ∧
∀ j, j < k → PathSat lts valuation π (Semantics.shiftSeq run j)
inductive PathFormula (Atom : Type u) where
| state (φ : StateFormula Atom) : PathFormula Atom
| not (π : PathFormula Atom) : PathFormula Atom
| and (π ρ : PathFormula Atom) : PathFormula Atom
| next (π : PathFormula Atom) : PathFormula Atom
| until (π ρ : PathFormula Atom) : PathFormula Atom
CSLibExt/Logics/CTLStar/Basic.lean:76
def StateSat (lts : _root_.Cslib.LTS State Label) (valuation : State → Atom → Prop) :
StateFormula Atom → State → Prop
| .atom a, s => valuation s a
| .top, _ => True
| .not φ, s => ¬ StateSat lts valuation φ s
| .and φ ψ, s => StateSat lts valuation φ s ∧ StateSat lts valuation ψ s
| .exists π, s => ∃ run, run 0 = s ∧ LTS.OmegaRun (lts := lts) run ∧ PathSat lts valuation π run
| .forall π, s => ∀ run, run 0 = s → LTS.OmegaRun (lts := lts) run → PathSat lts valuation π run
CSLibExt/Logics/CTLStar/Basic.lean:105
def shiftSeq {State : Type*} (ss : ℕ → State) (k : ℕ) : ℕ → State :=
fun i => ss (i + k)
CSLibExt/Foundations/Semantics/LTS/OmegaRun.lean:37
Uses 4 · Used by 13
TheoremA state formula on a run holds at its first state#✓fully proved
Unfolding: a state formula on a run is satisfaction at its first state.
theorem pathSat_state (φ : StateFormula Atom) (run : ℕ → State) :
PathSat lts valuation (.state φ) run = StateSat lts valuation φ (run 0)
inductive StateFormula (Atom : Type u) where
| atom (a : Atom) : StateFormula Atom
| top : StateFormula Atom
| not (φ : StateFormula Atom) : StateFormula Atom
| and (φ ψ : StateFormula Atom) : StateFormula Atom
| exists (π : PathFormula Atom) : StateFormula Atom
| forall (π : PathFormula Atom) : StateFormula Atom
CSLibExt/Logics/CTLStar/Basic.lean:66
def PathSat (lts : _root_.Cslib.LTS State Label) (valuation : State → Atom → Prop) :
PathFormula Atom → (ℕ → State) → Prop
| .state φ, run => StateSat lts valuation φ (run 0)
| .not π, run => ¬ PathSat lts valuation π run
| .and π ρ, run => PathSat lts valuation π run ∧ PathSat lts valuation ρ run
| .next π, run => PathSat lts valuation π (Semantics.shiftSeq run 1)
| .until π ρ, run =>
∃ k, PathSat lts valuation ρ (Semantics.shiftSeq run k) ∧
∀ j, j < k → PathSat lts valuation π (Semantics.shiftSeq run j)
CSLibExt/Logics/CTLStar/Basic.lean:117
def StateSat (lts : _root_.Cslib.LTS State Label) (valuation : State → Atom → Prop) :
StateFormula Atom → State → Prop
| .atom a, s => valuation s a
| .top, _ => True
| .not φ, s => ¬ StateSat lts valuation φ s
| .and φ ψ, s => StateSat lts valuation φ s ∧ StateSat lts valuation ψ s
| .exists π, s => ∃ run, run 0 = s ∧ LTS.OmegaRun (lts := lts) run ∧ PathSat lts valuation π run
| .forall π, s => ∀ run, run 0 = s → LTS.OmegaRun (lts := lts) run → PathSat lts valuation π run
CSLibExt/Logics/CTLStar/Basic.lean:105
TheoremNext on a run is satisfaction on the shifted run#✓fully proved
Unfolding: next shifts the run.
theorem pathSat_next (π : PathFormula Atom) (run : ℕ → State) :
PathSat lts valuation (.next π) run =
PathSat lts valuation π (Semantics.shiftSeq run 1)
inductive PathFormula (Atom : Type u) where
| state (φ : StateFormula Atom) : PathFormula Atom
| not (π : PathFormula Atom) : PathFormula Atom
| and (π ρ : PathFormula Atom) : PathFormula Atom
| next (π : PathFormula Atom) : PathFormula Atom
| until (π ρ : PathFormula Atom) : PathFormula Atom
CSLibExt/Logics/CTLStar/Basic.lean:76
def PathSat (lts : _root_.Cslib.LTS State Label) (valuation : State → Atom → Prop) :
PathFormula Atom → (ℕ → State) → Prop
| .state φ, run => StateSat lts valuation φ (run 0)
| .not π, run => ¬ PathSat lts valuation π run
| .and π ρ, run => PathSat lts valuation π run ∧ PathSat lts valuation ρ run
| .next π, run => PathSat lts valuation π (Semantics.shiftSeq run 1)
| .until π ρ, run =>
∃ k, PathSat lts valuation ρ (Semantics.shiftSeq run k) ∧
∀ j, j < k → PathSat lts valuation π (Semantics.shiftSeq run j)
CSLibExt/Logics/CTLStar/Basic.lean:117
def shiftSeq {State : Type*} (ss : ℕ → State) (k : ℕ) : ℕ → State :=
fun i => ss (i + k)
CSLibExt/Foundations/Semantics/LTS/OmegaRun.lean:37
Uses 3 · Used by 1
TheoremA run shifted by k starts at its k-th state#✓fully proved
(shiftSeq run k) 0 = run k: the 0 + k is discharged by
Nat.zero_add.
theorem shiftSeq_apply_zero (run : ℕ → State) (k : ℕ) :
Semantics.shiftSeq run k 0 = run k
def shiftSeq {State : Type*} (ss : ℕ → State) (k : ℕ) : ℕ → State :=
fun i => ss (i + k)
CSLibExt/Foundations/Semantics/LTS/OmegaRun.lean:37
Uses 1 · Used by 2
TheoremA state formula on a shifted run holds at the shifted state#✓fully proved
A state formula on a shifted run is satisfaction at the shifted position.
theorem pathSat_state_shift (φ : StateFormula Atom) (run : ℕ → State) (k : ℕ) :
PathSat lts valuation (.state φ) (Semantics.shiftSeq run k) =
StateSat lts valuation φ (run k)
inductive StateFormula (Atom : Type u) where
| atom (a : Atom) : StateFormula Atom
| top : StateFormula Atom
| not (φ : StateFormula Atom) : StateFormula Atom
| and (φ ψ : StateFormula Atom) : StateFormula Atom
| exists (π : PathFormula Atom) : StateFormula Atom
| forall (π : PathFormula Atom) : StateFormula Atom
CSLibExt/Logics/CTLStar/Basic.lean:66
def PathSat (lts : _root_.Cslib.LTS State Label) (valuation : State → Atom → Prop) :
PathFormula Atom → (ℕ → State) → Prop
| .state φ, run => StateSat lts valuation φ (run 0)
| .not π, run => ¬ PathSat lts valuation π run
| .and π ρ, run => PathSat lts valuation π run ∧ PathSat lts valuation ρ run
| .next π, run => PathSat lts valuation π (Semantics.shiftSeq run 1)
| .until π ρ, run =>
∃ k, PathSat lts valuation ρ (Semantics.shiftSeq run k) ∧
∀ j, j < k → PathSat lts valuation π (Semantics.shiftSeq run j)
CSLibExt/Logics/CTLStar/Basic.lean:117
def shiftSeq {State : Type*} (ss : ℕ → State) (k : ℕ) : ℕ → State :=
fun i => ss (i + k)
CSLibExt/Foundations/Semantics/LTS/OmegaRun.lean:37
def StateSat (lts : _root_.Cslib.LTS State Label) (valuation : State → Atom → Prop) :
StateFormula Atom → State → Prop
| .atom a, s => valuation s a
| .top, _ => True
| .not φ, s => ¬ StateSat lts valuation φ s
| .and φ ψ, s => StateSat lts valuation φ s ∧ StateSat lts valuation ψ s
| .exists π, s => ∃ run, run 0 = s ∧ LTS.OmegaRun (lts := lts) run ∧ PathSat lts valuation π run
| .forall π, s => ∀ run, run 0 = s → LTS.OmegaRun (lts := lts) run → PathSat lts valuation π run
CSLibExt/Logics/CTLStar/Basic.lean:105
Uses 7 · Used by 1
TheoremAlways holds on a run iff its argument holds on every suffix#✓fully proved
G π holds on a run iff π holds on every suffix.
theorem pathSat_always (run : ℕ → State) :
PathSat lts valuation (π.alwaysPath) run ↔
∀ i, PathSat lts valuation π (Semantics.shiftSeq run i)
def PathSat (lts : _root_.Cslib.LTS State Label) (valuation : State → Atom → Prop) :
PathFormula Atom → (ℕ → State) → Prop
| .state φ, run => StateSat lts valuation φ (run 0)
| .not π, run => ¬ PathSat lts valuation π run
| .and π ρ, run => PathSat lts valuation π run ∧ PathSat lts valuation ρ run
| .next π, run => PathSat lts valuation π (Semantics.shiftSeq run 1)
| .until π ρ, run =>
∃ k, PathSat lts valuation ρ (Semantics.shiftSeq run k) ∧
∀ j, j < k → PathSat lts valuation π (Semantics.shiftSeq run j)
CSLibExt/Logics/CTLStar/Basic.lean:117
def shiftSeq {State : Type*} (ss : ℕ → State) (k : ℕ) : ℕ → State :=
fun i => ss (i + k)
CSLibExt/Foundations/Semantics/LTS/OmegaRun.lean:37
Uses 5 · Used by 2
TheoremEventually holds on a run iff its argument holds on some suffix#✓fully proved
F π holds on a run iff π holds on some suffix.
theorem pathSat_eventually (run : ℕ → State) :
PathSat lts valuation (π.eventuallyPath) run ↔
∃ k, PathSat lts valuation π (Semantics.shiftSeq run k)
def PathSat (lts : _root_.Cslib.LTS State Label) (valuation : State → Atom → Prop) :
PathFormula Atom → (ℕ → State) → Prop
| .state φ, run => StateSat lts valuation φ (run 0)
| .not π, run => ¬ PathSat lts valuation π run
| .and π ρ, run => PathSat lts valuation π run ∧ PathSat lts valuation ρ run
| .next π, run => PathSat lts valuation π (Semantics.shiftSeq run 1)
| .until π ρ, run =>
∃ k, PathSat lts valuation ρ (Semantics.shiftSeq run k) ∧
∀ j, j < k → PathSat lts valuation π (Semantics.shiftSeq run j)
CSLibExt/Logics/CTLStar/Basic.lean:117
def shiftSeq {State : Type*} (ss : ℕ → State) (k : ℕ) : ℕ → State :=
fun i => ss (i + k)
CSLibExt/Foundations/Semantics/LTS/OmegaRun.lean:37
DefinitionEmbedding of LTL formulas as CTL\(^{\ast}\) path formulas#✓fully proved
The LTL embedding: every LTL formula is a CTL* path formula.
def embedLTL : LTL.Formula Atom → PathFormula Atom
| .atom a => .state (.atom a)
| .top => .state .top
| .not φ => .not (embedLTL φ)
| .and φ ψ => .and (embedLTL φ) (embedLTL ψ)
| .next φ => .next (embedLTL φ)
| .until φ ψ => .until (embedLTL φ) (embedLTL ψ)
inductive Formula (Atom : Type u) : Type u where
| atom (a : Atom) : Formula Atom
| top : Formula Atom
| not (φ : Formula Atom) : Formula Atom
| and (φ ψ : Formula Atom) : Formula Atom
| next (φ : Formula Atom) : Formula Atom
| until (φ ψ : Formula Atom) : Formula Atom
deriving DecidableEq, Repr
CSLibExt/Logics/LTL/Syntax.lean:37
inductive PathFormula (Atom : Type u) where
| state (φ : StateFormula Atom) : PathFormula Atom
| not (π : PathFormula Atom) : PathFormula Atom
| and (π ρ : PathFormula Atom) : PathFormula Atom
| next (π : PathFormula Atom) : PathFormula Atom
| until (π ρ : PathFormula Atom) : PathFormula Atom
CSLibExt/Logics/CTLStar/Basic.lean:76
TheoremThe LTL embedding preserves semantics on every sequence#✓fully proved
The LTL embedding preserves semantics on every state sequence,
including sequences that are not valid runs of lts.
theorem embedLTL_sat (φ : LTL.Formula Atom) :
∀ run, PathSat lts valuation (embedLTL φ) run ↔
LTL.Word.Satisfies valuation ⟨run⟩ φ
inductive Formula (Atom : Type u) : Type u where
| atom (a : Atom) : Formula Atom
| top : Formula Atom
| not (φ : Formula Atom) : Formula Atom
| and (φ ψ : Formula Atom) : Formula Atom
| next (φ : Formula Atom) : Formula Atom
| until (φ ψ : Formula Atom) : Formula Atom
deriving DecidableEq, Repr
CSLibExt/Logics/LTL/Syntax.lean:37
def PathSat (lts : _root_.Cslib.LTS State Label) (valuation : State → Atom → Prop) :
PathFormula Atom → (ℕ → State) → Prop
| .state φ, run => StateSat lts valuation φ (run 0)
| .not π, run => ¬ PathSat lts valuation π run
| .and π ρ, run => PathSat lts valuation π run ∧ PathSat lts valuation ρ run
| .next π, run => PathSat lts valuation π (Semantics.shiftSeq run 1)
| .until π ρ, run =>
∃ k, PathSat lts valuation ρ (Semantics.shiftSeq run k) ∧
∀ j, j < k → PathSat lts valuation π (Semantics.shiftSeq run j)
CSLibExt/Logics/CTLStar/Basic.lean:117
def embedLTL : LTL.Formula Atom → PathFormula Atom
| .atom a => .state (.atom a)
| .top => .state .top
| .not φ => .not (embedLTL φ)
| .and φ ψ => .and (embedLTL φ) (embedLTL ψ)
| .next φ => .next (embedLTL φ)
| .until φ ψ => .until (embedLTL φ) (embedLTL ψ)
CSLibExt/Logics/CTLStar/Basic.lean:176
def Satisfies (valuation : Symbol → Atom → Prop) (w : ωSequence Symbol) :
Formula Atom → Prop
| .atom a => valuation (w 0) a
| .top => True
| .not φ => ¬ Satisfies valuation w φ
| .and φ ψ => Satisfies valuation w φ ∧ Satisfies valuation w ψ
| .next φ => Satisfies valuation w.tail φ
| .until φ ψ =>
∃ k, Satisfies valuation (w.drop k) ψ ∧ ∀ j < k, Satisfies valuation (w.drop j) φ
CSLibExt/Logics/LTL/OmegaWord.lean:66
Uses 5 · Used by 1
TheoremThe LTL embedding preserves semantics at every position#✓fully proved
The structural LTL embedding also agrees at every position, without assuming the sequence is a valid transition run.
theorem embedLTL_sat_at (φ : LTL.Formula Atom) (run : ℕ → State)
(k : ℕ) :
PathSat lts valuation (embedLTL φ) (Semantics.shiftSeq run k) ↔
LTL.Word.SatisfiesAt valuation ⟨run⟩ k φ
inductive Formula (Atom : Type u) : Type u where
| atom (a : Atom) : Formula Atom
| top : Formula Atom
| not (φ : Formula Atom) : Formula Atom
| and (φ ψ : Formula Atom) : Formula Atom
| next (φ : Formula Atom) : Formula Atom
| until (φ ψ : Formula Atom) : Formula Atom
deriving DecidableEq, Repr
CSLibExt/Logics/LTL/Syntax.lean:37
def PathSat (lts : _root_.Cslib.LTS State Label) (valuation : State → Atom → Prop) :
PathFormula Atom → (ℕ → State) → Prop
| .state φ, run => StateSat lts valuation φ (run 0)
| .not π, run => ¬ PathSat lts valuation π run
| .and π ρ, run => PathSat lts valuation π run ∧ PathSat lts valuation ρ run
| .next π, run => PathSat lts valuation π (Semantics.shiftSeq run 1)
| .until π ρ, run =>
∃ k, PathSat lts valuation ρ (Semantics.shiftSeq run k) ∧
∀ j, j < k → PathSat lts valuation π (Semantics.shiftSeq run j)
CSLibExt/Logics/CTLStar/Basic.lean:117
def embedLTL : LTL.Formula Atom → PathFormula Atom
| .atom a => .state (.atom a)
| .top => .state .top
| .not φ => .not (embedLTL φ)
| .and φ ψ => .and (embedLTL φ) (embedLTL ψ)
| .next φ => .next (embedLTL φ)
| .until φ ψ => .until (embedLTL φ) (embedLTL ψ)
CSLibExt/Logics/CTLStar/Basic.lean:176
def shiftSeq {State : Type*} (ss : ℕ → State) (k : ℕ) : ℕ → State :=
fun i => ss (i + k)
CSLibExt/Foundations/Semantics/LTS/OmegaRun.lean:37
def SatisfiesAt (valuation : Symbol → Atom → Prop) (w : ωSequence Symbol) (k : ℕ)
(φ : Formula Atom) : Prop :=
Satisfies valuation (w.drop k) φ
CSLibExt/Logics/LTL/OmegaWord.lean:77
DefinitionEmbedding of CTL formulas as CTL\(^{\ast}\) state formulas#✓fully proved
The CTL embedding: every CTL formula is a CTL* state formula.
EG φ is E G (state φ); AU is A (state φ U state ψ).
def embedCTL : CTL.Formula Atom → StateFormula Atom
| .atom a => .atom a
| .top => .top
| .not φ => .not (embedCTL φ)
| .and φ ψ => .and (embedCTL φ) (embedCTL ψ)
| .existsNext φ => .exists (.next (.state (embedCTL φ)))
| .existsUntil φ ψ => .exists (.until (.state (embedCTL φ)) (.state (embedCTL ψ)))
| .existsGlobally φ => .exists (.alwaysPath (.state (embedCTL φ)))
| .forallUntil φ ψ => .forall (.until (.state (embedCTL φ)) (.state (embedCTL ψ)))
inductive Formula (Atom : Type u) : Type u where
| atom (a : Atom) : Formula Atom
| top : Formula Atom
| not (φ : Formula Atom) : Formula Atom
| and (φ ψ : Formula Atom) : Formula Atom
| existsNext (φ : Formula Atom) : Formula Atom
| existsUntil (φ ψ : Formula Atom) : Formula Atom
| existsGlobally (φ : Formula Atom) : Formula Atom
| forallUntil (φ ψ : Formula Atom) : Formula Atom
CSLibExt/Logics/CTL/Basic.lean:70
inductive StateFormula (Atom : Type u) where
| atom (a : Atom) : StateFormula Atom
| top : StateFormula Atom
| not (φ : StateFormula Atom) : StateFormula Atom
| and (φ ψ : StateFormula Atom) : StateFormula Atom
| exists (π : PathFormula Atom) : StateFormula Atom
| forall (π : PathFormula Atom) : StateFormula Atom
CSLibExt/Logics/CTLStar/Basic.lean:66
Uses 4 · Used by 1
TheoremThe CTL embedding preserves semantics on serial systems#✓fully proved
The CTL embedding preserves semantics on serial systems.
theorem embedCTL_sat (hser : CTL.Serial lts) (φ : CTL.Formula Atom) :
∀ {s : State}, StateSat lts valuation (embedCTL φ) s ↔
CTL.Satisfies lts valuation s φ
def Serial (lts : LTS State Label) : Prop :=
∀ s, ∃ label t, lts.Tr s label t
CSLibExt/Logics/CTL/Basic.lean:164
inductive Formula (Atom : Type u) : Type u where
| atom (a : Atom) : Formula Atom
| top : Formula Atom
| not (φ : Formula Atom) : Formula Atom
| and (φ ψ : Formula Atom) : Formula Atom
| existsNext (φ : Formula Atom) : Formula Atom
| existsUntil (φ ψ : Formula Atom) : Formula Atom
| existsGlobally (φ : Formula Atom) : Formula Atom
| forallUntil (φ ψ : Formula Atom) : Formula Atom
CSLibExt/Logics/CTL/Basic.lean:70
def StateSat (lts : _root_.Cslib.LTS State Label) (valuation : State → Atom → Prop) :
StateFormula Atom → State → Prop
| .atom a, s => valuation s a
| .top, _ => True
| .not φ, s => ¬ StateSat lts valuation φ s
| .and φ ψ, s => StateSat lts valuation φ s ∧ StateSat lts valuation ψ s
| .exists π, s => ∃ run, run 0 = s ∧ LTS.OmegaRun (lts := lts) run ∧ PathSat lts valuation π run
| .forall π, s => ∀ run, run 0 = s → LTS.OmegaRun (lts := lts) run → PathSat lts valuation π run
CSLibExt/Logics/CTLStar/Basic.lean:105
def embedCTL : CTL.Formula Atom → StateFormula Atom
| .atom a => .atom a
| .top => .top
| .not φ => .not (embedCTL φ)
| .and φ ψ => .and (embedCTL φ) (embedCTL ψ)
| .existsNext φ => .exists (.next (.state (embedCTL φ)))
| .existsUntil φ ψ => .exists (.until (.state (embedCTL φ)) (.state (embedCTL ψ)))
| .existsGlobally φ => .exists (.alwaysPath (.state (embedCTL φ)))
| .forallUntil φ ψ => .forall (.until (.state (embedCTL φ)) (.state (embedCTL ψ)))
CSLibExt/Logics/CTLStar/Basic.lean:237
def Satisfies (lts : LTS State Label)
(valuation : State → Atom → Prop) (state : State) :
Formula Atom → Prop
| .atom a => valuation state a
| .top => True
| .not φ => ¬Satisfies lts valuation state φ
| .and φ ψ =>
Satisfies lts valuation state φ ∧ Satisfies lts valuation state ψ
| .existsNext φ =>
∃ label next, lts.Tr state label next ∧
Satisfies lts valuation next φ
| .existsUntil φ ψ =>
⋯
CSLibExt/Logics/CTL/Basic.lean:128
Uses 16
DefinitionToggle transition system#✓fully proved
The toggle system: every transition flips the state.
Used by 2
DefinitionValuation of the toggle system#✓fully proved
The valuation: p holds exactly at true.
Used by 1
TheoremThe toggle system is serial#✓fully proved
The toggle system is serial: every state has a successor.
theorem toggle_serial : CTL.Serial toggleLTS
def Serial (lts : LTS State Label) : Prop :=
∀ s, ∃ label t, lts.Tr s label t
CSLibExt/Logics/CTL/Basic.lean:164
def toggleLTS : _root_.Cslib.LTS Bool Unit where
Tr := fun s _ t => t = !s
CSLibExt/Logics/CTLStar/Basic.lean:349
Uses 2
DefinitionAlternating run of the toggle system#✓fully proved
The alternating run of the toggle system: false, true, false,
true, ..., defined by recursion so each step flips the state.
Used by 1
Theorem\(E\,G\,F\,p\) holds at false in the toggle system#✓fully proved
E G F p holds at false in the toggle system: the alternating
run visits true at every other position. This example makes no claim
of an expressiveness separation.
theorem toggle_egf_p :
StateSat toggleLTS toggleValuation
(.exists (.alwaysPath (.until (.state .top) (.state (.atom ())))))
false
def StateSat (lts : _root_.Cslib.LTS State Label) (valuation : State → Atom → Prop) :
StateFormula Atom → State → Prop
| .atom a, s => valuation s a
| .top, _ => True
| .not φ, s => ¬ StateSat lts valuation φ s
| .and φ ψ, s => StateSat lts valuation φ s ∧ StateSat lts valuation ψ s
| .exists π, s => ∃ run, run 0 = s ∧ LTS.OmegaRun (lts := lts) run ∧ PathSat lts valuation π run
| .forall π, s => ∀ run, run 0 = s → LTS.OmegaRun (lts := lts) run → PathSat lts valuation π run
CSLibExt/Logics/CTLStar/Basic.lean:105
def toggleLTS : _root_.Cslib.LTS Bool Unit where
Tr := fun s _ t => t = !s
CSLibExt/Logics/CTLStar/Basic.lean:349
def toggleValuation : Bool → Unit → Prop := fun s _ => s = true
CSLibExt/Logics/CTLStar/Basic.lean:353
Uses 13
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.