data-category-0.8.1: Category theory

Data.Category

Contents

Description

Synopsis

# Category

class Category k where Source #

An instance of Category k declares the arrow k as a category.

Methods

src :: k a b -> Obj k a Source #

tgt :: k a b -> Obj k b Source #

(.) :: k b c -> k a b -> k a c infixr 8 Source #

#### Instances

Instances details
 Category k2 => Category (Op k2 :: k1 -> k1 -> Type) Source # Op k is opposite category of the category k. Instance detailsDefined in Data.Category Methodssrc :: forall (a :: k) (b :: k). Op k2 a b -> Obj (Op k2) a Source #tgt :: forall (a :: k) (b :: k). Op k2 a b -> Obj (Op k2) b Source #(.) :: forall (b :: k) (c :: k) (a :: k). Op k2 b c -> Op k2 a b -> Op k2 a c Source # Source # Unit is the category with one object. Instance detailsDefined in Data.Category.Unit Methodssrc :: forall (a :: k) (b :: k). Unit a b -> Obj Unit a Source #tgt :: forall (a :: k) (b :: k). Unit a b -> Obj Unit b Source #(.) :: forall (b :: k) (c :: k) (a :: k). Unit b c -> Unit a b -> Unit a c Source # Source # Void is the category with no objects. Instance detailsDefined in Data.Category.Void Methodssrc :: forall (a :: k) (b :: k). Void a b -> Obj Void a Source #tgt :: forall (a :: k) (b :: k). Void a b -> Obj Void b Source #(.) :: forall (b :: k) (c :: k) (a :: k). Void b c -> Void a b -> Void a c Source # Source # The (augmented) simplex category is the category of finite ordinals and order preserving maps. Instance detailsDefined in Data.Category.Simplex Methodssrc :: forall (a :: k) (b :: k). Simplex a b -> Obj Simplex a Source #tgt :: forall (a :: k) (b :: k). Simplex a b -> Obj Simplex b Source #(.) :: forall (b :: k) (c :: k) (a :: k). Simplex b c -> Simplex a b -> Simplex a c Source # Source # Instance detailsDefined in Data.Category.Cube Methodssrc :: forall (a :: k) (b :: k). Cube a b -> Obj Cube a Source #tgt :: forall (a :: k) (b :: k). Cube a b -> Obj Cube b Source #(.) :: forall (b :: k) (c :: k) (a :: k). Cube b c -> Cube a b -> Cube a c Source # Source # Boolean is the category with true and false as objects, and an arrow from false to true. Instance detailsDefined in Data.Category.Boolean Methodssrc :: forall (a :: k) (b :: k). Boolean a b -> Obj Boolean a Source #tgt :: forall (a :: k) (b :: k). Boolean a b -> Obj Boolean b Source #(.) :: forall (b :: k) (c :: k) (a :: k). Boolean b c -> Boolean a b -> Boolean a c Source # (Functor f, Dom f ~ (Op c :**: d), Cod f ~ ((->) :: Type -> Type -> Type), Category c, Category d) => Category (Cograph f :: Type -> Type -> Type) Source # The cograph of the profunctor f. Instance detailsDefined in Data.Category.Coproduct Methodssrc :: forall (a :: k) (b :: k). Cograph f a b -> Obj (Cograph f) a Source #tgt :: forall (a :: k) (b :: k). Cograph f a b -> Obj (Cograph f) b Source #(.) :: forall (b :: k) (c :: k) (a :: k). Cograph f b c -> Cograph f a b -> Cograph f a c Source # Category (Kleisli m :: Type -> Type -> Type) Source # The category of Kleisli arrows. Instance detailsDefined in Data.Category.Kleisli Methodssrc :: forall (a :: k) (b :: k). Kleisli m a b -> Obj (Kleisli m) a Source #tgt :: forall (a :: k) (b :: k). Kleisli m a b -> Obj (Kleisli m) b Source #(.) :: forall (b :: k) (c :: k) (a :: k). Kleisli m b c -> Kleisli m a b -> Kleisli m a c Source # Category (f (Fix f)) => Category (Fix f :: Type -> Type -> Type) Source # Fix f is the fixed point category for a category combinator f. Instance detailsDefined in Data.Category.Fix Methodssrc :: forall (a :: k) (b :: k). Fix f a b -> Obj (Fix f) a Source #tgt :: forall (a :: k) (b :: k). Fix f a b -> Obj (Fix f) b Source #(.) :: forall (b :: k) (c :: k) (a :: k). Fix f b c -> Fix f a b -> Fix f a c Source # ECategory k => Category (Underlying k :: Type -> Type -> Type) Source # The underlying category of an enriched category Instance detailsDefined in Data.Category.Enriched Methodssrc :: forall (a :: k0) (b :: k0). Underlying k a b -> Obj (Underlying k) a Source #tgt :: forall (a :: k0) (b :: k0). Underlying k a b -> Obj (Underlying k) b Source #(.) :: forall (b :: k0) (c :: k0) (a :: k0). Underlying k b c -> Underlying k a b -> Underlying k a c Source # Category ((->) :: Type -> Type -> Type) Source # The category with Haskell types as objects and Haskell functions as arrows. Instance detailsDefined in Data.Category Methodssrc :: forall (a :: k) (b :: k). (a -> b) -> Obj (->) a Source #tgt :: forall (a :: k) (b :: k). (a -> b) -> Obj (->) b Source #(.) :: forall (b :: k) (c :: k) (a :: k). (b -> c) -> (a -> b) -> a -> c Source # (Category c1, Category c2) => Category (c1 :**: c2 :: Type -> Type -> Type) Source # The product category of categories c1 and c2. Instance detailsDefined in Data.Category.Product Methodssrc :: forall (a :: k) (b :: k). (c1 :**: c2) a b -> Obj (c1 :**: c2) a Source #tgt :: forall (a :: k) (b :: k). (c1 :**: c2) a b -> Obj (c1 :**: c2) b Source #(.) :: forall (b :: k) (c :: k) (a :: k). (c1 :**: c2) b c -> (c1 :**: c2) a b -> (c1 :**: c2) a c Source # Category d => Category (Nat c d :: Type -> Type -> Type) Source # Functor category D^C. Objects of D^C are functors from C to D. Arrows of D^C are natural transformations. Instance detailsDefined in Data.Category.NaturalTransformation Methodssrc :: forall (a :: k) (b :: k). Nat c d a b -> Obj (Nat c d) a Source #tgt :: forall (a :: k) (b :: k). Nat c d a b -> Obj (Nat c d) b Source #(.) :: forall (b :: k) (c0 :: k) (a :: k). Nat c d b c0 -> Nat c d a b -> Nat c d a c0 Source # (Category c1, Category c2) => Category (c1 :>>: c2 :: Type -> Type -> Type) Source # Instance detailsDefined in Data.Category.Coproduct Methodssrc :: forall (a :: k) (b :: k). (c1 :>>: c2) a b -> Obj (c1 :>>: c2) a Source #tgt :: forall (a :: k) (b :: k). (c1 :>>: c2) a b -> Obj (c1 :>>: c2) b Source #(.) :: forall (b :: k) (c :: k) (a :: k). (c1 :>>: c2) b c -> (c1 :>>: c2) a b -> (c1 :>>: c2) a c Source # (Category c1, Category c2) => Category (c1 :++: c2 :: Type -> Type -> Type) Source # The coproduct category of categories c1 and c2. Instance detailsDefined in Data.Category.Coproduct Methodssrc :: forall (a :: k) (b :: k). (c1 :++: c2) a b -> Obj (c1 :++: c2) a Source #tgt :: forall (a :: k) (b :: k). (c1 :++: c2) a b -> Obj (c1 :++: c2) b Source #(.) :: forall (b :: k) (c :: k) (a :: k). (c1 :++: c2) b c -> (c1 :++: c2) a b -> (c1 :++: c2) a c Source # Category (MonoidAsCategory f m :: Type -> Type -> Type) Source # A monoid as a category with one object. Instance detailsDefined in Data.Category.Monoidal Methodssrc :: forall (a :: k) (b :: k). MonoidAsCategory f m a b -> Obj (MonoidAsCategory f m) a Source #tgt :: forall (a :: k) (b :: k). MonoidAsCategory f m a b -> Obj (MonoidAsCategory f m) b Source #(.) :: forall (b :: k) (c :: k) (a :: k). MonoidAsCategory f m b c -> MonoidAsCategory f m a b -> MonoidAsCategory f m a c Source # Category (Dialg f g :: Type -> Type -> Type) Source # The category of (F,G)-dialgebras. Instance detailsDefined in Data.Category.Dialg Methodssrc :: forall (a :: k) (b :: k). Dialg f g a b -> Obj (Dialg f g) a Source #tgt :: forall (a :: k) (b :: k). Dialg f g a b -> Obj (Dialg f g) b Source #(.) :: forall (b :: k) (c :: k) (a :: k). Dialg f g b c -> Dialg f g a b -> Dialg f g a c Source # (Category (Dom t), Category (Dom s)) => Category (t :/\: s :: Type -> Type -> Type) Source # The comma category T \downarrow S Instance detailsDefined in Data.Category.Comma Methodssrc :: forall (a :: k) (b :: k). (t :/\: s) a b -> Obj (t :/\: s) a Source #tgt :: forall (a :: k) (b :: k). (t :/\: s) a b -> Obj (t :/\: s) b Source #(.) :: forall (b :: k) (c :: k) (a :: k). (t :/\: s) b c -> (t :/\: s) a b -> (t :/\: s) a c Source # Source # Cat is the category with categories as objects and funtors as arrows. Instance detailsDefined in Data.Category.Functor Methodssrc :: forall (a :: k) (b :: k). Cat a b -> Obj Cat a Source #tgt :: forall (a :: k) (b :: k). Cat a b -> Obj Cat b Source #(.) :: forall (b :: k) (c :: k) (a :: k). Cat b c -> Cat a b -> Cat a c Source # Source # The category with categories as objects and adjunctions as arrows. Instance detailsDefined in Data.Category.Adjunction Methodssrc :: forall (a :: k) (b :: k). AdjArrow a b -> Obj AdjArrow a Source #tgt :: forall (a :: k) (b :: k). AdjArrow a b -> Obj AdjArrow b Source #(.) :: forall (b :: k) (c :: k) (a :: k). AdjArrow b c -> AdjArrow a b -> AdjArrow a c Source #

