Conditionals in Distributive Categories

Jeremy Gibbons · 1997

In a distributive category (a category in which the product distributes over the coproduct), coproducts can be used to model conditional expressions. We develop such a theory of conditionals. 1 Introduction The category Set of sets and total functions is a distributive category [1], which is to say that the categorical product in Set (namely cartesian product) distributes over the coproduct (disjoint sum). In such a category, coproducts can be used to model conditionals. In this paper we show how this is done, developing a theory of conditionals as we go. We write `a 2 A' to denote that element a is in datatype A, and `f : A ! B' to denote that function f is from datatype A to datatype B. We write f:a for the result of applying function f to element a; application associates to the right. Backwards composition of functions is written `f ffi g', so that (f ffi g):a = f:g:a. We use sans serif type for `global' names, with the same meaning throughout the paper, and italic type for local...

Read the paper · More papers on PaperTik