Category Theory. Andrew Pitts. Module L108, Part III and MPhil. ACS 2019 Computer Science Tripos University of Cambridge L0 1

Similar documents
Topos Theory. Lectures 3-4: Categorical preliminaries II. Olivia Caramello. Topos Theory. Olivia Caramello. Basic categorical constructions

ACLT: Algebra, Categories, Logic in Topology - Grothendieck's generalized topological spaces (toposes)

Topoi: Theory and Applications

Arithmetic universes as generalized point-free spaces

Categorical models of type theory

Cubical sets as a classifying topos

Dagger Traced Symmetric Monoidal Categories and Reversible Programming

ACLT: Algebra, Categories, Logic in Topology - Grothendieck's generalized topological spaces (toposes)

Crash Course in Monads. Vlad Patryshev

Notes on categories, the subspace topology and the product topology

A Graph Theoretic Perspective on CPM(Rel)

The three faces of homotopy type theory. Type theory and category theory. Minicourse plan. Typing judgments. Michael Shulman.

A LEISURELY INTRODUCTION TO SIMPLICIAL SETS

The Essence of Reynolds

Negations in Refinement Type Systems

Using context and model categories to define directed homotopies

A MODEL STRUCTURE FOR QUASI-CATEGORIES

Less naive type theory

A MODEL CATEGORY STRUCTURE ON THE CATEGORY OF SIMPLICIAL CATEGORIES

The Truth about Types. Bartosz Milewski

in simplicial sets, or equivalently a functor

Fuzzy Analogues of Sets and Functions Can Be Uniquely Determined from the Corresponding Ordered Category: A Theorem

Univalent Foundations Project (a modified version of an NSF grant application)

The discussion of Chapter 1 will be split into two sessions; the first will cover 1.1 and 1.2; the second will cover 1.3, 1.4, and 1.5.

Typed Lambda Calculus for Syntacticians

Univalent fibrations in type theory and topology

The Formal Semantics of Programming Languages An Introduction. Glynn Winskel. The MIT Press Cambridge, Massachusetts London, England

A Database of Categories

2. Functions, sets, countability and uncountability. Let A, B be sets (often, in this module, subsets of R).

Using Agda to Explore Path-Oriented Models of Type Theory

A Model of Type Theory in Simplicial Sets

An introduction to Category Theory for Software Engineers*

Databases = Categories

Partial Metrics and Quantale-valued Sets (Preprint)

Quasi-category theory you can use

Sheaves and Stacks. November 5, Sheaves and Stacks

An introduction to simplicial sets

Inductive Types for Free

From natural numbers to the lambda calculus

A Categorical Model for Context. Tobias Berka

COALGEBRAIC MODELS FOR COMBINATORIAL MODEL CATEGORIES

Categorical Logic Andrew M. Pitts Contents 1 Introduction : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2 2 Equational Logic : : : : : : : :

Definability and full abstraction in lambda-calculi

1 Elementary number theory

Comparative Smootheology

A Quick Overview. CAS 701 Class Presentation 18 November Department of Computing & Software McMaster University. Church s Lambda Calculus

Figure 1.1: This is an illustration of a generic set and its elements.

Errata and Addenda for On Abstraction and Informatics [16]

Chapter 6 Formal Relational Query Languages

Equivariant Syntax and Semantics (Abstract of Invited Talk)

Contents. Chapter 1 SPECIFYING SYNTAX 1

Simplicial Objects and Homotopy Groups

GALOIS THEORY OF SIMPLICIAL COMPLEXES

SIMPLICIAL METHODS IN ALGEBRA AND ALGEBRAIC GEOMETRY. Contents

A NOTE ON MORPHISMS DETERMINED BY OBJECTS

Metrics on diagrams and persistent homology

Abstract Algebras: Category Theory for Biomedicine

An introduction to Homotopy Type Theory

Recursion Diagrams: ideas for a Geometry of Formal Methods

Towards the syntax and semantics of higher dimensional type theory

Modelling environments in call-by-value programming languages

Introduction to -categories

CS 242. Fundamentals. Reading: See last slide

Point-Set Topology II

Monads T T T T T. Dually (by inverting the arrows in the given definition) one can define the notion of a comonad. T T

The formal theory of homotopy coherent monads

GEOMETRY IN THREE DIMENSIONS

Cubical Homotopy Type Theory

Projective spaces and Bézout s theorem

Remarks on Isomorphisms in Typed Lambda Calculi

Functions. How is this definition written in symbolic logic notation?

Static Program Analysis

Foundations. Yu Zhang. Acknowledgement: modified from Stanford CS242

Substitution in Structural Operational Semantics and value-passing process calculi

Automata-theoretic Model of Idealized Algol with Passive Expressions

Permutation Matrices. Permutation Matrices. Permutation Matrices. Permutation Matrices. Isomorphisms of Graphs. 19 Nov 2015

Recursive Definitions, Fixed Points and the Combinator

Technical Proposal. BAA number: # Title of Proposal: Categorical Information Theory

VDM meets LCF: Domain-Theoretic and Topological Aspects of VDM

Probabilistic Functional Programming. Donnacha Oisín Kidney July 18, 2018

Smooth algebras, convenient manifolds and differential linear lo

Inductive Data Types Based on Fibrations Theory in Programming

From Categorical Logic to Facebook Engineering

I. An introduction to Boolean inverse semigroups

Category Theory 3. Eugenia Cheng Department of Mathematics, University of Sheffield Draft: 8th November 2007

CMPSCI 250: Introduction to Computation. Lecture #1: Things, Sets and Strings David Mix Barrington 22 January 2014

Category Theory. & Functional Data Abstraction. Brandon Shapiro. Math 100b

