regular expressions for polynomial coalgebras · 2020. 5. 8. · cococo 2008 pisa, january 21-23,...

111
Regular Expressions for Polynomial Coalgebras Marcello Bonsangue 1,2 , Jan Rutten 1,3 and Alexandra Silva 1 1 Centrum voor Wiskunde en Informatica 2 LIACS - Leiden University 3 Vrije Universiteit Amsterdam CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 1 / 43

Upload: others

Post on 08-Aug-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Regular Expressions for Polynomial Coalgebras

Marcello Bonsangue1,2, Jan Rutten1,3 and Alexandra Silva1

1Centrum voor Wiskunde en Informatica2LIACS - Leiden University

3Vrije Universiteit Amsterdam

CoCoCo 2008

Pisa, January 21-23, 2008

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 1 / 43

Page 2: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

MotivationRegular expressions for polynomial coalgebras

Regular ExpressionsWell known for classical automataThey provide a concise description of the accepted languageAutomaton ! Regular expressions

a

bb

a

b∗a(a + bb∗a)∗

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 2 / 43

Page 3: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

MotivationRegular expressions for polynomial coalgebras

Polynomial coalgebrasGeneralizations of deterministic automataPolynomial coalgebras: set of states S + t : S → GS

G ::= Id | B | G ×G | G + G | GA

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 3 / 43

Page 4: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

MotivationRegular expressions for polynomial coalgebras

Polynomial coalgebrasGeneralizations of deterministic automataPolynomial coalgebras: set of states S + t : S → GS

G ::= Id | B | G ×G | G + G | GA

G = 2× IdA – Deterministic automataSet of states S + trans. function t : S → 2× SA

a

bb

a

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 3 / 43

Page 5: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

MotivationRegular expressions for polynomial coalgebras

Polynomial coalgebrasGeneralizations of deterministic automataPolynomial coalgebras: set of states S + t : S → GS

G ::= Id | B | G ×G | G + G | GA

G = Id × A× Id – Binary tree automataSet of states S + trans. function t : S → S × A× S

L

LR

R

1 0

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 3 / 43

Page 6: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

MotivationRegular expressions for polynomial coalgebras

Polynomial coalgebrasGeneralizations of deterministic automataPolynomial coalgebras: set of states S + t : S → GS

G ::= Id | B | G ×G | G + G | GA

G = (B × Id)A – Mealy machines

Set of states S + trans. function t : S → (B × S)A

0|1

0|11|0

1|1

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 3 / 43

Page 7: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

The story

Logic for Mealy machines[BRS08] Coalgebraic Logic and Synthesis of Mealy Machines. FoSSaCS 2008

Generalization to polynomial coalgebras[BRS08-2] Regular expressions for polynomial coalgebras. Submitted

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 4 / 43

Page 8: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

The story

Part I

Logic for Mealy machines

Part II

Regular expressions for polynomial coalgebras

intuition

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 4 / 43

Page 9: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Part I

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 5 / 43

Page 10: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Motivation

Design of Sequential systems(Binary) Mealy machines ↔ digital circuitsThere is no formal way of specifying Mealy machinesTypically they are “defined” in a natural language, such as English

Source of ambiguitiesWe need a formal way of specifying Mealy machines

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 6 / 43

Page 11: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Motivation

Design of Sequential systems(Binary) Mealy machines ↔ digital circuitsThere is no formal way of specifying Mealy machinesTypically they are “defined” in a natural language, such as English

Source of ambiguitiesWe need a formal way of specifying Mealy machines

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 6 / 43

Page 12: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Motivation

Design of Sequential systems(Binary) Mealy machines ↔ digital circuitsThere is no formal way of specifying Mealy machinesTypically they are “defined” in a natural language, such as English

Source of ambiguitiesWe need a formal way of specifying Mealy machines

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 6 / 43

Page 13: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Motivation

Design of Sequential systems(Binary) Mealy machines ↔ digital circuitsThere is no formal way of specifying Mealy machinesTypically they are “defined” in a natural language, such as English

Source of ambiguitiesWe need a formal way of specifying Mealy machines

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 6 / 43

Page 14: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

What will we show?

Specification

φ

Mealy Machine

φ

φ2

φ1a1 | b1

a2 | b2

Digital Circuit

AND

AND

OR

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 7 / 43

Page 15: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

What will we show?

Specification

φ

Mealy Machine

φ

φ2

φ1a1 | b1

a2 | b2

Digital Circuit

AND

AND

OR

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 7 / 43

Page 16: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

But first. . .

What do we mean by Binary Mealy Machine?

Mealy machines = Deterministic Mealy machinesMealy machine = set of states S + transition function f

f : S → (B × S)A

f (s)(a) = < b, s′ >

sa|b // s′

A is the input alphabet and B is the output alphabetBinary Mealy machines : A = 2 and >

BBBB

||||

B = B = 1 0

⊥||||

BBBB

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 8 / 43

Page 17: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

But first. . .

What do we mean by Binary Mealy Machine?

Mealy machines = Deterministic Mealy machinesMealy machine = set of states S + transition function f

f : S → (B × S)A

f (s)(a) = < b, s′ >

sa|b // s′

A is the input alphabet and B is the output alphabetBinary Mealy machines : A = 2 and >

BBBB

||||

