Showing that a constant composition implies a constant input Regarding the problem:

Consider the differentiable (continuously) functions $f$ and $g$ where $f: \mathbb{R}^k \rightarrow \mathbb{R}$ and $g: (a,d) \rightarrow \mathbb{R}^k$ solving the system of equations $\frac{dg}{dx}=- \nabla f(g(x))$ for $x \in (a,d)$.
Prove that for $[b,c] \subset (a,d): f(g(b)) = f(g(c)) \implies $ $\nabla f(g(b))=0$ and $g(x) = g(b) \space \space \forall x \in [b,c]$.

I know that we can apply the chain rule here which gives us the following result
$$ (f \circ g)'(x) =  \nabla f(g(x)) \space \cdot \space g'(x)$$
And from the system of equations presented in the question, this should allow us to make a direct substitution to find that:
$$ (f \circ g)'(x) = - \big{(} \frac{dg}{dx} \big{)}^2 $$
This tells us that $f \circ g$ is decreasing. It is also clear the converse of the desired result holds (trivially).
It feels intuitively clear, that if $f(g(b)) = f(g(c))$ for any open subset $[b,c]$ over the domain, then $g$ must be constant on this interval (with zero gradient), but I'm not clear on how to formalise this.
I’m unsure if / how the progress I have made helps us with this particular problem, and would be grateful for any guidance.
 A: Let's define the real-valued, continuously differentiable function $h:\mathbb{R}\to \mathbb{R}$ as the composition $h(x)\triangleq f(g(x))$. And consider the generic vector that composes $g$ to be $(g_1(x),\dots,g_k(x))$. You have already established that:
$$h'(x)=-\sum_{i=1}^k(g'_i(x))^2\leq0.$$
This implies that the function $h$ is weakly decreasing in $x$. Now, by the mean value theorem we know that there exists at least one $\xi\in(b,c)$ that satisfies:
$$h'(\xi)=\frac{h(c)-h(b)}{c-b}=0.$$
We will argue that in fact this is true for any $\xi \in (b,c)$ and that $h(\xi)=h(b)=h(c)$. To see why this is true assume that $h(\xi)>h(b)$. This means that by the mean-value theorem there exists a $\gamma\in (b,\xi)$ that satisfies:
$$h'(\gamma)=\frac{h(\xi)-h(b)}{\xi-b}>0.$$
But this contradicts our first monotonicity condition. We would arrive to a similar contradiction by assuming that $h(\xi)<h(b)=h(c)$. Moreover, since we can repeat this proof indefenitely, it holds for any point $\xi \in (b,c)$ that $h(\xi)=h(b)=h(c)$ and hence:
$$h'(x)=0, \text{ for all $x\in (b,c)$}.$$
The first result then follows from the premise, and the second one from our definition of $h'$.
