For an object $X$ in a category $C$, there is a functor $C(-\,,X)$ from $C^{\mathrm{op}}$ to Set that assigns to each object $Z$ the set $C(Z,X)$ and to each morphism $f: Y \to Z$ the pullback $f^*$ to $f$ $$ \require{AMScd} \begin{CD} Y \\ @V{f}VV \\ Z \end{CD} \quad\mapsto \quad \begin{CD} C(Y, X) \\ @AA{f^*}A \\ C(Z, X) \end{CD} $$ (Page 10, A categorical approach to topology)
I am having a lot of difficulty understanding the above definition. After flipping back and forth the book, I think so I get each individual part of the definition (what the hom set is, the pull back etc), but I am unable to think of a relatable realization of it.
Could someone explain the above a bit more simply, perhaps through a metaphor?
I'm looking for something around the lines of how Qiaochu Yuan answered this question.
Alright, this might be a little bit of a stretch, but here’s an attempt at an analogy that might make sense.
Your (locally small) category $\mathcal{C}$ is your city. Think of the objects of $\mathcal{C}$ as different locations around the city. There’s your home, the grocery store, your favorite dive bar, the park you walk your dog Glenn in (this is my analogy so I get to name your dog), the coffee shop you read in on the weekends, etc. For any two locations $a$ and $b$, think of $\text{hom}(a,b)$ as the set of all the different routes you could take to walk from location $a$ to location $b$.
So let’s fix a location. Say, the library. Let $L$ denote the the library. How should we think of the functor $\text{hom}(-,L)$? We can think of this functor as Google maps, in a sense. If you tell this functor some location $a$, it will spit out all the different routes you could take from $a$ to the library $L$. That is, it gives you the set of routes $\text{hom}(a,L)$.
Now what about the functors value on maps? Suppose now we have some arrow $f:a \rightarrow b$ in $\mathcal{C}$. So in the analogy, this is some specific route through your city from $a$ to $b$. By the definition of a contravariant functor, we know that $\text{hom}(f,L)$ should be a set-function from $\text{hom}(b,L)$ to $\text{hom}(a,L)$. So in the analogy, we should get a way to take in a route from $b$ to the library, and spit out a route from $a$ to the library. But we can do this easily by just first taking the pre-chosen route $f:a \rightarrow b$, and then the route from $b$ to $L$.
So in the Google maps analogy, suppose you’re at $H$ := your home, you have to run a quick errand at $S$ := the store, and then head to $L$ := the library. Finally, suppose you know exactly the route you want to take from your home to the store (call it $f$). Then Google maps would tell you all the different ways you could go from your house to the library, starting with your pre-chosen route $f$. Google is asking you to make a choice of a route from $S$ to $L$, and in return you’re getting a route from $H$ to $L$.
Please note that I don’t think this is a particularly good analogy. In particular, there are many other parts of category theory that are conceptually related to formal paths. This is just the best I could come up with on the fly.