Interpretations as coalgebra morphisms Manuel A. Martins 1 Alexandre - - PowerPoint PPT Presentation

interpretations as coalgebra morphisms
SMART_READER_LITE
LIVE PREVIEW

Interpretations as coalgebra morphisms Manuel A. Martins 1 Alexandre - - PowerPoint PPT Presentation

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions Interpretations as coalgebra morphisms Manuel A. Martins 1 Alexandre Madeira 2 Luis S. Barbosa 3 CMCS 2010 Paphos, Cyprus, March 2010 1Mathematics


slide-1
SLIDE 1

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions

Interpretations as coalgebra morphisms

Manuel A. Martins 1 Alexandre Madeira2 Luis S. Barbosa3 CMCS 2010 Paphos, Cyprus, March 2010

1Mathematics Department, Aveiro University, Portugal 2CCTC, Minho University & Mathematics Dep. of Aveiro University & Critical Software S.A., Portugal

  • 3Dep. Informatics & CCTC, Minho University, Portugal

Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa Interpretations as coalgebra morphisms

slide-2
SLIDE 2

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions

Outline

1 Starting point

Logics as coalgebras Objectives

2 Strict refinement revisited 3 Category of Logics and interpretations

Logical interpretation The logics induced by the Frege relation Interpretations as coalgebras morphisms

4 Conclusions

Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa Interpretations as coalgebra morphisms

slide-3
SLIDE 3

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions Logics as coalgebras Objectives

Outline

1 Starting point

Logics as coalgebras Objectives

2 Strict refinement revisited 3 Category of Logics and interpretations

Logical interpretation The logics induced by the Frege relation Interpretations as coalgebras morphisms

4 Conclusions

Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa Interpretations as coalgebra morphisms

slide-4
SLIDE 4

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions Logics as coalgebras Objectives

Abstract definitions of logic

Abstract Logic as a consequence relation

A = A, ⊢A, where ⊢A: P(A) × A is a consequence relation in A.

Abstract Logic as a closure operator

A = A, CA, where CA is a closure operator, i.e., a mapping CA : P(A) → P(A) such for that for all X, Y ⊆ A,

1

X ⊆ CA(X);

2

X ⊆ Y ⇒ CA(X) ⊆ CA(Y );

3

CA(CA(X)) = CA(X).

Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa Interpretations as coalgebra morphisms

slide-5
SLIDE 5

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions Logics as coalgebras Objectives

Abstract definitions of logic

Abstract Logic as a closure system

A = A, TA where TA is a closure system on A, i.e., a family F of subsets of A closed under arbitrary intersections (here we consider ∅ = A).

Theorem

Let A be a set. For each closure operator CA in A we can associate a closure system TA and, conversely, for each closure system TA a closure

  • perator CA in such way that they are mutually inverses of one another:

CA → TA := {X ⊆ A|CA(X) = X} TA → CA(X) := {T ∈ TA|X ⊆ T}

Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa Interpretations as coalgebra morphisms

slide-6
SLIDE 6

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions Logics as coalgebras Objectives

Logics as coalgebras

Palmigiano shows in [Pal02]

that an abstract logic can be represented by a coalgebra these coalgebras maps a formula into the set of its theories; the morphisms on that category correspond exactly to the usual morphisms between logics. the class of coalgebras that corresponds to abstract logics of empty signature defines a covariety.

Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa Interpretations as coalgebra morphisms

slide-7
SLIDE 7

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions Logics as coalgebras Objectives

Logics as coalgebras

closure system (contravariant) functor: is the functor that maps a set in the set

  • f the closure systems over it and, each function f : A → B, in the map

C(f ) : C(B) → C(A) F → {f −1[T] : T ∈ F}.

Let A = A, TA.

A

ξ

  • a
  • C(A)

ξ(a) = {T ∈ TA|a ∈ T} Coalg(C): A

ξ

  • f

B

η

  • C(A)

C(B)

C(f )

  • Fact [Pal02]

f is a logical morphism between two abstract logics iff it is a morphism between its underlying coalgebras.

Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa Interpretations as coalgebra morphisms

slide-8
SLIDE 8

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions Logics as coalgebras Objectives

Objectives

Logical interpretation on software development

