How can I prove that this simple function is Borel measurable? How can I prove that the  simple function gn that is defined below is Borel measurable?
Given: let $E$ be a normed space and let $X$ be a measurable space and let $f:X \rightarrow E$ is strongly measurable, (so, we may assume that $f(X)$ has the countable dense set $D=\{y_1, y_2, \ldots\}$) 
For each $x \in X$ and $n \in N$, define $A_n(x)$ by
$A_n(x)=\{y_j : j\leq n,\|y_j\|\leq\|f(x)\|\}$
Define $B_n(x)=\{y_j \in A_n(x): \|f(x)-y_j\|= d(f(x),A_n(x))\}$
For each $n\geq1$, define $g_n(x)=y_k$, where $k= \min\{j :y_j \in B_n(x)\}$
my question is: how can I prove that the simple function $g_n$ is Borel measurable?
 A: Now I think I got. The writing is not elegant, but the idea is here:
First of all, we may assume that $y_1=0 \in D$ because the book defines the set of rational multiples of $D$ as a set that we will work. Remember that $f$ is Borel-Measurable and I'll use $|\cdot|$ instead of $\left\|\cdot\right\|$. Now, let
$$A_n = \left\{ x \in X : |y_n| \leq |f(x)| \right\} \ \mbox{for}\ \ n \in \mathbb N,$$
$$B_n = \left\{ x \in X : |y_n| > |f(x)| \right\}\ \mbox{for}\ \ n \in \mathbb N \ \mbox{and}$$
$$B_{j,k} = \left\{ x \in X : |f(x)-y_j| \leq |f(x)-y_k| \right\}\ \mbox{for}\ \ j,k \in \mathbb N$$
By hypothesis, these sets are measurable in X. I'll write the argument just for $j=2$, and the others are similar. We have to express, for each $n\in \mathbb N$, $f_n^{-1}\left\{y_2\right\}$ as enumerable union, intersection or diference between the sets we've just defined. It's possible:
$$f_n^{-1}\left\{y_2\right\} = A_2 \cap D_2,$$
where
$$D_2=\\
 \left[B_1 \cup (A_1\cap B_{2,1} \setminus f^{-1}(y_1))\right] \cap \\
 \left[B_3 \cup \left[\right(A_3\cap B_{2,3}\left)\right]\right] \cap \ldots \cap \left[B_n \cup \left[\right(A_n\cap B_{2,n}\left)\right]\right] $$
which is measurable.
A: Let me try a similar route...
Given a Bochner measurable function:
$$F:\Omega\to E:\quad F^{-1}U\in$$
Enumerate a countable dense set:
$$\#A\leq\mathfrak{n}:\quad A=\{a_1,\ldots\}\quad(\overline{A}=F\Omega)$$
Regard the finite subsets:
$$A_K:=\{a_1,\ldots,a_K\}$$
Construct the supports by:
$$S_k:=S_n(a_k):=\{\|a\|\leq\|F(\omega)\|\}\cap\{\|F(\omega)-a\|<\tfrac{1}{n}\}$$
And sum up their disjoint parts:
$$S_k':=S_k\setminus\left(\bigcup_{l=1}^{k-1}S_l\right):\quad F_n:=\sum_{k=1}^{K=n}a_k\chi_{S_k'}$$
(Note that the supports are clearly measurable.)
