Coend是functor P:Cop×C→D 上的一種construction,回憶一下Profunctor我們知道這種functor對左邊逆變、對右邊共變,因此對任意 f:x→y 有
如果考慮對所有co-wedge P(−,−)→d 有一個universal construction,換句話說以下交換圖成立
∫x∈CP(x,x) 這個universal construction被稱為coend。給定functor F 我們能定義一個profunctor P
P(x,y):=F(y)P(f,g):=F(g)
現在假設profunctor P 有universal construction,然後我們把 P 按照定義機械替換成 F
就可以看到如果 F 有colimit這樣的universal construction,必定與 ∫x∈CF(x) 重疊,所以colimit可以用coend表示
∫x∈CF(x)=limF