A substitution 𝜎 :Ξ ⟶Γ of definition 141.1 is a list of terms, one for each declaration of Γ. Lists can be cut. If Γ =𝑥1 :𝐴1,…,𝑥𝑛 :𝐴𝑛 and Δ =𝑦1 :𝐵1,…,𝑦𝑚 :𝐵𝑚 declare disjoint variables, then writing ΓΔ for the concatenated context, a substitution Ξ ⟶ΓΔ is a list of 𝑛 +𝑚 terms, and cutting it after the 𝑛-th entry produces a substitution Ξ ⟶Γ and a substitution Ξ ⟶Δ. Joining two such lists inverts the cut. So hom𝐂𝐭𝐱(Ξ,ΓΔ)≅hom𝐂𝐭𝐱(Ξ,Γ)×hom𝐂𝐭𝐱(Ξ,Δ) as sets, for every Ξ.
Lemma 141.27 showed that a description of the arrows into an object determines that object up to a unique isomorphism. Equation 142.1 is a second such description, and it determines ΓΔ in the same way. The two descriptions are instances of one pattern, and the pattern has three further instances that this chapter needs: substituting a family along a map, forming a function space, and forming a dependent product over a family. Each is an object described by its arrows, and each such description is a bijection of hom-sets that respects composition. The object that organizes all of them is an adjunction.
The chapter ends where that organization stops being enough. A universal object is determined only up to isomorphism, whereas the substitution equation J[𝑓 ∘𝑔] =(J[𝑓])[𝑔] of proposition 71.51 is a literal identity of syntax. Section 142.10 exhibits the gap in a three-element calculation.
Products
Recall from definition 141.26 that 1 is terminal in C when each object 𝑐 admits exactly one arrow 𝑐 ⟶1. The description (142.1) has the same shape with a pair of arrows in place of the empty tuple, and it becomes a definition once the two projections that perform the cut are named.
Let 𝑎,𝑏 be objects of C. A product of 𝑎 and 𝑏 is an object 𝑎 ×𝑏 together with arrows 𝗉𝗋1 :𝑎 ×𝑏 ⟶𝑎 and 𝗉𝗋2 :𝑎 ×𝑏 ⟶𝑏 such that for every object 𝑐 and every pair of arrows 𝑓 :𝑐 ⟶𝑎, 𝑔 :𝑐 ⟶𝑏 there is exactly one arrow ⟨𝑓,𝑔⟩ :𝑐 ⟶𝑎 ×𝑏 with 𝗉𝗋1∘⟨𝑓,𝑔⟩=𝑓,𝗉𝗋2∘⟨𝑓,𝑔⟩=𝑔. The arrows 𝗉𝗋1,𝗉𝗋2 are the projections and ⟨𝑓,𝑔⟩ is the pairing of 𝑓 and 𝑔.
Referenced from 7 locations
The projections carry the definition: the same object can be a product in more than one way, and the data being defined is the triple (𝑎 ×𝑏,𝗉𝗋1,𝗉𝗋2). Two equations record this.
Let (𝑎 ×𝑏,𝗉𝗋1,𝗉𝗋2) be a product in C. Then
⟨𝗉𝗋1,𝗉𝗋2⟩ =id𝑎×𝑏;
⟨𝑓,𝑔⟩ ∘ℎ =⟨𝑓 ∘ℎ,𝑔 ∘ℎ⟩ for every ℎ :𝑐′ ⟶𝑐, 𝑓 :𝑐 ⟶𝑎, 𝑔 :𝑐 ⟶𝑏.
Referenced from 5 locations
Proof of Lemma 142.2 — Pairing calculus
Proof. For (1), id𝑎×𝑏 satisfies the two equations (142.2) required of ⟨𝗉𝗋1,𝗉𝗋2⟩, because 𝗉𝗋𝑖 ∘id𝑎×𝑏 =𝗉𝗋𝑖 by the unit law; the uniqueness clause of definition 142.1 applied to the pair (𝗉𝗋1,𝗉𝗋2) then identifies the two arrows.
For (2), the arrow ⟨𝑓,𝑔⟩ ∘ℎ satisfies the two equations required of ⟨𝑓 ∘ℎ,𝑔 ∘ℎ⟩: 𝗉𝗋1∘(⟨𝑓,𝑔⟩∘ℎ)𝑎𝑠𝑠𝑜𝑐.=(𝗉𝗋1∘⟨𝑓,𝑔⟩)∘ℎ(142.2)=𝑓∘ℎ, and the same calculation with 𝗉𝗋2 and 𝑔. Uniqueness applied to the pair (𝑓 ∘ℎ,𝑔 ∘ℎ) gives the equation. ◻
Let (𝑝,𝗉𝗋1,𝗉𝗋2) and (𝑝′,𝗉𝗋′1,𝗉𝗋′2) both be products of the objects 𝑎 and 𝑏 in the category C. Then exactly one arrow 𝑢 :𝑝 ⟶𝑝′ satisfies the two equations 𝗉𝗋′1 ∘𝑢 =𝗉𝗋1 and 𝗉𝗋′2 ∘𝑢 =𝗉𝗋2, and that arrow is an isomorphism.
Referenced from 3 locations
Proof of Lemma 142.3 — Uniqueness of products
Proof. Existence and uniqueness of 𝑢 are the universal property of 𝑝′ applied to the pair (𝗉𝗋1,𝗉𝗋2) out of 𝑝. Symmetrically there is exactly one 𝑣 :𝑝′ ⟶𝑝 with 𝗉𝗋𝑖 ∘𝑣 =𝗉𝗋′𝑖. Then 𝗉𝗋𝑖∘(𝑣∘𝑢)𝑎𝑠𝑠𝑜𝑐.=(𝗉𝗋𝑖∘𝑣)∘𝑢𝑑𝑒𝑓. 𝑣=𝗉𝗋′𝑖∘𝑢𝑑𝑒𝑓. 𝑢=𝗉𝗋𝑖𝑢𝑛𝑖𝑡=𝗉𝗋𝑖∘id𝑝, for 𝑖 =1,2, so 𝑣 ∘𝑢 and id𝑝 both mediate the pair (𝗉𝗋1,𝗉𝗋2); uniqueness in the universal property of 𝑝 gives 𝑣 ∘𝑢 =id𝑝. Exchanging the roles of 𝑝 and 𝑝′ gives 𝑢 ∘𝑣 =id𝑝′. ◻
In 𝐒𝐞𝐭 take 𝐴 ×𝐵 ={(𝑥,𝑦) ∣𝑥 ∈𝐴, 𝑦 ∈𝐵} with 𝗉𝗋1(𝑥,𝑦) =𝑥 and 𝗉𝗋2(𝑥,𝑦) =𝑦. Given 𝑓 :𝐶 →𝐴 and 𝑔 :𝐶 →𝐵, the function ⟨𝑓,𝑔⟩(𝑧) =(𝑓(𝑧),𝑔(𝑧)) satisfies (142.2). If ℎ :𝐶 →𝐴 ×𝐵 also satisfies them, then for each 𝑧 the pair ℎ(𝑧) has first component 𝑓(𝑧) and second component 𝑔(𝑧), hence ℎ(𝑧) =(𝑓(𝑧),𝑔(𝑧)).
Referenced from 3 locations
Let (𝑃, ≤) be a preorder viewed as a category, so that hom𝑃(𝑝,𝑞) has one element when 𝑝 ≤𝑞 and is empty otherwise. A product of 𝑝 and 𝑞 is an element 𝑟 with 𝑟 ≤𝑝, 𝑟 ≤𝑞, and 𝑠 ≤𝑟 whenever 𝑠 ≤𝑝 and 𝑠 ≤𝑞: a greatest lower bound. The uniqueness clause of definition 142.1 is automatic, since every hom-set of a preorder has at most one element.
Referenced from 4 locations
Let 𝑃 ={𝑎,𝑏,𝑐,𝑑} be ordered by 𝑐 ≤𝑎, 𝑐 ≤𝑏, 𝑑 ≤𝑎, 𝑑 ≤𝑏, together with the reflexive instances, and with 𝑐,𝑑 incomparable. A product of 𝑎 and 𝑏 would be a lower bound 𝑟 of 𝑎 and 𝑏 with 𝑐 ≤𝑟 and 𝑑 ≤𝑟. The lower bounds of {𝑎,𝑏} are exactly 𝑐 and 𝑑; 𝑐 ≤𝑑 fails and 𝑑 ≤𝑐 fails; so no lower bound is greatest, and 𝑎 and 𝑏 have no product in 𝑃. Existence of products is therefore a genuine hypothesis, not a construction available in every category.
Referenced from 2 locations
The opening calculation now becomes a statement about 𝐂𝐭𝐱.
Let Γ =𝑥1 :𝐴1,…,𝑥𝑛 :𝐴𝑛 and Δ =𝑦1 :𝐵1,…,𝑦𝑚 :𝐵𝑚 declare disjoint variables, and let ΓΔ be their concatenation. Put 𝗉𝗋1:=(𝑥1,…,𝑥𝑛):ΓΔ⟶Γ,𝗉𝗋2:=(𝑦1,…,𝑦𝑚):ΓΔ⟶Δ. Then (ΓΔ,𝗉𝗋1,𝗉𝗋2) is a product in 𝐂𝐭𝐱. The empty context is terminal.
Referenced from 4 locations
Proof of Proposition 142.7 — Concatenation is the product of contexts
Proof. Each 𝑥𝑖 has type 𝐴𝑖 in ΓΔ by Var, and likewise each 𝑦𝑗, so both lists are substitutions in the sense of definition 141.1. Let 𝑓 =(𝑎1,…,𝑎𝑛) :Ξ ⟶Γ and 𝑔 =(𝑏1,…,𝑏𝑚) :Ξ ⟶Δ. The concatenated list ⟨𝑓,𝑔⟩:=(𝑎1,…,𝑎𝑛,𝑏1,…,𝑏𝑚) is a substitution Ξ ⟶ΓΔ, since its 𝑖-th entry has the type declared at position 𝑖 of ΓΔ. Composition acts entrywise by definition 141.4, so 𝗉𝗋1∘⟨𝑓,𝑔⟩=(𝑥1[⟨𝑓,𝑔⟩],…,𝑥𝑛[⟨𝑓,𝑔⟩])=(𝑎1,…,𝑎𝑛)=𝑓, and the same calculation gives 𝗉𝗋2 ∘⟨𝑓,𝑔⟩ =𝑔. For uniqueness, let ℎ =(𝑐1,…,𝑐𝑛+𝑚) satisfy the two equations. Its composite with 𝗉𝗋1 is (𝑐1,…,𝑐𝑛), so 𝑐𝑖 =𝑎𝑖 for 𝑖 ≤𝑛; its composite with 𝗉𝗋2 is (𝑐𝑛+1,…,𝑐𝑛+𝑚), so 𝑐𝑛+𝑗 =𝑏𝑗. Hence ℎ =⟨𝑓,𝑔⟩.
For the empty context, a substitution Ξ ⟶ is the empty list, and there is exactly one empty list. ◻
★☆☆ Take Γ =𝑥 :𝟐, Δ =𝑦 :𝟐 →𝟐 and Ξ =𝑧 :𝟐. Write ⟨𝑓,𝑔⟩ for 𝑓 =(𝗍𝗍) and 𝑔 =(𝜆𝑤 :𝟐. 𝑧), and check both equations of (142.2) entrywise (two lines).
Referenced from 2 locations
★★☆ Assume C has all binary products. Construct an isomorphism (𝑎 ×𝑏) ×𝑐 ≅𝑎 ×(𝑏 ×𝑐) from the universal property alone, and prove that it commutes with the three evident projections. Do not use elements.
Referenced from 2 locations
★☆☆ In 𝐌𝐨𝐧, equip the cartesian product of the underlying sets with componentwise multiplication. Verify that the two projections are monoid homomorphisms and that the pairing of two homomorphisms is one.
Referenced from 2 locations
Substituting a family: pullbacks
A family of sets (𝐸𝑔)𝑔∈Γ is the same thing as a function 𝑝 :𝐸 →Γ, namely the projection from 𝐸 ={(𝑔,𝑒) ∣𝑔 ∈Γ, 𝑒 ∈𝐸𝑔}; conversely 𝐸𝑔 is recovered as the preimage 𝑝−1(𝑔). Given a further function 𝛾 :Δ →Γ, the family may be substituted along 𝛾: the family over Δ whose component at 𝑑 is 𝐸𝛾(𝑑). Its total set is Δ×Γ𝐸:={(𝑑,𝑒)∈Δ×𝐸∣𝛾(𝑑)=𝑝(𝑒)}, with the two projections to Δ and to 𝐸. The next definition names the mapping property of that set, and then (142.3) is verified against it.
Let 𝛾 :Δ ⟶Γ and 𝑝 :𝐸 ⟶Γ be arrows of C with common target. A pullback of 𝑝 along 𝛾 is an object 𝑃 with arrows 𝑢 :𝑃 ⟶Δ and 𝑣 :𝑃 ⟶𝐸 such that 𝛾 ∘𝑢 =𝑝 ∘𝑣 and such that for every object 𝑋 with arrows 𝑢′ :𝑋 ⟶Δ, 𝑣′ :𝑋 ⟶𝐸 satisfying 𝛾 ∘𝑢′ =𝑝 ∘𝑣′ there is exactly one ℎ :𝑋 ⟶𝑃 with 𝑢 ∘ℎ =𝑢′ and 𝑣 ∘ℎ =𝑣′.
Referenced from 4 locations
The square in question is
Diagram and the displayed equation 𝛾 ∘𝑢 =𝑝 ∘𝑣 is what it asserts. A square with this universal property is called a pullback square; 𝑢 is the substituted family and is written 𝛾∗𝑝 when the choice of 𝑃 is fixed.
In 𝐒𝐞𝐭, the set (142.3) with 𝑢(𝑑,𝑒) =𝑑 and 𝑣(𝑑,𝑒) =𝑒 is a pullback of 𝑝 along 𝛾, and 𝑢−1(𝑑) is in bijection with 𝑝−1(𝛾(𝑑)) for every 𝑑 ∈Δ.
Referenced from 5 locations
Proof of Proposition 142.9 — The set-theoretic pullback
Proof. Commutation. For (𝑑,𝑒) ∈Δ ×Γ𝐸 the defining condition gives 𝛾(𝑢(𝑑,𝑒)) =𝛾(𝑑) =𝑝(𝑒) =𝑝(𝑣(𝑑,𝑒)).
Existence. Let 𝑢′ :𝑋 →Δ and 𝑣′ :𝑋 →𝐸 satisfy 𝛾 ∘𝑢′ =𝑝 ∘𝑣′. For 𝑥 ∈𝑋 the pair (𝑢′(𝑥),𝑣′(𝑥)) satisfies 𝛾(𝑢′(𝑥)) =𝑝(𝑣′(𝑥)), hence lies in Δ ×Γ𝐸. Put ℎ(𝑥):=(𝑢′(𝑥),𝑣′(𝑥)); then 𝑢 ∘ℎ =𝑢′ and 𝑣 ∘ℎ =𝑣′ by the definition of 𝑢 and 𝑣.
Uniqueness. If ℎ′ also satisfies the two equations then for each 𝑥 the pair ℎ′(𝑥) has first component 𝑢′(𝑥) and second component 𝑣′(𝑥), so ℎ′(𝑥) =ℎ(𝑥).
Fibers. Fix 𝑑 ∈Δ. The map 𝑒 ↦(𝑑,𝑒) sends 𝑝−1(𝛾(𝑑)) into 𝑢−1(𝑑), and (𝑑,𝑒) ↦𝑒 sends 𝑢−1(𝑑) into 𝑝−1(𝛾(𝑑)); the two are mutually inverse. ◻
The same square occurs in the syntax of a dependent theory, where it is the mapping property of context extension. Fix the theory of chapter 26: contexts, context substitutions 𝑓 :Γ ⇒Δ of definition 26.45, and the action J[𝑓] of proposition 71.51. Two context substitutions with the same source and target are identified when their corresponding entries are judgmentally equal; the identification is needed for the uniqueness clause below and for nothing else.
Let T be a dependent theory over the rules of chapter 26. The category 𝐂𝐭𝐱T has the derivable contexts Γ 𝖼𝗍𝗑 as objects; an arrow Δ ⟶Γ is an equivalence class of context substitutions 𝑓 :Δ ⇒Γ under the relation identifying 𝑓 =(𝑏1,…,𝑏𝑚) with 𝑓′ =(𝑏′1,…,𝑏′𝑚) when Δ ⊢𝑏𝑗 ≡𝑏′𝑗 :𝐵𝑗[𝑏<𝑗/𝑦<𝑗] for every 𝑗. Composition and identities are those of proposition 71.51.
Referenced from 5 locations
That the operations descend to classes is the congruence property of judgmental equality under substitution (definition 26.16); the category laws hold because they hold for representatives. For a type Γ ⊢𝐴 𝗍𝗒𝗉𝖾 write Γ.𝐴 for the extended context Γ,𝑥 :𝐴 with 𝑥 fresh, and 𝑤𝐴:=(𝑥1,…,𝑥𝑛):Γ.𝐴⟶Γ,𝑥:=𝑥, so that 𝑤𝐴 is the variable list of Γ and 𝑥 is the last variable, with Γ.𝐴 ⊢𝑥 :𝐴[𝑤𝐴].
Let Γ ⊢𝐴 𝗍𝗒𝗉𝖾 and 𝑓 :Δ ⟶Γ in 𝐂𝐭𝐱T, and put 𝑓+:=(𝑓 ∘𝑤𝐴[𝑓], 𝑥). Then
Diagram is a pullback square in 𝐂𝐭𝐱T.
Referenced from 6 locations
Proof of Proposition 142.11 — Context extension is a pullback
Proof. Write 𝑓 =(𝑎1,…,𝑎𝑛).
Well-formedness. From Γ ⊢𝐴 𝗍𝗒𝗉𝖾 and 𝑓 the action of proposition 71.51 gives Δ ⊢𝐴[𝑓] 𝗍𝗒𝗉𝖾, so Δ.𝐴[𝑓] is a context. The list 𝑓+ has entries 𝑎1[𝑤𝐴[𝑓]],…,𝑎𝑛[𝑤𝐴[𝑓]] followed by 𝑥. The first 𝑛 entries have the types of Γ by weakening, and the last has type 𝐴[𝑓∘𝑤𝐴[𝑓]]𝑝𝑟𝑜𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛71.51=𝐴[𝑓][𝑤𝐴[𝑓]], which is the type required at the last declaration of Γ.𝐴.
Commutation. Both composites are the list (𝑎1[𝑤𝐴[𝑓]],…,𝑎𝑛[𝑤𝐴[𝑓]]): on one side because 𝑤𝐴 selects the first 𝑛 entries of 𝑓+, on the other by entrywise substitution.
Existence. Let ℎ :Ξ ⟶Δ and 𝑘 :Ξ ⟶Γ.𝐴 satisfy 𝑓 ∘ℎ =𝑤𝐴 ∘𝑘. Split 𝑘 =(𝑘0,𝑐) where 𝑘0 is the list of its first 𝑛 entries and Ξ ⊢𝑐 :𝐴[𝑘0]. Then 𝑤𝐴 ∘𝑘 =𝑘0, so the hypothesis reads 𝑘0 =𝑓 ∘ℎ, whence 𝐴[𝑘0]=𝐴[𝑓∘ℎ]𝑝𝑟𝑜𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛71.51=𝐴[𝑓][ℎ], and Ξ ⊢𝑐 :𝐴[𝑓][ℎ]. Therefore 𝑚:=(ℎ,𝑐) is a context substitution Ξ ⟶Δ.𝐴[𝑓]. It satisfies 𝑤𝐴[𝑓] ∘𝑚 =ℎ, since 𝑤𝐴[𝑓] selects the first entries; and 𝑓+∘𝑚=(𝑎1[𝑤𝐴[𝑓]][𝑚],…,𝑎𝑛[𝑤𝐴[𝑓]][𝑚],𝑥[𝑚])=(𝑓∘ℎ,𝑐)=(𝑘0,𝑐)=𝑘.
Uniqueness. Let 𝑚′ satisfy the same two equations. From 𝑤𝐴[𝑓] ∘𝑚′ =ℎ its first entries are judgmentally equal to those of ℎ, and from 𝑓+ ∘𝑚′ =𝑘 its last entry is judgmentally equal to 𝑐. Hence 𝑚′ =𝑚 as an arrow of 𝐂𝐭𝐱T. ◻
The uniqueness step is the only place where definition 142.10 used judgmental equality rather than literal equality of lists: two substitutions with judgmentally equal entries induce the same action on judgments, but need not be the same list of raw terms.
★★☆ Show that in the square of definition 142.8, if 𝑝 is a monomorphism in the sense of definition 141.28, then so is 𝑢. Hint: use the uniqueness clause with two competing arrows into 𝑃 (four lines).
Referenced from 2 locations
★★☆ Let the right square below be a pullback. Prove that the left square is a pullback if and only if the outer rectangle is.
Diagram State precisely which universal property is applied in each direction.
Referenced from 2 locations
★☆☆ In proposition 142.11 take Γ =(𝑢 :𝐴), Δ =(), 𝑓 =(𝑎) with ⊢𝑎 :𝐴, and Γ ⊢𝐵 𝗍𝗒𝗉𝖾. Write out all four arrows of the square explicitly and identify 𝐴[𝑓], 𝑓+, and the mediating map for ℎ =id, 𝑘 =(𝑎,𝑏).
Referenced from 2 locations
Equalizers and finite limits
Products and pullbacks are two instances of one construction: an object equipped with arrows to a family of objects, universal among such. One further instance is needed before that construction can be stated in general, and it is the one that solves equations.
Let 𝑓,𝑔 :𝑎 ⟶𝑏. An equalizer of 𝑓 and 𝑔 is an object 𝑒 with an arrow 𝑖 :𝑒 ⟶𝑎 such that 𝑓 ∘𝑖 =𝑔 ∘𝑖 and such that every 𝑗 :𝑥 ⟶𝑎 with 𝑓 ∘𝑗 =𝑔 ∘𝑗 factors as 𝑗 =𝑖 ∘𝑘 for exactly one 𝑘 :𝑥 ⟶𝑒.
Referenced from 2 locations
For 𝑓,𝑔 :𝐴 →𝐵 put 𝐸 ={𝑥 ∈𝐴 ∣𝑓(𝑥) =𝑔(𝑥)} with 𝑖 the inclusion. If 𝑗 :𝑋 →𝐴 satisfies 𝑓 ∘𝑗 =𝑔 ∘𝑗, then 𝑗(𝑥) ∈𝐸 for every 𝑥, so 𝑗 corestricts to 𝑘 :𝑋 →𝐸 with 𝑖 ∘𝑘 =𝑗; and 𝑘 is forced, because 𝑖 is injective.
Referenced from 2 locations
Let J be a category with finitely many objects and finitely many arrows, and let 𝐷 :J →C be a functor in the sense of definition 141.32. A cone over 𝐷 with vertex 𝑐 is a family of arrows 𝜏𝑖 :𝑐 ⟶𝐷(𝑖), one for each object 𝑖 of J, with 𝐷(𝛼) ∘𝜏𝑖 =𝜏𝑗 for every 𝛼 :𝑖 ⟶𝑗 of J. A limit of 𝐷 is a cone (𝑙,(𝜋𝑖)) such that for every cone (𝑐,(𝜏𝑖)) there is exactly one ℎ :𝑐 ⟶𝑙 with 𝜋𝑖 ∘ℎ =𝜏𝑖 for all 𝑖. A category has finite limits when every such 𝐷 has a limit.
Referenced from 3 locations
A terminal object is the limit of the empty diagram, a product the limit of a diagram with two objects and no nonidentity arrows, an equalizer the limit of a diagram with two parallel arrows, and a pullback the limit of a diagram ∙ → ∙ ← ∙. The next theorem says that the first three suffice.
If C has a terminal object, binary products, and equalizers of all parallel pairs, then C has finite limits.
Referenced from 6 locations
Proof of Theorem 142.15 — Finite limits from products and equalizers
Proof. Terminal objects and binary products give a product ∏𝑖𝐷(𝑖) of the finitely many objects 𝐷(𝑖), by induction on their number: the empty product is the terminal object and ∏𝑖≤𝑛+1 =(∏𝑖≤𝑛) ×𝐷(𝑛 +1); write 𝜌𝑖 for the resulting projections. Likewise form ∏𝛼𝐷(tgt 𝛼) over the finitely many arrows 𝛼 of J, with projections 𝜌𝛼. Define 𝑢,𝑣 :∏𝑖𝐷(𝑖) ⟶∏𝛼𝐷(tgt 𝛼) as the unique arrows with 𝜌𝛼∘𝑢=𝐷(𝛼)∘𝜌src𝛼,𝜌𝛼∘𝑣=𝜌tgt𝛼 for every 𝛼; these exist and are unique by the universal property of the second product. Let 𝑖 :𝑒 ⟶∏𝑖𝐷(𝑖) be an equalizer of 𝑢 and 𝑣, and put 𝜋𝑖:=𝜌𝑖 ∘𝑖.
(𝑒,(𝜋𝑖)) is a cone. For 𝛼 :𝑖 ⟶𝑗, 𝐷(𝛼)∘𝜋𝑖𝑑𝑒𝑓.=𝐷(𝛼)∘𝜌𝑖∘𝑖𝑑𝑒𝑓. 𝑢=𝜌𝛼∘𝑢∘𝑖𝑒𝑞𝑢𝑎𝑙𝑖𝑧𝑒𝑟=𝜌𝛼∘𝑣∘𝑖𝑑𝑒𝑓. 𝑣=𝜌𝑗∘𝑖𝑑𝑒𝑓.=𝜋𝑗.
Universality. Let (𝑐,(𝜏𝑖)) be a cone. Let 𝑡 :𝑐 ⟶∏𝑖𝐷(𝑖) be the unique arrow with 𝜌𝑖 ∘𝑡 =𝜏𝑖. Then for each 𝛼 :𝑖 ⟶𝑗, 𝜌𝛼∘𝑢∘𝑡𝑑𝑒𝑓. 𝑢=𝐷(𝛼)∘𝜌𝑖∘𝑡𝑑𝑒𝑓. 𝑡=𝐷(𝛼)∘𝜏𝑖𝑐𝑜𝑛𝑒=𝜏𝑗𝑑𝑒𝑓. 𝑡=𝜌𝑗∘𝑡𝑑𝑒𝑓. 𝑣=𝜌𝛼∘𝑣∘𝑡, and since this holds for every 𝛼, uniqueness in the universal property of ∏𝛼 gives 𝑢 ∘𝑡 =𝑣 ∘𝑡. Hence 𝑡 =𝑖 ∘ℎ for exactly one ℎ :𝑐 ⟶𝑒, and 𝜋𝑖 ∘ℎ =𝜌𝑖 ∘𝑖 ∘ℎ =𝜌𝑖 ∘𝑡 =𝜏𝑖. If ℎ′ also satisfies 𝜋𝑖 ∘ℎ′ =𝜏𝑖 for all 𝑖, then 𝑖 ∘ℎ′ and 𝑖 ∘ℎ have the same composites with every 𝜌𝑖, so 𝑖 ∘ℎ′ =𝑡 =𝑖 ∘ℎ, and uniqueness of the equalizer factorization gives ℎ′ =ℎ. ◻
Under the hypotheses of theorem 142.15, a pullback of 𝑝 :𝐸 ⟶Γ along 𝛾 :Δ ⟶Γ is obtained as the equalizer 𝑖 :𝑃 ⟶Δ ×𝐸 of 𝛾 ∘𝗉𝗋1 and 𝑝 ∘𝗉𝗋2, with 𝑢 =𝗉𝗋1 ∘𝑖 and 𝑣 =𝗉𝗋2 ∘𝑖.
Referenced from 2 locations
Proof of Corollary 142.16 — Pullbacks from products and equalizers
Proof. The stated diagram is the case of theorem 142.15 in which J has objects 1,2,3 and two nonidentity arrows 1 →3 ←2; the product over the objects is Δ ×𝐸 ×Γ and the equalizer conditions reduce to 𝛾 ∘𝗉𝗋1 =𝑝 ∘𝗉𝗋2 after deleting the redundant third factor, since the cone component at 3 is determined by the component at 1. ◻
Reversing every arrow in definition 142.14 gives colimits: a cocone is a family 𝜏𝑖 :𝐷(𝑖) ⟶𝑐 with 𝜏𝑗 ∘𝐷(𝛼) =𝜏𝑖, and a colimit is an initial such cocone. By definition 141.25, a colimit of 𝐷 in C is a limit of the corresponding diagram in Cop; the transformation reverses every arrow and every composite, exchanges source and target, and therefore converts theorem 142.15 into: a category with an initial object, binary coproducts, and coequalizers has finite colimits. The binary coproduct in 𝐒𝐞𝐭 is the disjoint union 𝐴 +𝐵 with the two injections; the initial object is ∅.
★☆☆ Prove that the arrow 𝑖 of an equalizer is a monomorphism (definition 141.28). Two lines.
Referenced from 2 locations
★★☆ Let 𝑃 be a preorder viewed as a category. Identify limits of finite diagrams in 𝑃 in order-theoretic language, and explain why every equalizer in 𝑃 is an identity arrow.
Referenced from 2 locations
★★★ In 𝐂𝐭𝐱 take Γ =𝑥 :𝟐, Δ =𝑦 :𝟐 and the two substitutions 𝑓 =(𝗍𝗍), 𝑔 =(𝖿𝖿) :Γ ⟶Δ. Show that 𝑓 and 𝑔 have an equalizer and identify it. Then take instead 𝑓′ =(𝑥) and 𝑔′ =(𝗍𝗍) and show that their equalizer is the context Ξ with the property that a substitution Θ ⟶Γ equalizes 𝑓′ and 𝑔′ exactly when its single component is 𝛼-equal to 𝗍𝗍; conclude that 𝐂𝐭𝐱 has this equalizer as well. Which step would fail if arrows were terms modulo 𝛽-conversion?
Referenced from 2 locations
Adjunctions
Let 𝑆 be a set and 𝑆∗ the monoid of finite lists of elements of 𝑆 under concatenation, with the empty list as unit. There is a function 𝜂𝑆 :𝑆 →𝑆∗ sending 𝑠 to the one-element list [𝑠]. Now let 𝑀 be any monoid and 𝑘 :𝑆 →𝑈𝑀 a function into its underlying set. A monoid homomorphism ˆ𝑘 :𝑆∗ ⟶𝑀 with 𝑈ˆ𝑘 ∘𝜂𝑆 =𝑘 is forced: it must send the empty list to the unit of 𝑀 and [𝑠1,…,𝑠𝑛] to 𝑘(𝑠1)⋯𝑘(𝑠𝑛), since ˆ𝑘 preserves the unit and the multiplication. That assignment is a homomorphism, so hom𝐌𝐨𝐧(𝑆∗,𝑀)≅hom𝐒𝐞𝐭(𝑆,𝑈𝑀) by ˆ𝑘 ↦𝑈ˆ𝑘 ∘𝜂𝑆. Here 𝑈 :𝐌𝐨𝐧 →𝐒𝐞𝐭 is the forgetful functor of example 141.34.
Equation 142.4 is a bijection for each pair (𝑆,𝑀), and it interacts with composition on both sides. That interaction is the content of the next definition; without it the bijections could be chosen independently at each pair and would carry no information.
Let 𝐹 :C →D and 𝐺 :D →C be functors. An adjunction 𝐹 ⊣𝐺 is a family of bijections 𝜑𝑐,𝑑:homD(𝐹𝑐,𝑑)⟶homC(𝑐,𝐺𝑑) indexed by objects 𝑐 of C and 𝑑 of D, such that for all 𝑔 :𝐹𝑐 ⟶𝑑, ℎ :𝑐′ ⟶𝑐 in C, and 𝑘 :𝑑 ⟶𝑑′ in D, 𝜑𝑐′,𝑑(𝑔∘𝐹ℎ)=𝜑𝑐,𝑑(𝑔)∘ℎ,𝜑𝑐,𝑑′(𝑘∘𝑔)=𝐺𝑘∘𝜑𝑐,𝑑(𝑔). 𝐹 is the left adjoint and 𝐺 the right adjoint. We write 𝜑(𝑔) when the objects are determined by the argument.
Referenced from 5 locations
The two equations of (142.5) say that 𝜑 is a natural isomorphism in the sense of proposition 141.43 between two functors Cop ×D →𝐒𝐞𝐭, namely (𝑐,𝑑) ↦homD(𝐹𝑐,𝑑) and (𝑐,𝑑) ↦homC(𝑐,𝐺𝑑); proposition 141.55 supplies the functor structure.
Let 𝐹 :𝐒𝐞𝐭 →𝐌𝐨𝐧 send 𝑆 to 𝑆∗ and a function ℎ :𝑆′ →𝑆 to the homomorphism 𝐹ℎ acting entrywise on lists. Then 𝐹 is a functor and 𝐹 ⊣𝑈, with 𝜑(ˆ𝑘) =𝑈ˆ𝑘 ∘𝜂𝑆.
Referenced from 5 locations
Proof of Proposition 142.18 — The free monoid is left adjoint to the underlying set
Proof. 𝐹 is a functor. Acting entrywise preserves concatenation and the empty list, so 𝐹ℎ is a homomorphism; entrywise action of a composite is the composite of entrywise actions, and entrywise action of the identity is the identity.
𝜑 is a bijection. The paragraph opening this section showed that for each 𝑘 :𝑆 →𝑈𝑀 there is exactly one homomorphism ˆ𝑘 with 𝑈ˆ𝑘 ∘𝜂𝑆 =𝑘, which is exactly the statement that 𝜑 is injective and surjective.
First equation. Let ℎ :𝑆′ →𝑆 and ˆ𝑘 :𝑆∗ ⟶𝑀. Both sides are functions 𝑆′ →𝑈𝑀; evaluate at 𝑠′ ∈𝑆′: 𝜑(ˆ𝑘∘𝐹ℎ)(𝑠′)𝑑𝑒𝑓. 𝜑=ˆ𝑘(𝐹ℎ([𝑠′]))𝑒𝑛𝑡𝑟𝑦𝑤𝑖𝑠𝑒=ˆ𝑘([ℎ(𝑠′)])𝑑𝑒𝑓. 𝜑=𝜑(ˆ𝑘)(ℎ(𝑠′)).
Second equation. Let 𝑙 :𝑀 ⟶𝑀′ be a homomorphism. At 𝑠 ∈𝑆, 𝜑(𝑙∘ˆ𝑘)(𝑠)𝑑𝑒𝑓. 𝜑=𝑙(ˆ𝑘([𝑠]))𝑑𝑒𝑓. 𝜑=𝑈𝑙(𝜑(ˆ𝑘)(𝑠)), which is the value of 𝑈𝑙 ∘𝜑(ˆ𝑘) at 𝑠. ◻
Let 𝑈 send a small category to its underlying graph, with the arrows as edges. Definition 141.17 builds 𝐅𝐫𝐞𝐞(𝐺) from paths, and proposition 141.35 exhibits its mapping property: a graph morphism 𝐺 →𝑈C extends to exactly one functor 𝐅𝐫𝐞𝐞(𝐺) →C. That mapping property is the bijection hom𝐂𝐚𝐭(𝐅𝐫𝐞𝐞(𝐺),C)≅hom𝐆𝐫𝐚𝐩𝐡(𝐺,𝑈C), and it satisfies (142.5) for the same reason as in proposition 142.18: both sides of each equation are determined by their values on edges.
Referenced from 2 locations
Unit, counit, and the triangle identities
The bijection 𝜑 of definition 142.17 is determined by two of its values, and those two values satisfy two equations. The function 𝜂𝑆 of the previous section is the first of them.
Let 𝐹 :C →D and 𝐺 :D →C. A unit–counit adjunction consists of natural transformations 𝜂 :IdC ⇒𝐺𝐹 and 𝜀 :𝐹𝐺 ⇒IdD such that 𝜀𝐹𝑐∘𝐹𝜂𝑐=id𝐹𝑐,𝐺𝜀𝑑∘𝜂𝐺𝑑=id𝐺𝑑 for all objects 𝑐 of C and 𝑑 of D. The two equations are the triangle identities.
Referenced from 2 locations
Proof of Theorem 142.21 — The two presentations agree
Proof. The proof uses only the two equations (142.5) and the functor laws; every step is one of them.
(1) Naturality of 𝜂. Let ℎ :𝑐′ ⟶𝑐. Then 𝐺𝐹ℎ∘𝜂𝑐′(142.5)(2)=𝜑(𝐹ℎ∘id𝐹𝑐′)𝑢𝑛𝑖𝑡=𝜑(𝐹ℎ)𝑢𝑛𝑖𝑡=𝜑(id𝐹𝑐∘𝐹ℎ)(142.5)(1)=𝜂𝑐∘ℎ. Naturality of 𝜀 is the same calculation performed on 𝜑−1, whose two equations are obtained from (142.5) by applying 𝜑−1 to both sides: 𝜑−1(𝑓 ∘ℎ) =𝜑−1(𝑓) ∘𝐹ℎ and 𝜑−1(𝐺𝑘 ∘𝑓) =𝑘 ∘𝜑−1(𝑓). Explicitly, for 𝑙 :𝑑 ⟶𝑑′, 𝜀𝑑′∘𝐹𝐺𝑙𝜑−1(1)=𝜑−1(id𝐺𝑑′∘𝐺𝑙)𝑢𝑛𝑖𝑡=𝜑−1(𝐺𝑙)𝑢𝑛𝑖𝑡=𝜑−1(𝐺𝑙∘id𝐺𝑑)𝜑−1(2)=𝑙∘𝜀𝑑.
(1) Triangle identities. For the first, 𝜑(𝜀𝐹𝑐∘𝐹𝜂𝑐)(142.5)(1)=𝜑(𝜀𝐹𝑐)∘𝜂𝑐𝑑𝑒𝑓. 𝜀=id𝐺𝐹𝑐∘𝜂𝑐𝑢𝑛𝑖𝑡=𝜂𝑐𝑑𝑒𝑓. 𝜂=𝜑(id𝐹𝑐), and 𝜑 is injective, so 𝜀𝐹𝑐 ∘𝐹𝜂𝑐 =id𝐹𝑐. For the second, apply 𝜑−1 to 𝐺𝜀𝑑 ∘𝜂𝐺𝑑: 𝜑−1(𝐺𝜀𝑑∘𝜂𝐺𝑑)𝜑−1(2)=𝜀𝑑∘𝜑−1(𝜂𝐺𝑑)𝑑𝑒𝑓. 𝜂=𝜀𝑑∘id𝐹𝐺𝑑𝑢𝑛𝑖𝑡=𝜀𝑑𝑑𝑒𝑓. 𝜀=𝜑−1(id𝐺𝑑).
(2) 𝜑 and 𝜓 are mutually inverse. For 𝑔 :𝐹𝑐 ⟶𝑑, 𝜓(𝜑(𝑔))𝑑𝑒𝑓.=𝜀𝑑∘𝐹(𝐺𝑔∘𝜂𝑐)𝑓𝑢𝑛𝑐𝑡𝑜𝑟=𝜀𝑑∘𝐹𝐺𝑔∘𝐹𝜂𝑐𝜀𝑛𝑎𝑡𝑢𝑟𝑎𝑙=𝑔∘𝜀𝐹𝑐∘𝐹𝜂𝑐(142.6)(1)=𝑔. For 𝑓 :𝑐 ⟶𝐺𝑑, 𝜑(𝜓(𝑓))𝑑𝑒𝑓.=𝐺(𝜀𝑑∘𝐹𝑓)∘𝜂𝑐𝑓𝑢𝑛𝑐𝑡𝑜𝑟=𝐺𝜀𝑑∘𝐺𝐹𝑓∘𝜂𝑐𝜂𝑛𝑎𝑡𝑢𝑟𝑎𝑙=𝐺𝜀𝑑∘𝜂𝐺𝑑∘𝑓(142.6)(2)=𝑓.
(2) The two equations. For ℎ :𝑐′ ⟶𝑐, 𝜑(𝑔∘𝐹ℎ)𝑑𝑒𝑓.=𝐺(𝑔∘𝐹ℎ)∘𝜂𝑐′𝑓𝑢𝑛𝑐𝑡𝑜𝑟=𝐺𝑔∘𝐺𝐹ℎ∘𝜂𝑐′𝜂𝑛𝑎𝑡𝑢𝑟𝑎𝑙=𝐺𝑔∘𝜂𝑐∘ℎ𝑑𝑒𝑓.=𝜑(𝑔)∘ℎ, and for 𝑘 :𝑑 ⟶𝑑′, 𝜑(𝑘∘𝑔)𝑑𝑒𝑓.=𝐺(𝑘∘𝑔)∘𝜂𝑐𝑓𝑢𝑛𝑐𝑡𝑜𝑟=𝐺𝑘∘𝐺𝑔∘𝜂𝑐𝑑𝑒𝑓.=𝐺𝑘∘𝜑(𝑔).
(3). Starting from 𝜑, part (1) produces 𝜂𝑐 =𝜑(id𝐹𝑐), and part (2) then rebuilds 𝑔 ↦𝐺𝑔 ∘𝜑(id𝐹𝑐) =𝜑(𝑔 ∘id𝐹𝑐) =𝜑(𝑔) by (142.5)(2) and the unit law. Starting from (𝜂,𝜀), part (2) produces 𝜑, and part (1) returns 𝜑(id𝐹𝑐) =𝐺id𝐹𝑐 ∘𝜂𝑐 =𝜂𝑐 and 𝜓(id𝐺𝑑) =𝜀𝑑 ∘𝐹id𝐺𝑑 =𝜀𝑑. ◻
For 𝐹 ⊣𝑈 of proposition 142.18, the unit is 𝜂𝑆(𝑠) =[𝑠] and the counit 𝜀𝑀 :(𝑈𝑀)∗ ⟶𝑀 multiplies a list out: 𝜀𝑀[𝑚1,…,𝑚𝑛] =𝑚1⋯𝑚𝑛, the empty list going to the unit. The first triangle identity, at a list [𝑠1,…,𝑠𝑛] in 𝑆∗, reads 𝜀𝑆∗(𝐹𝜂𝑆[𝑠1,…,𝑠𝑛])𝑒𝑛𝑡𝑟𝑦𝑤𝑖𝑠𝑒=𝜀𝑆∗[[𝑠1],…,[𝑠𝑛]]𝑑𝑒𝑓. 𝜀=[𝑠1]⋯[𝑠𝑛]𝑐𝑜𝑛𝑐𝑎𝑡.=[𝑠1,…,𝑠𝑛]. The second, at 𝑚 ∈𝑈𝑀, reads 𝑈𝜀𝑀(𝜂𝑈𝑀(𝑚)) =𝜀𝑀[𝑚] =𝑚.
Referenced from 3 locations
★★☆ Let 𝐹 ⊣𝐺 and 𝐹′ ⊣𝐺 with the same right adjoint 𝐺. Construct a natural isomorphism 𝐹 ≅𝐹′ from the two hom-set bijections, and prove its naturality. Hint: compose the two bijections at 𝑑 =𝐹′𝑐 and use corollary 141.59.
Referenced from 2 locations
★☆☆ Let 𝑃,𝑄 be preorders and 𝑓 :𝑃 →𝑄, 𝑔 :𝑄 →𝑃 monotone. Show that 𝑓 ⊣𝑔 holds exactly when 𝑓(𝑝) ≤𝑞 ⟺ 𝑝 ≤𝑔(𝑞) for all 𝑝,𝑞, and that the triangle identities are automatic. Two lines each.
Referenced from 5 locations
★★☆ Assume C has binary products. Show that the diagonal functor Δ :C →C ×C, Δ(𝑐) =(𝑐,𝑐), has (𝑎,𝑏) ↦𝑎 ×𝑏 as a right adjoint, and identify the unit and the counit. Use definition 141.54.
Referenced from 2 locations
Right adjoints preserve limits
An adjunction transports mapping properties. Since a limit is a mapping property, a right adjoint carries limits to limits; the proof is the hom-set bijection applied to every leg of a cone at once.
Let 𝐹 ⊣𝐺 with 𝐹 :C →D, 𝐺 :D →C, and let 𝐷 :J →D be a diagram with limit (𝑙,(𝜋𝑖)). Then (𝐺𝑙,(𝐺𝜋𝑖)) is a limit of 𝐺 ∘𝐷 :J →C.
Referenced from 7 locations
Proof of Theorem 142.23 — Preservation
Proof. Cone. For 𝛼 :𝑖 ⟶𝑗 in J, 𝐺(𝐷𝛼) ∘𝐺𝜋𝑖 =𝐺(𝐷𝛼 ∘𝜋𝑖) =𝐺𝜋𝑗 by the functor law and the cone equation for (𝑙,(𝜋𝑖)).
Universality. Let (𝑐,(𝜏𝑖)) be a cone over 𝐺 ∘𝐷 in C, so 𝜏𝑖 :𝑐 ⟶𝐺(𝐷𝑖). Put 𝜏♯𝑖:=𝜑−1(𝜏𝑖) :𝐹𝑐 ⟶𝐷𝑖. These form a cone over 𝐷: for 𝛼 :𝑖 ⟶𝑗, 𝐷𝛼∘𝜏♯𝑖𝜑−1(2)=𝜑−1(𝐺(𝐷𝛼)∘𝜏𝑖)𝑐𝑜𝑛𝑒=𝜑−1(𝜏𝑗)𝑑𝑒𝑓.=𝜏♯𝑗, where 𝜑−1(2) is the equation 𝜑−1(𝐺𝑘 ∘𝑓) =𝑘 ∘𝜑−1(𝑓) established in the proof of theorem 142.21. By the universal property of 𝑙 there is exactly one 𝑚 :𝐹𝑐 ⟶𝑙 with 𝜋𝑖 ∘𝑚 =𝜏♯𝑖 for all 𝑖. Put ℎ:=𝜑(𝑚). Then 𝐺𝜋𝑖∘ℎ𝑑𝑒𝑓. 𝜑=𝜑(𝜋𝑖∘𝑚)𝑑𝑒𝑓. 𝑚=𝜑(𝜏♯𝑖)𝑖𝑛𝑣𝑒𝑟𝑠𝑒=𝜏𝑖, the first step being (142.5)(2). If ℎ′ :𝑐 ⟶𝐺𝑙 also satisfies 𝐺𝜋𝑖 ∘ℎ′ =𝜏𝑖 for all 𝑖, then 𝑚′:=𝜑−1(ℎ′) satisfies 𝜋𝑖 ∘𝑚′ =𝜑−1(𝐺𝜋𝑖 ∘ℎ′) =𝜑−1(𝜏𝑖) =𝜏♯𝑖, so 𝑚′ =𝑚 by uniqueness, and ℎ′ =𝜑(𝑚′) =ℎ. ◻
A right adjoint 𝐺 preserves terminal objects, binary products, equalizers, and pullbacks: 𝐺1 is terminal, 𝐺(𝑎 ×𝑏) with (𝐺𝗉𝗋1,𝐺𝗉𝗋2) is a product of 𝐺𝑎 and 𝐺𝑏, and the image of a pullback square is a pullback square. Dually a left adjoint preserves initial objects, coproducts, coequalizers, and pushouts, by applying theorem 142.23 in Cop and Dop, where a left adjoint becomes a right adjoint and a colimit becomes a limit.
Referenced from 5 locations
★★☆ The coproduct of two monoids 𝑀,𝑁 in 𝐌𝐨𝐧 has as elements the alternating words 𝑚1𝑛1𝑚2𝑛2⋯ with each letter a non-unit element of its monoid. Exhibit two monoids for which the underlying set of this coproduct is not the disjoint union of the underlying sets, and explain why this does not contradict corollary 142.24.
Referenced from 2 locations
★☆☆ Specialize the proof of theorem 142.23 to an equalizer: write out the two arrows, the transposed pair, and the mediating arrow, without invoking the general diagram J (half a page).
Referenced from 2 locations
Cartesian closure
Products interpret contexts. A function type is an object internalizing a hom-set, and the mapping property that internalizes it is the one already familiar from programming: a two-argument function is a one-argument function returning a function.
A category C is cartesian closed if it has a terminal object, binary products, and for each pair of objects 𝑎,𝑏 an object 𝑏𝑎 together with an arrow ev :𝑏𝑎 ×𝑎 ⟶𝑏 such that for every 𝑐 and every 𝑓 :𝑐 ×𝑎 ⟶𝑏 there is exactly one 𝜆(𝑓) :𝑐 ⟶𝑏𝑎 with ev∘⟨𝜆(𝑓)∘𝗉𝗋1,𝗉𝗋2⟩=𝑓. The object 𝑏𝑎 is the exponential and 𝜆(𝑓) the transpose of 𝑓.
Referenced from 8 locations
The arrow ⟨𝜆(𝑓) ∘𝗉𝗋1,𝗉𝗋2⟩ is the action of 𝜆(𝑓) on the first factor of 𝑐 ×𝑎; it is what the notation 𝜆(𝑓) ×id𝑎 abbreviates. Written as a bijection, definition 142.26 states that 𝜆:homC(𝑐×𝑎,𝑏)⟶homC(𝑐,𝑏𝑎) is a bijection for every 𝑐, and the equations (142.5) for it say exactly that ( −) ×𝑎 is left adjoint to ( −)𝑎.
C with terminal object and binary products is cartesian closed if and only if for every object 𝑎 the functor ( −) ×𝑎 has a right adjoint.
Referenced from 4 locations
Proof of Proposition 142.27 — Currying is an adjunction
Proof. Assume exponentials. The assignment 𝑏 ↦𝑏𝑎 becomes a functor by 𝑘𝑎:=𝜆(𝑘 ∘ev) for 𝑘 :𝑏 ⟶𝑏′; the functor laws follow from uniqueness in definition 142.26, because 𝜆(𝑘′ ∘𝑘 ∘ev) and 𝜆(𝑘′ ∘ev) ∘ composed appropriately satisfy the same equation (142.7). The bijection (142.8) satisfies the first equation of (142.5) because, for ℎ :𝑐′ ⟶𝑐, both 𝜆(𝑓 ∘(ℎ ×id𝑎)) and 𝜆(𝑓) ∘ℎ have the same composite with ev after pairing, and 𝜆 is injective; the second equation is the definition of 𝑘𝑎.
Conversely, an adjunction ( −) ×𝑎 ⊣𝐺 gives, at 𝑐 =𝐺𝑏 and the counit, an arrow ev:=𝜀𝑏 :𝐺𝑏 ×𝑎 ⟶𝑏; the hom-set bijection at 𝑐 is 𝜆, and (142.7) is the statement 𝜑−1(𝜑(𝑓)) =𝑓 written out with 𝜑−1(𝑢) =𝜀𝑏 ∘(𝑢 ×id𝑎), which is the formula of theorem 142.21(2). ◻
In 𝐒𝐞𝐭 put 𝐵𝐴:={ℎ ∣ℎ :𝐴 →𝐵} and ev(ℎ,𝑥):=ℎ(𝑥). Given 𝑓 :𝐶 ×𝐴 →𝐵, define 𝜆(𝑓)(𝑧):=(𝑥 ↦𝑓(𝑧,𝑥)). Then ev(𝜆(𝑓)(𝑧),𝑥)𝑑𝑒𝑓. ev=𝜆(𝑓)(𝑧)(𝑥)𝑑𝑒𝑓. 𝜆=𝑓(𝑧,𝑥), which is (142.7) evaluated at (𝑧,𝑥). If 𝑢 :𝐶 →𝐵𝐴 also satisfies it, then 𝑢(𝑧)(𝑥) =𝑓(𝑧,𝑥) =𝜆(𝑓)(𝑧)(𝑥) for all 𝑥, so 𝑢(𝑧) =𝜆(𝑓)(𝑧) as functions, and 𝑢 =𝜆(𝑓).
Referenced from 2 locations
The syntactic case is the one this book needs, and it is the one where the naive attempt fails. Take 𝐂𝐭𝐱 of example 141.9, whose arrows are lists of terms up to 𝛼-equivalence. For Γ arbitrary, Δ =𝑥 :𝐴 and Θ =𝑦 :𝐵, a substitution ΓΔ ⟶Θ is a term Γ,𝑥 :𝐴 ⊢𝑏 :𝐵, and a substitution Γ ⟶𝑧 :𝐴 →𝐵 is a term Γ ⊢𝑐 :𝐴 →𝐵. Abstraction and application propose the two directions, 𝑏↦𝜆𝑥:𝐴.𝑏,𝑐↦𝑐𝑥. They are not mutually inverse on the nose. Starting from 𝑏 and returning gives (𝜆𝑥 :𝐴. 𝑏) 𝑥, a redex, which is a different list of terms from 𝑏; starting from 𝑐 =𝑦, a variable, and returning gives 𝜆𝑥 :𝐴. 𝑦 𝑥, again a different term. The first discrepancy is removed by 𝛽, the second by 𝜂, and by nothing weaker: a 𝛽-normal form of the shape 𝜆𝑥 :𝐴. 𝑦 𝑥 has no 𝛽-reduct at all.
Let ≈ be the least congruence on typed terms of chapter 2 containing (𝜆𝑥 :𝐴. 𝑏) 𝑎 ≈𝑏[𝑎/𝑥] and 𝑐 ≈𝜆𝑥 :𝐴. 𝑐 𝑥 for Γ ⊢𝑐 :𝐴 →𝐵 and 𝑥 not free in 𝑐. The category 𝐂𝐭𝐱𝛽𝜂 has the contexts as objects and, as arrows Γ ⟶Δ, the substitutions of definition 141.1 taken up to entrywise ≈.
Referenced from 2 locations
Composition descends to ≈-classes because ≈ is a congruence closed under substitution, and the category laws of proposition 141.7 hold for representatives, hence for classes.
𝐂𝐭𝐱𝛽𝜂 is cartesian closed. For Δ =𝑥 :𝐴 and Θ =𝑦 :𝐵 the exponential is the one-declaration context ΘΔ =𝑧 :𝐴 →𝐵, with ev =(𝑧 𝑥) :ΘΔΔ ⟶Θ and 𝜆(𝑏) =(𝜆𝑥 :𝐴. 𝑏).
Referenced from 2 locations
Proof of Proposition 142.30 — The syntactic category is cartesian closed
Proof. Products and the terminal object are proposition 142.7, whose proof used only entrywise composition and therefore descends to classes. Fix Γ and Γ,𝑥 :𝐴 ⊢𝑏 :𝐵. The arrow ⟨𝜆(𝑏) ∘𝗉𝗋1,𝗉𝗋2⟩ is the substitution (𝜆𝑥 :𝐴. 𝑏,𝑥) from ΓΔ to ΘΔΔ, so ev∘⟨𝜆(𝑏)∘𝗉𝗋1,𝗉𝗋2⟩=((𝑧𝑥)[(𝜆𝑥:𝐴.𝑏,𝑥)])=((𝜆𝑥:𝐴.𝑏)𝑥)𝛽=(𝑏), which is (142.7). For uniqueness, let 𝑢 =(𝑐) :Γ ⟶ΘΔ satisfy the same equation, so that 𝑐 𝑥 ≈𝑏 with 𝑥 not free in 𝑐. Then 𝑐𝜂=𝜆𝑥:𝐴.𝑐𝑥𝑐𝑜𝑛𝑔𝑟𝑢𝑒𝑛𝑐𝑒=𝜆𝑥:𝐴.𝑏𝑑𝑒𝑓.=𝜆(𝑏), so 𝑢 =𝜆(𝑏) as an arrow of 𝐂𝐭𝐱𝛽𝜂. For contexts with several declarations, iterate: Θ with declarations 𝑦1 :𝐵1,…,𝑦𝑘 :𝐵𝑘 has exponential the context with declarations 𝑧𝑗 :𝐴 →𝐵𝑗, and both the equation and the uniqueness argument apply entrywise. ◻
The 𝜂-rule is used exactly once, in the uniqueness clause, and nothing else in the proof replaces it. Dropping 𝜂 leaves the arrow 𝜆(𝑏) existing but no longer unique, which is a failure of the universal property, not of the object: 𝐂𝐭𝐱𝛽 has an exponential candidate and two distinct transposes of the same arrow.
★★☆ Let ≈𝛽 be the congruence generated by 𝛽 alone. Take 𝐴 =𝐵 =𝟐, Γ =𝑤 :𝟐 →𝟐 and 𝑏:=𝑤 𝑥. Exhibit two substitutions Γ ⟶𝑧 :𝟐 →𝟐 that both satisfy (142.7) for 𝑏 and are not ≈𝛽-equal, and identify which clause of definition 142.26 fails.
Referenced from 2 locations
★☆☆ In a preorder viewed as a category, write out what an exponential 𝑞𝑝 is in order-theoretic language, and identify it in the preorder of subsets of a fixed set ordered by inclusion.
Referenced from 2 locations
★★☆ Prove the functor laws for 𝑏 ↦𝑏𝑎 asserted in proposition 142.27, by showing that both sides of each law satisfy the equation (142.7) characterizing the same transpose (half a page).
Referenced from 2 locations
Slices
A dependent family does not live in C; it lives over an object of C. Proposition 142.9 already used the description of a family (𝐸𝑔)𝑔∈Γ as an arrow 𝐸 ⟶Γ. Collecting those arrows into a category makes substitution a functor.
Let Γ be an object of C. The slice category C/Γ has as objects the arrows 𝑝 :𝐸 ⟶Γ of C, and as arrows 𝑝 ⟶𝑝′ the arrows 𝑘 :𝐸 ⟶𝐸′ of C with 𝑝′ ∘𝑘 =𝑝. Composition and identities are those of C.
Referenced from 2 locations
The condition 𝑝′ ∘𝑘 =𝑝 is preserved by composition and holds for identities, so C/Γ is a category.
Let C have pullbacks and let Γ be an object.
idΓ is a terminal object of C/Γ.
If 𝑢 :𝑃 ⟶𝐸, 𝑣 :𝑃 ⟶𝐸′ is a pullback of 𝑝′ along 𝑝, then 𝑝 ∘𝑢 with the two arrows 𝑢,𝑣 is a product of 𝑝 and 𝑝′ in C/Γ.
Referenced from 4 locations
Proof of Proposition 142.32 — Elementary structure of a slice
Proof. (1) An arrow 𝑝 ⟶idΓ is an arrow 𝑘 :𝐸 ⟶Γ with idΓ ∘𝑘 =𝑝, that is, 𝑘 =𝑝; so there is exactly one.
(2) First, 𝑢 is an arrow 𝑝 ∘𝑢 ⟶𝑝 and 𝑣 is an arrow 𝑝 ∘𝑢 ⟶𝑝′ in C/Γ, the latter because 𝑝′ ∘𝑣 =𝑝 ∘𝑢 is the pullback square. Let 𝑞 :𝑋 ⟶Γ be an object of C/Γ with arrows 𝑓 :𝑞 ⟶𝑝 and 𝑔 :𝑞 ⟶𝑝′, that is, 𝑝 ∘𝑓 =𝑞 =𝑝′ ∘𝑔. The pullback property applied to 𝑓,𝑔 gives exactly one ℎ :𝑋 ⟶𝑃 with 𝑢 ∘ℎ =𝑓 and 𝑣 ∘ℎ =𝑔; and ℎ is an arrow 𝑞 ⟶𝑝 ∘𝑢 in the slice because 𝑝 ∘𝑢 ∘ℎ =𝑝 ∘𝑓 =𝑞. Conversely any slice arrow 𝑞 ⟶𝑝 ∘𝑢 satisfying the two equations is such an ℎ. So the mediating arrow exists and is unique in C/Γ. ◻
Two functors relate slices over different objects.
Let C have pullbacks and 𝛾 :Δ ⟶Γ. Choose, for each object 𝑝 :𝐸 ⟶Γ of C/Γ, a pullback square
Diagram and let 𝛾∗ :C/Γ →C/Δ send 𝑝 to 𝛾∗𝑝 and a slice arrow 𝑘 :𝑝 ⟶𝑝′ to the unique arrow 𝛾∗𝑘 with 𝛾𝑝′ ∘𝛾∗𝑘 =𝑘 ∘𝛾𝑝 and 𝛾∗𝑝′ ∘𝛾∗𝑘 =𝛾∗𝑝. Let Σ𝛾 :C/Δ →C/Γ send 𝑞 :𝐹 ⟶Δ to 𝛾 ∘𝑞 and a slice arrow to itself.
Referenced from 6 locations
Σ𝛾 needs no choices: composition with 𝛾 is defined outright, and an arrow 𝑘 with 𝑞′ ∘𝑘 =𝑞 satisfies 𝛾 ∘𝑞′ ∘𝑘 =𝛾 ∘𝑞. The functor 𝛾∗ needs a choice of pullback for each object, because definition 142.8 determines the pullback only up to a unique isomorphism (lemma 142.3 applies verbatim to any universal property). Section 142.10 returns to that choice.
Let C have pullbacks and 𝛾 :Δ ⟶Γ. Then Σ𝛾 ⊣𝛾∗.
Referenced from 3 locations
Proof of Theorem 142.34 — Dependent sum is left adjoint to substitution
Proof. Let 𝑞 :𝐹 ⟶Δ be an object of C/Δ and 𝑝 :𝐸 ⟶Γ an object of C/Γ. An arrow Σ𝛾𝑞 ⟶𝑝 is an arrow 𝑡 :𝐹 ⟶𝐸 of C with 𝑝 ∘𝑡 =𝛾 ∘𝑞. An arrow 𝑞 ⟶𝛾∗𝑝 is an arrow 𝑠 :𝐹 ⟶𝛾∙𝐸 with 𝛾∗𝑝 ∘𝑠 =𝑞.
Given such an 𝑠, put 𝜑−1(𝑠):=𝛾𝑝 ∘𝑠. Then 𝑝 ∘𝛾𝑝 ∘𝑠 =𝛾 ∘𝛾∗𝑝 ∘𝑠 =𝛾 ∘𝑞 by the pullback square and the hypothesis on 𝑠, so 𝜑−1(𝑠) is an arrow Σ𝛾𝑞 ⟶𝑝.
Given such a 𝑡, the pair (𝑞,𝑡) satisfies 𝛾 ∘𝑞 =𝑝 ∘𝑡, so the pullback property gives exactly one 𝜑(𝑡) :𝐹 ⟶𝛾∙𝐸 with 𝛾∗𝑝 ∘𝜑(𝑡) =𝑞 and 𝛾𝑝 ∘𝜑(𝑡) =𝑡. The first equation says 𝜑(𝑡) is a slice arrow 𝑞 ⟶𝛾∗𝑝; the second says 𝜑−1(𝜑(𝑡)) =𝑡. Conversely, for 𝑠 as above, both 𝑠 and 𝜑(𝜑−1(𝑠)) are arrows into the pullback with the same two composites, so they are equal. Hence 𝜑 is a bijection.
For (142.5), let ℎ :𝑞′ ⟶𝑞 in C/Δ and 𝑘 :𝑝 ⟶𝑝′ in C/Γ. Both 𝜑(𝑡 ∘ℎ) and 𝜑(𝑡) ∘ℎ are arrows into the pullback whose composites with 𝛾∗𝑝 and 𝛾𝑝 are 𝑞′ and 𝑡 ∘ℎ, so they agree. Both 𝜑(𝑘 ∘𝑡) and 𝛾∗𝑘 ∘𝜑(𝑡) are arrows into 𝛾∙𝐸′ whose composite with 𝛾∗𝑝′ is 𝑞 and whose composite with 𝛾𝑝′ is 𝑘 ∘𝑡 — for the second, using 𝛾𝑝′ ∘𝛾∗𝑘 =𝑘 ∘𝛾𝑝 from definition 142.33 — so they agree. ◻
Let 𝐼 be a set and let 𝐒𝐞𝐭𝐼 be the category whose objects are 𝐼-indexed families (𝐴𝑖)𝑖∈𝐼 of sets and whose arrows (𝐴𝑖) ⟶(𝐵𝑖) are families of functions (𝑘𝑖 :𝐴𝑖 →𝐵𝑖). Then 𝐒𝐞𝐭/𝐼 and 𝐒𝐞𝐭𝐼 are equivalent in the sense of definition 141.45.
Referenced from 5 locations
Proof of Proposition 142.35 — Slices over a set are families
Proof. Define Φ :𝐒𝐞𝐭/𝐼 →𝐒𝐞𝐭𝐼 by Φ(𝑝 :𝐸 →𝐼):=(𝑝−1(𝑖))𝑖∈𝐼 and, for a slice arrow 𝑘 :𝑝 ⟶𝑝′, by Φ(𝑘)𝑖:=𝑘 ↾𝑝−1(𝑖), which lands in 𝑝′−1(𝑖) because 𝑝′ ∘𝑘 =𝑝. Define Ψ :𝐒𝐞𝐭𝐼 →𝐒𝐞𝐭/𝐼 by Ψ((𝐴𝑖)):=(𝗉𝗋1 :{(𝑖,𝑎) ∣𝑖 ∈𝐼, 𝑎 ∈𝐴𝑖} →𝐼) and Ψ((𝑘𝑖))(𝑖,𝑎):=(𝑖,𝑘𝑖(𝑎)). Both preserve identities and composition by construction.
ΦΨ sends (𝐴𝑖) to ({(𝑖,𝑎) ∣𝑎 ∈𝐴𝑖})𝑖∈𝐼, and 𝑎 ↦(𝑖,𝑎) is a natural isomorphism to the identity functor. ΨΦ sends 𝑝 :𝐸 →𝐼 to the projection from {(𝑖,𝑒) ∣𝑝(𝑒) =𝑖}, and 𝑒 ↦(𝑝(𝑒),𝑒) is an isomorphism 𝐸 →ΨΦ(𝑝) over 𝐼, natural in 𝑝 because 𝑘(𝑒) has 𝑝′(𝑘(𝑒)) =𝑝(𝑒). By definition 141.45 the two categories are equivalent. ◻
★★☆ For 𝛾 :Δ ⟶Γ construct an isomorphism of categories (C/Γ)/𝛾 ≅C/Δ, and show that it carries the forgetful functor (C/Γ)/𝛾 →C/Γ to Σ𝛾.
Referenced from 2 locations
★☆☆ Under proposition 142.35, compute Σ𝛾 on families for a function 𝛾 :Δ →Γ. Show that Σ𝛾(𝐵)𝑔 is in bijection with the disjoint union ∐𝑑∈𝛾−1(𝑔)𝐵𝑑.
Referenced from 2 locations
Locally cartesian closed categories
A category C is locally cartesian closed if it has a terminal object and every slice C/Γ is cartesian closed.
Referenced from 3 locations
This is the definition used by Castellan, Clairambault and Dybjer, Categories with Families, Definition 30 (arXiv version, physical page 41). The same source records, on the same page, the equivalent formulation by dependent products: C has finite limits and every pullback functor 𝛾∗ has a right adjoint. The implication proved here is the one this book uses.
If 𝐹 ⊣𝐺 with 𝐹 :C →D, 𝐺 :D →C, and 𝐹′ ⊣𝐺′ with 𝐹′ :D →E, 𝐺′ :E →D, then 𝐹′𝐹 ⊣𝐺𝐺′.
Referenced from 4 locations
Proof of Lemma 142.37 — Adjunctions compose
Proof. Compose the bijections: homE(𝐹′𝐹𝑐,𝑒)≅homD(𝐹𝑐,𝐺′𝑒)≅homC(𝑐,𝐺𝐺′𝑒). Each equation of (142.5) for the composite is the corresponding equation for the outer bijection followed by the one for the inner: for ℎ :𝑐′ ⟶𝑐, the outer bijection is natural in its first argument along 𝐹ℎ, and the inner along ℎ; for 𝑘 :𝑒 ⟶𝑒′, the inner is natural in its second argument along 𝐺′𝑘 and the outer along 𝑘, and 𝐺(𝐺′𝑘) =(𝐺𝐺′)𝑘 by the functor laws. ◻
Let C have finite limits and suppose that for every arrow 𝛾 :Δ ⟶Γ the functor 𝛾∗ has a right adjoint Π𝛾. Then C is locally cartesian closed, and for every 𝛾 Σ𝛾⊣𝛾∗⊣Π𝛾.
Referenced from 2 locations
Proof of Theorem 142.38 — Dependent products give local closure
Proof. Theorem 142.34 gives the left half of (142.9), and the right half is the hypothesis. Fix Γ; by proposition 142.32 the slice C/Γ has a terminal object and binary products, the latter computed by pullback. By proposition 142.27 it remains to give, for each object 𝛾 :Δ ⟶Γ of the slice, a right adjoint to ( −) ×𝛾 :C/Γ →C/Γ.
The product of 𝑝 and 𝛾 in C/Γ is 𝛾 ∘𝛾∗𝑝 by proposition 142.32(2) read on the chosen pullback square of definition 142.33, which is Σ𝛾(𝛾∗𝑝). Hence (−)×𝛾=Σ𝛾∘𝛾∗, as functors C/Γ →C/Γ. Applying lemma 142.37 to Σ𝛾 ⊣𝛾∗ and 𝛾∗ ⊣Π𝛾 gives Σ𝛾 ∘𝛾∗ ⊣Π𝛾 ∘𝛾∗. So the exponential by 𝛾 in C/Γ is Π𝛾 ∘𝛾∗, and C/Γ is cartesian closed. ◻
Read slices as families through proposition 142.35. Fix a function 𝛾 :Δ →Γ. For a family (𝐵𝑑)𝑑∈Δ and 𝑔 ∈Γ put Π𝛾(𝐵)𝑔:={𝑠:𝛾−1(𝑔)→⋃𝑑𝐵𝑑∣𝑠(𝑑)∈𝐵𝑑 for all 𝑑∈𝛾−1(𝑔)}, the set of choice functions on the fiber, and recall 𝛾∗(𝐴)𝑑 =𝐴𝛾(𝑑) and Σ𝛾(𝐵)𝑔 ={(𝑑,𝑏) ∣𝑑 ∈𝛾−1(𝑔), 𝑏 ∈𝐵𝑑}.
For families (𝐴𝑔)𝑔∈Γ and (𝐵𝑑)𝑑∈Δ there are bijections hom𝐒𝐞𝐭Γ(Σ𝛾𝐵,𝐴)≅hom𝐒𝐞𝐭Δ(𝐵,𝛾∗𝐴),hom𝐒𝐞𝐭Δ(𝛾∗𝐴,𝐵)≅hom𝐒𝐞𝐭Γ(𝐴,Π𝛾𝐵), natural in 𝐴 and 𝐵.
Referenced from 4 locations
Proof of Proposition 142.39 — The three functors on families
Proof. First bijection. A family of functions 𝑡𝑔 :Σ𝛾(𝐵)𝑔 →𝐴𝑔 assigns to each 𝑔, each 𝑑 ∈𝛾−1(𝑔) and each 𝑏 ∈𝐵𝑑 an element 𝑡𝑔(𝑑,𝑏) ∈𝐴𝑔. Since 𝑑 determines 𝑔 =𝛾(𝑑), this is the same as a family of functions 𝑠𝑑 :𝐵𝑑 →𝐴𝛾(𝑑) =𝛾∗(𝐴)𝑑, by 𝑠𝑑(𝑏):=𝑡𝛾(𝑑)(𝑑,𝑏) and 𝑡𝑔(𝑑,𝑏):=𝑠𝑑(𝑏). The two assignments are mutually inverse by direct substitution.
Second bijection. A family 𝑢𝑑 :𝐴𝛾(𝑑) →𝐵𝑑 assigns to each 𝑑 and each 𝑎 ∈𝐴𝛾(𝑑) an element 𝑢𝑑(𝑎) ∈𝐵𝑑. Define 𝑣𝑔 :𝐴𝑔 →Π𝛾(𝐵)𝑔 by 𝑣𝑔(𝑎)(𝑑):=𝑢𝑑(𝑎) for 𝑑 ∈𝛾−1(𝑔); this is a legitimate choice function because 𝑢𝑑(𝑎) ∈𝐵𝑑, and 𝑎 ∈𝐴𝑔 =𝐴𝛾(𝑑) for such 𝑑. Conversely a family 𝑣𝑔 :𝐴𝑔 →Π𝛾(𝐵)𝑔 defines 𝑢𝑑(𝑎):=𝑣𝛾(𝑑)(𝑎)(𝑑). Then 𝑣′𝑔(𝑎)(𝑑)𝑑𝑒𝑓.=𝑢𝑑(𝑎)𝑑𝑒𝑓.=𝑣𝛾(𝑑)(𝑎)(𝑑)𝛾(𝑑)=𝑔=𝑣𝑔(𝑎)(𝑑) for every 𝑑 ∈𝛾−1(𝑔), so 𝑣′𝑔(𝑎) =𝑣𝑔(𝑎) as functions on the fiber; and 𝑢′𝑑(𝑎) =𝑣𝛾(𝑑)(𝑎)(𝑑) =𝑢𝑑(𝑎).
Naturality. Both bijections were defined by formulas that only rename arguments, so post-composing with a family (𝑘𝑔) or (𝑙𝑑) commutes with them; writing out either equation of (142.5) gives the same expression on both sides after substituting the defining formula. ◻
The family calculation in the syntax
Let T now be the theory of chapter 27: the rules of chapter 26 together with definition 27.2, definition 27.9 and definition 27.14. Work in 𝐂𝐭𝐱T of definition 142.10. For Γ ⊢𝐴 𝗍𝗒𝗉𝖾 the display map is 𝑤𝐴 :Γ.𝐴 ⟶Γ, and by proposition 142.11 the chosen pullback along an arbitrary 𝑓 is given by substitution. Substitution along a display map is weakening.
Let Γ ⊢𝐴 𝗍𝗒𝗉𝖾 and Γ ⊢𝐵 𝗍𝗒𝗉𝖾. Then 𝑤∗𝐴(𝑤𝐵) =𝑤𝐵[𝑤𝐴] :Γ.𝐴.𝐵[𝑤𝐴] ⟶Γ.𝐴.
Referenced from 3 locations
Proof of Proposition 142.41 — Weakening is the substitution functor
Proof. Proposition 142.11 with 𝑓:=𝑤𝐴 and the type 𝐵 gives a pullback square whose left edge is 𝑤𝐵[𝑤𝐴]. Choosing that square as the chosen pullback of definition 142.33 gives the claim. ◻
Let Γ ⊢𝐴 𝗍𝗒𝗉𝖾 and Γ.𝐴 ⊢𝐶 𝗍𝗒𝗉𝖾. In 𝐂𝐭𝐱T, Π𝑤𝐴(𝑤𝐶)=𝑤∏𝑥:𝐴𝐶:Γ.∏𝑥:𝐴𝐶⟶Γ is a right adjoint value: there is a bijection hom𝐂𝐭𝐱T/Γ.𝐴(𝑤∗𝐴(𝑝),𝑤𝐶)≅hom𝐂𝐭𝐱T/Γ(𝑝,𝑤∏𝑥:𝐴𝐶) natural in 𝑝, for every object 𝑝 of 𝐂𝐭𝐱T/Γ of the form 𝑤𝐷 with Γ ⊢𝐷 𝗍𝗒𝗉𝖾.
Referenced from 2 locations
Proof of Theorem 142.42 — The dependent product along a display map
Proof. Both sides are described by terms, and the bijection is 𝜆-abstraction.
The left-hand set. By proposition 142.41, 𝑤∗𝐴(𝑤𝐷) =𝑤𝐷[𝑤𝐴]. An arrow 𝑤𝐷[𝑤𝐴] ⟶𝑤𝐶 in 𝐂𝐭𝐱T/Γ.𝐴 is a context substitution 𝑘 :Γ.𝐴.𝐷[𝑤𝐴] ⟶Γ.𝐴.𝐶 with 𝑤𝐶 ∘𝑘 =𝑤𝐷[𝑤𝐴]. Splitting 𝑘 as in the proof of proposition 142.11, the condition forces its first components to be the variable list of Γ.𝐴, so 𝑘 is determined by its last entry, a term Γ,𝑥:𝐴,𝑦:𝐷⊢𝑐:𝐶 after renaming, where 𝑦 does not occur in 𝐴 and 𝑥 does not occur in 𝐷.
The right-hand set. An arrow 𝑤𝐷 ⟶𝑤∏𝑥:𝐴𝐶 in 𝐂𝐭𝐱T/Γ is likewise determined by a term Γ,𝑦 :𝐷 ⊢𝑒 :∏𝑥:𝐴𝐶.
The bijection. Send 𝑐 to 𝑒:=𝜆(𝑥 :𝐴). 𝑐, which has type ∏𝑥:𝐴𝐶 over Γ,𝑦 :𝐷 by Π-intro. Send 𝑒 to 𝑐:=𝑒 𝑥, of type 𝐶 over Γ,𝑥 :𝐴,𝑦 :𝐷 by Π-elim. The two composites are identities: (𝜆(𝑥:𝐴).𝑐)𝑥Π−𝛽≡𝑐,𝜆(𝑥:𝐴).(𝑒𝑥)Π−𝜂≡𝑒, the second requiring 𝑥 not free in 𝑒, which holds because 𝑒 is typed over Γ,𝑦 :𝐷. Judgmental equality is exactly the identification made in definition 142.10, so the two assignments are mutually inverse on arrows.
Naturality. Let ℎ :𝑤𝐷′ ⟶𝑤𝐷 over Γ, given by a term Γ,𝑦′ :𝐷′ ⊢𝑑 :𝐷. Precomposition substitutes 𝑑 for 𝑦, and 𝜆-abstraction commutes with that substitution because 𝑥 is chosen fresh for 𝑑: (𝜆(𝑥 :𝐴). 𝑐)[𝑑/𝑦] =𝜆(𝑥 :𝐴). 𝑐[𝑑/𝑦]. Postcomposition with an arrow into 𝑤𝐶 substitutes into 𝑐 under the binder, and the same freshness applies. ◻
Let Γ ⊢𝐴 𝗍𝗒𝗉𝖾 and Γ.𝐴 ⊢𝐶 𝗍𝗒𝗉𝖾. Then Σ𝑤𝐴(𝑤𝐶) =𝑤𝐴 ∘𝑤𝐶 :Γ.𝐴.𝐶 ⟶Γ is isomorphic in 𝐂𝐭𝐱T/Γ to 𝑤∑𝑥:𝐴𝐶.
Referenced from 2 locations
Proof of Proposition 142.43 — The dependent sum along a display map
Proof. Define 𝜃 :Γ.𝐴.𝐶 ⟶Γ.∑𝑥:𝐴𝐶 by the variable list of Γ followed by the term (𝑥,𝑦), where 𝑥,𝑦 are the last two variables; it is a context substitution by Σ-intro. Define 𝜃′ :Γ.∑𝑥:𝐴𝐶 ⟶Γ.𝐴.𝐶 by the variable list of Γ followed by 𝗉𝗋1(𝑧) and 𝗉𝗋2(𝑧), where 𝑧 is the last variable; the two entries are typed by Σ-elim1 and Σ-elim2. Both commute with the maps to Γ, since both keep the variable list of Γ. Then 𝜃∘𝜃′=(…,(𝗉𝗋1(𝑧),𝗉𝗋2(𝑧)))Σ−𝜂≡(…,𝑧)=id, and 𝜃′∘𝜃=(…,𝗉𝗋1(𝑥,𝑦),𝗉𝗋2(𝑥,𝑦))Σ−𝛽1,Σ−𝛽2≡(…,𝑥,𝑦)=id. ◻
The three operations of (142.9) are therefore, in the syntax, the dependent sum, weakening, and the dependent product, and the adjunctions are the introduction and elimination rules together with their 𝛽- and 𝜂-equations.
★☆☆ Show that the empty context is terminal in 𝐂𝐭𝐱T and that 𝑤𝟏 :Γ.𝟏 ⟶Γ is an isomorphism. Which rule of definition 27.14 is used?
Referenced from 2 locations
★★★ Prove the Frobenius equation in a locally cartesian closed category: for 𝛾 :Δ ⟶Γ, 𝑝 in C/Γ and 𝑞 in C/Δ, the canonical arrow Σ𝛾(𝑞 ×𝛾∗𝑝) ⟶Σ𝛾(𝑞) ×𝑝 is an isomorphism. Then verify it in 𝐒𝐞𝐭Γ by computing both sides at a fixed 𝑔 ∈Γ.
Referenced from 2 locations
The strictness obstruction
Definition 142.33 made a choice. A pullback is determined only up to a unique isomorphism, so 𝛾∗ depends on which pullback square is selected for each object. The syntax makes no such choice: by proposition 71.51 the action of a composite substitution is literally the composite action, 𝐴[𝑓∘𝑔]=𝐴[𝑓][𝑔], an identity of raw expressions up to 𝛼-equivalence, not an isomorphism. The two demands do not agree, and three sets suffice to show that they do not.
Work in 𝐒𝐞𝐭 with the canonical choice (142.3): for 𝛾 :Δ →Γ and 𝑝 :𝐸 →Γ take 𝛾∙𝐸 ={(𝑑,𝑒) ∣𝛾(𝑑) =𝑝(𝑒)} with 𝛾∗𝑝 the first projection. Put Γ={0,1},Δ={𝑎},Ω={𝑢},𝛾(𝑎)=0,𝛿(𝑢)=𝑎, and let 𝑝 :𝐸 →Γ with 𝐸 ={𝑒} and 𝑝(𝑒) =0. Then 𝛾∙𝐸={(𝑎,𝑒)},𝛿∙(𝛾∙𝐸)={(𝑢,(𝑎,𝑒))},(𝛾∘𝛿)∙𝐸={(𝑢,𝑒)}. The two sets {(𝑢,(𝑎,𝑒))} and {(𝑢,𝑒)} are not equal: their unique elements are a pair whose second component is a pair, and a pair whose second component is 𝑒. Hence 𝛿∗ ∘𝛾∗ ≠(𝛾 ∘𝛿)∗ as functors, while (𝑢,(𝑎,𝑒)) ↦(𝑢,𝑒) is an isomorphism between the two values.
Referenced from 4 locations
The example is not an artifact of one bad choice. Any choice function on pullbacks produces objects specified by their mapping property alone, and no mapping property distinguishes 𝛿∗(𝛾∗𝑝) from (𝛾 ∘𝛿)∗𝑝; a choice making the two literally equal for all 𝛾,𝛿,𝑝 is an extra structure, not a consequence of the finite limits.
This is the obstruction identified by Castellan, Clairambault and Dybjer, Categories with Families, physical pages 38–39: for an arbitrary choice of pullbacks the assignment is not functorial, so “the codomain fibration is not split, whereas the fibration implicit in a cwf is always split,” and Seely’s proposed interpretation of type theory in locally cartesian closed categories “sends types that are provably equal in the syntax to morphisms in C that are only known to be isomorphic.” The same pages record two repairs: Curien weakens equality to isomorphism in the syntax and adds explicit coercions, at the cost of a coherence theorem; Hofmann replaces a type by an object of the slice together with a pre-chosen substitution pullback for every substitution, chosen so that the choices compose. The second repair is the one that survives into the algebraic presentations, and its cost is recorded on physical page 39: the resulting assignment is a pseudofunctor and not a functor, so the correspondence between finitely complete categories and the algebraic models is a biequivalence of 2-categories rather than an equivalence of categories. With Π-types added, that statement is Theorem 9 of the same source, physical page 43.
Universal objects therefore describe the operations of a dependent calculus correctly and its equations only up to isomorphism. Recovering the equations requires a presentation in which substitution is a primitive operation with stated laws, rather than an operation reconstructed from a mapping property.
Suggested first pass.
Begin with exercise 142.23 and exercise 142.24, then complete exercise 142.27.
★☆☆ Take 𝑆 ={𝑠1,𝑠2} and 𝑀 =(ℕ, +,0). Write 𝜂𝑆, 𝜀𝑀, and both triangle identities of example 142.22 explicitly on the elements [𝑠1,𝑠2,𝑠1] and 3.
Referenced from 2 locations
★★☆ Reconstruct theorem 142.23 for a pullback without invoking a general index category: given 𝐹 ⊣𝐺 and a pullback square in D, prove directly that its 𝐺-image is a pullback square, naming the equation of (142.5) used at each step.
Referenced from 3 locations
★★☆ Using proposition 142.35, compute the exponential of two objects of 𝐒𝐞𝐭/𝐼 directly as a family: show that (𝐵𝐴)𝑖 is the set of functions 𝐴𝑖 →𝐵𝑖, and check the 𝜆-equation (142.7) fiberwise. Then explain why this computation does not immediately give Π𝛾 for a general 𝛾 :Δ →Γ.
Referenced from 3 locations
★★★ (The section object.) Let C have finite limits and suppose every slice of C is cartesian closed. Fix 𝛾 :Δ ⟶Γ and 𝛿 :𝐸 ⟶Δ. In C/Γ form the exponential (𝛾 ∘𝛿)𝛾 and the arrow 𝛾𝛾 obtained by transposing 𝗉𝗋2; let 𝜎 :idΓ ⟶𝛾𝛾 be the transpose of 𝗉𝗋2 again, viewed as a point. Define Π𝛾(𝛿) as the pullback of 𝛿𝛾 along 𝜎, where 𝛿𝛾 :(𝛾 ∘𝛿)𝛾 ⟶𝛾𝛾 is the exponential transpose of 𝛿. Prove that this construction is right adjoint to 𝛾∗. Check your construction against (142.10) by computing both in 𝐒𝐞𝐭 for Γ ={0,1}.
Referenced from 2 locations
★★☆ Continue example 142.44. Show that no choice of pullbacks in 𝐒𝐞𝐭 satisfies 𝛿∗𝛾∗ =(𝛾 ∘𝛿)∗ for all composable pairs and all 𝑝, by exhibiting one family for which the two prescriptions force different underlying sets whenever the chosen pullback of a map along an identity is required to be that map itself. State precisely which two of your requirements are incompatible.
Referenced from 2 locations
★★★ Practical project.lccc-dependent-product-calculator Implement a calculator for the three functors of (142.9) over finite sets. A family over a finite set Γ is given as an explicit list of pairs (𝑔,list of elements of 𝐴𝑔), and a function 𝛾 :Δ →Γ as a list of pairs. The program must compute 𝛾∗𝐴, Σ𝛾𝐵, and Π𝛾𝐵 as defined in (142.10) and above it, and must implement both bijections of proposition 142.39 in both directions.
Invariant. Every family the program returns is well formed: each element of Π𝛾(𝐵)𝑔 is a function whose domain is exactly 𝛾−1(𝑔) and whose value at 𝑑 lies in 𝐵𝑑; each element of Σ𝛾(𝐵)𝑔 is a pair (𝑑,𝑏) with 𝛾(𝑑) =𝑔 and 𝑏 ∈𝐵𝑑. The program checks this invariant on every output before printing it.
Concrete result. For named inputs the program prints, for each of the four transposition directions, either accepted together with the transported family, or rejected together with the first index at which the round trip differs from the input. It also prints the two composite families 𝛿∗(𝛾∗𝑝) and (𝛾 ∘𝛿)∗𝑝 and reports whether they are literally equal.
Acceptance test. Run it on Γ ={0,1}, Δ ={𝑎}, 𝛾(𝑎) =0, Ω ={𝑢}, 𝛿(𝑢) =𝑎, on 𝐴 with 𝐴0 ={ ∗} and 𝐴1 =∅, and on 𝐵 with 𝐵𝑎 ={𝑝,𝑞}. The expected outcomes are: Π𝛾(𝐵)0 has two elements and Π𝛾(𝐵)1 has exactly one, the empty function; all four round trips print accepted; and the two composite families are reported unequal, with elements (𝑢,(𝑎,𝑒)) and (𝑢,𝑒) for the one-element family 𝐸 over 0. A run in which the empty fiber yields an empty Π𝛾(𝐵)1 has the quantifier of (142.10) implemented incorrectly.
Referenced from 3 locations
Sources. The elementary theory of limits, adjunctions, and the preservation theorem follows Riehl [Rie16]; Asperti and Longo [AL91] develop the same material with typed calculi as the running examples. The formulation of quantifiers and substitution as adjoints originates with F. W. Lawvere, Adjointness in Foundations, Dialectica 23 (1969), reprinted in Reprints in Theory and Applications of Categories 16 (2006); the systematic fibrational development is Jacobs [Jac99]. The interpretation of dependent products as right adjoints to pullback in a locally cartesian closed category is due to R. A. G. Seely, Locally cartesian closed categories and type theory, Mathematical Proceedings of the Cambridge Philosophical Society 95 (1984), 33–48. Definition 142.36 and the boundary statements of section 142.10 are taken from Castellan, Clairambault and Dybjer [CCD21], physical pages 38–43 of the arXiv version; Hofmann’s split-fibration repair and the partial-interpretation method are in [Hof97]. The algebraic presentation that restores (142.11) as a primitive equation is developed in chapter 54.