Finite and infinite traces, inductively and coinductively
Jurriaan Rot WAIT 2018
1/16
Finite and infinite traces, inductively and coinductively Jurriaan - - PowerPoint PPT Presentation
Finite and infinite traces, inductively and coinductively Jurriaan Rot WAIT 2018 1/16 Overview Classic fact: if an LTS is image-finite, then finite trace equivalence coincides with infinite trace equivalence Standard proof:
Jurriaan Rot WAIT 2018
1/16
Overview
coincides with infinite trace equivalence
where it is a little bit hidden
(Lochbihler and/or Hölzl and/or . . . ?)
2/16
Warming up: König’s tree lemma
Lemma Suppose t is a finitely branching tree whose root has infinitely many
Standard approach: explicitly construct an infinite path, see e.g. the three proofs at https://proofwiki.org/wiki/König%27s_Tree_Lemma
3/16
Coinduction in a lattice
b: L → L monotone function on complete lattice L: y ≤ x ≤ b(x) y ≤ νb
coinduction
4/16
Trees with infinite paths
Let T = {t | t is (the root of) a finitely branching tree} and P(T) the powerset; complete lattice, ordered by inclusion. Define p : P(T) → P(T) by p(S) = {t | ∃t′.t → t′ and t′ ∈ S} Then νp = {t ∈ T | t has an infinite path} (this is where the explicit construction of paths comes in).
5/16
König’s tree lemma revisited
Let I = {t ∈ T | t has infinitely many successors} König’s lemma reformulated: I ⊆ νp To prove this, it suffices to show I ⊆ p(I) This is the essence: if t has infinitely many successors and finite branching, then one of it’s children has infinitely many successors. Separation of concerns:
6/16
LTSs, traces
Labelled transition system (LTS): set X with relation → ⊆ X × A × X Finitely branching if for all x: the set {x′ | ∃a.x
a
− → x′} is finite Image-finite if for all x, a the set {x′ | x
a
− → x′} is finite Finite words/traces denoted by A∗, infinite words/traces by Aω
7/16
Statement
Denote by trfin(x) ⊆ A∗ the set of traces starting in x, and trinf(x) ⊆ Aω the set of infinite traces. Theorem Suppose our LTS is image-finite. Then for any x ∈ X: if trfin(x) ⊆ trfin(y), then trinf(x) ⊆ trinf(y) “Standard” proof: explicitly construct traces by induction Image-finiteness needed: ·
...
· ·
· ·
8/16
Trace semantics, more precisely
Note that for any X, Y , the set P(Y )X is a complete lattice, ordered by pointwise inclusion. Finite trace semantics: least map trfin : X → P(A∗) such that
a
− → x′ and w ∈ trfin(x′) then aw ∈ trfin(x) Infinite trace semantics: greatest map trinf : X → P(Aω) such that for all x ∈ X, a ∈ A, w ∈ Aω:
a
− → x′ and σ ∈ trinf(x′). Infinite trace semantics is coinductive, but trace equivalence not (I think), so need a trick to prove the theorem
9/16
Infinite traces from finite traces
Define pref : Aω → P(A∗) pref(σ) = {w | w ≺ σ} where ≺ is the prefix relation. (This is finite trace semantics of a canonical LTS on Aω.) Let pref−1 : P(A∗) → P(Aω) be given by pref−1(S) = {σ | w ∈ S for all w with w ≺ σ} . We will prove: Theorem On image-finite LTSs: trinf = pref−1 ◦ trfin .
10/16
Proof
Theorem On image-finite LTSs: trinf = pref−1 ◦ trfin . Start with trinf ⊆ pref−1 ◦ trfin. “If x accepts an infinite trace σ, then also all its finite prefixes” Bit more precisely: prove that ∀n ∈ N, σ ∈ Aω, x ∈ X: σ ∈ trinf(x) → σ|n ∈ trfin(x) by induction on n, where σ|n is the prefix of σ of length n.
11/16
Proof (2)
Theorem On image-finite LTSs: trinf = pref−1 ◦ trfin . Now, we prove trinf ⊇ pref−1 ◦ trfin: the interesting bit. We can use that trinf is defined coinductively! Suffices to prove that for all x ∈ X, a ∈ A, σ ∈ Aω:
a
− → x′ and σ ∈ pref−1 ◦ trfin(x′). To see this:
a
− → x′) there is one s.t. w ∈ trfin(x′) for infinitely many prefixes w of σ
trfin(x′)
12/16
Finite and infinite traces
We established: Theorem On image-finite LTSs: trinf = pref−1 ◦ trfin . hence it easily follows that trfin(x) ⊆ trfin(y) → trinf(x) ⊆ trinf(y) as desired. Once again (like in König’s case) there is a separation of concerns:
paths)
13/16
Alternative: final sequence argument
Infinite trace semantics trinf is defined as the greatest fixed point of a map ϕ: P(Aω)X → P(Aω)X, which one may compute using the (ordinal-indexed) final sequence: ⊤ ≥ ϕ(⊤) ≥ ϕ(ϕ(⊤)) ≥ . . .
for every i < ω
i<ω ϕi(⊤)
Similar classical argument for bisimilarity (on image-finite systems) and its approximants
14/16
Coalgebraic picture
Image-finite LTS is a coalgebra of the form f : X → (Pf X)A Finitely branching LTS is a coalgebra of the form f : X → Pf (A × X)
(Hasuo/Cho/Kataoka/Jacobs, MFPS 2013) that the final sequence
still lacking In our ICALP 2014 paper: original coinductive proof presented a bit more generally; works at least for tree automata.
15/16
Conclusion
equivalence (König’s lemma-type arguments)
actual argument
16/16