solution

Solutions to the exercises of 7 Sketches, Chapter 7: 7S Chapter 7 Exercises. Index: Map of Content.

Solution 7.4

proof — Exercise 7.4

Let the diagram be over with verticals , and suppose the right square is a pullback.

Left square pullback rectangle pullback. Given and with , the right pullback yields a unique with and ; the left pullback then yields a unique with and . Hence and . If also satisfies these, then satisfies the defining equations of , so , and then by uniqueness in the left square.

Rectangle pullback left square pullback. Given and with , set . Then , so the rectangle yields a unique with and . Now and both satisfy and , so by uniqueness in the right pullback . Uniqueness of follows from uniqueness for the rectangle.

Sources: 7 Sketches, Exercise 7.4 and Solution A.7.

Solution 7.6

proof — Exercise 7.6

The pullback definition says: for all , if then (the mediating arrow into the pullback must equal both and ).

  1. If is mono and , take , . Then , so , so .
  2. If is injective and , then for each , gives ; so .
import Mathlib
#check @CategoryTheory.mono_iff_injective

Sources: 7 Sketches, Exercise 7.6 and Solution A.7.

Solution 7.7

proof — Exercise 7.7

  1. Let and . Since , the universal property gives with and . For the other composite: and ; satisfies the same two equations, so by uniqueness .
  2. Given and with , the unique with and is .
import Mathlib
open CategoryTheory Limits
#check @CategoryTheory.IsPullback.of_horiz_isIso    -- a square with iso horizontals is a pullback
#check @CategoryTheory.IsPullback.of_id_fst          -- the identity square over f is a pullback

Sources: 7 Sketches, Exercise 7.7 and Solution A.7.

Solution 7.8

proof — Exercise 7.8

Build a cube: the front and bottom faces are the given pullback, the right face is the square with identities and — a pullback because is mono (Definition 7.5) — and the back and top faces are the “identity” squares of 7S Exercise 7.7 (2), which are pullbacks. By the pasting lemma, right face + back face pullbacks make the diagonal rectangle a pullback; then front face pullback + rectangle pullback make the left face with identities and a pullback, which says is mono. Hence monomorphisms are stable under pullback.

import Mathlib
open CategoryTheory Limits
#check @CategoryTheory.Limits.pullback.fst_of_mono    -- Mono g → Mono (pullback.fst f g)
#check @CategoryTheory.Limits.pullback.snd_of_mono    -- Mono f → Mono (pullback.snd f g)

Sources: 7 Sketches, Exercise 7.8 and Solution A.7.

Solution 7.9

example program — Exercise 7.9

: first the surjection , onto the image , then the inclusion of the image into .

using Catlab
f = FinFunction([1, 1, 2], 3)
e, m = epi_mono(f)
collect(e), collect(m)          # ([1, 1, 2], [1, 2])
compose(e, m) == f              # true

Sources: 7 Sketches, Exercise 7.9 and Solution A.7.

Solution 7.11

proof — Exercise 7.11

  1. is a top element and satisfies the universal property of the Meet , so the monoidal structure is cartesian. The quantale’s satisfies , which is the universal property of the Exponential Object . So is a cartesian closed preorder — a complete Heyting Algebra.
  2. No: quantales have all joins, but a cartesian closed preorder need not. Example: (the Product Preorder, iff and ). It has top , meets , but no bottom element, hence no empty join. Yet exists because only finitely many lie above (exactly of them), and finite nonempty joins are given by componentwise .

Sources: 7 Sketches, Exercise 7.11 and Solution A.7.

Solution 7.16

example — Exercise 7.16

  1. : . 2. : .
charN :: Integer -> Bool
charN = (>= 0)          -- charN (-5) == False, charN 0 == True

Sources: 7 Sketches, Exercise 7.16 and Solution A.7.

Solution 7.17

example — Exercise 7.17

  1. Every is in the image, so for all — the predicate , classifying the top Subobject.
  2. Nothing is in the image, so for all — the predicate , classifying the bottom subobject.

Sources: 7 Sketches, Exercise 7.17 and Solution A.7.

Solution 7.19

example — Exercise 7.19

  1. A Subobject of — i.e. a subset (a mono into ); characteristic maps classify subobjects of their domain (Subobject Classifier).
  2. : iff . See Internal Logic of a Topos.

Sources: 7 Sketches, Exercise 7.19 and Solution A.7.

Solution 7.20

example — Exercise 7.20

tttt
tfff
ftft
ffft
  1. Yes — this is material implication.
  2. given by the last column.
  3. It classifies — the Equalizer of and (Internal Logic of a Topos).

Sources: 7 Sketches, Exercise 7.20 and Solution A.7.

Solution 7.21

example program — Exercise 7.21

  1. . 2. . 3. . 4. The set is “even primes or ” ; smallest three: .
