How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
Universal Properties, Representables and the Yoneda Lemma
1 · Prerequisites
2 · Summary
Locally small categories supply set-valued hom-collections, while opposite and product categories control their variance. Functors, natural transformations, and natural isomorphisms provide the laws used below; the small-source convention for functor categories separates actual presheaf categories from large-source metatheoretic notation. Initial, terminal, and comma categories supply the categorical language for universal factorisations.
The hom-assignments assemble into a bifunctor and lead to representable functors, representations, and generalized elements. Evaluation at an identity gives the Yoneda bijection, its naturality in both variables, and the contravariant form. For a small source, the Yoneda functor is fully faithful and detects object isomorphisms. Universal elements then express representations by unique factorisation, yielding compatible uniqueness, their initial or terminal descriptions in categories of elements, and the corresponding comma-category descriptions of universal arrows.
3 · Logical flowchart
4 · Definitions, theorems and proofs
The covariant and contravariant hom-assignments and the hom-bifunctor of a locally small category
Definition
Let be a locally small category, so every hom-collection is a set (Category, object, morphism, domain, codomain, identity, composition, and hom-collection, Small, locally small, and large categories). Since sets and functions form (Sets and functions form the large locally small category ), the following assignments take values in .
For an object , the covariant hom-assignment sends an object to and a morphism to the function
The contravariant hom-assignment sends to and to
Equivalently, the latter is an assignment on (Opposite category ). Their functor laws are proved in The assignments and are functors to ↗.
The two variables combine into the hom-assignment
It sends to . A morphism in the product category consists of and in (Product category and its projection functors), and its action is
That this assignment is a functor, and hence a bifunctor, is proved in The hom-assignment is a bifunctor ↗.
The assignments and are functors to
Statement
Let be a locally small category and let be an object. The covariant hom-assignment and the contravariant hom-assignment of The covariant and contravariant hom-assignments and the hom-bifunctor of a locally small category are functors.
Facts & Assumptions
Given: A locally small category , an object , morphisms and , and the identity and associativity axioms of .
The covariant assignment sends to , while the contravariant assignment sends it to (The covariant and contravariant hom-assignments and the hom-bifunctor of a locally small category).
A covariant functor preserves identities and composites; a contravariant functor from means a covariant functor from (Covariant functor, identity functor, composite functor, and contravariant functor).
Proof
The maps in [F1] have the asserted source and target: if then , and if then .
Postcomposition by fixes every , and precomposition by fixes every .
For , one has .
For , one has , which is the composition law in .
Steps 1.1--1.4 give the identity and composition laws required by [F2], so both hom-assignments are functors to .
The hom-assignment is a bifunctor
Statement
For every locally small category , the hom-assignment
of The covariant and contravariant hom-assignments and the hom-bifunctor of a locally small category is a functor. Its restrictions in the two variables are the contravariant and covariant hom-functors of The assignments and are functors to .
Facts & Assumptions
Given: A locally small category ; morphisms , , , and ; and the category axioms of .
The one-variable assignments and are functors to (The assignments and are functors to ).
A morphism in a product category is a pair, and identities and composition are componentwise (Product category and its projection functors).
The hom-assignment sends to (The covariant and contravariant hom-assignments and the hom-bifunctor of a locally small category).
Proof
If , then , so [F2] defines a function .
For every , the identity pair acts by .
Applying and then sends to , which is the action of their componentwise composite in .
Steps 1.1--1.3 prove the functor laws, and fixing either variable recovers the postcomposition or precomposition action of [L1]; hence the hom-assignment is the asserted bifunctor.
Generalized elements and their shapes
Definition
Let and be objects of a category (Category, object, morphism, domain, codomain, identity, composition, and hom-collection). A generalized element of of shape is a morphism . The domain is its shape.
For a set , ordinary elements are exactly generalized elements of singleton shape: a function is determined by the image of the unique point, and every element of determines such a function. Other shapes can record more structure than singleton-shaped elements do.
Presheaves, covariantly and contravariantly representable functors, and representations
Definition
Let be a locally small category. A presheaf on is a functor , with opposite category as in Opposite category and as in Sets and functions form the large locally small category .
A covariant functor is covariantly representable when there are an object and a natural isomorphism
The pair is a representation of , and is a representing object.
A presheaf is contravariantly representable when there are an object and a natural isomorphism
The same terms are used for and . The hom-functors exist by The assignments and are functors to , and natural transformations and natural isomorphisms have the meanings of Natural transformation and its components and Natural isomorphism. When the variance is clear, representable is used without an adjective.
Initial and terminal objects are exactly the representations of the constant singleton functor
Statement
Let be a locally small category and let and denote the constant functors at a singleton set.
An object is initial if and only if represents the covariant constant singleton functor, and an object is terminal if and only if represents the contravariant constant singleton functor. Consequently the covariant functor is representable exactly when has an initial object, and the presheaf is representable exactly when has a terminal object.
Facts & Assumptions
Given: A locally small category and the constant singleton functors in the statement.
An object is initial when every has exactly one morphism, and is terminal when every has exactly one morphism (Initial object, terminal object, and zero object).
A covariant functor is represented by through a natural isomorphism , and a presheaf is represented by through (Presheaves, covariantly and contravariantly representable functors, and representations).
Sets and functions form the category (Sets and functions form the large locally small category ).
Proof
If is initial, each is a singleton by [F1], so its unique function to is a bijection; these functions are natural because every map between singleton sets is the unique such map. Thus .
Conversely, if , every is bijective with a singleton and is therefore a singleton, so is initial.
If is terminal, the same componentwise construction gives , and any such representation makes every a singleton; hence the terminal equivalence holds.
Steps 1.1--1.3 show that a representing object exists exactly when the corresponding initial or terminal object exists. In the empty category the constant functors still exist but there is no object that could represent either one, in agreement with both equivalences.
Initial and terminal objects are unique up to a unique isomorphism
Statement
Any two initial objects in a category are joined by a unique isomorphism. Any two terminal objects are likewise joined by a unique isomorphism.
Facts & Assumptions
Given: A category and either two initial objects or two terminal objects .
From an initial object there is exactly one morphism to every object, and into a terminal object there is exactly one morphism from every object (Initial object, terminal object, and zero object).
A morphism is an isomorphism when it has a two-sided inverse (Isomorphism, groupoid, and connected category).
A formal theorem derived from the category axioms has a dual obtained by reversing morphisms and composition (Every theorem about categories has a formal dual obtained by reversing morphisms and composition).
Proof
If and are initial, let and be their unique morphisms in the indicated directions.
The identity is the unique endomorphism of an initial object, so and .
By steps 1.1 and 1.2, is an isomorphism with inverse .
Any isomorphism is a morphism with that source and target and must equal the unique morphism , so the isomorphism is unique.
Applying the dual argument of [L1] to terminal objects gives a unique isomorphism .
Evaluation at the identity gives and proves that the natural-transformation collection is a set
Statement
Let be a locally small category, let be an object, and let be a functor. Evaluation at the identity defines a bijection
Its inverse sends to the natural transformation whose component at is
The explicit parametrization by the set proves that the natural-transformation collection in the display is a set. The construction makes no choice from a family of nonempty sets.
Facts & Assumptions
Given: A locally small category , an object , a functor , and the identity, composition, and functor laws.
The assignment is the functor that sends to and to postcomposition (The covariant and contravariant hom-assignments and the hom-bifunctor of a locally small category, The assignments and are functors to ).
A natural transformation has components satisfying for every (Natural transformation and its components).
A function is bijective when it is injective and surjective, equivalently when it has a two-sided inverse (Injection, surjection, bijection).
Proof
For every natural transformation , the value lies in , so evaluation defines the displayed map .
For and each object , define for .
If , then ; by [F1] and [F2], the family is natural.
Evaluation recovers : .
If and , naturality at gives .
Steps 2.2 and 2.3 make a two-sided inverse to , so [F3] gives the claimed bijection; its range is indexed by the set , and every inverse value is given by a formula, so the asserted sethood and choice-freeness follow.
The Yoneda bijection is natural in both and
Statement
Under the hypotheses of Evaluation at the identity gives and proves that the natural-transformation collection is a set, the bijections
are natural in both variables. Explicitly:
- if and , then
- if , then
Here is precomposition by . These equations make sense for every locally small and do not require a functor category with source .
Facts & Assumptions
Given: A locally small category , objects , a morphism , functors , natural transformations and , and the category and functor laws.
Evaluation is the bijection , with inverse (Evaluation at the identity gives and proves that the natural-transformation collection is a set).
The hom-assignment is a bifunctor, so induces the natural transformation with component (The hom-assignment is a bifunctor).
Naturality of says (Natural transformation and its components).
Vertical composition is componentwise: (Identity natural transformation and vertical composition).
Proof
By [L2], the component of at sends to ; hence .
Applying [F1] to gives , proving naturality in .
By componentwise composition, , proving naturality in .
Steps 1.1--1.3 are the two required naturality squares, and their pointwise formulas use no functor category on a large source.
For a presheaf , naturally in and
Statement
Let be locally small, let be an object, and let be a presheaf. Evaluation at the identity gives a bijection
whose inverse sends to the natural transformation with -component . It is natural in both variables. In particular, for and ,
and postcomposition by a natural transformation corresponds to its component at .
Facts & Assumptions
Given: The locally small category , object , presheaf , and the morphisms and natural transformations in the statement.
For a covariant functor , evaluation at the identity is a bijection whose inverse sends to the transformation with component (Evaluation at the identity gives and proves that the natural-transformation collection is a set), and this bijection is natural in and in (The Yoneda bijection is natural in both and ).
The opposite category has the same objects and satisfies (Opposite category ).
A theorem derived from category axioms has a formal dual obtained by reversing morphisms and composition (Every theorem about categories has a formal dual obtained by reversing morphisms and composition).
A presheaf is a functor (Presheaves, covariantly and contravariantly representable functors, and representations).
Proof
Apply [L1] to , the object , and the covariant functor of [F2]; by [F1], its hom-functor is , and the inverse formula becomes .
Under the same translation, a morphism in is reversed in , so naturality in the object becomes the displayed equation with and ; naturality in is unchanged.
Steps 1.1 and 1.2 prove the bijection, its inverse formula, and both naturalities.
Local smallness does not make every natural-transformation collection a set, but the Yoneda construction proves sethood in the representable-source case
Local smallness says that each individual hom-collection is a set (Small, locally small, and large categories). It does not, by itself, turn an object-indexed family of components over a proper class of objects into set-coded data. For this reason Functor category forms as a category only when is small, and If is small and is locally small then is locally small; if both are small it is small obtains local smallness from a small source and a locally small target.
The representable-source case has additional structure. For an object and , the explicit formulas of Evaluation at the identity gives and proves that the natural-transformation collection is a set parametrize every natural transformation by the set . Thus this particular natural-transformation collection is a set even when is large and locally small. No global proper-class counterexample is asserted here.
The Yoneda assignment and the small-source Yoneda functor, traditionally called the Yoneda embedding
Definition
Let be locally small. The Yoneda assignment sends an object to the representable presheaf
and sends a morphism to the natural transformation whose component at is postcomposition by :
The functoriality and naturality of these formulas are instances of the hom-bifunctor The hom-assignment is a bifunctor.
When is small, Functor category and If is small and is locally small then is locally small; if both are small it is small form the presheaf category and the assignment is the functor
traditionally called the Yoneda embedding. For an arbitrary large locally small , the same formulas are called the Yoneda assignment; no large-source functor category is silently formed. Full faithfulness is proved in The Yoneda functor is fully faithful, and it is a full embedding when its object map is injective. Under the terminology of Embedding and full embedding of categories, a fully faithful functor is a full embedding only if its object map is also injective.
The Yoneda functor is fully faithful, and it is a full embedding when its object map is injective
Statement
Let be locally small. For all objects , the Yoneda assignment induces a bijection
where . Thus, when is small and is the functor of The Yoneda assignment and the small-source Yoneda functor, traditionally called the Yoneda embedding, it is fully faithful. If its object map is also injective, it is a full embedding in the library's stronger sense.
Facts & Assumptions
Given: A locally small category and objects .
Contravariant Yoneda gives by evaluation, with inverse (For a presheaf , naturally in and ).
The Yoneda assignment sends to postcomposition (The Yoneda assignment and the small-source Yoneda functor, traditionally called the Yoneda embedding).
A functor is fully faithful exactly when each induced hom-map is bijective (Faithful, full, fully faithful, essentially surjective, and split essentially surjective functors).
An embedding is faithful and injective on objects, and a full embedding is additionally full (Embedding and full embedding of categories).
Proof
Apply [L1] to . Evaluation sends to , and its inverse sends to , which is exactly by [F1].
Step 1.1 makes every Yoneda hom-map bijective, so [F2] gives full faithfulness whenever the small-source Yoneda functor is formed; the same bijections hold objectwise for every locally small .
If the object map of is injective, step 2.1 gives both fullness and faithfulness, so [F3] makes a full embedding.
Objects and are isomorphic exactly when and are naturally isomorphic
Statement
Let and be objects of a locally small category . Then
by a natural isomorphism of presheaves.
Facts & Assumptions
Given: Objects of a locally small category .
The Yoneda assignment induces a bijection for every (The Yoneda functor is fully faithful, and it is a full embedding when its object map is injective).
A natural isomorphism has a natural transformation with and (Natural isomorphism).
An isomorphism has a morphism with and (Isomorphism, groupoid, and connected category).
Proof
If is an isomorphism, its Yoneda image has inverse , since the postcomposition formulas give and ; hence the representable presheaves are naturally isomorphic.
Conversely, let be a natural isomorphism with inverse . By the surjectivity in [L1], there are and with and .
The inverse equations of [F1] give and ; injectivity in [L1] therefore gives and , so is an isomorphism.
Step 1.1 proves the forward implication and steps 1.2--2.1 prove the reverse implication.
Universal elements of covariant functors and presheaves
Definition
Let be locally small. For a functor , a universal element is a pair with and such that the maps
are the components of a natural isomorphism .
For a presheaf , a universal element is a pair with such that
are the components of a natural isomorphism . Thus a universal element is a representation in the sense of Presheaves, covariantly and contravariantly representable functors, and representations, with its natural isomorphism specified by a distinguished element of the representing object's value.
A representation is equivalently a universal element with a unique factorisation property
Statement
Let be locally small.
- A pair with is universal for a functor if and only if, for every object and every , there is a unique morphism such that .
- A pair with is universal for a presheaf if and only if, for every object and every , there is a unique morphism such that .
Every representation determines its universal element by , and the universal element recovers by the formulas in the statement. These correspondences are the Yoneda correspondences and are natural in the representing object and the set-valued functor.
Facts & Assumptions
Given: A locally small category , an object , and either a functor with or a presheaf with .
Evaluation at is a bijection whose inverse sends to (Evaluation at the identity gives and proves that the natural-transformation collection is a set).
This covariant evaluation bijection is natural in both the representing object and the target functor (The Yoneda bijection is natural in both and ).
Dually, evaluation gives naturally in and , with inverse (For a presheaf , naturally in and ).
A universal element is an element whose Yoneda-associated natural transformation is a natural isomorphism (Universal elements of covariant functors and presheaves).
Proof
By [L1], any natural transformation satisfies ; thus a representation determines and is exactly the family .
By [L3], the same argument for a presheaf identifies its representing transformation with ; componentwise bijectivity is exactly the stated existence and uniqueness of .
The family is a natural isomorphism if and only if each function is bijective, which is equivalent to the existence and uniqueness of for every .
The naturality assertions for the two correspondences are [L2] and [L3], so steps 1.1--2.1 prove both equivalences and the final assertion.
Representing objects are unique up to a unique isomorphism compatible with their universal elements
Statement
Let have universal elements and . There is a unique isomorphism satisfying .
If instead has universal elements and , there is a unique isomorphism satisfying .
Hence a representing object is unique up to the unique isomorphism compatible with the chosen universal elements, in either variance.
Facts & Assumptions
Given: A locally small category and the two universal elements for the same covariant functor or presheaf appearing in the statement.
For a covariant universal element , every has a unique expression with ; for a presheaf universal element, every has a unique expression with (A representation is equivalently a universal element with a unique factorisation property).
A morphism is an isomorphism when it admits a two-sided inverse (Isomorphism, groupoid, and connected category).
Proof
In the covariant case, apply [L1] for to and for to , obtaining unique morphisms and with and .
In the presheaf case, [L1] applied to and gives unique and with and .
Functoriality gives ; uniqueness in [L1] for gives . Similarly, .
By [F1], is an isomorphism. Any compatible morphism satisfies and therefore equals by [L1], proving uniqueness even among all compatible morphisms.
Contravariant functoriality and the same uniqueness argument give and ; [F1] and uniqueness in [L1] then make the unique compatible isomorphism.
The category of elements of a covariant functor or a presheaf
Definition
Let be a functor. Its category of elements has:
- objects with and ;
- a morphism given by a morphism in satisfying .
The identity of is , and composition is composition in . The functor laws of Covariant functor, identity functor, composite functor, and contravariant functor make the identity and composite equations hold, so these data satisfy Category, object, morphism, domain, codomain, identity, composition, and hom-collection.
For a presheaf , its category of elements again has objects with , while a morphism is a morphism in satisfying
This reversed equation comes from the opposite category Opposite category ; contravariant functoriality again supplies identities and composition. A universal element in the sense of Universal elements of covariant functors and presheaves is itself an object of the appropriate category of elements.
Universal elements are initial in a covariant category of elements and terminal in a presheaf category of elements
Statement
Let be locally small.
- For , a pair is a universal element if and only if is initial in .
- For , a pair is a universal element if and only if is terminal in .
Facts & Assumptions
Given: A locally small category and either a functor or a presheaf with the indicated pair .
Covariant universality says that for every there is a unique with ; presheaf universality says there is a unique with (A representation is equivalently a universal element with a unique factorisation property).
In , a morphism is an satisfying ; in , a morphism is an satisfying (The category of elements of a covariant functor or a presheaf).
An object is initial when it has exactly one morphism to every object and terminal when it has exactly one morphism from every object (Initial object, terminal object, and zero object).
Proof
By [F1], the morphisms in are exactly the morphisms counted by the covariant condition in [L1].
By [F1], the morphisms in are exactly the morphisms counted by the presheaf condition in [L1].
Thus that condition holds for all if and only if has exactly one morphism to each object of , which by [F2] is initiality.
Thus that condition holds for all if and only if has exactly one morphism from each object of , which by [F2] is terminality.
Universal arrows from an object to a functor and from a functor to an object
Definition
Let be a functor as in Covariant functor, identity functor, composite functor, and contravariant functor and let be an object of .
A universal arrow from to is a pair with and such that, for every and , there is a unique satisfying
When is locally small, the relevant hom-assignment is a functor by The assignments and are functors to , and equivalently is a universal element of the covariant functor in the sense of Universal elements of covariant functors and presheaves.
A universal arrow from to is a pair with such that, for every and , there is a unique satisfying
When is locally small, equivalently is a universal element of the presheaf . The associated comma categories and are those of Comma category, slice category, and coslice category.
Universal arrows to a functor are initial in comma categories, and universal arrows from a functor are terminal
Statement
For a functor and an object :
- a pair is a universal arrow from to if and only if it is initial as an object of ;
- a pair is a universal arrow from to if and only if it is terminal as an object of .
Facts & Assumptions
Given: The functor , object , and one of the pairs in the statement.
A universal arrow from to gives a unique with for every ; a universal arrow from to gives a unique with for every (Universal arrows from an object to a functor and from a functor to an object).
In , a morphism is an with ; in , a morphism is an with (Comma category, slice category, and coslice category).
Initiality means that there is exactly one morphism from the object to every object, while terminality means that there is exactly one morphism from every object to it (Initial object, terminal object, and zero object).
Proof
By [F2], the morphisms in are exactly the morphisms satisfying the factorisation equation in the first part of [F1].
By [F2], the morphisms in are exactly the morphisms satisfying the second factorisation equation in [F1].
Existence and uniqueness of such an for every is therefore equivalent, by [F3], to being initial.
Existence and uniqueness of such an for every is therefore equivalent, by [F3], to being terminal.
5 · Examples, counterexamples and false statements
None yet.
Sources
Standard references
Recommended treatments; not extraction sources.
- Emily Riehl, Category Theory in Context, Chapter 2, Section 2.1
- Tom Leinster, Basic Category Theory, Chapter 4, Section 4.1
- Tom Leinster, Basic Category Theory, Definitions 4.1.1 and 4.1.16
- Tom Leinster, Basic Category Theory, Definition 4.1.22 and Remarks 4.1.23
- Tom Leinster, Basic Category Theory, Definition 4.1.25
- Emily Riehl, Category Theory in Context, Definition 2.1.4
- Tom Leinster, Basic Category Theory, Definitions 4.1.3 and 4.1.17
- Emily Riehl, Category Theory in Context, Definition 2.1.3
- Emily Riehl, Category Theory in Context, Chapters 1 and 2
- Tom Leinster, Basic Category Theory, Chapter 4
- Emily Riehl, Category Theory in Context, Theorem 2.2.4
- Tom Leinster, Basic Category Theory, Theorem 4.2.1
- Emily Riehl, Category Theory in Context, Exercise 2.2.i
- Emily Riehl, Category Theory in Context, Remark 2.2.7
- Emily Riehl, Category Theory in Context, Corollary 2.2.8
- Tom Leinster, Basic Category Theory, Definition 4.1.21
- Tom Leinster, Basic Category Theory, Corollary 4.3.7
- Emily Riehl, Category Theory in Context, Proposition 2.3.1
- Tom Leinster, Basic Category Theory, Corollary 4.3.10
- Emily Riehl, Category Theory in Context, Definition 2.3.3
- Tom Leinster, Basic Category Theory, Corollaries 4.3.2 and 4.3.3
- Emily Riehl, Category Theory in Context, Corollary 2.3.2
- Justin Campbell, Harvard Math 55b tutorial notes, Corollary 1.2.1
- Emily Riehl, Category Theory in Context, Definitions 2.4.1 and 2.4.2
- Tom Leinster, Basic Category Theory, Section 6.2
- Emily Riehl, Category Theory in Context, Proposition 2.4.8
- Emily Riehl, Category Theory in Context, Sections 4.2 and 4.7
- Emily Riehl, Category Theory in Context, Proposition 2.4.8 and Theorem 4.2.7(v)--(vi)