type Obj k a = k a a Source #

Whenever objects are required at value level, they are represented by their identity arrows.

type Kind (cat :: k -> k -> *) = k Source #

# Opposite category

newtype Op k a b Source #

Constructors

 Op FieldsunOp :: k b a

#### Instances

Instances details
 Category k2 => Category (Op k2 :: k1 -> k1 -> Type) Source # Op k is opposite category of the category k. Instance detailsDefined in Data.Category Methodssrc :: forall (a :: k) (b :: k). Op k2 a b -> Obj (Op k2) a Source #tgt :: forall (a :: k) (b :: k). Op k2 a b -> Obj (Op k2) b Source #(.) :: forall (b :: k) (c :: k) (a :: k). Op k2 b c -> Op k2 a b -> Op k2 a c Source # HasBinaryProducts k2 => HasBinaryCoproducts (Op k2 :: k1 -> k1 -> Type) Source # Binary products are the dual of binary coproducts. Instance detailsDefined in Data.Category.Limit Associated Typestype BinaryCoproduct (Op k2) x y :: Kind k Source # Methodsinj1 :: forall (x :: k) (y :: k). Obj (Op k2) x -> Obj (Op k2) y -> Op k2 x (BinaryCoproduct (Op k2) x y) Source #inj2 :: forall (x :: k) (y :: k). Obj (Op k2) x -> Obj (Op k2) y -> Op k2 y (BinaryCoproduct (Op k2) x y) Source #(|||) :: forall (x :: k) (a :: k) (y :: k). Op k2 x a -> Op k2 y a -> Op k2 (BinaryCoproduct (Op k2) x y) a Source #(+++) :: forall (a1 :: k) (b1 :: k) (a2 :: k) (b2 :: k). Op k2 a1 b1 -> Op k2 a2 b2 -> Op k2 (BinaryCoproduct (Op k2) a1 a2) (BinaryCoproduct (Op k2) b1 b2) Source # HasBinaryCoproducts k2 => HasBinaryProducts (Op k2 :: k1 -> k1 -> Type) Source # Binary products are the dual of binary coproducts. Instance detailsDefined in Data.Category.Limit Associated Typestype BinaryProduct (Op k2) x y :: Kind k Source # Methodsproj1 :: forall (x :: k) (y :: k). Obj (Op k2) x -> Obj (Op k2) y -> Op k2 (BinaryProduct (Op k2) x y) x Source #proj2 :: forall (x :: k) (y :: k). Obj (Op k2) x -> Obj (Op k2) y -> Op k2 (BinaryProduct (Op k2) x y) y Source #(&&&) :: forall (a :: k) (x :: k) (y :: k). Op k2 a x -> Op k2 a y -> Op k2 a (BinaryProduct (Op k2) x y) Source #(***) :: forall (a1 :: k) (b1 :: k) (a2 :: k) (b2 :: k). Op k2 a1 b1 -> Op k2 a2 b2 -> Op k2 (BinaryProduct (Op k2) a1 a2) (BinaryProduct (Op k2) b1 b2) Source # HasTerminalObject k2 => HasInitialObject (Op k2 :: k1 -> k1 -> Type) Source # Terminal objects are the dual of initial objects. Instance detailsDefined in Data.Category.Limit Associated Typestype InitialObject (Op k2) :: Kind k Source # MethodsinitialObject :: Obj (Op k2) (InitialObject (Op k2)) Source #initialize :: forall (a :: k). Obj (Op k2) a -> Op k2 (InitialObject (Op k2)) a Source # HasInitialObject k2 => HasTerminalObject (Op k2 :: k1 -> k1 -> Type) Source # Terminal objects are the dual of initial objects. Instance detailsDefined in Data.Category.Limit Associated Typestype TerminalObject (Op k2) :: Kind k Source # MethodsterminalObject :: Obj (Op k2) (TerminalObject (Op k2)) Source #terminate :: forall (a :: k). Obj (Op k2) a -> Op k2 a (TerminalObject (Op k2)) Source # Category k => CartesianClosed (Presheaves k :: Type -> Type -> Type) Source # The category of presheaves on a category C is cartesian closed for any C. Instance detailsDefined in Data.Category.CartesianClosed Associated Typestype Exponential (Presheaves k) y z :: Kind k Source # Methodsapply :: forall (y :: k0) (z :: k0). Obj (Presheaves k) y -> Obj (Presheaves k) z -> Presheaves k (BinaryProduct (Presheaves k) (Exponential (Presheaves k) y z) y) z Source #tuple :: forall (y :: k0) (z :: k0). Obj (Presheaves k) y -> Obj (Presheaves k) z -> Presheaves k z (Exponential (Presheaves k) y (BinaryProduct (Presheaves k) z y)) Source #(^^^) :: forall (z1 :: k0) (z2 :: k0) (y2 :: k0) (y1 :: k0). Presheaves k z1 z2 -> Presheaves k y2 y1 -> Presheaves k (Exponential (Presheaves k) y1 z1) (Exponential (Presheaves k) y2 z2) Source # type InitialObject (Op k2 :: k1 -> k1 -> Type) Source # Instance detailsDefined in Data.Category.Limit type InitialObject (Op k2 :: k1 -> k1 -> Type) = TerminalObject k2 type TerminalObject (Op k2 :: k1 -> k1 -> Type) Source # Instance detailsDefined in Data.Category.Limit type TerminalObject (Op k2 :: k1 -> k1 -> Type) = InitialObject k2 type BinaryCoproduct (Op k2 :: k1 -> k1 -> Type) (x :: Kind (Op k2)) (y :: Kind (Op k2)) Source # Instance detailsDefined in Data.Category.Limit type BinaryCoproduct (Op k2 :: k1 -> k1 -> Type) (x :: Kind (Op k2)) (y :: Kind (Op k2)) = BinaryProduct k2 x y type BinaryProduct (Op k2 :: k1 -> k1 -> Type) (x :: Kind (Op k2)) (y :: Kind (Op k2)) Source # Instance detailsDefined in Data.Category.Limit type BinaryProduct (Op k2 :: k1 -> k1 -> Type) (x :: Kind (Op k2)) (y :: Kind (Op k2)) = BinaryCoproduct k2 x y type Exponential (Presheaves k :: Type -> Type -> Type) (y :: Kind (Presheaves k)) (z :: Kind (Presheaves k)) Source # Instance detailsDefined in Data.Category.CartesianClosed type Exponential (Presheaves k :: Type -> Type -> Type) (y :: Kind (Presheaves k)) (z :: Kind (Presheaves k)) = PShExponential k y z