Let $h\colon X \to \mathbb{R}$ be a function on a (separable) Banach space $X$. Consider $$\sup_{x \in f(C)} h(x)$$
where $f:Y \to X$ is a map and $C$ is some given subset of $Y$, another separable Banach space. When is this supremum equal to $$\sup_{c \in C} h(f(c))?$$
Isn't it equal always? If $x \in f(C)$, then $x=f(c)$ for some $c$. Can't we just replace it?