A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Coends and Ends

Research Depth 87 in the knowledge graph ☐ I know this ☆ Set as goal
401prerequisites beneath it
See this on the map →
Limits and ColimitsNatural Transformations+2 more→
end coend dinatural transformation ninja Yoneda lemma weighted limit integral notation

Core Idea

An end of a functor T: Cop × C → D is an object ∫_c T(c,c) equipped with a universal dinatural transformation from ∫_c T(c,c) to T, satisfying a wedge condition that generalizes the notion of a limit. Dually, a coend ∫^c T(c,c) is a universal cowedge, generalizing colimits. Ends and coends provide compact formulas throughout category theory: the set of natural transformations Nat(F, G) can be written as the end ∫_c Hom(F(c), G(c)), and the tensor product of functors is a coend. The "ninja Yoneda lemma" states F(a) ≅ ∫^c Hom(a, c) × F(c), expressing any functor value as a coend against the Yoneda embedding. Ends and coends are essential for weighted limits, Kan extensions, and Day convolution.

How It's Best Learned

Compute the end ∫_c Hom(F(c), G(c)) for two specific functors F, G: C → Set on a small category C with two or three objects. Verify that the result is the set of natural transformations Nat(F, G) by checking the wedge condition against the naturality squares. Then compute a coend: ∫^c Hom(a, c) × F(c) for a representable presheaf and verify the ninja Yoneda result.

Common Misconceptions

Explainer

You already know that a natural transformation η: F → G assigns a morphism η_c: F(c) → G(c) to each object c, subject to a naturality square: for every f: c → d, the square η_d ∘ F(f) = G(f) ∘ η_c commutes. Natural transformations treat the functor argument as a *covariant* slot. Ends and coends generalize this to functors T: Cop × C → D with *two* arguments — one contravariant and one covariant. The challenge is that you need something like naturality in both slots simultaneously, but they are in opposite variance. A dinatural transformation resolves this: for each f: c → d, the hexagon T(d, c) → T(d, d) → T(d, e) and T(d, c) → T(c, c) → T(c, e) both commute (formally, the two routes through T(f, id) and T(id, f) are equal). A wedge is a dinatural family that factors through a common object.

An end ∫_c T(c, c) is the universal wedge: an object e in D with a dinatural family π_c: e → T(c, c) such that every other wedge factors uniquely through e. Think of it as the most general "simultaneously natural in both slots" extraction of T's diagonal. The canonical example is the set of natural transformations: Nat(F, G) = ∫_c Hom(F(c), G(c)). An element of this end is a family of functions α_c: F(c) → G(c) — one per object — that satisfies the naturality condition, exactly because the wedge condition for Hom(F(−), G(−)): Cop × C → Set is precisely naturality. The end packages the naturality requirement into a single universal object.

A coend ∫^c T(c, c) is the dual: a universal cowedge. Where an end is a limit-like construction (requiring something to be equal for all objects simultaneously), a coend is a colimit-like construction (identifying things across the diagonal). The ninja Yoneda lemma F(a) ≅ ∫^c Hom(a, c) × F(c) says that any functor value F(a) can be recovered as a coend against the representable functor Hom(a, −). Intuitively: you can reconstruct F(a) by taking one copy of F(c) for each morphism a → c and then identifying (via the coend relation) all the copies that are related by precomposition. It is a "change-of-basis" formula for functors, making the Yoneda embedding the canonical basis.

The integral notation — subscript for ends, superscript for coends — is designed to mirror the analogy with integration: an end is like a product over the variable c (you need consistency at every c), a coend is like a sum or integral over c (you identify contributions from different c). Day convolution, weighted limits, and the pointwise formula for Kan extensions all reduce to ends and coends once you know the machinery. When you see ∫_c or ∫^c in a categorical formula, the first step is always to identify the functor T: Cop × C → D, verify what the wedge condition requires, and check whether the universal property gives you the object you want.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Set Operations: Union, Intersection, and Complement → Cartesian Products and Relations → Partial Orders → Binary Relations → Equivalence Relations → Injective, Surjective, and Bijective Functions → Categories and Morphisms → Functors → Commutative Diagrams in Category Theory → Commutative Diagrams and Composition → Natural Transformations → 2-Categories and Weak Functors → Natural Isomorphisms Between Functors → Isomorphisms in Categories → Universal Properties → Initial and Terminal Objects → Products and Coproducts → Equalizers and Coequalizers → Limits and Colimits → Coends and Ends

Longest path: 88 steps · 401 total prerequisite topics

Prerequisites (4)

Leads To (0)

No topics depend on this one yet.