40
Some examples in Category Theory D. Gift Samuel Outline Category POSET SET SET PAR Proc AUTO REACH THEO LTL CLOSURE Functors SET – MON Some examples in Category Theory D. Gift Samuel April 25, 2007

Some examples in Category Theory - Swansea University

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Some examples in Category Theory

D. Gift Samuel

April 25, 2007

Page 2: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Outline

◮ SET, SET⊥, Proc

◮ AUTO, REACH

◮ THEO, PRES, SPRES

◮ POSET,Poset,GRAPH, PROOF, LOGI

Page 3: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Definitions

◮ A category C is a triple < G , ; , id >◮ G = (G0, G1, src , trg) is a graph◮ ; is a map from G2 into G1

◮ id is a map from G0 into G1

◮ ; satisfies associative properties.◮ (f ; g); h = f ; (g ; h)

◮ idx satisfies identity morphism.◮ If f : x → y , idx ; f = f ; idy = f

Page 4: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Category: POSET

◮ Objects are posets (A,≤)

◮ Morphisms are monotonic functions

◮ Composition is well defined and it is closed.

1. Let (P ,≤P) and (Q,≤Q) be posets.f : P → Q and g : Q → R , (f ; g)(x) = g(f (x))

2. x ≤P y ⇒ f (x) ≤Q f (y) by f is monotonic⇒ g(f (x)) ≤R g(f (y)) by g is monotonic⇒ (f ; g)(x) ≤R (f ; g)(y) by definition ofcomposition

3. f ; (g ; h) = (f ; g); h is true as f,g,h are functions

◮ for each poset (P ,≤P), indentity morphism isidentity function

1. idP : P → P is monotonic2. it satisfies the identity axioms; f : P → Q ,

idP ; f = f and f ; idQ = f

Page 5: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Category: SET

◮ Objects are sets

◮ Morphisms are total functions

◮ Composition is functional composition.◮ If f : A → B and g : B → c are total, then so is.◮ Functional compositional is associative

◮ Identity morphisms are identity functions◮ Identity function is total◮ for any function f : A → B, idA; f = f ; idB = f

Page 6: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Category: SET⊥

◮ Objects are pair < A,⊥A > where ⊥A ∈ A

◮ morphism between < A,⊥A > and < B ,⊥B > aretotal functions s.t. f (⊥A) = ⊥B

◮ morphism for SET⊥ are all morphism of SET s.t. itsatisfies the above condition.PROOF

◮ composition is defined by functional compositionwhich are inherited from SET

◮ composition law is closed for SET⊥

◮ identity map assigns to every set the identityfunction which are also inherited from SET

◮ Identities are morphism in SET⊥

Page 7: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Comma Category

◮ Given a category C and an object c : C , we definea ↓ C

◮ Objects are all the pairs < f , x > where f is amorphism f : a → x in C .

◮ Morphism between f : a → x and g : a → y s.t.f ; h = g

a

x y

fg

h

a

y

x z

f g h

i j

◮ Category isomorphism between the 1 ↓ SET andSET⊥

Page 8: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Categories:Co-reflective sub-categories

◮ D be a co-reflective sub-category of a category C iffevery C-object c, co-reflection for c is C-Morphismi : d → c s.t. for any C-morphism f : d ′ → c whered’ is a D-Morphism , there is a unique D-morphismf ′ : d ′ → d s.t. f=f’;i

d

d’

ci

ff’

Page 9: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

SET is co-reflective sub-category of PAR

◮ PAR is a category where objects are sets andmorphisms are partial functions

◮ SET is subcategory of PAR, but it is not a fullsubcategory of PAR

◮ PAR is a Co-reflective sub-categories of SET

◮ Proof

B

Ai

elevation of A

f ∈ PAR

f ⊥ ∈ SET

A⊥ ∈ SET

Page 10: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Category: FSET⊥

◮ Objects are pair < A,⊥A > where ⊥A ∈ A and A isfinite

◮ morphism between < A,⊥A > and < B ,⊥B > aretotal functions s.t. f (⊥A) = ⊥B

◮ composition is functional composition and identitymap assigns to every set the identity function

◮ FSET⊥ is a full subcategory of SET⊥

Page 11: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Category: Proc

◮ Objects are process behaviour(or process)P =< A⊥,Λ > where A⊥ is a finite pointed set andΛ ⊆ Aω

⊥.◮ λ ∈ Λ is a function from λ : ω → A⊥. an finite

sequence of elements of A⊥

◮ Given a process < A⊥, ΛA >, A⊥ is called events ofP,and A⊥ \ ⊥A is called alphabet of P(denoted asPα). Λ is called behaviours of P.