We introduced in [MMB09a, MMB09b, MMB10] a formalization of refinement on algebraic specifications based on logical interpretations; The formalization is suitable to deal with data encapsulation, decomposition of operations in atomic transactions, and on the reuse

  • f specifications;

Aims

The work aims to frame logical interpretation on the “logics as coalgebras” perspective; formalize refinement via interpretation on this setting;

Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa Interpretations as coalgebra morphisms

slide-9
SLIDE 9

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions Logics as coalgebras Objectives

Refinement by interpretation [MMB09a, MMB09b]

Interpretation

τ : Fm(Σ) → P(Fm(Σ′)) interprets SP if there is a specification SP′ under Σ′ such that: ∀ϕ ∈ Fm(Sig(SP)), SP | = ϕ iff SP′ | = τ(ϕ)

SP′ is a refinement by the interpretation τ of SP if

τ interprets SP ∀ϕ ∈ Fm(Sig(SP)), SP | = ϕ implies SP′ | = τ(ϕ)

Theorem (Characterization)

SP ⇁τ SP′ if there is an interpretation SP0 of SP such that SP0 SP′.

Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa Interpretations as coalgebra morphisms

slide-10
SLIDE 10

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions

Outline

1 Starting point

Logics as coalgebras Objectives

2 Strict refinement revisited 3 Category of Logics and interpretations

Logical interpretation The logics induced by the Frege relation Interpretations as coalgebras morphisms

4 Conclusions

Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa Interpretations as coalgebra morphisms

slide-11
SLIDE 11

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions

Strict refinement revisited

Definition

Let A = A, CA and A′ = A, CA′ be two abstract logics. A A′, if for any X ∪ {x} ∈ A, x ∈ CA(X) ⇒ x ∈ CA′(X).

Theorem

A A′ iff TA′ ⊆ TA.

First intuition

A

i

  • ξ
  • A

ξ′

  • C(A)

C(A)

C(i)

  • However, this implies that TA′ = TA and we just need the first inclusion!

Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa Interpretations as coalgebra morphisms

slide-12
SLIDE 12

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions

Definition (Forward morphism)

A forward morphism between A, α and B, β with respect to a pre-order ⊑, is a map h : A → B such that Ch ◦ β ◦ h ⊑ α.

Theorem

A′ is a strict refinement of A iff the inclusion map is a forward morphism from A, ξ to A, ξ′ wrt ⊆.

Theorem

The tuple Log, ref, i, ◦, where Log is the class of C-coalgebras induced by abstract logics; ref is the class of its inclusion forward morphisms wrt ⊆; i is the class of identical maps;

  • is the composition of functions,

defines a category.

Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa Interpretations as coalgebra morphisms

slide-13
SLIDE 13

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions

Relating logics: Morphisms & Interpretations

Definition (Logical morphism)

A logical morphism between the logics A = A, TA and B = B, TB consists of an (algebraic) morphism h : A → B such that {h−1[T ′]|T ′ ∈ TB} = TA.

Definition (Interpretation)

Let A = A, CA and B = B, CB be two abstract logics. A multifunction f : A ⇒ B is an interpretation (f : A ⇒ B for short), if for any {x} ∪ X ⊆ A, x ∈ CA(X) ⇔ f (x) ⊆ CB(f [X]).

Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa Interpretations as coalgebra morphisms

slide-14
SLIDE 14

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions Logical interpretation The logics induced by the Frege relation Interpretations as coalgebras morphisms

Outline

1 Starting point

Logics as coalgebras Objectives

2 Strict refinement revisited 3 Category of Logics and interpretations

Logical interpretation The logics induced by the Frege relation Interpretations as coalgebras morphisms

4 Conclusions

Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa Interpretations as coalgebra morphisms

slide-15
SLIDE 15

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions Logical interpretation The logics induced by the Frege relation Interpretations as coalgebras morphisms

Some preliminaries

Let f : A ⇒ B be a multifunction

image: f [X] = {f (a)|a ∈ X}; inverse image: f −1[Y ] = {a ∈ A|f (a) ⊆ Y } Let A = A, CA and B = B, CB two abstract logics. The multifunction f : A ⇒ B is said to be continuous wrt A and B if for every X ⊆ A, f [CA(X)] ⊆ CB(f [X]) closed if maps closed set wrt A in closed sets wrt B;

Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa Interpretations as coalgebra morphisms

