Conceptualizing Presheaves as Generalized Spaces I'm trying to understand the perspective described in the nLab article on "spaces and quantities". Specifically, it interprets the objects of some category $C$ as the model/primordial spaces that we use to study some greater space $X$. This is carried out by probing the greater space with the objects of $C$ using a presheaf

that assigns to each test space $U\in C$ the set $X(U)$ of allowed
maps from U into the would-be space $X$

My question is the interpretation of the image set $X(U)$ as the set of maps from the test space $U$ into $X$. As I understand, the set can be whatever we want so long as the functorality condition is satisfied by the assignment. The specific examples mentioned later in the Details article help me a bit, but ultimately it just repeats almost the same explanation.
I haven't seen these ideas discussed much elsewhere. The two Lawvere articles cited don't provide much more explanation for thinking about presheaves in this way. I'd like to understand more so that I can understand the space-quantity duality that is claimed to be pervasive in mathematics. Any other perspectives would be welcome. Thanks!
 A: Here's one way to make sense of the idea that presheaves are generalized spaces:
If $\mathcal{C}$ is a (small) category, then the category of presheaves $\hat{\mathcal{C}} = [\mathcal{C}^\text{op}, \mathsf{Set}]$ is the free cocompletion of $\mathcal{C}$, in the sense that

*

*Every object of $\hat{\mathcal{C}}$ is a colimit of objects in $\mathcal{C}$ (if we identify $C \in \mathcal{C}$ with its image under the yoneda embedding $yC \in \hat{\mathcal{C}}$, as we will throughout this post)

*Every functor $F$ out of $\mathcal{C}$ extends (uniquely!) to a colimit-preserving functor out of $\hat{\mathcal{C}}$.

