I'm trying to prove the following claim:
Let $T$ be a compact (metric) space, and let $\mathcal{X}$ be a Banach space over $\mathbb{K}$. Let $f : T \longrightarrow \mathcal{X}$ be a continuous function. Then in the Banach space $\mathcal{C}_{\mathbb{K}}(T)$ with the sup-norm, $\left \lVert f \right \rVert_{\mathcal{C}_{\mathbb{K}}(T)} = \sup_{t \in T}|f(t)|$, $f$ can be approximated in the norm-topology by "simple" functions of the form $g(t) = \sum_{i=1}^{n} h_{i}(t) x_{i}$, where $x_{i} \in \mathcal{X}$ and $h_{i}(t) \in \mathcal{C}_{\mathbb{K}}(T)$.
Here's my attempt:
The idea is to fix a finite dimensional subspace in $\mathcal{X}$ and approximate $f$ by vector-valued functions that live on that subspace.
By the Axiom of Choice, for $n \in \mathbb{N}$ choose $x_1, \cdots, x_n$ recursively such that $x_{i+1}$ is not in $\text{span} (x_{1}, \cdots, x_{i})$. Let $\mathcal{M} = \text{span}(x_{1}, \cdots, x_{n})$. First recall that,
\begin{equation} \phi: \mathcal{M} \longrightarrow \mathbb{K}^n, \quad \phi\bigg(\sum_{i=1}^{n}\alpha_{i}x_{i}\bigg) = (\alpha_{1}, \cdots, \alpha_{n})^{T}, \end{equation}
is a linear isomorphism. For $1 \leq i \leq n$, define the projection maps,
\begin{equation} \pi_{i} : \mathbb{K}^n \longrightarrow \mathbb{K}, \quad \pi_{i} (\alpha_{1}, \cdots, \alpha_{n})^{T} = \alpha_{i}, \end{equation}
and consider the map $f_{i} = \pi_{i} \circ \phi$. For $v \in \mathcal{M}$, we can show that,
\begin{equation} f_{i}(v) = f_{i}\bigg(\sum_{i=1}^{n}\alpha_{i}x_{i}\bigg) \leq C \lVert \alpha \rVert_{K^{n}} \leq CD \lVert v \rVert_{\mathcal{X}}, \end{equation}
for some $C, D > 0$. Since the latter expression is a semi-norm, by the Hahn-Banach Theorem there exists $F_{i} \in \mathcal{X}^{*}$ such that,
\begin{align} F_{i}(x) & \leq CD \lVert x \rVert \; \text{for all} \; x \; \text{in} \; \mathcal{X} \\ & F_{i} = f_{i} \; \text{on} \; \mathcal{M} \end{align}
For $t \in T$, consider $f(t) \in \mathcal{X}$. For $1 \leq i \leq n$ , applying $F_{i}$, we have, \begin{equation} c_{i}(t) := F_{i}(f(t)), \quad c_{i}(t) \in \mathcal{C}_{\mathbb{K}}(T). \end{equation}
Now let,
\begin{equation} f_{n}(t) = \sum_{i=1}^{n} c_{i}(t) x_{i}. \end{equation}
I wish to claim that $\lVert f_{n} - f \rVert_{\mathcal{C}_{\mathbb{K}}(T)} $ goes to zero as $n$ goes to infinity.
However, I can't see any reason as to why this must be the case. For example, if this were true, this would show that the $x_{i}'s$ that have been chosen from a Schauder basis for the range of $T$ in $\mathcal{X}$. Should the $x_{i}'s$ chosen above be chosen in a particular way so as to ensure that the aforementioned result holds true?
Clearly the above argument works if $\mathcal{X}$ is a finite dimensional vector space as we can "exhaust" $\mathcal{X}$ by building $\mathcal{X}$ recursively from 1-dimensional subspaces. I can't seem see to figure out how this argument would apply in the general case.
Please only provide suggestions.
May I suggest that, since $T$ is compact and $f$ is continuous, it follows that the range $f(T)$ of $f$ is a compact subset in ${\cal X}$.
Thus, if we want an approximation with tolerance $\epsilon$, cover $f(T)$ with open balls of radius $\epsilon$...