slide-16
SLIDE 16

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions Logical interpretation The logics induced by the Frege relation Interpretations as coalgebras morphisms

The category of logics and interpretations

Definition (Interpretation)

Let A = A, CA and B = B, CB be two abstract logics. A multifunction f : A ⇒ B is an interpretation, if for any {x} ∪ X ⊆ A, x ∈ CA(X) ⇔ f (x) ⊆ CB(f [X]).

Lemma

f is an interpretation iff for any X ⊆ A, CA(X) = f −1[CB(f [X])].

Lemma

Let A = A, CA and B = B, CB be two abstract logics and f : A ⇒ B a closed and continuous multifunction wrt A and B. TFAE:

1 f is an interpretation from A into B; 2 for any closed set T wrt A, T = f −1[CB(f [T])]. Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa Interpretations as coalgebra morphisms

slide-17
SLIDE 17

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions Logical interpretation The logics induced by the Frege relation Interpretations as coalgebras morphisms

The category of logics and interpretations

Theorem

The tuple Log, Int, i, ◦, where Log is the class of abstract logics; Int is the class of its interpretations; i is the class of identical maps (for each abstract logic A, CA the identical map iA : A ⇒ A);

  • is the composition of multifunctions,

defines a category.

Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa Interpretations as coalgebra morphisms

slide-18
SLIDE 18

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions Logical interpretation The logics induced by the Frege relation Interpretations as coalgebras morphisms

Logic induced by the Frege relation

The abstract logic co-induced by f and A in B is defined as the abstract logic B = B, Cf , where Cf is such that ThB = {T|f −1[T] ∈ ThA} Frege relation:∼A= {a, b ∈ A2|CA(a) = CA(b)}; Canonical epimorphism e : A ⇒ A/ ∼, such e∼(a) = [a]∼. A∼ := A/ ∼, Ce∼;

Lemma

For any abstract logic A = A, CA, the multifunction e : A ⇒ A∼ is an interpretation from A to A∼.

Theorem

Let A = A, CA and B = B, CB be two abstract logics. Then there exists an interpretation f : A ⇒ B iff there exists an interpretation f ∗ : A∼ ⇒ B∼.

Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa Interpretations as coalgebra morphisms

slide-19
SLIDE 19

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions Logical interpretation The logics induced by the Frege relation Interpretations as coalgebras morphisms

Frame interpretation on the coalgebraic view

For A = A, TA:

In [Pal02]: a

  • η
  • η(a) = {T ∈ TA|a ∈ T}

Our aim: X

  • ξ
  • ξ(X) = {T ∈ TA|X ⊆ T}

Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa Interpretations as coalgebra morphisms

slide-20
SLIDE 20

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions Logical interpretation The logics induced by the Frege relation Interpretations as coalgebras morphisms

Frame interpretation on the coalgebraic view

Category Pw

Let Pw be the category with Obj(Pw) = {P(X)|X ∈ Obj(Set)}; Arrow(Pw) are the functions between Pw objects.

¯ C : Pw → Pw

¯ C(X) := {S ⊆ X|S is a closure system} ¯ C(f ) : ¯ C(B) → ¯ C(A) F → {f −1[T] : T ∈ F}.

Power-function

A multifunction f : A ⇒ B induces a function f ∗ : P(A) → P(B) X →

  • x∈X f (x).

Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa Interpretations as coalgebra morphisms

slide-21
SLIDE 21

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions Logical interpretation The logics induced by the Frege relation Interpretations as coalgebras morphisms

Theorem

Let A = A, TA and B = B, TB be two abstract logics and f : A ⇒ B an

  • interpretation. Then, TA = {f −1[T] : T ∈ TB}.

Corollary

Let A = A, CA and B = B, CB be two abstract logics and A, ξ, B, η the coalgebras induced by them. Hence, if f : A ⇒ B is an interpretation, then f ∗ is a coalgebraic morphism between its logics, i.e., f ∗ makes the following diagram to commute: A

f ∗

  • ξ
  • B

η

  • ¯

CA ¯ CB

¯ C(f ∗)

  • Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa

