An Introduction to Category Theory and Categorical Logic
Total Page:16
File Type:pdf, Size:1020Kb
An Introduction to Category Theory and Categorical Logic Wolfgang Jeltsch Category theory An Introduction to Category Theory basics Products, coproducts, and and Categorical Logic exponentials Categorical logic Functors and Wolfgang Jeltsch natural transformations Monoidal TTU¨ K¨uberneetika Instituut categories and monoidal functors Monads and Teooriaseminar comonads April 19 and 26, 2012 References An Introduction to Category Theory and Categorical Logic Category theory basics Wolfgang Jeltsch Category theory Products, coproducts, and exponentials basics Products, coproducts, and Categorical logic exponentials Categorical logic Functors and Functors and natural transformations natural transformations Monoidal categories and Monoidal categories and monoidal functors monoidal functors Monads and comonads Monads and comonads References References An Introduction to Category Theory and Categorical Logic Category theory basics Wolfgang Jeltsch Category theory Products, coproducts, and exponentials basics Products, coproducts, and Categorical logic exponentials Categorical logic Functors and Functors and natural transformations natural transformations Monoidal categories and Monoidal categories and monoidal functors monoidal functors Monads and Monads and comonads comonads References References An Introduction to From set theory to universal algebra Category Theory and Categorical Logic Wolfgang Jeltsch I classical set theory (for example, Zermelo{Fraenkel): I sets Category theory basics I functions from sets to sets Products, I composition of functions yields function coproducts, and I identity functions exist exponentials Categorical logic I adding structure and preserving it: Functors and I vector spaces natural transformations I linear maps from vector spaces to vector spaces Monoidal I composition of linear maps yields linear map categories and I identity functions are linear maps monoidal functors generalization of this idea in universal algebra: Monads and I comonads I certain algebras with the same signature References I homomorphisms from such algebras to other such algebras I composition of homomorphisms yields homomorphism I identity functions are homomorphisms An Introduction to Beyond universal algebra Category Theory and Categorical Logic Wolfgang Jeltsch I topology based on the Kuratowski axioms: Category theory I topological space is a set X and a closure operator basics Products, cl : P(X ) !P(X ) coproducts, and exponentials that fulfills certain axioms Categorical logic 0 0 I continuous function from (X ; cl) to (X ; cl ) Functors and 0 natural is a function f : X ! X with transformations 0 Monoidal f (cl(A)) ⊆ cl (f (A)) categories and monoidal functors Monads and I does not fit into the universal algebra framework: comonads I closure operator operates on sets References instead of single elements I continuity axiom uses ⊆ instead of = I will fit into the categorical framework An Introduction to No elements anymore Category Theory and Categorical Logic Wolfgang Jeltsch Category theory basics I revision control system darcs: Products, coproducts, and I repository states exponentials I patches that turn repository states into repository states Categorical logic I composition of patches yields patch Functors and natural I empty patches exist transformations repository states do not have elements Monoidal I categories and monoidal functors I will fit into the categorical framework nevertheless Monads and I more about a categorical approach to darcs in [Swierstra] comonads References An Introduction to Categories Category Theory and Categorical I components of a category: Logic I a class of objects Wolfgang Jeltsch I class of morphisms, each having a unique domain Category theory and a unique codomain, which are objects basics I composition of morphisms: Products, coproducts, and f : A ! B g : B ! C exponentials gf : A ! C Categorical logic Functors and I identity morphisms: natural transformations idA : A ! A Monoidal categories and I axioms that have to hold: monoidal functors I composition is associative Monads and I id is left and right unit comonads I classes of objects and morphism are not necessarily sets: References allows categories of sets, vector spaces, etc. I composition is partial: codomain and domain must match I above constructions lead to categories Set, Vec, etc. An Introduction to Duality Category Theory and Categorical Logic Wolfgang Jeltsch axioms still hold after doing the following: I Category theory basics I swapping domain and codomain of each morphism I changing the argument order of composition Products, coproducts, and op I opposite category C for every category C: exponentials op Categorical logic I objects of C are the ones of C op Functors and I morphisms f : A ! B of C are the morphism natural f : B ! A of C transformations op I compositions gf in C are the compositions fg in C Monoidal op categories and I identities in C are the same as in C monoidal functors I consequences: Monads and comonads op I for every categorical notion N, there is a dual notion N References such that something is an Nop in C if it is an N in Cop I for every theorem, there is a dual theorem that refers to the dual notions An Introduction to Products of categories Category Theory and Categorical Logic Wolfgang Jeltsch I product category C × D for any two categories C and D: Category theory I objects basics (A; B) Products, coproducts, and where A is an object of C, and B is an object of D exponentials I morphisms Categorical logic 0 0 (f ; g):(A; B) ! (A ; B ) Functors and natural where f : A ! A0 and g : B ! B0 transformations I compositions and identities defined componentwise: Monoidal categories and monoidal functors 0 0 0 0 (f ; g )(f ; g) = (f f ; g g) Monads and comonads id(A;B) = (idA; idB ) References I neutral element is the category 1: I exactly one object I exactly one morphism (the identity of that object) An Introduction to Categories and elements Category Theory and Categorical Logic Wolfgang Jeltsch Category theory basics Products, coproducts, and exponentials I in general, no notion of element of an object Categorical logic I however, elements can be recovered for specific kinds Functors and natural of categories transformations I furthermore, some concepts that seem to require Monoidal categories and the notion of element actually do not monoidal functors Monads and comonads References An Introduction to Injectivity Category Theory and Categorical Definition (Injectivity) Logic Wolfgang Jeltsch A function f : A ! B is injective if and only if Category theory basics 8x1; x2 2 A : f (x1) = f (x2) ) x1 = x2 : Products, coproducts, and exponentials Theorem Categorical logic Functors and A function f : A ! B is injective if and only if natural transformations Monoidal 8C : 8g1; g2 : C ! A : fg1 = fg2 ) g1 = g2 : categories and monoidal functors Monads and I above definition relies on the notion of element comonads References I theorem gives us another property for defining injectivity: I does not mention elements, but only sets and functions (point-free style) I can therefore be generalized to arbitrary categories I leads to the notion of monomorphism An Introduction to Surjectivity Category Theory and Categorical Logic Definition (Surjectivity) Wolfgang Jeltsch A function f : A ! B is surjective if and only if Category theory basics 8y 2 B : 9x 2 A : f (x) = y : Products, coproducts, and exponentials Categorical logic Theorem Functors and A function f : A ! B is surjective if and only if natural transformations Monoidal 8C : 8g1; g2 : B ! C : g1f = g2f ) g1 = g2 : categories and monoidal functors Monads and comonads I theorem gives us point-free definition References I generalization to arbitrary categories leads to the notion of epimorphism I point-free style makes it clear that monomorphism and epimorphism (injectivity and surjectivity) are duals An Introduction to Isomorphisms Category Theory and Categorical Logic Wolfgang Jeltsch Category theory basics Products, I generalization of bijections coproducts, and exponentials I morphism f : A ! B is an isomorphism Categorical logic −1 if there is an f : B ! A such that Functors and natural transformations f −1f = id ff −1 = id A B Monoidal categories and monoidal functors I objects A and B are isomorphic (A =∼ B) Monads and if there exists an isomorphism f : A ! B comonads References An Introduction to Category Theory and Categorical Logic Category theory basics Wolfgang Jeltsch Category theory Products, coproducts, and exponentials basics Products, coproducts, and Categorical logic exponentials Categorical logic Functors and Functors and natural transformations natural transformations Monoidal categories and Monoidal categories and monoidal functors monoidal functors Monads and Monads and comonads comonads References References An Introduction to Cartesian products Category Theory and Categorical Logic I pair construction: Wolfgang Jeltsch Category theory x 2 A y 2 B basics (x; y) 2 A × B Products, coproducts, and exponentials I pair destruction: Categorical logic Functors and π1 : A × B ! A π2 : A × B ! B natural transformations Monoidal I destruction is point-free, construction is not categories and monoidal functors I construction can be made point-free: Monads and comonads f : C ! A g : C ! B References hf ; gi : C ! A × B where 8z 2 C : hf ; gi(z) = (f (z); g(z)) An Introduction to Products Category Theory and Categorical Logic I generalization of cartesian products Wolfgang Jeltsch I a product of A and B is an object A × B together Category theory