Relational interpretation of PDL programs
DefinitionRelational interpretation of a PDL program#✓fully proved
Interpret a PDL program in CSLib's canonical relation algebra.
def Program.toRelation (M : Model World Atom Label)
(a : Program Atom Label) : SquareRelations World :=
{(s, t) | ProgRel M a s t}
structure Model (World : Type u) (Atom : Type v) (Label : Type w) where
/-- One accessibility relation per atomic program label. -/
rel : Label → World → World → Prop
/-- The atoms true at each world. -/
valuation : World → Atom → Prop
CSLibExt/Logics/PDL/Basic.lean:44
inductive Program (Atom : Type v) (Label : Type w) where
| atomic (a : Label) : Program Atom Label
| seq (α β : Program Atom Label) : Program Atom Label
| choice (α β : Program Atom Label) : Program Atom Label
| star (α : Program Atom Label) : Program Atom Label
| test (φ : Formula Atom Label) : Program Atom Label
CSLibExt/Logics/PDL/Basic.lean:59
def ProgRel {World Atom Label : Type*} (M : Model World Atom Label) :
Program Atom Label → World → World → Prop
| .atomic a, w, v => M.rel a w v
| .seq α β, w, v => ∃ u, ProgRel M α w u ∧ ProgRel M β u v
| .choice α β, w, v => ProgRel M α w v ∨ ProgRel M β w v
| .star α, w, v => Relation.ReflTransGen (ProgRel M α) w v
| .test φ, w, v => w = v ∧ Sat M φ w
CSLibExt/Logics/PDL/Basic.lean:76
Uses 3 · Used by 11
TheoremRelational interpretation preserves executions#✓fully proved
The representation conversion preserves exactly the executions.
@[simp] theorem Program.mem_toRelation (M : Model World Atom Label)
(a : Program Atom Label) (s t : World) :
a.toRelation M (s, t) ↔ ProgRel M a s t
structure Model (World : Type u) (Atom : Type v) (Label : Type w) where
/-- One accessibility relation per atomic program label. -/
rel : Label → World → World → Prop
/-- The atoms true at each world. -/
valuation : World → Atom → Prop
CSLibExt/Logics/PDL/Basic.lean:44
inductive Program (Atom : Type v) (Label : Type w) where
| atomic (a : Label) : Program Atom Label
| seq (α β : Program Atom Label) : Program Atom Label
| choice (α β : Program Atom Label) : Program Atom Label
| star (α : Program Atom Label) : Program Atom Label
| test (φ : Formula Atom Label) : Program Atom Label
CSLibExt/Logics/PDL/Basic.lean:59
def ProgRel {World Atom Label : Type*} (M : Model World Atom Label) :
Program Atom Label → World → World → Prop
| .atomic a, w, v => M.rel a w v
| .seq α β, w, v => ∃ u, ProgRel M α w u ∧ ProgRel M β u v
| .choice α β, w, v => ProgRel M α w v ∨ ProgRel M β w v
| .star α, w, v => Relation.ReflTransGen (ProgRel M α) w v
| .test φ, w, v => w = v ∧ Sat M φ w
CSLibExt/Logics/PDL/Basic.lean:76
Uses 4
TheoremSequencing is interpreted by relational composition#✓fully proved
The interpretation of sequencing uses canonical composition.
@[simp] theorem Program.toRelation_seq (M : Model World Atom Label)
(a b : Program Atom Label) :
(a.seq b).toRelation M = a.toRelation M * b.toRelation M
structure Model (World : Type u) (Atom : Type v) (Label : Type w) where
/-- One accessibility relation per atomic program label. -/
rel : Label → World → World → Prop
/-- The atoms true at each world. -/
valuation : World → Atom → Prop
CSLibExt/Logics/PDL/Basic.lean:44
inductive Program (Atom : Type v) (Label : Type w) where
| atomic (a : Label) : Program Atom Label
| seq (α β : Program Atom Label) : Program Atom Label
| choice (α β : Program Atom Label) : Program Atom Label
| star (α : Program Atom Label) : Program Atom Label
| test (φ : Formula Atom Label) : Program Atom Label
CSLibExt/Logics/PDL/Basic.lean:59
Uses 3
TheoremChoice is interpreted by relational union#✓fully proved
The interpretation of choice uses canonical union.
@[simp] theorem Program.toRelation_choice (M : Model World Atom Label)
(a b : Program Atom Label) :
(a.choice b).toRelation M = a.toRelation M ⊔ b.toRelation M
structure Model (World : Type u) (Atom : Type v) (Label : Type w) where
/-- One accessibility relation per atomic program label. -/
rel : Label → World → World → Prop
/-- The atoms true at each world. -/
valuation : World → Atom → Prop
CSLibExt/Logics/PDL/Basic.lean:44
inductive Program (Atom : Type v) (Label : Type w) where
| atomic (a : Label) : Program Atom Label
| seq (α β : Program Atom Label) : Program Atom Label
| choice (α β : Program Atom Label) : Program Atom Label
| star (α : Program Atom Label) : Program Atom Label
| test (φ : Formula Atom Label) : Program Atom Label
CSLibExt/Logics/PDL/Basic.lean:59
Uses 3
TheoremTests are interpreted by PDL satisfaction#✓fully proved
Formula tests use the existing PDL satisfaction predicate.
@[simp] theorem Program.toRelation_test (M : Model World Atom Label)
(φ : Formula Atom Label) :
(Program.test φ).toRelation M = testSet {s | Sat M φ s}
structure Model (World : Type u) (Atom : Type v) (Label : Type w) where
/-- One accessibility relation per atomic program label. -/
rel : Label → World → World → Prop
/-- The atoms true at each world. -/
valuation : World → Atom → Prop
CSLibExt/Logics/PDL/Basic.lean:44
inductive Formula (Atom : Type v) (Label : Type w) where
| atom (a : Atom) : Formula Atom Label
| bot : Formula Atom Label
| imp (φ ψ : Formula Atom Label) : Formula Atom Label
| box (α : Program Atom Label) (φ : Formula Atom Label) : Formula Atom Label
CSLibExt/Logics/PDL/Basic.lean:52
inductive Program (Atom : Type v) (Label : Type w) where
| atomic (a : Label) : Program Atom Label
| seq (α β : Program Atom Label) : Program Atom Label
| choice (α β : Program Atom Label) : Program Atom Label
| star (α : Program Atom Label) : Program Atom Label
| test (φ : Formula Atom Label) : Program Atom Label
CSLibExt/Logics/PDL/Basic.lean:59
def testSet (P : Set World) : SquareRelations World :=
{(s, t) | s = t ∧ s ∈ P}
CSLibExt/Foundations/RelationAlgebra/Tests.lean:33
def Sat {World Atom Label : Type*} (M : Model World Atom Label) :
Formula Atom Label → World → Prop
| .atom a, w => M.valuation w a
| .bot, _ => False
| .imp φ ψ, w => Sat M φ w → Sat M ψ w
| .box α φ, w => ∀ v, ProgRel M α w v → Sat M φ v
CSLibExt/Logics/PDL/Basic.lean:85
Uses 6
TheoremIteration is interpreted by reflexive-transitive closure#✓fully proved
Iteration in the canonical carrier is the same reflexive-transitive
closure as in ProgRel, including its identity boundary.
@[simp] theorem Program.toRelation_star (M : Model World Atom Label)
(a : Program Atom Label) :
a.star.toRelation M = {(s, t) |
Relation.ReflTransGen (fun x y => a.toRelation M (x, y)) s t}
structure Model (World : Type u) (Atom : Type v) (Label : Type w) where
/-- One accessibility relation per atomic program label. -/
rel : Label → World → World → Prop
/-- The atoms true at each world. -/
valuation : World → Atom → Prop
CSLibExt/Logics/PDL/Basic.lean:44
inductive Program (Atom : Type v) (Label : Type w) where
| atomic (a : Label) : Program Atom Label
| seq (α β : Program Atom Label) : Program Atom Label
| choice (α β : Program Atom Label) : Program Atom Label
| star (α : Program Atom Label) : Program Atom Label
| test (φ : Formula Atom Label) : Program Atom Label
CSLibExt/Logics/PDL/Basic.lean:59
Uses 3
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.