Interpretations as coalgebra morphisms

slide-22
SLIDE 22

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions Logical interpretation The logics induced by the Frege relation Interpretations as coalgebras morphisms

Theorem

Let A = A, TA and B = B, TB be two abstract logics and f : A ⇒ B an

  • interpretation. Then, TA = {f −1[T] : T ∈ TB}.

Corollary

Let A = A, CA and B = B, CB be two abstract logics and A, ξ, B, η the coalgebras induced by them. Hence, if f : A ⇒ B is an interpretation, then f ∗ is a coalgebraic morphism between its logics, i.e., f ∗ makes the following diagram to commute: A

f ∗

  • ξ
  • B

η

  • ¯

CA ¯ CB

¯ C(f ∗)

  • Theorem

Let A = A, CA and B = B, CB be two abstract logics and f : A ⇒ B a closed and continuous multifunction. Then, T A = {f −1[T] : T ∈ T B} implies that f is an interpretation.

Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa Interpretations as coalgebra morphisms

slide-23
SLIDE 23

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions Logical interpretation The logics induced by the Frege relation Interpretations as coalgebras morphisms

Strict refinement

Theorem (Characterization)

SP ⇁τ SP′ if there is an interpretation SP0 of SP such that SP0 SP′.

Strict refinements on Pw

A

⊇ i

  • ξ
  • A

η

  • C(A)

C(A)

C(i)

  • corresponds to

A

⊇ i∗

  • ξ′
  • A

η′

  • ¯

C(A) ¯ C(A)

C(i∗)

  • for A = P(A)

Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa Interpretations as coalgebra morphisms

slide-24
SLIDE 24

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions Logical interpretation The logics induced by the Frege relation Interpretations as coalgebras morphisms

Refinement via interpretation

Theorem (Characterization)

SP ⇁τ SP′ if there is an interpretation SP0 of SP such that SP0 SP′. A

int′ SP

  • . . .

int

B

ref

  • . . .

⊇ ref ′

B

SP′

  • ¯

CA . . .

¯ C(int′)

  • ¯

CB

¯ C(int)

  • . . .

¯ C(ref )

  • ¯

CB

¯ C(ref ′)

  • Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa

Interpretations as coalgebra morphisms

slide-25
SLIDE 25

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions

Outline

1 Starting point

Logics as coalgebras Objectives

2 Strict refinement revisited 3 Category of Logics and interpretations

Logical interpretation The logics induced by the Frege relation Interpretations as coalgebras morphisms

4 Conclusions

Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa Interpretations as coalgebra morphisms

slide-26
SLIDE 26

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions

Conclusions

We generalize the coalgebraic perspective of logics presented in [Pal02], capturing the interpretations of logics with coalgebraic morphisms ; taking this approach, we present an elegant formalization of the refinement via interpretation concept;

Directions to pursue

An interpretation entails the existence of a bisimilation; what is the logical counterpart to the existence of ξ, η-bisimilation?

◮ rephrase this work in the relational setting.

explore in the “logics as coalgebras” perspective

◮ finitarity: C(X) = {C(Y ) : Y ⊆ X, Y finite} ◮ structurality: by considering the algebraic structure on underlying sets

  • f the logics.

Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa Interpretations as coalgebra morphisms

slide-27
SLIDE 27

Starting point Strict refinement revisited Category of Logics and interpretations Conclusions

Manuel A. Martins, Alexandre Madeira, and Luis S. Barbosa. Refinement by interpretation in a general setting.

  • Electron. Notes Theor. Comput. Sci., 259:105–121, 2009.

Manuel A. Martins, Alexandre Madeira, and Luis S. Barbosa. Refinement via interpretation. In Dang Van Hung and Padmanabhan Krishnan, editors, SEFM, pages 250–259. IEEE Computer Society, 2009. Manuel A. Martins, Alexandre Madeira, and Luis S. Barbosa. The role of logic interpretation on program development. Technical Report TR-10-02, University of Minho, 2010. Alessandra Palmigiano. Abstract logics as dialgebras.

  • Electr. Notes Theor. Comput. Sci., 65(1), 2002.

Manuel A. Martins , Alexandre Madeira, Luis S. Barbosa Interpretations as coalgebra morphisms