Lowenheim-Skolem number for satisfaction via continuous function rings EDIT: now asked at MO.
For $\mathcal{X}$ a topological space, let $C(\mathcal{X})$ be the ring of continuous functions $\mathcal{X}\rightarrow\mathbb{R}$. For a first-order sentence $\varphi$ in the language of rings, write $\mathcal{X}\models_{C}\varphi$ iff $C(\mathcal{X})\models\varphi$ in the usual sense. Say that $\varphi$ is C-satisfiable iff $\mathcal{X}\models_C\varphi$ for some topological space $\mathcal{X}$.
I'm generally curious about analogues of classical model-theoretic questions in this context. For example:

What is the least cardinal $\kappa$ such that, if $\varphi$ is $C$-satisfiable, then $\mathcal{X}\models_C\varphi$ for some space $\mathcal{X}$ with cardinality $<\kappa$?

The obvious Lowenheim-Skolem argument doesn't help much here. Roughly speaking, given $\mathcal{X}\models_C\varphi$ we can form a "small" elementary substructure $(\mathcal{Y}, R)$ in the usual first-order sense of (an appropriate version of) the pair $(\mathcal{X},C(\mathcal{X}))$. However, in general we might have $R\subsetneq C(\mathcal{Y})$ (this is similar to the distinction between Henkin and standard semantics for second-order logic).
(Of course number of points isn't the only cardinal invariant for which we could ask a Lowenheim-Skolem flavored question, but it seems the simplest to start with. Another natural thing to do would be to restrict attention to a "nice" class of spaces, e.g. the compact Hausdorff spaces, but again this seems like a better first step.)
One issue here is that I don't know an abstract characterization of which rings are isomorphic to some $C(\mathcal{X})$. Obviously any such ring $R$ must be the underlying ring of a commutative associative unital $\mathbb{R}$-algebra, but beyond that I don't see anything. I recall seeing a very snappy theorem addressing this, but I can't find it at the moment (I think it was more complicated than just "any commutative associative unital $\mathbb{R}$-algebra's underlying ring," but I'm not certain).

My broader interest incidentally is in what happens if we replace $\mathbb{R}$ with some other topological structure (= first-order structure + topology such that all functions are continuous and all relations are closed, as subsets of the appropriate product space). Given a topological structure $\mathcal{A}$ and a topological space $\mathcal{X}$ we can always turn the set of continuous maps from $\mathcal{X}$ to $\mathcal{A}$ into a structure of the same type as $\mathcal{A}$ by defining everything "pointwise." So for each topological structure $\mathcal{A}$ we get an analogue $\models_C^\mathcal{A}$ of the relation $\models_C$ above.
Ultimately my interest is in developing a connection between "coarse" model-theoretic properties (e.g. variants of the Lowenheim-Skolem number) of $\models_C^\mathcal{A}$ and topological algebraic properties of $\mathcal{A}$. While this question specifically asks about $\mathcal{A}=\mathbb{R}$, if anyone has information about a different ("nontrivial") $\mathcal{A}$ or class of $\mathcal{A}$s I'd be very interested.
 A: This is not even close to a complete answer, but it at least shows that $\text{ZFC}\vdash\kappa>2^{\aleph_0}$, so I will record it here. Let $$\varphi\equiv\forall u\left[u^2=u\to(u=0\vee u=1)\right]$$ be the sentence expressing that there are no non-trivial idempotents. Then $\mathcal{X}\models_C\varphi$ if and only if $\mathcal{X}$ is connected. To see this, first suppose $\mathcal{X}$ is disconnected, say with a decomposition $\mathcal{X}=U\sqcup V$ for non-empty open subsets $U,V$; then the map $\alpha:\mathcal{X}\to\mathbb{R}$ defined by $x\mapsto 0$ if $x\in U$ and $x\mapsto 1$ if $x\in V$ is a non-trivial idempotent element of $C(\mathcal{X})$. Conversely, suppose $C(\mathcal{X})$ has a non-trivial idempotent $\alpha$. Since the ring $\mathbb{R}$ has no non-trivial idempotents, we have $\alpha(x)\in\{0,1\}$ for each $x\in\mathcal{X}$; since also $\alpha\neq 0,1$, we have that $\alpha^{-1}(\{0\})$ and $\alpha^{-1}(\{1\})$ are both non-empty. This gives a partition of $\mathcal{X}$ into disjoint non-trivial open subsets, whence $\mathcal{X}$ is not connected.
Now let $\psi\equiv \exists u\left[u\neq 0\wedge\forall v(u\cdot v\neq 1)\right]$. I claim that $\varphi\wedge\psi$ is $C$-satisfiable, but that $\mathcal{X}\not\models_C\varphi\wedge\psi$ for any $\mathcal{X}$ whose cardinality is smaller than $2^{\aleph_0}$. To see that it is $C$-satisfiable, note that, for example, $\mathbb{R}\models_C\varphi\wedge\psi$, where $\mathbb{R}$ has the standard topology. Indeed, $\mathbb{R}$ is connected, so $\mathbb{R}\models_C\varphi$ by the remarks above; furthermore, the function $\alpha:\mathbb{R}\to\mathbb{R}$ given by $x\mapsto 0$ when $x\leqslant 0$ and $x\mapsto x$ when $x\geqslant 0$ is a non-invertible non-zero element of $C(\mathcal{X})$, whence $\mathbb{R}\models_C\psi$ as well.
To see that $\mathcal{X}\not\models_C\varphi\wedge\psi$ for any $\mathcal{X}$ of cardinality smaller than $2^{\aleph_0}$, suppose that $|\mathcal{X}|<2^{\aleph_0}$ and that $\mathcal{X}\models_C\varphi$. Then $\mathcal{X}$ is connected by the remarks in the first paragraph, so for any $\alpha\in C(\mathcal{X})$ the subspace $\alpha(\mathcal{X})\subset\mathbb{R}$ is connected as well. Connected subsets of $\mathbb{R}$ are precisely intervals; since $|\mathcal{X}|<2^{\aleph_0}$, this forces each $\alpha(\mathcal{X})$ to be a singleton. So every element of $C(\mathcal{X})$ is a constant function, whence $C(\mathcal{X})\cong\mathbb{R}$ as rings, whence $\mathcal{X}\models_C\neg\psi$, as desired.
A: If $\mathcal Y\Vdash \phi$ for some compact Hausdorff space $\mathcal Y$ then $\mathcal X\Vdash \phi$ for some compact Hausdorff $\mathcal X$ of cardinality $\leq \beth_2.$ So a "compact Hausdorff satisfiability" version of your question has $\kappa\leq\beth_2^+.$ I don't know how to improve your bound in the general case, or whether $\beth_2^+$ is optimal for the compact Hausdorff case.
Fix a compact Hausdorff $\mathcal Y.$ We will try to find a space $\mathcal X$ of cardinality $\leq\beth_2$ that is elementarily equivalent to $\mathcal Y.$
Let $B(\mathcal Y)$ denote the set of continuous functions $\mathcal Y\to[-1,1].$ The approach will be to take a subset $A\subset B(\mathcal Y)$ of cardinality $\leq\mathfrak c$ that is “countably saturated with respect to $B(\mathcal Y)$” in the sense that for any countable $F\subseteq A,$ any type $\Lambda(f)$ over $A$ that is realized in $B(\mathcal Y)$ is also realized by a scalar multiple of an element of $A.$
Introduce variables $x_i, i<\mathfrak c.$
For each $\alpha\in\mathfrak c$ pick a 1-type $\Lambda_\alpha$ over a countable subset of $\{x_\beta:\beta<\alpha\},$ such that every such type gets hit at some point. Then build $A$ by transfinite iteration, where at step $\alpha$ we add a realization $f_\alpha\in B(\mathcal Y),$ if any exists, for the type $\Lambda_\alpha(f)$ with variables $x_\beta$ replaced by $f_\beta$ for $\beta<\alpha,$ and set $f_\alpha=0$ otherwise.
Let $P$ be the product $[-1,1]^A.$ Take $\mathcal X$ to be the image of $\phi:\mathcal Y\to P,$ where $x$ is sent to $a\mapsto a(x).$ Consider a continuous function $f:\mathcal X\to\mathbb R.$ Since $\mathcal X$ is compact, $f$ is bounded, so it is an integer multiple of a function $f/k$ with values in $[-1,1].$ I claim that $f/k$ is already a scalar multiple of a function in $A.$ We can extend $f/k$ to a function $g:P\to[-1,1].$
This $g$ factors through the projection $[-1,1]^A\to[-1,1]^{A_0}$ for some countable $A_0.$ One way to see this is that the preimage of each closed interval $[a,b]$ with $a,b\in\mathbb Q$ is a compact $G_\delta,$ which can be written as a countable intersection of finite unions of basic opens. So $g$ is continuous using the topology on $[-1,1]^A$ generated by basic opens using indices in some countable $A_0.$ But $g$ will then already be uniquely specified by some type over $A_0,$ and hence will already be in $A.$ The countable saturation, in fact just finite saturation, shows that $\mathcal Y$ is an elementary submodel of $\mathcal X.$ Note $|\mathcal Y|\leq \beth_2.$
Remarks.

*

*C. Ward Henson studied a related question in “Nonstandard hulls of Banach spaces”, for positive bounded formulas.

*For general spaces there is a ring isomorphism $C(\mathcal X)\cong C(\mathcal Y)$ if and only if the “Hewitt realcompactifications” of $\mathcal X$ and $\mathcal Y$ are homeomorphic. I’m not sure this helps directly, but it might be what you were thinking of as a characterization interesting.

*Some papers (at least Henson's) talk in terms of Banach algebras. For the compact Hausdorff case we're talking about (the ring reduct of) the real Banach algebra $C(\mathcal X).$ There is a bi-interpretation of complex arithmetic with complex conjugation, so we could equivalently talk about complex Banach algebras.

*My guess is that we can always take $\mathcal X$ to be a Polish space. Perhaps we can take $A$ to be a countable sequence of generic functions, i.e. an element in a comeager set of $B(\mathcal Y)^\omega.$
