nQ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{ | } ~        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP non-portable experimentalsjoerd@w3future.com Safe-InferredAn instance of  Category k declares the arrow k as a category. ]Whenever objects are required at value level, they are represented by their identity arrows. QOp k& is opposite category of the category k. RLThe category with Haskell types as objects and Haskell functions as arrows. QRQR non-portable experimentalsjoerd@w3future.com Safe-InferredS!The product category of category c1 and c2.  S   S non-portable experimentalsjoerd@w3future.com Safe-Inferred =The constant functor with the same domain and codomain as f. 'eWe need a wrapper here because objects need to be of kind *, and categories are of kind * -> * -> *. ()Functors are arrows in the category Cat. *!Functors map objects and arrows. +0The domain, or source category, of the functor. ,2The codomain, or target category, of the functor. -:% maps objects. .% maps arrows. / The covariant functor Hom(X,--) 0$The contravariant functor Hom(--,X) TsThe Hom functor, Hom(--,--), a bifunctor contravariant in its first argument and covariant in its second argument. U* tuples with a fixed object on the right. V) tuples with a fixed object on the left. W' is the diagonal functor for products. X f1 :***: f2 is the product of the functors f1 and f2. YE is a bifunctor that projects out the second component of a product. ZD is a bifunctor that projects out the first component of a product. [The  x = Op (Op x) functor. \The  Op (Op x) = x functor. ]The dual of a functor ^The constant functor. _!The composition of two functors. `The identity functor on k aCatC is the category with categories as objects and funtors as arrows. 5  !"#$%&'()*+,-./0TUVWXYZ[\]^_`a'  !"#$%&'()*+,-./0'()'*+,-.%&#$!"  / 0#   !"#$%&'()*+,-./0TUVWXYZ[\]^_`a non-portable experimentalsjoerd@w3future.com Safe-Inferred 9The category of endofunctors. :"A newtype wrapper for components, E which can be useful for helper functions dealing with components. =A component for an object z is an arrow from F z to G z. >4Natural transformations are built up of components,  one for each object z in the domain category of f and g. @f :~> g: is a natural transformation from functor f to functor g. A'n ! a'& returns the component for the object a of a natural transformation n. K This can be generalized to any arrow (instead of just identity arrows). B3Horizontal composition of natural transformations. C2The identity natural transformation of a functor. bWrap f h is the functor such that Wrap f h :% g = f :.: g :.: h,  for functors g that compose with f and h. cPostcompose f c is the functor such that Postcompose f c :% g = f :.: g,  for functors g that compose with f and with domain c. dPrecompose f d is the functor such that Precompose f d :% g = g :.: f,  for functors g that compose with f and with codomain d. e*Composition of endofunctors is a functor. fFunctor category D^C. * Objects of D^C are functors from C to D. , Arrows of D^C are natural transformations. $123456789:;<=>?@ABCDEFGHIJKLMNObcdef123456789:;<=>?@ABCDEFGHIJKLMNO@=:;<ABCDE>?9FGHIJKLMNO78563412123456789:;<=>?@ABCDEFGHIJKLMNObcdef non-portable experimentalsjoerd@w3future.com Safe-InferredgP" is the category with one object. PQgPQPQPQg non-portable experimentalsjoerd@w3future.com Safe-Inferredh!Since there is nothing to map in T, there'+s a functor from it to any other category. iT" is the category with no objects. RSTUVhiRSTUVTUVRSRSTUVhi non-portable experimentalsjoerd@w3future.com Safe-Inferred jA natural transformation Nat c d! is isomorphic to a functor from c :**: 2 to d. k.The directed coproduct category of categories c1 and c2. l]c projects out to the right category, replacing a value from the left category with a fixed object. m_c projects out to the left category, replacing a value from the right category with a fixed object. na+ is the codiagonal functor for coproducts. o f1 :+++: f2" is the coproduct of the functors f1 and f2. pe5 is a functor which injects into the right category. qg4 is a functor which injects into the left category. r%The coproduct category of categories c1 and c2. WXYZ[\]^_`abcdefghijklmjklmnopqrWXYZ[\]^_`abcdefghijklmmlikjghefcdab_`]^Y\[ZWXWXY\[Z]^_`abcdefghikjlmjklmnopqr non-portable experimentalsjoerd@w3future.com Safe-InferredyAAn initial universal property, a universal morphism from x to u. zAA terminal universal property, a universal morphism from u to x. nopqrstuvwxyz nopqrstuvwxyz pqrstuvwxoynznopqrstuvwxyz  non-portable experimentalsjoerd@w3future.com Safe-InferredsCThe category with categories as objects and adjunctions as arrows. {|}~tus{|}~}~{|{|}~tus  non-portable experimentalsjoerd@w3future.com Safe-Inferred7An instance of HasColimits j k says that k has all colimits of type j. , returns the limiting co-cone for a functor f. J shows that the limiting co-cone is universal  i.e. any other co-cone of f factors through it @ by returning the morphism between the vertices of the cones. Colimits in a category k by means of a diagram of type j, which is a functor from j to k. An instance of  HasLimits j k says that k has all limits of type j. ) returns the limiting cone for a functor f. D shows that the limiting cone is universal  i.e. any other cone of f factors through it @ by returning the morphism between the vertices of the cones. Limits in a category k by means of a diagram of type j, which is a functor from j to k. WA co-cone from F to N is a natural transformation from F to the constant functor to N. TA cone from N to F is a natural transformation from the constant functor to N to F. :The diagonal functor with the same domain and codomain as f.  The vertex (or apex) of a cone. #The vertex (or apex) of a co-cone. <The limit functor is right adjoint to the diagonal functor. =The colimit functor is left adjoint to the diagonal functor. vYThe colimit of any diagram with a terminal object, has the limit at the terminal object. w/The colimit of a single object is that object. xVThe limit of any diagram with an initial object, has the limit at the initial object. y-The limit of a single object is that object. z3Binary products are the dual of binary coproducts. {3Binary products are the dual of binary coproducts. |2Terminal objects are the dual of initial objects. }2Terminal objects are the dual of initial objects. ~The functor coproduct 0 is the binary coproduct in functor categories. qThe coproduct of two functors, passing the same object to both functors and taking the coproduct of the results. !Binary coproduct as a bifunctor. _The binary coproduct of the product of 2 categories is the product of their binary coproducts. @In the category of one object that object is its own coproduct. The coproduct of categories i is the binary coproduct in (. If kF has binary coproducts, we can take the colimit of 2 joined diagrams. The functor product . is the binary product in functor categories. mThe product of two functors, passing the same object to both functors and taking the product of the results. Binary product as a bifunctor. [The binary product of the product of 2 categories is the product of their binary products. >In the category of one object that object is its own product. The product of categories  is the binary product in (. #The tuple is the binary product in Hask. If kB has binary products, we can take the limit of 2 joined diagrams. hThe initial object of the direct coproduct of categories is the initial object of the initial category. >The category of one object has that object as initial object. [The initial object of the product of 2 categories is the product of their initial objects. aThe constant functor to the initial object is itself the initial object in its functor category. ,The empty category is the initial object in Cat. ,Any empty data type is an initial object in Hask. 5An initial object is the colimit of the functor from 0 to k. kThe terminal object of the direct coproduct of categories is the terminal object of the terminal category. ]The terminal object of the product of 2 categories is the product of their terminal objects. ?The category of one object has that object as terminal object. cThe constant functor to the terminal object is itself the terminal object in its functor category. Unit is the terminal category. () is the terminal object in Hask. 3A terminal object is the limit of the functor from 0 to k. If every diagram of type j has a colimit in k! there exists a colimit functor. ) It can be seen as a generalisation of (+++). If every diagram of type j has a limit in k there exists a limit functor. ) It can be seen as a generalisation of (***). 4The diagonal functor from (index-) category J to k. ^vwxyz{|}~44Cvwxyz{|}~  non-portable experimentalsjoerd@w3future.com Safe-Inferred 9A comonad is a comonoid in the category of endofunctors. 5A monad is a monoid in the category of endofunctors. ComonoidObject f a defines a comonoid a. in a comonoidal category with tensor product f. MonoidObject f a defines a monoid a, in a monoidal category with tensor product f. DA monoidal category is a category with some kind of tensor product. 8 A tensor product is a bifunctor, with a unit object. 4Every adjunction gives rise to an associated monad. 6Every adjunction gives rise to an associated comonad. (A monoid as a category with one object. dFunctor composition makes the category of endofunctors monoidal, with the identity functor as unit. [If a category has all coproducts, then the coproduct functor makes it a monoidal category, $ with the initial object as unit. WIf a category has all products, then the product functor makes it a monoidal category, % with the terminal object as unit.   non-portable experimentalsjoerd@w3future.com Safe-Inferred DFrom every adjunction we get a monad, in this case the State monad. XA category is cartesian closed if it has all products and exponentials for all objects. AThe product functor is left adjoint the the exponential functor. tFrom the adjunction between the product functor and the exponential functor we get the curry and uncurry functions, 1 generalized to any cartesian closed category. Exponentials in Cat are the functor categories.  converts an object a to the functor  a.  converts an object a to the functor  a.  is a bifunctor, Apply :% (f, a) applies f to a, i.e. f :% a. Exponentials in Hask are functions.  The exponential as a bifunctor.   non-portable experimentalsjoerd@w3future.com Safe-InferredThe Yoneda embedding functor, C -> Set^(C^op).  and 4 are together the isomophism from the Yoneda lemma.  converts a functor f: into a natural transformation from the hom functor to f.  non-portable experimentalsjoerd@w3future.com Safe-Inferred)The category of presheaves on a category C is cartesian closed for any C.  non-portable experimentalsjoerd@w3future.com Safe-Inferred9Implication makes the Boolean category cartesian closed. =Disjunction is the binary coproduct in the Boolean category. ;Conjunction is the binary product in the Boolean category. 5True is the terminal object in the Boolean category. 5False is the initial object in the Boolean category. BooleanR is the category with true and false as objects, and an arrow from false to true.    non-portable experimentalsjoerd@w3future.com Safe-Inferred Take the X category, add a new disctinct object, and an arrow from that object to every object in ,  and you get  again. The  functor wraps   around  f (Fix f). Fix f inherits its (co)limits from  f (Fix f). Fix f inherits its (co)limits from  f (Fix f). Fix f inherits its (co)limits from  f (Fix f). Fix f inherits its (co)limits from  f (Fix f).   f7 is the fixed point category for a category combinator f.           non-portable experimentalsjoerd@w3future.com Safe-Inferred The category of Kleisli arrows.              non-portable experimentalsjoerd@w3future.com Safe-Inferred RA anamorphism of an F-coalgebra is the arrow from it to the terminal F-coalgebra. NA catamorphism of an F-algebra is the arrow to it from the initial F-algebra. QThe terminal F-coalgebra is the terminal object in the category of F-coalgebras. KThe initial F-algebra is the initial object in the category of F-algebras. ".Arrows of Dialg(F,G) are (F,G)-homomorphisms. $,Objects of Dialg(F,G) are (F,G)-dialgebras.  ForgetAlg m is the forgetful functor for Alg m. FreeAlg M takes x to the free algebra  (M x, mu_x) of the monad M. ZThe category for defining the natural numbers and primitive recursion can be described as   Dialg(F,G), with F(A)=<1,A> and G(A)=<A,A>. "The category of (F,G)-dialgebras.  !"#$%&'() !"#$%&'()$%"#&'! () !"#$%&'() non-portable experimentalsjoerd@w3future.com Safe-Inferred*+,-./01234 *+,-./01234 01234-/.,*+*+,-/.01234 non-portable experimentalsjoerd@w3future.com Safe-Inferred E The maps 0 -> 1 and 2 -> 1) form a monoid, which is universal, c.f. 5. &Replicate a monoid a number of times. FOrdinal addition makes the simplex category a monoidal category, with 0 as unit. FOrdinal addition is a bifuntor, it concattenates the maps as it were. Turn  Simplex x y arrows into Fin x -> Fin y functions. <The coproduct in the simplex category is a merge operation.  The ordinal 11 is the terminal object of the simplex category.  The ordinal 00 is the initial object of the simplex category. _The (augmented) simplex category is the category of finite ordinals and order preserving maps. 56789:;<=>?@ABCDE56789:;<=>?@ABCDE>A@?CBD9:;=<78E5656789:;=<>A@?BCDE non-portable experimentalsjoerd@w3future.com Safe-InferredThe comma category T \ downarrow S FGHIJKLMNOP FGHIJKLMNOP LMJKNIHGFOP FGHIJKLMNOP  !!""##$$%%&&''(())*++,,--./012345678899::;;<==>?@@ABCDEFGHIJKLMNOPQQRRSTUVVWXYZ[[\\]]^^__``abcbcdeffghijklmno p p q q r s t u v w x y z { | } ~                                        u   t  Q                88@      !"#$%&'()*+,-./0123456789:;< = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s tuvwxyz{,|}~data-category-0.5.1 Data.CategoryData.Category.ProductData.Category.Functor#Data.Category.NaturalTransformationData.Category.UnitData.Category.VoidData.Category.Coproduct"Data.Category.RepresentableFunctorData.Category.AdjunctionData.Category.LimitData.Category.MonoidalData.Category.CartesianClosedData.Category.YonedaData.Category.PresheafData.Category.BooleanData.Category.FixData.Category.KleisliData.Category.DialgData.Category.NNOData.Category.SimplexData.Category.CommaOpunOpCategorysrctgt.Obj:**::-*::*-:HomTuple2Tuple1DiagProd:***:Proj2Proj1OpOpInvOpOpOppositeConstFConst:.:IdCatWCatCatAFunctorDomCod:%%homX_hom_XWrap Postcompose PrecomposeFunctorComposeEndoComunCom ComponentNat:~>!onatIdsrcFtgtF compAssoc compAssocInv idPrecomp idPrecompInv idPostcomp idPostcompInv constPrecompconstPrecompInv constPostcompconstPostcompInvUnitMagicVoidmagicvoidNat NatAsFunctor:>>:I2AI12I1ACotuple2Cotuple1 CodiagCoprod:+++:Inj2Inj1:++:I2I1TerminalUniversalInitialUniversal RepresentablerepresentedFunctorrepresentingObject representuniversalElement unrepresentcovariantHomReprcontravariantHomReprinitialUniversalterminalUniversalAdjArrow Adjunction leftAdjoint rightAdjointunitcounit mkAdjunction leftAdjunct rightAdjunctadjunctionInitialPropadjunctionTerminalPropinitialPropAdjunctionterminalPropAdjunctionidAdj composeAdjcontAdj:+:CoproductFunctorHasBinaryCoproductsBinaryCoproductinj1inj2|||+++:*:ProductFunctorHasBinaryProducts BinaryProductproj1proj2&&&***ZeroHasInitialObject InitialObject initialObject initializeHasTerminalObjectTerminalObjectterminalObject terminateColimitFunctor HasColimitscolimitcolimitFactorizerColimit ColimitFam LimitFunctor HasLimitslimitlimitFactorizerLimitLimitFamCoconeConeDiagFDiag coneVertex coconeVertexlimitAdj colimitAdjComonadMonadMonoidAsCategory MonoidValueComonoidObject comultiply MonoidObjectmultiply TensorProduct unitObject leftUnitor leftUnitorInv rightUnitorrightUnitorInv associator associatorInvmkMonad monadFunctor mkComonadadjunctionMonadadjunctionComonadContextStateToTuple2ToTuple1Apply ExpFunctorCartesianClosed Exponentialapplytuple^^^curryAdjcurryuncurrystateMonadReturnstateMonadJoincontextComonadExtractcontextComonadDuplicateYonedaYonedaEmbeddingyonedaEmbedding fromYonedatoYonedaPShExponential PresheavespshExponentialBooleanTruF2TFlstrueProductMonoidfalseCoproductComonoidtrueProductComonoidfalseCoproductMonoidtrueCoproductMonoidfalseProductComonoidOmegaFix KleisliAdjG KleisliAdjFKleisli kleisliId kleisliAdj ForgetAlgFreeAlgNatNumSZAnaCataTerminalFAlgebraInitialFAlgebra CoalgebraCoalgAlgebraAlgDialgDialgA DialgebradialgId dialgebraprimReceilenbergMooreAdjPrimRecHasNaturalNumberObjectNaturalNumberObjectzerosucc ReplicateAddForgetFinFsFzSimplexXYsucuniversalMonoid ObjectsOver ObjectsUnder ObjectsFOver ObjectsFUnder:/\:CommaACommaOcommaIdinitialUniversalCommaterminalUniversalComma $fCategoryOp$fCategory(->)$fCategory:**: $fFunctorHom$fFunctorTuple2$fFunctorTuple1$fFunctorDiagProd$fFunctor:***:$fFunctorProj2$fFunctorProj1$fFunctorOpOpInv $fFunctorOpOp$fFunctorOpposite$fFunctorConst $fFunctor:.: $fFunctorId $fCategoryCat $fFunctorWrap$fFunctorPostcompose$fFunctorPrecompose$fFunctorFunctorCompose $fCategoryNat$fCategoryUnit$fFunctorMagic$fCategoryVoid$fFunctorNatAsFunctor$fCategory:>>:$fFunctorCotuple2$fFunctorCotuple1$fFunctorCodiagCoprod$fFunctor:+++: $fFunctorInj2 $fFunctorInj1$fCategory:++:$fCategoryAdjArrow precomposeAdjpostcomposeAdj$fHasColimits:>>:k$fHasColimitsUnitk$fHasLimits:>>:k$fHasLimitsUnitk$fHasBinaryCoproductsOp$fHasBinaryProductsOp$fHasInitialObjectOp$fHasTerminalObjectOp$fHasBinaryCoproductsNat $fFunctor:+:$fFunctorCoproductFunctor$fHasBinaryCoproducts:**:$fHasBinaryCoproductsUnit$fHasBinaryCoproductsCat$fHasColimits:++:k$fHasBinaryProductsNat $fFunctor:*:$fFunctorProductFunctor$fHasBinaryProducts:**:$fHasBinaryProductsUnit$fHasBinaryProductsCat$fHasBinaryProducts(->)$fHasLimits:++:k$fHasInitialObject:>>:$fHasInitialObjectUnit$fHasInitialObject:**:$fHasInitialObjectNat$fHasInitialObjectCat$fHasInitialObject(->)$fHasColimitsVoidk$fHasTerminalObject:>>:$fHasTerminalObject:**:$fHasTerminalObjectUnit$fHasTerminalObjectNat$fHasTerminalObjectCat$fHasTerminalObject(->)$fHasLimitsVoidk$fFunctorColimitFunctor$fFunctorLimitFunctor $fFunctorDiag$fHasBinaryCoproducts:>>:$fHasBinaryProducts:>>:$fCategoryMonoidAsCategory$fTensorProductFunctorCompose$fTensorProductCoproductFunctor$fTensorProductProductFunctor$fCartesianClosedCat$fFunctorToTuple2$fFunctorToTuple1$fFunctorApply$fCartesianClosed(->)$fFunctorExpFunctor$fFunctorYoneda$fCartesianClosedNat$fCartesianClosedBoolean$fHasBinaryCoproductsBoolean$fHasBinaryProductsBoolean$fHasTerminalObjectBoolean$fHasInitialObjectBoolean$fCategoryBoolean$fHasBinaryCoproductsFix$fHasBinaryProductsFix$fHasTerminalObjectFix$fHasInitialObjectFix $fCategoryFix$fCategoryKleisli$fFunctorKleisliAdjG$fFunctorKleisliAdjF$fFunctorForgetAlg$fFunctorFreeAlg$fHasInitialObjectDialg$fCategoryDialg$fFunctorPrimRec$fHasNaturalNumberObjectCat$fHasNaturalNumberObject(->)$fFunctorReplicate$fTensorProductAdd $fFunctorAdd$fFunctorForget$fHasBinaryCoproductsSimplex$fHasTerminalObjectSimplex$fHasInitialObjectSimplex$fCategorySimplexMergemergeLSmergeRS$fCategory:/\: