Let be a function between finite sets (Eq. 7.37: , , sends each element to the letter below it), regarded as a continuous map of discrete spaces. The presheaf ,
assigns to the set of cross-sections over : one element of each Fiber over . Restriction along restricts the function to . It is a Sheaf: sections over and that agree on glue uniquely to a section over .
Sources: 7 Sketches §7.3.3 (“Extended example: sections of a function”), Eqs. (7.37)–(7.43), Exercises 7.38, 7.40, 7.42, 7.44; Example 7.45 (continuous case), Example 7.46 (vector fields), Example 7.61 (vector bundles).
- (Eq. 7.39); , because the fiber over is empty, likewise (7S Exercise 7.40). In general .
- Restriction forgets the -component; it is -to- (7S Exercise 7.42).
- Non-matching pairs such as over and over have no gluing (7S Exercise 7.44).
- General case (Example 7.45): for any continuous , is a sheaf on . For the tangent bundle of a manifold, is the sheaf of vector fields (wind velocities on Earth: fields on Afghanistan and Pakistan agreeing at the border glue). The hairy ball theorem — every global vector field on the sphere vanishes somewhere, although local ones need not — is a Generative Effect between local and global sections, measured by cohomology.
- Sections of a bundle are the semantic counterpart of a Dependent Product (DaoFP §11): .
Docs: Vignette: sheaves
X = ["a1","a2","b1","b2","b3","c1","e1","e2"]
f = Dict(x => string(x[1]) for x in X) # a1 ↦ a, …
fiber(y) = [x for x in X if f[x] == y]
Sec(U) = [Dict(zip(U, c)) for c in Iterators.product((fiber(y) for y in U)...)] |> vec
length(Sec(["a","b","c"])) # 6
length(Sec(["a","b","c","d"])) # 0
restrict(s, V) = Dict(v => s[v] for v in V)
unique(restrict.(Sec(["a","b","c"]), Ref(["a","c"]))) # the 2 sections over {a,c}import Mathlib
-- sections of a bundle as dependent functions: Sec_f(U) ≃ Π u : U, fiber f u
example {X Y : Type} (f : X → Y) (U : Set Y) : Type :=
{ s : U → X // ∀ u, f (s u) = u }
#check @TopCat.Presheaf -- the general presheaf/sheaf machinery-- Sec_f(U) for a finite function given by its fibers
sections :: Eq y => [x] -> (x -> y) -> [y] -> [[(y, x)]]
sections xs f = mapM (\y -> [ (y, x) | x <- xs, f x == y ])
-- length (sections xs f ["a","b"]) == 6 for the example of Eq. (7.37)