Solutions to the exercises of DaoFP, Chapter 11: DaoFP Chapter 11 Exercises. Index: Map of Content.
Solution 11.1.1
tailV :: Vec ('S n) a -> Vec n a
tailV (VCons _ as) = as
-- tailV emptyV -- type error: couldn't match 'Z with 'S nThe compiler rejects tailV emptyV because Vec 'Z Int does not unify with Vec ('S n) a; the pattern match is exhaustive since VNil cannot have type Vec ('S n) a.
Sources: DaoFP Exercise 11.1.1.
Solution 11.2.1
A cone over is a pair of arrows , with — a condition that is automatic since there is only one arrow . So a cone is just a pair of arrows, and the pullback’s universal property (unique with , ) is exactly the universal property of . Fibrationally: pulling back along plants a copy of over every point of — the trivial bundle (Base Change Functor).
Sources: DaoFP Exercise 11.2.1.
Solution 11.2.2
A diagram of that shape is a Cospan . A Cone with apex consists of , , with ; so is redundant and a cone is a pair with — a commuting square. The limit (terminal cone) is then an object with , such that every such square factors uniquely through it: precisely the pullback.
Sources: DaoFP Exercise 11.2.2.
Solution 11.2.3
Let , be objects of and their pullback with legs . It is an object of via , and are slice morphisms (they commute with the projections by construction). Given a slice object with slice morphisms , — i.e. — the square commutes, so the pullback gives a unique with , ; is a slice morphism since . This is the universal property of the product in . (Kittenlab’s “typed products” in are exactly this.)
Sources: DaoFP Exercise 11.2.3; Kittenlab Lecture 13.
Solution 11.2.4
Let and be the pullback legs. The composite and the projection satisfy , so they form a commuting square over . By the universal property of the pullback there is a unique with and — the latter saying is a morphism in . Uniqueness gives functoriality (, ).
Sources: DaoFP Exercise 11.2.4.
Solution 11.4.1
and . The fiber of over is the set of sections of over all of ; the fiber over is the set of sections over the empty patch — a singleton (the empty section). Correspondingly contains only the fiber of over , replanted over every point of , so a map is a family of sections indexed by ; the right-hand side sends to those sections and sends the fiber to the unique point of — there is no other choice.
Sources: DaoFP Exercise 11.4.1.
Solution 11.4.2
(i) , one point over each , nothing elsewhere. (ii) A fiberwise map picks, for each , an element of : a section of over the patch . (iii) The adjunction gives , and the right side is the set of points of lying over ; so that fiber is the set of partial sections over . (iv) If then and , the object of global sections.
Sources: DaoFP Exercise 11.4.2.