◮ ⊥ is called the environment event of P◮ process morphism

h : P =< A⊥,ΛA >→ Q =< B⊥,ΛB > is amorphism h : A⊥ → B⊥ s.t. hω(ΛA) ⊆ ΛB . wherehω(λ) = λ; h

◮ processes and process morphism constitute acategory Proc

◮ Forget functor U⊥ : Proc → FSet⊥ that sends eachprocess to its alphabets and each morphismf : (A1,Λ1) → (A2,Λ2) to f : A1 → A2 is faithful.

Page 12: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Category: Proc

◮ Morphism h : P =< A⊥,ΛA >→ Q =< B⊥,ΛB > isa embedding of the process Q within P, making Q acomponent-of P.

◮ h :< A⊥,ΛA >→< B⊥,ΛB > is a morphismh : A⊥ → B⊥ s.t. hω(ΛA) ⊆ ΛB

◮ environment of P are also in the environment of Q◮ any alphabet of P can be mapped onto ⊥B : P

identifies part of the environment of Q: P doesn’tparticipate on the event.

◮ the behaviour of P be compatible with Q: the lifecycle of Q is mapped to life cycle of P.

Page 13: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Definition: Cone, Limit

◮ A communtative cone over diagram δ consists of anobject C together with morphism p : C → δ s.t. forevery f : Ai → Aj we have f ; δi = δj

◮ A limit for the diagram D is a commutative conep : C → δ s.t. for every commutative conep′ : C ′ → δ

there is a unique morphism f : C′

→ C

such that p; f = p′

( pa; f = p′

a for every edge )

◮ Terminal, products,equalizers and pushback arespeciallization of limits

a b

X

f A B

Cf

LIMITCONE

pa

pb

C′

pa

pb

qa

qb

Page 14: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Definition: Universal properties

◮ Limit of two object without any morphism is aproduct. The limit of empty diagram is the terminalobject

◮ Limit of two parallel morphism with the samedomain and co-domain is the equalizer. Pullback isthe limit of two morphism with the same co-domain.

Terminal Object C

A C

A B

P

A B

Product P

f

gA B

P

A B$

f

g

A C

B

f

g

Equaliser pullbackC

p1p2

Page 15: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Proc: Initial and Terminal

◮ Terminal process is < {⊥∅}, {⊥ω

∅} >. Its alphabet

contains only the witness for action of theenvironment. It is a model for idle process.

◮ Terminal process is the innermost component

◮ Initial process < {⊥∅}, ∅ >. It does nothing. Itmodels a deadlock process. deadlock any process towhich it is connected

◮ Initial process is the outmost component.

◮ Initial objects and terminals objects are in SET⊥ aresingleton sets < {a}, a >

Page 16: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Universal property: Product

◮ The object z is the product of x and y withprojection πx : z → x and πy : z → y iff for any v

and pair of morphism fx : v → x fy : v → y , thenthere is a unique morphism k : v → z

◮ Every poset(P ,≤) is a category. Objects areelements in P. Morphisms are given by the relation≤.

◮ Composition is defined by transitivity law. Identitymorphism are defined by reflexitivity laws

◮ Universal Properties◮ The least element is the initial object, the greatest

element is the terminal object◮ In a category of poset (P ,≤P), greatest lower bound

z is the product of p and q◮ glb(p, q) ≤ p, glb(p, q) ≤ q, are projections◮ if c ≤ p and c ≤ q, then c ≤ glb(p, q), which is

unique

Page 17: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Universal properties of Proc

◮ Product of two processes alphabets

DENOTED AS

〈{a,⊥A},⊥A〉〈{b,⊥B},⊥B〉

{a}

{b}

{a|b, b, a}

〈{a|b,⊥A|b, a|⊥B ,⊥A|⊥B},⊥A|⊥B〉

◮ Parallel composition without interaction

Page 18: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Universal properties of Proc

◮ product represents traditional trace-based semanticsof parallel compositions without synchronisation

◮ Product of two processes < A1,Λ1 > and< A2,Λ2 > is obtained

◮ by computing the product of the alphabets (A1 ×A2)◮ consist all lifecycles of the products, once projected

into the components alphabets, give life cycles ofthe component process

◮ consists λ, λ : ω → (A1 × A2) such that gω

1 (λ) ∈ Λ1

and gω

2 (λ) ∈ Λ2

〈c1, S1〉〈c2, S2〉

g1 g2

〈c , g−11 (S) ∩ g−1

2 (S2)〉

〈c0, S0〉

f1f2