using Primes
E(n) = iseven(n); P(n) = isprime(n); T(n) = n >= 10
[n for n in 0:20 if (E(n) && P(n)) || T(n)][1:3]      # [2, 10, 11]
isPrime n = n > 1 && all (\d -> n `mod` d /= 0) [2 .. n - 1]
classified = [ n | n <- [0 ..], (even n && isPrime n) || n >= 10 ]   -- take 3 → [2,10,11]

Sources: 7 Sketches, Exercise 7.21 and Solution A.7.

Solution 7.27

example — Exercise 7.27

  1. .
  2. is open iff for every there is with (Topological Space).
  3. , cover .
  4. for cover .

Sources: 7 Sketches, Exercise 7.27 and Solution A.7.

Solution 7.29

proof — Exercise 7.29

  1. It contains and ; unless both are ; a union is iff some member is . All three axioms hold.
  2. Every subset is open, so every “such-and-such is open” conclusion holds trivially.
  3. Continuity requires open in for each open ; everything in is open.
import Mathlib
#check @continuous_of_discreteTopology     -- every map out of a discrete space is continuous
#check @DiscreteTopology
#check @continuous_bot                      -- ⊥ is the discrete topology in Mathlib's order

Sources: 7 Sketches, Exercise 7.29 and Solution A.7.

Solution 7.31

example — Exercise 7.31

  1. , a three-element chain.
  2. covers iff either and , or for some : since the opens are totally ordered, a union equals its largest member. So the only cover not containing itself is the empty cover of .

Sources: 7 Sketches, Exercise 7.31 and Solution A.7.

Solution 7.32

proof — Exercise 7.32

  1. with .
  2. . If then and , and , are open in .
  3. The preimage of under the inclusion is , which is open by definition.
import Mathlib
#check @instTopologicalSpaceSubtype
#check @isOpen_induced_iff              -- IsOpen s ↔ ∃ t, IsOpen t ∧ f ⁻¹' t = s
#check @continuous_subtype_val

Sources: 7 Sketches, Exercise 7.32 and Solution A.7.

Solution 7.34

annotation — Exercise 7.34

A -category has objects and, for each pair , an open set , with and . Think of as a size restriction for getting from to — bridges your truck must fit under. Going from to itself has no restriction (). Along a path you must fit under every bridge (meet ), and you may take any path (join ): as in Matrix Multiplication in a Quantale, for the two paths of the book’s example.

Sources: 7 Sketches, Exercise 7.34 and Solution A.7.

Solution 7.38

example — Exercise 7.38

  1. . 2. . 3. . 4. E.g. send ; ; ; ; (eight elements over five points, fibers of sizes ).

Sources: 7 Sketches, Exercise 7.38 and Solution A.7.

Solution 7.40

example program — Exercise 7.40

  1. Six sections for , .
  2. None: the fiber over is empty, so .
  3. Also none, for the same reason — . (The printed solution says , forgetting the empty fiber over .)
fibers = Dict("a"=>2, "b"=>3, "c"=>1, "d"=>0, "e"=>2)
nsections(U) = prod(fibers[u] for u in U)
nsections(["a","b","c"]), nsections(["a","b","c","d"]), nsections(["a","b","d","e"])   # (6, 0, 0)

Sources: 7 Sketches, Exercise 7.40 and Solution A.7.

Solution 7.42

example — Exercise 7.42

  1. ; .
  2. Restriction drops the -component: the first three sections go to , the last three to .

Sources: 7 Sketches, Exercise 7.42 and Solution A.7.

Solution 7.44

example — Exercise 7.44

  1. , .
  2. No: a section over has a single -value, which would have to be both and .
  3. , .
  4. Yes, uniquely: . This is the sheaf condition in action.

Sources: 7 Sketches, Exercise 7.44 and Solution A.7.

Solution 7.47

annotation — Exercise 7.47

No. The set of all vector fields (over all opens) forms one sheaf, for the tangent bundle (Sheaf of Sections). The sheaves on do not even form a set — they form a Topos — and is one object of it.

Sources: 7 Sketches, Exercise 7.47 and Solution A.7.

Solution 7.49

example — Exercise 7.49

  1. The chain .
  2. Three sets and two functions .
  3. The only non-trivial cover is the empty cover of (7S Exercise 7.31), whose sheaf condition is (Example 7.36).
  4. Hence a sheaf is a set , a set and a function between them; is equivalent to the arrow category .

Sources: 7 Sketches, Exercise 7.49 and Solution A.7.

Solution 7.52

example — Exercise 7.52

has opens and ; a sheaf on it has forced, so its only data is the set — this is the identification . Now , a two-element set, corresponding to and .

Sources: 7 Sketches, Exercise 7.52 and Solution A.7.

Solution 7.53

proof — Exercise 7.53

  1. For : since ; identities: for .
  2. Yes: a presheaf is just a functor , and functoriality is all there is to check. (That it is moreover a Sheaf — the Subobject Classifier of — is verified separately.)

