TITLE: Intuition behind stability and instability in model theory
QUESTION [17 upvotes]: In A survey of homogeneous structures by Macpherson (Discrete Mathematics, vol. 311, 2011), a stable or unstable theory is defined as (Definition 3.3.1):

A complete theory $T$ is unstable if there is a formula $\varphi(\overline{x}, \overline{y})$ (where $\ell(\overline{x}) = r$ and $\ell(\overline{y}) = s)$, some model $M$ of $T$, and $\overline{a_i} \in M^r$ and $\overline{b_i}\in M^s$ (for $i \in \Bbb{N}$) such that for all $i, j \in\Bbb{N}$,
$$M \vDash \varphi(\overline{a_i}, \overline{b_j})\iff i \leqslant j$$
The theory $T$ is stable otherwise.

I wonder what is the intuition behind this definition. More specifically, under what situation is it conceived? Why is it called stable theory? Does the name stable related to the notion of stability in geometry or physics?

REPLY [5 votes]: Here's a topological way to understand stability of a formula. Depending on your background, you might find it intuitive.
Given a formula $\varphi(\bar x,\bar y)$, a model $M$ and a tuple $\bar b$ in $M$ of the same length as $\bar y$, you can define a formula $f_{\varphi,\bar b}\colon M\to \{0,1\}$ by putting $f_{\varphi,\bar b}(\bar a)=1$ if and only if $\varphi(\bar a,\bar b)$ holds.
Now, let us endow $M^{\lvert x\rvert}$ with the weakest topology which makes all these functions continuous. We may attempt to define stability in the following way (which is not yet complete).

"Definition" (I think this is not equivalent, although I don't have any counterexamples offhand): the formula $\varphi$ is stable if the set $\{f_{\varphi,\bar b}\mid \bar b\in M^{\lvert y\rvert}\}\subseteq C(M^{\lvert x\rvert})$ is relatively weakly compact.

Unfortunately, the topology on $M^{\lvert \bar x\rvert}$ itself may not be so nice (for starters, it will often not be Hausdorff). Instead, we consider the space $S_{\varphi}(M)$ --- in model theory, this is the space of $\varphi$-types over $M$. Topologically, it is the compactification of $M^{\lvert \bar x\rvert}$ induced by the family $(f_{\varphi,\bar b})_{\bar b\in M}$ (i.e. the closure of the image of $M^{\lvert \bar x\rvert}$ under the map $M\to \{0,1\}^{M^{\lvert y\rvert}}$, where $\bar a\mapsto (f_{\varphi,\bar b}(a))_{\bar b\in M^{\lvert y\rvert}}$). Note that the functions $f_{\varphi,\bar b}$ uniquely extend to continuous functions on $S_{\varphi}(M)$ (namely, the extensions are the projections).
Having this, we may define stability in the following way:

The formula $\varphi$ is stable when for every $M\models T$, the set $A_{\varphi,M}:=\{f_{\varphi,\bar b}\mid \bar b\in M^{\lvert y\rvert}\}\subseteq C(S_\varphi(M))$ is relatively weakly compact.