B = B = 1 0

⊥||||

BBBB

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 8 / 43

Page 18: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Information order

>BBB

B|||

|

B = 1 0

⊥||||

BBBB

> – abstraction (under-specification)⊥ – inconsistency (over-specification)0 and 1 – concrete output values.

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 9 / 43

Page 19: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Mealy automata are coalgebras

Observation:A Mealy machine is a coalgebra of the functor

M : Set → SetM(X ) = (B × X )A

(Almost) for free:Notion of (bi)simulation : equivalence between states,minimizationSemantics in terms of final coalgebra – causal functionsSpecification language for Mealy machines

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 10 / 43

Page 20: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Mealy automata are coalgebras

Observation:A Mealy machine is a coalgebra of the functor

M : Set → SetM(X ) = (B × X )A

(Almost) for free:Notion of (bi)simulation : equivalence between states,minimizationSemantics in terms of final coalgebra – causal functionsSpecification language for Mealy machines

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 10 / 43

Page 21: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

A coalgebraic logic for Mealy machines

Based on the work by Marcello and Alexander Kurz, we derive aspecification language for M(X ) = (B × X )A:

Remark Simple but expressive language: Every finite Mealy machinecorresponds to a finite formula in our language.

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 11 / 43

Page 22: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

A coalgebraic logic for Mealy machines

Based on the work by Marcello and Alexander Kurz, we derive aspecification language for M(X ) = (B × X )A:

φ ::= tt | φ ∧ φ | a(φ) | a ↓ b | x | νx .ψ

ψ guarded

Remark Simple but expressive language: Every finite Mealy machinecorresponds to a finite formula in our language.

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 11 / 43

Page 23: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

A coalgebraic logic for Mealy machines

Based on the work by Marcello and Alexander Kurz, we derive aspecification language for M(X ) = (B × X )A:

φ ::= tt | φ ∧ φ | a(φ) | a ↓ b | x | νx .ψ

ψ guarded

Remark Simple but expressive language: Every finite Mealy machinecorresponds to a finite formula in our language.

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 11 / 43

Page 24: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

A coalgebraic logic for Mealy machines

Based on the work by Marcello and Alexander Kurz, we derive aspecification language for M(X ) = (B × X )A:

φ ::= tt | φ ∧ φ | a(φ) | a ↓ b | x | νx .ψ

ψ guarded

Remark Simple but expressive language: Every finite Mealy machinecorresponds to a finite formula in our language.

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 11 / 43

Page 25: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Simple properties

Output 0 at each input of 1

νx .(

1 ↓ 0

∧ 1(x) ∧ 0(x))

Output 0 at each input of two consecutive 1’s

νx .(1(1 ↓ 0 ∧ 1(x) ∧ 0(x)) ∧ 0(x))

Output 0 at each second input of 1

