Я (ya) is a letter of the Cyrillic script and the name of a new ‘programming experience’ developed by Murat Kasimov (MK) presented at his website and implemented in Haskell. MK’s articles use terminology that derives from category theory.
Class
A class is a collection of objects that are defined by a property. Some classes are sets. Others are ‘too large’ to be sets and are proper classes. (‘Too large’ means that if the class were a set, it would give rise to contradictions.) For example, the collection of all sets is a proper class. A proper class cannot be a member of a class.
Morphism
A morphism (also known as an arrow) is a relationship between one object (the source) and the same object or another object (the target).
“f is a morphism from a to b” can be denoted f: a\to b.
The term source is also used for an indexed collection of morphisms with the same source:
(f_i: A \to B_i)_{i \in I}
A morphism that relates an object and the same object is an identity morphism.
Category
A category is a class of objects, a class of morphisms, an identity morphism for each object, and a binary operation (\circ) that composes morphisms:
f: A \to B,\quad g: B \to C,\quad (g \circ f): A \to C
\mathrm{Hom}_{\mathcal{C}}(X,A) is the class of all morphisms from object X to A.
A category where the class of morphisms is a set is a small one. A category where every \mathrm{Hom} class is a set is a locally small one.
The opposite category (\mathcal{C}^{op}) of a category \mathcal{C} is the same category but with all the arrows reversed.
The category denoted \mathbf{Set} is the class of all sets (its objects), the class of all functions between sets (its morphisms) and the composition of such functions (the binary operation).
An initial object (I) in category \mathcal{C} is one where, for every object X in \mathcal{C}, there exactly one morphism from I to X. An terminal object in \mathcal{C} is an initial object in \mathcal{C}^{op}.
Functor
A functor (or covariant functor) is a mapping from one category to the same category or another one that preserves identity morphisms and the composition of morphisms. A functor that maps from a category to the same category is an endofunctor.
An important functor is one that maps from a category (say, \mathcal{C}) to \mathbf{Set}. That can be denoted:
F: \mathcal{C} \mapsto \mathbf{Set}
For a locally small category \mathcal{C}, the functor \mathrm{Hom}_{\mathcal{C}}(-,A) maps an object X to the set \mathrm{Hom}_{\mathcal{C}}(X,A) (an object in \mathbf{Set}). It also maps a morphism f: X \to Y to a function \mathrm{Hom}_{\mathcal{C}}(Y,A) \to \mathrm{Hom}_{\mathcal{C}}(X,A) (a morphism in \mathbf{Set}). If the morphism g: Y \to A is an element of \mathrm{Hom}_{\mathcal{C}}(Y,A), then g \circ f: X \to A is an element of \mathrm{Hom}_{\mathcal{C}}(X,A).
Contravariant functor
A contravariant functor F: \mathcal{C} \mapsto \mathcal{D} is a functor F: \mathcal{C}^{op} \mapsto \mathcal{D}. That is:
F(f: X \to Y): F(Y) \to F(X)
and
f: A \to B,\quad g: B \to C,\quad F(g \circ f) = F(f) \circ F(g)
Component
Given two categories (say, \mathcal{C} and \mathcal{D}), two functors between those categories (say, F and G), and an object (say, X) of \mathcal{C}, a component of X (\eta_X) is a morphism in \mathcal{D}:
\eta_X: F(X) \to G(X).
Natural transformation
A natural transformation is one where, for two objects (say, A and B) in \mathcal{C} and morphism f: A \to B, \eta_A composed with G(f) is equivalent to F(f) composed with \eta_B:
G(f) \circ \eta_A = \eta_B \circ F(f).
\mathrm{Nat}\big(F,G\big) is the set of all natural transformations from functor F to functor G.
Yoneda’s lemma
Yoneda’s lemma (named after Nobuo Yoneda) is:
\mathrm{Nat}\big(\mathrm{Hom}_{\mathcal{C}}(-,A),\,F\big) \cong F(A)
where \mathcal{C} is locally small, A \in \mathcal{C} and F: \mathcal{C^{op}} \mapsto \mathbf{Set}.