Institutions - Part 2csmarkus/ProcessesAndData_old/... · Title: Institutions - Part 2 Author: Liam...

Post on 03-Oct-2020

6 views 0 download

Transcript of Institutions - Part 2csmarkus/ProcessesAndData_old/... · Title: Institutions - Part 2 Author: Liam...

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

Institutions - Part 2

Liam O’Reilly

16.05.07

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

Outline

From Last TimeRelating Institutions to Π-InstitutionsRecap - Theories in Closure SystemsRelating Π-Institutions to Institutions

Institution Morphisms and MapsMany Notions and NamesRecap - Natural TransformationsInstitution Morphisms

Hets Demo

Propositions for maps and morphisms

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

Outline

From Last TimeRelating Institutions to Π-InstitutionsRecap - Theories in Closure SystemsRelating Π-Institutions to Institutions

Institution Morphisms and MapsMany Notions and NamesRecap - Natural TransformationsInstitution Morphisms

Hets Demo

Propositions for maps and morphisms

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

Every Institution Presents A Π-Institution

TheoremEvery institution 〈SIGN, gram, mod, |=〉 presents theπ-institution 〈SIGN, gram, 〉,where for every signature Σ, p ∈ gram(Σ) andΦ ⊆ gram(Σ),Φ Σ p iff for every M ∈ mod(Σ), M |=Σ Φimplies M |=Σ p.

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

Proof Outline

In order to prove this we must prove:1. For every p ∈ gram(Σ), p Σ p.2. For every p ∈ gram(Σ) and Φ1,Φ2 ⊆ gram(Σ),

if Φ1 ⊆ Φ2 and Φ1 Σ pthen Φ2 Σ p.

3. For every p ∈ gram(Σ) and Φ1,Φ2 ⊆ gram(Σ),if Φ1 Σ p and for every p′ ∈ Φ1, Φ2 Σ p′

then Φ2 Σ p.4. For every σ : Σ → Σ′, p ∈ gram(Σ) and

Φ ⊆ gram(Σ),Φ Σ p implies gram(σ)(Φ) Σ′ gram(σ)(p).

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

Proof - Part 4

To show:For every σ : Σ → Σ′, p ∈ gram(Σ) and Φ ⊆ gram(Σ),Φ Σ p implies gram(σ)(Φ) Σ′ gram(σ)(p).

Definition of Φ Σ p iff for every M ∈ mod(Σ), M |=Σ Φ impliesM |=Σ p.

Satisfaction ConditionFor every σ : Σ → Σ′, p ∈ gram(Σ) and M ′ ∈ mod(Σ′),mod(σ)(M ′) |=Σ p iff M ′ |=Σ′ gram(σ)(p).

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

Outline

From Last TimeRelating Institutions to Π-InstitutionsRecap - Theories in Closure SystemsRelating Π-Institutions to Institutions

Institution Morphisms and MapsMany Notions and NamesRecap - Natural TransformationsInstitution Morphisms

Hets Demo

Propositions for maps and morphisms

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

Theories in Closure Systems

Given a closure system 〈L, c〉I We say Φ ⊆ L is closed iff Φ = c(Φ).I We define the category THEO〈L,c〉 whose objects

(theories) are the closed subsets of L andmorphisms are given by inclusions.

I We define the category PRES〈L,c〉 whose objects(theories presentations) are the subsets of L andmorphisms are given by the preorder Φ ≤ Γ iffc(Φ) ⊆ c(Γ).

I We define the category SPRES〈L,c〉 whose objects(strict presentations) are the subsets of L ordered byinclusion.

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

Outline

From Last TimeRelating Institutions to Π-InstitutionsRecap - Theories in Closure SystemsRelating Π-Institutions to Institutions

Institution Morphisms and MapsMany Notions and NamesRecap - Natural TransformationsInstitution Morphisms

Hets Demo

Propositions for maps and morphisms

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

Every Π-Institution Presents An Institution