⚠ Be careful! Colimits as computed in $\hat{\mathcal{C}}$ do not need to agree with colimits as computed in $\mathcal{C}$. One simple reason is that the yoneda embedding need not preserve colimits. Another, more satisfying, reason is that functors out of $\mathcal{C}$ that don't preserve colimits (as computed in $\mathcal{C}$) should still preserve colimits as computed in $\hat{\mathcal{C}}$, after all, that's the universal property of $\hat{\mathcal{C}}$!
Now, you should think of a colimit as a way of "gluing" objects together. For geometric intuition, think about topological spaces. Here a coproduct is the disjoint union of spaces (which is a kind of "trivial" way to glue two spaces into one space). More importantly for intuition, a pushout literally glues two spaces together along a common subspace.
This is why, for instance, simplicial sets are so useful in topology. They're exactly the objects we get by gluing together simplices, which are particularly simple spaces. If we take the geometric realization of these "abstract" simplicial sets, we get exactly the simplicial complexes, which are familiar computational tools in algebraic topology!
Let's also look at the category $\mathcal{R}$ whose objects are $\mathbb{R}^n$, and whose morphisms are all smooth maps between the relevant spaces.
Then objects of $\hat{\mathcal{R}}$ are, in a sense we've just made precise, the things we can get by freely gluing together $\mathbb{R}^n$s along smooth maps. This is nice because the category of manifolds isn't as behaved as we would like (see here for more). Experience shows it's better to have a nice category with crummy objects than to have a crummy category comprised of only nice objects, so we're naturally led to look for categories containing the smooth manifolds, but with better categorical properties. It turns out that $\hat{\mathcal{R}}$ allows slightly too many objects. But we can restrict to a full subcategory (basically the objects which are glued together "nicely", made precise by a certain grothendieck topology) in which the (smooth) manifolds sit nicely, but which is still as nice a category as we can hope for (it's a grothendieck topos).

Now, what does this all have to do with studying objects in $\hat{\mathcal{C}}$ by "probing" them with $\mathcal{C}$-objects?
Well we think of an object in $\hat{\mathcal{C}}$ as a bunch of objects in $\mathcal{C}$ glued together. So we should be able to study it by understanding which objects are involved in this gluing, and how. Moreover, since $\hat{\mathcal{C}}$ is the free way of gluing together objects of $\mathcal{C}$, knowing which objects are involved in the gluing, and how, should totally pin down the behavior of an object in $\hat{\mathcal{C}}$!
Enter yoneda.
Formally, an object $X \in \hat{\mathcal{C}}$ is a functor $X : \mathcal{C}^\text{op} \to \mathsf{Set}$. We make our "gluing" intuition precise by noticing $X$ is a colimit of representables. That is, a colimit of objects of $\mathcal{C}$. We make our "studying" intuition precise by remembering yoneda's lemma:
$$\hat{\mathcal{C}}(yC, X) \cong X(C)$$
Maps from $C$ (identified with its representable functor) into $X$ are the same thing as the set $X(C)$! So provided we actually have our hands on $X$, we have a perfect understanding of how the objects of $\mathcal{C}$ come together to build it. Conversely, if we understand all of the $\hat{\mathcal{C}}(yC, X)$s, that is, if we understand all of the ways to map into $X$ by representables, then we perfectly know $X$!

For a surprisingly readable account of this idea, you might be interested in the textbook Generic Figures and their Gluings by Reyes, Reyes, and Zolfaghari. It's freely available here, and while I haven't read all of it, what I've seen makes me think it's a highly under-appreciated book!

I hope this helps ^_^
A: It is not perfectly clear to me, what you are asking for specifically. So this is meant more like a lengthy comment than an actual answer.
To understand the spaces as presheaves viewpoint it might be most useful to discuss it alongside an example.
Let’s say we want to model spaces built up from triangles/ simplices of various dimensions. First we should be clear about how the simplices themselves fit together. If we model an abstract simplex on $n+1$ vertices as the ordered set $\Delta^n=\{0,…,n+1\}$ then it should have faces given by inclusions of the form
$$\begin{array}{rcl}
\Delta^{n-1} & \xrightarrow{d_k} & \Delta^n\\
i & \mapsto & \left\{\begin{array}{ll}
i & i<k\\
i+1&i\geq k
\end{array}\right.
\end{array}$$
So let us define the category $\triangle$ with objects the $\Delta^n$ and morphisms those given by composites of the $d_k$ and of cause identities. (I find this description more intuitive, but if you prefer, the category $\triangle$ is equivalent to the category of nonempty finite sets with injective morphisms between them)
Now recall that for any category $\mathscr{C}$ the presheaf-category $\widehat{\mathscr{C}} = \operatorname{Psh}(\mathscr{C}) = \operatorname{Fun}(\mathscr{C}^{op},\mathsf{Set})$ is the free cocompletion of $\mathscr{C}$. This means that given any category $\mathscr{D}$ with colimits the functor
$$\operatorname{Fun}_\text{cocts}(\widehat{\mathscr{C}},\mathscr{D})\xrightarrow{Y^\ast} \operatorname{Fun}(\mathscr{C},\mathscr{D})$$
defines a natural isomorphism of categories,
where $Y:\mathscr{C}\rightarrow\widehat{\mathscr{C}}$ is the covariant Yoneda embedding and $\operatorname{Fun}_\text{cocts}$ are the cocontinuous (ie. colimit preserving) functors. If we identify $\mathscr{C}$ with its image under Yoneda in $\widehat{\mathscr{C}}$ this means that $\widehat{\mathscr{C}}$ is freely built (no unnecessary relations) out of colimits of the objects of $\mathscr{C}$. This is sometimes called the density theorem: every presheaf is a colimit of representables.
Hence, as long as we don’t know any additional relations between our simplices or the spaces we want to model, the presheaf category $\widehat{\triangle}$ is for formal reasons a good candidate for our category of spaces built up from triangles. I should remark that we just have discovered the category of semisimplicial sets.
Now the question becomes, given a generalized space $X$ (ie. an arbitrary presheaf), how can we recover the simplices it is glued from? Intuitively we would like to say that an $n$-simplex of $X$ is just an inclusion/monomorphism $\Delta^n\hookrightarrow X$. However, since we only know that $X$ is a colimit of representables/simplices, this colimit may do weird things with the simplices and we cannot really expect $X$ to have actual inclusions of simplices. For example we can consider the pushout
$$\begin{array}{ccc}
\Delta^0\sqcup\Delta^0 & \xrightarrow{[d_1^\ast,d_0^\ast]} & \Delta^1\\
\downarrow&&\downarrow\\
\Delta^0 & \longrightarrow & X
\end{array}$$
which should look like a loop, given by the 1 simplex $\Delta^1=(0\rightarrow 1)$ with endpoints identified.
So the next best thing is to just consider maps $\Delta^n\rightarrow X$. But since $\Delta^n := \triangle(-,\Delta^n)$ is the representable presheaf associated to the simplex $\Delta^n\in\triangle$, and since an arrow $\Delta^n \rightarrow X$ by definition is a natural transformation $\triangle(-,\Delta^n) \Rightarrow X$ the ordinary Yoneda lemma tells us that
$$\operatorname{Hom}_{\widehat{\triangle}}(\Delta^n, X) = \operatorname{Nat}(\triangle(-,\Delta^n),X) \cong X(\Delta^n)$$
