finite and infinite traces inductively and coinductively
play

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:


  1. Finite and infinite traces, inductively and coinductively Jurriaan Rot WAIT 2018 1/16

  2. Overview Classic fact: if an LTS is image-finite, then finite trace equivalence • coincides with infinite trace equivalence ‘Standard’ proof: inductively construct infinite paths • This talk: coinductive proof – basic exercise in coinduction • Idea from (Bonsangue/Rot/Ancona/de Boer/Rutten, ICALP 2014), • where it is a little bit hidden Related to König’s lemma, which was done coinductively in Isabelle • (Lochbihler and/or Hölzl and/or . . . ?) 2/16

  3. Warming up: König’s tree lemma Lemma Suppose t is a finitely branching tree whose root has infinitely many successors. Then t has an infinite path. 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

  4. Coinduction in a lattice b : L → L monotone function on complete lattice L : y ≤ x ≤ b ( x ) coinduction y ≤ ν b 4/16

  5. 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

  6. 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: characterisation ν p (“inductive” construction of infinite paths) • essence of the proof (selection of successor) is coinductive • 6/16

  7. 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

  8. � � � � � Statement Denote by tr fin ( x ) ⊆ A ∗ the set of traces starting in x , and tr inf ( x ) ⊆ A ω the set of infinite traces. Theorem Suppose our LTS is image-finite. Then for any x ∈ X : if tr fin ( x ) ⊆ tr fin ( y ) , then tr inf ( x ) ⊆ tr inf ( y ) “Standard” proof: explicitly construct traces by induction Image-finiteness needed: · · � ... · · · · · � · 8/16

  9. 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 tr fin : X → P ( A ∗ ) such that ε ∈ tr fin ( x ) for all x • → x ′ and w ∈ tr fin ( x ′ ) then aw ∈ tr fin ( x ) a if x − • Infinite trace semantics: greatest map tr inf : X → P ( A ω ) such that for all x ∈ X , a ∈ A , w ∈ A ω : → x ′ and σ ∈ tr inf ( x ′ ) . a if a σ ∈ tr inf ( x ) then ∃ x ′ . x − • Infinite trace semantics is coinductive, but trace equivalence not (I think), so need a trick to prove the theorem 9/16

  10. 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: tr inf = pref − 1 ◦ tr fin . 10/16

  11. Proof Theorem On image-finite LTSs: tr inf = pref − 1 ◦ tr fin . Start with tr inf ⊆ pref − 1 ◦ tr fin . “If x accepts an infinite trace σ , then also all its finite prefixes” Bit more precisely: prove that ∀ n ∈ N , σ ∈ A ω , x ∈ X : σ ∈ tr inf ( x ) → σ | n ∈ tr fin ( x ) by induction on n , where σ | n is the prefix of σ of length n . 11/16

  12. Proof (2) Theorem On image-finite LTSs: tr inf = pref − 1 ◦ tr fin . Now, we prove tr inf ⊇ pref − 1 ◦ tr fin : the interesting bit. We can use that tr inf is defined coinductively! Suffices to prove that for all x ∈ X , a ∈ A , σ ∈ A ω : if a σ ∈ pref − 1 ◦ tr fin ( x ) then ∃ x ′ . x → x ′ and σ ∈ pref − 1 ◦ tr fin ( x ′ ) . a − • To see this: If a σ ∈ pref − 1 ◦ tr fin ( x ) , then all finite prefixes of a σ are in tr fin ( x ) • Since there are finitely many a -successors ( x ′ such that x a − → x ′ ) • there is one s.t. w ∈ tr fin ( x ′ ) for infinitely many prefixes w of σ Since tr fin ( x ′ ) is prefix-closed, it follows that all prefixes of σ are in • tr fin ( x ′ ) Hence σ ∈ pref − 1 ◦ tr fin ( x ′ ) . • 12/16

  13. Finite and infinite traces We established: Theorem On image-finite LTSs: tr inf = pref − 1 ◦ tr fin . hence it easily follows that tr fin ( x ) ⊆ tr fin ( y ) → tr inf ( x ) ⊆ tr inf ( y ) as desired. Once again (like in König’s case) there is a separation of concerns: coinductive characterisation of infinite trace acceptance (no explicit • paths) coinductive proof of the main point (selection of successors) • 13/16

  14. Alternative: final sequence argument Infinite trace semantics tr inf 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: ⊤ ≥ ϕ ( ⊤ ) ≥ ϕ ( ϕ ( ⊤ )) ≥ . . . States x , y ∈ X are finite trace equivalent if ϕ i ( ⊤ )( x ) = ϕ i ( ⊤ )( y ) • for every i < ω i <ω ϕ i ( ⊤ ) If ϕ is cocontinuous then νϕ = � • Similar classical argument for bisimilarity (on image-finite systems) and its approximants 14/16

  15. Coalgebraic picture Image-finite LTS is a coalgebra of the form f : X → ( P f X ) A Finitely branching LTS is a coalgebra of the form f : X → P f ( A × X ) Since P f ( A × − ) is finitary, it follows from • (Hasuo/Cho/Kataoka/Jacobs, MFPS 2013) that the final sequence of ϕ (computing the infinite traces) stabilises at ω . For image-finite LTS, this doesn’t seem to work (?) • Systematic coalgebraic picture of finite vs. infinite trace semantics • still lacking In our ICALP 2014 paper: original coinductive proof presented a bit more generally; works at least for tree automata. 15/16

  16. Conclusion Coinductive proof that finite trace equivalence implies infinite trace • equivalence (König’s lemma-type arguments) Separates coinductive characterisation (and its ‘correctness’) from • actual argument 16/16

Recommend


More recommend