TheoremEvery π-institution 〈SIGN, clos〉 presents the institution〈SIGN, gram = clos; forget, mod, |=〉,where for every signature Σ, p ∈ gram(Σ) andΦ ∈ mod(Σ)

Φ |= p iff p ∈ Φ

We have to prove that the satisfaction condition holds.

Satisfaction ConditionFor every σ : Σ → Σ′, p ∈ gram(Σ) and M ′ ∈ mod(Σ′),mod(σ)(M ′) |=Σ p iff M ′ |=Σ′ gram(σ)(p).

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

Outline

From Last TimeRelating Institutions to Π-InstitutionsRecap - Theories in Closure SystemsRelating Π-Institutions to Institutions

Institution Morphisms and MapsMany Notions and NamesRecap - Natural TransformationsInstitution Morphisms

Hets Demo

Propositions for maps and morphisms

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

Many Notions, Many Names and Confusion

Fiaderio Π-Inst Inst MapGoguen Inst ComorphismMeseguer Entailment System Plain MapMossakowski Plain RepresentationTarlecki Representations

We had originally hoped to survey andsystematise all the distinct notions of morphismthat apply to the close variants of institutions;although we found even this limited goalimpractical.

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

Outline

From Last TimeRelating Institutions to Π-InstitutionsRecap - Theories in Closure SystemsRelating Π-Institutions to Institutions

Institution Morphisms and MapsMany Notions and NamesRecap - Natural TransformationsInstitution Morphisms

Hets Demo

Propositions for maps and morphisms

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

Definition - Natural Transformations

DefinitionGiven two functors ψ : D → C and ϕ : D → C, a naturaltransformation τ from ψ to ϕ, denoted by ψ τ−→ ϕ orτ : ψ

·−→ ϕ, is a function that assigns to each object d ofD a morphism τ d : ψ(d) → ϕ(d) of C such that, for everymorphism f : d → d ′ of D,

τ d ;ϕ(f ) = ψ(f ); τ d ′

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

Outline

From Last TimeRelating Institutions to Π-InstitutionsRecap - Theories in Closure SystemsRelating Π-Institutions to Institutions

Institution Morphisms and MapsMany Notions and NamesRecap - Natural TransformationsInstitution Morphisms

Hets Demo

Propositions for maps and morphisms

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

Definition - Institution Morphism

DefinitionLet ι = 〈SIGN, gram, mod, |=〉 andι′ = 〈SIGN′, gram′, mod′, |=′〉 be institutions. Aninstitution morphism ρ : ι → ι′ is a triple 〈Φ,α,β〉 where:

I Φ : SIGN → SIGN′ is a functor.I α : Φ; gram′ → gram is a natural transformation.I β : mod → Φ; mod′ is a natural transformation.

such that the following property(the invariance condition)holds for any signature Σ ∈| SIGN |, m ∈| mod(Σ) | andφ′ ∈ gram′(Φ(Σ)) :

m |=Σ αΣ(φ′) iff βΣ(m) |=′Φ(Σ) φ′

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

Definition - Institution Map (Comorphism)

DefinitionLet ι = 〈SIGN, gram, mod, |=〉 andι′ = 〈SIGN′, gram′, mod′, |=′〉 be institutions. Aninstitution morphism ρ : ι → ι′ is a triple 〈Φ,α,β〉 where:

I Φ : SIGN → SIGN′ is a functor.I α : gram → Φ; gram′ is a natural transformation.I β : Φ; mod′ → mod is a natural transformation.

such that the following property(the invariance condition)holds for any signature Σ ∈| SIGN |, m′ ∈| mod′(Φ(Σ)) |and φ ∈ gram(Σ) :

βΣ(m′) |=Σ φ iff m′ |=′Φ(Σ) αΣ(φ)

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

Outline

From Last TimeRelating Institutions to Π-InstitutionsRecap - Theories in Closure SystemsRelating Π-Institutions to Institutions

