Lecture 2: Introduction to Category Theory Nick Rossiter, Computing Science, Newcastle University, England

Slides:



Advertisements
Similar presentations
Four-level Architecture for Closure in Interoperability EFIS, 17th-18th July 2003 Nick Rossiter & Michael Heather Informatics, Northumbria University
Advertisements

Introduction The concept of transform appears often in the literature of image processing and data compression. Indeed a suitable discrete representation.
Introduction to Graph “theory”
Adjoint Typing: Is it Whitehead’s Category of the Ultimate?
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
1 What are Bit Strings? The View from Process Nick Rossiter Northumbria University.
Basic Properties of Relations
Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)
Discrete Structures Chapter 5 Relations and Functions Nurul Amelina Nasharuddin Multimedia Department.
EE1J2 – Discrete Maths Lecture 7
1 CMSC424, Spring 2005 CMSC424: Database Design Lecture 9.
Preliminaries/ Chapter 1: Introduction. Definitions: from Abstract to Linear Algebra.
1 Category Theory in a ( E,M ) -category Some aspects of category theory, in particular related to universality, can be developed in any finitely complete.
1 CSE 20: Lecture 7 Boolean Algebra CK Cheng 4/21/2011.
Relations Chapter 9.
From Classical to Quantum Databases with Applied Pullbacks Nick Rossiter Seminar – PSSL, 15th February 2003
Relation, function 1 Mathematical logic Lesson 5 Relations, mappings, countable and uncountable sets.
Category Theory By: Ashley Reynolds. HISTORY OF CATEGORY THEORY  In 1942–45, Samuel Eilenberg and Saunders Mac Lane introduced categories, functors,
FINITE FIELDS 7/30 陳柏誠.
Anticipation in constructing and interrogating Natural Information Systems: From Classical through Nano to Quantum Computing.
Information Systems: Modelling Complexity with Categories Four lectures given by Nick Rossiter at Universidad de Las Palmas de Gran Canaria, 15th-19th.
Lecture 2 – Boolean Algebra Lecturer: Amy Ching Date: 21 st Oct 2002.
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Chapter 9. Chapter Summary Relations and Their Properties Representing Relations Equivalence Relations Partial Orderings.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Categories and Computer Science
1 The Contravariancy of Anticipatory Systems Dimitrios Sisiaridis, Michael Heather & Nick Rossiter Northumbria University, Newcastle NE2 1XE, UK Symposium.
Sets Define sets in 2 ways  Enumeration  Set comprehension (predicate on membership), e.g., {n | n  N   k  k  N  n = 10  k  0  n  50} the set.
Chapter 5 – Relations and Functions. 5.1Cartesian Products and Relations Definition 5.1: For sets A, B  U, the Cartesian product, or cross product, of.
21st May 2004Informatics Research Conference, Northumbria University 1 Some Fundamental Questions in Databases Nick Rossiter (with Michael Heather)
The Representation of Reality in Computational Form Nick Rossiter Visiting Fellow with Michael Heather and Dimitrios Sisiaridis Computing, Engineering.
Discrete Mathematics Relation.
CompSci 102 Discrete Math for Computer Science
Software testing techniques Spring 2009 Csci565: Theory and Practice of Software Testing1.
1 Generic Image Structures in Integrated Media Nick Rossiter & Michael Heather, University of Northumbria at Newcastle
Sets, Relations, and Lattices
Mathematical Preliminaries
1 Typing in Information Systems Nick Rossiter, Michael Heather Computer Science and Digital Technologies Northumbria University, Newcastle NE1 8ST, UK.
The theory behind Functional Programming Functional: based on lambda calculus / combinators, recursion theory, category theory. By contrast with other.
Chapter 2 With Question/Answer Animations. Section 2.1.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
Chapter Relations and Their Properties
Lecture 4: Handling Heterogeneity with Information Resource Dictionary Systems Nick Rossiter, Computing Science, Newcastle University, England
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 9 Boolean Algebras and Combinatorial Circuits.
Chapter 8: Relations. 8.1 Relations and Their Properties Binary relations: Let A and B be any two sets. A binary relation R from A to B, written R : A.
Lecture 3: Object Concepts as Categories Nick Rossiter, Computing Science, Newcastle University, England
Relations and Functions ORDERED PAIRS AND CARTESIAN PRODUCT An ordered pair consists of two elements, say a and b, in which one of them, say a is designated.
Binary Relations Definition: A binary relation R from a set A to a set B is a subset R ⊆ A × B. Example: Let A = { 0, 1,2 } and B = {a,b} {( 0, a), (
The Natural Metaphysics of Computing Anticipatory Systems Michael Heather Nick Rossiter University of Northumbria
Boolean Algebra. BOOLEAN ALGEBRA Formal logic: In formal logic, a statement (proposition) is a declarative sentence that is either true(1) or false (0).
Methodology - Logical Database Design. 2 Step 2 Build and Validate Local Logical Data Model To build a local logical data model from a local conceptual.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Lecture # 14 Chapter # 5 The Relational Data Model and Relational Database Constraints Database Systems.
Relations Chapter 9.
A Universal Technique for Relating Heterogeneous Data Models
Lesson 5 Relations, mappings, countable and uncountable sets
A Natural Basis for Interoperability
Lesson 5 Relations, mappings, countable and uncountable sets
Mathematical Background 1
Introduction to Relations and Functions
Categories for Information
Mathematical Background
Conditions for Interoperability
Preliminaries/ Chapter 1: Introduction
The Process Semantics of Time and Space as Anticipation
Basics of Relations.
REVISION Relation. REVISION Relation Introduction to Relations and Functions.
Presentation transcript:

Lecture 2: Introduction to Category Theory Nick Rossiter, Computing Science, Newcastle University, England

Features of Interoperability Complex mappings from user views to way data is held Need to handle data, metadata and metameta data Need to make semantic transformations

Category Theory? Need relations to represent mappings between levels Multi-level construction (higher-order) Category theory seems appropriate: - categories for basic structures - functors relate categories - natural transformations relate functors

Origins of Category Theory 1940s Sammy Eilenberg 1960s Fred Lawvere 1970s Saunders Mac Lane 1990s Mike Barr & Charles Wells Peter Freyd Various views: “Multi level Graph Theory” “Multi level Functional Programming” “Multi level Type Theory”

Basic Constructions The Category: Collection of arrows which may be named: (name:) source target e.g. ab 1 a : a a (identity arrow named 1 a ) f: b c (arrow named f)

Categorial Axioms 1 The identity arrow 1 a identifies an object a Arrows are composable if the source of one forms the target of the other: a b, b c has composite a c Composition is associative: f: a b, g: b c, h: c d f o (g o (h)) equiv ((f) o g) o h

Categorial Axioms 2 Identity arrows may be used for the operation of composition: e.g. f: a b, g: b c f ab f 1 b g bc g Equations: 1 b o f = f and g o 1 b = g

Types of Category Categories are named in bold font. A number of universal basic types have been developed for: Sets Ordered constructions on sets Products Relationships (and many others)

Discrete Categories Every arrow is an identity arrow e.g. aa, bb, cc Discrete categories are sets (without functions)

Simple Categories 0,1 0 empty category -- no objects, no arrows 1 (discrete) category with one object and one identity arrow e.g. a 1 a : a a

Simple Categories 2 2 Category with two objects and one arrow which is not an identity e.g. a, b a b

Category Set Set The objects are sets The arrows are total functions between the sets e.g. Sets X, Y, Z Total functions a:X Y, b:Y Z

Category Set (commuting diagram) Represented as category XYZ in the universal category of Set X a c YZ b Diagram is said to commute if c = b o a Equational logic to accompany diagrams

Category Preorder A set of objects p,q,r,… A collection of arrows such that: each arrow represents an ordering There is no more than one arrow between any two objects p q is the ordered pair for which p <= q

Preorder construction Satisfies categorical axioms: identity p p (for each object) composition p <= q <= r implies p <= r through transitivity Example of preorder: (may be symmetric) b d ce a

Preorder Applications May be cyclic Occur naturally as rich data structures in information systems e.g. object-oriented In some approaches e.g. relational, preorders are converted to an equivalent collection of partial orders Normalization techniques

Partial Orders - Category Pos Collection of partial-order objects with order-preserving arrows between them As preorder but with asymmetric axiom: if p<=q and q<=p then p=q is implied Objects b Pos1 d ce a Pos2a d Order-preserving arrows: Pos2Pos1; Pos1 Pos2

Pos Applications Derived from Preorder by Functor (see later) to convert symmetric structures to asymmetric ones Basis of logic Ordering by projection, inclusion Inheritance and aggregation paths Basic data structuring with constraints (keys) Relationship representation

Types of Arrow - Monic Monic: m a b f g d If m o f = m o g implies f=g, then m is monic. Left-cancellable. One path. Injective in sets. 1:1 relationship.

Types of Arrow - Epic Epic hd abc e If d o h = e o h implies d=e then h is epic. Right-cancellable. Onto. Surjective in sets. Mandatory relation.

Isomorphisms A mapping that is both monic and epic in the category Set is isomorphic. In other types of categories, this cannot always be assumed to hold.

Collections of Arrows - Hom Sets Sometimes useful to think of the collection of arrows between two objects Termed a hom set Written hom C (a,b) to represent all arrows between objects a and b in the category C. Emerge as results of queries on information systems

Types of Object - Initial An initial object in a category has precisely one arrow from it to every other object. b a c d a is initial object in this category Bottom in partial orders; identifiers or keys in databases;

Types of Object - Terminal A terminal object in category has precisely one arrow onto it from every other object a bemptyset c emptyset is terminal object top in partial orders; base supertype in inheritance partial orders

Category with Products A category has finite products if in addition to objects, say, a,b,c, it has: a product object a x b x c projections: pi 1 : a x b x c a pi 2 : a x b x c b pi 3 : a x b x c c

Product - Universal Mapping Binary product example (U universal object) A x B pi 1 dpi 2 A UB f g Equations: f o pi 1 = d = g o pi 2

Relationships -- Pullbacks Notion of subproduct Relation of two objects in context of a third Restriction of universal product Pullback of one arrow over another

Pullback Diagram for f over g - Basic Arrows A pi l f A X C BC pi r g B A, B are objects in relationship C includes coproduct A+B, product AXB, link objects. A X C B is product A X B in context C Equational logic: f o pi l = g o pi r

Pullbacks - More Arrows 1 A pi l pi* l f Delta A X C BC pi* r pi r g B

Pullback - More Arrows 2 A pi l pi* l f Coprod A X C BDeltaC pi* r Prod pi r g B

Interpretation of Objects, Arrows A X C B relation A to B over C Delta: C A X C B Mapping from link object to relation Coprod: A X C BC (exists) Mapping from relation to coproduct in C Prod: A X C BC(for all) Mapping from relation to product in C

Interpretation of Projection Arrows pi l : A X C BA left projection monic -- each A participates once in relation epic -- each A must participate in relation pi r : A X C BB right projection monic -- each B participates once in relation epic -- each B must participate in relation

Coproducts (Sums) A+B i l di r AUB f g Equations i l o f = d = i r o g U is universal object

Restricted Coproduct Pushout A f i l C A + C B g i r B Restriction over object C

Limits Both Pullbacks and Pushouts are examples of Limits. They are restricted products/coproducts A + C B is colimit A X C B is limit

Further Reading Categories for the Working Mathematician Mac Lane, Saunders 2nd edition Springer-Verlag Category Theory for Computing Science Barr, Michael & Wells, Charles 1st edition (later editions are available) Prentice-Hall 1990.