Solution (source code)

= Solution
{c}

The <constancy theorem> states that a <differentiable function> on an <interval> whose <derivative> vanishes everywhere is <constant>. At any included endpoints, <continuity> there is understood.

Indeed, take arbitrary $x<y$ in the <interval>. The <mean value theorem> applies on $[x,y]$ and gives $f(y)-f(x)=f'(c)(y-x)=0$. Every pair of values is equal, proving the assertion. The <interval> hypothesis ensures that the whole segment $[x,y]$ lies in the <domain>.