3
3 Current State of Play Process –Viewed as monad/comonad –Three cycles in each direction: One reflective – monad Other anticipatory – comonad –Handles transaction concept In databases (ACID) In universe

4
4 Example of Adjointness LR F G Endofunctor T = GF If conditions hold, then we can write F ┤ G The adjunction is represented by a 4-tuple: η and ε are unit and counit respectively

7
7 Definition of CCC paraphrased CCC-1 There is a terminal object 1 CCC-2 Each pair of objects has a product with projections CCC-3 There is only one path between the product and the related objects.

8
8 In more detail: CCC-1 For every object A in the category, there is exactly one arrow A  Τ - Τ is the terminal object Category is closed on top Τ

9
9 CCC-2 Each pair of objects A and B of the category has a product A Χ B with projections π l : A Χ B  A π r : A Χ B  B Category has products and projections –Giving route to relationships

10
10 CCC-3a Notion of currying: change function on two variables to a function on one variable For function f: C X A  B Let [A  B] be set of functions from A to B Then there is a function: λf: C  [A  B] where λf(c) is the function whose value at an element a ε A is f(c,a)  Equivalent to typed lambda calculus  Examples: f : multiply(_,2)  R curries to λf: double(_)  R f : exponentiate(_,2)  R curries to λf : square(_)  R

11
11 CCC-3b For every pair of objects A and B, there is an object [A  B] and an arrow eval: [A  B] Χ A  B with the property that for any arrow f: C X A  B( C is product object) there is a unique arrow λf: C  [A  B] such that the following diagram commutes:

12
12 CCC-3c B C X A f eval λf X A [A  B] X A [A  B] is termed B A : all arrows from A to B, A is the exponent of B One path from product

13
13 Uniqueness The category is CCC if (other conditions satisfied) and : –λf is unique (one path) Notes –eval is also a function –eval: [A  B]  B refers to one A object and its associated B object -- eval: [A  B] X A  B refers to all A objects and their associated B objects

14
14 Finite Products CCC is not restricted to binary products Can have finite products For any objects A 1, …, A n and A of a CCC and any i=1,…,n, there is an object [A i  A] and an arrow: eval : [A i  A] X A i  A such that for any f: Π A k  A, there is a unique arrow: λ i f : Π A k  [A i  A] (k > 1) Finite products give construction of n-tuples which can represent strings. Note: this notation may offend Gödel’s theorems!

19
19 Locally CCC Satisfied when: –The category C has pullbacks and either: The pullback functor has a right adjoint OR For every object A in C, the slice category C/A is cartesian closed Pullbacks express relationships over objects in a particular context Locally CCC provide more expressiveness in capturing the real world

20
20 Product vs Pullback A X B A B πlπl πrπr Product and projections A X C B A B πlπl πrπr C Pullback of A and B in the context of C

24
24 Kleene Closure Given a set A: –The Kleene closure A* of a set A is defined as the set of strings of finite length of elements of A In adjointness terms: F : A  A* G : A*  A The closure is then GFA F is the free functor, adding structure G is the underlying functor, removing structure

25
25 Example A = {a, b, c, d, …., z}(alphabet) F(A) = A* = all finite strings constructed from A by F G(A*) returns the alphabet The closure relies on adjointness –F can be free and open (all possibilities) –G can check for language rules

26
26 Example 2 The adjoint (if it exists) is –F constructs all possibilities –G applies the language rules –η defines the change from A  GFA in the alphabet –ε defines the change from FGA*  A* in the language

27
27 Summary Category Theory provides a number of routes for generating strings: –n-tuples through cartesian closed categories –String expansion through substitution as in Kleisli categories –String generation through free functors as in the Kleene closure