# Hom functor

(Redirected from Internal Hom)

In mathematics, specifically in category theory, hom-sets, i.e. sets of morphisms between objects, give rise to important functors to the category of sets. These functors are called hom-functors and have numerous applications in category theory and other branches of mathematics.

## Formal definition

Let C be a locally small category (i.e. a category for which hom-classes are actually sets and not proper classes).

For all objects A and B in C we define two functors to the category of sets as follows:

Hom(A,–) : CSet Hom(–,B) : CSet
This is a covariant functor given by:
• Hom(A,–) maps each object X in C to the set of morphisms, Hom(A, X)
• Hom(A,–) maps each morphism f : XY to the function
Hom(A, f) : Hom(A, X) → Hom(A, Y) given by
${\displaystyle \definecolor {gray}{rgb}{0.9764705882352941,0.9764705882352941,0.9764705882352941}\pagecolor {gray}g\mapsto f\circ g}$ for each g in Hom(A, X).
This is a contravariant functor given by:
• Hom(–,B) maps each object X in C to the set of morphisms, Hom(X, B)
• Hom(–,B) maps each morphism h : XY to the function
Hom(h, B) : Hom(Y, B) → Hom(X, B) given by
${\displaystyle \definecolor {gray}{rgb}{0.9764705882352941,0.9764705882352941,0.9764705882352941}\pagecolor {gray}g\mapsto g\circ h}$ for each g in Hom(Y, B).

The functor Hom(–,B) is also called the functor of points of the object B.

Note that fixing the first argument of Hom naturally gives rise to a covariant functor and fixing the second argument naturally gives a contravariant functor. This is an artifact of the way in which one must compose the morphisms.

The pair of functors Hom(A,–) and Hom(–,B) are related in a natural manner. For any pair of morphisms f : BB′ and h : A′ → A the following diagram commutes:

Both paths send g : AB to fgh.

The commutativity of the above diagram implies that Hom(–,–) is a bifunctor from C × C to Set which is contravariant in the first argument and covariant in the second. Equivalently, we may say that Hom(–,–) is a covariant bifunctor

Hom(–,–) : Cop × CSet

where Cop is the opposite category to C. The notation HomC(–,–) is sometimes used for Hom(–,–) in order to emphasize the category forming the domain.

## Yoneda's lemma

Main article: Yoneda lemma

Referring to the above commutative diagram, one observes that every morphism

h : A′ → A

gives rise to a natural transformation

Hom(h,–) : Hom(A,–) → Hom(A′,–)

and every morphism

f : BB

gives rise to a natural transformation

Hom(–,f) : Hom(–,B) → Hom(–,B′)

Yoneda's lemma implies that every natural transformation between Hom functors is of this form. In other words, the Hom functors give rise to a full and faithful embedding of the category C into the functor category SetCOp (covariant or contravariant depending on which Hom functor is used).

## Internal Hom functor

Some categories may possess a functor that behaves like a Hom functor, but takes values in the category C itself, rather than Set. Such a functor is referred to as the internal Hom functor, and is often written as

${\displaystyle \left[-\ -\right]:C^{op}\times C\to C}$

to emphasize its product-like nature, or as

${\displaystyle \Rightarrow :C^{op}\times C\to C}$

to emphasize its functorial nature, or sometimes merely in lower-case:

${\displaystyle {\text{hom}}(-,-):C^{op}\times C\to C}$

Categories that possess an internal Hom functor are referred to as closed categories. The forgetful functor ${\displaystyle U:C\to {\textbf {Set}}}$ on such categories takes the internal Hom functor to the external Hom functor. That is,

${\displaystyle U\circ {\text{hom}}(-,-)\simeq {\text{Hom}}(-,-)}$

where ${\displaystyle \simeq }$ denotes a natural isomorphism; the isomorphism is natural in both sites. Alternately, one has that

${\displaystyle {\text{Hom}}(I,{\text{hom}}(-,-))\simeq {\text{Hom}}(-,-)}$,

where I is the unit object of the closed category. For the case of a closed monoidal category, this extends to the notion of currying, namely, that

${\displaystyle {\text{Hom}}(X,Y\Rightarrow Z)\simeq {\text{Hom}}(X\otimes Y,Z)}$

where ${\displaystyle \otimes }$ is a bifunctor, the internal product functor defining a monoidal category. The isomorphism is natural in both X and Z. In other words, in a closed monoidal category, the internal hom functor is an adjoint functor to the internal product functor. The object ${\displaystyle Y\Rightarrow Z}$ is called the internal Hom. When ${\displaystyle \otimes }$ is the Cartesian product ${\displaystyle \times }$, the object ${\displaystyle Y\Rightarrow Z}$ is called the exponential object, and is often written as ${\displaystyle Z^{Y}}$.

Internal Homs, when chained together, form a language, called the internal language of the category. The most famous of these are simply typed lambda calculus, which is the internal language of Cartesian closed categories, and the linear type system, which is the internal language of closed symmetric monoidal categories.

## Properties

Note that a functor of the form

Hom(–, A) : CopSet

is a presheaf; likewise, Hom(A, –) is a copresheaf.

A functor F : CSet that is naturally isomorphic to Hom(A, –) for some A in C, is called a representable functor (or representable copresheaf); likewise, a contravariant functor equivalent to Hom(–, A) might be called corepresentable.

Note that Hom(–, –) : Cop × CSet is a profunctor, and, specifically, it is the identity profunctor ${\displaystyle {\text{id}}_{C}\colon C\nrightarrow C}$.

The internal hom functor preserves limits; that is, ${\displaystyle {\text{hom}}(X,-):C\to C}$ sends limits to limits, while ${\displaystyle {\text{hom}}(-,X):C^{\text{op}}\to C}$ sends limits in ${\displaystyle C^{\text{op}}}$, that is colimits ${\displaystyle C}$, into limits. In a certain sense, this can be taken as the definition of a limit or colimit.

## Other properties

If A is an abelian category and A is an object of A, then HomA(A,–) is a covariant left-exact functor from A to the category Ab of abelian groups. It is exact if and only if A is projective.[1]

Let R be a ring and M a left R-module. The functor HomR(M,–): AbMod-R is right adjoint to the tensor product functor – ${\displaystyle \otimes }$R M: Mod-RAb.