Theorem 3.95. Let be a category presented by a finite graph with equations, , and . Then
with projections is a Limit of . “As far as limits are concerned, the equations in don’t matter.”
Sources: 7 Sketches §3.5.3 (Theorem 3.95, Examples 3.96, 3.99, Exercises 3.97, 3.98); DaoFP §9.5 (limits in are cones with apex ); Kittenlab Lecture 13–14; CTfS §2.5 (Definition 2.5.1.1, Lemma 2.5.1.14, Proposition 2.5.1.17, Exercises 2.5.1.2–2.5.1.6, 2.5.3.5)
Instances
- Empty graph: , one empty tuple : the limit is , the Terminal Object (Example 3.96).
- Two vertices, no arrows: pairs , the Product (7S Exercise 3.97).
- One vertex: itself (7S Exercise 3.98).
- Cospan : triples with , i.e. pairs with : the Pullback (Example 3.99) — pairs whose colours agree.
- CTfS’s fiber product keeps the middle coordinate: — the same set up to isomorphism. Edge cases: if the pullback is empty; if is a point it is the product (CTfS Exercise 2.5.1.5). With Aristotelian space and time and = “the center of mass of MIT at its founding”, pulling the projections of back along the point gives the world-line through that place (all times) and the whole of space at that instant (CTfS Exercise 2.5.1.6).
- Parallel pair : , the Equalizer — “solutions of a system of equations” (DaoFP).
- on the email schema: tuples (email, address) with address, i.e. self-sent emails: (Data Migration Functor).
The formula “selects tuples satisfying equations or constraints — this is what allows us to express queries in terms of limits”. It is the special case of DaoFP’s description: an element of is a cone with apex , i.e. a compatible choice of one element per vertex. For colimits in the dual formula is a disjoint union modulo the Equivalence Relation generated by (7 Sketches §6.2.4).
Docs: FinSets · Limits & colimits · Free diagrams — Kittenlab Lecture 13
# the tuple formula for a finite diagram in FinSet given by sets and generating functions
function set_limit(sets::Vector{Int}, arrows::Vector{Tuple{Int,Int,Vector{Int}}}) # (i, j, D(a))
tuples = Iterators.product((1:n for n in sets)...)
[t for t in tuples if all(Da[t[i]] == t[j] for (i, j, Da) in arrows)]
end
set_limit([4, 3, 2], [(1, 2, [1, 1, 2, 3]), (3, 2, [1, 3])]) # pullback: [(1,1,1), (2,1,1), (4,3,2)]Catlab version (run in a fresh Julia session — Catlab exports its own compose, id, FinFunction, …):
using Catlab
limit(Cospan(FinFunction([1, 1, 2, 3], 3), FinFunction([1, 3], 3))) |> apex # FinSet(3)#check CategoryTheory.Limits.Types.limitCone -- limit in Type: { u : ∀ j, F.obj j // ∀ f, F.map f (u j) = u k }
#check CategoryTheory.Limits.Types.limitEquivSections-- limit of a finite diagram in Hask on finite carriers: compatible tuples
data FinDiagram a = FinDiagram { carriers :: [[a]], arrows :: [(Int, Int, a -> a)] }
limitTuples :: Eq a => FinDiagram a -> [[a]]
limitTuples (FinDiagram cs as) = [ t | t <- sequence cs, and [ f (t !! i) == t !! j | (i, j, f) <- as ] ]