Institution Morphisms and MapsMany Notions and NamesRecap - Natural TransformationsInstitution Morphisms

Hets Demo

Propositions for maps and morphisms

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

CASL Specification subsorts.casl

spec subsorts =sort Nat

ops 0,1 : Nat

sort Pos = { x:Nat . not(x=0)}op pre : Pos -> Nat;

suc : Nat -> Pos

op one:Pos

axiomforall n:Nat . pre(suc(n))=n;1=one;

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

Mapping PFOL= to FOL=

A PFOL=-signature Σ = (S, TF , PF , P) is translated to aFOL=-presentation having

SignatureSig(Φ(Σ)) =(S, TF ] PF ] {⊥: s | s ∈ S}, P ] {D : s | s ∈ S})

Set of axioms Ax(Φ(Σ))∃x : s • Ds(x) s ∈ S (1)¬Ds(⊥s) s ∈ S (2)Ds(f (x1, . . . , xn)) ⇔

∧Dsi (xi) f : s1 . . . sn → s ∈ TF (3)

Ds(g(x1, . . . , xn)) ⇒∧

Dsi (xi) g : s1 . . . sn → s ∈ PF (4)p(x1, . . . , xn) ⇒

∧Dsi (xi) p : s1 . . . sn ∈ P (5)

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

CASL Specification partial.casl

spec partial =sort Nat

ops 0,1 : Nat

op pre : Nat ->? Nat;suc : Nat -> Nat

axiomforall n:Nat . pre(suc(n))=n;

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

Outline

From Last TimeRelating Institutions to Π-InstitutionsRecap - Theories in Closure SystemsRelating Π-Institutions to Institutions

Institution Morphisms and MapsMany Notions and NamesRecap - Natural TransformationsInstitution Morphisms

Hets Demo

Propositions for maps and morphisms

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

Proposition for Institution Morphism

Let ρ = 〈Φ,α,β〉 : ι → ι′ be an institution map. Thefunctor Φ extends to THEOι → THEOι′ by establishingΦ(〈Σ, Γ〉) = 〈Φ(Σ), c(αΣ(Γ))〉.

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

Proposition for Institution Map

Let ρ = 〈Ψ,α′,β′〉 : ι → ι′ be an institution morphism.The functor Ψ extends to THEOι′ → THEOι throughΨ(〈Σ′, Γ′〉) = 〈Ψ(Σ′),α′−1

Σ′ (Γ′)〉.

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

Proposition

Let ι = 〈SIGN, gram, mod, |=〉 andι′ = 〈SIGN′, gram′, mod′, |=′〉 be institutions,ρ = 〈Φ,α,β〉 : ι → ι′ be an institution map and〈Ψ,α′,β′〉 : ι → ι′ be a morphism such that ψ is a rightadjoint of φ, and, for every Σ ∈| SIGN |,αΣ = gram(ηΣ);α′

Φ(Σ) where η is the unit of theadjunction, then

I The functor υ : THEOι′ → THEOι induced by theinstitution morphism 〈Ψ,α′,β′〉, is a right adjoint ofthe functor THEOι → THEOι′ induced by theinstitution map 〈Φ,α,β〉.

I If each component of β′ is surjective, then the unitsηΣ are conservative.

Institutions - Part 2

Liam O’Reilly

From Last TimeRelating Institutions toΠ-Institutions

Recap - Theories in ClosureSystems

Relating Π-Institutions toInstitutions

InstitutionMorphisms andMapsMany Notions and Names

Recap - NaturalTransformations

Institution Morphisms

Hets Demo

Propositions formaps andmorphisms

Summary

Summary

I Institutions provide a frame work for dealing withlogics, that capture the notions of sentences, modeland satisfaction between models and sentences.

I Institution morphisms and Comorphisms allow us totranslate between institutions, which allow us to useprograms on one logic with another logic.

I They actually have a practical use in the real world.eg. Hets.