# Why are random fields based on topological spaces?

The notion of a random field is defined on Wiki as:

Given a probability space $$(\Omega, \mathcal{F}, P)$$, an $$X$$-valued random field is a collection of $$X$$-valued random variables indexed by elements in a topological space, $$T$$.

Often definitions include specific classes of sets in order to avoid annoying mathematical cases, or to better match some application. From that perspective, I am not sure why the variables are indexed by a topological space.

I think that by happenstance I am often implicitly working with topological spaces when I work with index sets, but making it explicit in the definition makes me wonder what the motivation was.

Why are random fields defined with respect to an index set that is an element of a topological space?

But if the reason we're thinking about random fields is to generalize ideas about random functions on $$\mathbb R$$ or $$\mathbb R^n$$, then the property we often want to preserve is that we're looking at a random continuous function (with whatever distribution). The most general setting in which we can try to think about whether our random function is continuous or not is the setting where it's a function on a topological space.
(It is probably much easier to say some things if we can assume that it's at least a metric space, and of course in practice our random field might just be indexed by $$\mathbb R^n$$ and we don't have to worry.)