◮ Parallel composition without interaction

Page 19: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Idle and deadlock process

◮ When terminal process put in parallel with anotherprocess, the result of the parallel composition is theother process

◮ Initial process(blocking process) absorbs any otherprocess when put in parallel

◮ product with other process returns an emptybehaviour

Page 20: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Universal properties of Proc

◮ Pullback represents traditional trace-based semanticsof parallel compositions with synchronisation

◮ Product of two morphism f1 and f2 is obtained bycomputing the product of the alphabets and bytaking as set of behaviours the intersection of theinverse images of the set of behaviours of thecomponents and equal

◮ consists λ, λ : ω → (A1 ×A A2) such thatgω

1 (λ) ∈ Λ1 and gω

2 (λ) ∈ Λ2

〈c1, S1〉〈c2, S2〉

g1 g2

〈c , g−11 (S) ∩ g−1

2 (S2)〉

〈c0, S0〉

f1f2

◮ Parallel composition without interaction

Page 21: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Universal properties of Proc

◮ A1 = {⊥, a, c , d}, A2 = {⊥, b, e, k} and A = {⊥, x}with functions f = {⊥ → ⊥, a → ⊥, c → x , d → x}and g = {⊥ → ⊥, b → ⊥, e → x , k → x}

◮ product A1 × A2 ={⊥, a, c , d , b, e, k, a|b, a|e, a|k, c |b, c |e, c |k, d |b, d |e, d |k}

◮ pullback is obtained by keeping only the events thatafter being projected to A1 and A2 are mappedthrough f and g to the same element of A.

◮ A1 ×A A2 = {⊥, a, b, a|b, c |e, c |k, d |e, d |k}

Pullback{a, c, d} {b, e, k}

{x}

c → x

d → x

e → x

k → x

{a, b, a|b, c|e, c|k, d |e, d |k}

Page 22: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

An Example

◮ ΛP1 contains all the life cycle of the form⊥∗a⊥∗c⊥∗a⊥∗c⊥∗ · · · and ΛP2 contains⊥∗e⊥∗b⊥∗e⊥∗b⊥∗ · · ·

◮ Pullback is⊥∗a⊥∗c |e⊥∗{a⊥∗b, b⊥∗a, a|b}⊥∗c |e⊥∗

{a⊥∗b, b⊥∗a, a|b} · · ·

◮ e can synchronised either with c or d, so e has towait until c or d appears

Pullback{a, c, d} {b, e, k}

{x}

c → x

d → x

e → x

k → x

{a, b, a|b, c|e, c|k, d |e, d |k}

Page 23: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Reference

◮ Mirror, Mirror in my Hand: a duality betweenspecifications and models of process behaviourJ.L. Fiadeiro and J.F. Costa

Page 24: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Category of Automatas(AUTO)

◮ Objects in AUTO are automata (X ,S ,Y , f , s0, g)

◮ Morphisms in AUTO are simulations: B simulates Aif A → B

◮ Morphism from A = (X ,S ,Y , f , s0, g) to

B = (X′

,S′

,Y′

, f′

, s′

0, g′

) is a tuple

< h : X → X′

, i : S → S′

, j : Y → Y′

> such that◮ i(s0) = s

0◮ f ; i = h × i ; f

◮ g ; j = i ; g′

Page 25: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Proof for AUTO

◮ Composition of two morphisms is a morphism◮ (h, i , j) : A = (X ,S ,Y , f , s0, g) to

B = (X′

,S′

,Y′

, f′

, s′

0, g′

)(h

, i′

.j′

): B = (X′

,S′

,Y′

, f′

, s′

0, g′

) toC = (X

′′

,S′′

,Y′′

, f′′

, s′′

0 , g′′

) and◮ Composition is < h; h

, i ; i′

, j ; j′

>◮ (i ; i ′)(s0)

= i(i ′(s0)) by composition definition= i(s

0) by < h, i , j > is morphism= s

′′

0 by < h′

, i′

, j′

> is morphism◮ f ; (i ; i

)= (f ; i); i

by associativity= (h × i ; f

); i′