νx .(0(x) ∧ 1(νy .0(y) ∧ 1 ↓ 0 ∧ 1(x))

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 12 / 43

Page 26: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Simple properties

Output 0 at each input of 1

νx .(

1 ↓ 0

∧ 1(x) ∧ 0(x))

Output 0 at each input of two consecutive 1’s

νx .(1(1 ↓ 0 ∧ 1(x) ∧ 0(x)) ∧ 0(x))

Output 0 at each second input of 1

νx .(0(x) ∧ 1(νy .0(y) ∧ 1 ↓ 0 ∧ 1(x))

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 12 / 43

Page 27: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Simple properties

Output 0 at each input of 1

νx .(1 ↓ 0 ∧ 1(x) ∧ 0(x))

Output 0 at each input of two consecutive 1’s

νx .(1(1 ↓ 0 ∧ 1(x) ∧ 0(x)) ∧ 0(x))

Output 0 at each second input of 1

νx .(0(x) ∧ 1(νy .0(y) ∧ 1 ↓ 0 ∧ 1(x))

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 12 / 43

Page 28: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Simple properties

Output 0 at each input of 1

νx .(1 ↓ 0 ∧ 1(x) ∧ 0(x))

Output 0 at each input of two consecutive 1’s

νx .(1(1 ↓ 0 ∧ 1(x) ∧ 0(x)) ∧ 0(x))

Output 0 at each second input of 1

νx .(0(x) ∧ 1(νy .0(y) ∧ 1 ↓ 0 ∧ 1(x))

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 12 / 43

Page 29: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Simple properties

Output 0 at each input of 1

νx .(1 ↓ 0 ∧ 1(x) ∧ 0(x))

Output 0 at each input of two consecutive 1’s

νx .(1(1 ↓ 0 ∧ 1(x) ∧ 0(x)) ∧ 0(x))

Output 0 at each second input of 1

νx .(0(x) ∧ 1(νy .0(y) ∧ 1 ↓ 0 ∧ 1(x))

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 12 / 43

Page 30: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Simple properties

Output 0 at each input of 1

νx .(1 ↓ 0 ∧ 1(x) ∧ 0(x))

Output 0 at each input of two consecutive 1’s

νx .(1(1 ↓ 0 ∧ 1(x) ∧ 0(x)) ∧ 0(x))

Output 0 at each second input of 1

νx .(0(x) ∧ 1(νy .0(y) ∧ 1 ↓ 0 ∧ 1(x))

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 12 / 43

Page 31: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Simple properties

Output 0 at each input of 1

νx .(1 ↓ 0 ∧ 1(x) ∧ 0(x))

Output 0 at each input of two consecutive 1’s

νx .(1(1 ↓ 0 ∧ 1(x) ∧ 0(x)) ∧ 0(x))

Output 0 at each second input of 1

νx .(0(x) ∧ 1(νy .0(y) ∧ 1 ↓ 0 ∧ 1(x))

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 12 / 43

Page 32: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Formulae are coalgebras

λ : L → (B × L)A

φ ::= tt | φ ∧ φ | a(φ) | a ↓ b | x | νx .ψ

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 13 / 43

Page 33: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Formulae are coalgebras

λ : L → (B × L)A

φ ::= tt | φ ∧ φ | a(φ) | a ↓ b | x | νx .ψ

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 13 / 43

Page 34: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Formulae are coalgebras

λ : L → (B × L)A

φ ::= tt | φ ∧ φ | a(φ) | a ↓ b | x | νx .ψ

λ(tt)(a) =< >, tt >

tt

1 | T, 0 | T

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 13 / 43

Page 35: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Formulae are coalgebras

λ : L → (B × L)A

φ ::= tt | φ ∧ φ | a(φ) | a ↓ b | x | νx .ψ

λ(a′(φ))(a) =

{< >, φ > a = a′

< >, tt > otherwise

a'(φ) φa' | T

ora'(φ) tt

a | T

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 13 / 43

Page 36: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Formulae are coalgebras

λ : L → (B × L)A

φ ::= tt | φ ∧ φ | a(φ) | a ↓ b | x | νx .ψ

λ(a′ ↓ b)(a) =

{< b, tt > a = a′

< >, tt > otherwise

a' b tta' | b

ora' b tt

a | T

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 13 / 43

Page 37: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Formulae are coalgebras

λ : L → (B × L)A

φ ::= tt | φ ∧ φ | a(φ) | a ↓ b | x | νx .ψ

λ(φ1 ∧ φ2)(a) = λ(φ1)(a) u λ(φ2)(a)

φ1 φ'1b1

φ2 φ'2b2

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 13 / 43

Page 38: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Formulae are coalgebras

λ : L → (B × L)A

φ ::= tt | φ ∧ φ | a(φ) | a ↓ b | x | νx .ψ

λ(φ1 ∧ φ2)(a) = λ(φ1)(a) u λ(φ2)(a)

φ1 φ'1b1

φ2 φ'2b2

φ1 ∧ φ2 φ'1 ∧ φ'2b1 ∧B b2

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 13 / 43

Page 39: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Formulae are coalgebras

λ : L → (B × L)A

φ ::= tt | φ ∧ φ | a(φ) | a ↓ b | x | νx .ψ

λ(νx .φ)(a) = λ(φ[νx .φ/x ])(a)

φ[νx.φ/x] φ'a | b

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 13 / 43

Page 40: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Formulae are coalgebras

λ : L → (B × L)A

φ ::= tt | φ ∧ φ | a(φ) | a ↓ b | x | νx .ψ

λ(νx .φ)(a) = λ(φ[νx .φ/x ])(a)

φ[νx.φ/x] φ'a | b

νx.φ φ'a | b

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 13 / 43

Page 41: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Why a coalgebra structure?

Two advantages1 Semantics

L[[ · ]] //

�

Γ

�

(B × L)A // (B × Γ)A

2 Satisfaction relation in terms of simulation

s |= φ⇔ s . φ

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 14 / 43

Page 42: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Why a coalgebra structure?

Two advantages1 Semantics

L[[ · ]] //

�

Γ

�

(B × L)A // (B × Γ)A

2 Satisfaction relation in terms of simulation

s |= φ⇔ s . φ

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 14 / 43

Page 43: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Why a coalgebra structure?

Two advantages1 Semantics

L[[ · ]] //

�

Γ

�

(B × L)A // (B × Γ)A

2 Satisfaction relation in terms of simulation

s |= φ⇔ s . φ

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 14 / 43

Page 44: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Logic is expressive

Theorem1 For all states s, s′ of a Mealy machine (S, f ),

s ∼ s′ iff ∀φ∈L.s |= φ⇔ s′ |= φ.

2 If S is finite then there exists for any s ∈ S a formula φs such thats ∼ φ.

We also want:For every formula φ construct a finite Mealy machine (S, f ) such that∃s∈S s ∼ φ.

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 15 / 43

Page 45: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Logic is expressive

Theorem1 For all states s, s′ of a Mealy machine (S, f ),

s ∼ s′ iff ∀φ∈L.s |= φ⇔ s′ |= φ.

2 If S is finite then there exists for any s ∈ S a formula φs such thats ∼ φ.

We also want:For every formula φ construct a finite Mealy machine (S, f ) such that∃s∈S s ∼ φ.

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 15 / 43

Page 46: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

But. . .

Easy answer: Apply λ repeatedly!

φ

Repeat for new states

φ

φ2

φ1a1 | b1

a2 | b2

λ will not deliver a finite automata.

φ = νx .1(x ∧ (νy .1(y)))

λ(φ)(1) =< >, φ ∧ (νy .1(y)) >λ(φ ∧ (νy .1(y)))(1) =< >, φ ∧ (νy .1(y)) ∧ (νy .1(y)) >...

We need normalization!Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 16 / 43

Page 47: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

But. . .

Easy answer: Apply λ repeatedly!

φ

Repeat for new states

φ

φ2

φ1a1 | b1

a2 | b2

λ will not deliver a finite automata.

φ = νx .1(x ∧ (νy .1(y)))

λ(φ)(1) =< >, φ ∧ (νy .1(y)) >λ(φ ∧ (νy .1(y)))(1) =< >, φ ∧ (νy .1(y)) ∧ (νy .1(y)) >...

We need normalization!Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 16 / 43

Page 48: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Normalization

norm(tt) = ttnorm(a(φ)) = a(norm(φ))norm(a ↓ b) = a ↓ bnorm(φ1 ∧ φ2) = conj(rem(flatten(norm(φ1) ∧ norm(φ2))))norm(νx .φ) = νx .norm(φ)

norm(a(tt) ∧ a ↓ b ∧ tt ∧ a ↓ b) = norm(a(tt) ∧ a ↓ b)

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 17 / 43

Page 49: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Normalization

norm(tt) = ttnorm(a(φ)) = a(norm(φ))norm(a ↓ b) = a ↓ bnorm(φ1 ∧ φ2) = conj(rem(flatten(norm(φ1) ∧ norm(φ2))))norm(νx .φ) = νx .norm(φ)

norm(a(tt) ∧ a ↓ b ∧ tt ∧ a ↓ b) = norm(a(tt) ∧ a ↓ b)

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 17 / 43

Page 50: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Synthesis

Specification

φ

Mealy Machine

φ

φ2

φ1a1 | b1

a2 | b2

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 18 / 43

Page 51: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Synthesis

φ One step synthesis

Repeat for new states

φ

φ2

φ1a1 | b1

a2 | b2

λ with normalization

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 18 / 43

Page 52: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

One-step synthesis

δ : L → (B × L)A

δ(tt) = < >, tt >

δ(a′(φ))(a) =

{< >,norm(φ) > a = a′

< >, tt > otherwise

δ(a′ ↓ b)(a) =

{< b, tt > a = a′

< >, tt > otherwiseδ(φ1 ∧ φ2)(a) = δ(φ1)(a) u δ(φ2)(a)δ(νx .φ)(a) = < b,norm(φ′) >

where < b, φ′ >= δ(φ[νx .φ/x ])(a)

< b1, φ1 > u < b2, φ2 > = < b1 ∧B b2,norm(φ1 ∧ φ2) >

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 19 / 43

Page 53: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Examples

φ = 1 ↓ 0 ∧ (νx .1(x))

δ(φ)(0) = < >, tt >δ(φ)(1) = δ(1 ↓ 0)(1) u δ(νx .1(x))(1)

= < 0, tt > u < >B, νx .1(x) >= < 0, νx .1(x) >

Remark: Not minimal.

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 20 / 43

Page 54: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Examples

φ = 1 ↓ 0 ∧ (νx .1(x))

δ(φ)(0) = < >, tt >δ(φ)(1) = δ(1 ↓ 0)(1) u δ(νx .1(x))(1)

= < 0, tt > u < >B, νx .1(x) >= < 0, νx .1(x) >

Remark: Not minimal.

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 20 / 43

Page 55: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Examples

φ = 1 ↓ 0 ∧ (νx .1(x))

δ(φ)(0) = < >, tt >δ(φ)(1) = δ(1 ↓ 0)(1) u δ(νx .1(x))(1)

= < 0, tt > u < >B, νx .1(x) >= < 0, νx .1(x) >

φ νx.1(x)

tt

1 | 0

0 | T

Remark: Not minimal.

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 20 / 43

Page 56: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Examples

φ = 1 ↓ 0 ∧ (νx .1(x))

δ(φ)(0) = < >, tt >δ(φ)(1) = δ(1 ↓ 0)(1) u δ(νx .1(x))(1)

= < 0, tt > u < >B, νx .1(x) >= < 0, νx .1(x) >

φ νx.1(x)

tt

1 | 0

0 | T

1 | T

0 | T

1 | T, 0 | T

Remark: Not minimal.

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 20 / 43

Page 57: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Examples

φ = 1 ↓ 0 ∧ (νx .1(x))

δ(φ)(0) = < >, tt >δ(φ)(1) = δ(1 ↓ 0)(1) u δ(νx .1(x))(1)

= < 0, tt > u < >B, νx .1(x) >= < 0, νx .1(x) >

φ νx.1(x)

tt

1 | 0

0 | T

1 | T

0 | T

1 | T, 0 | T

Remark: Not minimal.Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 20 / 43

Page 58: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Examples

φ2 = νx .(1(1 ↓ 0) ∧ 1(x))

δ(φ2)(0) = < >, tt >δ(φ2)(1) = δ(1(1 ↓ 0))(1) u δ(νx .1(x))(1)

= < >,1 ↓ 0 > u < >, νx .1(x) >= < >,1 ↓ 0 ∧ (νx .1(x)) >

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 21 / 43

Page 59: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Examples

φ2 = νx .(1(1 ↓ 0) ∧ 1(x))

δ(φ2)(0) = < >, tt >δ(φ2)(1) = δ(1(1 ↓ 0))(1) u δ(νx .1(x))(1)

= < >,1 ↓ 0 > u < >, νx .1(x) >= < >,1 ↓ 0 ∧ (νx .1(x)) >

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 21 / 43

Page 60: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Examples

φ2 = νx .(1(1 ↓ 0) ∧ 1(x))

δ(φ2)(0) = < >, tt >δ(φ2)(1) = δ(1(1 ↓ 0))(1) u δ(νx .1(x))(1)

= < >,1 ↓ 0 > u < >, νx .1(x) >= < >,1 ↓ 0 ∧ (νx .1(x)) >

φ 1 0 ∧ νx.1(x)

tt

1 | T

0 | T

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 21 / 43

Page 61: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Examples

φ2 = νx .(1(1 ↓ 0) ∧ 1(x))

δ(φ2)(0) = < >, tt >δ(φ2)(1) = δ(1(1 ↓ 0))(1) u δ(νx .1(x))(1)

= < >,1 ↓ 0 > u < >, νx .1(x) >= < >,1 ↓ 0 ∧ (νx .1(x)) >

φ 1 0 ∧ νx.1(x)

tt

1 | T

0 | T

1 | T

0 | T

1 | T, 0 | T

νx.1(x)0 | T

1 | 0

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 21 / 43

Page 62: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Examples

φ3 = νx .1(x ∧ (νy .1(y) ∧ 1 ↓ 0))

δ(φ3)(0) = < >, tt >δ(φ3)(1) = < >, φ3 ∧ (νy .1(y) ∧ 1 ↓ 0) >

1 | T φ3∧ (νy.1(y) ∧ 1 0)φ3

tt

0 | T

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 22 / 43

Page 63: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Examples

φ3 = νx .1(x ∧ (νy .1(y) ∧ 1 ↓ 0))

δ(φ3)(0) = < >, tt >δ(φ3)(1) = < >, φ3 ∧ (νy .1(y) ∧ 1 ↓ 0) >

1 | T φ3∧ (νy.1(y) ∧ 1 0)φ3

tt

0 | T

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 22 / 43

Page 64: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Examples

φ3 = νx .1(x ∧ (νy .1(y) ∧ 1 ↓ 0))

δ(φ3)(0) = < >, tt >δ(φ3)(1) = < >, φ3 ∧ (νy .1(y) ∧ 1 ↓ 0) >

1 | T φ3∧ (νy.1(y) ∧ 1 0)φ3

tt

0 | T

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 22 / 43

Page 65: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Examples (cont.)

δ(φ3 ∧ (νy .1(y) ∧ 1 ↓ 0))(1)

= δ(φ3)(1) u δ(νy .1(y) ∧ 1 ↓ 0)(1)= < >, φ ∧ (νy .1(y) ∧ 1 ↓ 0) > u < 0, νy .1(y) ∧ 1 ↓ 0 >= < 0,norm(φ3 ∧ (νy .1(y) ∧ 1 ↓ 0) ∧ (νy .1(y) ∧ 1 ↓ 0)) >= < 0, φ3 ∧ (νy .1(y) ∧ 1 ↓ 0) >

1 | T φ3∧ (νy.1(y) ∧ 1 0)φ3

tt

0 | T

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 23 / 43

Page 66: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Examples (cont.)

δ(φ3 ∧ (νy .1(y) ∧ 1 ↓ 0))(1)= δ(φ3)(1) u δ(νy .1(y) ∧ 1 ↓ 0)(1)

= < >, φ ∧ (νy .1(y) ∧ 1 ↓ 0) > u < 0, νy .1(y) ∧ 1 ↓ 0 >= < 0,norm(φ3 ∧ (νy .1(y) ∧ 1 ↓ 0) ∧ (νy .1(y) ∧ 1 ↓ 0)) >= < 0, φ3 ∧ (νy .1(y) ∧ 1 ↓ 0) >

1 | T φ3∧ (νy.1(y) ∧ 1 0)φ3

tt

0 | T

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 23 / 43

Page 67: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Examples (cont.)

δ(φ3 ∧ (νy .1(y) ∧ 1 ↓ 0))(1)= δ(φ3)(1) u δ(νy .1(y) ∧ 1 ↓ 0)(1)= < >, φ ∧ (νy .1(y) ∧ 1 ↓ 0) > u < 0, νy .1(y) ∧ 1 ↓ 0 >

= < 0,norm(φ3 ∧ (νy .1(y) ∧ 1 ↓ 0) ∧ (νy .1(y) ∧ 1 ↓ 0)) >= < 0, φ3 ∧ (νy .1(y) ∧ 1 ↓ 0) >

1 | T φ3∧ (νy.1(y) ∧ 1 0)φ3

tt

0 | T

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 23 / 43

Page 68: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Examples (cont.)

δ(φ3 ∧ (νy .1(y) ∧ 1 ↓ 0))(1)= δ(φ3)(1) u δ(νy .1(y) ∧ 1 ↓ 0)(1)= < >, φ ∧ (νy .1(y) ∧ 1 ↓ 0) > u < 0, νy .1(y) ∧ 1 ↓ 0 >= < 0,norm(φ3 ∧ (νy .1(y) ∧ 1 ↓ 0) ∧ (νy .1(y) ∧ 1 ↓ 0)) >

= < 0, φ3 ∧ (νy .1(y) ∧ 1 ↓ 0) >

1 | T φ3∧ (νy.1(y) ∧ 1 0)φ3

tt

0 | T

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 23 / 43

Page 69: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Examples (cont.)

δ(φ3 ∧ (νy .1(y) ∧ 1 ↓ 0))(1)= δ(φ3)(1) u δ(νy .1(y) ∧ 1 ↓ 0)(1)= < >, φ ∧ (νy .1(y) ∧ 1 ↓ 0) > u < 0, νy .1(y) ∧ 1 ↓ 0 >= < 0,norm(φ3 ∧ (νy .1(y) ∧ 1 ↓ 0) ∧ (νy .1(y) ∧ 1 ↓ 0)) >= < 0, φ3 ∧ (νy .1(y) ∧ 1 ↓ 0) >

1 | T φ3∧ (νy.1(y) ∧ 1 0)φ3

tt

0 | T

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 23 / 43

Page 70: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Examples (cont.)

δ(φ3 ∧ (νy .1(y) ∧ 1 ↓ 0))(1)= δ(φ3)(1) u δ(νy .1(y) ∧ 1 ↓ 0)(1)= < >, φ ∧ (νy .1(y) ∧ 1 ↓ 0) > u < 0, νy .1(y) ∧ 1 ↓ 0 >= < 0,norm(φ3 ∧ (νy .1(y) ∧ 1 ↓ 0) ∧ (νy .1(y) ∧ 1 ↓ 0)) >= < 0, φ3 ∧ (νy .1(y) ∧ 1 ↓ 0) >

1 | T

1 | 0

φ3∧ (νy.1(y) ∧ 1 0)φ3

tt

0 | T0 | T

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 23 / 43

Page 71: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Examples (cont.)

δ(φ3 ∧ (νy .1(y) ∧ 1 ↓ 0))(1)= δ(φ3)(1) u δ(νy .1(y) ∧ 1 ↓ 0)(1)= < >, φ ∧ (νy .1(y) ∧ 1 ↓ 0) > u < 0, νy .1(y) ∧ 1 ↓ 0 >= < 0,norm(φ3 ∧ (νy .1(y) ∧ 1 ↓ 0) ∧ (νy .1(y) ∧ 1 ↓ 0)) >= < 0, φ3 ∧ (νy .1(y) ∧ 1 ↓ 0) >

1 | T

0 | T

φ3∧ (νy.1(y) ∧ 1 0) ∧ (νy.1(y) ∧ 1 0)φ3∧ (νy.1(y) ∧ 1 0)φ3

tt

0 | T0 | T

1 | 0 ...

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 23 / 43

Page 72: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Conclusions (Part I)

Coalgebraic approach : bisimulation and logicsNew logic for Mealy machinesSynthesis algorithm that produces a finite machine

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 24 / 43

Page 73: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

End of Part I

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 25 / 43

Page 74: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Part II

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 26 / 43

Page 75: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Generalizing

Specification Language + Synthesis for systems of type

S → (B × S)A

G ::= Id | B | G ×G | G + G | GA

B semilattice

Notation: We will write F C G whenever F is an ingredient of G.

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 27 / 43

Page 76: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Generalizing

Specification Language + Synthesis for systems of type

S → GS

G ::= Id | B | G ×G | G + G | GA

B semilattice

Notation: We will write F C G whenever F is an ingredient of G.

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 27 / 43

Page 77: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Generalizing

Specification Language + Synthesis for systems of type

S → GS

G ::= Id | B | G ×G | G + G | GA

B semilattice

Notation: We will write F C G whenever F is an ingredient of G.

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 27 / 43

Page 78: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Generalizing

Specification Language + Synthesis for systems of type

S → GS

G ::= Id | B | G ×G | G + G | GA

B semilattice

Notation: We will write F C G whenever F is an ingredient of G.

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 27 / 43

Page 79: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Consequences

Everything will be parameterized in GSpecification Language

Untyped expressions

G-typed expressions

Type system parametrized with G

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 28 / 43

Page 80: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Untyped expressions

ε ::= ∅ | x | ε⊕ ε | µx .γ | b | l(ε) | r(ε) | l[ε] | r [ε] | a(ε)

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 29 / 43

Page 81: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Untyped expressions

ε ::= ∅ | x | ε⊕ ε | µx .γ | b | l(ε) | r(ε) | l[ε] | r [ε] | a(ε)

B

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 29 / 43

Page 82: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Untyped expressions

ε ::= ∅ | x | ε⊕ ε | µx .γ | b | l(ε) | r(ε) | l[ε] | r [ε] | a(ε)

GxG

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 29 / 43

Page 83: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Untyped expressions

ε ::= ∅ | x | ε⊕ ε | µx .γ | b | l(ε) | r(ε) | l[ε] | r [ε] | a(ε)

G+G

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 29 / 43

Page 84: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Untyped expressions

ε ::= ∅ | x | ε⊕ ε | µx .γ | b | l(ε) | r(ε) | l[ε] | r [ε] | a(ε)

GA

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 29 / 43

Page 85: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Type System

F 6= F1 + F2

` ∅ : F C G

` ε1 : F C G ` ε2 : F C G

` ε1 ⊕ ε2 : F C G ` x : F C G

` ε : F C G

` µx .ε : F C G

` b : B C G

` ε : G C G

` ε : Id C G

` ε : F1 C G

` l(ε) : F1 × F2 C G

` ε : F2 C G

` r(ε) : F1 × F2 C G

` ε : F1 C G

` l[ε] : F1 + F2 C G

` ε : F2 C G

` r [ε] : F1 + F2 C G

` ε : F C G

` a(ε) : F A C G

ExpFCG = {ε ∈ Exp | ` ε : F C G} .

ExpG = ExpGCG.

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 30 / 43

Page 86: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Type System

F 6= F1 + F2

` ∅ : F C G

` ε1 : F C G ` ε2 : F C G

` ε1 ⊕ ε2 : F C G ` x : F C G

` ε : F C G

` µx .ε : F C G

` b : B C G

` ε : G C G

` ε : Id C G

` ε : F1 C G

` l(ε) : F1 × F2 C G

` ε : F2 C G

` r(ε) : F1 × F2 C G

` ε : F1 C G

` l[ε] : F1 + F2 C G

` ε : F2 C G

` r [ε] : F1 + F2 C G

` ε : F C G

` a(ε) : F A C G

ExpFCG = {ε ∈ Exp | ` ε : F C G} .

ExpG = ExpGCG.

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 30 / 43

Page 87: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

ExpG has a coalgebra structure

Goal: λG : ExpG → G(ExpG)

λFCG : ExpFCG → F (ExpG)

λFCG(∅) =?

λFCG(∅) : F (ExpG)

λFCG(∅) = EmptyFCG : F (ExpG)

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 31 / 43

Page 88: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

ExpG has a coalgebra structure

Goal: λG : ExpG → G(ExpG)

λFCG : ExpFCG → F (ExpG)

λFCG(∅) =?

λFCG(∅) : F (ExpG)

λFCG(∅) = EmptyFCG : F (ExpG)

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 31 / 43

Page 89: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

ExpG has a coalgebra structure

Goal: λG : ExpG → G(ExpG)

λFCG : ExpFCG → F (ExpG)

λFCG(∅) =?

λFCG(∅) : F (ExpG)

λFCG(∅) = EmptyFCG : F (ExpG)

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 31 / 43

Page 90: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

ExpG has a coalgebra structure

Goal: λG : ExpG → G(ExpG)

λFCG : ExpFCG → F (ExpG)

λFCG(∅) =?

λFCG(∅) : F (ExpG)

λFCG(∅) = EmptyFCG : F (ExpG)

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 31 / 43

Page 91: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

ExpG has a coalgebra structure

Goal: λG : ExpG → G(ExpG)

λFCG : ExpFCG → F (ExpG)

λFCG(∅) =?

λFCG(∅) : F (ExpG)

λFCG(∅) = EmptyFCG : F (ExpG)

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 31 / 43

Page 92: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

EmptyFCG : F (ExpG)

EmptyIdCG : ExpGEmptyIdCG = ∅

But recall:F 6= F1 + F2

` ∅ : F C G

So:

EmptyIdCG : 1 + ExpG

EmptyIdCG =

{∅ G 6= G1 + G2? otherwise

Thus :EmptyFCG : F?(ExpG), F? = 1 + F

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 32 / 43

Page 93: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

EmptyFCG : F (ExpG)

EmptyIdCG : ExpGEmptyIdCG = ∅

But recall:F 6= F1 + F2

` ∅ : F C G

So:

EmptyIdCG : 1 + ExpG

EmptyIdCG =

{∅ G 6= G1 + G2? otherwise

Thus :EmptyFCG : F?(ExpG), F? = 1 + F

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 32 / 43

Page 94: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

EmptyFCG : F (ExpG)

EmptyIdCG : ExpGEmptyIdCG = ∅

But recall:F 6= F1 + F2

` ∅ : F C G

So:

EmptyIdCG : 1 + ExpG

EmptyIdCG =

{∅ G 6= G1 + G2? otherwise

Thus :EmptyFCG : F?(ExpG), F? = 1 + F

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 32 / 43

Page 95: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

EmptyFCG : F (ExpG)

EmptyIdCG : ExpGEmptyIdCG = ∅

But recall:F 6= F1 + F2

` ∅ : F C G

So:

EmptyIdCG : 1 + ExpG

EmptyIdCG =

{∅ G 6= G1 + G2? otherwise

Thus :EmptyFCG : F?(ExpG), F? = 1 + F

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 32 / 43

Page 96: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

EmptyFCG : F?(ExpG)

EmptyIdCG =

{∅ G 6= G1 + G2? otherwise

EmptyBCG = ⊥BEmptyF1×F2CG =< EmptyF1CG,EmptyF2CG >EmptyF1+F2CG = ?EmptyF ACG = λa.EmptyFCG

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 33 / 43

Page 97: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

λFCG : ExpFCG → F?(ExpG)

λFCG(∅) = EmptyFCGλF1×F2CG(l(ε)) =< λF1CG(ε),EmptyF2CG >λF1×F2CG(r(ε)) =< EmptyF1CG, λF2CG(ε) >λF1+F2CG(l[ε]) = κ1(λF1CG(ε))λF1+F2CG(r [ε]) = κ2(λF2CG(ε))...

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 34 / 43

Page 98: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Regular expressions

RFCG = {ε ∈ ExpFCG | λFCG(ε) 6= ?}

Real coalgebra structure

λFCG : RFCG → F (RFCG)

Advantage: We can define a notion of satisfaction

s 6|=G ε⇔ ε . s

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 35 / 43

Page 99: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Regular expressions

RFCG = {ε ∈ ExpFCG | λFCG(ε) 6= ?}

Real coalgebra structure

λFCG : RFCG → F (RFCG)

Advantage: We can define a notion of satisfaction

s 6|=G ε⇔ ε . s

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 35 / 43

Page 100: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Regular expressions

RFCG = {ε ∈ ExpFCG | λFCG(ε) 6= ?}

Real coalgebra structure

λFCG : RFCG → F (RFCG)

Advantage: We can define a notion of satisfaction

s 6|=G ε⇔ ε . s

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 35 / 43

Page 101: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Language expressive w.r.t bisimulation

Theorem

Let G be a polynomial functor G and (S,g) a G-coalgebra.1 For all states s, s′ ∈ S, s ∼ s′ if and only if∀ε ∈ RG . s |= ε⇔ s′ |= ε.

2 If S is finite then there exists for any s ∈ S an expression εs ∈ RGsuch that εs ∼ s.

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 36 / 43

Page 102: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Proof system

(Idempotency) ε⊕ ε = ε(Commutativity) ε1 ⊕ ε2 = ε2 ⊕ ε1(Associativity) ε1 ⊕ (ε2 ⊕ ε3) = (ε1 ⊕ ε2)⊕ ε3(Empty) ∅ ⊕ ε = ε

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 37 / 43

Page 103: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Proof system (cont.)

(B − ∅) ∅ = ⊥B (B −⊕) b1 ⊕ b2 = b1 ∨B b2

(×− ∅ − L) l(∅) = ∅ (×−⊕− L) l(ε1 ⊕ ε2) = l(ε1)⊕ l(ε2)(×− ∅ − R) r(∅) = ∅ (×−⊕− R) r(ε1 ⊕ ε2) = r(ε1)⊕ r(ε2)

l[∅] = ∅ r[∅] = ∅

(+−⊕− R) r [ε1 ⊕ ε2] = r [ε1]⊕ r [ε2](+−⊕− L) l[ε1 ⊕ ε2] = l[ε1]⊕ l[ε2]

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 38 / 43

Page 104: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Proof system (cont.)

(B − ∅) ∅ = ⊥B (B −⊕) b1 ⊕ b2 = b1 ∨B b2

(×− ∅ − L) l(∅) = ∅ (×−⊕− L) l(ε1 ⊕ ε2) = l(ε1)⊕ l(ε2)(×− ∅ − R) r(∅) = ∅ (×−⊕− R) r(ε1 ⊕ ε2) = r(ε1)⊕ r(ε2)

l[∅] = ∅ r[∅] = ∅

(+−⊕− R) r [ε1 ⊕ ε2] = r [ε1]⊕ r [ε2](+−⊕− L) l[ε1 ⊕ ε2] = l[ε1]⊕ l[ε2]

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 38 / 43

Page 105: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Soundness

Theorem (Soundness)The above equational system is sound, that is, for every polynomialfunctor G, if `G ε1 = ε2 then ε1 ∼G ε2.

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 39 / 43

Page 106: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Completeness (modal fragment)

Theorem (Completeness)For every polynomial functor G and modal regular expressionsε1, ε2 ∈ RG, for all G-coalgebra (S, f ), if ε1 ∼G ε2 then ` ε1 = ε2.

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 40 / 43

Page 107: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Synthesis

Normalization easily generalizesSynthesis is as before : λ+ normalization

Theorem (Kleene)1 If S is finite then there exists for any s ∈ S an expression εs ∈ RG

such that εs ∼ s.2 For all ε ∈ RG, there exists a finite G-coalgebra (S,g) such that∃s∈S s ∼ ε.

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 41 / 43

Page 108: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Synthesis

Normalization easily generalizesSynthesis is as before : λ+ normalization

Theorem (Kleene)1 If S is finite then there exists for any s ∈ S an expression εs ∈ RG

such that εs ∼ s.2 For all ε ∈ RG, there exists a finite G-coalgebra (S,g) such that∃s∈S s ∼ ε.

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 41 / 43

Page 109: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Conclusions and Future work

ConclusionsLanguage of regular expressions for polynomial coalgebrasEquational system sound and complete (for the modal fragment)Generalization of Kleene theorem

Future workMove from Set to pSet : better definiton of regularityEnlarge the class of functors treated: add PCompleteness of the full logicModel checking

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 42 / 43

Page 110: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

Conclusions and Future work

ConclusionsLanguage of regular expressions for polynomial coalgebrasEquational system sound and complete (for the modal fragment)Generalization of Kleene theorem

Future workMove from Set to pSet : better definiton of regularityEnlarge the class of functors treated: add PCompleteness of the full logicModel checking

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 42 / 43

Page 111: Regular Expressions for Polynomial Coalgebras · 2020. 5. 8. · CoCoCo 2008 Pisa, January 21-23, 2008 Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg

End of Part II

Alexandra and Marcello (CWI and LIACS) Regular Expressions for Polynomial Coalg. CoCoCo 2008 43 / 43