Recursively defined cpo algebras

Persistent Topology of Syntax

The Borsuk-Ulam theorem- A Combinatorial Proof

Category Theory & Functional Data Abstraction

On The Algebraic L-theory of -sets

Introductory logic and sets for Computer scientists

THE DOLD-KAN CORRESPONDENCE

Static Program Analysis

Physical quantities, measurement sets and theories

Functions 2/1/2017. Exercises. Exercises. Exercises. and the following mathematical appetizer is about. Functions. Functions

Programming and Proving with Higher Inductive Types

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

Lecture Notes on Data Representation

Transcription:

Category Theory Andrew Pitts Module L108, Part III and MPhil. ACS 2019 Computer Science Tripos University of Cambridge L0 1

Course web page Go to http://www.cl.cam.ac.uk/teaching/1819/l108 for these slides exercise sheets pointers to some additional material Recommended text for the course is: [Awodey] Steve Awodey, Category theory, Oxford University Press (2nd ed.), 2010. L0 2

Lecture 1 L1 4

What is category theory? What we are probably seeking is a purer view of functions: atheoryoffunctionsinthemselves,nota theory of functions derived from sets. What, then, is a pure theory of functions? Answer: category theory. Dana Scott, Relating theories of the λ-calculus, p406 set theory gives an element-oriented account of mathematical structure, whereas category theory takes a function-oriented view understand structures not via their elements, but by how they transform, i.e. via morphisms. (Both theories are part of Logic, broadly construed.) L1 5

L1 6

Category Theory emerges 1945 Eilenberg and MacLane General Theory of Natural Equivalences, Trans AMS 58, 231 294 (algebraic topology, abstract algebra) 1950s Grothendieck (algebraic geometry) 1960s Lawvere (logic and foundations) 1970s Joyal and Tierney (elementary topos theory) 1980s Dana Scott, Plotkin (semantics of programming languages) Lambek (linguistics) L1 7

Category Theory and Computer Science Category theory has... become part of the standard tool-box in many areas of theoretical informatics, from programming languages to automata, from process calculi to Type Theory. Dagstuhl Perpectives Workshop on Categorical Methods at the Crossroads April 2014 L1 8

This course basic concepts of category theory adjunction natural transformation category applied to functor propositional logic typed lambda-calculus functional programming L1 9

A category C is specified by Definition aset obj C whose elements are called C-objects for each X, Y obj C, aset C(X, Y) whose elements are called C-morphisms from X to Y (so far, that is just what some people call a directed graph) L1 10

A category C is specified by Definition aset obj C whose elements are called C-objects for each X, Y obj C, aset C(X, Y) whose elements are called C-morphisms from X to Y afunctionassigningtoeachx obj C an element id X C(X, X) called the identity morphism for the C-object X afunctionassigningtoeach f C(X, Y) and g C(Y, Z) (where X, Y, Z obj C) an element g f C(X, Z) called the composition of C-morphisms f and g and satisfying... L1 10

satisfying... Definition, continued associativity: forallx, Y, Z, W obj C, f C(X, Y), g C(Y, Z) and h C(Z, W) h (g f )=(h g) f unity: forallx, Y obj C and f C(X, Y) id Y f = f = f id X L1 11

Example: category of sets, Set obj Set =somefixeduniverseofsets (more on universes later) Set(X, Y) = { f X Y f is single-valued and total} Cartesian product of sets X and Y is the set of all ordered pairs (x, y) with x X and y Y. Equality of ordered pairs: (x, y) =(x, y ) x = x y = y L1 12

Example: category of sets, Set obj Set =somefixeduniverseofsets (more on universes later) Set(X, Y) = { f X Y f is single-valued and total} x X, y, y Y, x X, y Y, (x, y) f (x, y ) f y = y (x, y) f L1 12

Example: category of sets, Set obj Set =somefixeduniverseofsets (more on universes later) Set(X, Y) = { f X Y f is single-valued and total} id X = {(x, x) x X} composition of f Set(X, Y) and g Set(Y, Z) is g f = {(x, z) y Y, (x, y) f (y, z) g} (check that associativity and unity properties hold) L1 12

Example: category of sets, Set Notation. Given f Set(X, Y) and x X, itisusual to write fx (or f (x)) fortheuniquey Y with (x, y) f. Thus id X x = x (g f ) x = g( fx) L1 13

Given a category C, Domain and codomain write f : X Y or X f Y to mean that f C(X, Y), in which case one says object X is the domain of the morphism f object Y is the codomain of the morphism f and writes X = dom f Y = cod f (Which category C we are referring to is left implicit with this notation.) L1 14

in a category C: a diagram is Commutative diagrams adirectedgraphwhoseverticesarec-objects and whose edges are C-morphisms and the diagram is commutative (or commutes) if any two finite paths in the graph between any two vertices determine equal morphisms in the category under composition L1 15

Examples: Commutative diagrams X f f Y id Y g Y g Z f X Y h (g f ) h g g W Z h L1 15

Iwilloftenjustwrite C for obj C id for id X Some people write Alternative notations Hom C (X, Y) for C(X, Y) 1 X for id X gffor g f Iuse applicativeorder formorphismcomposition; other people use diagrammatic order and write f ; g (or fg)forg f L1 16

Alternative definition of category The definition given here is dependent-type friendly. See [Awodey, Definition 1.1] for an equivalent formulation: One gives the whole set of morphisms mor C (in bijection with X,Y objc C(X, Y) in my definition) plus functions dom, cod : mor C obj C id : obj C mor C and a partial function for composition _ _ : mor C mor C mor C defined at ( f, g) iff cod f = dom g and satisfying the associativity and unity equations. L1 17