Finite and infinite traces, inductively and coinductively Jurriaan - - PowerPoint PPT Presentation

finite and infinite traces inductively and coinductively
SMART_READER_LITE
LIVE PREVIEW

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:


slide-1
SLIDE 1

Finite and infinite traces, inductively and coinductively

Jurriaan Rot WAIT 2018

1/16

slide-2
SLIDE 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

slide-3
SLIDE 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

slide-4
SLIDE 4

Coinduction in a lattice

b: L → L monotone function on complete lattice L: y ≤ x ≤ b(x) y ≤ νb

coinduction

4/16

slide-5
SLIDE 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

slide-6
SLIDE 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

slide-7
SLIDE 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

slide-8
SLIDE 8

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

slide-9
SLIDE 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 trfin : X → P(A∗) such that

  • ε ∈ trfin(x) for all x
  • if x

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ω:

  • if aσ ∈ trinf(x) then ∃x′. x

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

slide-10
SLIDE 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: trinf = pref−1 ◦ trfin .

10/16

slide-11
SLIDE 11

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

slide-12
SLIDE 12

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ω:

  • if aσ ∈ pref−1 ◦ trfin(x) then ∃x′. x

a

− → x′ and σ ∈ pref−1 ◦ trfin(x′). To see this:

  • If aσ ∈ pref−1 ◦ trfin(x), then all finite prefixes of aσ are in trfin(x)
  • Since there are finitely many a-successors (x′ such that x

a

− → x′) there is one s.t. w ∈ trfin(x′) for infinitely many prefixes w of σ

  • Since trfin(x′) is prefix-closed, it follows that all prefixes of σ are in

trfin(x′)

  • Hence σ ∈ pref−1 ◦ trfin(x′).

12/16

slide-13
SLIDE 13

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:

  • coinductive characterisation of infinite trace acceptance (no explicit

paths)

  • coinductive proof of the main point (selection of successors)

13/16

slide-14
SLIDE 14

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: ⊤ ≥ ϕ(⊤) ≥ ϕ(ϕ(⊤)) ≥ . . .

  • States x, y ∈ X are finite trace equivalent if ϕi(⊤)(x) = ϕi(⊤)(y)

for every i < ω

  • If ϕ is cocontinuous then νϕ =

i<ω ϕi(⊤)

Similar classical argument for bisimilarity (on image-finite systems) and its approximants

14/16

slide-15
SLIDE 15

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)

  • Since Pf (A × −) is finitary, it follows from

(Hasuo/Cho/Kataoka/Jacobs, MFPS 2013) that the final sequence

  • f ϕ (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

slide-16
SLIDE 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