Let $(X, \mathcal A, \mu)$ be a complete $\sigma$-finite measure space and $(E, | \cdot |)$ a Banach space. Let $f:X \to E$. We recall some definitions at page 62 of Amann's Analysis III.
$f$ is called $\mu$-simple if $f = \sum_{k=1}^n e_k 1_{A_k}$ where $e_k \in E \setminus \{0_E\}$ and $(A_k)_{k=1}^n$ is a finite sequence of pairwise disjoint sets with finite measures in $\mathcal A$. Let $\mathcal S (X, \mu, E)$ be the space of such $\mu$-simple functions.
$f$ is called $\mu$-measurable if $f$ is a $\mu$-a.e. limit of a sequence $(f_n)$ in $\mathcal S (X, \mu, E)$.
$f$ is called $\mathcal A$-measurable if $f^{-1}(O) \in \mathcal A$ for all open sets $O \subseteq E$.
$f$ is called $\mu$-almost separable valued if there is a null set $A$ such that $f(A^c)$ is separable.
I'm reading the proof of Theorem 1.4 at page 65 in the same book.
Theorem 1.4 A function $f:X \to E$ is $\mu$-measurable if and only if $f$ is $\mathcal A$-measurable and $\mu$-almost separable valued.
- "$\Longrightarrow$"
Let $O \subseteq E$ be an open set, $A \in \mathcal A$ a null set, and $(f_n)$ a sequence of $\mu$-simple functions that converges to $f$ on $A^c$. We want to prove $f^{-1} (O) \in \mathcal A$. Let $A_1 := A \bigcap f^{-1} (O)$ and $A_2 := A^c \bigcap f^{-1} (O)$. Because $\mu$ is complete and $A_1 \subseteq A$, we get $A_1 \in \mathcal A$.
Notice that $x \in A_2$ IFF almost all terms $f_n(x)$ belong to $O$ and $(f_n(x))_n$ converges to some point not on the boundary $\partial O$. Let $O_m := \{x \in X \mid d(x, \partial O)> 1/m\}$. Because $d$ is continuous, $O_n$ is open. Also, $$A_2 = A^c \bigcap \left [ \bigcup_{N \in \mathbb N} \bigcap_{n \ge N} f^{-1}_n (O) \right ] \bigcap \left [ \bigcup_{m \in \mathbb N^*} \bigcap_{N \in \mathbb N} \bigcup_{n \ge N} f_n^{-1} (O_m) \right ].$$
Clearly, $A_2 \in \mathcal A$ and thus $f^{-1}(O) = A_1 \cup A_2 \in \mathcal A$. This means $f$ is $\mathcal A$-measurable.
Let $F := \bigcup_n f_n (A^c)$. Then $F$ is countable and thus $\overline F$ is separable. Hence $f(A^c) \subseteq \overline F$ is separable and thus $f$ is $\mu$-almost separable valued.
- "$\Longleftarrow$"
Let's first assume that $\mu$ is finite. It follows from $f$ is $\mu$-almost separable valued that there is a null set $A \in \mathcal A$ such that $f(A^c)$ is separable. Let $E = \{ e_m \mid m \in \mathbb N\}$ be a countable dense subset of $f(A^c)$. For $n \in \mathbb N^*$, let $\mathcal U_n := \{\mathbb B(e_m, 1/n) \mid m \in \mathbb N\}$ be the collection of open balls with center in $E$ and radii $1/n$. Clearly, $\mathcal U_n$ is an open cover of $f(A^c)$, i.e., each $x \in A^c$ belongs to at least one ball in $\mathcal U_n$.
Let $A_{m, n} := f^{-1} (\mathbb B(e_m, 1/n))$. It follows from $f$ is $\mathcal A$-measurable that $A_{m, n} \in \mathcal A$. Also, $\mu (A_{m, n}) \le \mu(X) < \infty$. For each $n \in \mathbb N^*$, let $\varphi(n)$ be the least $k$ such that $$\mu \left [ \bigg ( \bigcup_{m = 0}^k A_{m, n} \bigg )^c \right ] \le \frac{1}{2^n}.$$
The existence of such $\varphi(n)$ is guaranteed by the continuity from below and the finiteness of $\mu$. Let $$B_n := \bigg ( \bigcup_{m = 0}^{\varphi(n)} A_{m, n} \bigg )^c.$$ Then $\mu(B_n) \le 1/2^n$. For each $n \in \mathbb N^*$, we define $f_n \in E^X$ by $$f_n (x) := \begin{cases} e_k &\text{if} \quad x \in A_{k, n} \setminus \bigcup_{m = 0}^{k-1} A_{m, n}, \quad k=0, \ldots,\varphi(n) \\ 0 &\text{otherwise}. \end{cases}$$
In this way, we assign each $x \in B_n^c$ to a center of an open ball for which $x$ belongs to its pre-image. Then $f_n \in \mathcal S(X, \mu, E)$ and $|f_n(x) - f(x)| <1/n$ for all $x \in B_n^c$ and $n \in \mathbb N^*$.
Notice that $\mu(B_n) \searrow 0$, but not $B_n \searrow \bigcap_n B_n$. We make a tweak by defining $C_n := \bigcup_{k=n}^\infty B_k$ for $n \in \mathbb N^*$. Then $$\mu(C_n) \le \sum_{k=n}^\infty \mu(B_k) = \sum_{k=n}^\infty \frac{1}{2^k} = \frac{1}{2^{n-1}}, \quad n \in \mathbb N^*.$$ Let $C := \bigcap_n C_n$. Then $C_n \searrow C$ and $\mu(C_n) \searrow 0$. We define $g_n \in E^X$ by $$g_n := f_n 1_{C_n^c}, \quad n \in \mathbb N^*.$$ It's straightforward that $g_n \in \mathcal S(X, \mu, E)$. For each $x \in C^c$, there is $n_x \in \mathbb N^*$ such that $x \in C_n^c$ for all $n \ge n_x$. This means $|g_n(x) - f(x)| <1/n$ for all $n \ge n_x$. Hence $g_n \to f$ on $C^c$.
In case $\mu$ is $\sigma$-finite. Then there is a sequence of pairwise disjoint sets with finite measure $(X_m)$ such that $\bigcup X_m = X$. Let $\mathcal A_m := \{A \cap X_m \mid A \in \mathcal A\}$ and $\mu_m := \mu_{\restriction \mathcal A_m}$ the induced $\sigma$-algebra and induced measure on $X_m$ respectively. By above result, for each $m$, there is a null set $C_m \in \mathcal A_m$ and a sequence $(g_{m,n})_n$ in $\mathcal S(X_m, \mu_m, E)$ such that $g_{m,n} \xrightarrow{n \to \infty} f 1_{X_m}$ on $C_m^c$. Let $C := \bigcup_m C_m$. Then $C \in \mathcal A$ is a null set. We define $g_n \in E^X$ by $$g_n (x) := \begin{cases} g_{m,n}(x) &\text{if} \quad x \in X_m \\ 0 &\text{otherwise} \end{cases}, \quad n \in \mathbb N^*.$$
Then $g_n \in \mathcal S(X, \mu, E)$ and $g_n \xrightarrow{n \to \infty} f$ on $C^c$. This completes the proof.
My understanding The proof and all related definitions only use the metric structure of $E$ and the fact that there is an identity element $0_E$, not the vector space structure nor the completeness of $E$. It seems to me above theorem and all definitions extend naturally to the case $E$ is a metrizable topological group.
Could you confirm if my understanding is fine?