by morphism= h × i ; (f

; i′

) by associativity= (h × i ; (h

× i′

); f′′

by morphism= (h × i ; h

× i′

); f′′

by associativity= (h; h

) × (i ; i′

); f′′

by composition

Page 26: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Initials and Terminals

◮ ∅ is the initial object in SET

◮ {a} is a terminal object in SET.

◮ (∅, ∅, ∅, ∅, ∅, ∅) is a initial objects in AUTOM

◮ ({i}, {s}, {o}, {i × s → s}, s, {s → o}) is a terminalobject in AUTOM

Page 27: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Co-reflective sub-categories of AUTO

◮ D be a co-reflective sub-category of a category C iffevery C-object c, co-reflection for c is C-Morphismi : d → c such that for any C-morphism f : d ′ → c

where d’ is a D-Morphism , there is a uniqueD-morphism f ′ : d ′ → d such that f=f’;i

d

d’

ci

ff’

◮ Reachable Automata: automate that is obtained byremoving all non-reachable states.

◮ In REACH, objects are reachable automata.

◮ Morphisms are simulations.

Page 28: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

REACH is a Co-reflective sub-category ofAUTO

◮ A is related to canonical reachable automata R byc : R → A

cR

h’

R’

A

h

◮ A = (X ,S ,Y , s0, f , g) and R = (X ,SR ,Y , s0, fR , gR)where SR ⊆ S , X,Y are identities

◮ Given any reachable automata R ′ and simulationh : R ′ → A, there is a unique morphism of reachableautomata h′ : R ′ → R such that h = h′; c

◮ Co-reflector for an object is a morphism throughwhich all communication must go.

Page 29: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Temporal propositions

◮ A signature of LTL is a set of actions symbols.

◮ The action symbols provide atomic propositions inthe LTL formula.

◮ The set of temporal propositions prop(Σ) for asignature is inductively defined as

◮ Every action symbol is a temporal propositions◮ beg is a temporal propositions (denotating the initial

state)◮ if φ is a temporal proposition so is ¬φ◮ if φ1 and φ2 is a temporal proposition so are

φ1 ⊃ φ2, φ1Uφ2 and φ1Wφ2

Page 30: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Semantics

◮ An interpretation structure for a signature Σ is asequence λ ∈ (2Σ)ω

◮ λ ∈ (2Σ)ω is true at state i which we write λ |=Σ,i φ◮ if φ ∈ Σ, λ |=Σ,i φ iff φ ∈ λ(i)◮ φ ∈ Σ, λ |=Σ,i beg iff i = 0◮ φ ∈ Σ, λ |=Σ,i ¬φ iff it is not the case λ |=Σ,i φ◮ φ ∈ Σ, λ |=Σ,i φ1 ⊃ φ2 iff λ |=Σ,i φ1 implies

λ |=Σ,i φ2

◮ φ ∈ Σ, λ |=Σ,i φ1Uφ2 iff for some j > i , λ |=Σ,j φ2

and λ |=Σ,k φ1 for every i ≤ k ≤ j

◮ (weak until) (φ1W φ2) holds (φ1Uφ2), or φ2 willforever be false and φ1 true.

◮ φ is true in φ for λ, written, λ |=Σ φ iff λ |=Σ,i φ forevery state i

◮ Φ ⊢Σ φ iff φ is true in every sequence that makes allthe propositions in Φ true

Page 31: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Examples

◮ specification vending machine issignature coin,cake,cigaraxioms: beg ⊃((¬cake ∧¬cigar)∧ (coin∨ (¬cake ∧¬cigar)Wcoin))coin ⊃ (¬coin)W (cake ∨ cigar)(cake ∨ cigar) ⊃ (¬cake ∧ ¬cigar)Wcoin

cake ⊃ (¬cigar)

◮ accepts coins, delivers cakes and cigars

Page 32: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Interpretations between theories

◮ Let Σ be a signature and Ψ a subset of prop(Σ) issaid to be closed iff for every φ ∈ prop(Σ), Ψ ⊢Σ φ

implies φ ∈ Ψ.

◮ cΣ(Ψ) denotes the least closed set that contains Ψ.

◮ Let Σ andΣ′

be signatures. Every functionsf : Σ → Σ

extends to aprop(f ) : prop(Σ) → prop(Σ

) as follows◮ prop(f)(beg)=beg◮ if a ∈ Σ then prop(f)(a)=f(a)◮ prop(f )(¬φ) = (not prop(f )(φ))◮ prop(f )(φ1 ⊃ φ2) = (prop(f )(φ1) ⊃ prop(f )(φ2)◮ prop(f )(φ1 ⊃ φ2) = (prop(f )(φ1)Uprop(f )(φ2)

Page 33: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

More Categories

◮ THEOLTL is the category of theories with:◮ objects: < Σ, Φ >, where Φ = cΣ(Φ).◮ morphism f :< Σ, Φ >→< Σ′, Φ′ > is a sig. morph.

f : Σ → Σ′ such that prop(f )(Φ) ⊆ Φ′.

◮ ◮ PRESLTL is the category of presentation with:◮ objects: < Σ, Φ >,◮ morphism f :< Σ, Φ >→< Σ′

, Φ′> is a sig.

morph. f : Σ → Σ′ such thatprop(f )(cΣ(Φ)) ⊆ cΣ′(Φ′).

◮ THEOLTL is a category◮ prop(f ; g)(Φ) = prop(g)prop(f )(Φ)◮ (f ; g) is a theory morphism

◮ PRESLTL is a category

Page 34: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

THEOLTL is a subcategory of PRESLTL

◮ Every theory is a presentation.

◮ Given a theory f : (Σ,Φ) → (Σ′

,Φ′

), we need to

prove prop(f )(cΣ(Φ) ⊆cΣ(Φ

)

◮ As f is a theory morphism, prop(f )(Φ) ⊆ Φ′

and Φand Φ

are closed, c(Φ) = Φ and c(Φ′

) = Φ′

Page 35: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Category:CLOSURE

◮ A closure system is a pair < L, c > where L is a setand c : 2L → 2L is a total function satisfying thefollowing properties:

◮ Reflexivity: for every Φ ⊆ L, Φ ⊆ c(Φ).◮ Monotonicity: for every Φ, Γ ⊆ L, Φ ⊆ Γ implies

c(Φ) ⊆ c(Γ).◮ Idempotence: for every Φ ⊆ L, c(c(Φ)) ⊆ c(Φ).

◮ Objects in CLOSURE are closure systems

◮ morphisms f :< L, c >→< L′, c ′ > are the mapsf : L → L′ such that f (c(Φ)) ⊆ c ′(f (Φ)) for allΦ ⊆ L.

Page 36: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Reflective & Co-Reflective sub categories

Consider a closure systems (L, c).Φ ⊆ L is closed iff Φ = c(Φ).

◮ THEO is the category of theories with:◮ objects: closed subset of L◮ morphism: Inclusions.

◮ SPRES is the category of strict presentation with:◮ objects: subsets of L◮ morphism: Inclusions.

◮ PRES is the category of presentation with:◮ objects: subsets of L◮ morphism: by the preorder Φ ≤ Γ iff c(Φ) ⊆ c(Γ)

Page 37: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Categories: Reflective sub-categories

◮ D be a Reflective sub-category of a category C iffevery C-object c, reflection for c is C-Morphismo : c → d such that for any C-morphism f : c → d ′

where d’ is a D-Morphism , there is a uniqueD-morphism f ′ : d → d ′ such that f=o;f’

C d

d’

f’f

o

Page 38: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Reflective & Co-Reflective sub categories

◮ THEO is a full subcategory of PRES and SPRES.

◮ SPRES is a subcategory of PRES.It is an immediate consequence of the monotonicity

◮ THEO is a reflective subcategory of PRES andSPRES.

◮ SPRES is not co-reflective subcat of PRES.Φ c(Φ)

Φ′

c(Φ) Φ

Φ′

◮ THEO is a coreflective subcategory of PRES.

◮ THEO is not a coreflective subcategory of SPRES.

◮ SPRES is a coreflective subcategory of PRES.

Page 39: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Functor between SET and MON

◮ SET is a category.◮ Objects in SET are sets◮ Morphisms in SET are total functions

◮ MON is a category.◮ Objects in MON are (List(S), ⋄, [])◮ List(S)is free monoid generated by S.◮ Morphism in MON are monoid homomorphism.

◮ functor LIST maps SET → List (which is objectpart of functor)

◮ functor LIST maps f : S → S′

to a functionLIST (f ) : List(S) → List(S

) (which formsmorphism part of functor )

◮ Given a list L =[s1, s2, · · · , sn] maps f over theelements of list :LIST (f )(L) = f ∗(L) = [f (s1), f (s2), · · · , f (sn)]

Page 40: Some examples in Category Theory - Swansea University

Some examples inCategory Theory

D. Gift Samuel

Outline

Category

POSET

SET

SET⊥

PAR

Proc

AUTO

REACH

THEOLTL

CLOSURE

Functors

SET – MON

Functor between SET and MON [conti...]

◮ f ∗ is a homomorphismf ∗([]) = []f ∗(L ⋄ L′) = f ∗(L) ⋄ f ∗(L′)f ∗([s]) = [f (s)]

◮ Any total function between sets induces the monoidhomomorphism between the corresponding monoids.PROOF

◮ Preservation of Identities

◮ List(ids)(L) = [ids(s1), · · · , ids(s1)]◮ = [s1, · · · sn] = L◮ = idList(s)(L)

◮ Preservation of composition