Sheaves capture two properties: if you have a solution to a problem on a big piece of a space, you can shrink it to a smaller piece, and if you have solutions on small pieces of a space that agree with each other on overlaps, you can glue them together to get a solution on a bigger piece.
An easy example is a function on a set. If you have function defined on the whole set, you can shrink it to give you a function defined on a subset. If you have functions defined on several subsets, and those functions agree on the overlaps of the subsets, then you can use that to define a function on the union of the subsets. More interesting examples arise in topology and related fields.
I don’t know sheaves (except that they are a generalization of differential geometry or something?), but a great example of local to global is the fundamental theorem of calculus.
You take this property of a function that’s only defined in an arbitrarily small neighborhood of a point, and from it you can determine the function’s value anywhere else. That is, you take infinitesimally small changes (e.g. velocity) and add them up in the right way and get finite changes (e.g. distance).
It’s more interesting than it sounds because you aren’t computing a sum or something with numbers when you add up infinitesimal change. Local/infinitesimal change is in some ways a different beast than finite/global change.
Why not, they sound like similar problems and the latter would motivate computer scientists to learn about sheafs as per the approach taken in OP's book which is applied/example driven.
Sounds interesting. Could someone elaborate on that?