definition example theorem

The pullback of a Cospan is its Limit: an object with projections , such that , universal among such squares. The diagonal leg of the cone is superfluous (it equals ), so pullback squares are drawn without it, marked with a corner symbol .

X£AYYXAcycxygfX£AYYXAcycxygf

Sources: 7 Sketches Example 3.99, Remark 3.100, §7.2.1 (pullbacks in a topos), Definition 3.68 (the other “pullback”: ); Kittenlab Lecture 13 (“typed products” = products in a Slice Category), 14 (pullback of subsets); DaoFP §11.2 (“Pullbacks”, “Substitution”, “Base-change functor”); CTfS §2.5.1 (Definition 2.5.1.1, Examples 2.5.1.8–2.5.1.10, Lemma 2.5.1.14, Proposition 2.5.1.17, Exercises 2.5.1.2–2.5.1.19)

  • In : (Finite Limits in Set). Example 3.99: , , : the pullback selects pairs with the same colour. Pullbacks are how -queries “pair and select data” (database join).
  • Defining new concepts in ologs (CTfS §2.5.1.7). A fiber product defines a type from old ones, which “reduces the chance of misunderstandings between different groups of people”: “a customer that is wealthy and loyal” is the pullback of “a wealthy customer” and “a loyal customer” over “a customer” — and naming that box “a good customer” is a definition. “A person whose favourite colour is blue” and “a dog whose owner is a woman” are honest pullback labels; calling the pullback of “a space in our house” and “a piece of furniture” over “a width” a good fit is misleading, since equal width is not fit (CTfS Exercise 2.5.1.10). Two chained pullbacks define “a cellphone that has a bad battery” as “a cellphone that has a battery which remains charged for less than one hour” — justified by the Pasting Lemma for Pullbacks. Colouring a 5-element and a 3-element set red/blue/yellow, the pullback over the colours sits inside the grid as the cells whose row and column have the same colour (CTfS Exercise 2.5.1.3).
  • Typed products (Kittenlab): the product in of and is the pullback — pairs of elements of the same type. Pullback of a subset along is , the preimage; in the subobject picture this is literally a categorical pullback of along (Direct Image, Preimage, and Dual Image).
  • Base change / substitution (DaoFP §11.2): pulling back a family (a Dependent Type) along gives the family — substituting into the type; is the base-change functor, with adjoints .
  • Monos are pullback-stable; in a Topos every mono is a pullback of (Subobject Classifier). Pullback of a covering gives restriction. The pullback along a functor is, via the Category of Elements, a pullback in (Remark 3.100).
  • Dual: Pushout.

Docs: FinSets · Limits & colimits — Kittenlab Lecture 13

using Catlab
f = FinFunction([1, 2, 2, 3, 1, 3], 3)      # colours of 6 things
g = FinFunction([1, 1, 3, 2], 3)            # colours of 4 things
P = pullback(f, g)
apex(P)                                     # FinSet(8): pairs with equal colour
collect(zip(collect(legs(P)[1]), collect(legs(P)[2])))
# pullback of graphs / ACSets works the same way (pointwise)
#check CategoryTheory.Limits.pullback        -- pullback f g with pullback.fst, pullback.snd, pullback.lift
#check CategoryTheory.Limits.pullback.condition   -- fst ≫ f = snd ≫ g
#check CategoryTheory.Limits.Types.pullbackIsoPullback   -- in Type: { p : X × Y // f p.1 = g p.2 }
#check CategoryTheory.Over.pullback           -- base change C/c ⥤ C/c'
-- the pullback in Hask as a subtype of the product (on finite carriers)
pullbackSet :: Eq c => [a] -> [b] -> (a -> c) -> (b -> c) -> [(a, b)]
pullbackSet as bs f g = [ (a, b) | a <- as, b <- bs, f a == g b ]
 
-- base change of a "family" p :: e -> c along f :: c' -> c: pairs (c', e) with f c' = p e