There is a claim in some lecture notes on ODEs I am using to study that for any closed subset $G \subset \mathbb{R^{d}}$ the space $C([a,b],G)$ with the supremum norm is a Banach space.
The notes do not explicitly state how to interpret the notation, but I think this means that if $f \in C([a,b],G)$, then $f: [a,b] \to G$.
I know that $C([a,b],\mathbb{R^{d}})$ with the supremum norm is a Banach space, but I don't understand why $C([a,b],G)$ is even a vector space. To show that it is a vector subspace of $C([a,b],\mathbb{R^{d}})$ we need to show that it is closed under vector addition and scalar multiplication, i.e. if $f,g \in C([a,b],G)$ and $c \in \mathbb{R}$, then $cf+g \in C([a,b],G)$ or in other words that the range of $cf+g$ is in $G$. However, I don't see how to show that given that we only that $G$ is closed (meaning it contains all of its limit points). I am pretty sure that this is false unless $G$ is a subspace.
Am I missing something or do I misunderstand the notation? I could not find anything while googling for examples of Banach spaces. The examples always use $\mathbb{R}$ or $\mathbb{R^{d}}$ as the codomain.
Thanks for any hints.
Let $C([a,b],\mathbb{R^{d}})$ be the vector space of functions $f:[a,b] \to \mathbb{R^{d}}$ and define the norm $\|f\|_{\infty}=\sup \limits_{x}\|f(x)\|_{2}$, then it can be shown that this is a complete metric space w.r.t the metric induced by the norm.
Now note that $C([a,b],G)$ is a closed subset $C([a,b],\mathbb{R^{d}})$.
Proof: Let $f$ be a limit point of $C([a,b],G)$ in the metric space $C([a,b],\mathbb{R^{d}})$. This means that $\forall \epsilon>0$ $\exists$ a function $g_{\epsilon} \in C([a,b],G):g_{\epsilon} \in B_{\epsilon}(f)$, i.e. $\|f-g_{\epsilon}\|_{\infty}=\sup \limits_{x}\|f(x)-g_{\epsilon}(x)\|_{2}<\epsilon$.
This implies $\|f(x)-g_{\epsilon}(x)\|_{2} \leq \sup \limits_{x}\|f(x)-g_{\epsilon}(x)\|_{2}<\epsilon$ $\forall x \in [a,b]$. Then $f(x)$ is a limit point of $G$ in $\mathbb{R^{d}}$ since $\forall \epsilon>0$ $\exists$ a point $g_{\epsilon}(x) \in G:g_{\epsilon}(x) \in B_{\epsilon}(f(x))$. Since G is closed it contains all its limit points, so that the range of the function $f$ is contained in $G$ and $f \in C([a,b],G)$. It follows that $C([a,b],G)$ contains all its limit points and thus must be closed.
Now it is easy to see that $C([a,b],G)$ is a complete metric space since it is a closed metric subspace of the complete metric space $C([a,b],\mathbb{R^{d}})$.
If we assume that $G$ is a vector subspace of $\mathbb{R^{d}}$, then it is also a Banach space.