Question about a proof in integration theory I have a doubt about a proof in integration theory. First let me introduce a
Definition (antiderivative)
Let $f:[a,b]\rightarrow \mathbb R$ be continuous. We call an antiderivative of $f$ every function $F\in C^0([a,b])\cap C^1((a,b))$ such that $F'(x)=f(x)$. 
Theorem
Let $f:[a,b]\rightarrow \mathbb R$ be continuous and let $F_1$ and $F_2$ be two antiderivatives. Then $\exists \ c\in \mathbb R :F_2(x)=F_1(x)+c \ \forall x \in [a,b]$.
Proof
Let $G(x):=F_2(x)-F_1(x)$. Since $F_1$ and $F_2$ are both antiderivatives $G\in C^0([a,b])\cap C^1((a,b))$
$G'(x)=F'_2(x)-F'_1(x)=f(x)-f(x)=0\ \forall x \in \mathbb R$
So the derivative of $G$ equals to zero.
Here comes the doubt, after this it says: is not the fact that the derivative is zero that implies $G$ is a constant, but using Lagrange mean value theorem:
In every $[a,x_0] \subset [a,b]$ for Lagrange mean value theorem we have
$G(x_0)-G(a)=(x_0-a)G'(x_0)=0,\ c\in(a,x_0) \Rightarrow G(x_0)=G(a)\ \forall x\in(a,x_0) \Rightarrow$
$\Rightarrow G(x_0)=G(a)\ \forall x\in [a,b] \Rightarrow G(x_0)=c \Rightarrow F_2(x)=F_1(x)+c \ \forall x\in[a,b]$.
Why I'm not allowed to say that if the derivative is zero the function is a constant?
Is that because if a function is constant then the derivative is zero, and not vice versa?
 A: "Why I'm not allowed to say that if the derivative is zero the function is a constant?
Is that because if a function is constant then the derivative is zero, and not vice versa?"
Because this may be false if your domain is not an interval.  Consider the function
$$
f(x) = \begin{cases} 1, & x < 0 \\ 2, & x > 0. \end{cases}
$$
This function has $f'(x)=0$ where it is differentiable, but it is not a constant.  
Notice that in your argument you are on an interval, so the assumption that the derivative exists everywhere and is zero is enough to conclude that $f$ is constant.  
A: The derivative of a constant function is zero says: 
IF $f$ is a constant function, THEN the derivative of $f$ is $0$
It is important to understand that in general, we cannot assume the converse (the "vice versa") of a statement that says "If this, then that."
Simple example: "If $x = -3$, then $x^2 = 9$" is true. 
The converse: "If $x^2 = 9$, then $x = -3$" is not true. ($x$ could be $3$.)
Proving that the derivative of a constant function is $0$ does not prove that a function with $0$ derivative is constant.  It is true, but one proof does not prove both directions After proving both, we may draw either conclusion from either condition.
