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.
Ends Coends and Weighted Limits — Examples
1 · Prerequisites
- Adjunctions Units and Counits
- Binary Operations, Monoids, Groups and Subgroups
- Cardinal Arithmetic, Cofinality and the Alephs
- Categories, Functors and Natural Transformations
- Construction of the Natural Numbers
- Construction of the Real Numbers via Cauchy Sequences
- Construction of the Real Numbers via Dedekind Cuts
- Cosets, Index and Lagrange's Theorem
- Countability and Uncountability
- Ends Coends and Weighted Limits
- Finite Counting, Factorials and Binomial Coefficients
- Foundations of the Real Numbers for Analysis
- Free Modules, Exact Sequences, Projective and Injective Modules
- Group Homomorphisms and the Isomorphism Theorems
- Limits and Colimits
- Modules, Submodules, Quotient Modules and the Isomorphism Theorems
- Normal Subgroups and Quotient Groups
- Order, Zorn's Lemma, and the Axiom of Choice
- Ordinal Arithmetic and the First Uncountable Ordinal
- Ordinals, Cardinals, and Transfinite Recursion
- Relations, Functions, and Quotients
- Rings, Subrings, Integral Domains and Fields
- Set Theory Beyond Choice: Recorded, Not Proved Here
- Suprema and Infima
- The ZFC Axioms and the Basic Set Constructions
- Universal Properties, Representables and the Yoneda Lemma
2 · Summary
3 · Logical flowchart
4 · Definitions, theorems and proofs
None yet.
5 · Examples, counterexamples and false statements
The end formula checked by hand against natural transformations on the walking arrow
Example
Let be the walking arrow, with objects and and one non-identity morphism , and let be
The end is computed here twice, once from the equalizer description and once by listing the natural transformations , and the two answers are matched element for element.
Facts & Assumptions
Given: The walking arrow and the two functors displayed above.
Sets as objects and functions as morphisms form a large locally small category (Sets and functions form the large locally small category ).
An end of is a terminal object of the category of wedges over and a coend an initial object of the category of cowedges under ; in short, an end is a terminal wedge and a coend an initial cowedge (The end and the coend of a functor ).
A natural transformation is a family such that every satisfies the naturality equation (Natural transformation and its components).
For a small index category and a target where the two displayed products exist, an end is the equalizer of two products, the first indexed by the objects and the second by the morphisms, the two parallel maps being built from and (An end is the equalizer of two products, and a coend the coequalizer of two coproducts).
For a small source category and a locally small target, the set of natural transformations is an end of the hom-bifunctor of the values, the terminal wedge being evaluation (For a small source category, the set of natural transformations is an end of the hom-bifunctor of the values).
Verification
The integrand is , with values of size four, of size two, of size four and of size two. The object-indexed product is , with eight elements; the morphism-indexed product has one factor for each of , and , namely , and .
By [L2] the two parallel maps send a pair to the families whose -component is and respectively. At and at both components are and , so those factors impose nothing; at the condition is . Since sends both and to , the left side is the constant function at , and the right side is the constant function at ; so the condition holds exactly when . The equalizer is therefore the subset of the eight-element product on which , which leaves free: its elements are the four pairs with one of ; ; ; and .
Listing the natural transformations independently gives the same four. By [F2] a natural transformation is a pair and with , which as in step 2.1 says exactly ; there are four choices of and each extends in exactly one way.
The two lists agree pair for pair, and by [L1] they must: the end of is with the evaluation wedge, and by [L2] it is the equalizer computed in step 2.1. So the end has four elements on this diagram, and the identification is the identity on the four pairs.
Remarks
The identity morphisms of contribute factors to the morphism-indexed product and impose nothing, which is visible here rather than argued in general: their equalising condition is .
Had been injective rather than constant, the condition of step 2.1 would have forced to be constant as well, and the end would have had fewer elements. Nothing in the equalizer description privileges one of the two parallel maps, and both were written out.
Evaluation of functions is dinatural in its argument set
Example
Fix a set and let be
contravariant in by precomposition and covariant in (The set of all functions , The Cartesian product , Sets and functions form the large locally small category ). The evaluation family
is a dinatural transformation from to the constant functor at (Dinatural transformation between functors on ), that is, a cowedge under with vertex (Wedges and cowedges, and the categories they form).
Facts & Assumptions
Given: A set , the functor displayed above, and the family of evaluation functions.
The functions form the set , and Thus holds if and only if . (The set of all functions ).
The elements of are exactly the ordered pairs: Thus holds if and only if for some and some . (The Cartesian product ).
Sets as objects and functions as morphisms form a large locally small category (Sets and functions form the large locally small category ).
For every set the product functor is left adjoint to , with naturally in and ; the bijection sends to (Currying gives the adjunction in ).
A dinatural transformation is a family such that every satisfies , the equation displayed by the hexagon (Dinatural transformation between functors on ).
A cowedge from to is a dinatural transformation from to a constant functor: a family with for every (Wedges and cowedges, and the categories they form).
Verification
The assignment is a functor: for the contravariant slot acts by from to and the covariant slot by itself, and both actions preserve identities and composites because composition of functions does. The family is the transpose of the identity of under the bijection of [L1] with and , so it is the counit of that adjunction at .
Fix and chase an arbitrary element of through both legs of the hexagon. Since the target is the constant functor at , both outer actions on the target side are identities, and the two legs are and . The first sends to and the second sends it to . The two values agree for every , so the two legs are equal.
Since the target is the constant functor at , the equation verified in step 2.1 is exactly the cowedge equation of [F2], so the evaluation family is a cowedge under with vertex , and in particular a dinatural transformation.
Remarks
The displayed evaluation family supplies only diagonal components. There is no canonical evaluation map for unrelated , and no natural family of such maps extending evaluation in general; special cases such as singleton may admit constant maps. What the family always has is one component per object on the diagonal, tied together by the equation checked above, which is precisely the shape dinaturality was defined to capture.
The chase uses nothing about . If is empty then is empty unless is, and the two legs are then functions with empty domain, which are equal for that reason; the computation above covers that case without a separate argument, since it verifies the two legs agree at every element of the domain.
The twisted arrow category of the walking arrow is a cospan
Example
Let be the walking arrow, with objects and and one non-identity morphism . Then (The twisted arrow category and its projection to ) has the three objects , and , and exactly two non-identity morphisms, one and one ; so it is a cospan.
Consequently, for any functor , the end of is the pullback (Pullbacks and pushouts as limits and colimits of cospans and spans) of
whenever that pullback exists.
Facts & Assumptions
Given: The walking arrow and an arbitrary functor on .
The objects of are the morphisms of , and for and a morphism is a pair with , where and ; the projection sends to and to (The twisted arrow category and its projection to ).
For a cospan , a pullback is its limit, consisting of an object with two projections whose composites with and agree and through which every compatible pair factors by a unique with and . (Pullbacks and pushouts as limits and colimits of cospans and spans).
A limit of a diagram is a terminal cone (Limits and colimits as terminal cones and initial cocones, with existence and uniqueness in their universal properties).
The wedges over are exactly the cones over , so an end is the limit over the twisted arrow category (An end is a limit over the twisted arrow category, and a coend is a colimit over its opposite).
Verification
The objects of are the three morphisms , and of , by [F1].
The morphisms are enumerated by testing, for each ordered pair of objects, whether the required factorisation exists. A morphism needs and with , and the pair works and is the only one available. A morphism needs and with , and the pair works and is the only one available. A morphism out of to either identity needs a component in , which is empty, so there is none; a morphism needs a component in as well, and a morphism needs . So apart from identities there are exactly the two morphisms named, both into , and is a cospan.
The composite takes the value at , the value at and the value at , and it sends the morphism to and the morphism to . By [L1] and [F3] the end of is the limit of that diagram, which by [F2] is exactly the pullback of the displayed cospan.
Remarks
That no morphism runs out of is the whole reason the shape is a cospan rather than something larger: a morphism out of would need to move its codomain backwards, and the walking arrow has no morphism .
Read on the hom-bifunctor of the walking arrow, the pullback of step 3.1 is a pullback of one-element sets and has one element; that is consistent with the end of the hom-bifunctor being the set of natural endomorphisms of the identity functor, of which the walking arrow has only the identity.
The tensor product of monoid sets as a coend
Example
Let be a monoid (Semigroup and monoid) and let be the one-object category it determines (A monoid is a one-object category, and a group is a one-object category in which every morphism is invertible), whose only object is written and whose morphisms are the elements of .
A presheaf is a set with a right action , and a covariant functor is a set with a left action . Then the functor tensor product (The tensor product of a presheaf and a covariant set-valued functor) is
where is the least equivalence relation on the Cartesian product (The Cartesian product ) containing for all , and .
Facts & Assumptions
Given: A monoid , a right -set and a left -set , presented as a presheaf and a covariant functor on the one-object category of .
A monoid is a set with an associative operation and a two-sided identity (Semigroup and monoid).
Every monoid is a one-object category, and under this identification the monoid is a group exactly when every morphism is invertible (A monoid is a one-object category, and a group is a one-object category in which every morphism is invertible).
The elements of are exactly the ordered pairs: Thus holds if and only if for some and some . (The Cartesian product ).
The tensor product of a presheaf and a covariant set-valued functor is the coend of the product of a presheaf and a covariant set-valued functor, the integrand being (The tensor product of a presheaf and a covariant set-valued functor).
An end of is a terminal object of the category of wedges over and a coend an initial object of the category of cowedges under ; in short, an end is a terminal wedge and a coend an initial cowedge (The end and the coend of a functor ).
For small and a set-valued integrand the coend is the disjoint union of the diagonal values modulo the dinaturality relation, generated by the pairs and for and (A set-valued coend is the disjoint union of the diagonal values modulo the dinaturality relation).
Verification
The category has one object and its morphism collection is the set , so it is small; by [F1] the integrand is , and every value of , on or off the diagonal, is that same set. The disjoint union over the objects therefore has one summand and is itself.
The generating pairs of [L1] are indexed by a morphism of , that is by an element of , and by an element of the off-diagonal value, that is by a pair . The first leg acts by in the contravariant slot and by the identity in the covariant one, giving ; the second leg acts by the identity in the contravariant slot and by in the covariant one, giving . So the generating pairs are exactly against .
By [L1] and [F3] the coend is the quotient of the single summand by the least equivalence relation containing those pairs, which is the displayed description of . At the identity of the two legs agree, so the identity contributes only reflexive pairs.
Remarks
The relation is exactly the one used to define the tensor product of a right and a left module over a ring, with the additive structure removed: an element of may be moved across the pair from the right-hand factor to the left-hand one. What the coend adds is that this relation is not imposed by hand but is forced by the cowedge equation, whose two legs are the two actions.
The one-object case is where the coproduct of the general description collapses to a single summand, which is why the answer is a quotient of rather than of a disjoint union. For a category with more objects the same computation gives one summand per object and identifications running along every morphism.
The coend of the hom-bifunctor
Example
Let be a small category (Category, object, morphism, domain, codomain, identity, composition, and hom-collection, Small, locally small, and large categories) and let be its hom-bifunctor (The covariant and contravariant hom-assignments and the hom-bifunctor of a locally small category, The hom-assignment is a bifunctor). Then
where is the least equivalence relation (Equivalence relation, equivalence class, and the quotient set ) containing for every and every (The end and the coend of a functor ).
Two evaluations: on the walking arrow the coend has two elements, and on the one-object category of a monoid (A monoid is a one-object category, and a group is a one-object category in which every morphism is invertible) it is the quotient of by the least equivalence relation containing , which when is a group is the set of conjugacy classes.
Facts & Assumptions
Given: A small category and its hom-bifunctor as the integrand.
A category is small when both and are sets. (Small, locally small, and large categories).
Composition in a category is associative and unital: (Category, object, morphism, domain, codomain, identity, composition, and hom-collection).
The hom-assignment sends to , and a morphism of the product category consisting of and acts by (The covariant and contravariant hom-assignments and the hom-bifunctor of a locally small category).
For every locally small category , the hom-assignment is a functor (The hom-assignment is a bifunctor).
A binary relation on a set is an equivalence relation when it is reflexive, symmetric and transitive; the quotient set is the set of its classes (Equivalence relation, equivalence class, and the quotient set ).
An end of is a terminal object of the category of wedges over and a coend an initial object of the category of cowedges under ; in short, an end is a terminal wedge and a coend an initial cowedge (The end and the coend of a functor ).
Every monoid is a one-object category, and under this identification the monoid is a group exactly when every morphism is invertible (A monoid is a one-object category, and a group is a one-object category in which every morphism is invertible).
For small and a set-valued integrand the coend is the disjoint union of the diagonal values modulo the dinaturality relation, generated by the pairs and for and (A set-valued coend is the disjoint union of the diagonal values modulo the dinaturality relation).
Verification
Take , a functor into by [L2], with and off-diagonal value . By [F2] the two legs act on as and , using [F4]. So the generating pairs of [L1] are exactly the displayed ones, and the description of the coend follows from [L1] and [F3].
On the walking arrow, with objects and and one non-identity morphism , the disjoint union is . A generating pair needs a morphism together with an element of ; the only non-identity morphism is and is empty, so it contributes none, while an identity gives and hence only reflexive pairs. The relation is therefore equality and the coend has two elements.
On the one-object category of a monoid , the disjoint union has one summand and is itself, every value of the integrand being ; and by step 1.1 the generating pairs are against for . So the coend is modulo the least equivalence relation containing . Nothing further is claimed for a general monoid.
If is a group, that quotient is the set of conjugacy classes. Each generating pair is a conjugation, since , and conjugacy is an equivalence relation, so the least equivalence relation containing the generators is contained in conjugacy; conversely, for and in the choice and gives and , so every conjugate pair is a generating pair and conjugacy is contained in the relation. The two therefore agree. Without inverses this second half is unavailable, which is why the general case of step 2.2 is stated only as the quotient by that relation.
Remarks
On the walking arrow the coend is larger than the end, which is a one-element set: nothing is identified, because the identification would have to be indexed by an element of an empty hom-set. This is the same emptiness that makes the convention for which category computes a coend worth stating carefully.
The monoid clause is where the temptation to overstate lies. "Conjugacy class" is the right name only when every element has an inverse. For a general monoid the quotient is still defined by the same generators, but the monoid supplies no conjugation action whose orbits are those classes; calling them conjugacy classes would assert more than the computation gives. Abstractly, as for every equivalence relation, some subgroup of a symmetric group can be chosen to have the classes as its orbits.
Fubini checked by hand on a product of two walking arrows
Example
Let and both be the walking arrow, with objects and and one non-identity morphism (Product category and its projection functors). Let be given by , and the only function between them (Sets and functions form the large locally small category ), and let
an integrand on that ignores both of its contravariant variables. All three objects named by Fubini: an end over a product index category and the two iterated ends exist together and agree are computed here by hand and each has four elements:
Facts & Assumptions
Given: The two walking arrows, the functor and the integrand displayed above.
Sets as objects and functions as morphisms form a large locally small category (Sets and functions form the large locally small category ).
The product category has objects the pairs, componentwise identities, and componentwise composition (Product category and its projection functors).
A limit of a diagram is a terminal cone: explicitly, for every cone there exists a unique morphism such that for every (Limits and colimits as terminal cones and initial cocones, with existence and uniqueness in their universal properties).
An end of is a terminal object of the category of wedges over and a coend an initial object of the category of cowedges under ; in short, an end is a terminal wedge and a coend an initial cowedge (The end and the coend of a functor ).
A parametrised end is a choice, for every object of the parameter category, of an end taken in the two dinatural variables with the remaining variables held fixed (Ends and coends with parameters).
For and , the end of a functor made mute in its contravariant variable is the ordinary limit of that functor (The end of a functor made mute in its contravariant variable is the ordinary limit of that functor).
Under a chosen family of inner ends in each order, an end over a product index category and the two iterated ends exist together and agree, any two being joined by the unique isomorphism commuting with every component (Fubini: an end over a product index category and the two iterated ends exist together and agree).
Verification
Since ignores its two contravariant variables, [L2] applies with and : the end over the product index category is the ordinary limit of . A limit of a diagram on the walking arrow is the value at , since a cone over satisfies and is therefore determined by .
The limit of is , with four elements. Writing a cone with apex as , the cone condition at gives and , the condition at gives and , and the condition at then holds automatically, both sides being . So a cone is exactly a pair of functions , and by [F2] the terminal one has apex .
The iterated ends give the same object. Holding the two -variables fixed at leaves the integrand , again mute in its contravariant variable, so by [L2] the inner end is the limit over the walking arrow of , which by step 1.1 is the value at , namely . That chosen family is itself mute in , so the outer end is the limit of , which is . Exchanging the roles of and runs the same two computations in the other order and gives again, since the integrand is symmetric in the two pairs of variables.
The three objects therefore agree elementwise, and the identification is the identity of : an element has wedge component at equal to , where is the identity and , and the same pair names the corresponding element of each iterated end. This is the conclusion [L1] predicts, computed here rather than quoted.
Remarks
The integrand is deliberately mute in its contravariant variables, which is what makes every end here an ordinary limit and lets all three objects be listed by hand. The example therefore exhibits the three objects and the isomorphisms between them; it does not exercise the part of the Fubini argument that handles a genuinely two-sided integrand.
The condition at the diagonal morphism is checked rather than skipped. It is implied by the other two, and seeing that it is implied is the point: the separate-variable conditions really do generate the joint one on this index category.
A weighted limit computing a kernel pair
Example
Let be the walking arrow, with objects and and one non-identity morphism , let be any diagram (Sets and functions form the large locally small category ) and let be the weight with , and the only function between them.
Then the weighted limit (Set-weighted limits and colimits) is the kernel pair of , that is the pullback of along itself (Pullbacks and pushouts as limits and colimits of cospans and spans):
Facts & Assumptions
Given: The walking arrow , a diagram and the two-element weight displayed above.
Sets as objects and functions as morphisms form a large locally small category (Sets and functions form the large locally small category ).
A natural transformation is a family such that every satisfies the naturality equation (Natural transformation and its components).
The covariant hom-assignment sends to (The covariant and contravariant hom-assignments and the hom-bifunctor of a locally small category).
A weighted limit is an object that represents the functor sending an object to the set of natural transformations from the weight (Set-weighted limits and colimits).
The category of elements has objects with and ; and a morphism given by a morphism in satisfying (The category of elements of a covariant functor or a presheaf).
For a cospan , a pullback is its limit, an object with projections satisfying through which every compatible pair factors uniquely (Pullbacks and pushouts as limits and colimits of cospans and spans).
For a small and set-valued and , a weighted limit of a set-valued diagram is the set of natural transformations from the weight (A weighted limit of a set-valued diagram is the set of natural transformations from the weight).
A weighted limit is an ordinary limit over the category of elements of the weight, and a weighted colimit an ordinary colimit over it (A weighted limit is an ordinary limit over the category of elements of the weight, and a weighted colimit an ordinary colimit over it).
Verification
By [L1] the weighted limit is the set of natural transformations . By [F5] such a transformation is a pair of functions and whose naturality equation at reads as functions ; the right-hand side is constant at , so the equation says .
So a natural transformation is exactly a pair of elements of with , the remaining datum being determined as their common image. That set is the displayed pullback of along itself, and by [F2] it carries the two projections and the universal property of a pullback.
The same answer comes from the category of elements. By [F6] the objects of are , and , and its non-identity morphisms are the two arising from , one and one , since sends both and to ; so is a cospan. By [L2] the weighted limit is the limit of composed with the projection, which is the limit of , the pullback again.
Remarks
The weight duplicates the object of the index category, one copy for each of its two elements, and it is that duplication that turns the ordinary limit of , which is , into a pullback of along itself. The number of copies is exactly the number of elements of the weight at that object.
Nothing about is used beyond its being a diagram of sets on the walking arrow. In particular the same weight computes the kernel pair of any function, and it computes the ordinary limit only when is injective, in which case the pullback is the diagonal.
Powers and copowers of a set by a set
Example
Let and be sets. In the power of by is the function set , and the copower of by is the Cartesian product :
The defining bijections can be written down directly, and the finite cases show what happens at the empty and singleton weights.
Facts & Assumptions
Given: Sets and , and an arbitrary set .
The power of by is the weighted limit of the one-object diagram at the constant weight , and the copower is the corresponding weighted colimit (The power and the copower of an object by a set).
A power by a set is the product of that many copies and a copower is the coproduct (A power by a set is the product of that many copies and a copower is the coproduct).
Sets as objects and functions as morphisms form a large locally small category (Sets and functions form the large locally small category ).
The function set consists exactly of the functions (The set of all functions ).
The Cartesian product consists exactly of the ordered pairs with and (The Cartesian product ).
A set is finite when it is in bijection with for some natural number (The cardinality of a finite set).
Verification
For every set , a function is exactly a family of functions indexed by , and hence exactly a function given by ; conversely, from one recovers by . These two constructions are inverse, so , which is the defining bijection of the power of by .
For every set , a function is exactly a function given by ; conversely, from one recovers by . These two constructions are inverse, so , which is the defining bijection of the copower of by .
Steps 1.1 and 1.2 identify the two objects explicitly, and [L1] says the same objects are, in general, the product and the coproduct of copies of . So in the power is the function set and the copower is the Cartesian product.
The finite checks agree with those formulas: if and then has elements while has ; if then both objects identify with ; if then is a one-element set while ; and if then for nonempty , but is again a one-element set.
Remarks
The empty exponent is the standard trap: a power by is terminal, not initial. The hom-set bijection fixes the direction, and it fixes it the same way as the published empty product and empty coproduct do.
This example is the set-level shadow of the general theorem. The A page proves that a power is a product of copies and a copower a coproduct of copies in an arbitrary locally small category; here the copies can be named explicitly as functions out of and ordered pairs with .
A module-valued coend computed as a quotient of a direct sum
Example
Let be the walking arrow with objects and and one non-identity morphism , and work in . Define a functor by
with multiplication by , multiplication by , and every map whose codomain is the zero homomorphism.
Then the coend is computed by one generator:
and under this identification the two cowedge components are multiplication by from and multiplication by from .
Facts & Assumptions
Given: The walking-arrow index category and the functor displayed above.
A module-valued coend is the direct sum of the diagonal values modulo the dinaturality submodule (A module-valued coend is the direct sum of the diagonal values modulo the dinaturality submodule).
A direct sum is formed with coordinate inclusions, and the empty direct sum is the zero module (The direct sum of an indexed family of modules).
For a submodule , the quotient module has cosets as elements and scalar multiplication (Quotient module with scalar multiplication on additive cosets).
For a fixed ring , left -modules and module homomorphisms form a large locally small category (Left modules over a fixed ring and module homomorphisms form the large locally small category ).
An end is a terminal wedge and a coend an initial cowedge (The end and the coend of a functor ).
Verification
The displayed data define a functor into -modules: the only non-identity square in with nontrivial source factors through the slot , and its codomain is , where every structure map is the zero homomorphism, so the square commutes automatically.
By [L1] the coend is the direct sum of the two diagonal values modulo the submodule generated by the dinaturality differences coming from the off-diagonal value . Here the direct sum is , and for the generator contributed by is ; the identity morphisms contribute only . So the coend is .
The homomorphism , , kills and so descends, by [F2], to a homomorphism . If , then , so divides and divides ; writing and shows . Hence is an isomorphism, and under it the two quotient cowedge components are multiplication by and by .
On the nontrivial test module , a cowedge is determined by the integers and , and the cowedge equation at is . So and for a unique , and multiplication by on is the unique homomorphism factoring the cowedge through the displayed quotient. This is exactly the initial-cowedge property on that test module.
Remarks
Richter's module example is general; this one chooses the maps and so that the quotient can be identified explicitly with . The point is not the particular integers but the shape of the computation: the coend is a quotient of a direct sum by the dinaturality submodule.
The off-diagonal zero slot keeps the functoriality check finite. It makes every square landing in trivial, so the whole example reduces to one off-diagonal module and one generator of the relation.
Sources
- F. Loregian, (Co)end Calculus (arXiv:1501.02503v7), Remark 1.1.3
- B. Richter, From Categories to Homotopy Theory (author's draft), Examples 4.4.3
- F. Loregian, (Co)end Calculus (arXiv:1501.02503v7), Exercise 1.7
- B. Richter, From Categories to Homotopy Theory (author's draft), Example 4.4.7
- E. Riehl, Categorical Homotopy Theory, Examples 7.1.2 and 7.1.16