Sources: 7 Sketches, Exercise 7.53 and Solution A.7.

Solution 7.55

example program — Exercise 7.55

Write . Vertices: (present), (missing). Arrows: (present); (endpoints present, arrow missing); (source present, target missing). This is the unique homomorphism whose pullback of is .

using Catlab
Ω, _ = subobject_classifier(Graph)     # vertex 1 = V, 2 = 0; edges 1=(V,V;A) 2=(V,V;0) 3=(V,0;0) 4=(0,V;0) 5=(0,0;0)
G = @acset Graph begin V = 4; E = 4; src = [1, 1, 2, 3]; tgt = [2, 2, 3, 4] end   # A,B,C,D; f,g,h,i
γ = ACSetTransformation(G, Ω; V=[1, 1, 1, 2], E=[1, 2, 2, 3])
is_natural(γ)                           # true

Sources: 7 Sketches, Exercise 7.55 and Solution A.7.

Solution 7.59

example — Exercise 7.59

  1. is the interior of the complement , which is .
  2. is the interior of , i.e. .
  3. Yes. 4. No: but . Double negation is not the identity — the logic of a sheaf topos is intuitionistic.

Sources: 7 Sketches, Exercise 7.59 and Solution A.7.

Solution 7.60

proof — Exercise 7.60

  1. Taking : , and , so .
  2. ; ; .
  3. Taking : so .
  4. ; .

Sources: 7 Sketches, Exercise 7.60 and Solution A.7.

Solution 7.62

example — Exercise 7.62

If is the sheaf of people (a section over an interval is a person alive throughout ), then a section of over is a person alive throughout who likes the weather throughout — i.e. a section with .

Sources: 7 Sketches, Exercise 7.62 and Solution A.7.

Solution 7.64

example — Exercise 7.64

Formal: the one-point space, , = "", = ” is not prime”. Informal: the surface of the Earth, the sheaf of wind vector fields, = “wind blows due east at 2–5 km/h”, = “wind blows at 1–5 km/h”; wherever holds, holds.

Sources: 7 Sketches, Exercise 7.64 and Solution A.7.

Solution 7.66

example program — Exercise 7.66

  1. (only for all , since must work). 2. All of (take ). 3. (no exceeds every ). 4. All of (take ).
p :: Integer -> Integer -> Bool
p n z = n <= abs z
-- on finite windows: [n | n <- [0..5], all (p n) [-9..9]] == [0]
--                    [z | z <- [-9..9], all (`p` z) [0..20]] == []

Sources: 7 Sketches, Exercise 7.66 and Solution A.7.

Solution 7.67

example — Exercise 7.67

  1. The largest open such that for every : the largest interval throughout which is worried about every item in the news throughout that interval. For most people this is empty (there is always a happy kitten somewhere).
  2. Yes, exactly.

Sources: 7 Sketches, Exercise 7.67 and Solution A.7.

Solution 7.68

example — Exercise 7.68

  1. The union of all intervals for which some news item worries throughout : all the time during which is worried about at least one thing — the thing being allowed to change.
  2. Reasonable: “such a string of bad news, it’s like I’m always worried about something”. Someone who wants a single item to worry throughout is working in a different topos, with fewer coverings — it is the notion of covering that makes behave this way.

Sources: 7 Sketches, Exercise 7.68 and Solution A.7.

Solution 7.70

proof — Exercise 7.70

() by reflexivity. () With we have by hypothesis and by inflation; is a poset, so , i.e. .

Sources: 7 Sketches, Exercise 7.70 and Solution A.7.

Solution 7.72

example — Exercise 7.72

  1. = ” likes the weather”.
  2. = January 2019; is the sub-interval throughout which likes the weather.
  3. : the times at which either Bob is not in San Diego or likes the weather.
  4. Yes, by 3.
  5. Yes: “if Bob is in SD then (if Bob is in SD then )” is equivalent to “if Bob is in SD then “.
  6. Yes, with = ” is happy”: “if Bob is in SD then ( and )” iff (“if Bob is in SD then ” and “if Bob is in SD then ”).

Sources: 7 Sketches, Exercise 7.72 and Solution A.7.

Solution 7.76

example — Exercise 7.76

  1. .
  2. would need ; would need . Neither holds.

Sources: 7 Sketches, Exercise 7.76 and Solution A.7.

Solution 7.77

proof — Exercise 7.77

Since , . If with , then is a union of open balls, hence open. Conversely if , put , ; then is open in the subspace topology.

Sources: 7 Sketches, Exercise 7.77 and Solution A.7.

Solution 7.80

proof — Exercise 7.80

  1. Yes: for restrict along ; this is functorial.
  2. Yes: given a cover and continuous agreeing on overlaps, they glue to a unique continuous function on (continuity is local). So — a behavior type; with this is of Example 7.79.

Sources: 7 Sketches, Exercise 7.80 and Solution A.7.