Doubt about a simple composition of functions. Consider, by definition, that given two continuous functions $f\colon I = [0,1] \subset \mathbb R \to X$ ($X$ is some topological space), we define the operation:
$$f \cdot g = \begin{cases}
               f(2s),   &0 \leqslant s \leqslant \frac{1}{2} \\[.15cm]
               g(2s-1), &\frac{1}{2} \leqslant s \leqslant 1.
\end{cases} $$
Taking this into account, what would be the result of $(f \cdot g) \cdot h$, for any function $h\colon I \to X?$
My attempt. (Which I belive is not right). By definition,
$$(f\cdot g)\cdot h = \begin{cases} 
                      (f \cdot g)(2s), \quad 0 \leqslant s \leqslant \frac{1}{2} \\[.15cm]
h(2s-1), \quad \frac{1}{2} \leqslant s \leqslant 1
\end{cases}
=
\begin{cases} 
                      f(4s), \quad 0 \leqslant s \leqslant \frac{1}{2} \\[.15cm]
h(2s-1), \quad \frac{1}{2} \leqslant s \leqslant 1
\end{cases}  $$
 A: One way to interpret what this does would be what you did, but this seems more probable to me:
$$
(f\cdot g)\cdot h
 = \begin{cases} 
     (f \cdot g)(2s), &0 \le s \le 1/2 \\
     h(2s-1),         &1/2 \le s \le 1
   \end{cases}
 = \begin{cases} 
     f(4s),    &0   \le s \le 1/4 \\
     g(4s-1),  &1/4 \le s \le 1/2 \\
     h(2s-1),  &1/2 \le s \le 1
   \end{cases}
$$
A: You can try breaking it into two separate functions like so
$$(f\cdot g)\cdot h : s \mapsto \begin{cases} f_1(s), &0 \leqslant s \leqslant \frac{1}{2} \\[.15cm]
f_2(s), &\frac{1}{2} \leqslant s \leqslant 1
\end{cases}$$
Where,
$$f_1 : s \mapsto (f \cdot g) (2s) = \begin{cases} f(4s), &0 \leqslant s \leqslant\frac{1}{4}\\[.15cm]
g(4s - 1), &\frac{1}{4} \leqslant s \leqslant \frac{1}{2} \end{cases}$$
and
$$f_2 : s \mapsto h(2s - 1)$$
Then,
$$(f\cdot g)\cdot h : s \mapsto \begin{cases} f(4s), &0 \leqslant s \leqslant\frac{1}{4}\\[.15cm]
g(4s - 1), &\frac{1}{4} \leqslant s \leqslant \frac{1}{2} \\[.15cm]
h(2s - 1), &\frac{1}{2} \leqslant s \leqslant 1
\end{cases}$$
